spell 0.8.7 → 0.8.9

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 (304) hide show
  1. package/README-epics.md +149 -49
  2. package/app/package.json +25 -1
  3. package/app/spaces/@spell/guides/SpellUI/SpellUI.spellml +486 -486
  4. package/app/spaces/@spell/sites/SpellApp/SpellApp.spellml +50 -124
  5. package/dist/app/app/pages/SiteBoardView.css +5 -5
  6. package/dist/app/app/pages/SiteBoardView.js +1 -1
  7. package/dist/app/app/pages/SiteEditorPage.js +6 -3
  8. package/dist/app/app/pages/SiteEdits.js +27 -10
  9. package/dist/app/app/pages/SiteWrites.js +11 -0
  10. package/dist/app/app/runner/spellRuntime.js +1 -0
  11. package/dist/cli/publish/PublishedPackage.d.ts +2 -1
  12. package/dist/cli/publish/PublishedPackage.js +6 -3
  13. package/dist/cli/publish/ScratchInstall.d.ts +14 -3
  14. package/dist/cli/publish/ScratchInstall.js +69 -8
  15. package/dist/epic/cli/EpicProgram.js +20 -5
  16. package/dist/epic/cli/epicGroups.js +7 -1
  17. package/dist/epic/command/BaseBranch.d.ts +35 -0
  18. package/dist/epic/command/BaseBranch.js +58 -0
  19. package/dist/epic/command/EpicCheckout.d.ts +1 -1
  20. package/dist/epic/command/EpicCheckout.js +4 -4
  21. package/dist/epic/command/EpicGuide.js +3 -2
  22. package/dist/epic/command/EpicTools.d.ts +5 -0
  23. package/dist/epic/command/EpicTools.js +14 -3
  24. package/dist/epic/command/MainMerge.d.ts +26 -15
  25. package/dist/epic/command/MainMerge.js +60 -16
  26. package/dist/epic/command/PullRequest.d.ts +45 -0
  27. package/dist/epic/command/PullRequest.js +100 -0
  28. package/dist/epic/command/RepoInit.d.ts +196 -39
  29. package/dist/epic/command/RepoInit.js +481 -60
  30. package/dist/epic/command/Requests.d.ts +1 -0
  31. package/dist/epic/command/Requests.js +7 -1
  32. package/dist/epic/command/SessionMoves.js +2 -1
  33. package/dist/epic/command/SkillsCheck.js +3 -2
  34. package/dist/epic/command/Stock.js +3 -1
  35. package/dist/epic/command/TurnEnd.d.ts +1 -1
  36. package/dist/epic/command/TurnEnd.js +4 -3
  37. package/dist/epic/command/Worktrees.d.ts +20 -3
  38. package/dist/epic/command/Worktrees.js +39 -7
  39. package/dist/epic/command/command.types.d.ts +3 -0
  40. package/dist/epic/components/__pack/epics.entry.js +43 -43
  41. package/dist/epic/components/__pack/epics.pack.js +36 -12794
  42. package/dist/epic/config/CodeHost.d.ts +96 -0
  43. package/dist/epic/config/CodeHost.js +89 -0
  44. package/dist/epic/config/EngineFiles.mjs +60 -0
  45. package/dist/epic/config/EpicConfig.d.ts +20 -3
  46. package/dist/epic/config/EpicConfig.js +25 -1
  47. package/dist/epic/config/EpicRepo.js +1 -1
  48. package/dist/epic/config/GitHub.d.ts +75 -3
  49. package/dist/epic/config/GitHub.js +106 -5
  50. package/dist/epic/config/GitLab.d.ts +138 -0
  51. package/dist/epic/config/GitLab.js +297 -0
  52. package/dist/epic/config/LayeredSettings.js +3 -2
  53. package/dist/epic/server/EpicServer.d.ts +1 -1
  54. package/dist/epic/server/EpicServer.js +26 -12
  55. package/dist/epic/tool/InboxPoller.mjs +2 -1
  56. package/dist/epic/tool/MigrateCommands.js +6 -8
  57. package/dist/epic/tool/PlanCommits.d.ts +7 -4
  58. package/dist/epic/tool/PlanCommits.js +7 -5
  59. package/dist/epic/tool/PlanDocCommands.js +3 -4
  60. package/dist/epic/tool/PlanDocFiles.d.ts +3 -1
  61. package/dist/epic/tool/PlanDocFiles.js +13 -5
  62. package/dist/epic/tool/ServedFolders.d.ts +1 -1
  63. package/dist/epic/tool/ServedFolders.js +4 -4
  64. package/dist/epic/tools/PageInboxes.js +3 -3
  65. package/dist/epic/tools/_assets/commands.entry.js +149 -68
  66. package/dist/epic/tools/_assets/commands.js +20 -2073
  67. package/dist/epic/tools/_assets/core-reference.entry.js +244 -124
  68. package/dist/epic/tools/_assets/core-reference.js +20 -2142
  69. package/dist/epic/tools/_assets/emoji/cldr/0.js +2 -2
  70. package/dist/epic/tools/_assets/emoji/cldr/a.js +2 -2
  71. package/dist/epic/tools/_assets/emoji/cldr/b.js +2 -2
  72. package/dist/epic/tools/_assets/emoji/cldr/c.js +2 -2
  73. package/dist/epic/tools/_assets/emoji/cldr/d.js +2 -2
  74. package/dist/epic/tools/_assets/emoji/cldr/e.js +2 -2
  75. package/dist/epic/tools/_assets/emoji/cldr/f.js +2 -2
  76. package/dist/epic/tools/_assets/emoji/cldr/g.js +2 -2
  77. package/dist/epic/tools/_assets/emoji/cldr/h.js +2 -2
  78. package/dist/epic/tools/_assets/emoji/cldr/i.js +2 -2
  79. package/dist/epic/tools/_assets/emoji/cldr/j.js +2 -2
  80. package/dist/epic/tools/_assets/emoji/cldr/k.js +2 -2
  81. package/dist/epic/tools/_assets/emoji/cldr/l.js +2 -2
  82. package/dist/epic/tools/_assets/emoji/cldr/m.js +2 -2
  83. package/dist/epic/tools/_assets/emoji/cldr/n.js +2 -2
  84. package/dist/epic/tools/_assets/emoji/cldr/o.js +2 -2
  85. package/dist/epic/tools/_assets/emoji/cldr/p.js +2 -2
  86. package/dist/epic/tools/_assets/emoji/cldr/r.js +2 -2
  87. package/dist/epic/tools/_assets/emoji/cldr/s.js +2 -2
  88. package/dist/epic/tools/_assets/emoji/cldr/t.js +2 -2
  89. package/dist/epic/tools/_assets/emoji/cldr/u.js +2 -2
  90. package/dist/epic/tools/_assets/emoji/cldr/v.js +2 -2
  91. package/dist/epic/tools/_assets/emoji/cldr/w.js +2 -2
  92. package/dist/epic/tools/_assets/emoji/cldr/x.js +2 -2
  93. package/dist/epic/tools/_assets/emoji/cldr/y.js +2 -2
  94. package/dist/epic/tools/_assets/emoji/cldr/z.js +2 -2
  95. package/dist/epic/tools/_assets/emoji/fomantic/0.js +2 -2
  96. package/dist/epic/tools/_assets/emoji/fomantic/a.js +2 -2
  97. package/dist/epic/tools/_assets/emoji/fomantic/b.js +2 -2
  98. package/dist/epic/tools/_assets/emoji/fomantic/c.js +2 -2
  99. package/dist/epic/tools/_assets/emoji/fomantic/d.js +2 -2
  100. package/dist/epic/tools/_assets/emoji/fomantic/e.js +2 -2
  101. package/dist/epic/tools/_assets/emoji/fomantic/f.js +2 -2
  102. package/dist/epic/tools/_assets/emoji/fomantic/g.js +2 -2
  103. package/dist/epic/tools/_assets/emoji/fomantic/h.js +2 -2
  104. package/dist/epic/tools/_assets/emoji/fomantic/i.js +2 -2
  105. package/dist/epic/tools/_assets/emoji/fomantic/j.js +2 -2
  106. package/dist/epic/tools/_assets/emoji/fomantic/k.js +2 -2
  107. package/dist/epic/tools/_assets/emoji/fomantic/l.js +2 -2
  108. package/dist/epic/tools/_assets/emoji/fomantic/m.js +2 -2
  109. package/dist/epic/tools/_assets/emoji/fomantic/n.js +2 -2
  110. package/dist/epic/tools/_assets/emoji/fomantic/o.js +2 -2
  111. package/dist/epic/tools/_assets/emoji/fomantic/p.js +2 -2
  112. package/dist/epic/tools/_assets/emoji/fomantic/q.js +2 -2
  113. package/dist/epic/tools/_assets/emoji/fomantic/r.js +2 -2
  114. package/dist/epic/tools/_assets/emoji/fomantic/s.js +2 -2
  115. package/dist/epic/tools/_assets/emoji/fomantic/t.js +2 -2
  116. package/dist/epic/tools/_assets/emoji/fomantic/u.js +2 -2
  117. package/dist/epic/tools/_assets/emoji/fomantic/v.js +2 -2
  118. package/dist/epic/tools/_assets/emoji/fomantic/w.js +2 -2
  119. package/dist/epic/tools/_assets/emoji/fomantic/x.js +2 -2
  120. package/dist/epic/tools/_assets/emoji/fomantic/y.js +2 -2
  121. package/dist/epic/tools/_assets/emoji/fomantic/z.js +2 -2
  122. package/dist/epic/tools/_assets/goals-live.js +318 -210
  123. package/dist/epic/tools/_assets/highlight.min.js +5764 -5269
  124. package/dist/epic/tools/_assets/lazy/code-engine.js +5 -1270
  125. package/dist/epic/tools/_assets/lazy/markdown-engine.js +67 -1513
  126. package/dist/epic/tools/_assets/lazy/markdown-sanitizer.js +3 -753
  127. package/dist/epic/tools/_assets/spell-comments.entry.js +282 -159
  128. package/dist/epic/tools/_assets/spell-comments.js +24 -3716
  129. package/dist/epic/tools/_assets/spell-doc-comments.js +1243 -816
  130. package/dist/epic/tools/_assets/spell-doc-helpers.js +298 -165
  131. package/dist/epic/tools/_assets/spell-doc-runtime.js +2760 -1415
  132. package/dist/epic/tools/_assets/spell-doc-toolbar.js +396 -227
  133. package/dist/epic/tools/_assets/spell-syntax.entry.js +505 -285
  134. package/dist/epic/tools/_assets/spell-syntax.js +22 -2916
  135. package/dist/epic/tools/_assets/spell-ui-sources.js +102 -60
  136. package/dist/epic/tools/_assets/spell-ui.entry.js +108 -40
  137. package/dist/epic/tools/_assets/spell-ui.js +3131 -46465
  138. package/dist/epic/tools/pages.d.ts +5 -6
  139. package/dist/epic/tools/pages.js +7 -6
  140. package/dist/epic/window.mjs +2 -3
  141. package/dist/parser/core/classes/View.d.ts +20 -0
  142. package/dist/parser/core/classes/View.js +91 -17
  143. package/dist/parser/core/core.declarations.json5 +18 -0
  144. package/dist/parser/core/core.scopes.js +5 -0
  145. package/dist/parser/core/sites.d.ts +10 -0
  146. package/dist/parser/core/sites.js +12 -0
  147. package/dist/parser/parser/tokenizer/Tokenizer.d.ts +9 -1
  148. package/dist/parser/parser/tokenizer/Tokenizer.js +43 -5
  149. package/dist/parser/parser/tokenizer/Tokens.d.ts +4 -0
  150. package/dist/parser/parser/tokenizer/Tokens.js +4 -0
  151. package/dist/parser/parser/tokenizer/tokenizer.types.d.ts +5 -0
  152. package/dist/parser/parser/tokenizer/tokenizer.types.js +2 -0
  153. package/dist/parser/py/core/spell_core/apps.py +2 -0
  154. package/dist/parser/spell/PARSING.md +21 -0
  155. package/dist/parser/spell/SpellParser.d.ts +2 -0
  156. package/dist/parser/spell/SpellParser.js +58 -3
  157. package/dist/parser/spell/SpellxTokenizer.js +2 -1
  158. package/dist/parser/spell/SpellxTwin.d.ts +4 -1
  159. package/dist/parser/spell/SpellxTwin.js +10 -3
  160. package/dist/parser/spell/builtinTypes.js +24 -1
  161. package/dist/parser/spell/ingest/PlaceIngest.js +3 -1
  162. package/dist/parser/spell/languages/Language.d.ts +11 -2
  163. package/dist/parser/spell/languages/en/words.js +3 -2
  164. package/dist/parser/spell/languages/es/words.js +7 -4
  165. package/dist/parser/spell/rules/Statement.js +1 -1
  166. package/dist/parser/spell/rules/classes/DrawSlot.js +6 -1
  167. package/dist/parser/spell/rules/sites/SitePage.d.ts +3 -3
  168. package/dist/parser/spell/rules/sites/SitePage.js +2 -2
  169. package/dist/parser/spell/rules/sites/sites.en.js +1 -1
  170. package/dist/parser/spell/rules/sites/sites.es.js +1 -1
  171. package/dist/parser/spell/rules/sites/sites.shared.d.ts +2 -2
  172. package/dist/parser/spell/spell.types.d.ts +7 -0
  173. package/dist/parser/spell/spellSyntax.es.json +6 -6
  174. package/dist/parser/spell/spellSyntax.json +6 -6
  175. package/dist/parser/spellx/SpellxView.js +2 -1
  176. package/dist/ui/components/ui-accordion/UIAccordion.d.ts +1 -0
  177. package/dist/ui/components/ui-ad/UIAd.d.ts +1 -0
  178. package/dist/ui/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
  179. package/dist/ui/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
  180. package/dist/ui/components/ui-button/UIButton.d.ts +8 -3
  181. package/dist/ui/components/ui-button/UIButton.fallback.d.ts +8 -3
  182. package/dist/ui/components/ui-button/UIButtons.d.ts +1 -0
  183. package/dist/ui/components/ui-button/UIOr.d.ts +1 -0
  184. package/dist/ui/components/ui-calendar/UICalendar.d.ts +6 -0
  185. package/dist/ui/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
  186. package/dist/ui/components/ui-card/UICards.d.ts +31 -0
  187. package/dist/ui/components/ui-checkbox/UICheckbox.d.ts +7 -0
  188. package/dist/ui/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
  189. package/dist/ui/components/ui-comment/UIComment.d.ts +1 -0
  190. package/dist/ui/components/ui-comment/UIComments.d.ts +1 -0
  191. package/dist/ui/components/ui-components/UIComponents.d.ts +1 -0
  192. package/dist/ui/components/ui-dimmer/UIDimmer.d.ts +1 -0
  193. package/dist/ui/components/ui-divider/UIDivider.d.ts +2 -0
  194. package/dist/ui/components/ui-dropdown/UIDropdown.d.ts +6 -0
  195. package/dist/ui/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
  196. package/dist/ui/components/ui-embed/UIEmbed.d.ts +1 -0
  197. package/dist/ui/components/ui-emoji/UIEmoji.d.ts +1 -0
  198. package/dist/ui/components/ui-feed/UIFeed.d.ts +1 -0
  199. package/dist/ui/components/ui-feed/UIFeedEvent.d.ts +1 -0
  200. package/dist/ui/components/ui-flag/UIFlag.d.ts +1 -0
  201. package/dist/ui/components/ui-flyout/UIFlyout.d.ts +1 -0
  202. package/dist/ui/components/ui-form/UIFields.d.ts +1 -0
  203. package/dist/ui/components/ui-form/UIRepeat.d.ts +1 -0
  204. package/dist/ui/components/ui-grid/UIColumn.d.ts +1 -0
  205. package/dist/ui/components/ui-grid/UIGrid.d.ts +1 -0
  206. package/dist/ui/components/ui-grid/UIRow.d.ts +1 -0
  207. package/dist/ui/components/ui-icon/UIIcon.d.ts +3 -2
  208. package/dist/ui/components/ui-icon/UIIcons.d.ts +1 -0
  209. package/dist/ui/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
  210. package/dist/ui/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
  211. package/dist/ui/components/ui-image/UIImages.d.ts +1 -0
  212. package/dist/ui/components/ui-include/UIInclude.d.ts +1 -0
  213. package/dist/ui/components/ui-input/UIInput.fallback.d.ts +9 -2
  214. package/dist/ui/components/ui-items/UIItems.d.ts +1 -0
  215. package/dist/ui/components/ui-keys/UIKeys.d.ts +1 -0
  216. package/dist/ui/components/ui-label/UILabel.d.ts +2 -0
  217. package/dist/ui/components/ui-label/UILabels.d.ts +1 -0
  218. package/dist/ui/components/ui-list/UIList.d.ts +2 -0
  219. package/dist/ui/components/ui-loader/UILoader.d.ts +1 -0
  220. package/dist/ui/components/ui-message/UIMessage.d.ts +2 -0
  221. package/dist/ui/components/ui-modal/UIModal.d.ts +1 -0
  222. package/dist/ui/components/ui-nag/UINag.d.ts +1 -0
  223. package/dist/ui/components/ui-page/UIPage.d.ts +15 -0
  224. package/dist/ui/components/ui-page/UIPage.es.d.ts +1 -0
  225. package/dist/ui/components/ui-parts/UIActions.d.ts +1 -0
  226. package/dist/ui/components/ui-parts/UIAuthor.d.ts +1 -0
  227. package/dist/ui/components/ui-parts/UIAvatar.d.ts +1 -0
  228. package/dist/ui/components/ui-parts/UIContent.d.ts +1 -0
  229. package/dist/ui/components/ui-parts/UIDate.d.ts +1 -0
  230. package/dist/ui/components/ui-parts/UIDescription.d.ts +1 -0
  231. package/dist/ui/components/ui-parts/UIDetail.d.ts +1 -0
  232. package/dist/ui/components/ui-parts/UIExtra.d.ts +1 -0
  233. package/dist/ui/components/ui-parts/UIHeader.d.ts +15 -3
  234. package/dist/ui/components/ui-parts/UIHeader.en.d.ts +5 -2
  235. package/dist/ui/components/ui-parts/UIHeader.en.js +6 -3
  236. package/dist/ui/components/ui-parts/UIHeader.js +45 -5
  237. package/dist/ui/components/ui-parts/UIMeta.d.ts +1 -0
  238. package/dist/ui/components/ui-parts/UIParts.css +18 -0
  239. package/dist/ui/components/ui-parts/UIParts.css.inline.js +1 -1
  240. package/dist/ui/components/ui-parts/UIParts.types.d.ts +15 -1
  241. package/dist/ui/components/ui-parts/UISummary.d.ts +1 -0
  242. package/dist/ui/components/ui-parts/UITitle.d.ts +1 -0
  243. package/dist/ui/components/ui-parts/UIValue.d.ts +1 -0
  244. package/dist/ui/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
  245. package/dist/ui/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
  246. package/dist/ui/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
  247. package/dist/ui/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
  248. package/dist/ui/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
  249. package/dist/ui/components/ui-progress/UIProgress.d.ts +2 -0
  250. package/dist/ui/components/ui-quote/UIQuote.d.ts +1 -0
  251. package/dist/ui/components/ui-rail/UIRail.d.ts +1 -0
  252. package/dist/ui/components/ui-rating/UIRating.d.ts +6 -0
  253. package/dist/ui/components/ui-rating/UIRating.fallback.d.ts +6 -0
  254. package/dist/ui/components/ui-reveal/UIReveal.d.ts +1 -0
  255. package/dist/ui/components/ui-search/UISearch.fallback.d.ts +13 -1
  256. package/dist/ui/components/ui-section/UISections.d.ts +1 -0
  257. package/dist/ui/components/ui-segment/UISegment.d.ts +2 -0
  258. package/dist/ui/components/ui-segment/UISegments.d.ts +1 -0
  259. package/dist/ui/components/ui-select/UISelect.d.ts +6 -0
  260. package/dist/ui/components/ui-select/UISelect.fallback.d.ts +6 -0
  261. package/dist/ui/components/ui-shape/UISide.d.ts +4 -0
  262. package/dist/ui/components/ui-sidebar/UIPushable.d.ts +1 -0
  263. package/dist/ui/components/ui-sidebar/UIPusher.d.ts +1 -0
  264. package/dist/ui/components/ui-sidebar/UISidebar.d.ts +1 -0
  265. package/dist/ui/components/ui-sides/UISides.d.ts +6 -0
  266. package/dist/ui/components/ui-sides/UISides.fallback.d.ts +6 -0
  267. package/dist/ui/components/ui-slider/UISlider.d.ts +7 -0
  268. package/dist/ui/components/ui-slider/UISlider.fallback.d.ts +7 -0
  269. package/dist/ui/components/ui-space/UISpace.d.ts +1 -0
  270. package/dist/ui/components/ui-statistic/UIStatistic.d.ts +1 -0
  271. package/dist/ui/components/ui-statistic/UIStatistics.d.ts +1 -0
  272. package/dist/ui/components/ui-step/UIStep.d.ts +1 -0
  273. package/dist/ui/components/ui-step/UISteps.d.ts +1 -0
  274. package/dist/ui/components/ui-table/UICell.d.ts +1 -0
  275. package/dist/ui/components/ui-terms/UITerm.d.ts +1 -0
  276. package/dist/ui/components/ui-terms/UITerms.d.ts +1 -0
  277. package/dist/ui/components/ui-theme-editor/UIColorChip.d.ts +1 -0
  278. package/dist/ui/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
  279. package/dist/ui/components/ui-toast/UIToast.d.ts +1 -0
  280. package/dist/ui/components/ui-toc/UIToc.d.ts +1 -0
  281. package/dist/ui/components/ui-transition/UITransition.d.ts +1 -0
  282. package/dist/ui/components/ui-video/UIAudio.d.ts +1 -0
  283. package/dist/ui/components/ui-video/UIVideo.d.ts +1 -0
  284. package/dist/ui/components/ui-visibility/UIVisibility.d.ts +1 -0
  285. package/dist/ui/components/ui-zoom/UIZoom.d.ts +1 -0
  286. package/dist/ui/jsx.d.ts +4 -4
  287. package/dist/ui/vocabulary/defaults.generated.js +1 -1
  288. package/dist/util/spell/constants.js +1 -1
  289. package/epic/.claude-plugin/plugin.json +1 -1
  290. package/epic/.codex-plugin/plugin.json +1 -1
  291. package/epic/hooks/handoff.mjs +4 -3
  292. package/epic/hooks/worktree.mjs +22 -3
  293. package/epic/package.json +41 -2
  294. package/epic/skills/details/SKILL.md +2 -1
  295. package/epic/skills/epic/SKILL.md +7 -1
  296. package/epic/skills/epic/guide.md +3 -0
  297. package/epic/skills/isolate/SKILL.md +53 -20
  298. package/epic/src/AGENTS.md +11 -2
  299. package/epic/templates/durable.html +1 -1
  300. package/epic/vscode/package.json +1 -1
  301. package/epic/vscode/spell-epic.vsix +0 -0
  302. package/package.json +1 -1
  303. package/parser/package.json +1 -1
  304. package/ui/package.json +15 -2
