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