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.
- package/README-epics.md +149 -49
- package/app/package.json +25 -1
- package/app/spaces/@spell/guides/SpellUI/SpellUI.spellml +486 -486
- package/app/spaces/@spell/sites/SpellApp/SpellApp.spellml +50 -124
- package/dist/app/app/pages/SiteBoardView.css +5 -5
- package/dist/app/app/pages/SiteBoardView.js +1 -1
- package/dist/app/app/pages/SiteEditorPage.js +6 -3
- package/dist/app/app/pages/SiteEdits.js +27 -10
- package/dist/app/app/pages/SiteWrites.js +11 -0
- package/dist/app/app/runner/spellRuntime.js +1 -0
- package/dist/cli/publish/PublishedPackage.d.ts +2 -1
- package/dist/cli/publish/PublishedPackage.js +6 -3
- package/dist/cli/publish/ScratchInstall.d.ts +14 -3
- package/dist/cli/publish/ScratchInstall.js +69 -8
- package/dist/epic/cli/EpicProgram.js +20 -5
- package/dist/epic/cli/epicGroups.js +7 -1
- package/dist/epic/command/BaseBranch.d.ts +35 -0
- package/dist/epic/command/BaseBranch.js +58 -0
- package/dist/epic/command/EpicCheckout.d.ts +1 -1
- package/dist/epic/command/EpicCheckout.js +4 -4
- package/dist/epic/command/EpicGuide.js +3 -2
- package/dist/epic/command/EpicTools.d.ts +5 -0
- package/dist/epic/command/EpicTools.js +14 -3
- package/dist/epic/command/MainMerge.d.ts +26 -15
- package/dist/epic/command/MainMerge.js +60 -16
- package/dist/epic/command/PullRequest.d.ts +45 -0
- package/dist/epic/command/PullRequest.js +100 -0
- package/dist/epic/command/RepoInit.d.ts +196 -39
- package/dist/epic/command/RepoInit.js +481 -60
- package/dist/epic/command/Requests.d.ts +1 -0
- package/dist/epic/command/Requests.js +7 -1
- package/dist/epic/command/SessionMoves.js +2 -1
- package/dist/epic/command/SkillsCheck.js +3 -2
- package/dist/epic/command/Stock.js +3 -1
- package/dist/epic/command/TurnEnd.d.ts +1 -1
- package/dist/epic/command/TurnEnd.js +4 -3
- package/dist/epic/command/Worktrees.d.ts +20 -3
- package/dist/epic/command/Worktrees.js +39 -7
- package/dist/epic/command/command.types.d.ts +3 -0
- package/dist/epic/components/__pack/epics.entry.js +43 -43
- package/dist/epic/components/__pack/epics.pack.js +36 -12794
- package/dist/epic/config/CodeHost.d.ts +96 -0
- package/dist/epic/config/CodeHost.js +89 -0
- package/dist/epic/config/EngineFiles.mjs +60 -0
- package/dist/epic/config/EpicConfig.d.ts +20 -3
- package/dist/epic/config/EpicConfig.js +25 -1
- package/dist/epic/config/EpicRepo.js +1 -1
- package/dist/epic/config/GitHub.d.ts +75 -3
- package/dist/epic/config/GitHub.js +106 -5
- package/dist/epic/config/GitLab.d.ts +138 -0
- package/dist/epic/config/GitLab.js +297 -0
- package/dist/epic/config/LayeredSettings.js +3 -2
- package/dist/epic/server/EpicServer.d.ts +1 -1
- package/dist/epic/server/EpicServer.js +26 -12
- package/dist/epic/tool/InboxPoller.mjs +2 -1
- package/dist/epic/tool/MigrateCommands.js +6 -8
- package/dist/epic/tool/PlanCommits.d.ts +7 -4
- package/dist/epic/tool/PlanCommits.js +7 -5
- package/dist/epic/tool/PlanDocCommands.js +3 -4
- package/dist/epic/tool/PlanDocFiles.d.ts +3 -1
- package/dist/epic/tool/PlanDocFiles.js +13 -5
- package/dist/epic/tool/ServedFolders.d.ts +1 -1
- package/dist/epic/tool/ServedFolders.js +4 -4
- package/dist/epic/tools/PageInboxes.js +3 -3
- package/dist/epic/tools/_assets/commands.entry.js +149 -68
- package/dist/epic/tools/_assets/commands.js +20 -2073
- package/dist/epic/tools/_assets/core-reference.entry.js +244 -124
- package/dist/epic/tools/_assets/core-reference.js +20 -2142
- package/dist/epic/tools/_assets/emoji/cldr/0.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/a.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/b.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/c.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/d.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/e.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/f.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/g.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/h.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/i.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/j.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/k.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/l.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/m.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/n.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/o.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/p.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/r.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/s.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/t.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/u.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/v.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/w.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/x.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/y.js +2 -2
- package/dist/epic/tools/_assets/emoji/cldr/z.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/0.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/a.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/b.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/c.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/d.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/e.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/f.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/g.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/h.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/i.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/j.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/k.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/l.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/m.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/n.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/o.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/p.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/q.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/r.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/s.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/t.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/u.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/v.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/w.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/x.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/y.js +2 -2
- package/dist/epic/tools/_assets/emoji/fomantic/z.js +2 -2
- package/dist/epic/tools/_assets/goals-live.js +318 -210
- package/dist/epic/tools/_assets/highlight.min.js +5764 -5269
- package/dist/epic/tools/_assets/lazy/code-engine.js +5 -1270
- package/dist/epic/tools/_assets/lazy/markdown-engine.js +67 -1513
- package/dist/epic/tools/_assets/lazy/markdown-sanitizer.js +3 -753
- package/dist/epic/tools/_assets/spell-comments.entry.js +282 -159
- package/dist/epic/tools/_assets/spell-comments.js +24 -3716
- package/dist/epic/tools/_assets/spell-doc-comments.js +1243 -816
- package/dist/epic/tools/_assets/spell-doc-helpers.js +298 -165
- package/dist/epic/tools/_assets/spell-doc-runtime.js +2760 -1415
- package/dist/epic/tools/_assets/spell-doc-toolbar.js +396 -227
- package/dist/epic/tools/_assets/spell-syntax.entry.js +505 -285
- package/dist/epic/tools/_assets/spell-syntax.js +22 -2916
- package/dist/epic/tools/_assets/spell-ui-sources.js +102 -60
- package/dist/epic/tools/_assets/spell-ui.entry.js +108 -40
- package/dist/epic/tools/_assets/spell-ui.js +3131 -46465
- package/dist/epic/tools/pages.d.ts +5 -6
- package/dist/epic/tools/pages.js +7 -6
- package/dist/epic/window.mjs +2 -3
- package/dist/parser/core/classes/View.d.ts +20 -0
- package/dist/parser/core/classes/View.js +91 -17
- package/dist/parser/core/core.declarations.json5 +18 -0
- package/dist/parser/core/core.scopes.js +5 -0
- package/dist/parser/core/sites.d.ts +10 -0
- package/dist/parser/core/sites.js +12 -0
- package/dist/parser/parser/tokenizer/Tokenizer.d.ts +9 -1
- package/dist/parser/parser/tokenizer/Tokenizer.js +43 -5
- package/dist/parser/parser/tokenizer/Tokens.d.ts +4 -0
- package/dist/parser/parser/tokenizer/Tokens.js +4 -0
- package/dist/parser/parser/tokenizer/tokenizer.types.d.ts +5 -0
- package/dist/parser/parser/tokenizer/tokenizer.types.js +2 -0
- package/dist/parser/py/core/spell_core/apps.py +2 -0
- package/dist/parser/spell/PARSING.md +21 -0
- package/dist/parser/spell/SpellParser.d.ts +2 -0
- package/dist/parser/spell/SpellParser.js +58 -3
- package/dist/parser/spell/SpellxTokenizer.js +2 -1
- package/dist/parser/spell/SpellxTwin.d.ts +4 -1
- package/dist/parser/spell/SpellxTwin.js +10 -3
- package/dist/parser/spell/builtinTypes.js +24 -1
- package/dist/parser/spell/ingest/PlaceIngest.js +3 -1
- package/dist/parser/spell/languages/Language.d.ts +11 -2
- package/dist/parser/spell/languages/en/words.js +3 -2
- package/dist/parser/spell/languages/es/words.js +7 -4
- package/dist/parser/spell/rules/Statement.js +1 -1
- package/dist/parser/spell/rules/classes/DrawSlot.js +6 -1
- package/dist/parser/spell/rules/sites/SitePage.d.ts +3 -3
- package/dist/parser/spell/rules/sites/SitePage.js +2 -2
- package/dist/parser/spell/rules/sites/sites.en.js +1 -1
- package/dist/parser/spell/rules/sites/sites.es.js +1 -1
- package/dist/parser/spell/rules/sites/sites.shared.d.ts +2 -2
- package/dist/parser/spell/spell.types.d.ts +7 -0
- package/dist/parser/spell/spellSyntax.es.json +6 -6
- package/dist/parser/spell/spellSyntax.json +6 -6
- package/dist/parser/spellx/SpellxView.js +2 -1
- package/dist/ui/components/ui-accordion/UIAccordion.d.ts +1 -0
- package/dist/ui/components/ui-ad/UIAd.d.ts +1 -0
- package/dist/ui/components/ui-breadcrumbs/UIBreadcrumb.d.ts +1 -0
- package/dist/ui/components/ui-breadcrumbs/UIBreadcrumbs.d.ts +1 -0
- package/dist/ui/components/ui-button/UIButton.d.ts +8 -3
- package/dist/ui/components/ui-button/UIButton.fallback.d.ts +8 -3
- package/dist/ui/components/ui-button/UIButtons.d.ts +1 -0
- package/dist/ui/components/ui-button/UIOr.d.ts +1 -0
- package/dist/ui/components/ui-calendar/UICalendar.d.ts +6 -0
- package/dist/ui/components/ui-calendar/UICalendar.fallback.d.ts +6 -0
- package/dist/ui/components/ui-card/UICards.d.ts +31 -0
- package/dist/ui/components/ui-checkbox/UICheckbox.d.ts +7 -0
- package/dist/ui/components/ui-checkbox/UICheckbox.fallback.d.ts +7 -0
- package/dist/ui/components/ui-comment/UIComment.d.ts +1 -0
- package/dist/ui/components/ui-comment/UIComments.d.ts +1 -0
- package/dist/ui/components/ui-components/UIComponents.d.ts +1 -0
- package/dist/ui/components/ui-dimmer/UIDimmer.d.ts +1 -0
- package/dist/ui/components/ui-divider/UIDivider.d.ts +2 -0
- package/dist/ui/components/ui-dropdown/UIDropdown.d.ts +6 -0
- package/dist/ui/components/ui-dropdown/UIDropdown.fallback.d.ts +6 -0
- package/dist/ui/components/ui-embed/UIEmbed.d.ts +1 -0
- package/dist/ui/components/ui-emoji/UIEmoji.d.ts +1 -0
- package/dist/ui/components/ui-feed/UIFeed.d.ts +1 -0
- package/dist/ui/components/ui-feed/UIFeedEvent.d.ts +1 -0
- package/dist/ui/components/ui-flag/UIFlag.d.ts +1 -0
- package/dist/ui/components/ui-flyout/UIFlyout.d.ts +1 -0
- package/dist/ui/components/ui-form/UIFields.d.ts +1 -0
- package/dist/ui/components/ui-form/UIRepeat.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIColumn.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIGrid.d.ts +1 -0
- package/dist/ui/components/ui-grid/UIRow.d.ts +1 -0
- package/dist/ui/components/ui-icon/UIIcon.d.ts +3 -2
- package/dist/ui/components/ui-icon/UIIcons.d.ts +1 -0
- package/dist/ui/components/ui-icon-picker/UIIconPicker.d.ts +6 -0
- package/dist/ui/components/ui-icon-picker/UIIconPicker.fallback.d.ts +6 -0
- package/dist/ui/components/ui-image/UIImages.d.ts +1 -0
- package/dist/ui/components/ui-include/UIInclude.d.ts +1 -0
- package/dist/ui/components/ui-input/UIInput.fallback.d.ts +9 -2
- package/dist/ui/components/ui-items/UIItems.d.ts +1 -0
- package/dist/ui/components/ui-keys/UIKeys.d.ts +1 -0
- package/dist/ui/components/ui-label/UILabel.d.ts +2 -0
- package/dist/ui/components/ui-label/UILabels.d.ts +1 -0
- package/dist/ui/components/ui-list/UIList.d.ts +2 -0
- package/dist/ui/components/ui-loader/UILoader.d.ts +1 -0
- package/dist/ui/components/ui-message/UIMessage.d.ts +2 -0
- package/dist/ui/components/ui-modal/UIModal.d.ts +1 -0
- package/dist/ui/components/ui-nag/UINag.d.ts +1 -0
- package/dist/ui/components/ui-page/UIPage.d.ts +15 -0
- package/dist/ui/components/ui-page/UIPage.es.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIActions.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIAuthor.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIAvatar.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIContent.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDate.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDescription.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIDetail.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIExtra.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIHeader.d.ts +15 -3
- package/dist/ui/components/ui-parts/UIHeader.en.d.ts +5 -2
- package/dist/ui/components/ui-parts/UIHeader.en.js +6 -3
- package/dist/ui/components/ui-parts/UIHeader.js +45 -5
- package/dist/ui/components/ui-parts/UIMeta.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIParts.css +18 -0
- package/dist/ui/components/ui-parts/UIParts.css.inline.js +1 -1
- package/dist/ui/components/ui-parts/UIParts.types.d.ts +15 -1
- package/dist/ui/components/ui-parts/UISummary.d.ts +1 -0
- package/dist/ui/components/ui-parts/UITitle.d.ts +1 -0
- package/dist/ui/components/ui-parts/UIValue.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholder.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderHeader.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderImage.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderLine.d.ts +1 -0
- package/dist/ui/components/ui-placeholder/UIPlaceholderParagraph.d.ts +1 -0
- package/dist/ui/components/ui-progress/UIProgress.d.ts +2 -0
- package/dist/ui/components/ui-quote/UIQuote.d.ts +1 -0
- package/dist/ui/components/ui-rail/UIRail.d.ts +1 -0
- package/dist/ui/components/ui-rating/UIRating.d.ts +6 -0
- package/dist/ui/components/ui-rating/UIRating.fallback.d.ts +6 -0
- package/dist/ui/components/ui-reveal/UIReveal.d.ts +1 -0
- package/dist/ui/components/ui-search/UISearch.fallback.d.ts +13 -1
- package/dist/ui/components/ui-section/UISections.d.ts +1 -0
- package/dist/ui/components/ui-segment/UISegment.d.ts +2 -0
- package/dist/ui/components/ui-segment/UISegments.d.ts +1 -0
- package/dist/ui/components/ui-select/UISelect.d.ts +6 -0
- package/dist/ui/components/ui-select/UISelect.fallback.d.ts +6 -0
- package/dist/ui/components/ui-shape/UISide.d.ts +4 -0
- package/dist/ui/components/ui-sidebar/UIPushable.d.ts +1 -0
- package/dist/ui/components/ui-sidebar/UIPusher.d.ts +1 -0
- package/dist/ui/components/ui-sidebar/UISidebar.d.ts +1 -0
- package/dist/ui/components/ui-sides/UISides.d.ts +6 -0
- package/dist/ui/components/ui-sides/UISides.fallback.d.ts +6 -0
- package/dist/ui/components/ui-slider/UISlider.d.ts +7 -0
- package/dist/ui/components/ui-slider/UISlider.fallback.d.ts +7 -0
- package/dist/ui/components/ui-space/UISpace.d.ts +1 -0
- package/dist/ui/components/ui-statistic/UIStatistic.d.ts +1 -0
- package/dist/ui/components/ui-statistic/UIStatistics.d.ts +1 -0
- package/dist/ui/components/ui-step/UIStep.d.ts +1 -0
- package/dist/ui/components/ui-step/UISteps.d.ts +1 -0
- package/dist/ui/components/ui-table/UICell.d.ts +1 -0
- package/dist/ui/components/ui-terms/UITerm.d.ts +1 -0
- package/dist/ui/components/ui-terms/UITerms.d.ts +1 -0
- package/dist/ui/components/ui-theme-editor/UIColorChip.d.ts +1 -0
- package/dist/ui/components/ui-theme-editor/UIThemeToken.d.ts +1 -0
- package/dist/ui/components/ui-toast/UIToast.d.ts +1 -0
- package/dist/ui/components/ui-toc/UIToc.d.ts +1 -0
- package/dist/ui/components/ui-transition/UITransition.d.ts +1 -0
- package/dist/ui/components/ui-video/UIAudio.d.ts +1 -0
- package/dist/ui/components/ui-video/UIVideo.d.ts +1 -0
- package/dist/ui/components/ui-visibility/UIVisibility.d.ts +1 -0
- package/dist/ui/components/ui-zoom/UIZoom.d.ts +1 -0
- package/dist/ui/jsx.d.ts +4 -4
- package/dist/ui/vocabulary/defaults.generated.js +1 -1
- package/dist/util/spell/constants.js +1 -1
- package/epic/.claude-plugin/plugin.json +1 -1
- package/epic/.codex-plugin/plugin.json +1 -1
- package/epic/hooks/handoff.mjs +4 -3
- package/epic/hooks/worktree.mjs +22 -3
- package/epic/package.json +41 -2
- package/epic/skills/details/SKILL.md +2 -1
- package/epic/skills/epic/SKILL.md +7 -1
- package/epic/skills/epic/guide.md +3 -0
- package/epic/skills/isolate/SKILL.md +53 -20
- package/epic/src/AGENTS.md +11 -2
- package/epic/templates/durable.html +1 -1
- package/epic/vscode/package.json +1 -1
- package/epic/vscode/spell-epic.vsix +0 -0
- package/package.json +1 -1
- package/parser/package.json +1 -1
- package/ui/package.json +15 -2
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
Spell's own app as a site: a page per screen, each
|
|
3
|
-
What opens over a page is a dialog or a sidebar, opened from the buttons above its
|
|
2
|
+
Spell's own app as a site: a page per screen, each with a thumbnail of how it looks today.
|
|
3
|
+
What opens over a page is a dialog or a sidebar, opened from the buttons above its thumbnail.
|
|
4
4
|
Most addresses name a project, so they aren't in the navigation: Home links to one of each.
|
|
5
5
|
-->
|
|
6
6
|
|
|
7
|
-
<spell-
|
|
8
|
-
<property "file" description="The picture's file, in snapshots/, without its .jpg">text</property>
|
|
9
|
-
<draw>
|
|
10
|
-
<image src={"/spaces/@spell/sites/SpellApp/snapshots/" + its file + ".jpg"}/>
|
|
11
|
-
</draw>
|
|
12
|
-
</>
|
|
13
|
-
|
|
14
|
-
<spell-page "home page">
|
|
7
|
+
<spell-page "home page" thumbnail="snapshots/home.jpg">
|
|
15
8
|
<spell-stories>
|
|
16
9
|
- [x] open an example, a guide, a notebook or one of my projects from its card
|
|
17
10
|
- [x] start from a blank app, a small starter or Solitaire
|
|
@@ -28,31 +21,25 @@
|
|
|
28
21
|
<link link={"/site/@spell/examples/StarWarsSite"}>The site editor</link>
|
|
29
22
|
<link link={"/apps/@spell/examples/TaskList"}>A hosted app</link>
|
|
30
23
|
</stack>
|
|
31
|
-
draw
|
|
24
|
+
draw its thumbnail
|
|
32
25
|
</draw>
|
|
33
26
|
</>
|
|
34
27
|
|
|
35
|
-
<spell-page "notebook page">
|
|
28
|
+
<spell-page "notebook page" thumbnail="snapshots/notebook.jpg">
|
|
36
29
|
<spell-stories>
|
|
37
30
|
- [x] read a notebook, its words and its code in cells
|
|
38
31
|
</>
|
|
39
32
|
<property "notebook" description="What the address names">text</property>
|
|
40
|
-
<draw>
|
|
41
|
-
draw (a new picture with file = "notebook")
|
|
42
|
-
</draw>
|
|
43
33
|
</>
|
|
44
34
|
|
|
45
|
-
<spell-page "guide page">
|
|
35
|
+
<spell-page "guide page" thumbnail="snapshots/guide.jpg">
|
|
46
36
|
<spell-stories>
|
|
47
37
|
- [x] read a guide in the editor, its words as the comments of its spell file
|
|
48
38
|
</>
|
|
49
39
|
<property "guide" description="What the address names">text</property>
|
|
50
|
-
<draw>
|
|
51
|
-
draw (a new picture with file = "guide")
|
|
52
|
-
</draw>
|
|
53
40
|
</>
|
|
54
41
|
|
|
55
|
-
<spell-page "code editor page">
|
|
42
|
+
<spell-page "code editor page" thumbnail="snapshots/edit.jpg">
|
|
56
43
|
<spell-stories>
|
|
57
44
|
- [x] change the code in its file tabs, with the running app beside it
|
|
58
45
|
- [x] see the program's output, its compiled code and what I can use, in the Program panel under the code
|
|
@@ -75,22 +62,19 @@
|
|
|
75
62
|
<button appearance="basic" onClick={show the publish clash dialog}>Publish Clash</button>
|
|
76
63
|
<button appearance="basic" onClick={show the person dialog}>You</button>
|
|
77
64
|
</stack>
|
|
78
|
-
draw
|
|
65
|
+
draw its thumbnail
|
|
79
66
|
</draw>
|
|
80
67
|
</>
|
|
81
68
|
|
|
82
|
-
<spell-page "running app page">
|
|
69
|
+
<spell-page "running app page" thumbnail="snapshots/run.jpg">
|
|
83
70
|
<spell-stories>
|
|
84
71
|
- [x] use the program by itself, with no code showing
|
|
85
72
|
- [x] restart it
|
|
86
73
|
</>
|
|
87
74
|
<property "project" description="What the address names">text</property>
|
|
88
|
-
<draw>
|
|
89
|
-
draw (a new picture with file = "run")
|
|
90
|
-
</draw>
|
|
91
75
|
</>
|
|
92
76
|
|
|
93
|
-
<spell-page "site editor page">
|
|
77
|
+
<spell-page "site editor page" thumbnail="snapshots/site-pages.jpg">
|
|
94
78
|
<spell-stories>
|
|
95
79
|
- [x] see a site's pages as a tree and a board of cards
|
|
96
80
|
- [x] drag a row to move a page, with its pages
|
|
@@ -103,21 +87,18 @@
|
|
|
103
87
|
<stack direction="horizontal" wrap spacing="s">
|
|
104
88
|
<button appearance="basic" onClick={show the site data sidebar}>Data</button>
|
|
105
89
|
</stack>
|
|
106
|
-
draw
|
|
90
|
+
draw its thumbnail
|
|
107
91
|
</draw>
|
|
108
92
|
</>
|
|
109
93
|
|
|
110
|
-
<spell-page "theme editor page">
|
|
94
|
+
<spell-page "theme editor page" thumbnail="snapshots/theme.jpg">
|
|
111
95
|
<spell-stories>
|
|
112
96
|
- [x] change a theme and see it on real pages
|
|
113
97
|
- [x] save it by name, to pick from every theme menu
|
|
114
98
|
</>
|
|
115
|
-
<draw>
|
|
116
|
-
draw (a new picture with file = "theme")
|
|
117
|
-
</draw>
|
|
118
99
|
</>
|
|
119
100
|
|
|
120
|
-
<spell-page "hosted app page">
|
|
101
|
+
<spell-page "hosted app page" thumbnail="snapshots/hosted-program.jpg">
|
|
121
102
|
<spell-stories>
|
|
122
103
|
- [x] use a program at its own address on Spell's cloud
|
|
123
104
|
</>
|
|
@@ -126,122 +107,67 @@
|
|
|
126
107
|
<stack direction="horizontal" wrap spacing="s">
|
|
127
108
|
<button appearance="basic" onClick={show the sign-in dialog}>Sign In</button>
|
|
128
109
|
</stack>
|
|
129
|
-
draw
|
|
110
|
+
draw its thumbnail
|
|
130
111
|
</draw>
|
|
131
112
|
</>
|
|
132
113
|
|
|
133
|
-
<spell-page "terms page">
|
|
114
|
+
<spell-page "terms page" thumbnail="snapshots/terms.jpg">
|
|
134
115
|
<spell-stories>
|
|
135
116
|
- [x] read Spell's terms
|
|
136
117
|
</>
|
|
137
|
-
<draw>
|
|
138
|
-
draw (a new picture with file = "terms")
|
|
139
|
-
</draw>
|
|
140
118
|
</>
|
|
141
119
|
|
|
142
|
-
<spell-view "inspector sidebar"
|
|
143
|
-
<draw>
|
|
144
|
-
draw (a new picture with file = "inspector")
|
|
145
|
-
</draw>
|
|
146
|
-
</>
|
|
120
|
+
<spell-view "inspector sidebar" thumbnail="snapshots/inspector.jpg"/>
|
|
147
121
|
|
|
148
|
-
<spell-view "palette sidebar"
|
|
149
|
-
<draw>
|
|
150
|
-
draw (a new picture with file = "palette")
|
|
151
|
-
</draw>
|
|
152
|
-
</>
|
|
122
|
+
<spell-view "palette sidebar" thumbnail="snapshots/palette.jpg"/>
|
|
153
123
|
|
|
154
|
-
<spell-view "site data sidebar"
|
|
155
|
-
<draw>
|
|
156
|
-
draw (a new picture with file = "site-data")
|
|
157
|
-
</draw>
|
|
158
|
-
</>
|
|
124
|
+
<spell-view "site data sidebar" thumbnail="snapshots/site-data.jpg"/>
|
|
159
125
|
|
|
160
|
-
<spell-view "project settings dialog"
|
|
161
|
-
<draw>
|
|
162
|
-
draw (a new picture with file = "project-settings")
|
|
163
|
-
</draw>
|
|
164
|
-
</>
|
|
126
|
+
<spell-view "project settings dialog" thumbnail="snapshots/project-settings.jpg"/>
|
|
165
127
|
|
|
166
|
-
<spell-view "code settings dialog"
|
|
167
|
-
<draw>
|
|
168
|
-
draw (a new picture with file = "code-settings")
|
|
169
|
-
</draw>
|
|
170
|
-
</>
|
|
128
|
+
<spell-view "code settings dialog" thumbnail="snapshots/code-settings.jpg"/>
|
|
171
129
|
|
|
172
|
-
<spell-view "project versions dialog"
|
|
173
|
-
<draw>
|
|
174
|
-
draw (a new picture with file = "versions")
|
|
175
|
-
</draw>
|
|
176
|
-
</>
|
|
130
|
+
<spell-view "project versions dialog" thumbnail="snapshots/versions.jpg"/>
|
|
177
131
|
|
|
178
|
-
<spell-view "new file dialog"
|
|
179
|
-
<draw>
|
|
180
|
-
draw (a new picture with file = "new-file")
|
|
181
|
-
</draw>
|
|
182
|
-
</>
|
|
132
|
+
<spell-view "new file dialog" thumbnail="snapshots/new-file.jpg"/>
|
|
183
133
|
|
|
184
|
-
<spell-view "new project dialog"
|
|
185
|
-
<draw>
|
|
186
|
-
draw (a new picture with file = "new-project")
|
|
187
|
-
</draw>
|
|
188
|
-
</>
|
|
134
|
+
<spell-view "new project dialog" thumbnail="snapshots/new-project.jpg"/>
|
|
189
135
|
|
|
190
|
-
<spell-view "duplicate project dialog"
|
|
191
|
-
<draw>
|
|
192
|
-
draw (a new picture with file = "duplicate-project")
|
|
193
|
-
</draw>
|
|
194
|
-
</>
|
|
136
|
+
<spell-view "duplicate project dialog" thumbnail="snapshots/duplicate-project.jpg"/>
|
|
195
137
|
|
|
196
|
-
<spell-view "change this dialog"
|
|
197
|
-
<draw>
|
|
198
|
-
draw (a new picture with file = "change-this")
|
|
199
|
-
</draw>
|
|
200
|
-
</>
|
|
138
|
+
<spell-view "change this dialog" thumbnail="snapshots/change-this.jpg"/>
|
|
201
139
|
|
|
202
|
-
<spell-view "publish clash dialog"
|
|
203
|
-
<draw>
|
|
204
|
-
draw (a new picture with file = "publish-clash")
|
|
205
|
-
</draw>
|
|
206
|
-
</>
|
|
140
|
+
<spell-view "publish clash dialog" thumbnail="snapshots/publish-clash.jpg"/>
|
|
207
141
|
|
|
208
|
-
<spell-view "person dialog"
|
|
209
|
-
<draw>
|
|
210
|
-
draw (a new picture with file = "you")
|
|
211
|
-
</draw>
|
|
212
|
-
</>
|
|
142
|
+
<spell-view "person dialog" thumbnail="snapshots/you.jpg"/>
|
|
213
143
|
|
|
214
|
-
<spell-view "sign-in dialog"
|
|
215
|
-
<draw>
|
|
216
|
-
draw (a new picture with file = "sign-in")
|
|
217
|
-
</draw>
|
|
218
|
-
</>
|
|
144
|
+
<spell-view "sign-in dialog" thumbnail="snapshots/sign-in.jpg"/>
|
|
219
145
|
|
|
220
146
|
<spell-site "spell app">
|
|
221
|
-
<page "home page" address="/" title="Home" state="old"
|
|
222
|
-
<page "notebook page" address="/edit/@spell/guides/SpellUI/:notebook*" title="Notebook" state="old"
|
|
223
|
-
<page "guide page" address="/edit/@spell/guides/:guide" title="Guide" state="old"
|
|
224
|
-
<page "code editor page" address="/edit/:project*" title="Edit" state="old"
|
|
225
|
-
<page "running app page" address="/run/:project*" title="Run" state="old"
|
|
147
|
+
<page "home page" address="/" title="Home" state="old" color="red"/>
|
|
148
|
+
<page "notebook page" address="/edit/@spell/guides/SpellUI/:notebook*" title="Notebook" state="old" color="orange"/>
|
|
149
|
+
<page "guide page" address="/edit/@spell/guides/:guide" title="Guide" state="old" color="yellow"/>
|
|
150
|
+
<page "code editor page" address="/edit/:project*" title="Edit" state="old" color="olive">
|
|
151
|
+
<page "running app page" address="/run/:project*" title="Run" state="old"/>
|
|
226
152
|
</>
|
|
227
|
-
<page "site editor page" address="/site/:project*" title="Site Editor" state="old"
|
|
228
|
-
<page "theme editor page" address="/theme" title="Theme Editor" state="old"
|
|
229
|
-
<page "hosted app page" address="/apps/:project*" title="Hosted App" state="old"
|
|
230
|
-
<page "terms page" address="/terms" title="Terms" state="old"
|
|
153
|
+
<page "site editor page" address="/site/:project*" title="Site Editor" state="old" color="green"/>
|
|
154
|
+
<page "theme editor page" address="/theme" title="Theme Editor" state="old" color="teal"/>
|
|
155
|
+
<page "hosted app page" address="/apps/:project*" title="Hosted App" state="old" color="blue">
|
|
156
|
+
<page "terms page" address="/terms" title="Terms" state="old"/>
|
|
231
157
|
</>
|
|
232
|
-
<sidebar "inspector sidebar"
|
|
233
|
-
<sidebar "palette sidebar"
|
|
234
|
-
<sidebar "site data sidebar"
|
|
235
|
-
<dialog "project settings dialog"
|
|
236
|
-
<dialog "code settings dialog"
|
|
237
|
-
<dialog "project versions dialog"
|
|
238
|
-
<dialog "new file dialog"
|
|
239
|
-
<dialog "new project dialog"
|
|
240
|
-
<dialog "duplicate project dialog"
|
|
241
|
-
<dialog "change this dialog"
|
|
242
|
-
<dialog "publish clash dialog"
|
|
243
|
-
<dialog "person dialog"
|
|
244
|
-
<dialog "sign-in dialog"
|
|
158
|
+
<sidebar "inspector sidebar"/>
|
|
159
|
+
<sidebar "palette sidebar"/>
|
|
160
|
+
<sidebar "site data sidebar"/>
|
|
161
|
+
<dialog "project settings dialog"/>
|
|
162
|
+
<dialog "code settings dialog"/>
|
|
163
|
+
<dialog "project versions dialog"/>
|
|
164
|
+
<dialog "new file dialog"/>
|
|
165
|
+
<dialog "new project dialog"/>
|
|
166
|
+
<dialog "duplicate project dialog"/>
|
|
167
|
+
<dialog "change this dialog"/>
|
|
168
|
+
<dialog "publish clash dialog"/>
|
|
169
|
+
<dialog "person dialog"/>
|
|
170
|
+
<dialog "sign-in dialog"/>
|
|
245
171
|
<page "not found page"/>
|
|
246
172
|
<page "error page"/>
|
|
247
173
|
</>
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* of one width, so a section's columns line up with the others'.
|
|
4
4
|
* - A card's DOM element has no box (`display: contents`): its `::part(card)` is what sits in the grid,
|
|
5
5
|
* at its `--SiteCard-row` and `--SiteCard-column`.
|
|
6
|
-
* - On a board with any
|
|
6
|
+
* - On a board with any thumbnail, every card is the same size, and a thumbnail shows only as much of itself as fits,
|
|
7
7
|
* from its top: a tall sidebar is cut off.
|
|
8
8
|
*/
|
|
9
9
|
.SiteBoard {
|
|
10
10
|
--SiteBoard-card-width: 156px;
|
|
11
11
|
--SiteBoard-gap: 12px;
|
|
12
|
-
--SiteBoard-
|
|
12
|
+
--SiteBoard-thumbnail-height: 96px;
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
15
15
|
gap: 26px;
|
|
@@ -93,11 +93,11 @@
|
|
|
93
93
|
}
|
|
94
94
|
&::part(image) {
|
|
95
95
|
flex: none;
|
|
96
|
-
height: var(--SiteBoard-
|
|
96
|
+
height: var(--SiteBoard-thumbnail-height);
|
|
97
97
|
overflow: hidden;
|
|
98
98
|
pointer-events: none;
|
|
99
99
|
}
|
|
100
|
-
/* its title and line, centred in what's left under a
|
|
100
|
+
/* its title and line, centred in what's left under a thumbnail */
|
|
101
101
|
&::part(content) {
|
|
102
102
|
flex: 1 1 auto;
|
|
103
103
|
display: flex;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
opacity: 0.45;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
/* the page's link to itself in a new tab: 8px inside the card's corner, readable over a
|
|
142
|
+
/* the page's link to itself in a new tab: 8px inside the card's corner, readable over a thumbnail */
|
|
143
143
|
.new-tab {
|
|
144
144
|
position: absolute;
|
|
145
145
|
top: 8px;
|
|
@@ -188,8 +188,8 @@ function SiteEditorPage() {
|
|
|
188
188
|
get lineOf() {
|
|
189
189
|
return SiteEditorPage.lineOf;
|
|
190
190
|
},
|
|
191
|
-
get
|
|
192
|
-
return SiteEditorPage.
|
|
191
|
+
get thumbnailOf() {
|
|
192
|
+
return SiteEditorPage.thumbnailOf;
|
|
193
193
|
},
|
|
194
194
|
get newTabUrlOf() {
|
|
195
195
|
return SiteEditorPage.newTabUrlOf;
|
|
@@ -289,7 +289,10 @@ SiteEditorPage.cardTitleOf = (part) => {
|
|
|
289
289
|
const words = title.replace(/\s+(?:dialog|modal|sidebar|flyout)$/i, "");
|
|
290
290
|
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
291
291
|
};
|
|
292
|
-
SiteEditorPage.
|
|
292
|
+
SiteEditorPage.thumbnailOf = (part) => {
|
|
293
|
+
const thumbnail = part.thumbnail ?? SiteWrites.thumbnailOf(part.name);
|
|
294
|
+
return thumbnail && SP.SpellUrls.fileUrl(`${editor.project?.path}/${thumbnail}`);
|
|
295
|
+
};
|
|
293
296
|
SiteEditorPage.newTabUrlOf = (part) => part.kind === "page" && part.address && editor.project ? RunSite.runUrlFor(editor.project.path, part.address) : void 0;
|
|
294
297
|
SiteEditorPage.freeAddress = (parts) => {
|
|
295
298
|
const taken = new Set(parts.map((part) => part.address));
|
|
@@ -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/app/pages/SiteEdits.ts
|
|
5
|
+
import { escapeRegExp } from "spell/util/string";
|
|
5
6
|
import { CODE_SITE, SPELLX_SITE, declaresSite } from "../../spaces/models/siteFiles.js";
|
|
6
7
|
var SiteEdits = class _SiteEdits {
|
|
7
8
|
static {
|
|
@@ -143,6 +144,22 @@ var SiteEdits = class _SiteEdits {
|
|
|
143
144
|
static declarationOf(text, name) {
|
|
144
145
|
return declarationOf(text, name);
|
|
145
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* The thumbnail written on part `name`'s own page or view in `text`, if it's declared there.
|
|
149
|
+
* - `<spell-page "x" thumbnail="...">`, `<spell-view "x" thumbnail="...">`, or a line of its body,
|
|
150
|
+
* `- its thumbnail is "..."`.
|
|
151
|
+
* - A site's `button usage page` may be declared as `button usage`: either name finds it.
|
|
152
|
+
*/
|
|
153
|
+
static thumbnailOf(text, name) {
|
|
154
|
+
if (!text.includes("thumbnail")) return void 0;
|
|
155
|
+
for (const quoted of [name, name.replace(/ page$/, "")].map((each) => escapeRegExp(JSON.stringify(each)))) {
|
|
156
|
+
const tag = new RegExp(`^<spell-(?:page|view) ${quoted}[^\\n]*`, "m").exec(text)?.[0];
|
|
157
|
+
if (tag) return ATTRIBUTE("thumbnail").exec(tag)?.[1];
|
|
158
|
+
const body = new RegExp(`^an? ${quoted} is an? (?:page|view)[^\\n]*\\n((?:[ \\t]+[^\\n]*\\n)*)`, "m").exec(text);
|
|
159
|
+
if (body) return /^[ \t]*- its thumbnail is "([^"]*)"/m.exec(body[1])?.[1];
|
|
160
|
+
}
|
|
161
|
+
return void 0;
|
|
162
|
+
}
|
|
146
163
|
/**
|
|
147
164
|
* Can `part` have pages under it?
|
|
148
165
|
* - Only a page with an address: the not found and error pages are shown when no address matches,
|
|
@@ -300,7 +317,7 @@ function spellxPartsIn(text, start) {
|
|
|
300
317
|
tab: ATTRIBUTE("tab").exec(attributes)?.[1],
|
|
301
318
|
tags: ATTRIBUTE("tags").exec(attributes)?.[1],
|
|
302
319
|
state: ATTRIBUTE("state").exec(attributes)?.[1],
|
|
303
|
-
|
|
320
|
+
thumbnail: ATTRIBUTE("thumbnail").exec(attributes)?.[1],
|
|
304
321
|
row: numberIn(ATTRIBUTE("row").exec(attributes)?.[1]),
|
|
305
322
|
column: numberIn(ATTRIBUTE("column").exec(attributes)?.[1]),
|
|
306
323
|
color: ATTRIBUTE("color").exec(attributes)?.[1],
|
|
@@ -325,7 +342,7 @@ function codePartsIn(text, start) {
|
|
|
325
342
|
if (line.text.trim() && !/^[ \t]/.test(line.text)) break;
|
|
326
343
|
const written = CODE_PART.exec(line.text);
|
|
327
344
|
if (!written) continue;
|
|
328
|
-
const [, indent, written_name, address, title, tab, tags, state,
|
|
345
|
+
const [, indent, written_name, address, title, tab, tags, state, thumbnail, row, column, color] = written;
|
|
329
346
|
const isQuoted = /^".*"$/.test(written_name);
|
|
330
347
|
const name = isQuoted ? written_name.slice(1, -1) : written_name;
|
|
331
348
|
while (open.length && open.at(-1).indent.length >= indent.length) open.pop();
|
|
@@ -337,7 +354,7 @@ function codePartsIn(text, start) {
|
|
|
337
354
|
tab,
|
|
338
355
|
tags,
|
|
339
356
|
state,
|
|
340
|
-
|
|
357
|
+
thumbnail,
|
|
341
358
|
row: numberIn(row),
|
|
342
359
|
column: numberIn(column),
|
|
343
360
|
color,
|
|
@@ -424,7 +441,7 @@ function declarationOf(text, name) {
|
|
|
424
441
|
return { start: first.start, end };
|
|
425
442
|
}
|
|
426
443
|
__name(declarationOf, "declarationOf");
|
|
427
|
-
function spellxLineWith(line, { address, title, tab, tags, state,
|
|
444
|
+
function spellxLineWith(line, { address, title, tab, tags, state, thumbnail, row, column, color }) {
|
|
428
445
|
let changed = line;
|
|
429
446
|
for (const [word, value] of [
|
|
430
447
|
["address", address],
|
|
@@ -432,7 +449,7 @@ function spellxLineWith(line, { address, title, tab, tags, state, picture, row,
|
|
|
432
449
|
["tab", tab],
|
|
433
450
|
["tags", tags],
|
|
434
451
|
["state", state],
|
|
435
|
-
["
|
|
452
|
+
["thumbnail", thumbnail],
|
|
436
453
|
["row", row === void 0 ? void 0 : `${row}`],
|
|
437
454
|
["column", column === void 0 ? void 0 : `${column}`],
|
|
438
455
|
["color", color]
|
|
@@ -445,22 +462,22 @@ function spellxLineWith(line, { address, title, tab, tags, state, picture, row,
|
|
|
445
462
|
return changed;
|
|
446
463
|
}
|
|
447
464
|
__name(spellxLineWith, "spellxLineWith");
|
|
448
|
-
function wordsOf({ address, title, tab, tags, state,
|
|
449
|
-
return { address, title, tab, tags, state,
|
|
465
|
+
function wordsOf({ address, title, tab, tags, state, thumbnail, row, column, color }) {
|
|
466
|
+
return { address, title, tab, tags, state, thumbnail, row, column, color };
|
|
450
467
|
}
|
|
451
468
|
__name(wordsOf, "wordsOf");
|
|
452
469
|
function numberIn(text) {
|
|
453
470
|
return text === void 0 ? void 0 : Number(text);
|
|
454
471
|
}
|
|
455
472
|
__name(numberIn, "numberIn");
|
|
456
|
-
function codeLineWith(line, part, { address, title, tab, tags, state,
|
|
473
|
+
function codeLineWith(line, part, { address, title, tab, tags, state, thumbnail, row, column, color }) {
|
|
457
474
|
const ending = line.endsWith("\n") ? "\n" : "";
|
|
458
475
|
const at = address === void 0 ? "" : ` at ${JSON.stringify(address)}`;
|
|
459
476
|
const named = title === void 0 || !address ? "" : `, named ${JSON.stringify(title)}`;
|
|
460
477
|
const tabbed = tab === void 0 || !address ? "" : `, tab ${JSON.stringify(tab)}`;
|
|
461
478
|
const tagged = tags === void 0 || !address ? "" : `, tagged ${JSON.stringify(tags)}`;
|
|
462
479
|
const stated = state === void 0 || !address ? "" : `, ${state}`;
|
|
463
|
-
const pictured =
|
|
480
|
+
const pictured = thumbnail === void 0 || !address ? "" : `, thumbnail ${JSON.stringify(thumbnail)}`;
|
|
464
481
|
const placed = row === void 0 || column === void 0 ? "" : `, in row ${row} column ${column}`;
|
|
465
482
|
const colored = color === void 0 ? "" : `, colored ${color}`;
|
|
466
483
|
const name = part.isQuoted ? JSON.stringify(part.name) : part.name;
|
|
@@ -472,7 +489,7 @@ function articleOf(name) {
|
|
|
472
489
|
}
|
|
473
490
|
__name(articleOf, "articleOf");
|
|
474
491
|
var SPELLX_PART = /^<(page|dialog|sidebar)\s+"([^"]+)"([^>]*?)\s*(\/>|>)$/;
|
|
475
|
-
var CODE_PART = /^([ \t]+)- it has an? (.+?)(?: at "([^"]*)")?(?:, named "([^"]*)")?(?:, tab "([^"]*)")?(?:, tagged "([^"]*)")?(?:, (old|new|mocked|built))?(?:,
|
|
492
|
+
var CODE_PART = /^([ \t]+)- it has an? (.+?)(?: at "([^"]*)")?(?:, named "([^"]*)")?(?:, tab "([^"]*)")?(?:, tagged "([^"]*)")?(?:, (old|new|mocked|built))?(?:, thumbnail "([^"]*)")?(?:, in row (\d+) column (\d+))?(?:, colou?red (\w+))?\s*$/;
|
|
476
493
|
var SPELLX_CLOSES_ITSELF = /\s*\/>(\s*)$/;
|
|
477
494
|
var ATTRIBUTE = /* @__PURE__ */ __name((word) => new RegExp(`\\b${word}="([^"]*)"`), "ATTRIBUTE");
|
|
478
495
|
var PART_NAME = /^[\p{L}\p{N}][\p{L}\p{N} _-]*$/u;
|
|
@@ -124,6 +124,17 @@ var SiteWrites = class _SiteWrites {
|
|
|
124
124
|
(text) => PageStories.withStories(text, name, stories)
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* The thumbnail on part `name`'s own page or view, from whichever of the project's files declares it.
|
|
129
|
+
* - None for a part another project declares: its site line has to say.
|
|
130
|
+
*/
|
|
131
|
+
static thumbnailOf(name) {
|
|
132
|
+
for (const file of editor.project?.files ?? []) {
|
|
133
|
+
const thumbnail = SiteEdits.thumbnailOf(file.contents ?? "", name);
|
|
134
|
+
if (thumbnail) return thumbnail;
|
|
135
|
+
}
|
|
136
|
+
return void 0;
|
|
137
|
+
}
|
|
127
138
|
/** The project's file declaring page `name`: the site's own, else another of its files; none for an imported page. */
|
|
128
139
|
static declaringFile(name) {
|
|
129
140
|
const files = editor.project?.files ?? [];
|
|
@@ -35,6 +35,7 @@ function runApp(compiled, { appRoot, layout, siteHost, ...options }) {
|
|
|
35
35
|
if (appRoot) core.appRoot = appRoot;
|
|
36
36
|
core.appLayout = !!layout;
|
|
37
37
|
core.siteHost = siteHost;
|
|
38
|
+
core.projectFolder = options.projectId ? `/spaces/${encodeURI(options.projectId)}` : void 0;
|
|
38
39
|
return runCompiled(compiled, options);
|
|
39
40
|
}
|
|
40
41
|
__name(runApp, "runApp");
|
|
@@ -54,7 +54,8 @@ export declare class PublishedPackage {
|
|
|
54
54
|
/**
|
|
55
55
|
* One of the kit's folders, built into the ONE package: its code into `dist/<folder>/`, its `files` into
|
|
56
56
|
* `<folder>/`, and a `<folder>/package.json` naming its commands (`"spell": { "commands" }`), which the published
|
|
57
|
-
* kit finds by its `"spell": { "folders" }` (`kitFolders()`)
|
|
57
|
+
* kit finds by its `"spell": { "folders" }` (`kitFolders()`), and its `"pageServer"`, at the built paths:
|
|
58
|
+
* the folder's own settings stay readable (the epic server's route modules, `repoSettings()`).
|
|
58
59
|
*/
|
|
59
60
|
private stageFolder;
|
|
60
61
|
/** `report`'s counts added to the package's own. */
|
|
@@ -58,7 +58,8 @@ var PublishedPackage = class {
|
|
|
58
58
|
/**
|
|
59
59
|
* One of the kit's folders, built into the ONE package: its code into `dist/<folder>/`, its `files` into
|
|
60
60
|
* `<folder>/`, and a `<folder>/package.json` naming its commands (`"spell": { "commands" }`), which the published
|
|
61
|
-
* kit finds by its `"spell": { "folders" }` (`kitFolders()`)
|
|
61
|
+
* kit finds by its `"spell": { "folders" }` (`kitFolders()`), and its `"pageServer"`, at the built paths:
|
|
62
|
+
* the folder's own settings stay readable (the epic server's route modules, `repoSettings()`).
|
|
62
63
|
*/
|
|
63
64
|
async stageFolder(folder) {
|
|
64
65
|
const name = basename(folder.root);
|
|
@@ -68,14 +69,16 @@ var PublishedPackage = class {
|
|
|
68
69
|
mkdirSync(dirname(join(folderStage, file)), { recursive: true });
|
|
69
70
|
cpSync(join(folder.root, file), join(folderStage, file), { recursive: true });
|
|
70
71
|
}
|
|
72
|
+
const fromFolder = /* @__PURE__ */ __name((path) => builtPath(path).replace(/^(\.\/)?dist\//, `../${DIST}/${name}/`), "fromFolder");
|
|
71
73
|
const entry = folder.manifest.spell;
|
|
72
|
-
const shipped = Object.entries(entry ?? {}).map(([key, path]) => [key,
|
|
74
|
+
const shipped = Object.entries(entry ?? {}).map(([key, path]) => [key, fromFolder(path)]).filter(([, path]) => existsSync(join(folderStage, path)));
|
|
73
75
|
const manifest = {
|
|
74
76
|
name: folder.manifest.name,
|
|
75
77
|
version: this.version,
|
|
76
78
|
private: true,
|
|
77
79
|
type: "module",
|
|
78
|
-
...shipped.length && { spell: Object.fromEntries(shipped) }
|
|
80
|
+
...shipped.length && { spell: Object.fromEntries(shipped) },
|
|
81
|
+
...folder.manifest.pageServer ? { pageServer: mapStrings(folder.manifest.pageServer, fromFolder) } : {}
|
|
79
82
|
};
|
|
80
83
|
mkdirSync(folderStage, { recursive: true });
|
|
81
84
|
writeFileSync(join(folderStage, "package.json"), `${JSON.stringify(manifest, null, 2)}
|
|
@@ -2,12 +2,14 @@ import type { PackedPackage, PublishCheck } from "spell/cli/publish";
|
|
|
2
2
|
/****************
|
|
3
3
|
* ### ScratchInstall
|
|
4
4
|
* The packed packages, installed the way someone outside would: a project in the system's temp folder, far from any
|
|
5
|
-
* checkout, `npm install`s every `.tgz`, then
|
|
5
|
+
* checkout, `npm install`s every `.tgz`, then these checks run there (epic `repo-split` P19's Verify):
|
|
6
6
|
* 1. node imports `spell/util` and `spell/parser/parser`
|
|
7
7
|
* 2. a page Vite builds, importing `spell/ui/ui-button` and `spell/element`, draws a `<ui-button>` in headless Chromium,
|
|
8
8
|
* with ONE element base: the button's class extends the page's own `E.DOMElement`, and the built page holds one
|
|
9
9
|
* `class DOMElement`
|
|
10
10
|
* 3. `npx spell help` runs; and `npx epic --help`, when `spell-epic` is among them
|
|
11
|
+
* 4. with `spell-epic`: `epic init` in a scratch git repo starts the epic server, under a scratch `HOME`, on a free port;
|
|
12
|
+
* an epic page and the epics pack answer (epic `epic-engine` I246: it started only from a checkout)
|
|
11
13
|
* - Third-party packages come from the npm registry: it needs the network.
|
|
12
14
|
* - Each package's name is pinned to its `.tgz` (`overrides`), so the packages' dependencies on each other
|
|
13
15
|
* (`spell` on `spell-ui` ...) find the packed ones, never the registry's.
|
|
@@ -19,7 +21,7 @@ export declare class ScratchInstall {
|
|
|
19
21
|
/** The scratch project's folder. */
|
|
20
22
|
readonly dir: string;
|
|
21
23
|
constructor(packed: PackedPackage[]);
|
|
22
|
-
/** Install, then run the
|
|
24
|
+
/** Install, then run the checks; every result, passed or failed. NEVER throws. */
|
|
23
25
|
run(): Promise<PublishCheck[]>;
|
|
24
26
|
/** `npm install` every packed file, each name pinned to its file. */
|
|
25
27
|
private install;
|
|
@@ -29,12 +31,21 @@ export declare class ScratchInstall {
|
|
|
29
31
|
private spellHelp;
|
|
30
32
|
/** `npx epic --help`, from the installed `spell-epic`: its bin runs `spell`'s built epic command. */
|
|
31
33
|
private epicHelp;
|
|
34
|
+
/**
|
|
35
|
+
* `epic init` in a scratch git repo, under a scratch `HOME` and on a free port: the epic server starts from the
|
|
36
|
+
* install, then an epic page and the epics pack answer. The server is stopped again, whatever happens.
|
|
37
|
+
* - `--no-plugin`: no Claude Code, no editor, no network; `--no-commit`, `--no-remote`: nothing to push
|
|
38
|
+
*/
|
|
39
|
+
private epicServer;
|
|
32
40
|
/**
|
|
33
41
|
* A page importing `spell-ui` and `spell/element`, built by the installed Vite, served, and opened in headless
|
|
34
42
|
* Chromium: it draws a `<ui-button>`, whose class extends the page's own `E.DOMElement`.
|
|
35
43
|
*/
|
|
36
44
|
private page;
|
|
37
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Run `command` in the scratch folder (or `cwd`); its output. Throws with its stderr when it fails.
|
|
47
|
+
* - `env`: added to this process's; the checkout's own `epic` variables never reach it
|
|
48
|
+
*/
|
|
38
49
|
private exec;
|
|
39
50
|
/** One check, from `work`'s result or failure. */
|
|
40
51
|
private step;
|