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.
Files changed (334) hide show
  1. package/docs/FILE-EDITOR-PLAN.md +253 -0
  2. package/node_modules/@codemirror/autocomplete/.github/workflows/dispatch.yml +16 -0
  3. package/node_modules/@codemirror/autocomplete/CHANGELOG.md +639 -0
  4. package/node_modules/@codemirror/autocomplete/LICENSE +21 -0
  5. package/node_modules/@codemirror/autocomplete/README.md +43 -0
  6. package/node_modules/@codemirror/autocomplete/dist/index.cjs +2151 -0
  7. package/node_modules/@codemirror/autocomplete/dist/index.d.cts +648 -0
  8. package/node_modules/@codemirror/autocomplete/dist/index.d.ts +648 -0
  9. package/node_modules/@codemirror/autocomplete/dist/index.js +2120 -0
  10. package/node_modules/@codemirror/autocomplete/package.json +41 -0
  11. package/node_modules/@codemirror/commands/.github/workflows/dispatch.yml +16 -0
  12. package/node_modules/@codemirror/commands/CHANGELOG.md +386 -0
  13. package/node_modules/@codemirror/commands/LICENSE +21 -0
  14. package/node_modules/@codemirror/commands/README.md +35 -0
  15. package/node_modules/@codemirror/commands/dist/index.cjs +1909 -0
  16. package/node_modules/@codemirror/commands/dist/index.d.cts +650 -0
  17. package/node_modules/@codemirror/commands/dist/index.d.ts +650 -0
  18. package/node_modules/@codemirror/commands/dist/index.js +1795 -0
  19. package/node_modules/@codemirror/commands/package.json +42 -0
  20. package/node_modules/@codemirror/lang-css/.github/workflows/dispatch.yml +16 -0
  21. package/node_modules/@codemirror/lang-css/CHANGELOG.md +106 -0
  22. package/node_modules/@codemirror/lang-css/LICENSE +21 -0
  23. package/node_modules/@codemirror/lang-css/README.md +50 -0
  24. package/node_modules/@codemirror/lang-css/dist/index.cjs +269 -0
  25. package/node_modules/@codemirror/lang-css/dist/index.d.cts +28 -0
  26. package/node_modules/@codemirror/lang-css/dist/index.d.ts +28 -0
  27. package/node_modules/@codemirror/lang-css/dist/index.js +264 -0
  28. package/node_modules/@codemirror/lang-css/package.json +42 -0
  29. package/node_modules/@codemirror/lang-html/.github/workflows/dispatch.yml +16 -0
  30. package/node_modules/@codemirror/lang-html/CHANGELOG.md +210 -0
  31. package/node_modules/@codemirror/lang-html/LICENSE +21 -0
  32. package/node_modules/@codemirror/lang-html/README.md +147 -0
  33. package/node_modules/@codemirror/lang-html/dist/index.cjs +667 -0
  34. package/node_modules/@codemirror/lang-html/dist/index.d.cts +115 -0
  35. package/node_modules/@codemirror/lang-html/dist/index.d.ts +115 -0
  36. package/node_modules/@codemirror/lang-html/dist/index.js +661 -0
  37. package/node_modules/@codemirror/lang-html/package.json +46 -0
  38. package/node_modules/@codemirror/lang-javascript/.github/workflows/dispatch.yml +16 -0
  39. package/node_modules/@codemirror/lang-javascript/CHANGELOG.md +206 -0
  40. package/node_modules/@codemirror/lang-javascript/LICENSE +21 -0
  41. package/node_modules/@codemirror/lang-javascript/README.md +125 -0
  42. package/node_modules/@codemirror/lang-javascript/dist/index.cjs +526 -0
  43. package/node_modules/@codemirror/lang-javascript/dist/index.d.cts +93 -0
  44. package/node_modules/@codemirror/lang-javascript/dist/index.d.ts +93 -0
  45. package/node_modules/@codemirror/lang-javascript/dist/index.js +513 -0
  46. package/node_modules/@codemirror/lang-javascript/package.json +45 -0
  47. package/node_modules/@codemirror/lang-json/.github/workflows/dispatch.yml +16 -0
  48. package/node_modules/@codemirror/lang-json/CHANGELOG.md +59 -0
  49. package/node_modules/@codemirror/lang-json/LICENSE +21 -0
  50. package/node_modules/@codemirror/lang-json/README.md +56 -0
  51. package/node_modules/@codemirror/lang-json/dist/index.cjs +68 -0
  52. package/node_modules/@codemirror/lang-json/dist/index.d.cts +22 -0
  53. package/node_modules/@codemirror/lang-json/dist/index.d.ts +22 -0
  54. package/node_modules/@codemirror/lang-json/dist/index.js +64 -0
  55. package/node_modules/@codemirror/lang-json/package.json +39 -0
  56. package/node_modules/@codemirror/lang-markdown/.github/workflows/dispatch.yml +16 -0
  57. package/node_modules/@codemirror/lang-markdown/CHANGELOG.md +246 -0
  58. package/node_modules/@codemirror/lang-markdown/LICENSE +21 -0
  59. package/node_modules/@codemirror/lang-markdown/README.md +162 -0
  60. package/node_modules/@codemirror/lang-markdown/dist/index.cjs +501 -0
  61. package/node_modules/@codemirror/lang-markdown/dist/index.d.cts +124 -0
  62. package/node_modules/@codemirror/lang-markdown/dist/index.d.ts +124 -0
  63. package/node_modules/@codemirror/lang-markdown/dist/index.js +492 -0
  64. package/node_modules/@codemirror/lang-markdown/package.json +44 -0
  65. package/node_modules/@codemirror/lang-python/.github/workflows/dispatch.yml +16 -0
  66. package/node_modules/@codemirror/lang-python/CHANGELOG.md +174 -0
  67. package/node_modules/@codemirror/lang-python/LICENSE +21 -0
  68. package/node_modules/@codemirror/lang-python/README.md +61 -0
  69. package/node_modules/@codemirror/lang-python/dist/index.cjs +313 -0
  70. package/node_modules/@codemirror/lang-python/dist/index.d.cts +26 -0
  71. package/node_modules/@codemirror/lang-python/dist/index.d.ts +26 -0
  72. package/node_modules/@codemirror/lang-python/dist/index.js +308 -0
  73. package/node_modules/@codemirror/lang-python/package.json +42 -0
  74. package/node_modules/@codemirror/language/.github/workflows/dispatch.yml +16 -0
  75. package/node_modules/@codemirror/language/CHANGELOG.md +412 -0
  76. package/node_modules/@codemirror/language/LICENSE +21 -0
  77. package/node_modules/@codemirror/language/README.md +66 -0
  78. package/node_modules/@codemirror/language/dist/index.cjs +2742 -0
  79. package/node_modules/@codemirror/language/dist/index.d.cts +1220 -0
  80. package/node_modules/@codemirror/language/dist/index.d.ts +1220 -0
  81. package/node_modules/@codemirror/language/dist/index.js +2687 -0
  82. package/node_modules/@codemirror/language/package.json +44 -0
  83. package/node_modules/@codemirror/lint/.github/workflows/dispatch.yml +16 -0
  84. package/node_modules/@codemirror/lint/CHANGELOG.md +318 -0
  85. package/node_modules/@codemirror/lint/LICENSE +21 -0
  86. package/node_modules/@codemirror/lint/README.md +18 -0
  87. package/node_modules/@codemirror/lint/dist/index.cjs +958 -0
  88. package/node_modules/@codemirror/lint/dist/index.d.cts +195 -0
  89. package/node_modules/@codemirror/lint/dist/index.d.ts +195 -0
  90. package/node_modules/@codemirror/lint/dist/index.js +945 -0
  91. package/node_modules/@codemirror/lint/package.json +40 -0
  92. package/node_modules/@codemirror/search/.github/workflows/dispatch.yml +16 -0
  93. package/node_modules/@codemirror/search/CHANGELOG.md +324 -0
  94. package/node_modules/@codemirror/search/LICENSE +21 -0
  95. package/node_modules/@codemirror/search/README.md +18 -0
  96. package/node_modules/@codemirror/search/dist/index.cjs +1237 -0
  97. package/node_modules/@codemirror/search/dist/index.d.cts +385 -0
  98. package/node_modules/@codemirror/search/dist/index.d.ts +385 -0
  99. package/node_modules/@codemirror/search/dist/index.js +1217 -0
  100. package/node_modules/@codemirror/search/package.json +40 -0
  101. package/node_modules/@codemirror/state/.github/workflows/dispatch.yml +16 -0
  102. package/node_modules/@codemirror/state/CHANGELOG.md +308 -0
  103. package/node_modules/@codemirror/state/LICENSE +21 -0
  104. package/node_modules/@codemirror/state/README.md +18 -0
  105. package/node_modules/@codemirror/state/dist/index.cjs +3922 -0
  106. package/node_modules/@codemirror/state/dist/index.d.cts +1713 -0
  107. package/node_modules/@codemirror/state/dist/index.d.ts +1713 -0
  108. package/node_modules/@codemirror/state/dist/index.js +3892 -0
  109. package/node_modules/@codemirror/state/package.json +38 -0
  110. package/node_modules/@codemirror/theme-one-dark/.github/workflows/dispatch.yml +16 -0
  111. package/node_modules/@codemirror/theme-one-dark/CHANGELOG.md +97 -0
  112. package/node_modules/@codemirror/theme-one-dark/LICENSE +21 -0
  113. package/node_modules/@codemirror/theme-one-dark/README.md +46 -0
  114. package/node_modules/@codemirror/theme-one-dark/dist/index.cjs +139 -0
  115. package/node_modules/@codemirror/theme-one-dark/dist/index.d.cts +39 -0
  116. package/node_modules/@codemirror/theme-one-dark/dist/index.d.ts +39 -0
  117. package/node_modules/@codemirror/theme-one-dark/dist/index.js +134 -0
  118. package/node_modules/@codemirror/theme-one-dark/package.json +41 -0
  119. package/node_modules/@codemirror/view/.github/workflows/dispatch.yml +16 -0
  120. package/node_modules/@codemirror/view/CHANGELOG.md +2284 -0
  121. package/node_modules/@codemirror/view/LICENSE +21 -0
  122. package/node_modules/@codemirror/view/README.md +37 -0
  123. package/node_modules/@codemirror/view/dist/index.cjs +11796 -0
  124. package/node_modules/@codemirror/view/dist/index.d.cts +2389 -0
  125. package/node_modules/@codemirror/view/dist/index.d.ts +2389 -0
  126. package/node_modules/@codemirror/view/dist/index.js +11745 -0
  127. package/node_modules/@codemirror/view/package.json +41 -0
  128. package/node_modules/@groove-dev/daemon/src/api.js +157 -2
  129. package/node_modules/@groove-dev/daemon/src/filewatcher.js +59 -0
  130. package/node_modules/@groove-dev/daemon/src/index.js +28 -1
  131. package/node_modules/@groove-dev/daemon/src/skills.js +20 -0
  132. package/node_modules/@groove-dev/gui/dist/assets/index-Dxg9hdf3.js +103 -0
  133. package/node_modules/@groove-dev/gui/dist/index.html +1 -1
  134. package/node_modules/@groove-dev/gui/package.json +15 -2
  135. package/node_modules/@groove-dev/gui/src/App.jsx +3 -0
  136. package/node_modules/@groove-dev/gui/src/components/CodeEditor.jsx +143 -0
  137. package/node_modules/@groove-dev/gui/src/components/EditorTabs.jsx +83 -0
  138. package/node_modules/@groove-dev/gui/src/components/FileTree.jsx +193 -0
  139. package/node_modules/@groove-dev/gui/src/stores/groove.js +158 -1
  140. package/node_modules/@groove-dev/gui/src/views/FileEditor.jsx +142 -0
  141. package/node_modules/@groove-dev/gui/src/views/SkillsMarketplace.jsx +112 -1
  142. package/node_modules/@lezer/common/LICENSE +21 -0
  143. package/node_modules/@lezer/common/README.md +14 -0
  144. package/node_modules/@lezer/common/dist/index.cjs +2209 -0
  145. package/node_modules/@lezer/common/dist/index.d.cts +1174 -0
  146. package/node_modules/@lezer/common/dist/index.d.ts +1174 -0
  147. package/node_modules/@lezer/common/dist/index.js +2196 -0
  148. package/node_modules/@lezer/common/package.json +32 -0
  149. package/node_modules/@lezer/css/CHANGELOG.md +307 -0
  150. package/node_modules/@lezer/css/LICENSE +21 -0
  151. package/node_modules/@lezer/css/README.md +6 -0
  152. package/node_modules/@lezer/css/dist/index.cjs +151 -0
  153. package/node_modules/@lezer/css/dist/index.d.cts +3 -0
  154. package/node_modules/@lezer/css/dist/index.d.ts +3 -0
  155. package/node_modules/@lezer/css/dist/index.js +147 -0
  156. package/node_modules/@lezer/css/package.json +36 -0
  157. package/node_modules/@lezer/css/rollup.config.js +16 -0
  158. package/node_modules/@lezer/css/src/css.grammar +290 -0
  159. package/node_modules/@lezer/css/src/highlight.js +36 -0
  160. package/node_modules/@lezer/css/src/parser.js +31 -0
  161. package/node_modules/@lezer/css/src/parser.terms.js +63 -0
  162. package/node_modules/@lezer/css/src/tokens.js +75 -0
  163. package/node_modules/@lezer/css/test/declarations.txt +241 -0
  164. package/node_modules/@lezer/css/test/selector.txt +178 -0
  165. package/node_modules/@lezer/css/test/statements.txt +227 -0
  166. package/node_modules/@lezer/css/test/test-css.js +16 -0
  167. package/node_modules/@lezer/highlight/LICENSE +21 -0
  168. package/node_modules/@lezer/highlight/README.md +14 -0
  169. package/node_modules/@lezer/highlight/dist/index.cjs +936 -0
  170. package/node_modules/@lezer/highlight/dist/index.d.cts +623 -0
  171. package/node_modules/@lezer/highlight/dist/index.d.ts +623 -0
  172. package/node_modules/@lezer/highlight/dist/index.js +927 -0
  173. package/node_modules/@lezer/highlight/package.json +31 -0
  174. package/node_modules/@lezer/html/CHANGELOG.md +303 -0
  175. package/node_modules/@lezer/html/LICENSE +21 -0
  176. package/node_modules/@lezer/html/README.md +37 -0
  177. package/node_modules/@lezer/html/dist/index.cjs +354 -0
  178. package/node_modules/@lezer/html/dist/index.d.cts +14 -0
  179. package/node_modules/@lezer/html/dist/index.d.ts +14 -0
  180. package/node_modules/@lezer/html/dist/index.js +349 -0
  181. package/node_modules/@lezer/html/package.json +37 -0
  182. package/node_modules/@lezer/html/rollup.config.js +16 -0
  183. package/node_modules/@lezer/html/src/.tern-port +1 -0
  184. package/node_modules/@lezer/html/src/content.js +87 -0
  185. package/node_modules/@lezer/html/src/highlight.js +15 -0
  186. package/node_modules/@lezer/html/src/html.grammar +181 -0
  187. package/node_modules/@lezer/html/src/index.js +2 -0
  188. package/node_modules/@lezer/html/src/parser.js +27 -0
  189. package/node_modules/@lezer/html/src/parser.terms.js +53 -0
  190. package/node_modules/@lezer/html/src/tokens.js +199 -0
  191. package/node_modules/@lezer/html/test/mixed.txt +69 -0
  192. package/node_modules/@lezer/html/test/tags.txt +370 -0
  193. package/node_modules/@lezer/html/test/test-html.js +29 -0
  194. package/node_modules/@lezer/html/test/test-incremental.js +97 -0
  195. package/node_modules/@lezer/html/test/vue.txt +56 -0
  196. package/node_modules/@lezer/javascript/CHANGELOG.md +485 -0
  197. package/node_modules/@lezer/javascript/LICENSE +21 -0
  198. package/node_modules/@lezer/javascript/README.md +14 -0
  199. package/node_modules/@lezer/javascript/dist/index.cjs +196 -0
  200. package/node_modules/@lezer/javascript/dist/index.d.cts +3 -0
  201. package/node_modules/@lezer/javascript/dist/index.d.ts +3 -0
  202. package/node_modules/@lezer/javascript/dist/index.js +192 -0
  203. package/node_modules/@lezer/javascript/package.json +36 -0
  204. package/node_modules/@lezer/javascript/rollup.config.js +16 -0
  205. package/node_modules/@lezer/javascript/src/highlight.js +62 -0
  206. package/node_modules/@lezer/javascript/src/javascript.grammar +735 -0
  207. package/node_modules/@lezer/javascript/src/parser.js +33 -0
  208. package/node_modules/@lezer/javascript/src/parser.terms.js +177 -0
  209. package/node_modules/@lezer/javascript/src/tokens.js +87 -0
  210. package/node_modules/@lezer/javascript/test/decorator.txt +64 -0
  211. package/node_modules/@lezer/javascript/test/expression.txt +686 -0
  212. package/node_modules/@lezer/javascript/test/jsx.txt +79 -0
  213. package/node_modules/@lezer/javascript/test/semicolon.txt +77 -0
  214. package/node_modules/@lezer/javascript/test/statement.txt +404 -0
  215. package/node_modules/@lezer/javascript/test/test-javascript.js +17 -0
  216. package/node_modules/@lezer/javascript/test/typescript.txt +401 -0
  217. package/node_modules/@lezer/json/CHANGELOG.md +79 -0
  218. package/node_modules/@lezer/json/LICENSE +21 -0
  219. package/node_modules/@lezer/json/README.md +7 -0
  220. package/node_modules/@lezer/json/dist/index.cjs +41 -0
  221. package/node_modules/@lezer/json/dist/index.d.cts +3 -0
  222. package/node_modules/@lezer/json/dist/index.d.ts +3 -0
  223. package/node_modules/@lezer/json/dist/index.js +37 -0
  224. package/node_modules/@lezer/json/package.json +36 -0
  225. package/node_modules/@lezer/json/rollup.config.js +15 -0
  226. package/node_modules/@lezer/json/src/highlight.js +12 -0
  227. package/node_modules/@lezer/json/src/json.grammar +38 -0
  228. package/node_modules/@lezer/json/src/parser.js +23 -0
  229. package/node_modules/@lezer/json/src/parser.terms.js +12 -0
  230. package/node_modules/@lezer/json/test/arrays.txt +34 -0
  231. package/node_modules/@lezer/json/test/literals.txt +23 -0
  232. package/node_modules/@lezer/json/test/numbers.txt +87 -0
  233. package/node_modules/@lezer/json/test/objects.txt +34 -0
  234. package/node_modules/@lezer/json/test/strings.txt +50 -0
  235. package/node_modules/@lezer/json/test/test-json.js +17 -0
  236. package/node_modules/@lezer/lr/LICENSE +21 -0
  237. package/node_modules/@lezer/lr/README.md +25 -0
  238. package/node_modules/@lezer/lr/dist/constants.d.ts +45 -0
  239. package/node_modules/@lezer/lr/dist/constants.js +5 -0
  240. package/node_modules/@lezer/lr/dist/index.cjs +1891 -0
  241. package/node_modules/@lezer/lr/dist/index.d.cts +303 -0
  242. package/node_modules/@lezer/lr/dist/index.d.ts +303 -0
  243. package/node_modules/@lezer/lr/dist/index.js +1884 -0
  244. package/node_modules/@lezer/lr/package.json +32 -0
  245. package/node_modules/@lezer/markdown/CHANGELOG.md +279 -0
  246. package/node_modules/@lezer/markdown/LICENSE +21 -0
  247. package/node_modules/@lezer/markdown/README.md +725 -0
  248. package/node_modules/@lezer/markdown/bin/build-readme.cjs +39 -0
  249. package/node_modules/@lezer/markdown/build.js +16 -0
  250. package/node_modules/@lezer/markdown/dist/index.cjs +2352 -0
  251. package/node_modules/@lezer/markdown/dist/index.d.cts +600 -0
  252. package/node_modules/@lezer/markdown/dist/index.d.ts +600 -0
  253. package/node_modules/@lezer/markdown/dist/index.js +2335 -0
  254. package/node_modules/@lezer/markdown/package.json +37 -0
  255. package/node_modules/@lezer/markdown/src/README.md +83 -0
  256. package/node_modules/@lezer/markdown/src/extension.ts +301 -0
  257. package/node_modules/@lezer/markdown/src/index.ts +5 -0
  258. package/node_modules/@lezer/markdown/src/markdown.ts +1961 -0
  259. package/node_modules/@lezer/markdown/src/nest.ts +46 -0
  260. package/node_modules/@lezer/markdown/test/compare-tree.ts +14 -0
  261. package/node_modules/@lezer/markdown/test/spec.ts +79 -0
  262. package/node_modules/@lezer/markdown/test/test-extension.ts +269 -0
  263. package/node_modules/@lezer/markdown/test/test-incremental.ts +265 -0
  264. package/node_modules/@lezer/markdown/test/test-markdown.ts +3574 -0
  265. package/node_modules/@lezer/markdown/test/test-nesting.ts +86 -0
  266. package/node_modules/@lezer/markdown/test/tsconfig.json +12 -0
  267. package/node_modules/@lezer/markdown/tsconfig.json +14 -0
  268. package/node_modules/@lezer/python/CHANGELOG.md +243 -0
  269. package/node_modules/@lezer/python/LICENSE +21 -0
  270. package/node_modules/@lezer/python/README.md +6 -0
  271. package/node_modules/@lezer/python/dist/index.cjs +330 -0
  272. package/node_modules/@lezer/python/dist/index.d.cts +3 -0
  273. package/node_modules/@lezer/python/dist/index.d.ts +3 -0
  274. package/node_modules/@lezer/python/dist/index.js +326 -0
  275. package/node_modules/@lezer/python/package.json +36 -0
  276. package/node_modules/@lezer/python/rollup.config.js +16 -0
  277. package/node_modules/@lezer/python/src/highlight.js +35 -0
  278. package/node_modules/@lezer/python/src/python.grammar +381 -0
  279. package/node_modules/@lezer/python/src/tokens.js +224 -0
  280. package/node_modules/@lezer/python/test/expression.txt +231 -0
  281. package/node_modules/@lezer/python/test/statement.txt +442 -0
  282. package/node_modules/@lezer/python/test/test-incremental.js +33 -0
  283. package/node_modules/@lezer/python/test/test-python.js +17 -0
  284. package/node_modules/@marijn/find-cluster-break/LICENSE +21 -0
  285. package/node_modules/@marijn/find-cluster-break/README.md +28 -0
  286. package/node_modules/@marijn/find-cluster-break/dist/index.cjs +85 -0
  287. package/node_modules/@marijn/find-cluster-break/dist/index.d.cts +15 -0
  288. package/node_modules/@marijn/find-cluster-break/package.json +35 -0
  289. package/node_modules/@marijn/find-cluster-break/rollup.config.js +7 -0
  290. package/node_modules/@marijn/find-cluster-break/src/index.d.ts +15 -0
  291. package/node_modules/@marijn/find-cluster-break/src/index.js +87 -0
  292. package/node_modules/@marijn/find-cluster-break/test/test-cluster.js +30 -0
  293. package/node_modules/crelt/LICENSE +19 -0
  294. package/node_modules/crelt/README.md +23 -0
  295. package/node_modules/crelt/dist/index.cjs +31 -0
  296. package/node_modules/crelt/dist/index.d.cts +4 -0
  297. package/node_modules/crelt/index.d.ts +4 -0
  298. package/node_modules/crelt/index.js +28 -0
  299. package/node_modules/crelt/package.json +35 -0
  300. package/node_modules/crelt/rollup.config.js +13 -0
  301. package/node_modules/style-mod/LICENSE +19 -0
  302. package/node_modules/style-mod/README.md +98 -0
  303. package/node_modules/style-mod/dist/style-mod.cjs +165 -0
  304. package/node_modules/style-mod/dist/style-mod.d.cts +16 -0
  305. package/node_modules/style-mod/package.json +39 -0
  306. package/node_modules/style-mod/src/README.md +34 -0
  307. package/node_modules/style-mod/src/style-mod.d.ts +16 -0
  308. package/node_modules/style-mod/src/style-mod.js +172 -0
  309. package/node_modules/style-mod/test/test-style-mod.js +104 -0
  310. package/node_modules/w3c-keyname/.tern-port +1 -0
  311. package/node_modules/w3c-keyname/LICENSE +19 -0
  312. package/node_modules/w3c-keyname/README.md +18 -0
  313. package/node_modules/w3c-keyname/index.cjs +127 -0
  314. package/node_modules/w3c-keyname/index.d.cts +5 -0
  315. package/node_modules/w3c-keyname/index.d.ts +5 -0
  316. package/node_modules/w3c-keyname/index.js +119 -0
  317. package/node_modules/w3c-keyname/package.json +37 -0
  318. package/package.json +1 -1
  319. package/packages/daemon/src/api.js +157 -2
  320. package/packages/daemon/src/filewatcher.js +59 -0
  321. package/packages/daemon/src/index.js +28 -1
  322. package/packages/daemon/src/skills.js +20 -0
  323. package/packages/gui/dist/assets/index-Dxg9hdf3.js +103 -0
  324. package/packages/gui/dist/index.html +1 -1
  325. package/packages/gui/package.json +15 -2
  326. package/packages/gui/src/App.jsx +3 -0
  327. package/packages/gui/src/components/CodeEditor.jsx +143 -0
  328. package/packages/gui/src/components/EditorTabs.jsx +83 -0
  329. package/packages/gui/src/components/FileTree.jsx +193 -0
  330. package/packages/gui/src/stores/groove.js +158 -1
  331. package/packages/gui/src/views/FileEditor.jsx +142 -0
  332. package/packages/gui/src/views/SkillsMarketplace.jsx +112 -1
  333. package/node_modules/@groove-dev/gui/dist/assets/index-CNCSwHwH.js +0 -74
  334. package/packages/gui/dist/assets/index-CNCSwHwH.js +0 -74
