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,142 @@
|
|
|
1
|
+
// GROOVE GUI — File Editor View
|
|
2
|
+
// FSL-1.1-Apache-2.0 — see LICENSE
|
|
3
|
+
|
|
4
|
+
import React, { useCallback } from 'react';
|
|
5
|
+
import { useGrooveStore } from '../stores/groove';
|
|
6
|
+
import FileTree from '../components/FileTree';
|
|
7
|
+
import EditorTabs from '../components/EditorTabs';
|
|
8
|
+
import CodeEditor from '../components/CodeEditor';
|
|
9
|
+
|
|
10
|
+
export default function FileEditor() {
|
|
11
|
+
const activeFile = useGrooveStore((s) => s.editorActiveFile);
|
|
12
|
+
const files = useGrooveStore((s) => s.editorFiles);
|
|
13
|
+
const changedFiles = useGrooveStore((s) => s.editorChangedFiles);
|
|
14
|
+
const updateFileContent = useGrooveStore((s) => s.updateFileContent);
|
|
15
|
+
const saveFile = useGrooveStore((s) => s.saveFile);
|
|
16
|
+
const reloadFile = useGrooveStore((s) => s.reloadFile);
|
|
17
|
+
const dismissFileChange = useGrooveStore((s) => s.dismissFileChange);
|
|
18
|
+
|
|
19
|
+
const file = activeFile ? files[activeFile] : null;
|
|
20
|
+
const isChanged = activeFile && changedFiles[activeFile];
|
|
21
|
+
|
|
22
|
+
const onContentChange = useCallback((content) => {
|
|
23
|
+
if (activeFile) updateFileContent(activeFile, content);
|
|
24
|
+
}, [activeFile, updateFileContent]);
|
|
25
|
+
|
|
26
|
+
const onSave = useCallback(() => {
|
|
27
|
+
if (activeFile) saveFile(activeFile);
|
|
28
|
+
}, [activeFile, saveFile]);
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div style={styles.container}>
|
|
32
|
+
{/* Tab bar */}
|
|
33
|
+
<EditorTabs />
|
|
34
|
+
|
|
35
|
+
{/* Main content row */}
|
|
36
|
+
<div style={styles.contentRow}>
|
|
37
|
+
{/* File tree sidebar */}
|
|
38
|
+
<div style={styles.sidebar}>
|
|
39
|
+
<FileTree />
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
{/* Editor area */}
|
|
43
|
+
<div style={styles.editorArea}>
|
|
44
|
+
{/* External change banner */}
|
|
45
|
+
{isChanged && (
|
|
46
|
+
<div style={styles.changeBanner}>
|
|
47
|
+
<span style={styles.bannerText}>File modified externally</span>
|
|
48
|
+
<button
|
|
49
|
+
onClick={() => reloadFile(activeFile)}
|
|
50
|
+
style={styles.bannerBtn}
|
|
51
|
+
>
|
|
52
|
+
Reload
|
|
53
|
+
</button>
|
|
54
|
+
<button
|
|
55
|
+
onClick={() => dismissFileChange(activeFile)}
|
|
56
|
+
style={styles.bannerDismiss}
|
|
57
|
+
>
|
|
58
|
+
Dismiss
|
|
59
|
+
</button>
|
|
60
|
+
</div>
|
|
61
|
+
)}
|
|
62
|
+
|
|
63
|
+
{/* Editor or empty state */}
|
|
64
|
+
{file ? (
|
|
65
|
+
<CodeEditor
|
|
66
|
+
key={activeFile}
|
|
67
|
+
content={file.content}
|
|
68
|
+
language={file.language}
|
|
69
|
+
onContentChange={onContentChange}
|
|
70
|
+
onSave={onSave}
|
|
71
|
+
/>
|
|
72
|
+
) : (
|
|
73
|
+
<div style={styles.emptyState}>
|
|
74
|
+
<div style={styles.emptyIcon}>{'\u2190'}</div>
|
|
75
|
+
<div style={styles.emptyText}>Select a file from the tree</div>
|
|
76
|
+
<div style={styles.emptyHint}>Cmd+S to save, changes detected live</div>
|
|
77
|
+
</div>
|
|
78
|
+
)}
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const styles = {
|
|
86
|
+
container: {
|
|
87
|
+
display: 'flex', flexDirection: 'column',
|
|
88
|
+
height: '100%', width: '100%',
|
|
89
|
+
},
|
|
90
|
+
contentRow: {
|
|
91
|
+
flex: 1, display: 'flex', overflow: 'hidden',
|
|
92
|
+
},
|
|
93
|
+
sidebar: {
|
|
94
|
+
width: 240, flexShrink: 0,
|
|
95
|
+
borderRight: '1px solid var(--border)',
|
|
96
|
+
overflow: 'hidden',
|
|
97
|
+
},
|
|
98
|
+
editorArea: {
|
|
99
|
+
flex: 1, display: 'flex', flexDirection: 'column',
|
|
100
|
+
position: 'relative', overflow: 'hidden',
|
|
101
|
+
background: 'var(--bg-base)',
|
|
102
|
+
},
|
|
103
|
+
changeBanner: {
|
|
104
|
+
position: 'absolute', top: 0, left: 0, right: 0, zIndex: 10,
|
|
105
|
+
display: 'flex', alignItems: 'center', gap: 8,
|
|
106
|
+
padding: '6px 12px',
|
|
107
|
+
background: 'rgba(229, 192, 123, 0.15)',
|
|
108
|
+
borderBottom: '1px solid var(--amber)',
|
|
109
|
+
},
|
|
110
|
+
bannerText: {
|
|
111
|
+
fontSize: 11, color: 'var(--amber)', fontWeight: 500,
|
|
112
|
+
fontFamily: 'var(--font)', flex: 1,
|
|
113
|
+
},
|
|
114
|
+
bannerBtn: {
|
|
115
|
+
padding: '3px 10px',
|
|
116
|
+
background: 'var(--amber)', border: 'none',
|
|
117
|
+
borderRadius: 2, color: 'var(--bg-base)',
|
|
118
|
+
fontSize: 10, fontWeight: 700,
|
|
119
|
+
fontFamily: 'var(--font)', cursor: 'pointer',
|
|
120
|
+
},
|
|
121
|
+
bannerDismiss: {
|
|
122
|
+
padding: '3px 10px',
|
|
123
|
+
background: 'transparent', border: '1px solid var(--amber)',
|
|
124
|
+
borderRadius: 2, color: 'var(--amber)',
|
|
125
|
+
fontSize: 10, fontWeight: 500,
|
|
126
|
+
fontFamily: 'var(--font)', cursor: 'pointer',
|
|
127
|
+
},
|
|
128
|
+
emptyState: {
|
|
129
|
+
flex: 1, display: 'flex', flexDirection: 'column',
|
|
130
|
+
alignItems: 'center', justifyContent: 'center',
|
|
131
|
+
gap: 8,
|
|
132
|
+
},
|
|
133
|
+
emptyIcon: {
|
|
134
|
+
fontSize: 28, color: 'var(--text-muted)', opacity: 0.5,
|
|
135
|
+
},
|
|
136
|
+
emptyText: {
|
|
137
|
+
fontSize: 13, color: 'var(--text-dim)', fontWeight: 500,
|
|
138
|
+
},
|
|
139
|
+
emptyHint: {
|
|
140
|
+
fontSize: 10, color: 'var(--text-muted)',
|
|
141
|
+
},
|
|
142
|
+
};
|
|
@@ -89,10 +89,55 @@ function sortSkills(skills, sortBy) {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
// ── Interactive Star Rating ──────────────────────────────────────────
|
|
93
|
+
function StarRating({ current, onRate, disabled }) {
|
|
94
|
+
const [hover, setHover] = useState(0);
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<div style={{ display: 'flex', gap: 2, alignItems: 'center' }}>
|
|
98
|
+
{[1, 2, 3, 4, 5].map((star) => {
|
|
99
|
+
const filled = hover > 0 ? star <= hover : star <= (current || 0);
|
|
100
|
+
return (
|
|
101
|
+
<span
|
|
102
|
+
key={star}
|
|
103
|
+
onClick={() => !disabled && onRate(star)}
|
|
104
|
+
onMouseEnter={() => !disabled && setHover(star)}
|
|
105
|
+
onMouseLeave={() => setHover(0)}
|
|
106
|
+
style={{
|
|
107
|
+
fontSize: 18,
|
|
108
|
+
cursor: disabled ? 'default' : 'pointer',
|
|
109
|
+
color: filled ? 'var(--amber)' : 'var(--bg-active)',
|
|
110
|
+
transition: 'color 0.1s, transform 0.1s',
|
|
111
|
+
transform: hover === star ? 'scale(1.2)' : 'none',
|
|
112
|
+
userSelect: 'none',
|
|
113
|
+
}}
|
|
114
|
+
>
|
|
115
|
+
{'\u2605'}
|
|
116
|
+
</span>
|
|
117
|
+
);
|
|
118
|
+
})}
|
|
119
|
+
</div>
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
92
123
|
// ── Skill Detail Modal ──────────────────────────────────────────────
|
|
93
|
-
function SkillDetailModal({ skill, content, installing, onInstall, onUninstall, onClose }) {
|
|
124
|
+
function SkillDetailModal({ skill, content, installing, onInstall, onUninstall, onRate, onClose }) {
|
|
125
|
+
const [userRating, setUserRating] = useState(0);
|
|
126
|
+
const [ratingSubmitted, setRatingSubmitted] = useState(false);
|
|
127
|
+
const [submittingRating, setSubmittingRating] = useState(false);
|
|
128
|
+
|
|
94
129
|
if (!skill) return null;
|
|
95
130
|
|
|
131
|
+
async function handleRate(stars) {
|
|
132
|
+
setSubmittingRating(true);
|
|
133
|
+
try {
|
|
134
|
+
await onRate(skill.id, stars);
|
|
135
|
+
setUserRating(stars);
|
|
136
|
+
setRatingSubmitted(true);
|
|
137
|
+
} catch { /* ignore */ }
|
|
138
|
+
setSubmittingRating(false);
|
|
139
|
+
}
|
|
140
|
+
|
|
96
141
|
return (
|
|
97
142
|
<div style={modal.overlay} onClick={onClose}>
|
|
98
143
|
<div style={modal.container} onClick={(e) => e.stopPropagation()}>
|
|
@@ -162,6 +207,31 @@ function SkillDetailModal({ skill, content, installing, onInstall, onUninstall,
|
|
|
162
207
|
{skill.price === 0 && !skill.installed && <span style={modal.freeLabel}>Free</span>}
|
|
163
208
|
</div>
|
|
164
209
|
|
|
210
|
+
{/* Rating */}
|
|
211
|
+
<div style={modal.section}>
|
|
212
|
+
<div style={modal.sectionTitle}>Rating</div>
|
|
213
|
+
<div style={modal.ratingRow}>
|
|
214
|
+
<div style={modal.ratingLeft}>
|
|
215
|
+
<div style={modal.ratingBig}>{skill.rating || '-'}</div>
|
|
216
|
+
<div style={{ color: 'var(--amber)', fontSize: 13 }}>{renderStars(skill.rating)}</div>
|
|
217
|
+
<div style={modal.ratingCount}>{skill.ratingCount || 0} ratings</div>
|
|
218
|
+
</div>
|
|
219
|
+
<div style={modal.ratingRight}>
|
|
220
|
+
<div style={modal.rateLabel}>
|
|
221
|
+
{ratingSubmitted ? 'Thanks for rating!' : 'Rate this skill'}
|
|
222
|
+
</div>
|
|
223
|
+
<StarRating
|
|
224
|
+
current={userRating}
|
|
225
|
+
onRate={handleRate}
|
|
226
|
+
disabled={submittingRating || ratingSubmitted}
|
|
227
|
+
/>
|
|
228
|
+
{submittingRating && (
|
|
229
|
+
<div style={{ fontSize: 10, color: 'var(--text-muted)', marginTop: 4 }}>Submitting...</div>
|
|
230
|
+
)}
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
165
235
|
{/* Description */}
|
|
166
236
|
<div style={modal.section}>
|
|
167
237
|
<div style={modal.sectionTitle}>About</div>
|
|
@@ -413,6 +483,23 @@ export default function SkillsMarketplace() {
|
|
|
413
483
|
setInstalling(null);
|
|
414
484
|
}
|
|
415
485
|
|
|
486
|
+
async function handleRate(id, rating) {
|
|
487
|
+
const res = await fetch(`/api/skills/${id}/rate`, {
|
|
488
|
+
method: 'POST',
|
|
489
|
+
headers: { 'Content-Type': 'application/json' },
|
|
490
|
+
body: JSON.stringify({ rating }),
|
|
491
|
+
});
|
|
492
|
+
if (!res.ok) throw new Error('Rating failed');
|
|
493
|
+
const data = await res.json();
|
|
494
|
+
// Update the skill in local state with new rating
|
|
495
|
+
setSkills((prev) => prev.map((s) =>
|
|
496
|
+
s.id === id ? { ...s, rating: data.rating, ratingCount: data.rating_count ?? data.ratingCount } : s
|
|
497
|
+
));
|
|
498
|
+
if (selectedSkill?.id === id) {
|
|
499
|
+
setSelectedSkill((prev) => prev ? { ...prev, rating: data.rating, ratingCount: data.rating_count ?? data.ratingCount } : null);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
416
503
|
async function handleSelect(skill) {
|
|
417
504
|
setSelectedSkill(skill);
|
|
418
505
|
setSkillContent(null);
|
|
@@ -561,6 +648,7 @@ export default function SkillsMarketplace() {
|
|
|
561
648
|
installing={installing}
|
|
562
649
|
onInstall={handleInstall}
|
|
563
650
|
onUninstall={handleUninstall}
|
|
651
|
+
onRate={handleRate}
|
|
564
652
|
onClose={() => { setSelectedSkill(null); setSkillContent(null); }}
|
|
565
653
|
/>
|
|
566
654
|
</div>
|
|
@@ -876,6 +964,29 @@ const modal = {
|
|
|
876
964
|
section: {
|
|
877
965
|
marginBottom: 16,
|
|
878
966
|
},
|
|
967
|
+
ratingRow: {
|
|
968
|
+
display: 'flex', gap: 20, alignItems: 'center',
|
|
969
|
+
padding: '12px 14px',
|
|
970
|
+
background: 'var(--bg-surface)', border: '1px solid var(--border)',
|
|
971
|
+
borderRadius: 6,
|
|
972
|
+
},
|
|
973
|
+
ratingLeft: {
|
|
974
|
+
display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 2,
|
|
975
|
+
minWidth: 70,
|
|
976
|
+
},
|
|
977
|
+
ratingBig: {
|
|
978
|
+
fontSize: 24, fontWeight: 700, color: 'var(--text-bright)',
|
|
979
|
+
lineHeight: 1,
|
|
980
|
+
},
|
|
981
|
+
ratingCount: {
|
|
982
|
+
fontSize: 9, color: 'var(--text-muted)', marginTop: 2,
|
|
983
|
+
},
|
|
984
|
+
ratingRight: {
|
|
985
|
+
flex: 1,
|
|
986
|
+
},
|
|
987
|
+
rateLabel: {
|
|
988
|
+
fontSize: 11, color: 'var(--text-dim)', marginBottom: 6,
|
|
989
|
+
},
|
|
879
990
|
sectionTitle: {
|
|
880
991
|
fontSize: 10, fontWeight: 600, color: 'var(--text-muted)',
|
|
881
992
|
textTransform: 'uppercase', letterSpacing: 0.8, marginBottom: 8,
|