@@ -209,16 +209,15 @@ export declare function tidy(files: any, { format }?: {
209
209
  export declare function formattedAlready(files: any): any;
210
210
  /**
211
211
  * How to run `doc-links.js` with `args` as a child `node`, for `spawnSync(command, args, { env })`.
212
- * - under `tsx`, with this package's `tsconfig.json`, from whatever folder it runs in: every repo's files by their
213
- * package names (`spell/server`, epic `repo-split` P14)
212
+ * - in a checkout, under `tsx`, with this package's `tsconfig.json`, from whatever folder it runs in: every repo's
213
+ * files by their package names (`spell/server`, epic `repo-split` P14); plain `node` in an npm install
214
+ * (`EngineFiles.nodeRun()`)
214
215
  * - the one way the tools run it (`tidy()`, `update.js`, goals' check, its own test)
215
216
  */
216
217
  export declare function docLinksRun(args: any): {
217
- command: string;
218
218
  args: any[];
219
- env: {
220
- TSX_TSCONFIG_PATH: string;
221
- };
219
+ env: NodeJS.ProcessEnv;
220
+ command: string;
222
221
  };
223
222
  /**
224
223
  * This checkout's page server (`spell server`), started in the background if it isn't running.
@@ -10,18 +10,19 @@ import { openInChromeTab } from "spell/server/open";
10
10
  import { RealPath, pathInside } from "spell/server/RealPath";
11
11
  import { componentSetAddressOf, componentSetFileOf, pageServerRoot, settingsParts } from "spell/server/page/settings";
12
12
  import { Window, envCheckout } from "../window.mjs";
13
+ import { EngineFiles } from "../config/EngineFiles.mjs";
13
14
  import { EpicConfig } from "../config/EpicConfig.js";
14
15
  import { ENGINE_ROUTES, EPIC_UI } from "../server/server.types.js";
15
16
  import { ComponentSetFolders } from "./ComponentSetFolders.js";
16
17
  import { firstPackageDir, KIT_PACKAGES } from "./packageDir.js";
17
18
  var TOOLS = dirname(fileURLToPath(import.meta.url));
18
- var PACKAGE = resolve(TOOLS, "..", "..");
19
+ var PACKAGE = EngineFiles.root;
19
20
  var ASSETS = join(TOOLS, "_assets");
20
21
  var ROOT = envCheckout() ?? PACKAGE;
21
22
  var CONTENT = EpicConfig.contentOf(ROOT);
22
23
  var EPICS = join(CONTENT, "epics");
23
24
  var TEMPLATES = join(PACKAGE, "templates");
24
- var EPIC_UI_DOCS = join(PACKAGE, EPIC_UI.dir);
25
+ var EPIC_UI_DOCS = EngineFiles.path(EPIC_UI.dir);
25
26
  var SETS = new ComponentSetFolders({ root: ROOT, epicUi: EPIC_UI_DOCS });
26
27
  var REPO_TEMPLATES = repoTemplatesOf(ROOT);
27
28
  var GUIDES = join(CONTENT, "guides");
@@ -165,7 +166,8 @@ function tidy(files, { format = files } = {}) {
165
166
  const formatted = format.map(at);
166
167
  const runs = [
167
168
  docLinksRun(paths),
168
- ...formatted.length ? [{ command: "yarn", args: ["vp", "fmt", ...formatted] }] : []
169
+ // in an npm install, no formatter: it's the kit's dev tool (`vp`, by yarn), with its settings
170
+ ...formatted.length && !EngineFiles.isBuilt ? [{ command: "yarn", args: ["vp", "fmt", ...formatted] }] : []
169
171
  ];
170
172
  for (const { command, args, env } of runs) {
171
173
  const run = spawnSync(command, args, { cwd: PACKAGE, encoding: "utf8", env });
@@ -190,8 +192,7 @@ __name(formattedAlready, "formattedAlready");
190
192
  function docLinksRun(args) {
191
193
  return {
192
194
  command: process.execPath,
193
- args: ["--import", "tsx", join(TOOLS, "doc-links.js"), ...args],
194
- env: { ...process.env, TSX_TSCONFIG_PATH: join(PACKAGE, "tsconfig.json") }
195
+ ...EngineFiles.nodeRun(join(TOOLS, "doc-links.js"), args)
195
196
  };
196
197
  }
197
198
  __name(docLinksRun, "docLinksRun");
@@ -229,7 +230,7 @@ function ensureEpicServer() {
229
230
  return { base, port: Number(new URL(base).port) };
230
231
  }
231
232
  __name(ensureEpicServer, "ensureEpicServer");
232
- var EPIC_BIN = join(PACKAGE, "bin", "epic");
233
+ var EPIC_BIN = EngineFiles.bin;
233
234
  function fromTemplate(html) {
234
235
  const up = "/";
235
236
  return html.replace(
@@ -7,7 +7,6 @@ import { spawnSync } from "node:child_process";
7
7
  import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
8
8
  import { homedir } from "node:os";
9
9
  import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
10
- import { fileURLToPath } from "node:url";
11
10
  import { escapeRegExp } from "spell/util/string";
12
11
  import { findUp } from "spell/util/node/findUp";
13
12
  import { after, waitUntil } from "spell/util/timing";
@@ -18,11 +17,11 @@ import { Processes } from "spell/server/Processes";
18
17
  import { RealPath, pathInside } from "spell/server/RealPath";
19
18
  import { ClaudeHome } from "./config/ClaudeHome.js";
20
19
  import { Editor } from "./config/Editor.js";
20
+ import { EngineFiles } from "./config/EngineFiles.mjs";
21
21
  import { EpicConfig } from "./config/EpicConfig.js";
22
22
  import { SessionFolders } from "./config/SessionFolders.js";
23
23
  import { SessionMoves } from "./command/SessionMoves.js";
24
24
  import { WorktreeGuard } from "./command/WorktreeGuard.js";
25
- var ENGINE = dirname(dirname(fileURLToPath(import.meta.url)));
26
25
  var staleSaid = false;
27
26
  var ROOT = envCheckout() ?? checkoutAround(process.cwd());
28
27
  function envCheckout(env = process.env) {
@@ -496,7 +495,7 @@ var Window = class _Window {
496
495
  if (plan.start && !plan.open && !move) await _Window.request("open-session", typed, open);
497
496
  if (!plan.open && !(move && plan.start)) return { ...plan, file, refused };
498
497
  if (plan.open) {
499
- const hook = join(ENGINE, "hooks", "worktree.mjs");
498
+ const hook = EngineFiles.path("hooks/worktree.mjs");
500
499
  const input = JSON.stringify({ name, cwd: MAIN_ROOT });
501
500
  const made = spawnSync(process.execPath, [hook, "create"], { input, encoding: "utf8" });
502
501
  if (made.status !== 0) throw new Error(`worktree ${name} not made: ${made.stderr.trim()}`);
@@ -1,3 +1,4 @@
1
+ import type { Drawing } from "spell/parser/core/drawing";
1
2
  import { Thing } from "./Thing";
2
3
  /**
3
4
  * `View`: a `Thing` drawn as its own custom element -- what `a card is a view` extends.
@@ -8,9 +9,28 @@ import { Thing } from "./Thing";
8
9
  * - Its things may be dragged, clicked or selected on the page only when its type says so:
9
10
  * `<spell-view "card" draggable>`, `- it is clickable when it is face down`, or an event that implies it,
10
11
  * `- on click:` (`core.isAble()`).
12
+ * - A picture of it, its `thumbnail`, draws while it has no drawing of its own (epic `mockup` P16).
11
13
  * - Everything else as a `Thing`.
12
14
  */
13
15
  export declare class View extends Thing {
16
+ /**
17
+ * A picture of it, a file of its project: `snapshots/terms.jpg`.
18
+ * - `<spell-page "terms" thumbnail="snapshots/terms.jpg"/>`, or `- its thumbnail is "..."`.
19
+ * - A type may have data of its own called this, a thing as much as text: only text is a picture's file.
20
+ */
21
+ accessor thumbnail: string | undefined;
22
+ /**
23
+ * Draw our thumbnail: what a view with no drawing of its own shows.
24
+ * - Compiled spell's own `to draw it` replaces this, so writing any content replaces the picture.
25
+ * - throws: no thumbnail, as a thing with no `to draw` can't be drawn.
26
+ */
27
+ draw(): Drawing;
28
+ /**
29
+ * Our thumbnail, as an image: what `draw its thumbnail` places.
30
+ * - Nothing when we have none.
31
+ * - Its file is found from the running project's folder, so no page says where its project is.
32
+ */
33
+ drawThumbnail(): Drawing;
14
34
  /**
15
35
  * May a page let people drag our things? `- it is draggable` says yes (epic `outline-spell` P28, `debut` P27).
16
36
  * - Even then, only when the list holding one will give it up: its `can give up` rule.
@@ -1,33 +1,107 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
5
+ var __typeError = (msg) => {
6
+ throw TypeError(msg);
7
+ };
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2
9
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
+ var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
11
+ var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
12
+ var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
13
+ var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
14
+ var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
15
+ var __runInitializers = (array, flags, self, value) => {
16
+ for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
17
+ return value;
18
+ };
19
+ var __decorateElement = (array, flags, name, decorators, target, extra) => {
20
+ var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
21
+ var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
22
+ var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
23
+ var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name]() {
24
+ return __privateGet(this, extra);
25
+ }, set [name](x) {
26
+ return __privateSet(this, extra, x);
27
+ } }, name));
28
+ k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
29
+ for (var i = decorators.length - 1; i >= 0; i--) {
30
+ ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
31
+ if (k) {
32
+ ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name in x };
33
+ if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
34
+ if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
35
+ }
36
+ it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
37
+ if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
38
+ else if (typeof it !== "object" || it === null) __typeError("Object expected");
39
+ else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
40
+ }
41
+ return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
42
+ };
43
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
44
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
45
+ var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
46
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
47
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
48
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
49
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
3
50
 
4
51
  // src/core/classes/View.ts
52
+ import h from "@solidjs/h";
53
+ import { prop } from "spell/util";
5
54
  import { noAbilities } from "../abilities.js";
55
+ import { core } from "../core.js";
6
56
  import { Thing } from "./Thing.js";
7
- var View = class extends Thing {
8
- static {
9
- __name(this, "View");
57
+ var _thumbnail_dec, _a, _init, _thumbnail;
58
+ var _View = class _View extends (_a = Thing, _thumbnail_dec = [prop()], _a) {
59
+ constructor() {
60
+ super(...arguments);
61
+ __privateAdd(this, _thumbnail, __runInitializers(_init, 8, this)), __runInitializers(_init, 11, this);
10
62
  }
11
63
  /**
12
- * May a page let people drag our things? `- it is draggable` says yes (epic `outline-spell` P28, `debut` P27).
13
- * - Even then, only when the list holding one will give it up: its `can give up` rule.
14
- * - "No" until a type says, or its `- on drag:` implies it: see `core.isAble()`.
64
+ * Draw our thumbnail: what a view with no drawing of its own shows.
65
+ * - Compiled spell's own `to draw it` replaces this, so writing any content replaces the picture.
66
+ * - throws: no thumbnail, as a thing with no `to draw` can't be drawn.
15
67
  */
16
- static draggable = false;
17
- /**
18
- * May a page let people click our things? `- it is clickable` says yes, or its `- on click:` (epic `debut` P27).
19
- * - Clickable, it shows the pointer; `- clickable when it is face down` runs its click only then.
20
- */
21
- static clickable = false;
68
+ draw() {
69
+ return typeof this.thumbnail === "string" ? this.drawThumbnail() : super.draw();
70
+ }
22
71
  /**
23
- * May a page let people select our things? `- it is selectable` says yes (epic `outline-spell` P29).
24
- * - A click selects one in its list; shift and command (ctrl) select more: see `ViewableList.selection`.
72
+ * Our thumbnail, as an image: what `draw its thumbnail` places.
73
+ * - Nothing when we have none.
74
+ * - Its file is found from the running project's folder, so no page says where its project is.
25
75
  */
26
- static selectable = false;
27
- static {
28
- noAbilities(this);
76
+ drawThumbnail() {
77
+ const { thumbnail } = this;
78
+ if (typeof thumbnail !== "string") return null;
79
+ return h("img", { src: core.addressOfFile(thumbnail), alt: "", style: "max-width: 100%" });
29
80
  }
30
81
  };
82
+ _init = __decoratorStart(_a);
83
+ _thumbnail = new WeakMap();
84
+ __decorateElement(_init, 4, "thumbnail", _thumbnail_dec, _View, _thumbnail);
85
+ __decoratorMetadata(_init, _View);
86
+ __name(_View, "View");
87
+ /**
88
+ * May a page let people drag our things? `- it is draggable` says yes (epic `outline-spell` P28, `debut` P27).
89
+ * - Even then, only when the list holding one will give it up: its `can give up` rule.
90
+ * - "No" until a type says, or its `- on drag:` implies it: see `core.isAble()`.
91
+ */
92
+ __publicField(_View, "draggable", false);
93
+ /**
94
+ * May a page let people click our things? `- it is clickable` says yes, or its `- on click:` (epic `debut` P27).
95
+ * - Clickable, it shows the pointer; `- clickable when it is face down` runs its click only then.
96
+ */
97
+ __publicField(_View, "clickable", false);
98
+ /**
99
+ * May a page let people select our things? `- it is selectable` says yes (epic `outline-spell` P29).
100
+ * - A click selects one in its list; shift and command (ctrl) select more: see `ViewableList.selection`.
101
+ */
102
+ __publicField(_View, "selectable", false);
103
+ noAbilities(_View);
104
+ var View = _View;
31
105
  export {
32
106
  View
33
107
  };
@@ -3534,6 +3534,24 @@
3534
3534
  "module": "sites",
3535
3535
  "description": "Where a running site's address lives, as the host keeps it: `undefined` for none, and the site keeps its own."
3536
3536
  },
3537
+ {
3538
+ "property": "projectFolder",
3539
+ "of": "core",
3540
+ "module": "sites",
3541
+ "description": "The folder of the program running, as an address: `/spaces/@spell/sites/SpellApp`."
3542
+ },
3543
+ {
3544
+ "kind": "method",
3545
+ "name": "addressOfFile",
3546
+ "of": "core",
3547
+ "module": "sites",
3548
+ "params": [
3549
+ {
3550
+ "name": "file"
3551
+ }
3552
+ ],
3553
+ "description": "The address of `file`, a file of the running project: `snapshots/terms.jpg` => `/spaces/.../snapshots/terms.jpg`."
3554
+ },
3537
3555
  {
3538
3556
  "kind": "method",
3539
3557
  "name": "showSitePart",
@@ -270,6 +270,11 @@
270
270
  { name: "draw_it", syntax: "to draw its {slot:member_words} :? {statement_body}?" }
271
271
  ]
272
272
  },
273
+ {
274
+ path: "type:View/property:thumbnail",
275
+ detail: "text",
276
+ description: 'A picture of it, a file of its project: `snapshots/terms.jpg`.\n- Drawn while it has no drawing of its own: writing one replaces it.\n- A drawing can place it too: `draw its thumbnail`.\n- A site\'s card shows it, unless the site\'s line names its own.\n- Say it on its tag, `<spell-page "terms" thumbnail="snapshots/terms.jpg"/>`, or in its body, `- its thumbnail is "..."`.'
277
+ },
273
278
  {
274
279
  path: "type:Page",
275
280
  super: "type:View",
@@ -6,6 +6,16 @@ export declare const siteMethods: {
6
6
  * - The editor's Run sets it for each run: `/run/<project>/films/4` shows `/films/4`, and back and forward work.
7
7
  */
8
8
  siteHost: SiteHost | undefined;
9
+ /**
10
+ * The folder of the program running, as an address: `/spaces/@spell/sites/SpellApp`.
11
+ * - Set by whatever runs it; none: a file's name is left as it is, relative to the page.
12
+ */
13
+ projectFolder: string | undefined;
14
+ /**
15
+ * The address of `file`, a file of the running project: `snapshots/terms.jpg` => `/spaces/.../snapshots/terms.jpg`.
16
+ * - An address of its own (`/x.jpg`, `https://...`, `data:...`) is left as it is.
17
+ */
18
+ addressOfFile(file: string): string;
9
19
  /**
10
20
  * Show the site's page `name`, its parameter filled with `thing`, or open its dialog or sidebar of that name:
11
21
  * what `go to the film page for this film` and `show the settings dialog` compile to.
@@ -10,6 +10,18 @@ var siteMethods = defineCoreModule({
10
10
  * - The editor's Run sets it for each run: `/run/<project>/films/4` shows `/films/4`, and back and forward work.
11
11
  */
12
12
  siteHost: void 0,
13
+ /**
14
+ * The folder of the program running, as an address: `/spaces/@spell/sites/SpellApp`.
15
+ * - Set by whatever runs it; none: a file's name is left as it is, relative to the page.
16
+ */
17
+ projectFolder: void 0,
18
+ /**
19
+ * The address of `file`, a file of the running project: `snapshots/terms.jpg` => `/spaces/.../snapshots/terms.jpg`.
20
+ * - An address of its own (`/x.jpg`, `https://...`, `data:...`) is left as it is.
21
+ */
22
+ addressOfFile(file) {
23
+ return !core.projectFolder || /^(\/|[a-z][a-z0-9+.-]*:)/i.test(file) ? file : `${core.projectFolder}/${file}`;
24
+ },
13
25
  /**
14
26
  * Show the site's page `name`, its parameter filled with `thing`, or open its dialog or sidebar of that name:
15
27
  * what `go to the film page for this film` and `show the settings dialog` compile to.
@@ -23,9 +23,10 @@ export declare class Tokenizer {
23
23
  */
24
24
  standAloneTags: string[];
25
25
  /**
26
- * JSX tags that take a bare quoted string as an attribute, by the attribute it is:
26
+ * JSX tags that take a bare quoted string, by what it becomes:
27
27
  * `<example "one counter">` is `name="one counter"` with `{ example: "name" }`.
28
28
  * - e.g. spell's `{ example: "name", "tree-node": "label" }`.
29
+ * - `P.QUOTED_CONTENTS`: the word is the tag's contents, `<header "Hardware"/>` ~== `<header>Hardware</header>`.
29
30
  * - None by default: anywhere else a bare string in a tag is no attribute.
30
31
  */
31
32
  quotedNameTags: Record<string, string>;
@@ -227,6 +228,13 @@ export declare class Tokenizer {
227
228
  * `quotedNameTags` says -- only for one of them.
228
229
  */
229
230
  matchJSXQuotedName(tagName: string, text: string, start: number, end: number): P.JSXAttributeToken | undefined;
231
+ /**
232
+ * A tag's quoted word at `start`, `"Hardware"` in `<header "Hardware">`, as the tokens its contents would be
233
+ * between its tags -- only for a tag `quotedNameTags` says takes one (`P.QUOTED_CONTENTS`).
234
+ * - `{its name}` in it is a hole, as it is between the tags; anything else in the quotes is text, a `<` too.
235
+ * - `next`: where the tag's attributes go on.
236
+ */
237
+ private matchJSXQuotedContents;
230
238
  /**
231
239
  * A CHAIN tag's head at `start` of `text`, `<otherwise if its done is yes>`, as a `JSXElementToken` with its `chain`
232
240
  * and `phrase` -- `undefined` if no word of `chainTags` starts a tag there.
@@ -27,9 +27,10 @@ var Tokenizer = class _Tokenizer {
27
27
  */
28
28
  standAloneTags = [];
29
29
  /**
30
- * JSX tags that take a bare quoted string as an attribute, by the attribute it is:
30
+ * JSX tags that take a bare quoted string, by what it becomes:
31
31
  * `<example "one counter">` is `name="one counter"` with `{ example: "name" }`.
32
32
  * - e.g. spell's `{ example: "name", "tree-node": "label" }`.
33
+ * - `P.QUOTED_CONTENTS`: the word is the tag's contents, `<header "Hardware"/>` ~== `<header>Hardware</header>`.
33
34
  * - None by default: anywhere else a bare string in a tag is no attribute.
34
35
  */
35
36
  quotedNameTags = {};
@@ -435,9 +436,14 @@ var Tokenizer = class _Tokenizer {
435
436
  jsxElement.record.children = children;
436
437
  jsxElement.record.raw = text.slice(start, children[children.length - 1].next);
437
438
  }
438
- } else if (!jsxElement.record.isUnaryTag) {
439
- const children = this.rawTextTags.includes(jsxElement.tagName) ? this.matchRawJSXChildren(jsxElement.tagName, text, jsxElement.next, end) : this.matchJSXChildren(jsxElement.tagName, text, jsxElement.next, end);
440
- if (children && children.length) {
439
+ } else if (jsxElement.record.isUnaryTag) {
440
+ if (jsxElement.record.quotedContents?.length) {
441
+ jsxElement.record.children = jsxElement.record.quotedContents;
442
+ }
443
+ } else {
444
+ const matched = this.rawTextTags.includes(jsxElement.tagName) ? this.matchRawJSXChildren(jsxElement.tagName, text, jsxElement.next, end) : this.matchJSXChildren(jsxElement.tagName, text, jsxElement.next, end);
445
+ const children = [...jsxElement.record.quotedContents ?? [], ...matched ?? []];
446
+ if (children.length) {
441
447
  jsxElement.record.children = children;
442
448
  jsxElement.record.raw = text.slice(start, children[children.length - 1].next);
443
449
  }
@@ -483,6 +489,11 @@ var Tokenizer = class _Tokenizer {
483
489
  if (endBit !== ">" && endBit !== "/>") {
484
490
  const named = this.matchJSXQuotedName(tagName, text, nextStart, end);
485
491
  if (named) nextStart = named.next;
492
+ const quotedContents = named ? void 0 : this.matchJSXQuotedContents(tagName, text, nextStart, end);
493
+ if (quotedContents) {
494
+ nextStart = quotedContents.next;
495
+ jsxElement.record.quotedContents = quotedContents.contents;
496
+ }
486
497
  const attributes = named ? [named] : [];
487
498
  let endBitMatch;
488
499
  while (true) {
@@ -534,12 +545,39 @@ var Tokenizer = class _Tokenizer {
534
545
  */
535
546
  matchJSXQuotedName(tagName, text, start, end) {
536
547
  const name = this.quotedNameTags[tagName];
537
- if (!name) return void 0;
548
+ if (!name || name === P.QUOTED_CONTENTS) return void 0;
538
549
  const value = this.matchText(text, start, end);
539
550
  if (!value) return void 0;
540
551
  const next = this.eatWhitespace(text, value.next, end);
541
552
  return new P.JSXAttributeToken({ name, start, value, raw: text.slice(start, next) });
542
553
  }
554
+ /**
555
+ * A tag's quoted word at `start`, `"Hardware"` in `<header "Hardware">`, as the tokens its contents would be
556
+ * between its tags -- only for a tag `quotedNameTags` says takes one (`P.QUOTED_CONTENTS`).
557
+ * - `{its name}` in it is a hole, as it is between the tags; anything else in the quotes is text, a `<` too.
558
+ * - `next`: where the tag's attributes go on.
559
+ */
560
+ matchJSXQuotedContents(tagName, text, start, end) {
561
+ if (this.quotedNameTags[tagName] !== P.QUOTED_CONTENTS) return void 0;
562
+ const value = this.matchText(text, start, end);
563
+ if (!value) return void 0;
564
+ const wordStart = text.indexOf('"', start) + 1;
565
+ const wordEnd = wordStart + value.innerText.length;
566
+ const contents = [];
567
+ for (let at = wordStart; at < wordEnd; ) {
568
+ const brace = text.indexOf("{", at);
569
+ const textEnd = brace < 0 || brace >= wordEnd ? wordEnd : brace;
570
+ const hole = textEnd < wordEnd ? this.matchJSXExpression(text, textEnd, wordEnd) : void 0;
571
+ const stop = hole || textEnd === wordEnd ? textEnd : wordEnd;
572
+ if (stop > at) {
573
+ const raw = text.slice(at, stop);
574
+ contents.push(new P.JSXTextToken({ value: raw.replace(/\\(["\\])/g, "$1"), raw, start: at }));
575
+ }
576
+ if (hole) contents.push(hole);
577
+ at = hole ? hole.next : stop;
578
+ }
579
+ return { contents, next: this.eatWhitespace(text, value.next, end) };
580
+ }
543
581
  /**
544
582
  * A CHAIN tag's head at `start` of `text`, `<otherwise if its done is yes>`, as a `JSXElementToken` with its `chain`
545
583
  * and `phrase` -- `undefined` if no word of `chainTags` starts a tag there.
@@ -136,6 +136,8 @@ export declare class JSXElementToken extends JSXToken<never, JSXElementTokenProp
136
136
  get children(): JSXElementToken[] | undefined;
137
137
  /** Does this represent a unary tag? */
138
138
  get isUnaryTag(): boolean | undefined;
139
+ /** What its quoted word became, the first of its `children`: `Hardware` in `<header "Hardware">`. */
140
+ get quotedContents(): Token<any, P.TokenProps<any>>[] | undefined;
139
141
  /** What it couldn't read among its attributes, `Ždge="1,048"` -- `undefined` when it read them all. */
140
142
  get unreadable(): string | undefined;
141
143
  /** A chain branch's kind, `<if ...>`, `<otherwise>` ...: see `Tokenizer.chainTags`. `undefined` for an element. */
@@ -151,6 +153,8 @@ export type JSXElementTokenProps = Prettify<P.TokenProps<never>> & {
151
153
  tagName: string;
152
154
  /** Does this represent a unary tag? */
153
155
  isUnaryTag?: boolean;
156
+ /** What its quoted word became -- see `JSXElementToken.quotedContents`. */
157
+ quotedContents?: P.Token[];
154
158
  /** What it couldn't read among its attributes -- see `JSXElementToken.unreadable`. */
155
159
  unreadable?: string;
156
160
  /** A chain branch's kind -- see `JSXElementToken.chain`. */
@@ -190,6 +190,10 @@ var JSXElementToken = class extends JSXToken {
190
190
  get isUnaryTag() {
191
191
  return this.record.isUnaryTag;
192
192
  }
193
+ /** What its quoted word became, the first of its `children`: `Hardware` in `<header "Hardware">`. */
194
+ get quotedContents() {
195
+ return this.record.quotedContents;
196
+ }
193
197
  /** What it couldn't read among its attributes, `Ždge="1,048"` -- `undefined` when it read them all. */
194
198
  get unreadable() {
195
199
  return this.record.unreadable;
@@ -27,6 +27,11 @@ export type TokenMatcher<T = P.Token> = (text: string, start?: number, end?: num
27
27
  * Policy for automatically removing whitespace from the token stream.
28
28
  * - REFACTOR: idiomatic TS enum string pattern?
29
29
  */
30
+ /**
31
+ * In `Tokenizer.quotedNameTags`: this tag's quoted word is its contents, not an attribute.
32
+ * - `<header "Hardware"/>` ~== `<header>Hardware</header>`.
33
+ */
34
+ export declare const QUOTED_CONTENTS = "#contents";
30
35
  export declare const WhitespacePolicy: {
31
36
  readonly ALL: "ALL";
32
37
  readonly NONE: "NONE";
@@ -2,6 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
 
4
4
  // src/parser/tokenizer/tokenizer.types.ts
5
+ var QUOTED_CONTENTS = "#contents";
5
6
  var WhitespacePolicy = {
6
7
  ALL: "ALL",
7
8
  // Leave ALL whitespace
@@ -41,6 +42,7 @@ __name(offsetForPosition, "offsetForPosition");
41
42
  export {
42
43
  BACKSLASH,
43
44
  DOUBLE_QUOTE,
45
+ QUOTED_CONTENTS,
44
46
  SINGLE_QUOTE,
45
47
  WhitespacePolicy,
46
48
  getLineStarts,
@@ -29,6 +29,8 @@ class View(Thing):
29
29
  - `core.draw_thing()` draws it as that element, its own `draw()` inside; with no tag, as any thing draws.
30
30
  """
31
31
 
32
+ # a picture of it, a file of its project: drawn while it has no drawing of its own (`to draw it`, in the page)
33
+ thumbnail = prop()
32
34
  # our element's tag, e.g. `solitaire-card`: the compiled class names it -- see `core.element_tag_of()`
33
35
  element_tag: str | None = None
34
36
  # may a page let people drag our things? `- it is draggable` says yes -- the JavaScript core's `draggable`;
@@ -1370,6 +1370,27 @@ each tag line reads as its code-spell twin line, so it compiles to exactly what
1370
1370
  An attribute word the tag takes wins: `<view locked>` is unnamed and locked.
1371
1371
  - A tag's head may be named by a quoted name after its word in markup too, `<example "one counter">`:
1372
1372
  the parser's tokenizer reads it as `name="..."` (`quotedNameTags`); `<tree-node "If">` as `label="If"`.
1373
+ - A TAG'S QUOTED WORD (epic `language` P38): on the tags below, it's the tag's contents, or what names it:
1374
+ `<header "Hardware" size="large"/>` draws exactly what `<header size="large">Hardware</header>` draws.
1375
+ - As contents (`P.QUOTED_CONTENTS`), the tokenizer makes it the tag's first children:
1376
+ `{its name}` in it is a hole, other contents follow it, and it's a child even on a tag closed with `/>`.
1377
+ - Each language's spellings are listed: `<encabezado "...">`, `<es-encabezado "...">`.
1378
+ A word two languages spell alike but read differently is the language's own (`Language.quotedNameTags`).
1379
+
1380
+ | Tag | The quoted word is |
1381
+ | --- | --- |
1382
+ | `header`, `button`, `item`, `label`, `title`, `link`, `breadcrumb`, `checkbox`, `radio` | its contents |
1383
+ | `tab`, `panel` | its `label` |
1384
+ | `example` | its `name` |
1385
+ | `tree-node` | its `label` |
1386
+ | `cell` | its column (`data-column`) |
1387
+
1388
+ | Left out | Why |
1389
+ | --- | --- |
1390
+ | `text`, `description` | often long, or text mixed with values |
1391
+ | `td`, `th` | the web's own table tags |
1392
+ | `segment`, `column`, `content`, `stack` | they hold layouts; their short text is mostly in demos |
1393
+ | `author`, `date` | common only in Spell UI's feed and comment demos |
1373
1394
  - A COMMENT, `<!-- ... -->` (Owen, 2026-10-26), starting a line anywhere in the file: a `SP.SpellxCommentToken` per
1374
1395
  line, each a `CommentToken` as its `//` twin line is (`commentSymbol` `//`, its text without the marks).
1375
1396
  - One over several lines keeps reading lines as the comment to its `-->` (`openComment`), and `breakIntoLines()`
@@ -28,6 +28,8 @@ export declare class SpellParser extends P.Parser {
28
28
  get tokenizer(): P.Tokenizer;
29
29
  /** Spell's own tokenizer, for code spell -- and inside a spellx file's tags (`SP.SpellxTokenizer.spell`). */
30
30
  get spellTokenizer(): P.Tokenizer;
31
+ /** What our tokenizers are made with: spell's, and what this parser's language reads its own way. */
32
+ private get tokenizerProps();
31
33
  /**
32
34
  * Which FORM of spell we read: code spell (`Card.spell`), or spellx, its tag-shaped form (`Card.spellml`).
33
35
  * - Only our tokenizer differs: a spellx file's tags are tokens of their own (`SP.SpellxTokenizer`), and each tag