@@ -0,0 +1,667 @@
1
+ 'use strict';
2
+
3
+ var html$1 = require('@lezer/html');
4
+ var langCss = require('@codemirror/lang-css');
5
+ var langJavascript = require('@codemirror/lang-javascript');
6
+ var view = require('@codemirror/view');
7
+ var state = require('@codemirror/state');
8
+ var language = require('@codemirror/language');
9
+
10
+ const Targets = ["_blank", "_self", "_top", "_parent"];
11
+ const Charsets = ["ascii", "utf-8", "utf-16", "latin1", "latin1"];
12
+ const Methods = ["get", "post", "put", "delete"];
13
+ const Encs = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"];
14
+ const Bool = ["true", "false"];
15
+ const S = {}; // Empty tag spec
16
+ const Tags = {
17
+ a: {
18
+ attrs: {
19
+ href: null, ping: null, type: null,
20
+ media: null,
21
+ target: Targets,
22
+ hreflang: null
23
+ }
24
+ },
25
+ abbr: S,
26
+ address: S,
27
+ area: {
28
+ attrs: {
29
+ alt: null, coords: null, href: null, target: null, ping: null,
30
+ media: null, hreflang: null, type: null,
31
+ shape: ["default", "rect", "circle", "poly"]
32
+ }
33
+ },
34
+ article: S,
35
+ aside: S,
36
+ audio: {
37
+ attrs: {
38
+ src: null, mediagroup: null,
39
+ crossorigin: ["anonymous", "use-credentials"],
40
+ preload: ["none", "metadata", "auto"],
41
+ autoplay: ["autoplay"],
42
+ loop: ["loop"],
43
+ controls: ["controls"]
44
+ }
45
+ },
46
+ b: S,
47
+ base: { attrs: { href: null, target: Targets } },
48
+ bdi: S,
49
+ bdo: S,
50
+ blockquote: { attrs: { cite: null } },
51
+ body: S,
52
+ br: S,
53
+ button: {
54
+ attrs: {
55
+ form: null, formaction: null, name: null, value: null,
56
+ autofocus: ["autofocus"],
57
+ disabled: ["autofocus"],
58
+ formenctype: Encs,
59
+ formmethod: Methods,
60
+ formnovalidate: ["novalidate"],
61
+ formtarget: Targets,
62
+ type: ["submit", "reset", "button"]
63
+ }
64
+ },
65
+ canvas: { attrs: { width: null, height: null } },
66
+ caption: S,
67
+ center: S,
68
+ cite: S,
69
+ code: S,
70
+ col: { attrs: { span: null } },
71
+ colgroup: { attrs: { span: null } },
72
+ command: {
73
+ attrs: {
74
+ type: ["command", "checkbox", "radio"],
75
+ label: null, icon: null, radiogroup: null, command: null, title: null,
76
+ disabled: ["disabled"],
77
+ checked: ["checked"]
78
+ }
79
+ },
80
+ data: { attrs: { value: null } },
81
+ datagrid: { attrs: { disabled: ["disabled"], multiple: ["multiple"] } },
82
+ datalist: { attrs: { data: null } },
83
+ dd: S,
84
+ del: { attrs: { cite: null, datetime: null } },
85
+ details: { attrs: { open: ["open"] } },
86
+ dfn: S,
87
+ div: S,
88
+ dl: S,
89
+ dt: S,
90
+ em: S,
91
+ embed: { attrs: { src: null, type: null, width: null, height: null } },
92
+ eventsource: { attrs: { src: null } },
93
+ fieldset: { attrs: { disabled: ["disabled"], form: null, name: null } },
94
+ figcaption: S,
95
+ figure: S,
96
+ footer: S,
97
+ form: {
98
+ attrs: {
99
+ action: null, name: null,
100
+ "accept-charset": Charsets,
101
+ autocomplete: ["on", "off"],
102
+ enctype: Encs,
103
+ method: Methods,
104
+ novalidate: ["novalidate"],
105
+ target: Targets
106
+ }
107
+ },
108
+ h1: S, h2: S, h3: S, h4: S, h5: S, h6: S,
109
+ head: {
110
+ children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"]
111
+ },
112
+ header: S,
113
+ hgroup: S,
114
+ hr: S,
115
+ html: {
116
+ attrs: { manifest: null }
117
+ },
118
+ i: S,
119
+ iframe: {
120
+ attrs: {
121
+ src: null, srcdoc: null, name: null, width: null, height: null,
122
+ sandbox: ["allow-top-navigation", "allow-same-origin", "allow-forms", "allow-scripts"],
123
+ seamless: ["seamless"]
124
+ }
125
+ },
126
+ img: {
127
+ attrs: {
128
+ alt: null, src: null, ismap: null, usemap: null, width: null, height: null,
129
+ crossorigin: ["anonymous", "use-credentials"]
130
+ }
131
+ },
132
+ input: {
133
+ attrs: {
134
+ alt: null, dirname: null, form: null, formaction: null,
135
+ height: null, list: null, max: null, maxlength: null, min: null,
136
+ name: null, pattern: null, placeholder: null, size: null, src: null,
137
+ step: null, value: null, width: null,
138
+ accept: ["audio/*", "video/*", "image/*"],
139
+ autocomplete: ["on", "off"],
140
+ autofocus: ["autofocus"],
141
+ checked: ["checked"],
142
+ disabled: ["disabled"],
143
+ formenctype: Encs,
144
+ formmethod: Methods,
145
+ formnovalidate: ["novalidate"],
146
+ formtarget: Targets,
147
+ multiple: ["multiple"],
148
+ readonly: ["readonly"],
149
+ required: ["required"],
150
+ type: ["hidden", "text", "search", "tel", "url", "email", "password", "datetime", "date", "month",
151
+ "week", "time", "datetime-local", "number", "range", "color", "checkbox", "radio",
152
+ "file", "submit", "image", "reset", "button"]
153
+ }
154
+ },
155
+ ins: { attrs: { cite: null, datetime: null } },
156
+ kbd: S,
157
+ keygen: {
158
+ attrs: {
159
+ challenge: null, form: null, name: null,
160
+ autofocus: ["autofocus"],
161
+ disabled: ["disabled"],
162
+ keytype: ["RSA"]
163
+ }
164
+ },
165
+ label: { attrs: { for: null, form: null } },
166
+ legend: S,
167
+ li: { attrs: { value: null } },
168
+ link: {
169
+ attrs: {
170
+ href: null, type: null,
171
+ hreflang: null,
172
+ media: null,
173
+ sizes: ["all", "16x16", "16x16 32x32", "16x16 32x32 64x64"]
174
+ }
175
+ },
176
+ map: { attrs: { name: null } },
177
+ mark: S,
178
+ menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } },
179
+ meta: {
180
+ attrs: {
181
+ content: null,
182
+ charset: Charsets,
183
+ name: ["viewport", "application-name", "author", "description", "generator", "keywords"],
184
+ "http-equiv": ["content-language", "content-type", "default-style", "refresh"]
185
+ }
186
+ },
187
+ meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },
188
+ nav: S,
189
+ noscript: S,
190
+ object: {
191
+ attrs: {
192
+ data: null, type: null, name: null, usemap: null, form: null, width: null, height: null,
193
+ typemustmatch: ["typemustmatch"]
194
+ }
195
+ },
196
+ ol: { attrs: { reversed: ["reversed"], start: null, type: ["1", "a", "A", "i", "I"] },
197
+ children: ["li", "script", "template", "ul", "ol"] },
198
+ optgroup: { attrs: { disabled: ["disabled"], label: null } },
199
+ option: { attrs: { disabled: ["disabled"], label: null, selected: ["selected"], value: null } },
200
+ output: { attrs: { for: null, form: null, name: null } },
201
+ p: S,
202
+ param: { attrs: { name: null, value: null } },
203
+ pre: S,
204
+ progress: { attrs: { value: null, max: null } },
205
+ q: { attrs: { cite: null } },
206
+ rp: S,
207
+ rt: S,
208
+ ruby: S,
209
+ samp: S,
210
+ script: {
211
+ attrs: {
212
+ type: ["text/javascript"],
213
+ src: null,
214
+ async: ["async"],
215
+ defer: ["defer"],
216
+ charset: Charsets
217
+ }
218
+ },
219
+ section: S,
220
+ select: {
221
+ attrs: {
222
+ form: null, name: null, size: null,
223
+ autofocus: ["autofocus"],
224
+ disabled: ["disabled"],
225
+ multiple: ["multiple"]
226
+ }
227
+ },
228
+ slot: { attrs: { name: null } },
229
+ small: S,
230
+ source: { attrs: { src: null, type: null, media: null } },
231
+ span: S,
232
+ strong: S,
233
+ style: {
234
+ attrs: {
235
+ type: ["text/css"],
236
+ media: null,
237
+ scoped: null
238
+ }
239
+ },
240
+ sub: S,
241
+ summary: S,
242
+ sup: S,
243
+ table: S,
244
+ tbody: S,
245
+ td: { attrs: { colspan: null, rowspan: null, headers: null } },
246
+ template: S,
247
+ textarea: {
248
+ attrs: {
249
+ dirname: null, form: null, maxlength: null, name: null, placeholder: null,
250
+ rows: null, cols: null,
251
+ autofocus: ["autofocus"],
252
+ disabled: ["disabled"],
253
+ readonly: ["readonly"],
254
+ required: ["required"],
255
+ wrap: ["soft", "hard"]
256
+ }
257
+ },
258
+ tfoot: S,
259
+ th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } },
260
+ thead: S,
261
+ time: { attrs: { datetime: null } },
262
+ title: S,
263
+ tr: S,
264
+ track: {
265
+ attrs: {
266
+ src: null, label: null, default: null,
267
+ kind: ["subtitles", "captions", "descriptions", "chapters", "metadata"],
268
+ srclang: null
269
+ }
270
+ },
271
+ ul: { children: ["li", "script", "template", "ul", "ol"] },
272
+ var: S,
273
+ video: {
274
+ attrs: {
275
+ src: null, poster: null, width: null, height: null,
276
+ crossorigin: ["anonymous", "use-credentials"],
277
+ preload: ["auto", "metadata", "none"],
278
+ autoplay: ["autoplay"],
279
+ mediagroup: ["movie"],
280
+ muted: ["muted"],
281
+ controls: ["controls"]
282
+ }
283
+ },
284
+ wbr: S
285
+ };
286
+ const GlobalAttrs = {
287
+ accesskey: null,
288
+ class: null,
289
+ contenteditable: Bool,
290
+ contextmenu: null,
291
+ dir: ["ltr", "rtl", "auto"],
292
+ draggable: ["true", "false", "auto"],
293
+ dropzone: ["copy", "move", "link", "string:", "file:"],
294
+ hidden: ["hidden"],
295
+ id: null,
296
+ inert: ["inert"],
297
+ itemid: null,
298
+ itemprop: null,
299
+ itemref: null,
300
+ itemscope: ["itemscope"],
301
+ itemtype: null,
302
+ lang: ["ar", "bn", "de", "en-GB", "en-US", "es", "fr", "hi", "id", "ja", "pa", "pt", "ru", "tr", "zh"],
303
+ spellcheck: Bool,
304
+ autocorrect: Bool,
305
+ autocapitalize: Bool,
306
+ style: null,
307
+ tabindex: null,
308
+ title: null,
309
+ translate: ["yes", "no"],
310
+ rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"],
311
+ role: "alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),
312
+ "aria-activedescendant": null,
313
+ "aria-atomic": Bool,
314
+ "aria-autocomplete": ["inline", "list", "both", "none"],
315
+ "aria-busy": Bool,
316
+ "aria-checked": ["true", "false", "mixed", "undefined"],
317
+ "aria-controls": null,
318
+ "aria-describedby": null,
319
+ "aria-disabled": Bool,
320
+ "aria-dropeffect": null,
321
+ "aria-expanded": ["true", "false", "undefined"],
322
+ "aria-flowto": null,
323
+ "aria-grabbed": ["true", "false", "undefined"],
324
+ "aria-haspopup": Bool,
325
+ "aria-hidden": Bool,
326
+ "aria-invalid": ["true", "false", "grammar", "spelling"],
327
+ "aria-label": null,
328
+ "aria-labelledby": null,
329
+ "aria-level": null,
330
+ "aria-live": ["off", "polite", "assertive"],
331
+ "aria-multiline": Bool,
332
+ "aria-multiselectable": Bool,
333
+ "aria-owns": null,
334
+ "aria-posinset": null,
335
+ "aria-pressed": ["true", "false", "mixed", "undefined"],
336
+ "aria-readonly": Bool,
337
+ "aria-relevant": null,
338
+ "aria-required": Bool,
339
+ "aria-selected": ["true", "false", "undefined"],
340
+ "aria-setsize": null,
341
+ "aria-sort": ["ascending", "descending", "none", "other"],
342
+ "aria-valuemax": null,
343
+ "aria-valuemin": null,
344
+ "aria-valuenow": null,
345
+ "aria-valuetext": null
346
+ };
347
+ const eventAttributes = ("beforeunload copy cut dragstart dragover dragleave dragenter dragend " +
348
+ "drag paste focus blur change click load mousedown mouseenter mouseleave " +
349
+ "mouseup keydown keyup resize scroll unload").split(" ").map(n => "on" + n);
350
+ for (let a of eventAttributes)
351
+ GlobalAttrs[a] = null;
352
+ class Schema {
353
+ constructor(extraTags, extraAttrs) {
354
+ this.tags = { ...Tags, ...extraTags };
355
+ this.globalAttrs = { ...GlobalAttrs, ...extraAttrs };
356
+ this.allTags = Object.keys(this.tags);
357
+ this.globalAttrNames = Object.keys(this.globalAttrs);
358
+ }
359
+ }
360
+ Schema.default = new Schema;
361
+ function elementName(doc, tree, max = doc.length) {
362
+ if (!tree)
363
+ return "";
364
+ let tag = tree.firstChild;
365
+ let name = tag && tag.getChild("TagName");
366
+ return name ? doc.sliceString(name.from, Math.min(name.to, max)) : "";
367
+ }
368
+ function findParentElement(tree, skip = false) {
369
+ for (; tree; tree = tree.parent)
370
+ if (tree.name == "Element") {
371
+ if (skip)
372
+ skip = false;
373
+ else
374
+ return tree;
375
+ }
376
+ return null;
377
+ }
378
+ function allowedChildren(doc, tree, schema) {
379
+ let parentInfo = schema.tags[elementName(doc, findParentElement(tree))];
380
+ return (parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.children) || schema.allTags;
381
+ }
382
+ function openTags(doc, tree) {
383
+ let open = [];
384
+ for (let parent = findParentElement(tree); parent && !parent.type.isTop; parent = findParentElement(parent.parent)) {
385
+ let tagName = elementName(doc, parent);
386
+ if (tagName && parent.lastChild.name == "CloseTag")
387
+ break;
388
+ if (tagName && open.indexOf(tagName) < 0 && (tree.name == "EndTag" || tree.from >= parent.firstChild.to))
389
+ open.push(tagName);
390
+ }
391
+ return open;
392
+ }
393
+ const identifier = /^[:\-\.\w\u00b7-\uffff]*$/;
394
+ function completeTag(state, schema, tree, from, to) {
395
+ let end = /\s*>/.test(state.sliceDoc(to, to + 5)) ? "" : ">";
396
+ let parent = findParentElement(tree, tree.name == "StartTag" || tree.name == "TagName");
397
+ return { from, to,
398
+ options: allowedChildren(state.doc, parent, schema).map(tagName => ({ label: tagName, type: "type" })).concat(openTags(state.doc, tree).map((tag, i) => ({ label: "/" + tag, apply: "/" + tag + end,
399
+ type: "type", boost: 99 - i }))),
400
+ validFor: /^\/?[:\-\.\w\u00b7-\uffff]*$/ };
401
+ }
402
+ function completeCloseTag(state, tree, from, to) {
403
+ let end = /\s*>/.test(state.sliceDoc(to, to + 5)) ? "" : ">";
404
+ return { from, to,
405
+ options: openTags(state.doc, tree).map((tag, i) => ({ label: tag, apply: tag + end, type: "type", boost: 99 - i })),
406
+ validFor: identifier };
407
+ }
408
+ function completeStartTag(state, schema, tree, pos) {
409
+ let options = [], level = 0;
410
+ for (let tagName of allowedChildren(state.doc, tree, schema))
411
+ options.push({ label: "<" + tagName, type: "type" });
412
+ for (let open of openTags(state.doc, tree))
413
+ options.push({ label: "</" + open + ">", type: "type", boost: 99 - level++ });
414
+ return { from: pos, to: pos, options, validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/ };
415
+ }
416
+ function completeAttrName(state, schema, tree, from, to) {
417
+ let elt = findParentElement(tree), info = elt ? schema.tags[elementName(state.doc, elt)] : null;
418
+ let localAttrs = info && info.attrs ? Object.keys(info.attrs) : [];
419
+ let names = info && info.globalAttrs === false ? localAttrs
420
+ : localAttrs.length ? localAttrs.concat(schema.globalAttrNames) : schema.globalAttrNames;
421
+ return { from, to,
422
+ options: names.map(attrName => ({ label: attrName, type: "property" })),
423
+ validFor: identifier };
424
+ }
425
+ function completeAttrValue(state, schema, tree, from, to) {
426
+ var _a;
427
+ let nameNode = (_a = tree.parent) === null || _a === void 0 ? void 0 : _a.getChild("AttributeName");
428
+ let options = [], token = undefined;
429
+ if (nameNode) {
430
+ let attrName = state.sliceDoc(nameNode.from, nameNode.to);
431
+ let attrs = schema.globalAttrs[attrName];
432
+ if (!attrs) {
433
+ let elt = findParentElement(tree), info = elt ? schema.tags[elementName(state.doc, elt)] : null;
434
+ attrs = (info === null || info === void 0 ? void 0 : info.attrs) && info.attrs[attrName];
435
+ }
436
+ if (attrs) {
437
+ let base = state.sliceDoc(from, to).toLowerCase(), quoteStart = '"', quoteEnd = '"';
438
+ if (/^['"]/.test(base)) {
439
+ token = base[0] == '"' ? /^[^"]*$/ : /^[^']*$/;
440
+ quoteStart = "";
441
+ quoteEnd = state.sliceDoc(to, to + 1) == base[0] ? "" : base[0];
442
+ base = base.slice(1);
443
+ from++;
444
+ }
445
+ else {
446
+ token = /^[^\s<>='"]*$/;
447
+ }
448
+ for (let value of attrs)
449
+ options.push({ label: value, apply: quoteStart + value + quoteEnd, type: "constant" });
450
+ }
451
+ }
452
+ return { from, to, options, validFor: token };
453
+ }
454
+ function htmlCompletionFor(schema, context) {
455
+ let { state, pos } = context, tree = language.syntaxTree(state).resolveInner(pos, -1), around = tree.resolve(pos);
456
+ for (let scan = pos, before; around == tree && (before = tree.childBefore(scan));) {
457
+ let last = before.lastChild;
458
+ if (!last || !last.type.isError || last.from < last.to)
459
+ break;
460
+ around = tree = before;
461
+ scan = last.from;
462
+ }
463
+ if (tree.name == "TagName") {
464
+ return tree.parent && /CloseTag$/.test(tree.parent.name) ? completeCloseTag(state, tree, tree.from, pos)
465
+ : completeTag(state, schema, tree, tree.from, pos);
466
+ }
467
+ else if (tree.name == "StartTag" || tree.name == "IncompleteTag") {
468
+ return completeTag(state, schema, tree, pos, pos);
469
+ }
470
+ else if (tree.name == "StartCloseTag" || tree.name == "IncompleteCloseTag") {
471
+ return completeCloseTag(state, tree, pos, pos);
472
+ }
473
+ else if (tree.name == "OpenTag" || tree.name == "SelfClosingTag" || tree.name == "AttributeName") {
474
+ return completeAttrName(state, schema, tree, tree.name == "AttributeName" ? tree.from : pos, pos);
475
+ }
476
+ else if (tree.name == "Is" || tree.name == "AttributeValue" || tree.name == "UnquotedAttributeValue") {
477
+ return completeAttrValue(state, schema, tree, tree.name == "Is" ? pos : tree.from, pos);
478
+ }
479
+ else if (context.explicit && (around.name == "Element" || around.name == "Text" || around.name == "Document")) {
480
+ return completeStartTag(state, schema, tree, pos);
481
+ }
482
+ else {
483
+ return null;
484
+ }
485
+ }
486
+ /**
487
+ HTML tag completion. Opens and closes tags and attributes in a
488
+ context-aware way.
489
+ */
490
+ function htmlCompletionSource(context) {
491
+ return htmlCompletionFor(Schema.default, context);
492
+ }
493
+ /**
494
+ Create a completion source for HTML extended with additional tags
495
+ or attributes.
496
+ */
497
+ function htmlCompletionSourceWith(config) {
498
+ let { extraTags, extraGlobalAttributes: extraAttrs } = config;
499
+ let schema = extraAttrs || extraTags ? new Schema(extraTags, extraAttrs) : Schema.default;
500
+ return (context) => htmlCompletionFor(schema, context);
501
+ }
502
+
503
+ const jsonParser = langJavascript.javascriptLanguage.parser.configure({ top: "SingleExpression" });
504
+ const defaultNesting = [
505
+ { tag: "script",
506
+ attrs: attrs => attrs.type == "text/typescript" || attrs.lang == "ts",
507
+ parser: langJavascript.typescriptLanguage.parser },
508
+ { tag: "script",
509
+ attrs: attrs => attrs.type == "text/babel" || attrs.type == "text/jsx",
510
+ parser: langJavascript.jsxLanguage.parser },
511
+ { tag: "script",
512
+ attrs: attrs => attrs.type == "text/typescript-jsx",
513
+ parser: langJavascript.tsxLanguage.parser },
514
+ { tag: "script",
515
+ attrs(attrs) {
516
+ return /^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(attrs.type);
517
+ },
518
+ parser: jsonParser },
519
+ { tag: "script",
520
+ attrs(attrs) {
521
+ return !attrs.type || /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(attrs.type);
522
+ },
523
+ parser: langJavascript.javascriptLanguage.parser },
524
+ { tag: "style",
525
+ attrs(attrs) {
526
+ return (!attrs.lang || attrs.lang == "css") && (!attrs.type || /^(text\/)?(x-)?(stylesheet|css)$/i.test(attrs.type));
527
+ },
528
+ parser: langCss.cssLanguage.parser }
529
+ ];
530
+ const defaultAttrs = [
531
+ { name: "style",
532
+ parser: langCss.cssLanguage.parser.configure({ top: "Styles" }) }
533
+ ].concat(eventAttributes.map(name => ({ name, parser: langJavascript.javascriptLanguage.parser })));
534
+ const htmlPlain = language.LRLanguage.define({
535
+ name: "html",
536
+ parser: html$1.parser.configure({
537
+ props: [
538
+ language.indentNodeProp.add({
539
+ Element(context) {
540
+ let after = /^(\s*)(<\/)?/.exec(context.textAfter);
541
+ if (context.node.to <= context.pos + after[0].length)
542
+ return context.continue();
543
+ return context.lineIndent(context.node.from) + (after[2] ? 0 : context.unit);
544
+ },
545
+ "OpenTag CloseTag SelfClosingTag"(context) {
546
+ return context.column(context.node.from) + context.unit;
547
+ },
548
+ Document(context) {
549
+ if (context.pos + /\s*/.exec(context.textAfter)[0].length < context.node.to)
550
+ return context.continue();
551
+ let endElt = null, close;
552
+ for (let cur = context.node;;) {
553
+ let last = cur.lastChild;
554
+ if (!last || last.name != "Element" || last.to != cur.to)
555
+ break;
556
+ endElt = cur = last;
557
+ }
558
+ if (endElt && !((close = endElt.lastChild) && (close.name == "CloseTag" || close.name == "SelfClosingTag")))
559
+ return context.lineIndent(endElt.from) + context.unit;
560
+ return null;
561
+ }
562
+ }),
563
+ language.foldNodeProp.add({
564
+ Element(node) {
565
+ let first = node.firstChild, last = node.lastChild;
566
+ if (!first || first.name != "OpenTag")
567
+ return null;
568
+ return { from: first.to, to: last.name == "CloseTag" ? last.from : node.to };
569
+ }
570
+ }),
571
+ language.bracketMatchingHandle.add({
572
+ "OpenTag CloseTag": node => node.getChild("TagName")
573
+ })
574
+ ]
575
+ }),
576
+ languageData: {
577
+ commentTokens: { block: { open: "<!--", close: "-->" } },
578
+ indentOnInput: /^\s*<\/\w+\W$/,
579
+ wordChars: "-_"
580
+ }
581
+ });
582
+ /**
583
+ A language provider based on the [Lezer HTML
584
+ parser](https://github.com/lezer-parser/html), extended with the
585
+ JavaScript and CSS parsers to parse the content of `<script>` and
586
+ `<style>` tags.
587
+ */
588
+ const htmlLanguage = htmlPlain.configure({
589
+ wrap: html$1.configureNesting(defaultNesting, defaultAttrs)
590
+ });
591
+ /**
592
+ Language support for HTML, including
593
+ [`htmlCompletion`](https://codemirror.net/6/docs/ref/#lang-html.htmlCompletion) and JavaScript and
594
+ CSS support extensions.
595
+ */
596
+ function html(config = {}) {
597
+ let dialect = "", wrap;
598
+ if (config.matchClosingTags === false)
599
+ dialect = "noMatch";
600
+ if (config.selfClosingTags === true)
601
+ dialect = (dialect ? dialect + " " : "") + "selfClosing";
602
+ if (config.nestedLanguages && config.nestedLanguages.length ||
603
+ config.nestedAttributes && config.nestedAttributes.length)
604
+ wrap = html$1.configureNesting((config.nestedLanguages || []).concat(defaultNesting), (config.nestedAttributes || []).concat(defaultAttrs));
605
+ let lang = wrap ? htmlPlain.configure({ wrap, dialect }) : dialect ? htmlLanguage.configure({ dialect }) : htmlLanguage;
606
+ return new language.LanguageSupport(lang, [
607
+ htmlLanguage.data.of({ autocomplete: htmlCompletionSourceWith(config) }),
608
+ config.autoCloseTags !== false ? autoCloseTags : [],
609
+ langJavascript.javascript().support,
610
+ langCss.css().support
611
+ ]);
612
+ }
613
+ const selfClosers = new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));
614
+ /**
615
+ Extension that will automatically insert close tags when a `>` or
616
+ `/` is typed.
617
+ */
618
+ const autoCloseTags = view.EditorView.inputHandler.of((view, from, to, text, insertTransaction) => {
619
+ if (view.composing || view.state.readOnly || from != to || (text != ">" && text != "/") ||
620
+ !htmlLanguage.isActiveAt(view.state, from, -1))
621
+ return false;
622
+ let base = insertTransaction(), { state: state$1 } = base;
623
+ let closeTags = state$1.changeByRange(range => {
624
+ var _a, _b, _c;
625
+ let didType = state$1.doc.sliceString(range.from - 1, range.to) == text;
626
+ let { head } = range, after = language.syntaxTree(state$1).resolveInner(head, -1), name;
627
+ if (didType && text == ">" && after.name == "EndTag") {
628
+ let tag = after.parent;
629
+ if (((_b = (_a = tag.parent) === null || _a === void 0 ? void 0 : _a.lastChild) === null || _b === void 0 ? void 0 : _b.name) != "CloseTag" &&
630
+ (name = elementName(state$1.doc, tag.parent, head)) &&
631
+ !selfClosers.has(name)) {
632
+ let to = head + (state$1.doc.sliceString(head, head + 1) === ">" ? 1 : 0);
633
+ let insert = `</${name}>`;
634
+ return { range, changes: { from: head, to, insert } };
635
+ }
636
+ }
637
+ else if (didType && text == "/" && after.name == "IncompleteCloseTag") {
638
+ let tag = after.parent;
639
+ if (after.from == head - 2 && ((_c = tag.lastChild) === null || _c === void 0 ? void 0 : _c.name) != "CloseTag" &&
640
+ (name = elementName(state$1.doc, tag, head)) && !selfClosers.has(name)) {
641
+ let to = head + (state$1.doc.sliceString(head, head + 1) === ">" ? 1 : 0);
642
+ let insert = `${name}>`;
643
+ return {
644
+ range: state.EditorSelection.cursor(head + insert.length, -1),
645
+ changes: { from: head, to, insert }
646
+ };
647
+ }
648
+ }
649
+ return { range };
650
+ });
651
+ if (closeTags.changes.empty)
652
+ return false;
653
+ view.dispatch([
654
+ base,
655
+ state$1.update(closeTags, {
656
+ userEvent: "input.complete",
657
+ scrollIntoView: true
658
+ })
659
+ ]);
660
+ return true;
661
+ });
662
+
663
+ exports.autoCloseTags = autoCloseTags;
664
+ exports.html = html;
665
+ exports.htmlCompletionSource = htmlCompletionSource;
666
+ exports.htmlCompletionSourceWith = htmlCompletionSourceWith;
667
+ exports.htmlLanguage = htmlLanguage;