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 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../src/shell/Toolbar.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,OAAO,EAAoC,KAAK,EAAE,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAkB,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,aAAa,E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the end of the toolbar's width presets: the width the story has (measured while it fills the
|
|
3
|
+
* stage), typed over and committed with Enter or by leaving the field; Escape gives the shown width back.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode } from "react";
|
|
8
|
+
import { type StageWidth } from "../viewState.ts";
|
|
9
|
+
/** The field's props. */
|
|
10
|
+
export type WidthFieldProps = {
|
|
11
|
+
/** The width set in the view. */
|
|
12
|
+
readonly width: StageWidth;
|
|
13
|
+
/** The width the story really has, in CSS px: measured on a story's page; none on a component's page. */
|
|
14
|
+
readonly shownWidth: number | undefined;
|
|
15
|
+
/** Called with a typed width, kept within the catalogue's range. */
|
|
16
|
+
readonly onWidthChange: (width: StageWidth) => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The width field.
|
|
20
|
+
*
|
|
21
|
+
* @param props - the set and the shown width, and what a typed width does.
|
|
22
|
+
*/
|
|
23
|
+
export declare const WidthField: ({ width, shownWidth, onWidthChange }: WidthFieldProps) => ReactNode;
|
|
24
|
+
//# sourceMappingURL=WidthField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidthField.d.ts","sourceRoot":"","sources":["../../../src/shell/WidthField.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAwC,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAEvF,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIhE,yBAAyB;AACzB,MAAM,MAAM,eAAe,GAAG;IAC5B,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,yGAAyG;IACzG,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,oEAAoE;IACpE,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACrD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,sCAAsC,eAAe,KAAG,SAoClF,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The width field at the end of the toolbar's width presets: the width the story has (measured while it fills the
|
|
4
|
+
* stage), typed over and committed with Enter or by leaving the field; Escape gives the shown width back.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
import { clampedWidth } from "../viewState.js";
|
|
10
|
+
import { useCatalogue } from "./catalogueContext.js";
|
|
11
|
+
import { STRINGS } from "./strings.js";
|
|
12
|
+
/**
|
|
13
|
+
* The width field.
|
|
14
|
+
*
|
|
15
|
+
* @param props - the set and the shown width, and what a typed width does.
|
|
16
|
+
*/
|
|
17
|
+
export const WidthField = ({ width, shownWidth, onWidthChange }) => {
|
|
18
|
+
// the field's text while it is being typed in
|
|
19
|
+
const [draft, setDraft] = useState(undefined);
|
|
20
|
+
const { widths, widthRange } = useCatalogue();
|
|
21
|
+
const isCustom = width !== "fill" && !widths.some((preset) => preset.width === width);
|
|
22
|
+
const shown = shownWidth ?? (width === "fill" ? undefined : width);
|
|
23
|
+
const commit = () => {
|
|
24
|
+
if (draft === undefined)
|
|
25
|
+
return;
|
|
26
|
+
const typed = Number(draft);
|
|
27
|
+
setDraft(undefined);
|
|
28
|
+
if (draft.trim() !== "" && Number.isFinite(typed))
|
|
29
|
+
onWidthChange(clampedWidth(typed, widthRange));
|
|
30
|
+
};
|
|
31
|
+
return (_jsxs("span", { className: "forgebook-width-field", "data-custom": isCustom ? "" : undefined, children: [_jsx("input", { className: "forgebook-width-field__input",
|
|
32
|
+
// a text field with the numeric keyboard: a number field draws spin buttons the presets already do better
|
|
33
|
+
type: "text", inputMode: "numeric", pattern: "[0-9]*", "aria-label": STRINGS.widthTyped, title: width === "fill" ? STRINGS.widthFillNote : undefined, placeholder: STRINGS.widthAuto, value: draft ?? (shown === undefined ? "" : String(shown)), onChange: (event) => setDraft(event.currentTarget.value), onBlur: commit, onKeyDown: (event) => {
|
|
34
|
+
if (event.key === "Enter")
|
|
35
|
+
commit();
|
|
36
|
+
if (event.key === "Escape")
|
|
37
|
+
setDraft(undefined);
|
|
38
|
+
} }), _jsx("span", { className: "forgebook-width-field__unit", "aria-hidden": "true", children: "px" })] }));
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=WidthField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidthField.js","sourceRoot":"","sources":["../../../src/shell/WidthField.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAwD,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvF,OAAO,EAAE,YAAY,EAAmB,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAYvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAmB,EAAa,EAAE;IAC7F,8CAA8C;IAC9C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IAClE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,YAAY,EAAE,CAAC;IAC9C,MAAM,QAAQ,GAAG,KAAK,KAAK,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;IACtF,MAAM,KAAK,GAAG,UAAU,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnE,MAAM,MAAM,GAAG,GAAS,EAAE;QACxB,IAAI,KAAK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,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type CatalogueSettings } from "../catalogue.ts";
|
|
2
|
+
/** The catalogue's settings; the defaults until the shell provides its own. */
|
|
3
|
+
export declare const CatalogueContext: import("react").Context<CatalogueSettings>;
|
|
4
|
+
/** The catalogue's settings. */
|
|
5
|
+
export declare const useCatalogue: () => CatalogueSettings;
|
|
6
|
+
//# sourceMappingURL=catalogueContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogueContext.d.ts","sourceRoot":"","sources":["../../../src/shell/catalogueContext.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,iBAAiB,CAAC;AAG5E,+EAA+E;AAC/E,eAAO,MAAM,gBAAgB,4CAA4E,CAAC;AAE1G,gCAAgC;AAChC,eAAO,MAAM,YAAY,QAAO,iBAAiD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The catalogue's settings, as the shell's components read them: its switches and its lists (`catalogue.ts`),
|
|
3
|
+
* computed once from the configuration, so the toolbar, the stage, the compare view and the pages agree.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { createContext, useContext } from "react";
|
|
8
|
+
import { catalogueSettings } from "../catalogue.js";
|
|
9
|
+
import { DEFAULT_SWITCHES } from "../switches.js";
|
|
10
|
+
/** The catalogue's settings; the defaults until the shell provides its own. */
|
|
11
|
+
export const CatalogueContext = createContext(catalogueSettings("", DEFAULT_SWITCHES));
|
|
12
|
+
/** The catalogue's settings. */
|
|
13
|
+
export const useCatalogue = () => useContext(CatalogueContext);
|
|
14
|
+
//# sourceMappingURL=catalogueContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogueContext.js","sourceRoot":"","sources":["../../../src/shell/catalogueContext.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAA0B,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAoB,iBAAiB,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAE1G,gCAAgC;AAChC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAsB,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript written as coloured tokens, for the events' signatures and the call log: no highlighting library, the
|
|
3
|
+
* signatures are short and their shapes known.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
/** What a token is, which is its colour. */
|
|
8
|
+
export type CodeTokenKind = "keyword" | "type" | "name" | "string" | "number" | "punctuation" | "space";
|
|
9
|
+
/** One token. */
|
|
10
|
+
export type CodeToken = {
|
|
11
|
+
/** What it is. */
|
|
12
|
+
readonly kind: CodeTokenKind;
|
|
13
|
+
/** Its text. */
|
|
14
|
+
readonly text: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The tokens of a TypeScript type or call.
|
|
18
|
+
*
|
|
19
|
+
* @param text - a type (`(value: string) => void`) or a call (`onValueChange("monthly")`).
|
|
20
|
+
* @param names - identifiers to colour as names (the parameters, the event); other capitalised words are types.
|
|
21
|
+
*/
|
|
22
|
+
export declare const codeTokens: (text: string, names?: ReadonlySet<string>) => CodeToken[];
|
|
23
|
+
//# sourceMappingURL=codeTokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeTokens.d.ts","sourceRoot":"","sources":["../../../src/shell/codeTokens.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,OAAO,CAAC;AAExG,iBAAiB;AACjB,MAAM,MAAM,SAAS,GAAG;IACtB,kBAAkB;IAClB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,gBAAgB;IAChB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AA0BF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,EAAE,QAAO,WAAW,CAAC,MAAM,CAAa,KAAG,SAAS,EAQvF,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript written as coloured tokens, for the events' signatures and the call log: no highlighting library, the
|
|
3
|
+
* signatures are short and their shapes known.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
/** The words TypeScript reserves for its built-in types and values. */
|
|
8
|
+
const KEYWORDS = new Set([
|
|
9
|
+
"string",
|
|
10
|
+
"number",
|
|
11
|
+
"boolean",
|
|
12
|
+
"void",
|
|
13
|
+
"undefined",
|
|
14
|
+
"null",
|
|
15
|
+
"unknown",
|
|
16
|
+
"never",
|
|
17
|
+
"any",
|
|
18
|
+
"object",
|
|
19
|
+
"bigint",
|
|
20
|
+
"symbol",
|
|
21
|
+
"true",
|
|
22
|
+
"false",
|
|
23
|
+
"readonly",
|
|
24
|
+
"keyof",
|
|
25
|
+
"typeof"
|
|
26
|
+
]);
|
|
27
|
+
/** The pieces of a TypeScript text, in order. */
|
|
28
|
+
const PIECES = /("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')|(\d+(?:\.\d+)?)|([A-Za-z_$][\w$]*)|(\s+)|(=>|[^\w\s])/g;
|
|
29
|
+
/**
|
|
30
|
+
* The tokens of a TypeScript type or call.
|
|
31
|
+
*
|
|
32
|
+
* @param text - a type (`(value: string) => void`) or a call (`onValueChange("monthly")`).
|
|
33
|
+
* @param names - identifiers to colour as names (the parameters, the event); other capitalised words are types.
|
|
34
|
+
*/
|
|
35
|
+
export const codeTokens = (text, names = new Set()) => [...text.matchAll(PIECES)].map(([piece = "", string, number, word, space]) => {
|
|
36
|
+
if (string !== undefined)
|
|
37
|
+
return { kind: "string", text: piece };
|
|
38
|
+
if (number !== undefined)
|
|
39
|
+
return { kind: "number", text: piece };
|
|
40
|
+
if (space !== undefined)
|
|
41
|
+
return { kind: "space", text: piece };
|
|
42
|
+
if (word === undefined)
|
|
43
|
+
return { kind: "punctuation", text: piece };
|
|
44
|
+
if (KEYWORDS.has(word))
|
|
45
|
+
return { kind: "keyword", text: piece };
|
|
46
|
+
return { kind: names.has(word) ? "name" : "type", text: piece };
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=codeTokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeTokens.js","sourceRoot":"","sources":["../../../src/shell/codeTokens.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,uEAAuE;AACvE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC;IACvB,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,MAAM;IACN,WAAW;IACX,MAAM;IACN,SAAS;IACT,OAAO;IACP,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IACP,QAAQ;CACT,CAAC,CAAC;AAEH,iDAAiD;AACjD,MAAM,MAAM,GAAG,8FAA8F,CAAC;AAE9G;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,QAA6B,IAAI,GAAG,EAAE,EAAe,EAAE,CAC9F,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,EAAa,EAAE;IACtF,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACjE,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACjE,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IAC/D,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACpE,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IAChE,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAClE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { StoryCodeWriter } from "../frame/renderer.ts";
|
|
2
|
+
/** The framework's code writer. */
|
|
3
|
+
export declare const CodeWriterContext: import("react").Context<StoryCodeWriter>;
|
|
4
|
+
/** The framework's code writer, as the app gave it. */
|
|
5
|
+
export declare const useCodeWriter: () => StoryCodeWriter;
|
|
6
|
+
//# sourceMappingURL=codeWriter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeWriter.d.ts","sourceRoot":"","sources":["../../../src/shell/codeWriter.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAK5D,mCAAmC;AACnC,eAAO,MAAM,iBAAiB,0CAA4C,CAAC;AAE3E,uDAAuD;AACvD,eAAO,MAAM,aAAa,QAAO,eAAgD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The framework's code writer, as the shell's components read it: given once by the app (`mountShell`), so the shell
|
|
3
|
+
* writes a story drawn from its args in the framework's syntax without knowing the framework.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { createContext, useContext } from "react";
|
|
8
|
+
/** Writes nothing until the app gives the framework's writer. */
|
|
9
|
+
const NO_WRITER = () => "";
|
|
10
|
+
/** The framework's code writer. */
|
|
11
|
+
export const CodeWriterContext = createContext(NO_WRITER);
|
|
12
|
+
/** The framework's code writer, as the app gave it. */
|
|
13
|
+
export const useCodeWriter = () => useContext(CodeWriterContext);
|
|
14
|
+
//# sourceMappingURL=codeWriter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codeWriter.js","sourceRoot":"","sources":["../../../src/shell/codeWriter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAIlD,iEAAiE;AACjE,MAAM,SAAS,GAAoB,GAAW,EAAE,CAAC,EAAE,CAAC;AAEpD,mCAAmC;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAkB,SAAS,CAAC,CAAC;AAE3E,uDAAuD;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAoB,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The frames of the compare view: the story once per value of one switch, or of two (the theme at both contrasts),
|
|
3
|
+
* or per text size or style sheets, each with its label.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* A switch's unset value (the system's theme, the library's own motion) is left out: it draws one of the others. In
|
|
7
|
+
* a pair, a cell's label leaves out the second switch's default (`Light`, `Light · More contrast`), so the familiar
|
|
8
|
+
* value reads alone. Pure.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import type { CatalogueSettings } from "../catalogue.ts";
|
|
13
|
+
import { type CompareAxes, type ViewState } from "../viewState.ts";
|
|
14
|
+
/** What the compare view reads of the catalogue: its switches and its text sizes. */
|
|
15
|
+
export type CompareCatalogue = Pick<CatalogueSettings, "switches" | "textSizes">;
|
|
16
|
+
/** One frame of the compare view. */
|
|
17
|
+
export type CompareVariant = {
|
|
18
|
+
/** What the frame shows, under it. */
|
|
19
|
+
readonly label: string;
|
|
20
|
+
/**
|
|
21
|
+
* The view the frame draws in: the stage's, with the compared values set.
|
|
22
|
+
*
|
|
23
|
+
* @param view - the stage's view.
|
|
24
|
+
*/
|
|
25
|
+
readonly viewOf: (view: ViewState) => ViewState;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The frames of the compare view: one per value of its axis, or per pair of values of its two axes (the second
|
|
29
|
+
* outermost: every theme at the standard contrast, then at more).
|
|
30
|
+
*
|
|
31
|
+
* @param axes - the compared axes.
|
|
32
|
+
* @param catalogue - the catalogue's switches and text sizes.
|
|
33
|
+
*/
|
|
34
|
+
export declare const compareVariants: (axes: CompareAxes, catalogue: CompareCatalogue) => CompareVariant[];
|
|
35
|
+
//# sourceMappingURL=compareVariants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareVariants.d.ts","sourceRoot":"","sources":["../../../src/shell/compareVariants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,KAAK,WAAW,EAAkB,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGnF,qFAAqF;AACrF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,CAAC,CAAC;AAEjF,qCAAqC;AACrC,MAAM,MAAM,cAAc,GAAG;IAC3B,sCAAsC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,CAAC;CACjD,CAAC;AA2CF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,WAAW,EAAE,WAAW,gBAAgB,KAAG,cAAc,EAW9F,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The frames of the compare view: the story once per value of one switch, or of two (the theme at both contrasts),
|
|
3
|
+
* or per text size or style sheets, each with its label.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* A switch's unset value (the system's theme, the library's own motion) is left out: it draws one of the others. In
|
|
7
|
+
* a pair, a cell's label leaves out the second switch's default (`Light`, `Light · More contrast`), so the familiar
|
|
8
|
+
* value reads alone. Pure.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { SHEETS_CHOICES } from "../viewState.js";
|
|
13
|
+
import { STRINGS } from "./strings.js";
|
|
14
|
+
/**
|
|
15
|
+
* The values one axis sets, each with its label.
|
|
16
|
+
*
|
|
17
|
+
* @param axis - a switch's id, `text` or `sheets`.
|
|
18
|
+
* @param catalogue - the catalogue's switches and text sizes.
|
|
19
|
+
*/
|
|
20
|
+
const axisVariants = (axis, catalogue) => {
|
|
21
|
+
if (axis === "text") {
|
|
22
|
+
return catalogue.textSizes.map((text) => ({
|
|
23
|
+
label: STRINGS.textScale(text),
|
|
24
|
+
isDefault: false,
|
|
25
|
+
viewOf: (view) => ({ ...view, text })
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
if (axis === "sheets") {
|
|
29
|
+
return SHEETS_CHOICES.map((sheets) => ({
|
|
30
|
+
label: STRINGS.sheetChoices[sheets],
|
|
31
|
+
isDefault: false,
|
|
32
|
+
viewOf: (view) => ({ ...view, sheets })
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
const each = catalogue.switches.find((candidate) => candidate.id === axis);
|
|
36
|
+
if (each === undefined)
|
|
37
|
+
return [];
|
|
38
|
+
return each.values
|
|
39
|
+
.filter((value) => value.isUnset !== true)
|
|
40
|
+
.map((value) => ({
|
|
41
|
+
label: value.label,
|
|
42
|
+
isDefault: value.value === each.default,
|
|
43
|
+
viewOf: (view) => ({
|
|
44
|
+
...view,
|
|
45
|
+
switches: { ...view.switches, [each.id]: value.value }
|
|
46
|
+
})
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* The frames of the compare view: one per value of its axis, or per pair of values of its two axes (the second
|
|
51
|
+
* outermost: every theme at the standard contrast, then at more).
|
|
52
|
+
*
|
|
53
|
+
* @param axes - the compared axes.
|
|
54
|
+
* @param catalogue - the catalogue's switches and text sizes.
|
|
55
|
+
*/
|
|
56
|
+
export const compareVariants = (axes, catalogue) => {
|
|
57
|
+
const [first, second] = axes;
|
|
58
|
+
if (first === undefined)
|
|
59
|
+
return [];
|
|
60
|
+
const firsts = axisVariants(first, catalogue);
|
|
61
|
+
if (second === undefined)
|
|
62
|
+
return firsts;
|
|
63
|
+
return axisVariants(second, catalogue).flatMap((outer) => firsts.map((inner) => ({
|
|
64
|
+
label: STRINGS.compareCell(outer.isDefault ? [inner.label] : [inner.label, outer.label]),
|
|
65
|
+
viewOf: (view) => outer.viewOf(inner.viewOf(view))
|
|
66
|
+
})));
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=compareVariants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compareVariants.js","sourceRoot":"","sources":["../../../src/shell/compareVariants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAoB,cAAc,EAAkB,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,OA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,EAAE,CAAC,IAAe,EAAa,EAAE,CAAC,CAAC;YACvC,GAAG,IAAI;YACP,QAAQ,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE;SACvD,CAAC;KACH,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAiB,EAAE,SAA2B,EAAoB,EAAE;IAClG,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAC7B,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC9C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,OAAO,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CACvD,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACrB,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACxF,MAAM,EAAE,CAAC,IAAe,EAAa,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KACzE,CAAC,CAAC,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tabs a story's panel shows: Props, Events and Parts and styling from its component's docs, Code from its file,
|
|
3
|
+
* Accessibility always; a tab the story has nothing for is left out.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import type { StoryControlsSetting, StoryFileCode } from "@forgebook/story-format/source";
|
|
8
|
+
import { type PanelArgTypes } from "../argTypes.ts";
|
|
9
|
+
import type { ComponentDocs } from "../componentDocs.ts";
|
|
10
|
+
import type { ArgValue, PanelArgs } from "../messages.ts";
|
|
11
|
+
import type { NamedValues } from "../namedValues.ts";
|
|
12
|
+
import type { PlayTrace } from "../playTrace.ts";
|
|
13
|
+
import { type CheckState } from "./A11yTab.tsx";
|
|
14
|
+
import type { DockTab } from "./Dock.tsx";
|
|
15
|
+
import { type TextArgNote } from "./PropsTab.tsx";
|
|
16
|
+
import type { EventCall } from "./useFrameMessages.ts";
|
|
17
|
+
import type { Loaded } from "./useLoaded.ts";
|
|
18
|
+
/** What the tabs are built from. */
|
|
19
|
+
export type DockTabsInput = {
|
|
20
|
+
/** The component's docs, as loaded. */
|
|
21
|
+
readonly docs: Loaded<ComponentDocs>;
|
|
22
|
+
/** The story file's code, as loaded. */
|
|
23
|
+
readonly code: Loaded<StoryFileCode>;
|
|
24
|
+
/** The story's export name. */
|
|
25
|
+
readonly exportName: string;
|
|
26
|
+
/** The component's name from the sidebar, for the JSX when the docs have none. */
|
|
27
|
+
readonly componentName: string;
|
|
28
|
+
/** The props the story lets the panel set. */
|
|
29
|
+
readonly controls: StoryControlsSetting;
|
|
30
|
+
/** The story's `argTypes`, as its frame reported them; none before it is ready. */
|
|
31
|
+
readonly argTypes: PanelArgTypes;
|
|
32
|
+
/** The args the story's frame records as actions (a spy, an `argTypes` action); none before it is ready. */
|
|
33
|
+
readonly actions: readonly string[];
|
|
34
|
+
/** The values of the moment: the story's args with the panel's over them. */
|
|
35
|
+
readonly values: PanelArgs;
|
|
36
|
+
/** Called with a changed value; `undefined` removes the panel's value. */
|
|
37
|
+
readonly onValueChange: (name: string, value: ArgValue | undefined) => void;
|
|
38
|
+
/** Removes every value the panel set. */
|
|
39
|
+
readonly onReset: () => void;
|
|
40
|
+
/** The values the source names for types the panel cannot write. */
|
|
41
|
+
readonly namedValues: NamedValues | undefined;
|
|
42
|
+
/** The props the story gives a text by its key, by name. */
|
|
43
|
+
readonly textArgs: Readonly<Record<string, TextArgNote>>;
|
|
44
|
+
/** The story's calls, newest first. */
|
|
45
|
+
readonly calls: readonly EventCall[];
|
|
46
|
+
/** Clears the calls. */
|
|
47
|
+
readonly onClearCalls: () => void;
|
|
48
|
+
/** The play function's trace; none for a story without a play (or before it ran). */
|
|
49
|
+
readonly trace: PlayTrace | undefined;
|
|
50
|
+
/** Runs the play again. */
|
|
51
|
+
readonly onPlayAgain: () => void;
|
|
52
|
+
/** The accessibility check. */
|
|
53
|
+
readonly check: CheckState;
|
|
54
|
+
/** Runs it; none when it cannot run. */
|
|
55
|
+
readonly onCheck: (() => void) | undefined;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The tabs of a story's panel, in order.
|
|
59
|
+
*
|
|
60
|
+
* @param input - the docs, the code, the values, the calls, the check and their setters.
|
|
61
|
+
*/
|
|
62
|
+
export declare const dockTabs: (input: DockTabsInput) => DockTab[];
|
|
63
|
+
//# sourceMappingURL=dockTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dockTabs.d.ts","sourceRoot":"","sources":["../../../src/shell/dockTabs.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG1F,OAAO,EAAE,KAAK,aAAa,EAA8B,MAAM,gBAAgB,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAA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ACvC,QAAQ,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IACrC,wBAAwB;IACxB,QAAQ,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC;IAClC,qFAAqF;IACrF,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IACtC,2BAA2B;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC;IACjC,+BAA+B;IAC/B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,wCAAwC;IACxC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5C,CAAC;AAoJF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,KAAG,OAAO,EAStD,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { panelProps } from "../argTypes.js";
|
|
3
|
+
import { A11yTab, a11yHint } from "./A11yTab.js";
|
|
4
|
+
import { CodeTab } from "./CodeTab.js";
|
|
5
|
+
import { EventsTab } from "./EventsTab.js";
|
|
6
|
+
import { InteractionsTab, interactionsHint } from "./InteractionsTab.js";
|
|
7
|
+
import { PartsTab, styleHooks } from "./PartsTab.js";
|
|
8
|
+
import { PropsTab } from "./PropsTab.js";
|
|
9
|
+
import { STRINGS } from "./strings.js";
|
|
10
|
+
/** A message in place of a tab's content: the docs or the code are loading or could not be read. */
|
|
11
|
+
const notice = (text, isProblem) => (_jsx("p", { className: isProblem ? "forgebook-problems" : "forgebook-tab-note", role: isProblem ? "alert" : undefined, children: text }));
|
|
12
|
+
/**
|
|
13
|
+
* The Props tab, when the story has a prop to show.
|
|
14
|
+
*
|
|
15
|
+
* @param input - what the tabs are built from.
|
|
16
|
+
* @param props - the props, from the types with the `argTypes` laid over them.
|
|
17
|
+
*/
|
|
18
|
+
const propsTab = (input, props) => props.some((prop) => prop.kind !== "event")
|
|
19
|
+
? [
|
|
20
|
+
{
|
|
21
|
+
id: "props",
|
|
22
|
+
label: STRINGS.tabs.props,
|
|
23
|
+
content: (_jsx(PropsTab, { props: props, values: input.values, controls: input.controls, onValueChange: input.onValueChange, onReset: input.onReset, namedValues: input.namedValues, textArgs: input.textArgs }))
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
: [];
|
|
27
|
+
/**
|
|
28
|
+
* The events the Events tab lists: the component's, then the story's actions its types do not name.
|
|
29
|
+
*
|
|
30
|
+
* @param props - the component's props; none for a story without one.
|
|
31
|
+
* @param actions - the story's actions.
|
|
32
|
+
*/
|
|
33
|
+
const eventsOf = (props, actions) => {
|
|
34
|
+
const events = props.filter((prop) => prop.kind === "event");
|
|
35
|
+
const named = new Set(events.map((event) => event.name));
|
|
36
|
+
return [
|
|
37
|
+
...events,
|
|
38
|
+
...actions
|
|
39
|
+
.filter((name) => !named.has(name))
|
|
40
|
+
.map((name) => ({ name, kind: "event", type: "", description: "", isRequired: false }))
|
|
41
|
+
];
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The Events tab, when the story has an event or an action.
|
|
45
|
+
*
|
|
46
|
+
* @param input - what the tabs are built from.
|
|
47
|
+
* @param events - the events and actions.
|
|
48
|
+
*/
|
|
49
|
+
const eventsTab = (input, events) => events.length === 0
|
|
50
|
+
? []
|
|
51
|
+
: [
|
|
52
|
+
{
|
|
53
|
+
id: "events",
|
|
54
|
+
label: STRINGS.tabs.events,
|
|
55
|
+
hint: input.calls.length === 0 ? undefined : String(input.calls.length),
|
|
56
|
+
content: _jsx(EventsTab, { events: events, calls: input.calls, onClearCalls: input.onClearCalls })
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
/** The tabs read from the component's docs: Props, Events, Parts and styling. */
|
|
60
|
+
const docsTabs = (input) => {
|
|
61
|
+
const { docs } = input;
|
|
62
|
+
// a story without a component (a render of its own) still has the args its `argTypes` name
|
|
63
|
+
if (docs.status === "none") {
|
|
64
|
+
return [
|
|
65
|
+
...propsTab(input, panelProps([], input.argTypes)),
|
|
66
|
+
...eventsTab(input, eventsOf([], input.actions)),
|
|
67
|
+
...(input.trace === undefined ? [] : [interactionsTab(input.trace, input.onPlayAgain)])
|
|
68
|
+
];
|
|
69
|
+
}
|
|
70
|
+
if (docs.status === "loading") {
|
|
71
|
+
return [{ id: "props", label: STRINGS.tabs.props, content: notice(STRINGS.docsLoading, false) }];
|
|
72
|
+
}
|
|
73
|
+
if (docs.status === "error") {
|
|
74
|
+
return [
|
|
75
|
+
{
|
|
76
|
+
id: "props",
|
|
77
|
+
label: STRINGS.tabs.props,
|
|
78
|
+
content: notice(`${STRINGS.docsError}: ${docs.message}`, true)
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
const component = docs.value;
|
|
83
|
+
const events = eventsOf(component.props, input.actions);
|
|
84
|
+
const tabs = [];
|
|
85
|
+
tabs.push(...propsTab(input, panelProps(component.props, input.argTypes)));
|
|
86
|
+
tabs.push(...eventsTab(input, events));
|
|
87
|
+
if (input.trace !== undefined)
|
|
88
|
+
tabs.push(interactionsTab(input.trace, input.onPlayAgain));
|
|
89
|
+
if (component.parts.length > 0 || styleHooks(component).length > 0) {
|
|
90
|
+
tabs.push({
|
|
91
|
+
id: "parts",
|
|
92
|
+
label: STRINGS.tabs.parts,
|
|
93
|
+
hint: component.parts.length === 0 ? undefined : STRINGS.partCount(component.parts.length),
|
|
94
|
+
content: _jsx(PartsTab, { docs: component })
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return tabs;
|
|
98
|
+
};
|
|
99
|
+
/** The Interactions tab of a story whose play ran. */
|
|
100
|
+
const interactionsTab = (trace, onPlayAgain) => ({
|
|
101
|
+
id: "play",
|
|
102
|
+
label: STRINGS.tabs.play,
|
|
103
|
+
hint: interactionsHint(trace),
|
|
104
|
+
content: _jsx(InteractionsTab, { trace: trace, onPlayAgain: onPlayAgain })
|
|
105
|
+
});
|
|
106
|
+
/** The Code tab, when the story file's code is loaded or failed to load. */
|
|
107
|
+
const codeTabs = (input) => {
|
|
108
|
+
const { code, docs } = input;
|
|
109
|
+
// without the file's code, a story with a render would show the JSX of its args, which is not what it draws
|
|
110
|
+
if (code.status === "loading" || code.status === "none")
|
|
111
|
+
return [];
|
|
112
|
+
if (code.status === "error") {
|
|
113
|
+
return [
|
|
114
|
+
{ id: "code", label: STRINGS.tabs.code, content: notice(`${STRINGS.codeError}: ${code.message}`, true) }
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
return [
|
|
118
|
+
{
|
|
119
|
+
id: "code",
|
|
120
|
+
label: STRINGS.tabs.code,
|
|
121
|
+
content: (_jsx(CodeTab, { code: code.value, exportName: input.exportName, componentName: docs.status === "ready" ? docs.value.name : input.componentName, args: input.values }))
|
|
122
|
+
}
|
|
123
|
+
];
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* The tabs of a story's panel, in order.
|
|
127
|
+
*
|
|
128
|
+
* @param input - the docs, the code, the values, the calls, the check and their setters.
|
|
129
|
+
*/
|
|
130
|
+
export const dockTabs = (input) => [
|
|
131
|
+
...docsTabs(input),
|
|
132
|
+
...codeTabs(input),
|
|
133
|
+
{
|
|
134
|
+
id: "a11y",
|
|
135
|
+
label: STRINGS.tabs.a11y,
|
|
136
|
+
hint: a11yHint(input.check),
|
|
137
|
+
content: _jsx(A11yTab, { check: input.check, onCheck: input.onCheck })
|
|
138
|
+
}
|
|
139
|
+
];
|
|
140
|
+
//# sourceMappingURL=dockTabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dockTabs.js","sourceRoot":"","sources":["../../../src/shell/dockTabs.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAsC,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAKhF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAmB,MAAM,cAAe,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAe,CAAC;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jE;CACF,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shell's icons: small stroke drawings, decorative (the control around each carries the name).
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactNode } from "react";
|
|
7
|
+
/** The icons, by name. */
|
|
8
|
+
declare const PATHS: {
|
|
9
|
+
readonly sun: "M8 1.5v1.5M8 13v1.5M1.5 8H3M13 8h1.5M3.4 3.4l1 1M11.6 11.6l1 1M3.4 12.6l1-1M11.6 4.4l1-1M8 5a3 3 0 1 0 0 6a3 3 0 0 0 0-6Z";
|
|
10
|
+
readonly moon: "M13 9.5A5.5 5.5 0 0 1 6.5 3a5.5 5.5 0 1 0 6.5 6.5Z";
|
|
11
|
+
readonly monitor: "M2 3h12v8H2zM6 14h4M8 11v3";
|
|
12
|
+
readonly contrast: "M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2Zm0 0v12";
|
|
13
|
+
readonly sliders: "M3 4h6M12 4h1M3 8h1M7 8h6M3 12h7M13 12h0M10 2.5v3M5.5 6.5v3M11.5 10.5v3";
|
|
14
|
+
readonly chevronDown: "m4 6 4 4 4-4";
|
|
15
|
+
readonly chevronRight: "m6 4 4 4-4 4";
|
|
16
|
+
readonly compare: "M2 2h5v5H2zM9 2h5v5H9zM2 9h5v5H2zM9 9h5v5H9z";
|
|
17
|
+
readonly replay: "M2.5 8a5.5 5.5 0 1 0 1.6-3.9M2.5 2.5v2.5H5";
|
|
18
|
+
readonly restart: "M13.5 8a5.5 5.5 0 1 1-1.6-3.9M13.5 2.5v2.5H11";
|
|
19
|
+
readonly pause: "M5.5 3.5v9M10.5 3.5v9";
|
|
20
|
+
readonly play: "M5 3.5v9l7.5-4.5Z";
|
|
21
|
+
readonly search: "M7 2.5a4.5 4.5 0 1 0 0 9a4.5 4.5 0 0 0 0-9ZM10.5 10.5l3 3";
|
|
22
|
+
readonly panel: "M2 3h12v10H2zM2 9.5h12";
|
|
23
|
+
readonly outline: "M2.5 2.5h11v11h-11zM5 5h6v6H5z";
|
|
24
|
+
readonly grid: "M2 2h12v12H2zM6 2v12M10 2v12M2 6h12M2 10h12";
|
|
25
|
+
readonly ruler: "M2 10.5 10.5 2l3.5 3.5L5.5 14zM5 8l1.5 1.5M7 6l1 1M9 4l1.5 1.5";
|
|
26
|
+
readonly sidebar: "M2 3h12v10H2zM6 3v10";
|
|
27
|
+
readonly close: "M4 4l8 8M12 4l-8 8";
|
|
28
|
+
readonly external: "M9 2.5h4.5V7M13.5 2.5 8 8M11.5 9.5v4h-9v-9h4";
|
|
29
|
+
readonly width: "M2 4v8M14 4v8M4.5 8h7M6 6.5 4.5 8 6 9.5M10 6.5l1.5 1.5-1.5 1.5";
|
|
30
|
+
readonly plus: "M8 3.5v9M3.5 8h9";
|
|
31
|
+
readonly minus: "M3.5 8h9";
|
|
32
|
+
readonly hash: "M6 2.5 5 13.5M11 2.5l-1 11M3 6h10.5M2.5 10H13";
|
|
33
|
+
readonly check: "m3.5 8.5 3 3 6-7";
|
|
34
|
+
};
|
|
35
|
+
/** An icon's name. */
|
|
36
|
+
export type IconName = keyof typeof PATHS;
|
|
37
|
+
/**
|
|
38
|
+
* One icon, 16 px by default, in the current colour.
|
|
39
|
+
*
|
|
40
|
+
* @param props - the icon and its size in px.
|
|
41
|
+
*/
|
|
42
|
+
export declare const Icon: ({ name, size }: {
|
|
43
|
+
readonly name: IconName;
|
|
44
|
+
readonly size?: number;
|
|
45
|
+
}) => ReactNode;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=icons.d.ts.map
|