DSPy: The framework for programming—not prompting—language models
Python
use canary-search
yujonglee33b1cfe47da4
diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.tsindex ca922e56d..8dcaefb94 100644--- a/docs/docusaurus.config.ts+++ b/docs/docusaurus.config.ts@@ -150,15 +150,6 @@ const config: Config = {darkTheme: prismThemes.dracula, // Dark theme for code blocks},},- themes: [- [- require.resolve("@easyops-cn/docusaurus-search-local"),- /** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */- ({- hashed: true,- }),- ],- ],scripts: [{id: "runllm-widget-script",diff --git a/docs/package-lock.json b/docs/package-lock.jsonindex 76e0f5685..36f00e48e 100644--- a/docs/package-lock.json+++ b/docs/package-lock.json@@ -10,7 +10,7 @@"dependencies": {"@docusaurus/core": "3.1.0","@docusaurus/preset-classic": "3.1.0",- "@easyops-cn/docusaurus-search-local": "^0.40.1",+ "@getcanary/web": "^1.0.9","@mdx-js/react": "^3.0.0","clsx": "^2.0.0","prism-react-renderer": "^2.3.0",@@ -2759,83 +2759,54 @@"node": ">=18.0"}},- "node_modules/@easyops-cn/autocomplete.js": {- "version": "0.38.1",- "resolved": "https://registry.npmjs.org/@easyops-cn/autocomplete.js/-/autocomplete.js-0.38.1.tgz",- "integrity": "sha512-drg76jS6syilOUmVNkyo1c7ZEBPcPuK+aJA7AksM5ZIIbV57DMHCywiCr+uHyv8BE5jUTU98j/H7gVrkHrWW3Q==",+ "node_modules/@floating-ui/core": {+ "version": "1.6.8",+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz",+ "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==","dependencies": {- "cssesc": "^3.0.0",- "immediate": "^3.2.3"- }- },- "node_modules/@easyops-cn/docusaurus-search-local": {- "version": "0.40.1",- "resolved": "https://registry.npmjs.org/@easyops-cn/docusaurus-search-local/-/docusaurus-search-local-0.40.1.tgz",- "integrity": "sha512-4HMFZMpKKdd5qq1nFB8cvrAkgzZ1kNxphVciI64YHtmDYGIthVGZVG6+Ci7AAhzCR+ixLJkYwtVekvuMLjr2ZQ==",- "dependencies": {- "@docusaurus/plugin-content-docs": "^2 || ^3",- "@docusaurus/theme-translations": "^2 || ^3",- "@docusaurus/utils": "^2 || ^3",- "@docusaurus/utils-common": "^2 || ^3",- "@docusaurus/utils-validation": "^2 || ^3",- "@easyops-cn/autocomplete.js": "^0.38.1",- "@node-rs/jieba": "^1.6.0",- "cheerio": "^1.0.0-rc.3",- "clsx": "^1.1.1",- "debug": "^4.2.0",- "fs-extra": "^10.0.0",- "klaw-sync": "^6.0.0",- "lunr": "^2.3.9",- "lunr-languages": "^1.4.0",- "mark.js": "^8.11.1",- "tslib": "^2.4.0"- },- "engines": {- "node": ">=12"- },- "peerDependencies": {- "@docusaurus/theme-common": "^2 || ^3",- "react": "^16.14.0 || ^17 || ^18",- "react-dom": "^16.14.0 || 17 || ^18"- }- },- "node_modules/@easyops-cn/docusaurus-search-local/node_modules/clsx": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz",- "integrity": "sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==",- "engines": {- "node": ">=6"+ "@floating-ui/utils": "^0.2.8"}},- "node_modules/@easyops-cn/docusaurus-search-local/node_modules/fs-extra": {- "version": "10.1.0",- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",- "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",+ "node_modules/@floating-ui/dom": {+ "version": "1.6.11",+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.11.tgz",+ "integrity": "sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==","dependencies": {- "graceful-fs": "^4.2.0",- "jsonfile": "^6.0.1",- "universalify": "^2.0.0"- },- "engines": {- "node": ">=12"+ "@floating-ui/core": "^1.6.0",+ "@floating-ui/utils": "^0.2.8"}},- "node_modules/@emnapi/core": {- "version": "0.45.0",- "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-0.45.0.tgz",- "integrity": "sha512-DPWjcUDQkCeEM4VnljEOEcXdAD7pp8zSZsgOujk/LGIwCXWbXJngin+MO4zbH429lzeC3WbYLGjE2MaUOwzpyw==",- "optional": true,+ "node_modules/@floating-ui/utils": {+ "version": "0.2.8",+ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz",+ "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig=="+ },+ "node_modules/@getcanary/web": {+ "version": "1.0.9",+ "resolved": "https://registry.npmjs.org/@getcanary/web/-/web-1.0.9.tgz",+ "integrity": "sha512-TG+0sN/4zxvD62PbFCLOAGhhykD8y9j3LBlBc4Pba5dEmNUggPsgZXnx+GxK4Q/U5Tof2Cr1JfgYhC2CDLcaww==","dependencies": {- "tslib": "^2.4.0"+ "@floating-ui/dom": "^1.6.8",+ "@lit-labs/observers": "^2.0.2",+ "@lit/context": "^1.1.2",+ "@lit/task": "^1.0.1",+ "@xstate/store": "^2.5.0",+ "best-effort-json-parser": "^1.1.2",+ "lit": "^3.1.4",+ "marked": "^14.0.0",+ "picomatch": "^4.0.2",+ "prismjs": "^1.29.0"}},- "node_modules/@emnapi/runtime": {- "version": "0.45.0",- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-0.45.0.tgz",- "integrity": "sha512-Txumi3td7J4A/xTTwlssKieHKTGl3j4A1tglBx72auZ49YK7ePY6XZricgIg9mnZT4xPfA+UPCUdnhRuEFDL+w==",- "optional": true,- "dependencies": {- "tslib": "^2.4.0"+ "node_modules/@getcanary/web/node_modules/picomatch": {+ "version": "4.0.2",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"}},"node_modules/@hapi/hoek": {@@ -2935,6 +2906,44 @@"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz","integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A=="},+ "node_modules/@lit-labs/observers": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@lit-labs/observers/-/observers-2.0.4.tgz",+ "integrity": "sha512-x95jhDPGb+HtYU3hEdqkcLxb6v2JBP3tcajaiOijs1F/ZmOgRT0pRPn0v+jhhk8mAAbEO12SZJjPCmuysunssQ==",+ "dependencies": {+ "@lit/reactive-element": "^1.0.0 || ^2.0.0",+ "lit-html": "^3.2.0"+ }+ },+ "node_modules/@lit-labs/ssr-dom-shim": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.1.tgz",+ "integrity": "sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ=="+ },+ "node_modules/@lit/context": {+ "version": "1.1.3",+ "resolved": "https://registry.npmjs.org/@lit/context/-/context-1.1.3.tgz",+ "integrity": "sha512-Auh37F4S0PZM93HTDfZWs97mmzaQ7M3vnTc9YvxAGyP3UItSK/8Fs0vTOGT+njuvOwbKio/l8Cx/zWL4vkutpQ==",+ "dependencies": {+ "@lit/reactive-element": "^1.6.2 || ^2.0.0"+ }+ },+ "node_modules/@lit/reactive-element": {+ "version": "2.0.4",+ "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.4.tgz",+ "integrity": "sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==",+ "dependencies": {+ "@lit-labs/ssr-dom-shim": "^1.2.0"+ }+ },+ "node_modules/@lit/task": {+ "version": "1.0.1",+ "resolved": "https://registry.npmjs.org/@lit/task/-/task-1.0.1.tgz",+ "integrity": "sha512-fVLDtmwCau8NywnFIXaJxsCZjzaIxnVq+cFRKYC1Y4tA4/0rMTvF6DLZZ2JE51BwzOluaKtgJX8x1QDsQtAaIw==",+ "dependencies": {+ "@lit/reactive-element": "^1.0.0 || ^2.0.0"+ }+ },"node_modules/@mdx-js/mdx": {"version": "3.0.0","resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-3.0.0.tgz",@@ -2985,255 +2994,6 @@"react": ">=16"}},- "node_modules/@napi-rs/wasm-runtime": {- "version": "0.1.1",- "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.1.1.tgz",- "integrity": "sha512-ATj9ua659JgrkICjJscaeZdmPr44cb/KFjNWuD0N6pux0SpzaM7+iOuuK11mAnQM2N9q0DT4REu6NkL8ZEhopw==",- "optional": true,- "dependencies": {- "@emnapi/core": "^0.45.0",- "@emnapi/runtime": "^0.45.0",- "@tybys/wasm-util": "^0.8.1"- }- },- "node_modules/@node-rs/jieba": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba/-/jieba-1.10.0.tgz",- "integrity": "sha512-9oZMCvZVnrAMeWTSnEjJ0OSw7YcV4dJJKSioqq80oUNf3eYLGdEXsgYwCe1AYEMcfUfNVgvjznItJKrsoud0IA==",- "engines": {- "node": ">= 10"- },- "funding": {- "type": "github",- "url": "https://github.com/sponsors/Brooooooklyn"- },- "optionalDependencies": {- "@node-rs/jieba-android-arm-eabi": "1.10.0",- "@node-rs/jieba-android-arm64": "1.10.0",- "@node-rs/jieba-darwin-arm64": "1.10.0",- "@node-rs/jieba-darwin-x64": "1.10.0",- "@node-rs/jieba-freebsd-x64": "1.10.0",- "@node-rs/jieba-linux-arm-gnueabihf": "1.10.0",- "@node-rs/jieba-linux-arm64-gnu": "1.10.0",- "@node-rs/jieba-linux-arm64-musl": "1.10.0",- "@node-rs/jieba-linux-x64-gnu": "1.10.0",- "@node-rs/jieba-linux-x64-musl": "1.10.0",- "@node-rs/jieba-wasm32-wasi": "1.10.0",- "@node-rs/jieba-win32-arm64-msvc": "1.10.0",- "@node-rs/jieba-win32-ia32-msvc": "1.10.0",- "@node-rs/jieba-win32-x64-msvc": "1.10.0"- }- },- "node_modules/@node-rs/jieba-android-arm-eabi": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-android-arm-eabi/-/jieba-android-arm-eabi-1.10.0.tgz",- "integrity": "sha512-bzusJSLHm7I0qL8aQXGLt7IQ51Px35yGGEcQ/Ps4SEt0AxRSJ2/rxNET/8mlwBpOCZ5xiKE3BOBRfQajiPiI3g==",- "cpu": [- "arm"- ],- "optional": true,- "os": [- "android"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-android-arm64": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-android-arm64/-/jieba-android-arm64-1.10.0.tgz",- "integrity": "sha512-g89Oq5U2RPmtlvuQhjNj8YZc5Gq033ODb7Ot4Z/OdIHvg2WMxi2M1GQhcdKu60dO79/tazc53W6I8/y691DUfQ==",- "cpu": [- "arm64"- ],- "optional": true,- "os": [- "android"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-darwin-arm64": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-darwin-arm64/-/jieba-darwin-arm64-1.10.0.tgz",- "integrity": "sha512-IhR5r+XxFcfhVsF93zQ3uCJy8ndotRntXzoW/JCyKqOahUo/ITQRT6vTKHKMyD9xNmjl222OZonBSo2+mlI2fQ==",- "cpu": [- "arm64"- ],- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-darwin-x64": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-darwin-x64/-/jieba-darwin-x64-1.10.0.tgz",- "integrity": "sha512-MBIs8ixKY4FPnifdZ7eTx6ht85TXE4kFBK4c8A/VDAbnmzBzpEyuV7tHUA2wAdfR0muC9j7/5FB4kQGZgYfc8g==",- "cpu": [- "x64"- ],- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-freebsd-x64": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-freebsd-x64/-/jieba-freebsd-x64-1.10.0.tgz",- "integrity": "sha512-MuY+1QEXONxo3I/uFLFju0/pSN5bzQORhJkIdP8CYv+jZaVB4Uz6rC7A5HrgjiAXOna6QsKlRgx2bYyHfaBUrA==",- "cpu": [- "x64"- ],- "optional": true,- "os": [- "freebsd"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-linux-arm-gnueabihf": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-linux-arm-gnueabihf/-/jieba-linux-arm-gnueabihf-1.10.0.tgz",- "integrity": "sha512-QfSBnwISdVuTqsi4iThAO1LSbKRSqSsIWiIJgCduhYsTDDiG9+pHyfiZtcTwSf73SDXHZ400QuBNONWLQ/dSag==",- "cpu": [- "arm"- ],- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-linux-arm64-gnu": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-linux-arm64-gnu/-/jieba-linux-arm64-gnu-1.10.0.tgz",- "integrity": "sha512-vzA2tX/6dReEd/7tZ9927glWQmKDausM6R9S5CqZx4BA4NSaWAK0xFdWsz0K7np459FXqNavLdNB5FVFJb4zzA==",- "cpu": [- "arm64"- ],- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-linux-arm64-musl": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-linux-arm64-musl/-/jieba-linux-arm64-musl-1.10.0.tgz",- "integrity": "sha512-gxqoAVOQsn9sgYK6mFO9dsMZ/yOMvVecLZW5rGvLErjiugVvYUlESXIvCqxp2GSws8RtTqJj6p9u/lBmCCuvaw==",- "cpu": [- "arm64"- ],- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-linux-x64-gnu": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-linux-x64-gnu/-/jieba-linux-x64-gnu-1.10.0.tgz",- "integrity": "sha512-rS5Shs8JITxJjFIjoIZ5a9O+GO21TJgKu03g2qwFE3QaN5ZOvXtz+/AqqyfT4GmmMhCujD83AGqfOGXDmItF9w==",- "cpu": [- "x64"- ],- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-linux-x64-musl": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-linux-x64-musl/-/jieba-linux-x64-musl-1.10.0.tgz",- "integrity": "sha512-BvSiF2rR8Birh2oEVHcYwq0WGC1cegkEdddWsPrrSmpKmukJE2zyjcxaOOggq2apb8fIRsjyeeUh6X3R5AgjvA==",- "cpu": [- "x64"- ],- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-wasm32-wasi": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-wasm32-wasi/-/jieba-wasm32-wasi-1.10.0.tgz",- "integrity": "sha512-EzeAAbRrFTdYw61rd8Mfwdp/fA21d58z9vLY06CDbI+dqANfMFn1IUdwzKWi8S5J/MRhvbzonbbh3yHlz6F43Q==",- "cpu": [- "wasm32"- ],- "optional": true,- "dependencies": {- "@napi-rs/wasm-runtime": "^0.1.1"- },- "engines": {- "node": ">=14.0.0"- }- },- "node_modules/@node-rs/jieba-win32-arm64-msvc": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-win32-arm64-msvc/-/jieba-win32-arm64-msvc-1.10.0.tgz",- "integrity": "sha512-eZjRLFUAvq1/E5+xXfJRqIB99Gu6BA+6+EXf/rCLuvEjXrDQuUunhmrSoOL5MjmUXTtazS+bXq9PXV5EFYyOPw==",- "cpu": [- "arm64"- ],- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-win32-ia32-msvc": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-win32-ia32-msvc/-/jieba-win32-ia32-msvc-1.10.0.tgz",- "integrity": "sha512-DrfbeCN7UcLN+MiocZabWo74XZIjfpQsJ/WMOItZzVbU2gDcJSkSyAhML9+OqId66DhGCMFFlGinocElM8iIAw==",- "cpu": [- "ia32"- ],- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@node-rs/jieba-win32-x64-msvc": {- "version": "1.10.0",- "resolved": "https://registry.npmjs.org/@node-rs/jieba-win32-x64-msvc/-/jieba-win32-x64-msvc-1.10.0.tgz",- "integrity": "sha512-RjBkBmjjHmj+bofiq5/han8wzbCkDk24OAPJ+YX8PX20GFSHmdjCiWapv3AooN8/RiKqlBfgodjS1JUngNWo5g==",- "cpu": [- "x64"- ],- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">= 10"- }- },"node_modules/@nodelib/fs.scandir": {"version": "2.1.5","resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",@@ -3627,15 +3387,6 @@"node": ">=10.13.0"}},- "node_modules/@tybys/wasm-util": {- "version": "0.8.1",- "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.8.1.tgz",- "integrity": "sha512-GSsTwyBl4pIzsxAY5wroZdyQKyhXk0d8PCRZtrSZ2WEB1cBdrp2EgGBwHOGCZtIIPun/DL3+AykCv+J6fyRH4Q==",- "optional": true,- "dependencies": {- "tslib": "^2.4.0"- }- },"node_modules/@types/acorn": {"version": "4.0.6","resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz",@@ -3962,6 +3713,11 @@"@types/node": "*"}},+ "node_modules/@types/trusted-types": {+ "version": "2.0.7",+ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",+ "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="+ },"node_modules/@types/unist": {"version": "3.0.2","resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz",@@ -4124,6 +3880,23 @@"@xtuc/long": "4.2.2"}},+ "node_modules/@xstate/store": {+ "version": "2.6.0",+ "resolved": "https://registry.npmjs.org/@xstate/store/-/store-2.6.0.tgz",+ "integrity": "sha512-pHiGIn378yPSCY36f/8iFF1KtKTKpGINqUVJH/dYydzWT+uXc4zKUQ+XUk0qTHchTvBXQ/UivRox2Q19ZnzTjw==",+ "peerDependencies": {+ "react": "^18.2.0",+ "solid-js": "^1.7.6"+ },+ "peerDependenciesMeta": {+ "react": {+ "optional": true+ },+ "solid-js": {+ "optional": true+ }+ }+ },"node_modules/@xtuc/ieee754": {"version": "1.2.0","resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",@@ -4542,6 +4315,11 @@"resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz","integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw=="},+ "node_modules/best-effort-json-parser": {+ "version": "1.1.2",+ "resolved": "https://registry.npmjs.org/best-effort-json-parser/-/best-effort-json-parser-1.1.2.tgz",+ "integrity": "sha512-RD7tyk24pNCDwEKFACauR6Lqp5m6BHUrehwyhN/pA8V3QYWq8Y+hk9vHZvKiThZsdEFTaUqN49duVsamgCd8/g=="+ },"node_modules/big.js": {"version": "5.2.2","resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",@@ -7761,11 +7539,6 @@"node": ">=16.x"}},- "node_modules/immediate": {- "version": "3.3.0",- "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz",- "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q=="- },"node_modules/immer": {"version": "9.0.21","resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz",@@ -8295,14 +8068,6 @@"node": ">=0.10.0"}},- "node_modules/klaw-sync": {- "version": "6.0.0",- "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",- "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==",- "dependencies": {- "graceful-fs": "^4.1.11"- }- },"node_modules/kleur": {"version": "3.0.3","resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",@@ -8355,6 +8120,34 @@"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz","integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="},+ "node_modules/lit": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/lit/-/lit-3.2.1.tgz",+ "integrity": "sha512-1BBa1E/z0O9ye5fZprPtdqnc0BFzxIxTTOO/tQFmyC/hj1O3jL4TfmLBw0WEwjAokdLwpclkvGgDJwTIh0/22w==",+ "dependencies": {+ "@lit/reactive-element": "^2.0.4",+ "lit-element": "^4.1.0",+ "lit-html": "^3.2.0"+ }+ },+ "node_modules/lit-element": {+ "version": "4.1.1",+ "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.1.1.tgz",+ "integrity": "sha512-HO9Tkkh34QkTeUmEdNYhMT8hzLid7YlMlATSi1q4q17HE5d9mrrEHJ/o8O2D0cMi182zK1F3v7x0PWFjrhXFew==",+ "dependencies": {+ "@lit-labs/ssr-dom-shim": "^1.2.0",+ "@lit/reactive-element": "^2.0.4",+ "lit-html": "^3.2.0"+ }+ },+ "node_modules/lit-html": {+ "version": "3.2.1",+ "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.2.1.tgz",+ "integrity": "sha512-qI/3lziaPMSKsrwlxH/xMgikhQ0EGOX2ICU73Bi/YHFvz2j/yMCIrw4+puF2IpQ4+upd3EWbvnHM9+PnJn48YA==",+ "dependencies": {+ "@types/trusted-types": "^2.0.2"+ }+ },"node_modules/loader-runner": {"version": "4.3.0","resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",@@ -8457,21 +8250,6 @@"yallist": "^3.0.2"}},- "node_modules/lunr": {- "version": "2.3.9",- "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz",- "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow=="- },- "node_modules/lunr-languages": {- "version": "1.14.0",- "resolved": "https://registry.npmjs.org/lunr-languages/-/lunr-languages-1.14.0.tgz",- "integrity": "sha512-hWUAb2KqM3L7J5bcrngszzISY4BxrXn/Xhbb9TTCJYEGqlR1nG67/M14sp09+PTIRklobrn57IAxcdcO/ZFyNA=="- },- "node_modules/mark.js": {- "version": "8.11.1",- "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz",- "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ=="- },"node_modules/markdown-extensions": {"version": "2.0.0","resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz",@@ -8492,6 +8270,17 @@"url": "https://github.com/sponsors/wooorm"}},+ "node_modules/marked": {+ "version": "14.1.2",+ "resolved": "https://registry.npmjs.org/marked/-/marked-14.1.2.tgz",+ "integrity": "sha512-f3r0yqpz31VXiDB/wj9GaOB0a2PRLQl6vJmXiFrniNwjkKdvakqJRULhjFKJpxOchlCRiG5fcacoUZY5Xa6PEQ==",+ "bin": {+ "marked": "bin/marked.js"+ },+ "engines": {+ "node": ">= 18"+ }+ },"node_modules/mdast-util-directive": {"version": "3.0.0","resolved": "https://registry.npmjs.org/mdast-util-directive/-/mdast-util-directive-3.0.0.tgz",diff --git a/docs/package.json b/docs/package.jsonindex 8a50a3c89..a1b6d2b65 100644--- a/docs/package.json+++ b/docs/package.json@@ -17,7 +17,7 @@"dependencies": {"@docusaurus/core": "3.1.0","@docusaurus/preset-classic": "3.1.0",- "@easyops-cn/docusaurus-search-local": "^0.40.1",+ "@getcanary/web": "^1.0.9","@mdx-js/react": "^3.0.0","clsx": "^2.0.0","prism-react-renderer": "^2.3.0",diff --git a/docs/src/css/custom.css b/docs/src/css/custom.cssindex 9fb67458e..e4c874a92 100644--- a/docs/src/css/custom.css+++ b/docs/src/css/custom.css@@ -75,4 +75,18 @@ html[data-theme='dark'] .header-github-link:before {html[data-theme='dark'] .header-discord-link:before {background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z'/%3E%3C/svg%3E")no-repeat center center;-}\ No newline at end of file+}++canary-root {+ /* https://getcanary.dev/docs/common/customization/styling#css-variables */+ --canary-color-primary-c: 0.15;+ --canary-color-primary-h: 270;+}++canary-trigger-searchbar::part(button) {+ background-color: var(--ifm-background-color);+}++canary-trigger-searchbar::part(kbd) {+ background-color: var(--ifm-background-color);+}diff --git a/docs/src/theme/SearchBar.js b/docs/src/theme/SearchBar.jsnew file mode 100644index 000000000..b625b372e--- /dev/null+++ b/docs/src/theme/SearchBar.js@@ -0,0 +1,65 @@+import React from "react";++export default function CanarySearchBar() {+ const [loaded, setLoaded] = React.useState(false);++ const TABS = JSON.stringify([+ {+ name: "Docs",+ pattern: "**/docs/**",+ options: { ignore: "**/api/**" },+ },+ {+ name: "API",+ pattern: "**/api/**",+ },+ {+ name: "Github",+ pattern: "**/github.com/**",+ },+ ]);++ React.useEffect(() => {+ Promise.all([+ import("@getcanary/web/components/canary-root.js"),+ import("@getcanary/web/components/canary-provider-cloud.js"),+ import("@getcanary/web/components/canary-modal.js"),+ import("@getcanary/web/components/canary-trigger-searchbar.js"),+ import("@getcanary/web/components/canary-content.js"),+ import("@getcanary/web/components/canary-input.js"),+ import("@getcanary/web/components/canary-search.js"),+ import("@getcanary/web/components/canary-search-results.js"),+ import("@getcanary/web/components/canary-search-match-github-issue.js"),+ import("@getcanary/web/components/canary-search-match-github-discussion.js"),+ import("@getcanary/web/components/canary-filter-tabs-glob.js"),+ import("@getcanary/web/components/canary-footer.js"),+ ]).then(() => {+ setLoaded(true);+ });+ }, []);++ if (!loaded) {+ return null;+ }++ return (+ <canary-root framework="docusaurus">+ <canary-provider-cloud project-key="cpab9997bf">+ <canary-modal>+ <canary-trigger-searchbar slot="trigger"></canary-trigger-searchbar>+ <canary-content slot="content">+ <canary-input slot="input"></canary-input>+ <canary-search slot="mode">+ <canary-filter-tabs-glob+ slot="head"+ tabs={TABS}+ ></canary-filter-tabs-glob>+ <canary-search-results slot="body"></canary-search-results>+ </canary-search>+ <canary-footer slot="footer"></canary-footer>+ </canary-content>+ </canary-modal>+ </canary-provider-cloud>+ </canary-root>+ );+}