first commit

This commit is contained in:
2026-01-09 23:05:52 -05:00
commit dec0c8e4e4
4203 changed files with 824454 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# @docsearch/css
Style package for [DocSearch](http://docsearch.algolia.com/), the best search experience for docs.
## Installation
```bash
yarn add @docsearch/css@4
# or
npm install @docsearch/css@4
```
If you dont want to use a package manager, you can use a standalone endpoint:
```html
<script src="https://cdn.jsdelivr.net/npm/@docsearch/css@4"></script>
```
## Get started
```js
import '@docsearch/css';
```
## Documentation
[Read documentation →](https://docsearch.algolia.com/docs/styling)
+2
View File
@@ -0,0 +1,2 @@
/*! @docsearch/css Variables 4.3.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */
:root{--docsearch-primary-color:#003dff;--docsearch-soft-primary-color:rgba(0,61,255,.1);--docsearch-subtle-color:#d6d6e7;--docsearch-text-color:#36395a;--docsearch-error-color:#ef5350;--docsearch-success-color:#e8f5e9;--docsearch-secondary-text-color:#5a5e9a;--docsearch-background-color:#f5f5fa;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-focus-color:#005fcc;--docsearch-highlight-color:#003dff;--docsearch-muted-color:#9698c3;--docsearch-muted-color-darker:rgba(120,122,165,.25);--docsearch-icon-color:#5a5e9a;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#003dff;--docsearch-border-radius:4px;--docsearch-modal-width:800px;--docsearch-modal-height:600px;--docsearch-modal-variable-height:60dvh;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:rgba(0,0,0,.2) 0px 12px 28px 0px,rgba(0,0,0,.1) 0px 2px 4px 0px,hsla(0,0%,100%,.05) 0px 0px 0px 1px inset;--docsearch-searchbox-height:56px;--docsearch-searchbox-initial-height:56px;--docsearch-searchbox-background:#ffffffa6;--docsearch-searchbox-focus-background:#ffffffa6;--docsearch-actions-width:99px;--docsearch-actions-height:44px;--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-highlight-color:rgba(0,61,255,.1);--docsearch-hit-background:#fff;--docsearch-key-background:#f5f5fa;--docsearch-key-color:#5a5e9a;--docsearch-key-pressed-shadow:inset 0 2px 4px rgba(120,122,165,.25);--docsearch-footer-height:52px;--docsearch-footer-background:#ffffffa6;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--fav-out-dur:160ms;--del-dur:150ms;--ease-smooth:cubic-bezier(0.25,0.8,0.4,1);--ease-fast:cubic-bezier(0.45,0.15,0.6,0.9);--shadow-pop:0 4px 12px rgba(0,0,0,.06);--shimmer-bg:linear-gradient(90deg,#e0e3e8 0%,var(--docsearch-muted-color) 20%,var(--docsearch-muted-color) 60%,#e0e3e8 95%);--docsearch-dropdown-menu-background:var(--docsearch-hit-background);--docsearch-dropdown-menu-item-hover-background:var(--docsearch-modal-background)}html[data-theme=dark]{--docsearch-text-color:#c4c7dc;--docsearch-secondary-text-color:#b6b7d5;--docsearch-subtle-color:#212139;--docsearch-error-color:#ef5350;--docsearch-success-color:rgba(67,160,71,.2);--docsearch-highlight-color:#457aff;--docsearch-focus-color:#9ac8ff;--docsearch-background-color:#36395a;--docsearch-icon-color:#b6b7d5;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#000000a6;--docsearch-searchbox-focus-background:#000000a6;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-background:#36395a;--docsearch-key-color:#b6b7d5;--docsearch-key-pressed-shadow:inset 0 2px 4px rgba(12,13,20,.4);--docsearch-footer-background:#000000a6;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497;--shimmer-bg:linear-gradient(90deg,#e0e3e8 0%,var(--docsearch-muted-color) 20%,var(--docsearch-muted-color) 60%,#e0e3e8 95%);--docsearch-dropdown-menu-item-hover-background:#10121e}
+2
View File
@@ -0,0 +1,2 @@
/*! @docsearch/css Button 4.3.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */
.DocSearch-Button{all:unset;align-items:center;background-color:var(--docsearch-searchbox-background);border:1px solid var(--docsearch-subtle-color);border-radius:4px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;height:36px;justify-content:space-between;padding:0 8px;user-select:none}.DocSearch-Button-Container{align-items:center;display:flex;height:100%}.DocSearch-Button-Container svg{color:var(--docsearch-muted-color)}.DocSearch-Back-Icon,.DocSearch-Search-Icon{color:var(--docsearch-highlight-color);stroke-width:1.6}.DocSearch-Button-Placeholder{color:var(--docsearch-muted-color);display:inline-block;font-size:1rem;line-height:normal;padding:0 12px 0 8px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-background);border:0;border:1px solid color-mix(in srgb,var(--docsearch-subtle-color) 20%,transparent);border-radius:4px;box-shadow:none!important;color:var(--docsearch-key-color);display:flex;font-size:14px;height:24px;justify-content:center;position:relative;transition-duration:.1s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:24px}.DocSearch-Button-Key--ctrl{width:33px}.DocSearch-Button-Key:first-child{margin-right:.4em}@media (prefers-reduced-motion){.DocSearch-Button-Key{transition:none}}.DocSearch-Button-Key--pressed{box-shadow:var(--docsearch-key-pressed-shadow)!important;transform:translateY(1px)}@media (max-width:768px){.DocSearch-Button{width:auto}.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}
+4
View File
File diff suppressed because one or more lines are too long
+4
View File
File diff suppressed because one or more lines are too long
+4
View File
File diff suppressed because one or more lines are too long
+31
View File
@@ -0,0 +1,31 @@
{
"name": "@docsearch/css",
"description": "Styles for DocSearch.",
"version": "4.3.2",
"license": "MIT",
"homepage": "https://docsearch.algolia.com",
"repository": {
"type": "git",
"url": "git+https://github.com/algolia/docsearch.git",
"directory": "packages/docsearch-css"
},
"author": {
"name": "Algolia, Inc.",
"url": "https://www.algolia.com"
},
"files": [
"dist/"
],
"main": "dist/style.css",
"unpkg": "dist/style.css",
"jsdelivr": "dist/style.css",
"scripts": {
"build:clean": "rm -rf ./dist",
"build:css": "node build-css.js",
"build": "yarn build:clean && mkdir dist && yarn build:css",
"watch": "nodemon --watch 'src/**/*.css' --exec 'yarn build:css' --ext css"
},
"devDependencies": {
"nodemon": "^3.1.9"
}
}
+46
View File
@@ -0,0 +1,46 @@
# @docsearch/js
JavaScript package for [DocSearch](http://docsearch.algolia.com/), the best search experience for docs.
## Installation
```sh
yarn add @docsearch/js@4
# or
npm install @docsearch/js@4
```
## Get started
If you dont want to use a package manager, you can use a standalone endpoint:
```html
<script src="https://cdn.jsdelivr.net/npm/@docsearch/js@4"></script>
```
To get started, you need a [`container`](https://docsearch.algolia.com/docs/api#container) for your DocSearch component to go in. If you dont have one already, you can insert one into your markup:
```html
<div id="docsearch"></div>
```
Then, insert DocSearch into it by calling the [`docsearch`](https://docsearch.algolia.com/docs/api) function and providing the container. It can be a [CSS selector](https://developer.mozilla.org/en-us/docs/web/css/css_selectors) or an [Element](https://developer.mozilla.org/en-us/docs/web/api/htmlelement).
Make sure to provide a [`container`](https://docsearch.algolia.com/docs/api#container) (for example, a `div`), not an `input`. DocSearch generates a fully accessible search box for you.
```js app.js
import docsearch from '@docsearch/js';
import '@docsearch/css';
docsearch({
container: '#docsearch',
appId: 'YOUR_APP_ID',
indexName: 'YOUR_INDEX_NAME',
apiKey: 'YOUR_SEARCH_API_KEY',
});
```
## Documentation
[Read documentation →](https://docsearch.algolia.com/docs/docsearch-v3)
+8688
View File
File diff suppressed because it is too large Load Diff
+7
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+7
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+45
View File
@@ -0,0 +1,45 @@
{
"name": "@docsearch/js",
"description": "JavaScript package for DocSearch, the best search experience for docs.",
"version": "4.3.2",
"license": "MIT",
"homepage": "https://docsearch.algolia.com",
"repository": {
"type": "git",
"url": "git+https://github.com/algolia/docsearch.git",
"directory": "packages/docsearch-js"
},
"author": {
"name": "Algolia, Inc.",
"url": "https://www.algolia.com"
},
"sideEffects": false,
"files": [
"dist/"
],
"source": "src/index.ts",
"types": "dist/esm/index.d.ts",
"module": "dist/esm/index.js",
"main": "dist/umd/index.js",
"umd:main": "dist/umd/index.js",
"unpkg": "dist/umd/index.js",
"jsdelivr": "dist/umd/index.js",
"scripts": {
"build:clean": "rm -rf ./dist",
"build:types": "tsc -p ./tsconfig.declaration.json --outDir ./dist/esm/types",
"build:clean-types": "rm -rf ./dist/esm/types",
"build": "yarn build:clean && yarn build:types && rollup --config --bundleConfigAsCjs && yarn build:clean-types",
"on:change": "yarn build",
"watch": "nodemon --watch src --exec \"yarn on:change\" --ignore dist/ --ext ts,tsx"
},
"dependencies": {
"htm": "3.1.1"
},
"devDependencies": {
"@docsearch/react": "4.3.2",
"@rollup/plugin-replace": "6.0.2",
"nodemon": "^3.1.9",
"preact": "^10.0.0",
"rollup-plugin-dts": "^6.2.1"
}
}