groove-dev 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/FILE-EDITOR-PLAN.md +253 -0
- package/node_modules/@codemirror/autocomplete/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/autocomplete/CHANGELOG.md +639 -0
- package/node_modules/@codemirror/autocomplete/LICENSE +21 -0
- package/node_modules/@codemirror/autocomplete/README.md +43 -0
- package/node_modules/@codemirror/autocomplete/dist/index.cjs +2151 -0
- package/node_modules/@codemirror/autocomplete/dist/index.d.cts +648 -0
- package/node_modules/@codemirror/autocomplete/dist/index.d.ts +648 -0
- package/node_modules/@codemirror/autocomplete/dist/index.js +2120 -0
- package/node_modules/@codemirror/autocomplete/package.json +41 -0
- package/node_modules/@codemirror/commands/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/commands/CHANGELOG.md +386 -0
- package/node_modules/@codemirror/commands/LICENSE +21 -0
- package/node_modules/@codemirror/commands/README.md +35 -0
- package/node_modules/@codemirror/commands/dist/index.cjs +1909 -0
- package/node_modules/@codemirror/commands/dist/index.d.cts +650 -0
- package/node_modules/@codemirror/commands/dist/index.d.ts +650 -0
- package/node_modules/@codemirror/commands/dist/index.js +1795 -0
- package/node_modules/@codemirror/commands/package.json +42 -0
- package/node_modules/@codemirror/lang-css/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-css/CHANGELOG.md +106 -0
- package/node_modules/@codemirror/lang-css/LICENSE +21 -0
- package/node_modules/@codemirror/lang-css/README.md +50 -0
- package/node_modules/@codemirror/lang-css/dist/index.cjs +269 -0
- package/node_modules/@codemirror/lang-css/dist/index.d.cts +28 -0
- package/node_modules/@codemirror/lang-css/dist/index.d.ts +28 -0
- package/node_modules/@codemirror/lang-css/dist/index.js +264 -0
- package/node_modules/@codemirror/lang-css/package.json +42 -0
- package/node_modules/@codemirror/lang-html/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-html/CHANGELOG.md +210 -0
- package/node_modules/@codemirror/lang-html/LICENSE +21 -0
- package/node_modules/@codemirror/lang-html/README.md +147 -0
- package/node_modules/@codemirror/lang-html/dist/index.cjs +667 -0
- package/node_modules/@codemirror/lang-html/dist/index.d.cts +115 -0
- package/node_modules/@codemirror/lang-html/dist/index.d.ts +115 -0
- package/node_modules/@codemirror/lang-html/dist/index.js +661 -0
- package/node_modules/@codemirror/lang-html/package.json +46 -0
- package/node_modules/@codemirror/lang-javascript/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-javascript/CHANGELOG.md +206 -0
- package/node_modules/@codemirror/lang-javascript/LICENSE +21 -0
- package/node_modules/@codemirror/lang-javascript/README.md +125 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.cjs +526 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.d.cts +93 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.d.ts +93 -0
- package/node_modules/@codemirror/lang-javascript/dist/index.js +513 -0
- package/node_modules/@codemirror/lang-javascript/package.json +45 -0
- package/node_modules/@codemirror/lang-json/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-json/CHANGELOG.md +59 -0
- package/node_modules/@codemirror/lang-json/LICENSE +21 -0
- package/node_modules/@codemirror/lang-json/README.md +56 -0
- package/node_modules/@codemirror/lang-json/dist/index.cjs +68 -0
- package/node_modules/@codemirror/lang-json/dist/index.d.cts +22 -0
- package/node_modules/@codemirror/lang-json/dist/index.d.ts +22 -0
- package/node_modules/@codemirror/lang-json/dist/index.js +64 -0
- package/node_modules/@codemirror/lang-json/package.json +39 -0
- package/node_modules/@codemirror/lang-markdown/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-markdown/CHANGELOG.md +246 -0
- package/node_modules/@codemirror/lang-markdown/LICENSE +21 -0
- package/node_modules/@codemirror/lang-markdown/README.md +162 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.cjs +501 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.d.cts +124 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.d.ts +124 -0
- package/node_modules/@codemirror/lang-markdown/dist/index.js +492 -0
- package/node_modules/@codemirror/lang-markdown/package.json +44 -0
- package/node_modules/@codemirror/lang-python/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lang-python/CHANGELOG.md +174 -0
- package/node_modules/@codemirror/lang-python/LICENSE +21 -0
- package/node_modules/@codemirror/lang-python/README.md +61 -0
- package/node_modules/@codemirror/lang-python/dist/index.cjs +313 -0
- package/node_modules/@codemirror/lang-python/dist/index.d.cts +26 -0
- package/node_modules/@codemirror/lang-python/dist/index.d.ts +26 -0
- package/node_modules/@codemirror/lang-python/dist/index.js +308 -0
- package/node_modules/@codemirror/lang-python/package.json +42 -0
- package/node_modules/@codemirror/language/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/language/CHANGELOG.md +412 -0
- package/node_modules/@codemirror/language/LICENSE +21 -0
- package/node_modules/@codemirror/language/README.md +66 -0
- package/node_modules/@codemirror/language/dist/index.cjs +2742 -0
- package/node_modules/@codemirror/language/dist/index.d.cts +1220 -0
- package/node_modules/@codemirror/language/dist/index.d.ts +1220 -0
- package/node_modules/@codemirror/language/dist/index.js +2687 -0
- package/node_modules/@codemirror/language/package.json +44 -0
- package/node_modules/@codemirror/lint/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/lint/CHANGELOG.md +318 -0
- package/node_modules/@codemirror/lint/LICENSE +21 -0
- package/node_modules/@codemirror/lint/README.md +18 -0
- package/node_modules/@codemirror/lint/dist/index.cjs +958 -0
- package/node_modules/@codemirror/lint/dist/index.d.cts +195 -0
- package/node_modules/@codemirror/lint/dist/index.d.ts +195 -0
- package/node_modules/@codemirror/lint/dist/index.js +945 -0
- package/node_modules/@codemirror/lint/package.json +40 -0
- package/node_modules/@codemirror/search/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/search/CHANGELOG.md +324 -0
- package/node_modules/@codemirror/search/LICENSE +21 -0
- package/node_modules/@codemirror/search/README.md +18 -0
- package/node_modules/@codemirror/search/dist/index.cjs +1237 -0
- package/node_modules/@codemirror/search/dist/index.d.cts +385 -0
- package/node_modules/@codemirror/search/dist/index.d.ts +385 -0
- package/node_modules/@codemirror/search/dist/index.js +1217 -0
- package/node_modules/@codemirror/search/package.json +40 -0
- package/node_modules/@codemirror/state/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/state/CHANGELOG.md +308 -0
- package/node_modules/@codemirror/state/LICENSE +21 -0
- package/node_modules/@codemirror/state/README.md +18 -0
- package/node_modules/@codemirror/state/dist/index.cjs +3922 -0
- package/node_modules/@codemirror/state/dist/index.d.cts +1713 -0
- package/node_modules/@codemirror/state/dist/index.d.ts +1713 -0
- package/node_modules/@codemirror/state/dist/index.js +3892 -0
- package/node_modules/@codemirror/state/package.json +38 -0
- package/node_modules/@codemirror/theme-one-dark/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/theme-one-dark/CHANGELOG.md +97 -0
- package/node_modules/@codemirror/theme-one-dark/LICENSE +21 -0
- package/node_modules/@codemirror/theme-one-dark/README.md +46 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.cjs +139 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.d.cts +39 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.d.ts +39 -0
- package/node_modules/@codemirror/theme-one-dark/dist/index.js +134 -0
- package/node_modules/@codemirror/theme-one-dark/package.json +41 -0
- package/node_modules/@codemirror/view/.github/workflows/dispatch.yml +16 -0
- package/node_modules/@codemirror/view/CHANGELOG.md +2284 -0
- package/node_modules/@codemirror/view/LICENSE +21 -0
- package/node_modules/@codemirror/view/README.md +37 -0
- package/node_modules/@codemirror/view/dist/index.cjs +11796 -0
- package/node_modules/@codemirror/view/dist/index.d.cts +2389 -0
- package/node_modules/@codemirror/view/dist/index.d.ts +2389 -0
- package/node_modules/@codemirror/view/dist/index.js +11745 -0
- package/node_modules/@codemirror/view/package.json +41 -0
- package/node_modules/@groove-dev/daemon/src/api.js +157 -2
- package/node_modules/@groove-dev/daemon/src/filewatcher.js +59 -0
- package/node_modules/@groove-dev/daemon/src/index.js +28 -1
- package/node_modules/@groove-dev/daemon/src/skills.js +20 -0
- package/node_modules/@groove-dev/gui/dist/assets/index-Dxg9hdf3.js +103 -0
- package/node_modules/@groove-dev/gui/dist/index.html +1 -1
- package/node_modules/@groove-dev/gui/package.json +15 -2
- package/node_modules/@groove-dev/gui/src/App.jsx +3 -0
- package/node_modules/@groove-dev/gui/src/components/CodeEditor.jsx +143 -0
- package/node_modules/@groove-dev/gui/src/components/EditorTabs.jsx +83 -0
- package/node_modules/@groove-dev/gui/src/components/FileTree.jsx +193 -0
- package/node_modules/@groove-dev/gui/src/stores/groove.js +158 -1
- package/node_modules/@groove-dev/gui/src/views/FileEditor.jsx +142 -0
- package/node_modules/@groove-dev/gui/src/views/SkillsMarketplace.jsx +112 -1
- package/node_modules/@lezer/common/LICENSE +21 -0
- package/node_modules/@lezer/common/README.md +14 -0
- package/node_modules/@lezer/common/dist/index.cjs +2209 -0
- package/node_modules/@lezer/common/dist/index.d.cts +1174 -0
- package/node_modules/@lezer/common/dist/index.d.ts +1174 -0
- package/node_modules/@lezer/common/dist/index.js +2196 -0
- package/node_modules/@lezer/common/package.json +32 -0
- package/node_modules/@lezer/css/CHANGELOG.md +307 -0
- package/node_modules/@lezer/css/LICENSE +21 -0
- package/node_modules/@lezer/css/README.md +6 -0
- package/node_modules/@lezer/css/dist/index.cjs +151 -0
- package/node_modules/@lezer/css/dist/index.d.cts +3 -0
- package/node_modules/@lezer/css/dist/index.d.ts +3 -0
- package/node_modules/@lezer/css/dist/index.js +147 -0
- package/node_modules/@lezer/css/package.json +36 -0
- package/node_modules/@lezer/css/rollup.config.js +16 -0
- package/node_modules/@lezer/css/src/css.grammar +290 -0
- package/node_modules/@lezer/css/src/highlight.js +36 -0
- package/node_modules/@lezer/css/src/parser.js +31 -0
- package/node_modules/@lezer/css/src/parser.terms.js +63 -0
- package/node_modules/@lezer/css/src/tokens.js +75 -0
- package/node_modules/@lezer/css/test/declarations.txt +241 -0
- package/node_modules/@lezer/css/test/selector.txt +178 -0
- package/node_modules/@lezer/css/test/statements.txt +227 -0
- package/node_modules/@lezer/css/test/test-css.js +16 -0
- package/node_modules/@lezer/highlight/LICENSE +21 -0
- package/node_modules/@lezer/highlight/README.md +14 -0
- package/node_modules/@lezer/highlight/dist/index.cjs +936 -0
- package/node_modules/@lezer/highlight/dist/index.d.cts +623 -0
- package/node_modules/@lezer/highlight/dist/index.d.ts +623 -0
- package/node_modules/@lezer/highlight/dist/index.js +927 -0
- package/node_modules/@lezer/highlight/package.json +31 -0
- package/node_modules/@lezer/html/CHANGELOG.md +303 -0
- package/node_modules/@lezer/html/LICENSE +21 -0
- package/node_modules/@lezer/html/README.md +37 -0
- package/node_modules/@lezer/html/dist/index.cjs +354 -0
- package/node_modules/@lezer/html/dist/index.d.cts +14 -0
- package/node_modules/@lezer/html/dist/index.d.ts +14 -0
- package/node_modules/@lezer/html/dist/index.js +349 -0
- package/node_modules/@lezer/html/package.json +37 -0
- package/node_modules/@lezer/html/rollup.config.js +16 -0
- package/node_modules/@lezer/html/src/.tern-port +1 -0
- package/node_modules/@lezer/html/src/content.js +87 -0
- package/node_modules/@lezer/html/src/highlight.js +15 -0
- package/node_modules/@lezer/html/src/html.grammar +181 -0
- package/node_modules/@lezer/html/src/index.js +2 -0
- package/node_modules/@lezer/html/src/parser.js +27 -0
- package/node_modules/@lezer/html/src/parser.terms.js +53 -0
- package/node_modules/@lezer/html/src/tokens.js +199 -0
- package/node_modules/@lezer/html/test/mixed.txt +69 -0
- package/node_modules/@lezer/html/test/tags.txt +370 -0
- package/node_modules/@lezer/html/test/test-html.js +29 -0
- package/node_modules/@lezer/html/test/test-incremental.js +97 -0
- package/node_modules/@lezer/html/test/vue.txt +56 -0
- package/node_modules/@lezer/javascript/CHANGELOG.md +485 -0
- package/node_modules/@lezer/javascript/LICENSE +21 -0
- package/node_modules/@lezer/javascript/README.md +14 -0
- package/node_modules/@lezer/javascript/dist/index.cjs +196 -0
- package/node_modules/@lezer/javascript/dist/index.d.cts +3 -0
- package/node_modules/@lezer/javascript/dist/index.d.ts +3 -0
- package/node_modules/@lezer/javascript/dist/index.js +192 -0
- package/node_modules/@lezer/javascript/package.json +36 -0
- package/node_modules/@lezer/javascript/rollup.config.js +16 -0
- package/node_modules/@lezer/javascript/src/highlight.js +62 -0
- package/node_modules/@lezer/javascript/src/javascript.grammar +735 -0
- package/node_modules/@lezer/javascript/src/parser.js +33 -0
- package/node_modules/@lezer/javascript/src/parser.terms.js +177 -0
- package/node_modules/@lezer/javascript/src/tokens.js +87 -0
- package/node_modules/@lezer/javascript/test/decorator.txt +64 -0
- package/node_modules/@lezer/javascript/test/expression.txt +686 -0
- package/node_modules/@lezer/javascript/test/jsx.txt +79 -0
- package/node_modules/@lezer/javascript/test/semicolon.txt +77 -0
- package/node_modules/@lezer/javascript/test/statement.txt +404 -0
- package/node_modules/@lezer/javascript/test/test-javascript.js +17 -0
- package/node_modules/@lezer/javascript/test/typescript.txt +401 -0
- package/node_modules/@lezer/json/CHANGELOG.md +79 -0
- package/node_modules/@lezer/json/LICENSE +21 -0
- package/node_modules/@lezer/json/README.md +7 -0
- package/node_modules/@lezer/json/dist/index.cjs +41 -0
- package/node_modules/@lezer/json/dist/index.d.cts +3 -0
- package/node_modules/@lezer/json/dist/index.d.ts +3 -0
- package/node_modules/@lezer/json/dist/index.js +37 -0
- package/node_modules/@lezer/json/package.json +36 -0
- package/node_modules/@lezer/json/rollup.config.js +15 -0
- package/node_modules/@lezer/json/src/highlight.js +12 -0
- package/node_modules/@lezer/json/src/json.grammar +38 -0
- package/node_modules/@lezer/json/src/parser.js +23 -0
- package/node_modules/@lezer/json/src/parser.terms.js +12 -0
- package/node_modules/@lezer/json/test/arrays.txt +34 -0
- package/node_modules/@lezer/json/test/literals.txt +23 -0
- package/node_modules/@lezer/json/test/numbers.txt +87 -0
- package/node_modules/@lezer/json/test/objects.txt +34 -0
- package/node_modules/@lezer/json/test/strings.txt +50 -0
- package/node_modules/@lezer/json/test/test-json.js +17 -0
- package/node_modules/@lezer/lr/LICENSE +21 -0
- package/node_modules/@lezer/lr/README.md +25 -0
- package/node_modules/@lezer/lr/dist/constants.d.ts +45 -0
- package/node_modules/@lezer/lr/dist/constants.js +5 -0
- package/node_modules/@lezer/lr/dist/index.cjs +1891 -0
- package/node_modules/@lezer/lr/dist/index.d.cts +303 -0
- package/node_modules/@lezer/lr/dist/index.d.ts +303 -0
- package/node_modules/@lezer/lr/dist/index.js +1884 -0
- package/node_modules/@lezer/lr/package.json +32 -0
- package/node_modules/@lezer/markdown/CHANGELOG.md +279 -0
- package/node_modules/@lezer/markdown/LICENSE +21 -0
- package/node_modules/@lezer/markdown/README.md +725 -0
- package/node_modules/@lezer/markdown/bin/build-readme.cjs +39 -0
- package/node_modules/@lezer/markdown/build.js +16 -0
- package/node_modules/@lezer/markdown/dist/index.cjs +2352 -0
- package/node_modules/@lezer/markdown/dist/index.d.cts +600 -0
- package/node_modules/@lezer/markdown/dist/index.d.ts +600 -0
- package/node_modules/@lezer/markdown/dist/index.js +2335 -0
- package/node_modules/@lezer/markdown/package.json +37 -0
- package/node_modules/@lezer/markdown/src/README.md +83 -0
- package/node_modules/@lezer/markdown/src/extension.ts +301 -0
- package/node_modules/@lezer/markdown/src/index.ts +5 -0
- package/node_modules/@lezer/markdown/src/markdown.ts +1961 -0
- package/node_modules/@lezer/markdown/src/nest.ts +46 -0
- package/node_modules/@lezer/markdown/test/compare-tree.ts +14 -0
- package/node_modules/@lezer/markdown/test/spec.ts +79 -0
- package/node_modules/@lezer/markdown/test/test-extension.ts +269 -0
- package/node_modules/@lezer/markdown/test/test-incremental.ts +265 -0
- package/node_modules/@lezer/markdown/test/test-markdown.ts +3574 -0
- package/node_modules/@lezer/markdown/test/test-nesting.ts +86 -0
- package/node_modules/@lezer/markdown/test/tsconfig.json +12 -0
- package/node_modules/@lezer/markdown/tsconfig.json +14 -0
- package/node_modules/@lezer/python/CHANGELOG.md +243 -0
- package/node_modules/@lezer/python/LICENSE +21 -0
- package/node_modules/@lezer/python/README.md +6 -0
- package/node_modules/@lezer/python/dist/index.cjs +330 -0
- package/node_modules/@lezer/python/dist/index.d.cts +3 -0
- package/node_modules/@lezer/python/dist/index.d.ts +3 -0
- package/node_modules/@lezer/python/dist/index.js +326 -0
- package/node_modules/@lezer/python/package.json +36 -0
- package/node_modules/@lezer/python/rollup.config.js +16 -0
- package/node_modules/@lezer/python/src/highlight.js +35 -0
- package/node_modules/@lezer/python/src/python.grammar +381 -0
- package/node_modules/@lezer/python/src/tokens.js +224 -0
- package/node_modules/@lezer/python/test/expression.txt +231 -0
- package/node_modules/@lezer/python/test/statement.txt +442 -0
- package/node_modules/@lezer/python/test/test-incremental.js +33 -0
- package/node_modules/@lezer/python/test/test-python.js +17 -0
- package/node_modules/@marijn/find-cluster-break/LICENSE +21 -0
- package/node_modules/@marijn/find-cluster-break/README.md +28 -0
- package/node_modules/@marijn/find-cluster-break/dist/index.cjs +85 -0
- package/node_modules/@marijn/find-cluster-break/dist/index.d.cts +15 -0
- package/node_modules/@marijn/find-cluster-break/package.json +35 -0
- package/node_modules/@marijn/find-cluster-break/rollup.config.js +7 -0
- package/node_modules/@marijn/find-cluster-break/src/index.d.ts +15 -0
- package/node_modules/@marijn/find-cluster-break/src/index.js +87 -0
- package/node_modules/@marijn/find-cluster-break/test/test-cluster.js +30 -0
- package/node_modules/crelt/LICENSE +19 -0
- package/node_modules/crelt/README.md +23 -0
- package/node_modules/crelt/dist/index.cjs +31 -0
- package/node_modules/crelt/dist/index.d.cts +4 -0
- package/node_modules/crelt/index.d.ts +4 -0
- package/node_modules/crelt/index.js +28 -0
- package/node_modules/crelt/package.json +35 -0
- package/node_modules/crelt/rollup.config.js +13 -0
- package/node_modules/style-mod/LICENSE +19 -0
- package/node_modules/style-mod/README.md +98 -0
- package/node_modules/style-mod/dist/style-mod.cjs +165 -0
- package/node_modules/style-mod/dist/style-mod.d.cts +16 -0
- package/node_modules/style-mod/package.json +39 -0
- package/node_modules/style-mod/src/README.md +34 -0
- package/node_modules/style-mod/src/style-mod.d.ts +16 -0
- package/node_modules/style-mod/src/style-mod.js +172 -0
- package/node_modules/style-mod/test/test-style-mod.js +104 -0
- package/node_modules/w3c-keyname/.tern-port +1 -0
- package/node_modules/w3c-keyname/LICENSE +19 -0
- package/node_modules/w3c-keyname/README.md +18 -0
- package/node_modules/w3c-keyname/index.cjs +127 -0
- package/node_modules/w3c-keyname/index.d.cts +5 -0
- package/node_modules/w3c-keyname/index.d.ts +5 -0
- package/node_modules/w3c-keyname/index.js +119 -0
- package/node_modules/w3c-keyname/package.json +37 -0
- package/package.json +1 -1
- package/packages/daemon/src/api.js +157 -2
- package/packages/daemon/src/filewatcher.js +59 -0
- package/packages/daemon/src/index.js +28 -1
- package/packages/daemon/src/skills.js +20 -0
- package/packages/gui/dist/assets/index-Dxg9hdf3.js +103 -0
- package/packages/gui/dist/index.html +1 -1
- package/packages/gui/package.json +15 -2
- package/packages/gui/src/App.jsx +3 -0
- package/packages/gui/src/components/CodeEditor.jsx +143 -0
- package/packages/gui/src/components/EditorTabs.jsx +83 -0
- package/packages/gui/src/components/FileTree.jsx +193 -0
- package/packages/gui/src/stores/groove.js +158 -1
- package/packages/gui/src/views/FileEditor.jsx +142 -0
- package/packages/gui/src/views/SkillsMarketplace.jsx +112 -1
- package/node_modules/@groove-dev/gui/dist/assets/index-CNCSwHwH.js +0 -74
- package/packages/gui/dist/assets/index-CNCSwHwH.js +0 -74
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codemirror/commands",
|
|
3
|
+
"version": "6.10.3",
|
|
4
|
+
"description": "Collection of editing commands for the CodeMirror code editor",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "cm-runtests",
|
|
7
|
+
"prepare": "cm-buildhelper src/commands.ts"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"editor",
|
|
11
|
+
"code"
|
|
12
|
+
],
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Marijn Haverbeke",
|
|
15
|
+
"email": "marijn@haverbeke.berlin",
|
|
16
|
+
"url": "http://marijnhaverbeke.nl"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "dist/index.cjs",
|
|
20
|
+
"exports": {
|
|
21
|
+
"import": "./dist/index.js",
|
|
22
|
+
"require": "./dist/index.cjs"
|
|
23
|
+
},
|
|
24
|
+
"types": "dist/index.d.ts",
|
|
25
|
+
"module": "dist/index.js",
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@codemirror/language": "^6.0.0",
|
|
30
|
+
"@codemirror/state": "^6.6.0",
|
|
31
|
+
"@codemirror/view": "^6.27.0",
|
|
32
|
+
"@lezer/common": "^1.1.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@codemirror/buildhelper": "^1.0.0",
|
|
36
|
+
"@codemirror/lang-javascript": "^6.0.0"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/codemirror/commands.git"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Trigger CI
|
|
2
|
+
on: push
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
build:
|
|
6
|
+
name: Dispatch to main repo
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- name: Emit repository_dispatch
|
|
10
|
+
uses: mvasigh/dispatch-action@main
|
|
11
|
+
with:
|
|
12
|
+
# You should create a personal access token and store it in your repository
|
|
13
|
+
token: ${{ secrets.DISPATCH_AUTH }}
|
|
14
|
+
repo: dev
|
|
15
|
+
owner: codemirror
|
|
16
|
+
event_type: push
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
## 6.3.1 (2024-11-26)
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
When completing a property name, insert a colon and space after the name.
|
|
6
|
+
|
|
7
|
+
## 6.3.0 (2024-09-07)
|
|
8
|
+
|
|
9
|
+
### New features
|
|
10
|
+
|
|
11
|
+
CSS autocompletion now completes `@`-keywords.
|
|
12
|
+
|
|
13
|
+
## 6.2.1 (2023-08-04)
|
|
14
|
+
|
|
15
|
+
### Bug fixes
|
|
16
|
+
|
|
17
|
+
Allow keyframe blocks to be code-folded.
|
|
18
|
+
|
|
19
|
+
## 6.2.0 (2023-04-26)
|
|
20
|
+
|
|
21
|
+
### Bug fixes
|
|
22
|
+
|
|
23
|
+
Explicitly list @lezer/common as a package dependency.
|
|
24
|
+
|
|
25
|
+
### New features
|
|
26
|
+
|
|
27
|
+
Export `defineCSSCompletionSource`, which allows one to define a CSS-style completion source for dialects with their own variable syntax.
|
|
28
|
+
|
|
29
|
+
## 6.1.1 (2023-03-08)
|
|
30
|
+
|
|
31
|
+
### Bug fixes
|
|
32
|
+
|
|
33
|
+
Provide better completions when completing directly in a `Styles` top node.
|
|
34
|
+
|
|
35
|
+
## 6.1.0 (2023-03-06)
|
|
36
|
+
|
|
37
|
+
### New features
|
|
38
|
+
|
|
39
|
+
CSS completion can now complete variable names.
|
|
40
|
+
|
|
41
|
+
## 6.0.2 (2023-01-28)
|
|
42
|
+
|
|
43
|
+
### Bug fixes
|
|
44
|
+
|
|
45
|
+
Fetch the available CSS property names in a way that works on Chrome.
|
|
46
|
+
|
|
47
|
+
## 6.0.1 (2022-10-24)
|
|
48
|
+
|
|
49
|
+
### Bug fixes
|
|
50
|
+
|
|
51
|
+
CSS completion now supports a number of additional recent and semi-standardized pseudo-class names.
|
|
52
|
+
|
|
53
|
+
## 6.0.0 (2022-06-08)
|
|
54
|
+
|
|
55
|
+
### Breaking changes
|
|
56
|
+
|
|
57
|
+
Update dependencies to 6.0.0
|
|
58
|
+
|
|
59
|
+
## 0.20.0 (2022-04-20)
|
|
60
|
+
|
|
61
|
+
### Breaking changes
|
|
62
|
+
|
|
63
|
+
Update dependencies to 0.20.0
|
|
64
|
+
|
|
65
|
+
## 0.19.3 (2021-09-24)
|
|
66
|
+
|
|
67
|
+
### Bug fixes
|
|
68
|
+
|
|
69
|
+
Use more appropriate highlighting tags for attribute names, tag names, and CSS variables.
|
|
70
|
+
|
|
71
|
+
## 0.19.2 (2021-09-22)
|
|
72
|
+
|
|
73
|
+
### New features
|
|
74
|
+
|
|
75
|
+
The package now exports a completion source function, rather than a prebuilt completion extension.
|
|
76
|
+
|
|
77
|
+
## 0.19.1 (2021-08-11)
|
|
78
|
+
|
|
79
|
+
### Bug fixes
|
|
80
|
+
|
|
81
|
+
Fix incorrect versions for @lezer dependencies.
|
|
82
|
+
|
|
83
|
+
## 0.19.0 (2021-08-11)
|
|
84
|
+
|
|
85
|
+
### Breaking changes
|
|
86
|
+
|
|
87
|
+
Update dependencies to 0.19.0
|
|
88
|
+
|
|
89
|
+
## 0.18.0 (2021-03-03)
|
|
90
|
+
|
|
91
|
+
### Breaking changes
|
|
92
|
+
|
|
93
|
+
Update dependencies to 0.18.
|
|
94
|
+
|
|
95
|
+
## 0.17.1 (2021-01-06)
|
|
96
|
+
|
|
97
|
+
### New features
|
|
98
|
+
|
|
99
|
+
The package now also exports a CommonJS module.
|
|
100
|
+
|
|
101
|
+
## 0.17.0 (2020-12-29)
|
|
102
|
+
|
|
103
|
+
### Breaking changes
|
|
104
|
+
|
|
105
|
+
First numbered release.
|
|
106
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2018-2021 by Marijn Haverbeke <marijn@haverbeke.berlin> and others
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- NOTE: README.md is generated from src/README.md -->
|
|
2
|
+
|
|
3
|
+
# @codemirror/lang-css [](https://www.npmjs.org/package/@codemirror/lang-css)
|
|
4
|
+
|
|
5
|
+
[ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/lang-css/blob/main/CHANGELOG.md) ]
|
|
6
|
+
|
|
7
|
+
This package implements CSS language support for the
|
|
8
|
+
[CodeMirror](https://codemirror.net/) code editor.
|
|
9
|
+
|
|
10
|
+
The [project page](https://codemirror.net/) has more information, a
|
|
11
|
+
number of [examples](https://codemirror.net/examples/) and the
|
|
12
|
+
[documentation](https://codemirror.net/docs/).
|
|
13
|
+
|
|
14
|
+
This code is released under an
|
|
15
|
+
[MIT license](https://github.com/codemirror/lang-css/tree/main/LICENSE).
|
|
16
|
+
|
|
17
|
+
We aim to be an inclusive, welcoming community. To make that explicit,
|
|
18
|
+
we have a [code of
|
|
19
|
+
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
|
|
20
|
+
to communication around the project.
|
|
21
|
+
|
|
22
|
+
## API Reference
|
|
23
|
+
|
|
24
|
+
<dl>
|
|
25
|
+
<dt id="user-content-css">
|
|
26
|
+
<code><strong><a href="#user-content-css">css</a></strong>() → <a href="https://codemirror.net/docs/ref#language.LanguageSupport">LanguageSupport</a></code></dt>
|
|
27
|
+
|
|
28
|
+
<dd><p>Language support for CSS.</p>
|
|
29
|
+
</dd>
|
|
30
|
+
<dt id="user-content-csslanguage">
|
|
31
|
+
<code><strong><a href="#user-content-csslanguage">cssLanguage</a></strong>: <a href="https://codemirror.net/docs/ref#language.LRLanguage">LRLanguage</a></code></dt>
|
|
32
|
+
|
|
33
|
+
<dd><p>A language provider based on the <a href="https://github.com/lezer-parser/css">Lezer CSS
|
|
34
|
+
parser</a>, extended with
|
|
35
|
+
highlighting and indentation information.</p>
|
|
36
|
+
</dd>
|
|
37
|
+
<dt id="user-content-csscompletionsource">
|
|
38
|
+
<code><strong><a href="#user-content-csscompletionsource">cssCompletionSource</a></strong>: <a href="https://codemirror.net/docs/ref#autocomplete.CompletionSource">CompletionSource</a></code></dt>
|
|
39
|
+
|
|
40
|
+
<dd><p>CSS property, variable, and value keyword completion source.</p>
|
|
41
|
+
</dd>
|
|
42
|
+
<dt id="user-content-definecsscompletionsource">
|
|
43
|
+
<code><strong><a href="#user-content-definecsscompletionsource">defineCSSCompletionSource</a></strong>(<a id="user-content-definecsscompletionsource^isvariable" href="#user-content-definecsscompletionsource^isvariable">isVariable</a>: fn(<a id="user-content-definecsscompletionsource^isvariable^node" href="#user-content-definecsscompletionsource^isvariable^node">node</a>: <a href="https://lezer.codemirror.net/docs/ref/#common.SyntaxNodeRef">SyntaxNodeRef</a>) → <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>) → <a href="https://codemirror.net/docs/ref#autocomplete.CompletionSource">CompletionSource</a></code></dt>
|
|
44
|
+
|
|
45
|
+
<dd><p>Create a completion source for a CSS dialect, providing a
|
|
46
|
+
predicate for determining what kind of syntax node can act as a
|
|
47
|
+
completable variable. This is used by language modes like Sass and
|
|
48
|
+
Less to reuse this package's completion logic.</p>
|
|
49
|
+
</dd>
|
|
50
|
+
</dl>
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var css$1 = require('@lezer/css');
|
|
4
|
+
var language = require('@codemirror/language');
|
|
5
|
+
var common = require('@lezer/common');
|
|
6
|
+
|
|
7
|
+
let _properties = null;
|
|
8
|
+
function properties() {
|
|
9
|
+
if (!_properties && typeof document == "object" && document.body) {
|
|
10
|
+
let { style } = document.body, names = [], seen = new Set;
|
|
11
|
+
for (let prop in style)
|
|
12
|
+
if (prop != "cssText" && prop != "cssFloat") {
|
|
13
|
+
if (typeof style[prop] == "string") {
|
|
14
|
+
if (/[A-Z]/.test(prop))
|
|
15
|
+
prop = prop.replace(/[A-Z]/g, ch => "-" + ch.toLowerCase());
|
|
16
|
+
if (!seen.has(prop)) {
|
|
17
|
+
names.push(prop);
|
|
18
|
+
seen.add(prop);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
_properties = names.sort().map(name => ({ type: "property", label: name, apply: name + ": " }));
|
|
23
|
+
}
|
|
24
|
+
return _properties || [];
|
|
25
|
+
}
|
|
26
|
+
const pseudoClasses = [
|
|
27
|
+
"active", "after", "any-link", "autofill", "backdrop", "before",
|
|
28
|
+
"checked", "cue", "default", "defined", "disabled", "empty",
|
|
29
|
+
"enabled", "file-selector-button", "first", "first-child",
|
|
30
|
+
"first-letter", "first-line", "first-of-type", "focus",
|
|
31
|
+
"focus-visible", "focus-within", "fullscreen", "has", "host",
|
|
32
|
+
"host-context", "hover", "in-range", "indeterminate", "invalid",
|
|
33
|
+
"is", "lang", "last-child", "last-of-type", "left", "link", "marker",
|
|
34
|
+
"modal", "not", "nth-child", "nth-last-child", "nth-last-of-type",
|
|
35
|
+
"nth-of-type", "only-child", "only-of-type", "optional", "out-of-range",
|
|
36
|
+
"part", "placeholder", "placeholder-shown", "read-only", "read-write",
|
|
37
|
+
"required", "right", "root", "scope", "selection", "slotted", "target",
|
|
38
|
+
"target-text", "valid", "visited", "where"
|
|
39
|
+
].map(name => ({ type: "class", label: name }));
|
|
40
|
+
const values = [
|
|
41
|
+
"above", "absolute", "activeborder", "additive", "activecaption", "after-white-space",
|
|
42
|
+
"ahead", "alias", "all", "all-scroll", "alphabetic", "alternate", "always",
|
|
43
|
+
"antialiased", "appworkspace", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column",
|
|
44
|
+
"avoid-page", "avoid-region", "axis-pan", "background", "backwards", "baseline", "below",
|
|
45
|
+
"bidi-override", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
|
|
46
|
+
"both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
|
|
47
|
+
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "capitalize",
|
|
48
|
+
"caps-lock-indicator", "caption", "captiontext", "caret", "cell", "center", "checkbox", "circle",
|
|
49
|
+
"cjk-decimal", "clear", "clip", "close-quote", "col-resize", "collapse", "color", "color-burn",
|
|
50
|
+
"color-dodge", "column", "column-reverse", "compact", "condensed", "contain", "content",
|
|
51
|
+
"contents", "content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover",
|
|
52
|
+
"crop", "cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
|
|
53
|
+
"decimal-leading-zero", "default", "default-button", "dense", "destination-atop", "destination-in",
|
|
54
|
+
"destination-out", "destination-over", "difference", "disc", "discard", "disclosure-closed",
|
|
55
|
+
"disclosure-open", "document", "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize",
|
|
56
|
+
"ease", "ease-in", "ease-in-out", "ease-out", "element", "ellipse", "ellipsis", "embed", "end",
|
|
57
|
+
"ethiopic-abegede-gez", "ethiopic-halehame-aa-er", "ethiopic-halehame-gez", "ew-resize", "exclusion",
|
|
58
|
+
"expanded", "extends", "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fill-box",
|
|
59
|
+
"fixed", "flat", "flex", "flex-end", "flex-start", "footnotes", "forwards", "from",
|
|
60
|
+
"geometricPrecision", "graytext", "grid", "groove", "hand", "hard-light", "help", "hidden", "hide",
|
|
61
|
+
"higher", "highlight", "highlighttext", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
|
|
62
|
+
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext",
|
|
63
|
+
"inherit", "initial", "inline", "inline-axis", "inline-block", "inline-flex", "inline-grid",
|
|
64
|
+
"inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "keep-all",
|
|
65
|
+
"landscape", "large", "larger", "left", "level", "lighter", "lighten", "line-through", "linear",
|
|
66
|
+
"linear-gradient", "lines", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower",
|
|
67
|
+
"lower-hexadecimal", "lower-latin", "lower-norwegian", "lowercase", "ltr", "luminosity", "manipulation",
|
|
68
|
+
"match", "matrix", "matrix3d", "medium", "menu", "menutext", "message-box", "middle", "min-intrinsic",
|
|
69
|
+
"mix", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "n-resize", "narrower",
|
|
70
|
+
"ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none",
|
|
71
|
+
"normal", "not-allowed", "nowrap", "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize",
|
|
72
|
+
"oblique", "opacity", "open-quote", "optimizeLegibility", "optimizeSpeed", "outset", "outside",
|
|
73
|
+
"outside-shape", "overlay", "overline", "padding", "padding-box", "painted", "page", "paused",
|
|
74
|
+
"perspective", "pinch-zoom", "plus-darker", "plus-lighter", "pointer", "polygon", "portrait",
|
|
75
|
+
"pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "push-button", "radial-gradient", "radio",
|
|
76
|
+
"read-only", "read-write", "read-write-plaintext-only", "rectangle", "region", "relative", "repeat",
|
|
77
|
+
"repeating-linear-gradient", "repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
|
|
78
|
+
"rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY", "rotateZ", "round",
|
|
79
|
+
"row", "row-resize", "row-reverse", "rtl", "run-in", "running", "s-resize", "sans-serif", "saturation",
|
|
80
|
+
"scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen", "scroll", "scrollbar", "scroll-position",
|
|
81
|
+
"se-resize", "self-start", "self-end", "semi-condensed", "semi-expanded", "separate", "serif", "show",
|
|
82
|
+
"single", "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
|
|
83
|
+
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow", "small", "small-caps",
|
|
84
|
+
"small-caption", "smaller", "soft-light", "solid", "source-atop", "source-in", "source-out",
|
|
85
|
+
"source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square", "start",
|
|
86
|
+
"static", "status-bar", "stretch", "stroke", "stroke-box", "sub", "subpixel-antialiased", "svg_masks",
|
|
87
|
+
"super", "sw-resize", "symbolic", "symbols", "system-ui", "table", "table-caption", "table-cell",
|
|
88
|
+
"table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row",
|
|
89
|
+
"table-row-group", "text", "text-bottom", "text-top", "textarea", "textfield", "thick", "thin",
|
|
90
|
+
"threeddarkshadow", "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "to", "top",
|
|
91
|
+
"transform", "translate", "translate3d", "translateX", "translateY", "translateZ", "transparent",
|
|
92
|
+
"ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up", "upper-latin",
|
|
93
|
+
"uppercase", "url", "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill",
|
|
94
|
+
"visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "wider", "window", "windowframe",
|
|
95
|
+
"windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor", "xx-large", "xx-small"
|
|
96
|
+
].map(name => ({ type: "keyword", label: name })).concat([
|
|
97
|
+
"aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
|
|
98
|
+
"bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
|
|
99
|
+
"burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
|
|
100
|
+
"cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
|
|
101
|
+
"darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
|
|
102
|
+
"darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
|
|
103
|
+
"darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
|
|
104
|
+
"deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
|
|
105
|
+
"floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
|
|
106
|
+
"gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
|
|
107
|
+
"hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
|
|
108
|
+
"lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
|
|
109
|
+
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
|
|
110
|
+
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
|
|
111
|
+
"lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
|
|
112
|
+
"maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
|
|
113
|
+
"mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
|
|
114
|
+
"mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
|
|
115
|
+
"navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
|
|
116
|
+
"orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
|
|
117
|
+
"papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
|
|
118
|
+
"purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
|
|
119
|
+
"salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
|
|
120
|
+
"slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
|
|
121
|
+
"teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
|
|
122
|
+
"whitesmoke", "yellow", "yellowgreen"
|
|
123
|
+
].map(name => ({ type: "constant", label: name })));
|
|
124
|
+
const tags = [
|
|
125
|
+
"a", "abbr", "address", "article", "aside", "b", "bdi", "bdo", "blockquote", "body",
|
|
126
|
+
"br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "dd", "del",
|
|
127
|
+
"details", "dfn", "dialog", "div", "dl", "dt", "em", "figcaption", "figure", "footer",
|
|
128
|
+
"form", "header", "hgroup", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "html", "i", "iframe",
|
|
129
|
+
"img", "input", "ins", "kbd", "label", "legend", "li", "main", "meter", "nav", "ol", "output",
|
|
130
|
+
"p", "pre", "ruby", "section", "select", "small", "source", "span", "strong", "sub", "summary",
|
|
131
|
+
"sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "tr", "u", "ul"
|
|
132
|
+
].map(name => ({ type: "type", label: name }));
|
|
133
|
+
const atRules = [
|
|
134
|
+
"@charset", "@color-profile", "@container", "@counter-style", "@font-face", "@font-feature-values",
|
|
135
|
+
"@font-palette-values", "@import", "@keyframes", "@layer", "@media", "@namespace", "@page",
|
|
136
|
+
"@position-try", "@property", "@scope", "@starting-style", "@supports", "@view-transition"
|
|
137
|
+
].map(label => ({ type: "keyword", label }));
|
|
138
|
+
const identifier = /^(\w[\w-]*|-\w[\w-]*|)$/, variable = /^-(-[\w-]*)?$/;
|
|
139
|
+
function isVarArg(node, doc) {
|
|
140
|
+
var _a;
|
|
141
|
+
if (node.name == "(" || node.type.isError)
|
|
142
|
+
node = node.parent || node;
|
|
143
|
+
if (node.name != "ArgList")
|
|
144
|
+
return false;
|
|
145
|
+
let callee = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.firstChild;
|
|
146
|
+
if ((callee === null || callee === void 0 ? void 0 : callee.name) != "Callee")
|
|
147
|
+
return false;
|
|
148
|
+
return doc.sliceString(callee.from, callee.to) == "var";
|
|
149
|
+
}
|
|
150
|
+
const VariablesByNode = new common.NodeWeakMap();
|
|
151
|
+
const declSelector = ["Declaration"];
|
|
152
|
+
function astTop(node) {
|
|
153
|
+
for (let cur = node;;) {
|
|
154
|
+
if (cur.type.isTop)
|
|
155
|
+
return cur;
|
|
156
|
+
if (!(cur = cur.parent))
|
|
157
|
+
return node;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function variableNames(doc, node, isVariable) {
|
|
161
|
+
if (node.to - node.from > 4096) {
|
|
162
|
+
let known = VariablesByNode.get(node);
|
|
163
|
+
if (known)
|
|
164
|
+
return known;
|
|
165
|
+
let result = [], seen = new Set, cursor = node.cursor(common.IterMode.IncludeAnonymous);
|
|
166
|
+
if (cursor.firstChild())
|
|
167
|
+
do {
|
|
168
|
+
for (let option of variableNames(doc, cursor.node, isVariable))
|
|
169
|
+
if (!seen.has(option.label)) {
|
|
170
|
+
seen.add(option.label);
|
|
171
|
+
result.push(option);
|
|
172
|
+
}
|
|
173
|
+
} while (cursor.nextSibling());
|
|
174
|
+
VariablesByNode.set(node, result);
|
|
175
|
+
return result;
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
let result = [], seen = new Set;
|
|
179
|
+
node.cursor().iterate(node => {
|
|
180
|
+
var _a;
|
|
181
|
+
if (isVariable(node) && node.matchContext(declSelector) && ((_a = node.node.nextSibling) === null || _a === void 0 ? void 0 : _a.name) == ":") {
|
|
182
|
+
let name = doc.sliceString(node.from, node.to);
|
|
183
|
+
if (!seen.has(name)) {
|
|
184
|
+
seen.add(name);
|
|
185
|
+
result.push({ label: name, type: "variable" });
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
return result;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
Create a completion source for a CSS dialect, providing a
|
|
194
|
+
predicate for determining what kind of syntax node can act as a
|
|
195
|
+
completable variable. This is used by language modes like Sass and
|
|
196
|
+
Less to reuse this package's completion logic.
|
|
197
|
+
*/
|
|
198
|
+
const defineCSSCompletionSource = (isVariable) => context => {
|
|
199
|
+
let { state, pos } = context, node = language.syntaxTree(state).resolveInner(pos, -1);
|
|
200
|
+
let isDash = node.type.isError && node.from == node.to - 1 && state.doc.sliceString(node.from, node.to) == "-";
|
|
201
|
+
if (node.name == "PropertyName" ||
|
|
202
|
+
(isDash || node.name == "TagName") && /^(Block|Styles)$/.test(node.resolve(node.to).name))
|
|
203
|
+
return { from: node.from, options: properties(), validFor: identifier };
|
|
204
|
+
if (node.name == "ValueName")
|
|
205
|
+
return { from: node.from, options: values, validFor: identifier };
|
|
206
|
+
if (node.name == "PseudoClassName")
|
|
207
|
+
return { from: node.from, options: pseudoClasses, validFor: identifier };
|
|
208
|
+
if (isVariable(node) || (context.explicit || isDash) && isVarArg(node, state.doc))
|
|
209
|
+
return { from: isVariable(node) || isDash ? node.from : pos,
|
|
210
|
+
options: variableNames(state.doc, astTop(node), isVariable),
|
|
211
|
+
validFor: variable };
|
|
212
|
+
if (node.name == "TagName") {
|
|
213
|
+
for (let { parent } = node; parent; parent = parent.parent)
|
|
214
|
+
if (parent.name == "Block")
|
|
215
|
+
return { from: node.from, options: properties(), validFor: identifier };
|
|
216
|
+
return { from: node.from, options: tags, validFor: identifier };
|
|
217
|
+
}
|
|
218
|
+
if (node.name == "AtKeyword")
|
|
219
|
+
return { from: node.from, options: atRules, validFor: identifier };
|
|
220
|
+
if (!context.explicit)
|
|
221
|
+
return null;
|
|
222
|
+
let above = node.resolve(pos), before = above.childBefore(pos);
|
|
223
|
+
if (before && before.name == ":" && above.name == "PseudoClassSelector")
|
|
224
|
+
return { from: pos, options: pseudoClasses, validFor: identifier };
|
|
225
|
+
if (before && before.name == ":" && above.name == "Declaration" || above.name == "ArgList")
|
|
226
|
+
return { from: pos, options: values, validFor: identifier };
|
|
227
|
+
if (above.name == "Block" || above.name == "Styles")
|
|
228
|
+
return { from: pos, options: properties(), validFor: identifier };
|
|
229
|
+
return null;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
CSS property, variable, and value keyword completion source.
|
|
233
|
+
*/
|
|
234
|
+
const cssCompletionSource = defineCSSCompletionSource(n => n.name == "VariableName");
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
A language provider based on the [Lezer CSS
|
|
238
|
+
parser](https://github.com/lezer-parser/css), extended with
|
|
239
|
+
highlighting and indentation information.
|
|
240
|
+
*/
|
|
241
|
+
const cssLanguage = language.LRLanguage.define({
|
|
242
|
+
name: "css",
|
|
243
|
+
parser: css$1.parser.configure({
|
|
244
|
+
props: [
|
|
245
|
+
language.indentNodeProp.add({
|
|
246
|
+
Declaration: language.continuedIndent()
|
|
247
|
+
}),
|
|
248
|
+
language.foldNodeProp.add({
|
|
249
|
+
"Block KeyframeList": language.foldInside
|
|
250
|
+
})
|
|
251
|
+
]
|
|
252
|
+
}),
|
|
253
|
+
languageData: {
|
|
254
|
+
commentTokens: { block: { open: "/*", close: "*/" } },
|
|
255
|
+
indentOnInput: /^\s*\}$/,
|
|
256
|
+
wordChars: "-"
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
/**
|
|
260
|
+
Language support for CSS.
|
|
261
|
+
*/
|
|
262
|
+
function css() {
|
|
263
|
+
return new language.LanguageSupport(cssLanguage, cssLanguage.data.of({ autocomplete: cssCompletionSource }));
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
exports.css = css;
|
|
267
|
+
exports.cssCompletionSource = cssCompletionSource;
|
|
268
|
+
exports.cssLanguage = cssLanguage;
|
|
269
|
+
exports.defineCSSCompletionSource = defineCSSCompletionSource;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LRLanguage, LanguageSupport } from '@codemirror/language';
|
|
2
|
+
import { CompletionSource } from '@codemirror/autocomplete';
|
|
3
|
+
import { SyntaxNodeRef } from '@lezer/common';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
Create a completion source for a CSS dialect, providing a
|
|
7
|
+
predicate for determining what kind of syntax node can act as a
|
|
8
|
+
completable variable. This is used by language modes like Sass and
|
|
9
|
+
Less to reuse this package's completion logic.
|
|
10
|
+
*/
|
|
11
|
+
declare const defineCSSCompletionSource: (isVariable: (node: SyntaxNodeRef) => boolean) => CompletionSource;
|
|
12
|
+
/**
|
|
13
|
+
CSS property, variable, and value keyword completion source.
|
|
14
|
+
*/
|
|
15
|
+
declare const cssCompletionSource: CompletionSource;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
A language provider based on the [Lezer CSS
|
|
19
|
+
parser](https://github.com/lezer-parser/css), extended with
|
|
20
|
+
highlighting and indentation information.
|
|
21
|
+
*/
|
|
22
|
+
declare const cssLanguage: LRLanguage;
|
|
23
|
+
/**
|
|
24
|
+
Language support for CSS.
|
|
25
|
+
*/
|
|
26
|
+
declare function css(): LanguageSupport;
|
|
27
|
+
|
|
28
|
+
export { css, cssCompletionSource, cssLanguage, defineCSSCompletionSource };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LRLanguage, LanguageSupport } from '@codemirror/language';
|
|
2
|
+
import { CompletionSource } from '@codemirror/autocomplete';
|
|
3
|
+
import { SyntaxNodeRef } from '@lezer/common';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
Create a completion source for a CSS dialect, providing a
|
|
7
|
+
predicate for determining what kind of syntax node can act as a
|
|
8
|
+
completable variable. This is used by language modes like Sass and
|
|
9
|
+
Less to reuse this package's completion logic.
|
|
10
|
+
*/
|
|
11
|
+
declare const defineCSSCompletionSource: (isVariable: (node: SyntaxNodeRef) => boolean) => CompletionSource;
|
|
12
|
+
/**
|
|
13
|
+
CSS property, variable, and value keyword completion source.
|
|
14
|
+
*/
|
|
15
|
+
declare const cssCompletionSource: CompletionSource;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
A language provider based on the [Lezer CSS
|
|
19
|
+
parser](https://github.com/lezer-parser/css), extended with
|
|
20
|
+
highlighting and indentation information.
|
|
21
|
+
*/
|
|
22
|
+
declare const cssLanguage: LRLanguage;
|
|
23
|
+
/**
|
|
24
|
+
Language support for CSS.
|
|
25
|
+
*/
|
|
26
|
+
declare function css(): LanguageSupport;
|
|
27
|
+
|
|
28
|
+
export { css, cssCompletionSource, cssLanguage, defineCSSCompletionSource };
|