From bc82122a753d7eaa0c510f7d9ed244c278a11127 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 30 Jul 2024 16:49:41 +0200 Subject: [PATCH] Added per language scope support docs (#2451) ## Checklist - [/] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [x] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com> --- .../scopeSupportFacets.types.ts | 2 +- packages/cursorless-org-docs/.gitignore | 4 - .../cursorless-org-docs/docusaurus.config.mts | 8 +- packages/cursorless-org-docs/package.json | 2 + .../cursorless-org-docs/src/css/custom.css | 4 + .../src/docs}/contributing/CONTRIBUTING.md | 0 .../src/docs}/contributing/_api-index.md | 0 .../contributing/adding-a-new-language.md | 8 +- .../contributing/adding-a-new-package.md | 0 .../docs}/contributing/adding-a-new-scope.md | 8 +- .../architecture/hat-snapshots.md | 0 .../images/hat-token-map-snapshots.png | Bin .../neovim-test-infrastructure.md | 0 .../src/docs}/contributing/cheatsheet.md | 4 +- .../contributing/cursorless-in-neovim.md | 0 .../contributing/documentation-search.md | 8 +- .../src/docs}/contributing/guidelines.md | 0 .../docs}/contributing/parse-tree-patterns.md | 0 .../docs}/contributing/test-case-recorder.md | 14 +-- .../src/docs}/contributing/tests.md | 0 .../contributing/tree-sitter-query-syntax.md | 2 +- .../src/docs}/user/README.md | 30 +++---- .../src/docs}/user/customization.md | 0 .../src/docs}/user/experimental/README.md | 0 .../user/experimental/images/linkWrap.gif | Bin .../user/experimental/images/tryWrapFine.gif | Bin .../keyboard/images/keyboardBring.gif | Bin .../keyboard/images/keyboardDelete.gif | Bin .../keyboard/images/keyboardPour.gif | Bin .../docs}/user/experimental/keyboard/modal.md | 0 .../docs}/user/experimental/snippet-format.md | 0 .../src/docs}/user/experimental/snippets.md | 0 .../src/docs}/user/glossary.md | 0 .../src/docs}/user/hatAssignment.md | 0 .../src/docs}/user/how-to.md | 0 .../src/docs}/user/images/chuckBat.gif | Bin .../docs}/user/images/custom-regex-scopes.png | Bin .../docs}/user/images/relative_ordinal.png | Bin .../docs}/user/images/relative_ordinal.tex | 0 .../user/images/visualize-block-removal.png | Bin .../src/docs}/user/images/visualize-funk.png | Bin .../src/docs}/user/images/visualize-token.png | Bin .../src/docs}/user/installation.md | 0 .../src/docs/user/languages/Language.tsx | 10 +++ .../src/docs/user/languages/README.md | 5 ++ .../src/docs/user/languages/ScopeSupport.tsx | 82 ++++++++++++++++++ .../src/docs/user/languages/_category_.json | 3 + .../src/docs/user/languages/c.mdx | 5 ++ .../src/docs/user/languages/clojure.mdx | 5 ++ .../src/docs/user/languages/cpp.mdx | 5 ++ .../src/docs/user/languages/csharp.mdx | 5 ++ .../src/docs/user/languages/css.mdx | 5 ++ .../src/docs/user/languages/go.mdx | 5 ++ .../src/docs/user/languages/html.mdx | 5 ++ .../src/docs/user/languages/java.mdx | 5 ++ .../src/docs/user/languages/javascript.mdx | 5 ++ .../docs/user/languages/javascriptreact.mdx | 5 ++ .../src/docs/user/languages/json.mdx | 5 ++ .../src/docs/user/languages/jsonc.mdx | 5 ++ .../src/docs/user/languages/jsonl.mdx | 5 ++ .../src/docs/user/languages/latex.mdx | 5 ++ .../src/docs/user/languages/lua.mdx | 5 ++ .../src/docs/user/languages/markdown.mdx | 5 ++ .../src/docs/user/languages/php.mdx | 5 ++ .../src/docs/user/languages/python.mdx | 5 ++ .../src/docs/user/languages/ruby.mdx | 5 ++ .../src/docs/user/languages/rust.mdx | 5 ++ .../src/docs/user/languages/scala.mdx | 5 ++ .../src/docs/user/languages/scm.mdx | 5 ++ .../src/docs/user/languages/scss.mdx | 5 ++ .../src/docs/user/languages/talon.mdx | 5 ++ .../src/docs/user/languages/typescript.mdx | 5 ++ .../docs/user/languages/typescriptreact.mdx | 5 ++ .../src/docs/user/languages/xml.mdx | 5 ++ .../src/docs/user/languages/yaml.mdx | 5 ++ .../src/docs}/user/localCommandHIstory.md | 0 .../src/docs}/user/reference/destinations.md | 0 .../src/docs}/user/release-notes/0.28.0.md | 0 .../user/release-notes/2022-year-in-review.md | 0 .../src/docs}/user/release-notes/README.md | 0 .../src/docs}/user/release-notes/big-hats.png | Bin .../release-notes/sidebar-sneak-preview.png | Bin .../src/docs}/user/scope-sidebar.md | 0 .../src/docs}/user/scope-visualizer.md | 0 .../src/docs}/user/unicode.md | 0 .../src/docs}/user/updating.md | 0 .../src/docs}/user/visualAccessibility.md | 0 packages/cursorless-org-docs/tsconfig.json | 20 ++++- packages/meta-updater/src/metaUpdater.ts | 20 ++++- packages/meta-updater/src/textFormat.ts | 10 +++ .../src/updateLanguageScopeSupportConfig.ts | 25 ++++++ pnpm-lock.yaml | 42 +++++---- 92 files changed, 377 insertions(+), 74 deletions(-) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/CONTRIBUTING.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/_api-index.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/adding-a-new-language.md (65%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/adding-a-new-package.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/adding-a-new-scope.md (86%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/architecture/hat-snapshots.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/architecture/images/hat-token-map-snapshots.png (100%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/architecture/neovim-test-infrastructure.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/cheatsheet.md (69%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/cursorless-in-neovim.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/documentation-search.md (67%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/guidelines.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/parse-tree-patterns.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/test-case-recorder.md (81%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/tests.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/contributing/tree-sitter-query-syntax.md (93%) rename {docs => packages/cursorless-org-docs/src/docs}/user/README.md (94%) rename {docs => packages/cursorless-org-docs/src/docs}/user/customization.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/experimental/README.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/experimental/images/linkWrap.gif (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/experimental/images/tryWrapFine.gif (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/experimental/keyboard/images/keyboardBring.gif (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/experimental/keyboard/images/keyboardDelete.gif (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/experimental/keyboard/images/keyboardPour.gif (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/experimental/keyboard/modal.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/experimental/snippet-format.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/experimental/snippets.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/glossary.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/hatAssignment.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/how-to.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/images/chuckBat.gif (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/images/custom-regex-scopes.png (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/images/relative_ordinal.png (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/images/relative_ordinal.tex (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/images/visualize-block-removal.png (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/images/visualize-funk.png (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/images/visualize-token.png (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/installation.md (100%) create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/Language.tsx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/README.md create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/ScopeSupport.tsx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/_category_.json create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/c.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/clojure.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/cpp.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/csharp.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/css.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/go.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/html.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/java.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/javascript.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/javascriptreact.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/json.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/jsonc.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/jsonl.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/latex.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/lua.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/markdown.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/php.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/python.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/ruby.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/rust.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/scala.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/scm.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/scss.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/talon.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/typescript.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/typescriptreact.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/xml.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/yaml.mdx rename {docs => packages/cursorless-org-docs/src/docs}/user/localCommandHIstory.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/reference/destinations.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/release-notes/0.28.0.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/release-notes/2022-year-in-review.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/release-notes/README.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/release-notes/big-hats.png (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/release-notes/sidebar-sneak-preview.png (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/scope-sidebar.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/scope-visualizer.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/unicode.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/updating.md (100%) rename {docs => packages/cursorless-org-docs/src/docs}/user/visualAccessibility.md (100%) create mode 100644 packages/meta-updater/src/textFormat.ts create mode 100644 packages/meta-updater/src/updateLanguageScopeSupportConfig.ts diff --git a/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts b/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts index 0505dc26d6..850f719764 100644 --- a/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts +++ b/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts @@ -3,7 +3,7 @@ import { type ScopeType, } from "../types/command/PartialTargetDescriptor.types"; -const scopeSupportFacets = [ +export const scopeSupportFacets = [ "command", "element", diff --git a/packages/cursorless-org-docs/.gitignore b/packages/cursorless-org-docs/.gitignore index a0ac1f98ac..b2d6de3062 100644 --- a/packages/cursorless-org-docs/.gitignore +++ b/packages/cursorless-org-docs/.gitignore @@ -8,10 +8,6 @@ .docusaurus .cache-loader -# Copied from root of the repository -docs/ -images/ - # Misc .DS_Store .env.local diff --git a/packages/cursorless-org-docs/docusaurus.config.mts b/packages/cursorless-org-docs/docusaurus.config.mts index 20ca4f7d55..85853b3be0 100644 --- a/packages/cursorless-org-docs/docusaurus.config.mts +++ b/packages/cursorless-org-docs/docusaurus.config.mts @@ -42,7 +42,7 @@ function remarkPluginFixLinksToRepositoryArtifacts(): Transformer { "../..", ); const artifact = resolve(file.dirname!, url); - const artifactRelative = relative(repoRoot, artifact); + const artifactRelative = relative(repoRoot, artifact).replace(/\\/g, "/"); // We host all files under docs, will resolve as a relative link if (artifactRelative.startsWith("docs/")) { @@ -104,13 +104,11 @@ const config: Config = { "classic", { docs: { - path: "../../docs", + path: "./src/docs", // Followed https://ricard.dev/how-to-set-docs-as-homepage-for-docusaurus/ // to serve a markdown document on homepage routeBasePath: "/", - // Note that we add dummy/dummy so that the `../..` above has something to strip - editUrl: - "https://github.com/cursorless-dev/cursorless/edit/main/dummy/dummy", + editUrl: "https://github.com/cursorless-dev/cursorless/edit/main", sidebarPath: require.resolve("./sidebar.js"), beforeDefaultRemarkPlugins: [ remarkPluginFixLinksToRepositoryArtifacts, diff --git a/packages/cursorless-org-docs/package.json b/packages/cursorless-org-docs/package.json index a865a5a44f..cf34d5d7c1 100644 --- a/packages/cursorless-org-docs/package.json +++ b/packages/cursorless-org-docs/package.json @@ -18,6 +18,7 @@ "clean": "pnpm clear && rm -rf ./out tsconfig.tsbuildinfo ./dist ./build" }, "dependencies": { + "@cursorless/common": "workspace:*", "@algolia/client-search": "4.22.1", "@docsearch/react": "3.6.0", "@docusaurus/core": "3.1.1", @@ -50,6 +51,7 @@ "@docusaurus/types": "3.1.1", "@tsconfig/docusaurus": "2.0.2", "@types/mdast": "4.0.3", + "@types/react": "18.2.71", "typescript": "^5.5.3", "unified": "11.0.4" }, diff --git a/packages/cursorless-org-docs/src/css/custom.css b/packages/cursorless-org-docs/src/css/custom.css index 9dca5a9900..f6b6fa3065 100644 --- a/packages/cursorless-org-docs/src/css/custom.css +++ b/packages/cursorless-org-docs/src/css/custom.css @@ -24,3 +24,7 @@ [data-theme="light"] .light-mode-invert { filter: invert(90%) hue-rotate(180deg); } + +.hidden { + display: none; +} diff --git a/docs/contributing/CONTRIBUTING.md b/packages/cursorless-org-docs/src/docs/contributing/CONTRIBUTING.md similarity index 100% rename from docs/contributing/CONTRIBUTING.md rename to packages/cursorless-org-docs/src/docs/contributing/CONTRIBUTING.md diff --git a/docs/contributing/_api-index.md b/packages/cursorless-org-docs/src/docs/contributing/_api-index.md similarity index 100% rename from docs/contributing/_api-index.md rename to packages/cursorless-org-docs/src/docs/contributing/_api-index.md diff --git a/docs/contributing/adding-a-new-language.md b/packages/cursorless-org-docs/src/docs/contributing/adding-a-new-language.md similarity index 65% rename from docs/contributing/adding-a-new-language.md rename to packages/cursorless-org-docs/src/docs/contributing/adding-a-new-language.md index 051966d2b8..8a1d5f5bd6 100644 --- a/docs/contributing/adding-a-new-language.md +++ b/packages/cursorless-org-docs/src/docs/contributing/adding-a-new-language.md @@ -11,11 +11,11 @@ for how to add support for a new parser ## 2. Ensure file type is supported by VSCode -If you are adding support for a new language that isn't natively detected by VSCode, you will need to add the appropriate extension to the list of dependencies. The list of languages officially supported by VSCode is listed [in the VSCode docs](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers). If your language is in that list, you can skip this step and proceed to step 3. If your language is not in that list, you need to find a VSCode extension that adds support for your language, and add the id of the given extension to [`packages/common/src/extensionDependencies.ts`](../../packages/common/src/extensionDependencies.ts) and then re-run `pnpm init-vscode-sandbox` to ensure it is installed. If you do not do this you will encounter errors when attempting to execute cursorless commands in the next step. See [#1895](https://github.com/cursorless-dev/cursorless/issues/1895) for more info. +If you are adding support for a new language that isn't natively detected by VSCode, you will need to add the appropriate extension to the list of dependencies. The list of languages officially supported by VSCode is listed [in the VSCode docs](https://code.visualstudio.com/docs/languages/identifiers#_known-language-identifiers). If your language is in that list, you can skip this step and proceed to step 3. If your language is not in that list, you need to find a VSCode extension that adds support for your language, and add the id of the given extension to [`packages/common/src/extensionDependencies.ts`](../../../../../packages/common/src/extensionDependencies.ts) and then re-run `pnpm init-vscode-sandbox` to ensure it is installed. If you do not do this you will encounter errors when attempting to execute cursorless commands in the next step. See [#1895](https://github.com/cursorless-dev/cursorless/issues/1895) for more info. ## 3. Register your language with Cursorless -1. Create a file with your scope support map to indicate which scopes you support. See eg [`markdown.ts`](../../packages/common/src/scopeSupportFacets/markdown.ts). At the start, you can leave the actual scope support table empty, so it will look something like the following (keeping in mind it's best to look at [`markdown.ts`](../../packages/common/src/scopeSupportFacets/markdown.ts) or another support file in case the following snippet rots): +1. Create a file with your scope support map to indicate which scopes you support. See eg [`markdown.ts`](../../../../../packages/common/src/scopeSupportFacets/markdown.ts). At the start, you can leave the actual scope support table empty, so it will look something like the following (keeping in mind it's best to look at [`markdown.ts`](../../../../../packages/common/src/scopeSupportFacets/markdown.ts) or another support file in case the following snippet rots): ```ts import { @@ -29,9 +29,9 @@ If you are adding support for a new language that isn't natively detected by VSC export const markdownScopeSupport: LanguageScopeSupportFacetMap = {}; ``` -2. Add an entry pointing to your support table to [the global scope support table](../../packages/common/src/scopeSupportFacets/languageScopeSupport.ts) +2. Add an entry pointing to your support table to [the global scope support table](../../../../../packages/common/src/scopeSupportFacets/languageScopeSupport.ts) -3. Create an empty `.scm` file in [`queries/`](../../queries) to hold your parse tree patterns. It should be named after your language, eg `java.scm`. +3. Create an empty `.scm` file in [`queries/`](../../../../../queries) to hold your parse tree patterns. It should be named after your language, eg `java.scm`. You can file a PR with just these changes to get the ball rolling. diff --git a/docs/contributing/adding-a-new-package.md b/packages/cursorless-org-docs/src/docs/contributing/adding-a-new-package.md similarity index 100% rename from docs/contributing/adding-a-new-package.md rename to packages/cursorless-org-docs/src/docs/contributing/adding-a-new-package.md diff --git a/docs/contributing/adding-a-new-scope.md b/packages/cursorless-org-docs/src/docs/contributing/adding-a-new-scope.md similarity index 86% rename from docs/contributing/adding-a-new-scope.md rename to packages/cursorless-org-docs/src/docs/contributing/adding-a-new-scope.md index ed3bdd7380..9e86927821 100644 --- a/docs/contributing/adding-a-new-scope.md +++ b/packages/cursorless-org-docs/src/docs/contributing/adding-a-new-scope.md @@ -16,7 +16,7 @@ For example, `"funk"` (`namedFunction`) has the following facets: - `namedfunction.method`, corresponding to a class method declaration, and - `namedfunction.constructor`, corresponding to a class constructor declaration. -Have a look in [`scopeSupportFacetInfos`](../../packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts) to see which facets the given scope has. The key is the id of the facet, and the value has information about the facet, including a description and a `scopeType` field indicating which scope type the facet corresponds to. +Have a look in [`scopeSupportFacetInfos`](../../../../../packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts) to see which facets the given scope has. The key is the id of the facet, and the value has information about the facet, including a description and a `scopeType` field indicating which scope type the facet corresponds to. These facet ids will be the keys in your language's scope support table below. @@ -50,14 +50,14 @@ When you're done, say `"cursorless save scope"` to save the tests to the appropr ## 5. Add parse tree patterns for the given scope -Launch your extension in debug mode and open a file in your language. You can create one or more files in [`playground/`](../../data/playground) and feel free to include those in your PR. +Launch your extension in debug mode and open a file in your language. You can create one or more files in [`playground/`](../../../../../data/playground) and feel free to include those in your PR. -Then add parse tree patterns for the given scope to your language's `.scm` file in the [`queries` directory](../../queries). The parse tree patterns should match the syntactic constructs that should be considered to be the given scope. Tag the nodes in the parse tree that correspond to the given scope with the internal identifier you found in step 1 above, eg `@namedFunction`. Note that you use the scope identifier (`@namedFunction`), _**not**_ the facet identifier (`@namedFunction.class`). +Then add parse tree patterns for the given scope to your language's `.scm` file in the [`queries` directory](../../../../../queries). The parse tree patterns should match the syntactic constructs that should be considered to be the given scope. Tag the nodes in the parse tree that correspond to the given scope with the internal identifier you found in step 1 above, eg `@namedFunction`. Note that you use the scope identifier (`@namedFunction`), _**not**_ the facet identifier (`@namedFunction.class`). ### Notes / tips - See our [Tree-sitter query syntax](tree-sitter-query-syntax.md) guide for more information on the syntax we support. -- Look at the existing language definitions in the [`queries` directory](../../queries) for examples. +- Look at the existing language definitions in the [`queries` directory](../../../../../queries) for examples. - Use the [scope visualizer](../user/scope-visualizer.md) to see your scope highlighted in real time every time you save the `.scm` file. - Use the command `"parse tree "` to see the parse tree for a given target. For example `"parse tree line"` will show you the parse tree for the current line, as well as all of its ancestors. This will generate a markdown file with parse tree info, which you can then use to write your patterns. You might find it helpful to open a markdown preview of the file. - You will likely want to look at `node-types.json` for your language, (eg [java](https://github.com/tree-sitter/tree-sitter-java/blob/master/src/node-types.json)). This file is generated from the language's `grammar.js`, which might also be helpful to look at (eg [java](https://github.com/tree-sitter/tree-sitter-java/blob/master/grammar.js)). diff --git a/docs/contributing/architecture/hat-snapshots.md b/packages/cursorless-org-docs/src/docs/contributing/architecture/hat-snapshots.md similarity index 100% rename from docs/contributing/architecture/hat-snapshots.md rename to packages/cursorless-org-docs/src/docs/contributing/architecture/hat-snapshots.md diff --git a/docs/contributing/architecture/images/hat-token-map-snapshots.png b/packages/cursorless-org-docs/src/docs/contributing/architecture/images/hat-token-map-snapshots.png similarity index 100% rename from docs/contributing/architecture/images/hat-token-map-snapshots.png rename to packages/cursorless-org-docs/src/docs/contributing/architecture/images/hat-token-map-snapshots.png diff --git a/docs/contributing/architecture/neovim-test-infrastructure.md b/packages/cursorless-org-docs/src/docs/contributing/architecture/neovim-test-infrastructure.md similarity index 100% rename from docs/contributing/architecture/neovim-test-infrastructure.md rename to packages/cursorless-org-docs/src/docs/contributing/architecture/neovim-test-infrastructure.md diff --git a/docs/contributing/cheatsheet.md b/packages/cursorless-org-docs/src/docs/contributing/cheatsheet.md similarity index 69% rename from docs/contributing/cheatsheet.md rename to packages/cursorless-org-docs/src/docs/contributing/cheatsheet.md index 823b342c51..c5bbed2731 100644 --- a/docs/contributing/cheatsheet.md +++ b/packages/cursorless-org-docs/src/docs/contributing/cheatsheet.md @@ -6,9 +6,9 @@ The implementation of the local version of the cheatsheet is split between the T ## Adding a new spoken form -When you add a new scope type, action, modifier, etc, you'll need to ensure that it shows up both locally and on the website. It will usually automatically show up in the local cheatsheet. You can verify this by saying `"cursorless cheatsheet"` with your development version of `cursorless-talon` active in your Talon user directory, and inspecting the cheatsheet that appears. If it does not, you'll need to make fixes to [the Talon side of the cheatsheet](../../cursorless-talon/src/cheatsheet). +When you add a new scope type, action, modifier, etc, you'll need to ensure that it shows up both locally and on the website. It will usually automatically show up in the local cheatsheet. You can verify this by saying `"cursorless cheatsheet"` with your development version of `cursorless-talon` active in your Talon user directory, and inspecting the cheatsheet that appears. If it does not, you'll need to make fixes to [the Talon side of the cheatsheet](../../../../../cursorless-talon/src/cheatsheet). -In either case, to get your changes to appear on the website, you need to update the defaults in [`defaults.json`](../../packages/cheatsheet/src/lib/sampleSpokenFormInfos/defaults.json). First make sure you have the `cursorless-talon-dev` user file set in your Talon home directory, as indicated in the [initial contributor setup instructions](CONTRIBUTING.md#initial-setup). Then you can say `"cursorless update cheatsheet"` to update the default spoken forms. Note that this will use your custom spoken forms, so you may need to do some manual cleanup. +In either case, to get your changes to appear on the website, you need to update the defaults in [`defaults.json`](../../../../../packages/cheatsheet/src/lib/sampleSpokenFormInfos/defaults.json). First make sure you have the `cursorless-talon-dev` user file set in your Talon home directory, as indicated in the [initial contributor setup instructions](CONTRIBUTING.md#initial-setup). Then you can say `"cursorless update cheatsheet"` to update the default spoken forms. Note that this will use your custom spoken forms, so you may need to do some manual cleanup. ## Running the cheatsheet in development mode diff --git a/docs/contributing/cursorless-in-neovim.md b/packages/cursorless-org-docs/src/docs/contributing/cursorless-in-neovim.md similarity index 100% rename from docs/contributing/cursorless-in-neovim.md rename to packages/cursorless-org-docs/src/docs/contributing/cursorless-in-neovim.md diff --git a/docs/contributing/documentation-search.md b/packages/cursorless-org-docs/src/docs/contributing/documentation-search.md similarity index 67% rename from docs/contributing/documentation-search.md rename to packages/cursorless-org-docs/src/docs/contributing/documentation-search.md index 996b65f255..4deb6b9fd4 100644 --- a/docs/contributing/documentation-search.md +++ b/packages/cursorless-org-docs/src/docs/contributing/documentation-search.md @@ -4,14 +4,14 @@ The documentation search is powered by Algolia. ## Tweaking crawling / indexing / ranking -Unfortunately, today, the source of truth for the Algolia search configuration lives in the Algolia web console. Whenever we update the configuration, we update the copies that we keep in [source control](../../packages/cursorless-org-docs/config/algolia). In the future, we'd like to use the files in source control as the source of truth and deploy them to Algolia in CI. See #917. +Unfortunately, today, the source of truth for the Algolia search configuration lives in the Algolia web console. Whenever we update the configuration, we update the copies that we keep in [source control](../../../../../packages/cursorless-org-docs/config/algolia). In the future, we'd like to use the files in source control as the source of truth and deploy them to Algolia in CI. See #917. -To see what changes we've made to the default configuration, compare the contents of [this directory](../../packages/cursorless-org-docs/config/algolia) with https://github.com/cursorless-dev/cursorless/tree/e043ce4795ffcda5a3f5875d91887a09e0f9905b/website/config/algolia +To see what changes we've made to the default configuration, compare the contents of [this directory](../../../../../packages/cursorless-org-docs/config/algolia) with https://github.com/cursorless-dev/cursorless/tree/e043ce4795ffcda5a3f5875d91887a09e0f9905b/website/config/algolia ### Crawler config 1. Use the [crawler console](https://crawler.algolia.com/admin/crawlers/ff3ea576-b9e0-4e01-8a19-110106760e74/configuration/edit) to experiment with the config until it works as expected. -2. Copy the new crawler config and paste it to [`crawler-settings.js`](../../docs-site/config/algolia/crawler-settings.js) +2. Copy the new crawler config and paste it to [`crawler-settings.js`](../../../../../docs-site/config/algolia/crawler-settings.js) 3. **IMPORTANT** Replace the `apiKey` field with `""` 4. File a PR to get feedback on the new config 5. Press the Save button in the crawler console to persist the new config. @@ -20,5 +20,5 @@ To see what changes we've made to the default configuration, compare the content ### Index settings 1. Use the [Algolia console](https://www.algolia.com/apps/YTJQ4I3GBJ/explorer/configuration/cursorless/searchable-attributes) to tweak the settings until you're happy. -2. Click on _Manage index > Export Configuration_ to export the configuration json, saving it to [`index-settings.json`](../../packages/cursorless-org-docs/config/algolia/index-settings.json) +2. Click on _Manage index > Export Configuration_ to export the configuration json, saving it to [`index-settings.json`](../../../../../packages/cursorless-org-docs/config/algolia/index-settings.json) 3. File a PR to get feedback on the new config. diff --git a/docs/contributing/guidelines.md b/packages/cursorless-org-docs/src/docs/contributing/guidelines.md similarity index 100% rename from docs/contributing/guidelines.md rename to packages/cursorless-org-docs/src/docs/contributing/guidelines.md diff --git a/docs/contributing/parse-tree-patterns.md b/packages/cursorless-org-docs/src/docs/contributing/parse-tree-patterns.md similarity index 100% rename from docs/contributing/parse-tree-patterns.md rename to packages/cursorless-org-docs/src/docs/contributing/parse-tree-patterns.md diff --git a/docs/contributing/test-case-recorder.md b/packages/cursorless-org-docs/src/docs/contributing/test-case-recorder.md similarity index 81% rename from docs/contributing/test-case-recorder.md rename to packages/cursorless-org-docs/src/docs/contributing/test-case-recorder.md index f0ce2ebad1..5a690b9b3a 100644 --- a/docs/contributing/test-case-recorder.md +++ b/packages/cursorless-org-docs/src/docs/contributing/test-case-recorder.md @@ -6,7 +6,7 @@ like `hello world`), positioning your cursor where you want, tell cursorless to start recording, and then issue one or more cursorless commands. It works by recording the initial state of the file including cursor position(s), the command run, and the final state, all in the form of a yaml document. See -[existing test cases](../../data/fixtures/recorded) for example outputs. +[existing test cases](../../../../../data/fixtures/recorded) for example outputs. ## Recording new tests @@ -30,7 +30,7 @@ command run, and the final state, all in the form of a yaml document. See ## Test case recorder options -The test case recorder has several additional configuration options. The default configuration works for most tests, but you may find the following useful. For a full list of supported configuration options, see [`RecordTestCaseCommandOptions`](../../packages/cursorless-engine/src/testCaseRecorder/RecordTestCaseCommandOptions.ts). +The test case recorder has several additional configuration options. The default configuration works for most tests, but you may find the following useful. For a full list of supported configuration options, see [`RecordTestCaseCommandOptions`](../../../../../packages/cursorless-engine/src/testCaseRecorder/RecordTestCaseCommandOptions.ts). ### The options @@ -50,7 +50,7 @@ By default, we don't capture the `that` mark returned by a command, unless the t #### Testing the hat map -We have a way to test that the hats in the hat map update correctly during the course of a single phrase. These tests are also how we usually test our [range updating code](../../packages/cursorless-engine/src/core/updateSelections/updateSelections.ts). +We have a way to test that the hats in the hat map update correctly during the course of a single phrase. These tests are also how we usually test our [range updating code](../../../../../packages/cursorless-engine/src/core/updateSelections/updateSelections.ts). Any tests recorded in the `hatTokenMap` directory will automatically be treated as hat token map tests. To initiate a series of hat token map tests in another directory, say `"cursorless record navigation"`. @@ -58,7 +58,7 @@ Then each time you record a test, you need to issue two commands. The second com ### Default config per test case directory -Any test case directory that contains a `config.json` will set default configuration for all tests recorded in any descendant directory. For example, the file [`actions/config.json`](../../data/fixtures/recorded/actions/config.json) makes it so that all our action tests will capture the final `that` mark. For a full list of keys supported in this json, see [`RecordTestCaseCommandOptions`](../../packages/cursorless-engine/src/testCaseRecorder/RecordTestCaseCommandOptions.ts). +Any test case directory that contains a `config.json` will set default configuration for all tests recorded in any descendant directory. For example, the file [`actions/config.json`](../../../../../data/fixtures/recorded/actions/config.json) makes it so that all our action tests will capture the final `that` mark. For a full list of keys supported in this json, see [`RecordTestCaseCommandOptions`](../../../../../packages/cursorless-engine/src/testCaseRecorder/RecordTestCaseCommandOptions.ts). ### Navigation map tests @@ -82,7 +82,7 @@ To upgrade test fixtures to their canonical, latest form, run the command `pnpm We periodically upgrade test case fixtures to use the version of our command payload from one year ago. To do so, proceed as follows: -1. Look at the blame of the big switch statement in the `upgradeCommand` function in [`canonicalizeAndValidateCommand`](../../packages/cursorless-engine/src/core/commandVersionUpgrades/canonicalizeAndValidateCommand.ts). You can do this on the web [here](https://github.com/cursorless-dev/cursorless/blame/main/packages/cursorless-engine/src/core/commandVersionUpgrades/canonicalizeAndValidateCommand.ts) +1. Look at the blame of the big switch statement in the `upgradeCommand` function in [`canonicalizeAndValidateCommand`](../../../../../packages/cursorless-engine/src/core/commandVersionUpgrades/canonicalizeAndValidateCommand.ts). You can do this on the web [here](https://github.com/cursorless-dev/cursorless/blame/main/packages/cursorless-engine/src/core/commandVersionUpgrades/canonicalizeAndValidateCommand.ts) 1. Find the newest `case` branch that is at least one year old 1. Look at the version number that is the guard of that case branch; the minimum number should be that + 1 1. Run `pnpm transform-recorded-tests --upgrade --minimum-version 5`, where 5 is the minimum version number you found @@ -90,9 +90,9 @@ We periodically upgrade test case fixtures to use the version of our command pay ### Custom transformation -1. Add a new transformation to the [`transformRecordedTests` directory](../../packages/cursorless-engine/src/scripts/transformRecordedTests). Look at the existing transformations in that directory for inspiration. +1. Add a new transformation to the [`transformRecordedTests` directory](../../../../../packages/cursorless-engine/src/scripts/transformRecordedTests). Look at the existing transformations in that directory for inspiration. 1. Change the value at the `custom` key in `AVAILABLE_TRANSFORMATIONS` at the top of - [`transformRecordedTests/index.ts`](../../packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts) to + [`transformRecordedTests/index.ts`](../../../../../packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts) to point to your new transformation 1. Run `pnpm transform-recorded-tests --custom` diff --git a/docs/contributing/tests.md b/packages/cursorless-org-docs/src/docs/contributing/tests.md similarity index 100% rename from docs/contributing/tests.md rename to packages/cursorless-org-docs/src/docs/contributing/tests.md diff --git a/docs/contributing/tree-sitter-query-syntax.md b/packages/cursorless-org-docs/src/docs/contributing/tree-sitter-query-syntax.md similarity index 93% rename from docs/contributing/tree-sitter-query-syntax.md rename to packages/cursorless-org-docs/src/docs/contributing/tree-sitter-query-syntax.md index a696dbcf78..8aff8437a2 100644 --- a/docs/contributing/tree-sitter-query-syntax.md +++ b/packages/cursorless-org-docs/src/docs/contributing/tree-sitter-query-syntax.md @@ -21,4 +21,4 @@ In addition to the above aspects, you can also use the following inline operator ## Query predicate operators -We also support a number of query predicate operators for modifying the scope. See [`queryPredicateOperators.ts`](../../packages/cursorless-engine/src/languages/TreeSitterQuery/queryPredicateOperators.ts) for a list of available operators. +We also support a number of query predicate operators for modifying the scope. See [`queryPredicateOperators.ts`](../../../../../packages/cursorless-engine/src/languages/TreeSitterQuery/queryPredicateOperators.ts) for a list of available operators. diff --git a/docs/user/README.md b/packages/cursorless-org-docs/src/docs/user/README.md similarity index 94% rename from docs/user/README.md rename to packages/cursorless-org-docs/src/docs/user/README.md index 6df25094ab..2851171cb9 100644 --- a/docs/user/README.md +++ b/packages/cursorless-org-docs/src/docs/user/README.md @@ -79,19 +79,19 @@ minimize syllables. The following shapes are supported. Note that to target the default (dot) shape you don't need to specify a shape. -| Spoken form | Shape | Internal ID | Enabled by default? | -| ----------- | ----------------------------------------------- | ------------ | ------------------- | -| N/A | ![Default](../../images/hats/default.svg) | `default` | ✅ | -| `"bolt"` | ![Bolt](../../images/hats/bolt.svg) | `bolt` | ❌ | -| `"curve"` | ![Curve](../../images/hats/curve.svg) | `curve` | ❌ | -| `"fox"` | ![Fox](../../images/hats/fox.svg) | `fox` | ❌ | -| `"frame"` | ![Frame](../../images/hats/frame.svg) | `frame` | ❌ | -| `"play"` | ![Play](../../images/hats/play.svg) | `play` | ❌ | -| `"wing"` | ![Wing](../../images/hats/wing.svg) | `wing` | ❌ | -| `"hole"` | ![Hole](../../images/hats/hole.svg) | `hole` | ❌ | -| `"ex"` | ![Ex](../../images/hats/ex.svg) | `ex` | ❌ | -| `"cross"` | ![Crosshairs](../../images/hats/crosshairs.svg) | `crosshairs` | ❌ | -| `"eye"` | ![Eye](../../images/hats/eye.svg) | `eye` | ❌ | +| Spoken form | Shape | Internal ID | Enabled by default? | +| ----------- | -------------------------------------------------------- | ------------ | ------------------- | +| N/A | ![Default](../../../../../images/hats/default.svg) | `default` | ✅ | +| `"bolt"` | ![Bolt](../../../../../images/hats/bolt.svg) | `bolt` | ❌ | +| `"curve"` | ![Curve](../../../../../images/hats/curve.svg) | `curve` | ❌ | +| `"fox"` | ![Fox](../../../../../images/hats/fox.svg) | `fox` | ❌ | +| `"frame"` | ![Frame](../../../../../images/hats/frame.svg) | `frame` | ❌ | +| `"play"` | ![Play](../../../../../images/hats/play.svg) | `play` | ❌ | +| `"wing"` | ![Wing](../../../../../images/hats/wing.svg) | `wing` | ❌ | +| `"hole"` | ![Hole](../../../../../images/hats/hole.svg) | `hole` | ❌ | +| `"ex"` | ![Ex](../../../../../images/hats/ex.svg) | `ex` | ❌ | +| `"cross"` | ![Crosshairs](../../../../../images/hats/crosshairs.svg) | `crosshairs` | ❌ | +| `"eye"` | ![Eye](../../../../../images/hats/eye.svg) | `eye` | ❌ | You can enable or disable shapes in your VSCode settings, by searching for `cursorless.hatEnablement.shapes` and checking the box next to the internal ID for the given shape as listed above. To navigate to your VSCode settings, either say "show settings", or go to File --> Preferences --> Settings. @@ -143,7 +143,7 @@ Note that if the mark is `"this"`, and you have multiple cursors, the modifiers ##### Syntactic scopes -For programming languages where Cursorless has rich parse tree support, we support modifiers that expand to the nearest containing function, class, etc. See [the source code](../../packages/common/src/scopeSupportFacets/languageScopeSupport.ts) for a list of supported languages. Below is a list of supported scope types, keeping in mind that this table can sometimes lag behind the actual list. Your cheatsheet (say `"cursorless cheatsheet"` with VSCode focused) will have the most up-to-date list. It can also be helpful to use the [scope visualizer](./scope-visualizer.md) to visualize the scope types on your own code, though keep in mind that the scope visualizer only works on language scopes that have been upgraded to our next-gen scope engine, so it may not work every time. +For programming languages where Cursorless has rich parse tree support, we support modifiers that expand to the nearest containing function, class, etc. See [the source code](../../../../../packages/common/src/scopeSupportFacets/languageScopeSupport.ts) for a list of supported languages. Below is a list of supported scope types, keeping in mind that this table can sometimes lag behind the actual list. Your cheatsheet (say `"cursorless cheatsheet"` with VSCode focused) will have the most up-to-date list. It can also be helpful to use the [scope visualizer](./scope-visualizer.md) to visualize the scope types on your own code, though keep in mind that the scope visualizer only works on language scopes that have been upgraded to our next-gen scope engine, so it may not work every time. | Term | Syntactic element | | -------------- | --------------------------------------------------- | @@ -184,7 +184,7 @@ We support several modifiers that allow you to refer to scopes relative to the i Here is a diagram of the possible relative / ordinal modifiers using the `funk` scope as an example: -
+
![Relative ordinal diagram](images/relative_ordinal.png)
diff --git a/docs/user/customization.md b/packages/cursorless-org-docs/src/docs/user/customization.md similarity index 100% rename from docs/user/customization.md rename to packages/cursorless-org-docs/src/docs/user/customization.md diff --git a/docs/user/experimental/README.md b/packages/cursorless-org-docs/src/docs/user/experimental/README.md similarity index 100% rename from docs/user/experimental/README.md rename to packages/cursorless-org-docs/src/docs/user/experimental/README.md diff --git a/docs/user/experimental/images/linkWrap.gif b/packages/cursorless-org-docs/src/docs/user/experimental/images/linkWrap.gif similarity index 100% rename from docs/user/experimental/images/linkWrap.gif rename to packages/cursorless-org-docs/src/docs/user/experimental/images/linkWrap.gif diff --git a/docs/user/experimental/images/tryWrapFine.gif b/packages/cursorless-org-docs/src/docs/user/experimental/images/tryWrapFine.gif similarity index 100% rename from docs/user/experimental/images/tryWrapFine.gif rename to packages/cursorless-org-docs/src/docs/user/experimental/images/tryWrapFine.gif diff --git a/docs/user/experimental/keyboard/images/keyboardBring.gif b/packages/cursorless-org-docs/src/docs/user/experimental/keyboard/images/keyboardBring.gif similarity index 100% rename from docs/user/experimental/keyboard/images/keyboardBring.gif rename to packages/cursorless-org-docs/src/docs/user/experimental/keyboard/images/keyboardBring.gif diff --git a/docs/user/experimental/keyboard/images/keyboardDelete.gif b/packages/cursorless-org-docs/src/docs/user/experimental/keyboard/images/keyboardDelete.gif similarity index 100% rename from docs/user/experimental/keyboard/images/keyboardDelete.gif rename to packages/cursorless-org-docs/src/docs/user/experimental/keyboard/images/keyboardDelete.gif diff --git a/docs/user/experimental/keyboard/images/keyboardPour.gif b/packages/cursorless-org-docs/src/docs/user/experimental/keyboard/images/keyboardPour.gif similarity index 100% rename from docs/user/experimental/keyboard/images/keyboardPour.gif rename to packages/cursorless-org-docs/src/docs/user/experimental/keyboard/images/keyboardPour.gif diff --git a/docs/user/experimental/keyboard/modal.md b/packages/cursorless-org-docs/src/docs/user/experimental/keyboard/modal.md similarity index 100% rename from docs/user/experimental/keyboard/modal.md rename to packages/cursorless-org-docs/src/docs/user/experimental/keyboard/modal.md diff --git a/docs/user/experimental/snippet-format.md b/packages/cursorless-org-docs/src/docs/user/experimental/snippet-format.md similarity index 100% rename from docs/user/experimental/snippet-format.md rename to packages/cursorless-org-docs/src/docs/user/experimental/snippet-format.md diff --git a/docs/user/experimental/snippets.md b/packages/cursorless-org-docs/src/docs/user/experimental/snippets.md similarity index 100% rename from docs/user/experimental/snippets.md rename to packages/cursorless-org-docs/src/docs/user/experimental/snippets.md diff --git a/docs/user/glossary.md b/packages/cursorless-org-docs/src/docs/user/glossary.md similarity index 100% rename from docs/user/glossary.md rename to packages/cursorless-org-docs/src/docs/user/glossary.md diff --git a/docs/user/hatAssignment.md b/packages/cursorless-org-docs/src/docs/user/hatAssignment.md similarity index 100% rename from docs/user/hatAssignment.md rename to packages/cursorless-org-docs/src/docs/user/hatAssignment.md diff --git a/docs/user/how-to.md b/packages/cursorless-org-docs/src/docs/user/how-to.md similarity index 100% rename from docs/user/how-to.md rename to packages/cursorless-org-docs/src/docs/user/how-to.md diff --git a/docs/user/images/chuckBat.gif b/packages/cursorless-org-docs/src/docs/user/images/chuckBat.gif similarity index 100% rename from docs/user/images/chuckBat.gif rename to packages/cursorless-org-docs/src/docs/user/images/chuckBat.gif diff --git a/docs/user/images/custom-regex-scopes.png b/packages/cursorless-org-docs/src/docs/user/images/custom-regex-scopes.png similarity index 100% rename from docs/user/images/custom-regex-scopes.png rename to packages/cursorless-org-docs/src/docs/user/images/custom-regex-scopes.png diff --git a/docs/user/images/relative_ordinal.png b/packages/cursorless-org-docs/src/docs/user/images/relative_ordinal.png similarity index 100% rename from docs/user/images/relative_ordinal.png rename to packages/cursorless-org-docs/src/docs/user/images/relative_ordinal.png diff --git a/docs/user/images/relative_ordinal.tex b/packages/cursorless-org-docs/src/docs/user/images/relative_ordinal.tex similarity index 100% rename from docs/user/images/relative_ordinal.tex rename to packages/cursorless-org-docs/src/docs/user/images/relative_ordinal.tex diff --git a/docs/user/images/visualize-block-removal.png b/packages/cursorless-org-docs/src/docs/user/images/visualize-block-removal.png similarity index 100% rename from docs/user/images/visualize-block-removal.png rename to packages/cursorless-org-docs/src/docs/user/images/visualize-block-removal.png diff --git a/docs/user/images/visualize-funk.png b/packages/cursorless-org-docs/src/docs/user/images/visualize-funk.png similarity index 100% rename from docs/user/images/visualize-funk.png rename to packages/cursorless-org-docs/src/docs/user/images/visualize-funk.png diff --git a/docs/user/images/visualize-token.png b/packages/cursorless-org-docs/src/docs/user/images/visualize-token.png similarity index 100% rename from docs/user/images/visualize-token.png rename to packages/cursorless-org-docs/src/docs/user/images/visualize-token.png diff --git a/docs/user/installation.md b/packages/cursorless-org-docs/src/docs/user/installation.md similarity index 100% rename from docs/user/installation.md rename to packages/cursorless-org-docs/src/docs/user/installation.md diff --git a/packages/cursorless-org-docs/src/docs/user/languages/Language.tsx b/packages/cursorless-org-docs/src/docs/user/languages/Language.tsx new file mode 100644 index 0000000000..811d3377ee --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/Language.tsx @@ -0,0 +1,10 @@ +import React from "react"; +import ScopeSupport from "./ScopeSupport"; + +interface Props { + languageId: string; +} + +export default function Language({ languageId }: Props) { + return ; +} diff --git a/packages/cursorless-org-docs/src/docs/user/languages/README.md b/packages/cursorless-org-docs/src/docs/user/languages/README.md new file mode 100644 index 0000000000..812eb756f0 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/README.md @@ -0,0 +1,5 @@ +# Languages + +Cursorless supports a wide range of languages, though our level of support varies a bit +from language to language. See the sidebar for information about how well we support various +languages, as well as other language-specific notes. diff --git a/packages/cursorless-org-docs/src/docs/user/languages/ScopeSupport.tsx b/packages/cursorless-org-docs/src/docs/user/languages/ScopeSupport.tsx new file mode 100644 index 0000000000..d291f722d1 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/ScopeSupport.tsx @@ -0,0 +1,82 @@ +import { + ScopeSupportFacetLevel, + languageScopeSupport, + scopeSupportFacets, + type ScopeSupportFacet, +} from "@cursorless/common"; +import React from "react"; + +interface Props { + languageId: string; +} + +export default function ScopeSupport({ languageId }: Props) { + const scopesSorted = [...scopeSupportFacets].sort(); + const scopeSupport = languageScopeSupport[languageId] ?? {}; + + const supportedScopes = scopesSorted.filter( + (facet) => scopeSupport[facet] === ScopeSupportFacetLevel.supported, + ); + const supportedLegacyScopes = scopesSorted.filter( + (facet) => scopeSupport[facet] === ScopeSupportFacetLevel.supportedLegacy, + ); + const unsupportedScopes = scopesSorted.filter( + (facet) => scopeSupport[facet] === ScopeSupportFacetLevel.unsupported, + ); + const unspecifiedScopes = scopesSorted.filter( + (facet) => scopeSupport[facet] == null, + ); + + return ( + <> + {getContentForSupportLevel( + supportedScopes, + "Supported facets", + "These facets are supported", + )} + {getContentForSupportLevel( + supportedLegacyScopes, + "Supported Legacy facets", + "These facets are supported with the legacy implementation and should be migrated to the new implementation", + )} + {getContentForSupportLevel( + unsupportedScopes, + "Unsupported facets", + "These facets are not supported yet and needs a developer to implement them", + )} + {getContentForSupportLevel( + unspecifiedScopes, + "Unspecified facets", + <> + These facets are unspecified
+ + Note that in many instances we actually do support these scopes, but + we have not yet updated `languageScopeSupport` to reflect this fact + + , + )} + + ); +} + +function getContentForSupportLevel( + facets: ScopeSupportFacet[], + title: string, + description: React.ReactNode, +) { + if (facets.length === 0) { + return null; + } + return ( +
+

{title}

+

{description}

+ +
    + {facets.map((facet) => ( +
  • {facet}
  • + ))} +
+
+ ); +} diff --git a/packages/cursorless-org-docs/src/docs/user/languages/_category_.json b/packages/cursorless-org-docs/src/docs/user/languages/_category_.json new file mode 100644 index 0000000000..e7b327b868 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/_category_.json @@ -0,0 +1,3 @@ +{ + "className": "hidden" +} diff --git a/packages/cursorless-org-docs/src/docs/user/languages/c.mdx b/packages/cursorless-org-docs/src/docs/user/languages/c.mdx new file mode 100644 index 0000000000..561b32b48f --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/c.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# C + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/clojure.mdx b/packages/cursorless-org-docs/src/docs/user/languages/clojure.mdx new file mode 100644 index 0000000000..a430ed47e4 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/clojure.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Clojure + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/cpp.mdx b/packages/cursorless-org-docs/src/docs/user/languages/cpp.mdx new file mode 100644 index 0000000000..f4fd89dd05 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/cpp.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# C++ + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/csharp.mdx b/packages/cursorless-org-docs/src/docs/user/languages/csharp.mdx new file mode 100644 index 0000000000..2352ae98c8 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/csharp.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# C# + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/css.mdx b/packages/cursorless-org-docs/src/docs/user/languages/css.mdx new file mode 100644 index 0000000000..c68e63f9cd --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/css.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# CSS + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/go.mdx b/packages/cursorless-org-docs/src/docs/user/languages/go.mdx new file mode 100644 index 0000000000..f4da2f5dec --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/go.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Go + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/html.mdx b/packages/cursorless-org-docs/src/docs/user/languages/html.mdx new file mode 100644 index 0000000000..603c34f00d --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/html.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# HTML + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/java.mdx b/packages/cursorless-org-docs/src/docs/user/languages/java.mdx new file mode 100644 index 0000000000..bc895469cb --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/java.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Java + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/javascript.mdx b/packages/cursorless-org-docs/src/docs/user/languages/javascript.mdx new file mode 100644 index 0000000000..66b80498ab --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/javascript.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Javascript + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/javascriptreact.mdx b/packages/cursorless-org-docs/src/docs/user/languages/javascriptreact.mdx new file mode 100644 index 0000000000..6f9b4b8779 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/javascriptreact.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Javascript react + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/json.mdx b/packages/cursorless-org-docs/src/docs/user/languages/json.mdx new file mode 100644 index 0000000000..732709bfe9 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/json.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# JSON + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/jsonc.mdx b/packages/cursorless-org-docs/src/docs/user/languages/jsonc.mdx new file mode 100644 index 0000000000..a83af5d7bd --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/jsonc.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# JSON with comments (JSONC) + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/jsonl.mdx b/packages/cursorless-org-docs/src/docs/user/languages/jsonl.mdx new file mode 100644 index 0000000000..03614b7850 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/jsonl.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# JSON lines (JSONL) + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/latex.mdx b/packages/cursorless-org-docs/src/docs/user/languages/latex.mdx new file mode 100644 index 0000000000..c56cfbccfa --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/latex.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Latex + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/lua.mdx b/packages/cursorless-org-docs/src/docs/user/languages/lua.mdx new file mode 100644 index 0000000000..f0722123cf --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/lua.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Lua + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/markdown.mdx b/packages/cursorless-org-docs/src/docs/user/languages/markdown.mdx new file mode 100644 index 0000000000..4b53715921 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/markdown.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Markdown + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/php.mdx b/packages/cursorless-org-docs/src/docs/user/languages/php.mdx new file mode 100644 index 0000000000..f46cb45e51 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/php.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# PHP + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/python.mdx b/packages/cursorless-org-docs/src/docs/user/languages/python.mdx new file mode 100644 index 0000000000..f84d93f9b2 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/python.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Python + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/ruby.mdx b/packages/cursorless-org-docs/src/docs/user/languages/ruby.mdx new file mode 100644 index 0000000000..434490a711 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/ruby.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Ruby + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/rust.mdx b/packages/cursorless-org-docs/src/docs/user/languages/rust.mdx new file mode 100644 index 0000000000..f4bd8d55ab --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/rust.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Rust + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/scala.mdx b/packages/cursorless-org-docs/src/docs/user/languages/scala.mdx new file mode 100644 index 0000000000..921ad69194 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/scala.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Scala + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/scm.mdx b/packages/cursorless-org-docs/src/docs/user/languages/scm.mdx new file mode 100644 index 0000000000..2c6e3d7a44 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/scm.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Tree sitter query language (scm) + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/scss.mdx b/packages/cursorless-org-docs/src/docs/user/languages/scss.mdx new file mode 100644 index 0000000000..44891422a4 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/scss.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# SCSS + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/talon.mdx b/packages/cursorless-org-docs/src/docs/user/languages/talon.mdx new file mode 100644 index 0000000000..9072d500ed --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/talon.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Talon + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/typescript.mdx b/packages/cursorless-org-docs/src/docs/user/languages/typescript.mdx new file mode 100644 index 0000000000..855dfa95f1 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/typescript.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Typescript + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/typescriptreact.mdx b/packages/cursorless-org-docs/src/docs/user/languages/typescriptreact.mdx new file mode 100644 index 0000000000..e8af5501f9 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/typescriptreact.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Typescript react + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/xml.mdx b/packages/cursorless-org-docs/src/docs/user/languages/xml.mdx new file mode 100644 index 0000000000..a6176bec74 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/xml.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# XML + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/yaml.mdx b/packages/cursorless-org-docs/src/docs/user/languages/yaml.mdx new file mode 100644 index 0000000000..b44892f5ac --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/yaml.mdx @@ -0,0 +1,5 @@ +import Language from "./Language"; + +# Yaml + + diff --git a/docs/user/localCommandHIstory.md b/packages/cursorless-org-docs/src/docs/user/localCommandHIstory.md similarity index 100% rename from docs/user/localCommandHIstory.md rename to packages/cursorless-org-docs/src/docs/user/localCommandHIstory.md diff --git a/docs/user/reference/destinations.md b/packages/cursorless-org-docs/src/docs/user/reference/destinations.md similarity index 100% rename from docs/user/reference/destinations.md rename to packages/cursorless-org-docs/src/docs/user/reference/destinations.md diff --git a/docs/user/release-notes/0.28.0.md b/packages/cursorless-org-docs/src/docs/user/release-notes/0.28.0.md similarity index 100% rename from docs/user/release-notes/0.28.0.md rename to packages/cursorless-org-docs/src/docs/user/release-notes/0.28.0.md diff --git a/docs/user/release-notes/2022-year-in-review.md b/packages/cursorless-org-docs/src/docs/user/release-notes/2022-year-in-review.md similarity index 100% rename from docs/user/release-notes/2022-year-in-review.md rename to packages/cursorless-org-docs/src/docs/user/release-notes/2022-year-in-review.md diff --git a/docs/user/release-notes/README.md b/packages/cursorless-org-docs/src/docs/user/release-notes/README.md similarity index 100% rename from docs/user/release-notes/README.md rename to packages/cursorless-org-docs/src/docs/user/release-notes/README.md diff --git a/docs/user/release-notes/big-hats.png b/packages/cursorless-org-docs/src/docs/user/release-notes/big-hats.png similarity index 100% rename from docs/user/release-notes/big-hats.png rename to packages/cursorless-org-docs/src/docs/user/release-notes/big-hats.png diff --git a/docs/user/release-notes/sidebar-sneak-preview.png b/packages/cursorless-org-docs/src/docs/user/release-notes/sidebar-sneak-preview.png similarity index 100% rename from docs/user/release-notes/sidebar-sneak-preview.png rename to packages/cursorless-org-docs/src/docs/user/release-notes/sidebar-sneak-preview.png diff --git a/docs/user/scope-sidebar.md b/packages/cursorless-org-docs/src/docs/user/scope-sidebar.md similarity index 100% rename from docs/user/scope-sidebar.md rename to packages/cursorless-org-docs/src/docs/user/scope-sidebar.md diff --git a/docs/user/scope-visualizer.md b/packages/cursorless-org-docs/src/docs/user/scope-visualizer.md similarity index 100% rename from docs/user/scope-visualizer.md rename to packages/cursorless-org-docs/src/docs/user/scope-visualizer.md diff --git a/docs/user/unicode.md b/packages/cursorless-org-docs/src/docs/user/unicode.md similarity index 100% rename from docs/user/unicode.md rename to packages/cursorless-org-docs/src/docs/user/unicode.md diff --git a/docs/user/updating.md b/packages/cursorless-org-docs/src/docs/user/updating.md similarity index 100% rename from docs/user/updating.md rename to packages/cursorless-org-docs/src/docs/user/updating.md diff --git a/docs/user/visualAccessibility.md b/packages/cursorless-org-docs/src/docs/user/visualAccessibility.md similarity index 100% rename from docs/user/visualAccessibility.md rename to packages/cursorless-org-docs/src/docs/user/visualAccessibility.md diff --git a/packages/cursorless-org-docs/tsconfig.json b/packages/cursorless-org-docs/tsconfig.json index 2fe0fedcef..c6b0d70b9c 100644 --- a/packages/cursorless-org-docs/tsconfig.json +++ b/packages/cursorless-org-docs/tsconfig.json @@ -1,9 +1,23 @@ { "extends": ["@tsconfig/docusaurus/tsconfig.json", "../../tsconfig.base.json"], "compilerOptions": { + "target": "es5", + "lib": ["dom", "es2022"], + "moduleResolution": "node", "esModuleInterop": true, - "emitDeclarationOnly": false + "emitDeclarationOnly": false, + "jsx": "react" }, - "references": [], - "include": ["src/**/*.ts", "src/**/*.json", "../../typings/**/*.d.ts"] + "include": [ + "src/**/*.ts", + "src/**/*.json", + "src/**/*.tsx", + "../../typings/**/*.d.ts" + ], + "exclude": ["node_modules"], + "references": [ + { + "path": "../common" + } + ] } diff --git a/packages/meta-updater/src/metaUpdater.ts b/packages/meta-updater/src/metaUpdater.ts index 0b4acae115..b82d66e32a 100644 --- a/packages/meta-updater/src/metaUpdater.ts +++ b/packages/meta-updater/src/metaUpdater.ts @@ -2,9 +2,12 @@ // https://github.com/pnpm/pnpm/tree/d583fbb2ad7e6b986d133a4eaf60824713f13c06/.meta-updater/src/index.ts // License was // https://github.com/pnpm/pnpm/blob/d583fbb2ad7e6b986d133a4eaf60824713f13c06/LICENSE +import { languageScopeSupport } from "@cursorless/common"; import { readWantedLockfile } from "@pnpm/lockfile-file"; import { createUpdateOptions } from "@pnpm/meta-updater"; import { Context } from "./Context"; +import { textFormat } from "./textFormat"; +import { updateLanguageMdxConfig } from "./updateLanguageScopeSupportConfig"; import { updatePackageJson } from "./updatePackageJson"; import { updateTSConfig } from "./updateTSConfig"; @@ -23,7 +26,20 @@ export const updater = async (workspaceDir: string) => { }; return createUpdateOptions({ - ["package.json"]: updatePackageJson.bind(null, context), - ["tsconfig.json"]: updateTSConfig.bind(null, context), + files: { + ["package.json"]: updatePackageJson.bind(null, context), + ["tsconfig.json"]: updateTSConfig.bind(null, context), + ...Object.fromEntries( + Object.keys(languageScopeSupport).map((languageId) => { + return [ + `src/docs/user/languages/${languageId}.mdx`, + updateLanguageMdxConfig.bind(null, languageId), + ]; + }), + ), + }, + formats: { + mdx: textFormat, + }, }); }; diff --git a/packages/meta-updater/src/textFormat.ts b/packages/meta-updater/src/textFormat.ts new file mode 100644 index 0000000000..ee067c6209 --- /dev/null +++ b/packages/meta-updater/src/textFormat.ts @@ -0,0 +1,10 @@ +import { createFormat } from "@pnpm/meta-updater"; +import * as fs from "node:fs/promises"; + +export const textFormat = createFormat({ + read: ({ resolvedPath }) => fs.readFile(resolvedPath, "utf8"), + update: (actual, updater, options) => updater(actual, options), + equal: (expected, actual) => expected === actual, + write: (expected, { resolvedPath }) => + fs.writeFile(resolvedPath, expected, "utf8"), +}); diff --git a/packages/meta-updater/src/updateLanguageScopeSupportConfig.ts b/packages/meta-updater/src/updateLanguageScopeSupportConfig.ts new file mode 100644 index 0000000000..e20fbe3649 --- /dev/null +++ b/packages/meta-updater/src/updateLanguageScopeSupportConfig.ts @@ -0,0 +1,25 @@ +import type { FormatPluginFnOptions } from "@pnpm/meta-updater"; + +export function updateLanguageMdxConfig( + languageId: string, + actual: string | null, + options: FormatPluginFnOptions, +): string | null { + if (options.manifest.name !== "@cursorless/cursorless-org-docs") { + return null; + } + + if (actual != null) { + return actual; + } + + const expected = ` +import Language from "./Language"; + +# ${languageId} + + +`.trimStart(); + + return expected; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4a1277e4f2..4adcf77396 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -518,27 +518,30 @@ importers: '@algolia/client-search': specifier: 4.22.1 version: 4.22.1 + '@cursorless/common': + specifier: workspace:* + version: link:../common '@docsearch/react': specifier: 3.6.0 - version: 3.6.0(@algolia/client-search@4.22.1)(@types/react@18.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0) + version: 3.6.0(@algolia/client-search@4.22.1)(@types/react@18.2.71)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0) '@docusaurus/core': specifier: 3.1.1 version: 3.1.1(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) '@docusaurus/preset-classic': specifier: 3.1.1 - version: 3.1.1(@algolia/client-search@4.22.1)(@types/react@18.3.3)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)(typescript@5.5.3) + version: 3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.71)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)(typescript@5.5.3) '@docusaurus/theme-classic': specifier: 3.1.1 - version: 3.1.1(@types/react@18.3.3)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) + version: 3.1.1(@types/react@18.2.71)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) '@docusaurus/theme-common': specifier: 3.1.1 version: 3.1.1(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) '@docusaurus/theme-search-algolia': specifier: 3.1.1 - version: 3.1.1(patch_hash=lazxwgumd4o5a3ibe55vftei5e)(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.3.3)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)(typescript@5.5.3) + version: 3.1.1(patch_hash=lazxwgumd4o5a3ibe55vftei5e)(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.2.71)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)(typescript@5.5.3) '@mdx-js/react': specifier: 3.0.1 - version: 3.0.1(@types/react@18.3.3)(react@18.2.0) + version: 3.0.1(@types/react@18.2.71)(react@18.2.0) clsx: specifier: ^2.1.0 version: 2.1.0 @@ -570,6 +573,9 @@ importers: '@types/mdast': specifier: 4.0.3 version: 4.0.3 + '@types/react': + specifier: 18.2.71 + version: 18.2.71 typescript: specifier: ^5.5.3 version: 5.5.3 @@ -3172,9 +3178,6 @@ packages: '@types/react@18.2.71': resolution: {integrity: sha512-PxEsB9OjmQeYGffoWnYAd/r5FiJuUw2niFQHPc2v2idwh8wGPkkYzOHuinNJJY6NZqfoTCiOIizDOz38gYNsyw==} - '@types/react@18.3.3': - resolution: {integrity: sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw==} - '@types/retry@0.12.0': resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} @@ -10913,14 +10916,14 @@ snapshots: '@docsearch/css@3.6.0': {} - '@docsearch/react@3.6.0(@algolia/client-search@4.22.1)(@types/react@18.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)': + '@docsearch/react@3.6.0(@algolia/client-search@4.22.1)(@types/react@18.2.71)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)': dependencies: '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.15.0) '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) '@docsearch/css': 3.6.0 algoliasearch: 4.22.1 optionalDependencies: - '@types/react': 18.3.3 + '@types/react': 18.2.71 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) search-insights: 2.15.0 @@ -11332,7 +11335,7 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/preset-classic@3.1.1(@algolia/client-search@4.22.1)(@types/react@18.3.3)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)(typescript@5.5.3)': + '@docusaurus/preset-classic@3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.71)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)(typescript@5.5.3)': dependencies: '@docusaurus/core': 3.1.1(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) '@docusaurus/plugin-content-blog': 3.1.1(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) @@ -11343,9 +11346,9 @@ snapshots: '@docusaurus/plugin-google-gtag': 3.1.1(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) '@docusaurus/plugin-google-tag-manager': 3.1.1(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) '@docusaurus/plugin-sitemap': 3.1.1(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) - '@docusaurus/theme-classic': 3.1.1(@types/react@18.3.3)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) + '@docusaurus/theme-classic': 3.1.1(@types/react@18.2.71)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) '@docusaurus/theme-common': 3.1.1(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) - '@docusaurus/theme-search-algolia': 3.1.1(patch_hash=lazxwgumd4o5a3ibe55vftei5e)(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.3.3)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)(typescript@5.5.3) + '@docusaurus/theme-search-algolia': 3.1.1(patch_hash=lazxwgumd4o5a3ibe55vftei5e)(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.2.71)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)(typescript@5.5.3) '@docusaurus/types': 3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -11376,7 +11379,7 @@ snapshots: prop-types: 15.8.1 react: 18.2.0 - '@docusaurus/theme-classic@3.1.1(@types/react@18.3.3)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3)': + '@docusaurus/theme-classic@3.1.1(@types/react@18.2.71)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3)': dependencies: '@docusaurus/core': 3.1.1(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) '@docusaurus/mdx-loader': 3.1.1(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -11390,7 +11393,7 @@ snapshots: '@docusaurus/utils': 3.1.1(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(esbuild@0.20.2) '@docusaurus/utils-common': 3.1.1(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)) '@docusaurus/utils-validation': 3.1.1(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(esbuild@0.20.2) - '@mdx-js/react': 3.0.1(@types/react@18.3.3)(react@18.2.0) + '@mdx-js/react': 3.0.1(@types/react@18.2.71)(react@18.2.0) clsx: 2.1.0 copy-text-to-clipboard: 3.2.0 infima: 0.2.0-alpha.43 @@ -11462,9 +11465,9 @@ snapshots: - vue-template-compiler - webpack-cli - '@docusaurus/theme-search-algolia@3.1.1(patch_hash=lazxwgumd4o5a3ibe55vftei5e)(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.3.3)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)(typescript@5.5.3)': + '@docusaurus/theme-search-algolia@3.1.1(patch_hash=lazxwgumd4o5a3ibe55vftei5e)(@algolia/client-search@4.22.1)(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(@types/react@18.2.71)(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0)(typescript@5.5.3)': dependencies: - '@docsearch/react': 3.6.0(@algolia/client-search@4.22.1)(@types/react@18.3.3)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0) + '@docsearch/react': 3.6.0(@algolia/client-search@4.22.1)(@types/react@18.2.71)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(search-insights@2.15.0) '@docusaurus/core': 3.1.1(@docusaurus/types@3.1.1(esbuild@0.20.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) '@docusaurus/logger': 3.1.1 '@docusaurus/plugin-content-docs': 3.1.1(esbuild@0.20.2)(eslint@9.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.5.3) @@ -13263,11 +13266,6 @@ snapshots: '@types/scheduler': 0.23.0 csstype: 3.1.3 - '@types/react@18.3.3': - dependencies: - '@types/prop-types': 15.7.12 - csstype: 3.1.3 - '@types/retry@0.12.0': {} '@types/retry@0.12.2': {}