forgebook 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +136 -2
- package/dist/bin/forgebook/catalogueVite.d.ts +16 -0
- package/dist/bin/forgebook/catalogueVite.d.ts.map +1 -0
- package/dist/bin/forgebook/catalogueVite.js +15 -0
- package/dist/bin/forgebook/catalogueVite.js.map +1 -0
- package/dist/bin/forgebook/forgebook.d.mts +3 -0
- package/dist/bin/forgebook/forgebook.d.mts.map +1 -0
- package/dist/bin/forgebook/forgebook.mjs +93 -0
- package/dist/bin/forgebook/forgebook.mjs.map +1 -0
- package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts +90 -0
- package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts.map +1 -0
- package/dist/bin/forgebook-docs/catalogueDocs.types.js +1 -0
- package/dist/bin/forgebook-docs/catalogueDocs.types.js.map +1 -0
- package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts +9 -0
- package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts.map +1 -0
- package/dist/bin/forgebook-docs/catalogueMarkdown.js +132 -0
- package/dist/bin/forgebook-docs/catalogueMarkdown.js.map +1 -0
- package/dist/bin/forgebook-docs/collectDocs.d.ts +17 -0
- package/dist/bin/forgebook-docs/collectDocs.d.ts.map +1 -0
- package/dist/bin/forgebook-docs/collectDocs.js +115 -0
- package/dist/bin/forgebook-docs/collectDocs.js.map +1 -0
- package/dist/bin/forgebook-docs/forgebook-docs.d.mts +3 -0
- package/dist/bin/forgebook-docs/forgebook-docs.d.mts.map +1 -0
- package/dist/bin/forgebook-docs/forgebook-docs.mjs +115 -0
- package/dist/bin/forgebook-docs/forgebook-docs.mjs.map +1 -0
- package/dist/bin/forgebook-docs/moduleDocs.d.ts +9 -0
- package/dist/bin/forgebook-docs/moduleDocs.d.ts.map +1 -0
- package/dist/bin/forgebook-docs/moduleDocs.js +62 -0
- package/dist/bin/forgebook-docs/moduleDocs.js.map +1 -0
- package/dist/bin/forgebook-docs/sassDocs.d.ts +20 -0
- package/dist/bin/forgebook-docs/sassDocs.d.ts.map +1 -0
- package/dist/bin/forgebook-docs/sassDocs.js +77 -0
- package/dist/bin/forgebook-docs/sassDocs.js.map +1 -0
- package/dist/bin/forgebook-texts/forgebook-texts.d.mts +3 -0
- package/dist/bin/forgebook-texts/forgebook-texts.d.mts.map +1 -0
- package/dist/bin/forgebook-texts/forgebook-texts.mjs +94 -0
- package/dist/bin/forgebook-texts/forgebook-texts.mjs.map +1 -0
- package/dist/bin/forgebook-texts/storyTextsReport.d.ts +26 -0
- package/dist/bin/forgebook-texts/storyTextsReport.d.ts.map +1 -0
- package/dist/bin/forgebook-texts/storyTextsReport.js +35 -0
- package/dist/bin/forgebook-texts/storyTextsReport.js.map +1 -0
- package/dist/bin/forgebook-texts/storyTextsReport.types.d.ts +25 -0
- package/dist/bin/forgebook-texts/storyTextsReport.types.d.ts.map +1 -0
- package/dist/bin/forgebook-texts/storyTextsReport.types.js +7 -0
- package/dist/bin/forgebook-texts/storyTextsReport.types.js.map +1 -0
- package/dist/src/a11y.d.ts +28 -0
- package/dist/src/a11y.d.ts.map +1 -0
- package/dist/src/a11y.js +29 -0
- package/dist/src/a11y.js.map +1 -0
- package/dist/src/argTypes.d.ts +114 -0
- package/dist/src/argTypes.d.ts.map +1 -0
- package/dist/src/argTypes.js +254 -0
- package/dist/src/argTypes.js.map +1 -0
- package/dist/src/backdrops.d.ts +88 -0
- package/dist/src/backdrops.d.ts.map +1 -0
- package/dist/src/backdrops.js +202 -0
- package/dist/src/backdrops.js.map +1 -0
- package/dist/src/catalogue.d.ts +120 -0
- package/dist/src/catalogue.d.ts.map +1 -0
- package/dist/src/catalogue.js +80 -0
- package/dist/src/catalogue.js.map +1 -0
- package/dist/src/componentDocs.d.ts +98 -0
- package/dist/src/componentDocs.d.ts.map +1 -0
- package/dist/src/componentDocs.js +47 -0
- package/dist/src/componentDocs.js.map +1 -0
- package/dist/src/frame/checkStory.d.ts +20 -0
- package/dist/src/frame/checkStory.d.ts.map +1 -0
- package/dist/src/frame/checkStory.js +31 -0
- package/dist/src/frame/checkStory.js.map +1 -0
- package/dist/src/frame/frame.css +51 -0
- package/dist/src/frame/frameClock.d.ts +53 -0
- package/dist/src/frame/frameClock.d.ts.map +1 -0
- package/dist/src/frame/frameClock.js +80 -0
- package/dist/src/frame/frameClock.js.map +1 -0
- package/dist/src/frame/frameStatus.d.ts +8 -0
- package/dist/src/frame/frameStatus.d.ts.map +1 -0
- package/dist/src/frame/frameStatus.js +8 -0
- package/dist/src/frame/frameStatus.js.map +1 -0
- package/dist/src/frame/frameView.d.ts +33 -0
- package/dist/src/frame/frameView.d.ts.map +1 -0
- package/dist/src/frame/frameView.js +134 -0
- package/dist/src/frame/frameView.js.map +1 -0
- package/dist/src/frame/matrixLayout.d.ts +36 -0
- package/dist/src/frame/matrixLayout.d.ts.map +1 -0
- package/dist/src/frame/matrixLayout.js +87 -0
- package/dist/src/frame/matrixLayout.js.map +1 -0
- package/dist/src/frame/measureTools.d.ts +24 -0
- package/dist/src/frame/measureTools.d.ts.map +1 -0
- package/dist/src/frame/measureTools.js +141 -0
- package/dist/src/frame/measureTools.js.map +1 -0
- package/dist/src/frame/mountFrame.d.ts +47 -0
- package/dist/src/frame/mountFrame.d.ts.map +1 -0
- package/dist/src/frame/mountFrame.js +229 -0
- package/dist/src/frame/mountFrame.js.map +1 -0
- package/dist/src/frame/playStory.d.ts +40 -0
- package/dist/src/frame/playStory.d.ts.map +1 -0
- package/dist/src/frame/playStory.js +55 -0
- package/dist/src/frame/playStory.js.map +1 -0
- package/dist/src/frame/renderer.d.ts +85 -0
- package/dist/src/frame/renderer.d.ts.map +1 -0
- package/dist/src/frame/renderer.js +18 -0
- package/dist/src/frame/renderer.js.map +1 -0
- package/dist/src/frame/settle.d.ts +24 -0
- package/dist/src/frame/settle.d.ts.map +1 -0
- package/dist/src/frame/settle.js +25 -0
- package/dist/src/frame/settle.js.map +1 -0
- package/dist/src/frame/staleModule.d.ts +40 -0
- package/dist/src/frame/staleModule.d.ts.map +1 -0
- package/dist/src/frame/staleModule.js +74 -0
- package/dist/src/frame/staleModule.js.map +1 -0
- package/dist/src/frame/storyCanvas.d.ts +21 -0
- package/dist/src/frame/storyCanvas.d.ts.map +1 -0
- package/dist/src/frame/storyCanvas.js +30 -0
- package/dist/src/frame/storyCanvas.js.map +1 -0
- package/dist/src/frame/storyHooks.d.ts +31 -0
- package/dist/src/frame/storyHooks.d.ts.map +1 -0
- package/dist/src/frame/storyHooks.js +59 -0
- package/dist/src/frame/storyHooks.js.map +1 -0
- package/dist/src/frame/storyModule.d.ts +104 -0
- package/dist/src/frame/storyModule.d.ts.map +1 -0
- package/dist/src/frame/storyModule.js +205 -0
- package/dist/src/frame/storyModule.js.map +1 -0
- package/dist/src/frame/storyRun.d.ts +96 -0
- package/dist/src/frame/storyRun.d.ts.map +1 -0
- package/dist/src/frame/storyRun.js +318 -0
- package/dist/src/frame/storyRun.js.map +1 -0
- package/dist/src/languages.d.ts +15 -0
- package/dist/src/languages.d.ts.map +1 -0
- package/dist/src/languages.js +8 -0
- package/dist/src/languages.js.map +1 -0
- package/dist/src/matrix.d.ts +56 -0
- package/dist/src/matrix.d.ts.map +1 -0
- package/dist/src/matrix.js +61 -0
- package/dist/src/matrix.js.map +1 -0
- package/dist/src/messages.d.ts +203 -0
- package/dist/src/messages.d.ts.map +1 -0
- package/dist/src/messages.js +193 -0
- package/dist/src/messages.js.map +1 -0
- package/dist/src/namedValues.d.ts +38 -0
- package/dist/src/namedValues.d.ts.map +1 -0
- package/dist/src/namedValues.js +48 -0
- package/dist/src/namedValues.js.map +1 -0
- package/dist/src/pageConfig.d.ts +23 -0
- package/dist/src/pageConfig.d.ts.map +1 -0
- package/dist/src/pageConfig.js +1 -0
- package/dist/src/pageConfig.js.map +1 -0
- package/dist/src/playTrace.d.ts +41 -0
- package/dist/src/playTrace.d.ts.map +1 -0
- package/dist/src/playTrace.js +35 -0
- package/dist/src/playTrace.js.map +1 -0
- package/dist/src/shell/A11yTab.d.ts +44 -0
- package/dist/src/shell/A11yTab.d.ts.map +1 -0
- package/dist/src/shell/A11yTab.js +30 -0
- package/dist/src/shell/A11yTab.js.map +1 -0
- package/dist/src/shell/ApiReference.d.ts +18 -0
- package/dist/src/shell/ApiReference.d.ts.map +1 -0
- package/dist/src/shell/ApiReference.js +41 -0
- package/dist/src/shell/ApiReference.js.map +1 -0
- package/dist/src/shell/ClockControls.d.ts +43 -0
- package/dist/src/shell/ClockControls.d.ts.map +1 -0
- package/dist/src/shell/ClockControls.js +53 -0
- package/dist/src/shell/ClockControls.js.map +1 -0
- package/dist/src/shell/Code.d.ts +16 -0
- package/dist/src/shell/Code.d.ts.map +1 -0
- package/dist/src/shell/Code.js +9 -0
- package/dist/src/shell/Code.js.map +1 -0
- package/dist/src/shell/CodeTab.d.ts +17 -0
- package/dist/src/shell/CodeTab.d.ts.map +1 -0
- package/dist/src/shell/CodeTab.js +17 -0
- package/dist/src/shell/CodeTab.js.map +1 -0
- package/dist/src/shell/CodeText.d.ts +16 -0
- package/dist/src/shell/CodeText.d.ts.map +1 -0
- package/dist/src/shell/CodeText.js +10 -0
- package/dist/src/shell/CodeText.js.map +1 -0
- package/dist/src/shell/ComponentPage.d.ts +38 -0
- package/dist/src/shell/ComponentPage.d.ts.map +1 -0
- package/dist/src/shell/ComponentPage.js +146 -0
- package/dist/src/shell/ComponentPage.js.map +1 -0
- package/dist/src/shell/Dock.d.ts +42 -0
- package/dist/src/shell/Dock.d.ts.map +1 -0
- package/dist/src/shell/Dock.js +90 -0
- package/dist/src/shell/Dock.js.map +1 -0
- package/dist/src/shell/EventsTab.d.ts +25 -0
- package/dist/src/shell/EventsTab.d.ts.map +1 -0
- package/dist/src/shell/EventsTab.js +26 -0
- package/dist/src/shell/EventsTab.js.map +1 -0
- package/dist/src/shell/FrameView.d.ts +49 -0
- package/dist/src/shell/FrameView.d.ts.map +1 -0
- package/dist/src/shell/FrameView.js +29 -0
- package/dist/src/shell/FrameView.js.map +1 -0
- package/dist/src/shell/HomePage.d.ts +39 -0
- package/dist/src/shell/HomePage.d.ts.map +1 -0
- package/dist/src/shell/HomePage.js +85 -0
- package/dist/src/shell/HomePage.js.map +1 -0
- package/dist/src/shell/InteractionsTab.d.ts +28 -0
- package/dist/src/shell/InteractionsTab.d.ts.map +1 -0
- package/dist/src/shell/InteractionsTab.js +17 -0
- package/dist/src/shell/InteractionsTab.js.map +1 -0
- package/dist/src/shell/MatrixPicker.d.ts +24 -0
- package/dist/src/shell/MatrixPicker.d.ts.map +1 -0
- package/dist/src/shell/MatrixPicker.js +29 -0
- package/dist/src/shell/MatrixPicker.js.map +1 -0
- package/dist/src/shell/PackageHtml.d.ts +17 -0
- package/dist/src/shell/PackageHtml.d.ts.map +1 -0
- package/dist/src/shell/PackageHtml.js +13 -0
- package/dist/src/shell/PackageHtml.js.map +1 -0
- package/dist/src/shell/PartsTab.d.ts +23 -0
- package/dist/src/shell/PartsTab.d.ts.map +1 -0
- package/dist/src/shell/PartsTab.js +23 -0
- package/dist/src/shell/PartsTab.js.map +1 -0
- package/dist/src/shell/PropFields.d.ts +31 -0
- package/dist/src/shell/PropFields.d.ts.map +1 -0
- package/dist/src/shell/PropFields.js +81 -0
- package/dist/src/shell/PropFields.js.map +1 -0
- package/dist/src/shell/PropsTab.d.ts +45 -0
- package/dist/src/shell/PropsTab.d.ts.map +1 -0
- package/dist/src/shell/PropsTab.js +81 -0
- package/dist/src/shell/PropsTab.js.map +1 -0
- package/dist/src/shell/SchemeSwitches.d.ts +24 -0
- package/dist/src/shell/SchemeSwitches.d.ts.map +1 -0
- package/dist/src/shell/SchemeSwitches.js +36 -0
- package/dist/src/shell/SchemeSwitches.js.map +1 -0
- package/dist/src/shell/Segmented.d.ts +41 -0
- package/dist/src/shell/Segmented.d.ts.map +1 -0
- package/dist/src/shell/Segmented.js +19 -0
- package/dist/src/shell/Segmented.js.map +1 -0
- package/dist/src/shell/Shell.d.ts +49 -0
- package/dist/src/shell/Shell.d.ts.map +1 -0
- package/dist/src/shell/Shell.js +279 -0
- package/dist/src/shell/Shell.js.map +1 -0
- package/dist/src/shell/Sidebar.d.ts +52 -0
- package/dist/src/shell/Sidebar.d.ts.map +1 -0
- package/dist/src/shell/Sidebar.js +132 -0
- package/dist/src/shell/Sidebar.js.map +1 -0
- package/dist/src/shell/SidebarHandle.d.ts +29 -0
- package/dist/src/shell/SidebarHandle.d.ts.map +1 -0
- package/dist/src/shell/SidebarHandle.js +46 -0
- package/dist/src/shell/SidebarHandle.js.map +1 -0
- package/dist/src/shell/Stage.d.ts +68 -0
- package/dist/src/shell/Stage.d.ts.map +1 -0
- package/dist/src/shell/Stage.js +218 -0
- package/dist/src/shell/Stage.js.map +1 -0
- package/dist/src/shell/StageTools.d.ts +27 -0
- package/dist/src/shell/StageTools.d.ts.map +1 -0
- package/dist/src/shell/StageTools.js +34 -0
- package/dist/src/shell/StageTools.js.map +1 -0
- package/dist/src/shell/StageViewport.d.ts +47 -0
- package/dist/src/shell/StageViewport.d.ts.map +1 -0
- package/dist/src/shell/StageViewport.js +174 -0
- package/dist/src/shell/StageViewport.js.map +1 -0
- package/dist/src/shell/StoryCodeBlock.d.ts +35 -0
- package/dist/src/shell/StoryCodeBlock.d.ts.map +1 -0
- package/dist/src/shell/StoryCodeBlock.js +27 -0
- package/dist/src/shell/StoryCodeBlock.js.map +1 -0
- package/dist/src/shell/StoryPicker.d.ts +26 -0
- package/dist/src/shell/StoryPicker.d.ts.map +1 -0
- package/dist/src/shell/StoryPicker.js +32 -0
- package/dist/src/shell/StoryPicker.js.map +1 -0
- package/dist/src/shell/Toolbar.d.ts +40 -0
- package/dist/src/shell/Toolbar.d.ts.map +1 -0
- package/dist/src/shell/Toolbar.js +125 -0
- package/dist/src/shell/Toolbar.js.map +1 -0
- package/dist/src/shell/WidthField.d.ts +24 -0
- package/dist/src/shell/WidthField.d.ts.map +1 -0
- package/dist/src/shell/WidthField.js +40 -0
- package/dist/src/shell/WidthField.js.map +1 -0
- package/dist/src/shell/catalogueContext.d.ts +6 -0
- package/dist/src/shell/catalogueContext.d.ts.map +1 -0
- package/dist/src/shell/catalogueContext.js +14 -0
- package/dist/src/shell/catalogueContext.js.map +1 -0
- package/dist/src/shell/codeTokens.d.ts +23 -0
- package/dist/src/shell/codeTokens.d.ts.map +1 -0
- package/dist/src/shell/codeTokens.js +48 -0
- package/dist/src/shell/codeTokens.js.map +1 -0
- package/dist/src/shell/codeWriter.d.ts +6 -0
- package/dist/src/shell/codeWriter.d.ts.map +1 -0
- package/dist/src/shell/codeWriter.js +14 -0
- package/dist/src/shell/codeWriter.js.map +1 -0
- package/dist/src/shell/compareVariants.d.ts +35 -0
- package/dist/src/shell/compareVariants.d.ts.map +1 -0
- package/dist/src/shell/compareVariants.js +68 -0
- package/dist/src/shell/compareVariants.js.map +1 -0
- package/dist/src/shell/dockTabs.d.ts +63 -0
- package/dist/src/shell/dockTabs.d.ts.map +1 -0
- package/dist/src/shell/dockTabs.js +140 -0
- package/dist/src/shell/dockTabs.js.map +1 -0
- package/dist/src/shell/icons.d.ts +47 -0
- package/dist/src/shell/icons.d.ts.map +1 -0
- package/dist/src/shell/icons.js +36 -0
- package/dist/src/shell/icons.js.map +1 -0
- package/dist/src/shell/keyboard.d.ts +35 -0
- package/dist/src/shell/keyboard.d.ts.map +1 -0
- package/dist/src/shell/keyboard.js +51 -0
- package/dist/src/shell/keyboard.js.map +1 -0
- package/dist/src/shell/mountShell.d.ts +22 -0
- package/dist/src/shell/mountShell.d.ts.map +1 -0
- package/dist/src/shell/mountShell.js +39 -0
- package/dist/src/shell/mountShell.js.map +1 -0
- package/dist/src/shell/shell.css +1831 -0
- package/dist/src/shell/strings.d.ts +184 -0
- package/dist/src/shell/strings.d.ts.map +1 -0
- package/dist/src/shell/strings.js +188 -0
- package/dist/src/shell/strings.js.map +1 -0
- package/dist/src/shell/switchView.d.ts +23 -0
- package/dist/src/shell/switchView.d.ts.map +1 -0
- package/dist/src/shell/switchView.js +19 -0
- package/dist/src/shell/switchView.js.map +1 -0
- package/dist/src/shell/treeSearch.d.ts +35 -0
- package/dist/src/shell/treeSearch.d.ts.map +1 -0
- package/dist/src/shell/treeSearch.js +60 -0
- package/dist/src/shell/treeSearch.js.map +1 -0
- package/dist/src/shell/useComponentDocs.d.ts +16 -0
- package/dist/src/shell/useComponentDocs.d.ts.map +1 -0
- package/dist/src/shell/useComponentDocs.js +25 -0
- package/dist/src/shell/useComponentDocs.js.map +1 -0
- package/dist/src/shell/useCopy.d.ts +10 -0
- package/dist/src/shell/useCopy.d.ts.map +1 -0
- package/dist/src/shell/useCopy.js +23 -0
- package/dist/src/shell/useCopy.js.map +1 -0
- package/dist/src/shell/useFrameMessages.d.ts +54 -0
- package/dist/src/shell/useFrameMessages.d.ts.map +1 -0
- package/dist/src/shell/useFrameMessages.js +90 -0
- package/dist/src/shell/useFrameMessages.js.map +1 -0
- package/dist/src/shell/useFrameQueue.d.ts +29 -0
- package/dist/src/shell/useFrameQueue.d.ts.map +1 -0
- package/dist/src/shell/useFrameQueue.js +72 -0
- package/dist/src/shell/useFrameQueue.js.map +1 -0
- package/dist/src/shell/useLiveView.d.ts +29 -0
- package/dist/src/shell/useLiveView.d.ts.map +1 -0
- package/dist/src/shell/useLiveView.js +51 -0
- package/dist/src/shell/useLiveView.js.map +1 -0
- package/dist/src/shell/useLoaded.d.ts +20 -0
- package/dist/src/shell/useLoaded.d.ts.map +1 -0
- package/dist/src/shell/useLoaded.js +40 -0
- package/dist/src/shell/useLoaded.js.map +1 -0
- package/dist/src/shell/usePageDoc.d.ts +20 -0
- package/dist/src/shell/usePageDoc.d.ts.map +1 -0
- package/dist/src/shell/usePageDoc.js +21 -0
- package/dist/src/shell/usePageDoc.js.map +1 -0
- package/dist/src/shell/usePopover.d.ts +23 -0
- package/dist/src/shell/usePopover.d.ts.map +1 -0
- package/dist/src/shell/usePopover.js +39 -0
- package/dist/src/shell/usePopover.js.map +1 -0
- package/dist/src/shell/useRecentPages.d.ts +21 -0
- package/dist/src/shell/useRecentPages.d.ts.map +1 -0
- package/dist/src/shell/useRecentPages.js +62 -0
- package/dist/src/shell/useRecentPages.js.map +1 -0
- package/dist/src/shell/useScrollMemory.d.ts +40 -0
- package/dist/src/shell/useScrollMemory.d.ts.map +1 -0
- package/dist/src/shell/useScrollMemory.js +69 -0
- package/dist/src/shell/useScrollMemory.js.map +1 -0
- package/dist/src/shell/useSidebarLayout.d.ts +14 -0
- package/dist/src/shell/useSidebarLayout.d.ts.map +1 -0
- package/dist/src/shell/useSidebarLayout.js +19 -0
- package/dist/src/shell/useSidebarLayout.js.map +1 -0
- package/dist/src/shell/useStored.d.ts +11 -0
- package/dist/src/shell/useStored.d.ts.map +1 -0
- package/dist/src/shell/useStored.js +68 -0
- package/dist/src/shell/useStored.js.map +1 -0
- package/dist/src/shell/useStoryCode.d.ts +14 -0
- package/dist/src/shell/useStoryCode.d.ts.map +1 -0
- package/dist/src/shell/useStoryCode.js +29 -0
- package/dist/src/shell/useStoryCode.js.map +1 -0
- package/dist/src/shell/useStoryHeights.d.ts +9 -0
- package/dist/src/shell/useStoryHeights.d.ts.map +1 -0
- package/dist/src/shell/useStoryHeights.js +31 -0
- package/dist/src/shell/useStoryHeights.js.map +1 -0
- package/dist/src/shell/useStoryIdsElement.d.ts +7 -0
- package/dist/src/shell/useStoryIdsElement.d.ts.map +1 -0
- package/dist/src/shell/useStoryIdsElement.js +29 -0
- package/dist/src/shell/useStoryIdsElement.js.map +1 -0
- package/dist/src/shell/useStoryKeys.d.ts +11 -0
- package/dist/src/shell/useStoryKeys.d.ts.map +1 -0
- package/dist/src/shell/useStoryKeys.js +40 -0
- package/dist/src/shell/useStoryKeys.js.map +1 -0
- package/dist/src/shell/useSystemDark.d.ts +3 -0
- package/dist/src/shell/useSystemDark.d.ts.map +1 -0
- package/dist/src/shell/useSystemDark.js +19 -0
- package/dist/src/shell/useSystemDark.js.map +1 -0
- package/dist/src/sourceFiles.d.ts +18 -0
- package/dist/src/sourceFiles.d.ts.map +1 -0
- package/dist/src/sourceFiles.js +22 -0
- package/dist/src/sourceFiles.js.map +1 -0
- package/dist/src/storyBackground.d.ts +21 -0
- package/dist/src/storyBackground.d.ts.map +1 -0
- package/dist/src/storyBackground.js +27 -0
- package/dist/src/storyBackground.js.map +1 -0
- package/dist/src/storyClock.d.ts +62 -0
- package/dist/src/storyClock.d.ts.map +1 -0
- package/dist/src/storyClock.js +51 -0
- package/dist/src/storyClock.js.map +1 -0
- package/dist/src/storyGlobals.d.ts +60 -0
- package/dist/src/storyGlobals.d.ts.map +1 -0
- package/dist/src/storyGlobals.js +117 -0
- package/dist/src/storyGlobals.js.map +1 -0
- package/dist/src/storyHeights.d.ts +37 -0
- package/dist/src/storyHeights.d.ts.map +1 -0
- package/dist/src/storyHeights.js +53 -0
- package/dist/src/storyHeights.js.map +1 -0
- package/dist/src/storyIdsElement.d.ts +9 -0
- package/dist/src/storyIdsElement.d.ts.map +1 -0
- package/dist/src/storyIdsElement.js +9 -0
- package/dist/src/storyIdsElement.js.map +1 -0
- package/dist/src/storyTexts.d.ts +43 -0
- package/dist/src/storyTexts.d.ts.map +1 -0
- package/dist/src/storyTexts.js +71 -0
- package/dist/src/storyTexts.js.map +1 -0
- package/dist/src/storyTree.d.ts +215 -0
- package/dist/src/storyTree.d.ts.map +1 -0
- package/dist/src/storyTree.js +308 -0
- package/dist/src/storyTree.js.map +1 -0
- package/dist/src/switches.d.ts +156 -0
- package/dist/src/switches.d.ts.map +1 -0
- package/dist/src/switches.js +193 -0
- package/dist/src/switches.js.map +1 -0
- package/dist/src/viewState.d.ts +194 -0
- package/dist/src/viewState.d.ts.map +1 -0
- package/dist/src/viewState.js +303 -0
- package/dist/src/viewState.js.map +1 -0
- package/dist/src/vite/adapter.d.ts +70 -0
- package/dist/src/vite/adapter.d.ts.map +1 -0
- package/dist/src/vite/adapter.js +22 -0
- package/dist/src/vite/adapter.js.map +1 -0
- package/dist/src/vite/autoTitle.d.ts +28 -0
- package/dist/src/vite/autoTitle.d.ts.map +1 -0
- package/dist/src/vite/autoTitle.js +44 -0
- package/dist/src/vite/autoTitle.js.map +1 -0
- package/dist/src/vite/componentPage.d.ts +34 -0
- package/dist/src/vite/componentPage.d.ts.map +1 -0
- package/dist/src/vite/componentPage.js +94 -0
- package/dist/src/vite/componentPage.js.map +1 -0
- package/dist/src/vite/config.d.ts +72 -0
- package/dist/src/vite/config.d.ts.map +1 -0
- package/dist/src/vite/config.js +25 -0
- package/dist/src/vite/config.js.map +1 -0
- package/dist/src/vite/configFile.d.ts +76 -0
- package/dist/src/vite/configFile.d.ts.map +1 -0
- package/dist/src/vite/configFile.js +190 -0
- package/dist/src/vite/configFile.js.map +1 -0
- package/dist/src/vite/docsExtractor.d.ts +46 -0
- package/dist/src/vite/docsExtractor.d.ts.map +1 -0
- package/dist/src/vite/docsExtractor.js +88 -0
- package/dist/src/vite/docsExtractor.js.map +1 -0
- package/dist/src/vite/docsProgram.d.ts +42 -0
- package/dist/src/vite/docsProgram.d.ts.map +1 -0
- package/dist/src/vite/docsProgram.js +144 -0
- package/dist/src/vite/docsProgram.js.map +1 -0
- package/dist/src/vite/docsWorker.d.ts +2 -0
- package/dist/src/vite/docsWorker.d.ts.map +1 -0
- package/dist/src/vite/docsWorker.js +68 -0
- package/dist/src/vite/docsWorker.js.map +1 -0
- package/dist/src/vite/forcedStates.d.ts +27 -0
- package/dist/src/vite/forcedStates.d.ts.map +1 -0
- package/dist/src/vite/forcedStates.js +60 -0
- package/dist/src/vite/forcedStates.js.map +1 -0
- package/dist/src/vite/forgebookPlugin.d.ts +28 -0
- package/dist/src/vite/forgebookPlugin.d.ts.map +1 -0
- package/dist/src/vite/forgebookPlugin.js +375 -0
- package/dist/src/vite/forgebookPlugin.js.map +1 -0
- package/dist/src/vite/highlightCode.d.ts +16 -0
- package/dist/src/vite/highlightCode.d.ts.map +1 -0
- package/dist/src/vite/highlightCode.js +82 -0
- package/dist/src/vite/highlightCode.js.map +1 -0
- package/dist/src/vite/indexStoryFile.d.ts +35 -0
- package/dist/src/vite/indexStoryFile.d.ts.map +1 -0
- package/dist/src/vite/indexStoryFile.js +458 -0
- package/dist/src/vite/indexStoryFile.js.map +1 -0
- package/dist/src/vite/pages.d.ts +49 -0
- package/dist/src/vite/pages.d.ts.map +1 -0
- package/dist/src/vite/pages.js +171 -0
- package/dist/src/vite/pages.js.map +1 -0
- package/dist/src/vite/prebundled.d.ts +30 -0
- package/dist/src/vite/prebundled.d.ts.map +1 -0
- package/dist/src/vite/prebundled.js +81 -0
- package/dist/src/vite/prebundled.js.map +1 -0
- package/dist/src/vite/storyCode.d.ts +28 -0
- package/dist/src/vite/storyCode.d.ts.map +1 -0
- package/dist/src/vite/storyCode.js +80 -0
- package/dist/src/vite/storyCode.js.map +1 -0
- package/dist/src/vite/storyFilesModule.d.ts +17 -0
- package/dist/src/vite/storyFilesModule.d.ts.map +1 -0
- package/dist/src/vite/storyFilesModule.js +64 -0
- package/dist/src/vite/storyFilesModule.js.map +1 -0
- package/dist/src/vite/storyMeta.d.ts +34 -0
- package/dist/src/vite/storyMeta.d.ts.map +1 -0
- package/dist/src/vite/storyMeta.js +74 -0
- package/dist/src/vite/storyMeta.js.map +1 -0
- package/dist/src/vite/typeScriptPieces.d.ts +23 -0
- package/dist/src/vite/typeScriptPieces.d.ts.map +1 -0
- package/dist/src/vite/typeScriptPieces.js +236 -0
- package/dist/src/vite/typeScriptPieces.js.map +1 -0
- package/package.json +202 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The colour a story's box waits on while the story loads: its source's page colour for the theme and contrast the
|
|
3
|
+
* view shows, so the box is not white before a dark story and does not change colour when the story appears; the
|
|
4
|
+
* colour of the backdrop Forgebook draws instead, when the view sets one (D-652). Pure.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import type { StoryBackground } from "@forgebook/story-format/source";
|
|
9
|
+
import type { CatalogueSettings } from "./catalogue.ts";
|
|
10
|
+
import { type ViewState } from "./viewState.ts";
|
|
11
|
+
/**
|
|
12
|
+
* A source's page colour for a view, or the colour of the view's backdrop.
|
|
13
|
+
*
|
|
14
|
+
* @param background - the source's colours; none when it gives none.
|
|
15
|
+
* @param view - the switches' values the story is drawn in, and the backdrop behind it.
|
|
16
|
+
* @param catalogue - the catalogue's switches (its colour scheme, its contrast) and backdrops.
|
|
17
|
+
* @param isSystemDark - whether the system prefers dark, for the `system` theme.
|
|
18
|
+
* @returns the CSS colour, or none when the source gives none.
|
|
19
|
+
*/
|
|
20
|
+
export declare const storyBackground: (background: StoryBackground | undefined, view: Pick<ViewState, "switches" | "backdrop">, catalogue: Pick<CatalogueSettings, "switches" | "backdrops">, isSystemDark: boolean) => string | undefined;
|
|
21
|
+
//# sourceMappingURL=storyBackground.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyBackground.d.ts","sourceRoot":"","sources":["../../src/storyBackground.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAA8B,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE5E;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAC1B,YAAY,eAAe,GAAG,SAAS,EACvC,MAAM,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,CAAC,EAC9C,WAAW,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,CAAC,EAC5D,cAAc,OAAO,KACpB,MAAM,GAAG,SAWX,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { backdropColor } from "./backdrops.js";
|
|
2
|
+
import { isMoreContrastOf, schemeOf } from "./viewState.js";
|
|
3
|
+
/**
|
|
4
|
+
* A source's page colour for a view, or the colour of the view's backdrop.
|
|
5
|
+
*
|
|
6
|
+
* @param background - the source's colours; none when it gives none.
|
|
7
|
+
* @param view - the switches' values the story is drawn in, and the backdrop behind it.
|
|
8
|
+
* @param catalogue - the catalogue's switches (its colour scheme, its contrast) and backdrops.
|
|
9
|
+
* @param isSystemDark - whether the system prefers dark, for the `system` theme.
|
|
10
|
+
* @returns the CSS colour, or none when the source gives none.
|
|
11
|
+
*/
|
|
12
|
+
export const storyBackground = (background, view, catalogue, isSystemDark) => {
|
|
13
|
+
const { switches } = catalogue;
|
|
14
|
+
const scheme = schemeOf(view, switches);
|
|
15
|
+
const isDark = scheme === "dark" || (scheme === "system" && isSystemDark);
|
|
16
|
+
const isMoreContrast = isMoreContrastOf(view, switches);
|
|
17
|
+
const shown = catalogue.backdrops.find((each) => each.id === view.backdrop);
|
|
18
|
+
const backdrop = backdropColor(shown, isDark);
|
|
19
|
+
if (backdrop !== undefined)
|
|
20
|
+
return backdrop;
|
|
21
|
+
if (background === undefined)
|
|
22
|
+
return undefined;
|
|
23
|
+
if (isDark)
|
|
24
|
+
return isMoreContrast ? (background.darkMore ?? background.dark) : background.dark;
|
|
25
|
+
return isMoreContrast ? (background.lightMore ?? background.light) : background.light;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=storyBackground.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyBackground.js","sourceRoot":"","sources":["../../src/storyBackground.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAkB,MAAM,gBAAgB,CAAC;AAE5E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,UAAuC,EACvC,IAA8C,EAC9C,SAA4D,EAC5D,YAAqB,EACD,EAAE;IACtB,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAC/B,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,MAAM,KAAK,MAAM,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,YAAY,CAAC,CAAC;IAC1E,MAAM,cAAc,GAAG,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxD,MAAM,KAAK,GAAG,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5E,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC9C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAC5C,IAAI,UAAU,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC/C,IAAI,MAAM;QAAE,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;IAC/F,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;AACxF,CAAC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The story clock's settings, shared by the shell (its controls), the frame (the clock it runs) and the tests (which
|
|
3
|
+
* hold it): the speeds, the state the controls set, and the address that holds the clock at its start (D-504).
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Pure. The clock a story reads is typed in `@forgebook/story-format/clock`; the frame runs it (`frame/frameClock.ts`).
|
|
7
|
+
* Holding the clock goes through the frame's address, as everything that changes what a frame draws does (one
|
|
8
|
+
* document per story): the generated and visual tests open a Live story held at its start, so its image never
|
|
9
|
+
* changes and its play function moves it on with `advance` (D-628).
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
/** How fast the clock runs against real time: real time, or ten times faster. */
|
|
14
|
+
export type ClockRate = 1 | 10;
|
|
15
|
+
/** Every speed, in the controls' order. */
|
|
16
|
+
export declare const CLOCK_RATES: readonly ClockRate[];
|
|
17
|
+
/** What the shell's clock controls set on a frame's clock. */
|
|
18
|
+
export type ClockState = {
|
|
19
|
+
/** Whether the clock runs; held, it keeps its moment until resumed or advanced. */
|
|
20
|
+
readonly isRunning: boolean;
|
|
21
|
+
/** How fast it runs. */
|
|
22
|
+
readonly rate: ClockRate;
|
|
23
|
+
};
|
|
24
|
+
/** A Live story's clock when it opens: running, at real time. */
|
|
25
|
+
export declare const DEFAULT_CLOCK_STATE: ClockState;
|
|
26
|
+
/**
|
|
27
|
+
* A frame's address with its story clock held at its start: what the tests open.
|
|
28
|
+
*
|
|
29
|
+
* @param address - the frame's address (`frame.html?story=…`).
|
|
30
|
+
* @returns the same address, holding the clock.
|
|
31
|
+
*/
|
|
32
|
+
export declare const heldClockAddress: (address: string) => string;
|
|
33
|
+
/**
|
|
34
|
+
* Whether a frame's address holds its story clock at its start.
|
|
35
|
+
*
|
|
36
|
+
* @param search - the address's query (`?story=…&clock=held`).
|
|
37
|
+
*/
|
|
38
|
+
export declare const isClockHeldIn: (search: string) => boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether a value is one of the clock's speeds.
|
|
41
|
+
*
|
|
42
|
+
* @param value - any value.
|
|
43
|
+
*/
|
|
44
|
+
export declare const isClockRate: (value: unknown) => value is ClockRate;
|
|
45
|
+
/** Where a running clock stands: its moment at a real instant, and how fast it moves from there. */
|
|
46
|
+
export type ClockReading = {
|
|
47
|
+
/** The story's moment, in ms since the Unix epoch. */
|
|
48
|
+
readonly moment: number;
|
|
49
|
+
/** The real instant it was read at, in ms of the page's monotonic clock (`performance.now()`). */
|
|
50
|
+
readonly at: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* The clock's moment at a later real instant: it moves `rate` times as fast as real time while it runs, not at all
|
|
54
|
+
* while held, and never backwards.
|
|
55
|
+
*
|
|
56
|
+
* @param reading - where it stood.
|
|
57
|
+
* @param state - whether it runs, and how fast.
|
|
58
|
+
* @param at - the later real instant, in ms of the same monotonic clock.
|
|
59
|
+
* @returns where it stands then.
|
|
60
|
+
*/
|
|
61
|
+
export declare const readClock: (reading: ClockReading, state: ClockState, at: number) => ClockReading;
|
|
62
|
+
//# sourceMappingURL=storyClock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyClock.d.ts","sourceRoot":"","sources":["../../src/storyClock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,iFAAiF;AACjF,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,CAAC;AAE/B,2CAA2C;AAC3C,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAAY,CAAC;AAEzD,8DAA8D;AAC9D,MAAM,MAAM,UAAU,GAAG;IACvB,mFAAmF;IACnF,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,wBAAwB;IACxB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;CAC1B,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,EAAE,UAAyC,CAAC;AAK5E;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,KAAG,MACqC,CAAC;AAEzF;;;;GAIG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,KAAG,OACwB,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,SAAuD,CAAC;AAE9G,oGAAoG;AACpG,MAAM,MAAM,YAAY,GAAG;IACzB,sDAAsD;IACtD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kGAAkG;IAClG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAI,SAAS,YAAY,EAAE,OAAO,UAAU,EAAE,IAAI,MAAM,KAAG,YAGhF,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The story clock's settings, shared by the shell (its controls), the frame (the clock it runs) and the tests (which
|
|
3
|
+
* hold it): the speeds, the state the controls set, and the address that holds the clock at its start (D-504).
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Pure. The clock a story reads is typed in `@forgebook/story-format/clock`; the frame runs it (`frame/frameClock.ts`).
|
|
7
|
+
* Holding the clock goes through the frame's address, as everything that changes what a frame draws does (one
|
|
8
|
+
* document per story): the generated and visual tests open a Live story held at its start, so its image never
|
|
9
|
+
* changes and its play function moves it on with `advance` (D-628).
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
/** Every speed, in the controls' order. */
|
|
14
|
+
export const CLOCK_RATES = [1, 10];
|
|
15
|
+
/** A Live story's clock when it opens: running, at real time. */
|
|
16
|
+
export const DEFAULT_CLOCK_STATE = { isRunning: true, rate: 1 };
|
|
17
|
+
/** The frame address's parameter that holds the clock at its start, and its value. */
|
|
18
|
+
const HELD_PARAM = { name: "clock", value: "held" };
|
|
19
|
+
/**
|
|
20
|
+
* A frame's address with its story clock held at its start: what the tests open.
|
|
21
|
+
*
|
|
22
|
+
* @param address - the frame's address (`frame.html?story=…`).
|
|
23
|
+
* @returns the same address, holding the clock.
|
|
24
|
+
*/
|
|
25
|
+
export const heldClockAddress = (address) => `${address}${address.includes("?") ? "&" : "?"}${HELD_PARAM.name}=${HELD_PARAM.value}`;
|
|
26
|
+
/**
|
|
27
|
+
* Whether a frame's address holds its story clock at its start.
|
|
28
|
+
*
|
|
29
|
+
* @param search - the address's query (`?story=…&clock=held`).
|
|
30
|
+
*/
|
|
31
|
+
export const isClockHeldIn = (search) => new URLSearchParams(search).get(HELD_PARAM.name) === HELD_PARAM.value;
|
|
32
|
+
/**
|
|
33
|
+
* Whether a value is one of the clock's speeds.
|
|
34
|
+
*
|
|
35
|
+
* @param value - any value.
|
|
36
|
+
*/
|
|
37
|
+
export const isClockRate = (value) => CLOCK_RATES.some((rate) => rate === value);
|
|
38
|
+
/**
|
|
39
|
+
* The clock's moment at a later real instant: it moves `rate` times as fast as real time while it runs, not at all
|
|
40
|
+
* while held, and never backwards.
|
|
41
|
+
*
|
|
42
|
+
* @param reading - where it stood.
|
|
43
|
+
* @param state - whether it runs, and how fast.
|
|
44
|
+
* @param at - the later real instant, in ms of the same monotonic clock.
|
|
45
|
+
* @returns where it stands then.
|
|
46
|
+
*/
|
|
47
|
+
export const readClock = (reading, state, at) => {
|
|
48
|
+
const elapsed = Math.max(0, at - reading.at);
|
|
49
|
+
return { moment: state.isRunning ? reading.moment + elapsed * state.rate : reading.moment, at };
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=storyClock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyClock.js","sourceRoot":"","sources":["../../src/storyClock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,2CAA2C;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAyB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAUzD,iEAAiE;AACjE,MAAM,CAAC,MAAM,mBAAmB,GAAe,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;AAE5E,sFAAsF;AACtF,MAAM,UAAU,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAW,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAU,EAAE,CAC1D,GAAG,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;AAEzF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAc,EAAW,EAAE,CACvD,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,CAAC;AAExE;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAsB,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC;AAU9G;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAqB,EAAE,KAAiB,EAAE,EAAU,EAAgB,EAAE;IAC9F,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7C,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC;AAClG,CAAC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a story fixes of the view, as Storybook's stories write it: switches by its `globals` (`{ theme: "dark" }`),
|
|
3
|
+
* the background by `globals.backgrounds` or `parameters.backgrounds.default`, the width by `globals.viewport` or
|
|
4
|
+
* `parameters.viewport.defaultViewport`.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* A story that fixes a value is drawn with it whatever the toolbar says, and the toolbar shows it as set by the story,
|
|
8
|
+
* as Storybook locks a global a story sets. Only values the catalogue has are taken: a switch's value among its
|
|
9
|
+
* values, a background by its id or name, a width by its preset's name or its number. The address keeps the user's
|
|
10
|
+
* own view, so another story shows it again. Pure.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
import type { CatalogueSettings } from "./catalogue.ts";
|
|
15
|
+
import type { ViewState } from "./viewState.ts";
|
|
16
|
+
/** What a story fixes of the view; an empty `switches` and nothing else when it fixes nothing. */
|
|
17
|
+
export type FixedView = {
|
|
18
|
+
/** The switches it fixes, by id. */
|
|
19
|
+
readonly switches: Readonly<Record<string, string>>;
|
|
20
|
+
/** The backdrop it fixes, by id. */
|
|
21
|
+
readonly backdrop?: string;
|
|
22
|
+
/** The width it fixes, in CSS px. */
|
|
23
|
+
readonly width?: number;
|
|
24
|
+
};
|
|
25
|
+
/** A story that fixes nothing. */
|
|
26
|
+
export declare const NOT_FIXED: FixedView;
|
|
27
|
+
/**
|
|
28
|
+
* What a story fixes of the view.
|
|
29
|
+
*
|
|
30
|
+
* @param globals - the story's `globals`, the meta's under its own.
|
|
31
|
+
* @param parameters - the story's parameters.
|
|
32
|
+
* @param catalogue - the catalogue's switches, backdrops and widths.
|
|
33
|
+
*/
|
|
34
|
+
export declare const fixedViewOf: (globals: Readonly<Record<string, unknown>>, parameters: Readonly<Record<string, unknown>>, catalogue: Pick<CatalogueSettings, "switches" | "backdrops" | "widths">) => FixedView;
|
|
35
|
+
/** The parts of a view a story can fix. */
|
|
36
|
+
type FixableView = Pick<ViewState, "switches" | "backdrop">;
|
|
37
|
+
/**
|
|
38
|
+
* A view with what the story fixes over it: what it is drawn with and what the toolbar shows.
|
|
39
|
+
*
|
|
40
|
+
* @param view - the view.
|
|
41
|
+
* @param fixed - what the story fixes.
|
|
42
|
+
*/
|
|
43
|
+
export declare const withFixed: <TView extends FixableView & Partial<Pick<ViewState, "width">>>(view: TView, fixed: FixedView) => TView;
|
|
44
|
+
/**
|
|
45
|
+
* A view changed from the one shown, with the user's own values back where the story fixes them: a change of another
|
|
46
|
+
* setting never writes the story's into the address.
|
|
47
|
+
*
|
|
48
|
+
* @param changed - the view as the toolbar changed it, from the one shown.
|
|
49
|
+
* @param own - the user's own view.
|
|
50
|
+
* @param fixed - what the story fixes.
|
|
51
|
+
*/
|
|
52
|
+
export declare const withOwnFixed: (changed: ViewState, own: ViewState, fixed: FixedView) => ViewState;
|
|
53
|
+
/**
|
|
54
|
+
* Whether a value received from a frame is what a story fixes.
|
|
55
|
+
*
|
|
56
|
+
* @param value - the message's field.
|
|
57
|
+
*/
|
|
58
|
+
export declare const isFixedView: (value: unknown) => value is FixedView;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=storyGlobals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyGlobals.d.ts","sourceRoot":"","sources":["../../src/storyGlobals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,kGAAkG;AAClG,MAAM,MAAM,SAAS,GAAG;IACtB,oCAAoC;IACpC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,oCAAoC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,qCAAqC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,kCAAkC;AAClC,eAAO,MAAM,SAAS,EAAE,SAA4B,CAAC;AA+CrD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GACtB,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC1C,YAAY,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC7C,WAAW,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAC,KACtE,SAoBF,CAAC;AAEF,2CAA2C;AAC3C,KAAK,WAAW,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,SAAS,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,EACrF,MAAM,KAAK,EACX,OAAO,SAAS,KACf,KAKD,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,SAAS,EAAE,KAAK,SAAS,EAAE,OAAO,SAAS,KAAG,SAanF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,SAKgB,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a story fixes of the view, as Storybook's stories write it: switches by its `globals` (`{ theme: "dark" }`),
|
|
3
|
+
* the background by `globals.backgrounds` or `parameters.backgrounds.default`, the width by `globals.viewport` or
|
|
4
|
+
* `parameters.viewport.defaultViewport`.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* A story that fixes a value is drawn with it whatever the toolbar says, and the toolbar shows it as set by the story,
|
|
8
|
+
* as Storybook locks a global a story sets. Only values the catalogue has are taken: a switch's value among its
|
|
9
|
+
* values, a background by its id or name, a width by its preset's name or its number. The address keeps the user's
|
|
10
|
+
* own view, so another story shows it again. Pure.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
/** A story that fixes nothing. */
|
|
15
|
+
export const NOT_FIXED = { switches: {} };
|
|
16
|
+
/** Whether a value is a plain object. */
|
|
17
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18
|
+
/** A field of an object that is itself an object, or an empty one. */
|
|
19
|
+
const recordAt = (part, name) => {
|
|
20
|
+
const value = part[name];
|
|
21
|
+
return isRecord(value) ? value : {};
|
|
22
|
+
};
|
|
23
|
+
/** A global written as Storybook's addons write theirs (`{ value: "dark" }`) or as a plain text. */
|
|
24
|
+
const globalValue = (value) => {
|
|
25
|
+
if (typeof value === "string")
|
|
26
|
+
return value;
|
|
27
|
+
return isRecord(value) && typeof value["value"] === "string" ? value["value"] : undefined;
|
|
28
|
+
};
|
|
29
|
+
/** The same text, compared without case. */
|
|
30
|
+
const isSameName = (left, right) => left.toLowerCase() === right.toLowerCase();
|
|
31
|
+
/**
|
|
32
|
+
* The backdrop a name picks: by the catalogue's id or name.
|
|
33
|
+
*
|
|
34
|
+
* @param name - the story's background, by id or name.
|
|
35
|
+
* @param catalogue - the catalogue's backdrops.
|
|
36
|
+
*/
|
|
37
|
+
const backdropNamed = (name, catalogue) => catalogue.backdrops.find((backdrop) => isSameName(backdrop.id, name) || isSameName(backdrop.label, name))
|
|
38
|
+
?.id;
|
|
39
|
+
/**
|
|
40
|
+
* The width a name picks: a preset by its name, or a number of CSS px among the presets.
|
|
41
|
+
*
|
|
42
|
+
* @param name - the story's viewport, by name or width.
|
|
43
|
+
* @param catalogue - the catalogue's widths.
|
|
44
|
+
*/
|
|
45
|
+
const widthNamed = (name, catalogue) => catalogue.widths.find((preset) => (preset.label !== undefined && isSameName(preset.label, name)) ||
|
|
46
|
+
String(preset.width) === name.replace(/px$/, ""))?.width;
|
|
47
|
+
/**
|
|
48
|
+
* What a story fixes of the view.
|
|
49
|
+
*
|
|
50
|
+
* @param globals - the story's `globals`, the meta's under its own.
|
|
51
|
+
* @param parameters - the story's parameters.
|
|
52
|
+
* @param catalogue - the catalogue's switches, backdrops and widths.
|
|
53
|
+
*/
|
|
54
|
+
export const fixedViewOf = (globals, parameters, catalogue) => {
|
|
55
|
+
const switches = Object.fromEntries(catalogue.switches.flatMap((each) => {
|
|
56
|
+
const value = globalValue(globals[each.id]);
|
|
57
|
+
return value !== undefined && each.values.some((known) => known.value === value)
|
|
58
|
+
? [[each.id, value]]
|
|
59
|
+
: [];
|
|
60
|
+
}));
|
|
61
|
+
const background = globalValue(globals["backgrounds"]) ?? globalValue(recordAt(parameters, "backgrounds")["default"]);
|
|
62
|
+
const viewport = globalValue(globals["viewport"]) ?? globalValue(recordAt(parameters, "viewport")["defaultViewport"]);
|
|
63
|
+
const backdrop = background === undefined ? undefined : backdropNamed(background, catalogue);
|
|
64
|
+
const width = viewport === undefined ? undefined : widthNamed(viewport, catalogue);
|
|
65
|
+
return {
|
|
66
|
+
switches,
|
|
67
|
+
...(backdrop === undefined ? {} : { backdrop }),
|
|
68
|
+
...(width === undefined ? {} : { width })
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* A view with what the story fixes over it: what it is drawn with and what the toolbar shows.
|
|
73
|
+
*
|
|
74
|
+
* @param view - the view.
|
|
75
|
+
* @param fixed - what the story fixes.
|
|
76
|
+
*/
|
|
77
|
+
export const withFixed = (view, fixed) => ({
|
|
78
|
+
...view,
|
|
79
|
+
switches: { ...view.switches, ...fixed.switches },
|
|
80
|
+
...(fixed.backdrop === undefined ? {} : { backdrop: fixed.backdrop }),
|
|
81
|
+
...(fixed.width === undefined || view.width === undefined ? {} : { width: fixed.width })
|
|
82
|
+
});
|
|
83
|
+
/**
|
|
84
|
+
* A view changed from the one shown, with the user's own values back where the story fixes them: a change of another
|
|
85
|
+
* setting never writes the story's into the address.
|
|
86
|
+
*
|
|
87
|
+
* @param changed - the view as the toolbar changed it, from the one shown.
|
|
88
|
+
* @param own - the user's own view.
|
|
89
|
+
* @param fixed - what the story fixes.
|
|
90
|
+
*/
|
|
91
|
+
export const withOwnFixed = (changed, own, fixed) => {
|
|
92
|
+
const switches = { ...changed.switches };
|
|
93
|
+
for (const id of Object.keys(fixed.switches)) {
|
|
94
|
+
const ownValue = own.switches[id];
|
|
95
|
+
if (ownValue === undefined)
|
|
96
|
+
delete switches[id];
|
|
97
|
+
else
|
|
98
|
+
switches[id] = ownValue;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
...changed,
|
|
102
|
+
switches,
|
|
103
|
+
backdrop: fixed.backdrop === undefined ? changed.backdrop : own.backdrop,
|
|
104
|
+
width: fixed.width === undefined ? changed.width : own.width
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Whether a value received from a frame is what a story fixes.
|
|
109
|
+
*
|
|
110
|
+
* @param value - the message's field.
|
|
111
|
+
*/
|
|
112
|
+
export const isFixedView = (value) => isRecord(value) &&
|
|
113
|
+
isRecord(value["switches"]) &&
|
|
114
|
+
Object.values(value["switches"]).every((switchValue) => typeof switchValue === "string") &&
|
|
115
|
+
(value["backdrop"] === undefined || typeof value["backdrop"] === "string") &&
|
|
116
|
+
(value["width"] === undefined || typeof value["width"] === "number");
|
|
117
|
+
//# sourceMappingURL=storyGlobals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyGlobals.js","sourceRoot":"","sources":["../../src/storyGlobals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAeH,kCAAkC;AAClC,MAAM,CAAC,MAAM,SAAS,GAAc,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;AAErD,yCAAyC;AACzC,MAAM,QAAQ,GAAG,CAAC,KAAc,EAA8C,EAAE,CAC9E,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEvE,sEAAsE;AACtE,MAAM,QAAQ,GAAG,CACf,IAAuC,EACvC,IAAY,EACuB,EAAE;IACrC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACtC,CAAC,CAAC;AAEF,oGAAoG;AACpG,MAAM,WA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AC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK;KAC7D,CAAC;AACJ,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAsB,EAAE,CAChE,QAAQ,CAAC,KAAK,CAAC;IACf,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,OAAO,WAAW,KAAK,QAAQ,CAAC;IACxF,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,SAAS,IAAI,OAAO,KAAK,CAAC,UAAU,CAAC,KAAK,QAAQ,CAAC;IAC1E,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,SAAS,IAAI,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stories' measured heights: how tall each story's frame is at a few widths, written by `forgebook-heights` and
|
|
3
|
+
* read by the shell, which gives a story's box that height while the story loads instead of a short guess.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Only a hint for the wait: the frame takes its real height once its story reports it. The heights are measured in the
|
|
7
|
+
* default view (light theme, English, standard text size); the view's other choices change a story's height a little,
|
|
8
|
+
* which a loading box can live with. The document is generated, never committed: a style change would otherwise dirty
|
|
9
|
+
* it on every edit. Pure.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
/** The document `forgebook-heights` writes and the shell reads. */
|
|
14
|
+
export type StoryHeights = {
|
|
15
|
+
/** The widths the stories were measured at, in CSS px, ascending. */
|
|
16
|
+
readonly widths: readonly number[];
|
|
17
|
+
/** Each story's height at each of `widths`, in CSS px, by story id; a story that failed is left out. */
|
|
18
|
+
readonly heights: Readonly<Record<string, readonly number[]>>;
|
|
19
|
+
};
|
|
20
|
+
/** The widths `forgebook-heights` measures at by default: the stage's presets, and a wide one for Fill. */
|
|
21
|
+
export declare const HEIGHT_WIDTHS: readonly number[];
|
|
22
|
+
/**
|
|
23
|
+
* Whether a value read from the file is the heights' document.
|
|
24
|
+
*
|
|
25
|
+
* @param value - the parsed file.
|
|
26
|
+
*/
|
|
27
|
+
export declare const isStoryHeights: (value: unknown) => value is StoryHeights;
|
|
28
|
+
/**
|
|
29
|
+
* A story's measured height at the width nearest the one it is drawn at.
|
|
30
|
+
*
|
|
31
|
+
* @param document - the heights; none when the catalogue has none.
|
|
32
|
+
* @param storyId - the story's id.
|
|
33
|
+
* @param width - the width the story is drawn at, in CSS px.
|
|
34
|
+
* @returns the height in CSS px, or none when the story was not measured.
|
|
35
|
+
*/
|
|
36
|
+
export declare const knownHeight: (document: StoryHeights | undefined, storyId: string, width: number) => number | undefined;
|
|
37
|
+
//# sourceMappingURL=storyHeights.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyHeights.d.ts","sourceRoot":"","sources":["../../src/storyHeights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,mEAAmE;AACnE,MAAM,MAAM,YAAY,GAAG;IACzB,qEAAqE;IACrE,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,wGAAwG;IACxG,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;CAC/D,CAAC;AAEF,2GAA2G;AAC3G,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAAgC,CAAC;AAO5E;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,YAMxD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GACtB,UAAU,YAAY,GAAG,SAAS,EAClC,SAAS,MAAM,EACf,OAAO,MAAM,KACZ,MAAM,GAAG,SASX,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stories' measured heights: how tall each story's frame is at a few widths, written by `forgebook-heights` and
|
|
3
|
+
* read by the shell, which gives a story's box that height while the story loads instead of a short guess.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Only a hint for the wait: the frame takes its real height once its story reports it. The heights are measured in the
|
|
7
|
+
* default view (light theme, English, standard text size); the view's other choices change a story's height a little,
|
|
8
|
+
* which a loading box can live with. The document is generated, never committed: a style change would otherwise dirty
|
|
9
|
+
* it on every edit. Pure.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
/** The widths `forgebook-heights` measures at by default: the stage's presets, and a wide one for Fill. */
|
|
14
|
+
export const HEIGHT_WIDTHS = [360, 560, 768, 1024, 1440];
|
|
15
|
+
/** Whether a value is a list of whole numbers of px. */
|
|
16
|
+
const isLengths = (value) => Array.isArray(value) &&
|
|
17
|
+
value.every((item) => typeof item === "number" && Number.isFinite(item) && item >= 0);
|
|
18
|
+
/**
|
|
19
|
+
* Whether a value read from the file is the heights' document.
|
|
20
|
+
*
|
|
21
|
+
* @param value - the parsed file.
|
|
22
|
+
*/
|
|
23
|
+
export const isStoryHeights = (value) => {
|
|
24
|
+
if (typeof value !== "object" || value === null)
|
|
25
|
+
return false;
|
|
26
|
+
if (!("widths" in value) || !isLengths(value.widths) || value.widths.length === 0)
|
|
27
|
+
return false;
|
|
28
|
+
const widthCount = value.widths.length;
|
|
29
|
+
if (!("heights" in value) || typeof value.heights !== "object" || value.heights === null)
|
|
30
|
+
return false;
|
|
31
|
+
return Object.values(value.heights).every((heights) => isLengths(heights) && heights.length === widthCount);
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* A story's measured height at the width nearest the one it is drawn at.
|
|
35
|
+
*
|
|
36
|
+
* @param document - the heights; none when the catalogue has none.
|
|
37
|
+
* @param storyId - the story's id.
|
|
38
|
+
* @param width - the width the story is drawn at, in CSS px.
|
|
39
|
+
* @returns the height in CSS px, or none when the story was not measured.
|
|
40
|
+
*/
|
|
41
|
+
export const knownHeight = (document, storyId, width) => {
|
|
42
|
+
const heights = document?.heights[storyId];
|
|
43
|
+
if (document === undefined || heights === undefined)
|
|
44
|
+
return undefined;
|
|
45
|
+
let nearest = 0;
|
|
46
|
+
document.widths.forEach((measured, index) => {
|
|
47
|
+
const best = document.widths[nearest] ?? measured;
|
|
48
|
+
if (Math.abs(measured - width) < Math.abs(best - width))
|
|
49
|
+
nearest = index;
|
|
50
|
+
});
|
|
51
|
+
return heights[nearest];
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=storyHeights.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyHeights.js","sourceRoot":"","sources":["../../src/storyHeights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,2GAA2G;AAC3G,MAAM,CAAC,MAAM,aAAa,GAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAE5E,wDAAwD;AACxD,MAAM,SAAS,GAAG,CAAC,KAAc,EAA8B,EAAE,CAC/D,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;IACpB,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAc,EAAyB,EAAE;IACtE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,IAAI,CAAC,CAAC,QAAQ,IAAI,KAAK,CAAC,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 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the shell writes its story ids for the catalogue's command-line tools: one name, shared by the shell that
|
|
3
|
+
* writes the element and the tools that read it.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
/** The id of the `<script type="application/json">` that holds every story's id, in the sidebar's order. */
|
|
8
|
+
export declare const STORY_IDS_ELEMENT = "forgebook-story-ids";
|
|
9
|
+
//# sourceMappingURL=storyIdsElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyIdsElement.d.ts","sourceRoot":"","sources":["../../src/storyIdsElement.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,4GAA4G;AAC5G,eAAO,MAAM,iBAAiB,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the shell writes its story ids for the catalogue's command-line tools: one name, shared by the shell that
|
|
3
|
+
* writes the element and the tools that read it.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
/** The id of the `<script type="application/json">` that holds every story's id, in the sidebar's order. */
|
|
8
|
+
export const STORY_IDS_ELEMENT = "forgebook-story-ids";
|
|
9
|
+
//# sourceMappingURL=storyIdsElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyIdsElement.js","sourceRoot":"","sources":["../../src/storyIdsElement.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,4GAA4G;AAC5G,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The texts the stories are drawn with in the shown language: the source's English table with the language's own
|
|
3
|
+
* over it, or the English pseudo-translated for a pseudo-language.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* English is the table every key is in (`stories/locales/en.json`); a language that lacks a key shows the English
|
|
7
|
+
* one, so a story is never empty while a translation is under way. An arg written `storyText("key")` becomes the text
|
|
8
|
+
* of its key before the story receives it. Pure.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import type { StoryLanguage, StorySource } from "@forgebook/story-format/source";
|
|
13
|
+
import { type StoryTextFunction, type StoryTextTable } from "@forgebook/story-format/texts";
|
|
14
|
+
/** The language every key is in. */
|
|
15
|
+
export declare const BASE_LANGUAGE = "en";
|
|
16
|
+
/**
|
|
17
|
+
* A text pseudo-translated: accented, about a third longer, in brackets, its `{name}` placeholders untouched; it shows
|
|
18
|
+
* a text written outside the tables, one cut too short, or one put together from pieces.
|
|
19
|
+
*
|
|
20
|
+
* @param text - an English text.
|
|
21
|
+
*/
|
|
22
|
+
export declare const pseudoText: (text: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* The texts of the shown language.
|
|
25
|
+
*
|
|
26
|
+
* @param texts - the source's tables, by language id; none when the source has none.
|
|
27
|
+
* @param language - the shown language, when one is chosen; none for the stories' own (English).
|
|
28
|
+
*/
|
|
29
|
+
export declare const shownTexts: (texts: StorySource["texts"], language: StoryLanguage | undefined) => StoryTextTable;
|
|
30
|
+
/**
|
|
31
|
+
* A story's args with each `storyText("key")` turned into the text in the shown language, as the story receives them.
|
|
32
|
+
*
|
|
33
|
+
* @param args - the story's args.
|
|
34
|
+
* @param text - the text function of the shown language.
|
|
35
|
+
*/
|
|
36
|
+
export declare const withStoryTexts: (args: Readonly<Record<string, unknown>>, text: StoryTextFunction) => Readonly<Record<string, unknown>>;
|
|
37
|
+
/**
|
|
38
|
+
* The args that name a text, with their keys: the panel shows the key beside the text.
|
|
39
|
+
*
|
|
40
|
+
* @param args - the story's args.
|
|
41
|
+
*/
|
|
42
|
+
export declare const storyTextKeysOf: (args: Readonly<Record<string, unknown>>) => Readonly<Record<string, string>>;
|
|
43
|
+
//# sourceMappingURL=storyTexts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyTexts.d.ts","sourceRoot":"","sources":["../../src/storyTexts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAkB,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE5G,oCAAoC;AACpC,eAAO,MAAM,aAAa,OAAO,CAAC;AAuBlC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,KAAG,MASzC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GACrB,OAAO,WAAW,CAAC,OAAO,CAAC,EAC3B,UAAU,aAAa,GAAG,SAAS,KAClC,cAOF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACvC,MAAM,iBAAiB,KACtB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQzB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,KAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAKtG,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { isStoryTextArg } from "@forgebook/story-format/texts";
|
|
2
|
+
/** The language every key is in. */
|
|
3
|
+
export const BASE_LANGUAGE = "en";
|
|
4
|
+
/** The letters a pseudo-translation swaps for an accented look-alike. */
|
|
5
|
+
const ACCENTED = {
|
|
6
|
+
a: "å",
|
|
7
|
+
c: "ç",
|
|
8
|
+
e: "é",
|
|
9
|
+
i: "î",
|
|
10
|
+
n: "ñ",
|
|
11
|
+
o: "ö",
|
|
12
|
+
s: "š",
|
|
13
|
+
u: "û",
|
|
14
|
+
y: "ý",
|
|
15
|
+
A: "Å",
|
|
16
|
+
C: "Ç",
|
|
17
|
+
E: "É",
|
|
18
|
+
I: "Î",
|
|
19
|
+
N: "Ñ",
|
|
20
|
+
O: "Ö",
|
|
21
|
+
S: "Š",
|
|
22
|
+
U: "Û"
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A text pseudo-translated: accented, about a third longer, in brackets, its `{name}` placeholders untouched; it shows
|
|
26
|
+
* a text written outside the tables, one cut too short, or one put together from pieces.
|
|
27
|
+
*
|
|
28
|
+
* @param text - an English text.
|
|
29
|
+
*/
|
|
30
|
+
export const pseudoText = (text) => {
|
|
31
|
+
const accented = text
|
|
32
|
+
.split(/(\{\w+\})/)
|
|
33
|
+
.map((part) => part.startsWith("{") ? part : [...part].map((letter) => ACCENTED[letter] ?? letter).join(""))
|
|
34
|
+
.join("");
|
|
35
|
+
const padding = "·".repeat(Math.ceil(text.length / 3));
|
|
36
|
+
return `[${accented}${padding}]`;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* The texts of the shown language.
|
|
40
|
+
*
|
|
41
|
+
* @param texts - the source's tables, by language id; none when the source has none.
|
|
42
|
+
* @param language - the shown language, when one is chosen; none for the stories' own (English).
|
|
43
|
+
*/
|
|
44
|
+
export const shownTexts = (texts, language) => {
|
|
45
|
+
const base = texts?.[BASE_LANGUAGE] ?? {};
|
|
46
|
+
if (language === undefined)
|
|
47
|
+
return base;
|
|
48
|
+
if (language.isPseudo === true) {
|
|
49
|
+
return Object.fromEntries(Object.entries(base).map(([key, text]) => [key, pseudoText(text)]));
|
|
50
|
+
}
|
|
51
|
+
return { ...base, ...texts?.[language.id] };
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* A story's args with each `storyText("key")` turned into the text in the shown language, as the story receives them.
|
|
55
|
+
*
|
|
56
|
+
* @param args - the story's args.
|
|
57
|
+
* @param text - the text function of the shown language.
|
|
58
|
+
*/
|
|
59
|
+
export const withStoryTexts = (args, text) => Object.values(args).some(isStoryTextArg)
|
|
60
|
+
? Object.fromEntries(Object.entries(args).map(([name, value]) => [
|
|
61
|
+
name,
|
|
62
|
+
isStoryTextArg(value) ? text(value.storyText, value.values) : value
|
|
63
|
+
]))
|
|
64
|
+
: args;
|
|
65
|
+
/**
|
|
66
|
+
* The args that name a text, with their keys: the panel shows the key beside the text.
|
|
67
|
+
*
|
|
68
|
+
* @param args - the story's args.
|
|
69
|
+
*/
|
|
70
|
+
export const storyTextKeysOf = (args) => Object.fromEntries(Object.entries(args).flatMap(([name, value]) => isStoryTextArg(value) ? [[name, value.storyText]] : []));
|
|
71
|
+
//# sourceMappingURL=storyTexts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyTexts.js","sourceRoot":"","sources":["../../src/storyTexts.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,cAAc,EAA+C,MAAM,+BAA+B,CAAC;AAE5G,oCAAoC;AACpC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAElC,yEAAyE;AACzE,MAAM,QAAQ,GAAqC;IACjD,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;CACP,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAU,EAAE;IACjD,MAAM,QAAQ,GAAG,IAAI;SAClB,KAAK,CAAC,WAAW,CAAC;SAClB,GAAG,CAAC,C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