forgebook 0.1.8 → 0.2.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/README.md +875 -23
- package/dist/bin/forgebook/agentClient.d.ts +30 -1
- package/dist/bin/forgebook/agentClient.js +155 -14
- package/dist/bin/forgebook/agentLoopCommands.d.mts +0 -1
- package/dist/bin/forgebook/agentLoopCommands.mjs +161 -40
- package/dist/bin/forgebook/agentText.d.ts +74 -3
- package/dist/bin/forgebook/agentText.js +192 -8
- package/dist/bin/forgebook/agents.md +141 -7
- package/dist/bin/forgebook/agentsText.d.ts +7 -3
- package/dist/bin/forgebook/agentsText.js +7 -3
- package/dist/bin/forgebook/builtCatalogue.d.ts +31 -0
- package/dist/bin/forgebook/builtCatalogue.js +96 -0
- package/dist/bin/forgebook/catalogueCommands.d.ts +22 -3
- package/dist/bin/forgebook/catalogueCommands.js +21 -2
- package/dist/bin/forgebook/catalogueVite.d.ts +51 -9
- package/dist/bin/forgebook/catalogueVite.js +95 -9
- package/dist/bin/forgebook/checkCodeRun.d.ts +8 -0
- package/dist/bin/forgebook/checkCodeRun.js +27 -0
- package/dist/bin/forgebook/commandServer.d.ts +11 -0
- package/dist/bin/forgebook/commandServer.js +39 -0
- package/dist/bin/forgebook/compileCache.d.ts +7 -0
- package/dist/bin/forgebook/compileCache.js +24 -0
- package/dist/bin/forgebook/devCommands.d.mts +14 -0
- package/dist/bin/forgebook/devCommands.mjs +104 -0
- package/dist/bin/forgebook/errorsRun.d.ts +0 -1
- package/dist/bin/forgebook/errorsRun.js +0 -1
- package/dist/bin/forgebook/forgebook.d.mts +0 -1
- package/dist/bin/forgebook/forgebook.mjs +18 -302
- package/dist/bin/forgebook/forgebookCommands.d.mts +1 -0
- package/dist/bin/forgebook/forgebookCommands.mjs +292 -0
- package/dist/bin/forgebook/importers/storybook.d.ts +10 -4
- package/dist/bin/forgebook/importers/storybook.js +71 -45
- package/dist/bin/forgebook/importers/storybookAngular.d.ts +15 -0
- package/dist/bin/forgebook/importers/storybookAngular.js +97 -0
- package/dist/bin/forgebook/importers/storybookFrameworks.d.ts +53 -0
- package/dist/bin/forgebook/importers/storybookFrameworks.js +180 -0
- package/dist/bin/forgebook/importers/storybookReactNative.d.ts +40 -0
- package/dist/bin/forgebook/importers/storybookReactNative.js +179 -0
- package/dist/bin/forgebook/initCommands.d.mts +0 -1
- package/dist/bin/forgebook/initCommands.mjs +23 -12
- package/dist/bin/forgebook/initConfig.d.ts +0 -1
- package/dist/bin/forgebook/initConfig.js +17 -3
- package/dist/bin/forgebook/mcpCommand.d.mts +8 -0
- package/dist/bin/forgebook/mcpCommand.mjs +99 -0
- package/dist/bin/forgebook/mcpPreview.d.ts +32 -0
- package/dist/bin/forgebook/mcpPreview.js +107 -0
- package/dist/bin/forgebook/mcpToolParts.d.ts +28 -0
- package/dist/bin/forgebook/mcpToolParts.js +24 -0
- package/dist/bin/forgebook/mcpTools.d.ts +12 -6
- package/dist/bin/forgebook/mcpTools.js +148 -27
- package/dist/bin/forgebook/newStories.d.ts +2 -3
- package/dist/bin/forgebook/newStories.js +4 -3
- package/dist/bin/forgebook/newStoriesFile.d.ts +3 -4
- package/dist/bin/forgebook/newStoriesFile.js +23 -11
- package/dist/bin/forgebook/pageTools.d.ts +8 -0
- package/dist/bin/forgebook/pageTools.js +71 -0
- package/dist/bin/forgebook/pagesCommands.d.mts +14 -0
- package/dist/bin/forgebook/pagesCommands.mjs +109 -0
- package/dist/bin/forgebook/prebundleChild.d.ts +1 -0
- package/dist/bin/forgebook/prebundleChild.js +34 -0
- package/dist/bin/forgebook/prebundleRun.d.ts +22 -0
- package/dist/bin/forgebook/prebundleRun.js +49 -0
- package/dist/bin/forgebook/prebundleStart.d.ts +44 -0
- package/dist/bin/forgebook/prebundleStart.js +82 -0
- package/dist/bin/forgebook/semanticOptions.d.ts +45 -0
- package/dist/bin/forgebook/semanticOptions.js +36 -0
- package/dist/bin/forgebook/storyCheckCommands.d.mts +13 -0
- package/dist/bin/forgebook/storyCheckCommands.mjs +69 -0
- package/dist/bin/forgebook/storyCheckRun.d.ts +40 -6
- package/dist/bin/forgebook/storyCheckRun.js +90 -17
- package/dist/bin/forgebook/tokensRun.d.ts +41 -0
- package/dist/bin/forgebook/tokensRun.js +42 -0
- package/dist/bin/forgebook/touchWindowRun.d.ts +0 -1
- package/dist/bin/forgebook/touchWindowRun.js +0 -1
- package/dist/bin/forgebook/visualCommands.d.mts +37 -0
- package/dist/bin/forgebook/visualCommands.mjs +162 -0
- package/dist/bin/forgebook/viteCache.d.ts +48 -0
- package/dist/bin/forgebook/viteCache.js +112 -0
- package/dist/bin/forgebook-docs/catalogueDocs.d.ts +1 -2
- package/dist/bin/forgebook-docs/catalogueDocs.js +8 -5
- package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts +22 -3
- package/dist/bin/forgebook-docs/catalogueDocs.types.js +0 -1
- package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts +0 -1
- package/dist/bin/forgebook-docs/catalogueMarkdown.js +67 -19
- package/dist/bin/forgebook-docs/catalogueOptions.d.ts +1 -2
- package/dist/bin/forgebook-docs/catalogueOptions.js +8 -2
- package/dist/bin/forgebook-docs/collectDocs.d.ts +4 -4
- package/dist/bin/forgebook-docs/collectDocs.js +122 -30
- package/dist/bin/forgebook-docs/forgebook-docs.d.mts +0 -1
- package/dist/bin/forgebook-docs/forgebook-docs.mjs +0 -1
- package/dist/bin/forgebook-docs/llmsText.d.ts +5 -1
- package/dist/bin/forgebook-docs/llmsText.js +5 -2
- package/dist/bin/forgebook-docs/moduleDocs.d.ts +0 -1
- package/dist/bin/forgebook-docs/moduleDocs.js +0 -1
- package/dist/bin/forgebook-docs/sassDocs.d.ts +0 -1
- package/dist/bin/forgebook-docs/sassDocs.js +0 -1
- package/dist/bin/forgebook-texts/forgebook-texts.d.mts +0 -1
- package/dist/bin/forgebook-texts/forgebook-texts.mjs +1 -2
- package/dist/bin/forgebook-texts/storyTextsReport.d.ts +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.js +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.types.d.ts +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.types.js +0 -1
- package/dist/bin/frameworkDocs.d.ts +0 -1
- package/dist/bin/frameworkDocs.js +0 -1
- package/dist/src/a11y.d.ts +0 -1
- package/dist/src/a11y.js +0 -1
- package/dist/src/addressArgs.d.ts +74 -0
- package/dist/src/addressArgs.js +109 -0
- package/dist/src/addressTexts.d.ts +35 -0
- package/dist/src/addressTexts.js +51 -0
- package/dist/src/argTypes.d.ts +0 -1
- package/dist/src/argTypes.js +2 -2
- package/dist/src/audiences.d.ts +17 -0
- package/dist/src/audiences.js +15 -0
- package/dist/src/backdrops.d.ts +39 -40
- package/dist/src/backdrops.js +37 -174
- package/dist/src/catalogue.d.ts +56 -20
- package/dist/src/catalogue.js +33 -14
- package/dist/src/codeLiteral.d.ts +41 -0
- package/dist/src/codeLiteral.js +51 -0
- package/dist/src/componentDocs.d.ts +57 -1
- package/dist/src/componentDocs.js +20 -3
- package/dist/src/controlKeys.d.ts +0 -1
- package/dist/src/controlKeys.js +0 -1
- package/dist/src/deviceDrawing.d.ts +114 -0
- package/dist/src/deviceDrawing.js +358 -0
- package/dist/src/deviceMenuView.d.ts +17 -0
- package/dist/src/deviceMenuView.js +22 -0
- package/dist/src/devicePicture.d.ts +57 -0
- package/dist/src/devicePicture.js +104 -0
- package/dist/src/deviceView.d.ts +172 -0
- package/dist/src/deviceView.js +111 -0
- package/dist/src/devices.d.ts +115 -0
- package/dist/src/devices.js +135 -0
- package/dist/src/docAnchors.d.ts +27 -0
- package/dist/src/docAnchors.js +33 -0
- package/dist/src/docPages.d.ts +203 -0
- package/dist/src/docPages.js +169 -0
- package/dist/src/embed.d.ts +32 -0
- package/dist/src/embed.js +24 -0
- package/dist/src/embedCode.d.ts +31 -0
- package/dist/src/embedCode.js +88 -0
- package/dist/src/frame/backdropPictures.d.ts +29 -0
- package/dist/src/frame/backdropPictures.js +187 -0
- package/dist/src/frame/checkStory.d.ts +6 -3
- package/dist/src/frame/checkStory.js +76 -5
- package/dist/src/frame/followTouch.d.ts +9 -0
- package/dist/src/frame/followTouch.js +43 -0
- package/dist/src/frame/frame.css +8 -3
- package/dist/src/frame/frameClock.d.ts +0 -1
- package/dist/src/frame/frameClock.js +0 -1
- package/dist/src/frame/frameStatus.d.ts +2 -1
- package/dist/src/frame/frameStatus.js +2 -1
- package/dist/src/frame/frameView.d.ts +0 -1
- package/dist/src/frame/frameView.js +1 -2
- package/dist/src/frame/matrixLayout.d.ts +0 -1
- package/dist/src/frame/matrixLayout.js +0 -1
- package/dist/src/frame/measureTools.d.ts +0 -1
- package/dist/src/frame/measureTools.js +0 -1
- package/dist/src/frame/mountFrame.d.ts +10 -3
- package/dist/src/frame/mountFrame.js +162 -63
- package/dist/src/frame/playStory.d.ts +0 -1
- package/dist/src/frame/playStory.js +0 -1
- package/dist/src/frame/pluginFrames.d.ts +31 -0
- package/dist/src/frame/pluginFrames.js +23 -0
- package/dist/src/frame/renderer.d.ts +50 -12
- package/dist/src/frame/renderer.js +27 -6
- package/dist/src/frame/settle.d.ts +0 -1
- package/dist/src/frame/settle.js +0 -1
- package/dist/src/frame/shellChannel.d.ts +47 -0
- package/dist/src/frame/shellChannel.js +39 -0
- package/dist/src/frame/spillOutline.d.ts +0 -1
- package/dist/src/frame/spillOutline.js +0 -1
- package/dist/src/frame/staleModule.d.ts +14 -2
- package/dist/src/frame/staleModule.js +19 -2
- package/dist/src/frame/storyCanvas.d.ts +0 -1
- package/dist/src/frame/storyCanvas.js +0 -1
- package/dist/src/frame/storyHooks.d.ts +0 -1
- package/dist/src/frame/storyHooks.js +0 -1
- package/dist/src/frame/storyModule.d.ts +13 -2
- package/dist/src/frame/storyModule.js +45 -3
- package/dist/src/frame/storyRun.d.ts +21 -4
- package/dist/src/frame/storyRun.js +100 -19
- package/dist/src/frame/touchDots.d.ts +0 -1
- package/dist/src/frame/touchDots.js +0 -1
- package/dist/src/frame/touchEvents.d.ts +0 -1
- package/dist/src/frame/touchEvents.js +0 -1
- package/dist/src/frame/touchGesture.d.ts +0 -1
- package/dist/src/frame/touchGesture.js +0 -1
- package/dist/src/frame/touchLayer.d.ts +3 -3
- package/dist/src/frame/touchLayer.js +4 -30
- package/dist/src/frame/touchScroll.d.ts +0 -1
- package/dist/src/frame/touchScroll.js +0 -1
- package/dist/src/frameOrigins.d.ts +62 -0
- package/dist/src/frameOrigins.js +49 -0
- package/dist/src/hotModules.d.ts +48 -0
- package/dist/src/hotModules.js +53 -0
- package/dist/src/jsxCode.d.ts +22 -0
- package/dist/src/jsxCode.js +36 -0
- package/dist/src/languages.d.ts +0 -1
- package/dist/src/languages.js +0 -1
- package/dist/src/liveErrors.d.ts +0 -1
- package/dist/src/liveErrors.js +0 -1
- package/dist/src/matrix.d.ts +0 -1
- package/dist/src/matrix.js +0 -1
- package/dist/src/messages.d.ts +28 -2
- package/dist/src/messages.js +24 -3
- package/dist/src/namedValues.d.ts +11 -1
- package/dist/src/namedValues.js +25 -2
- package/dist/src/namedViews.d.ts +1 -13
- package/dist/src/namedViews.js +30 -7
- package/dist/src/packedText.d.ts +21 -0
- package/dist/src/packedText.js +36 -0
- package/dist/src/pageAddress.d.ts +26 -0
- package/dist/src/pageAddress.js +39 -0
- package/dist/src/pageConfig.d.ts +3 -1
- package/dist/src/pageConfig.js +0 -1
- package/dist/src/pageTree.d.ts +79 -0
- package/dist/src/pageTree.js +108 -0
- package/dist/src/playTrace.d.ts +0 -1
- package/dist/src/playTrace.js +0 -1
- package/dist/src/plugin.d.ts +230 -0
- package/dist/src/plugin.js +12 -0
- package/dist/src/pluginReact.d.ts +23 -0
- package/dist/src/pluginReact.js +24 -0
- package/dist/src/previewRelay.d.ts +40 -0
- package/dist/src/previewRelay.js +69 -0
- package/dist/src/previewTexts.d.ts +26 -0
- package/dist/src/previewTexts.js +33 -0
- package/dist/src/previewView.d.ts +31 -0
- package/dist/src/previewView.js +264 -0
- package/dist/src/propGroups.d.ts +46 -0
- package/dist/src/propGroups.js +59 -0
- package/dist/src/realTouch.d.ts +1 -2
- package/dist/src/realTouch.js +1 -2
- package/dist/src/safeAreaParameter.d.ts +42 -0
- package/dist/src/safeAreaParameter.js +50 -0
- package/dist/src/search.d.ts +154 -0
- package/dist/src/search.js +265 -0
- package/dist/src/searchIndex.d.ts +61 -0
- package/dist/src/searchIndex.js +55 -0
- package/dist/src/searchMarks.d.ts +29 -0
- package/dist/src/searchMarks.js +165 -0
- package/dist/src/searchMatch.d.ts +58 -0
- package/dist/src/searchMatch.js +127 -0
- package/dist/src/shell/A11yTab.d.ts +0 -7
- package/dist/src/shell/A11yTab.js +4 -15
- package/dist/src/shell/AnchorScroll.d.ts +25 -0
- package/dist/src/shell/AnchorScroll.js +10 -0
- package/dist/src/shell/ApiReference.d.ts +11 -4
- package/dist/src/shell/ApiReference.js +73 -19
- package/dist/src/shell/AppearanceMenu.d.ts +1 -2
- package/dist/src/shell/AppearanceMenu.js +8 -5
- package/dist/src/shell/AudienceSections.d.ts +106 -0
- package/dist/src/shell/AudienceSections.js +154 -0
- package/dist/src/shell/AuthoredHome.d.ts +37 -0
- package/dist/src/shell/AuthoredHome.js +96 -0
- package/dist/src/shell/BoxWidth.d.ts +0 -1
- package/dist/src/shell/BoxWidth.js +0 -1
- package/dist/src/shell/ClockBar.d.ts +19 -0
- package/dist/src/shell/ClockBar.js +15 -0
- package/dist/src/shell/ClockControls.d.ts +5 -9
- package/dist/src/shell/ClockControls.js +13 -16
- package/dist/src/shell/Code.d.ts +0 -1
- package/dist/src/shell/Code.js +0 -1
- package/dist/src/shell/CodeTab.d.ts +0 -1
- package/dist/src/shell/CodeTab.js +2 -2
- package/dist/src/shell/CodeText.d.ts +0 -1
- package/dist/src/shell/CodeText.js +0 -1
- package/dist/src/shell/CompareGrid.d.ts +37 -0
- package/dist/src/shell/CompareGrid.js +24 -0
- package/dist/src/shell/ComponentPage.d.ts +45 -7
- package/dist/src/shell/ComponentPage.js +105 -49
- package/dist/src/shell/ControlKeyField.d.ts +0 -1
- package/dist/src/shell/ControlKeyField.js +3 -4
- package/dist/src/shell/ControlRow.d.ts +4 -4
- package/dist/src/shell/ControlRow.js +5 -5
- package/dist/src/shell/DeviceControl.d.ts +31 -0
- package/dist/src/shell/DeviceControl.js +33 -0
- package/dist/src/shell/DeviceSlot.d.ts +114 -0
- package/dist/src/shell/DeviceSlot.js +134 -0
- package/dist/src/shell/DocBlocks.d.ts +100 -0
- package/dist/src/shell/DocBlocks.js +206 -0
- package/dist/src/shell/DocContainers.d.ts +70 -0
- package/dist/src/shell/DocContainers.js +94 -0
- package/dist/src/shell/DocContents.d.ts +29 -0
- package/dist/src/shell/DocContents.js +88 -0
- package/dist/src/shell/DocPage.d.ts +69 -0
- package/dist/src/shell/DocPage.js +141 -0
- package/dist/src/shell/Dock.d.ts +1 -2
- package/dist/src/shell/Dock.js +1 -2
- package/dist/src/shell/DroppedArgsList.d.ts +26 -0
- package/dist/src/shell/DroppedArgsList.js +8 -0
- package/dist/src/shell/DroppedArgsNote.d.ts +14 -0
- package/dist/src/shell/DroppedArgsNote.js +10 -0
- package/dist/src/shell/EmbedButton.d.ts +19 -0
- package/dist/src/shell/EmbedButton.js +96 -0
- package/dist/src/shell/EmbedPage.d.ts +23 -0
- package/dist/src/shell/EmbedPage.js +168 -0
- package/dist/src/shell/EmbedPanel.d.ts +25 -0
- package/dist/src/shell/EmbedPanel.js +46 -0
- package/dist/src/shell/EventsTab.d.ts +0 -1
- package/dist/src/shell/EventsTab.js +2 -3
- package/dist/src/shell/Example.d.ts +20 -2
- package/dist/src/shell/Example.js +75 -22
- package/dist/src/shell/FrameView.d.ts +1 -2
- package/dist/src/shell/FrameView.js +4 -4
- package/dist/src/shell/HomePage.d.ts +78 -4
- package/dist/src/shell/HomePage.js +53 -14
- package/dist/src/shell/HomePieces.d.ts +40 -0
- package/dist/src/shell/HomePieces.js +29 -0
- package/dist/src/shell/InfoTip.d.ts +0 -1
- package/dist/src/shell/InfoTip.js +0 -1
- package/dist/src/shell/InteractionsTab.d.ts +0 -7
- package/dist/src/shell/InteractionsTab.js +3 -9
- package/dist/src/shell/LazyHost.d.ts +16 -0
- package/dist/src/shell/LazyHost.js +42 -0
- package/dist/src/shell/LazyPage.d.ts +24 -0
- package/dist/src/shell/LazyPage.js +9 -0
- package/dist/src/shell/LogicMark.d.ts +0 -1
- package/dist/src/shell/LogicMark.js +0 -1
- package/dist/src/shell/MatrixPicker.d.ts +0 -1
- package/dist/src/shell/MatrixPicker.js +0 -1
- package/dist/src/shell/NamedViews.d.ts +0 -1
- package/dist/src/shell/NamedViews.js +4 -5
- package/dist/src/shell/PackageHtml.d.ts +0 -1
- package/dist/src/shell/PackageHtml.js +0 -1
- package/dist/src/shell/PartsTab.d.ts +0 -7
- package/dist/src/shell/PartsTab.js +3 -13
- package/dist/src/shell/PinnedControl.d.ts +0 -1
- package/dist/src/shell/PinnedControl.js +2 -2
- package/dist/src/shell/PluginBlockHost.d.ts +46 -0
- package/dist/src/shell/PluginBlockHost.js +39 -0
- package/dist/src/shell/PluginTabHost.d.ts +32 -0
- package/dist/src/shell/PluginTabHost.js +25 -0
- package/dist/src/shell/PluginViewHost.d.ts +37 -0
- package/dist/src/shell/PluginViewHost.js +89 -0
- package/dist/src/shell/PropFields.d.ts +0 -1
- package/dist/src/shell/PropFields.js +0 -1
- package/dist/src/shell/PropsTab.d.ts +11 -2
- package/dist/src/shell/PropsTab.js +31 -5
- package/dist/src/shell/SearchPanel.d.ts +63 -0
- package/dist/src/shell/SearchPanel.js +209 -0
- package/dist/src/shell/Segmented.d.ts +0 -1
- package/dist/src/shell/Segmented.js +0 -1
- package/dist/src/shell/Shell.d.ts +34 -6
- package/dist/src/shell/Shell.js +271 -70
- package/dist/src/shell/Sidebar.d.ts +20 -5
- package/dist/src/shell/Sidebar.js +23 -56
- package/dist/src/shell/SidebarDocs.d.ts +38 -0
- package/dist/src/shell/SidebarDocs.js +30 -0
- package/dist/src/shell/SidebarEntries.d.ts +9 -1
- package/dist/src/shell/SidebarEntries.js +1 -2
- package/dist/src/shell/SidebarHandle.d.ts +0 -1
- package/dist/src/shell/SidebarHandle.js +0 -1
- package/dist/src/shell/SidebarSearch.d.ts +40 -0
- package/dist/src/shell/SidebarSearch.js +85 -0
- package/dist/src/shell/SignatureReference.d.ts +0 -1
- package/dist/src/shell/SignatureReference.js +1 -2
- package/dist/src/shell/Stage.d.ts +9 -4
- package/dist/src/shell/Stage.js +112 -59
- package/dist/src/shell/StageCompare.d.ts +14 -0
- package/dist/src/shell/StageCompare.js +11 -0
- package/dist/src/shell/StageTools.d.ts +0 -1
- package/dist/src/shell/StageTools.js +0 -1
- package/dist/src/shell/StageViewport.d.ts +7 -3
- package/dist/src/shell/StageViewport.js +4 -5
- package/dist/src/shell/StoryBar.d.ts +40 -0
- package/dist/src/shell/StoryBar.js +23 -0
- package/dist/src/shell/StoryCodeBlock.d.ts +1 -2
- package/dist/src/shell/StoryCodeBlock.js +0 -1
- package/dist/src/shell/StoryCoverage.d.ts +36 -0
- package/dist/src/shell/StoryCoverage.js +126 -0
- package/dist/src/shell/StoryPicker.d.ts +0 -1
- package/dist/src/shell/StoryPicker.js +0 -1
- package/dist/src/shell/Toolbar.d.ts +7 -3
- package/dist/src/shell/Toolbar.js +6 -6
- package/dist/src/shell/ToolbarControl.d.ts +6 -8
- package/dist/src/shell/ToolbarControl.js +28 -20
- package/dist/src/shell/UsedIn.d.ts +5 -6
- package/dist/src/shell/UsedIn.js +7 -20
- package/dist/src/shell/ViewMenu.d.ts +7 -7
- package/dist/src/shell/ViewMenu.js +61 -176
- package/dist/src/shell/ViewMenuPanel.d.ts +41 -0
- package/dist/src/shell/ViewMenuPanel.js +199 -0
- package/dist/src/shell/WidthField.d.ts +3 -2
- package/dist/src/shell/WidthField.js +2 -3
- package/dist/src/shell/asideStory.d.ts +34 -0
- package/dist/src/shell/asideStory.js +55 -0
- package/dist/src/shell/audienceLayout.d.ts +39 -0
- package/dist/src/shell/audienceLayout.js +33 -0
- package/dist/src/shell/audiencePage.d.ts +113 -0
- package/dist/src/shell/audiencePage.js +144 -0
- package/dist/src/shell/audienceSections.css +95 -0
- package/dist/src/shell/catalogueContext.d.ts +24 -2
- package/dist/src/shell/catalogueContext.js +12 -9
- package/dist/src/shell/codeTokens.d.ts +0 -1
- package/dist/src/shell/codeTokens.js +0 -1
- package/dist/src/shell/codeWriter.d.ts +0 -1
- package/dist/src/shell/codeWriter.js +0 -1
- package/dist/src/shell/compareVariants.d.ts +0 -1
- package/dist/src/shell/compareVariants.js +2 -2
- package/dist/src/shell/controlCycle.d.ts +0 -1
- package/dist/src/shell/controlCycle.js +13 -1
- package/dist/src/shell/controlLabel.d.ts +7 -0
- package/dist/src/shell/controlLabel.js +17 -0
- package/dist/src/shell/device/deviceFrame.css +42 -0
- package/dist/src/shell/device/deviceParts.d.ts +90 -0
- package/dist/src/shell/device/deviceParts.js +120 -0
- package/dist/src/shell/docPage.css +451 -0
- package/dist/src/shell/dockTabs.d.ts +13 -5
- package/dist/src/shell/dockTabs.js +40 -18
- package/dist/src/shell/embed.css +74 -0
- package/dist/src/shell/filesCode.d.ts +21 -0
- package/dist/src/shell/filesCode.js +37 -0
- package/dist/src/shell/forgebookMark.d.ts +15 -0
- package/dist/src/shell/forgebookMark.js +28 -0
- package/dist/src/shell/framesOrigin.d.ts +23 -0
- package/dist/src/shell/framesOrigin.js +69 -0
- package/dist/src/shell/icons.d.ts +3 -1
- package/dist/src/shell/icons.js +3 -1
- package/dist/src/shell/keyboard.d.ts +0 -1
- package/dist/src/shell/keyboard.js +0 -1
- package/dist/src/shell/laterStrings.d.ts +91 -0
- package/dist/src/shell/laterStrings.js +102 -0
- package/dist/src/shell/lazyModule.d.ts +49 -0
- package/dist/src/shell/lazyModule.js +72 -0
- package/dist/src/shell/lazyTab.d.ts +21 -0
- package/dist/src/shell/lazyTab.js +9 -0
- package/dist/src/shell/logicView.d.ts +0 -12
- package/dist/src/shell/logicView.js +2 -2
- package/dist/src/shell/mountShell.d.ts +5 -3
- package/dist/src/shell/mountShell.js +43 -12
- package/dist/src/shell/pageStrings.d.ts +24 -0
- package/dist/src/shell/pageStrings.js +26 -0
- package/dist/src/shell/pluginHosts.d.ts +9 -0
- package/dist/src/shell/pluginHosts.js +6 -0
- package/dist/src/shell/pluginHostsContext.d.ts +20 -0
- package/dist/src/shell/pluginHostsContext.js +16 -0
- package/dist/src/shell/pluginTabs.d.ts +63 -0
- package/dist/src/shell/pluginTabs.js +60 -0
- package/dist/src/shell/search.css +172 -0
- package/dist/src/shell/searchStrings.d.ts +24 -0
- package/dist/src/shell/searchStrings.js +31 -0
- package/dist/src/shell/shell.css +285 -139
- package/dist/src/shell/shellScheme.d.ts +37 -0
- package/dist/src/shell/shellScheme.js +32 -0
- package/dist/src/shell/storyTouch.d.ts +19 -6
- package/dist/src/shell/storyTouch.js +26 -4
- package/dist/src/shell/strings.d.ts +56 -80
- package/dist/src/shell/strings.js +53 -78
- package/dist/src/shell/switchView.d.ts +0 -1
- package/dist/src/shell/switchView.js +0 -1
- package/dist/src/shell/tabSummaries.d.ts +31 -0
- package/dist/src/shell/tabSummaries.js +27 -0
- package/dist/src/shell/treeSearch.d.ts +39 -3
- package/dist/src/shell/treeSearch.js +27 -1
- package/dist/src/shell/useAddressArgs.d.ts +55 -0
- package/dist/src/shell/useAddressArgs.js +62 -0
- package/dist/src/shell/useAnchorScroll.d.ts +24 -0
- package/dist/src/shell/useAnchorScroll.js +90 -0
- package/dist/src/shell/useAppearance.d.ts +7 -2
- package/dist/src/shell/useAppearance.js +14 -5
- package/dist/src/shell/useComponentDocs.d.ts +0 -1
- package/dist/src/shell/useComponentDocs.js +0 -1
- package/dist/src/shell/useControlKeys.d.ts +2 -1
- package/dist/src/shell/useControlKeys.js +2 -3
- package/dist/src/shell/useCopy.d.ts +2 -1
- package/dist/src/shell/useCopy.js +11 -6
- package/dist/src/shell/useFold.d.ts +0 -1
- package/dist/src/shell/useFold.js +0 -1
- package/dist/src/shell/useFrameMessages.d.ts +19 -4
- package/dist/src/shell/useFrameMessages.js +23 -7
- package/dist/src/shell/useFrameQueue.d.ts +7 -3
- package/dist/src/shell/useFrameQueue.js +39 -22
- package/dist/src/shell/useFullPage.d.ts +0 -1
- package/dist/src/shell/useFullPage.js +0 -1
- package/dist/src/shell/useLiveView.d.ts +0 -1
- package/dist/src/shell/useLiveView.js +0 -1
- package/dist/src/shell/useLoaded.d.ts +1 -2
- package/dist/src/shell/useLoaded.js +28 -6
- package/dist/src/shell/usePageDoc.d.ts +0 -1
- package/dist/src/shell/usePageDoc.js +0 -1
- package/dist/src/shell/usePageFrames.d.ts +46 -0
- package/dist/src/shell/usePageFrames.js +50 -0
- package/dist/src/shell/usePluginTabs.d.ts +18 -0
- package/dist/src/shell/usePluginTabs.js +45 -0
- package/dist/src/shell/usePopover.d.ts +0 -1
- package/dist/src/shell/usePopover.js +0 -1
- package/dist/src/shell/useProseLinks.d.ts +14 -0
- package/dist/src/shell/useProseLinks.js +30 -0
- package/dist/src/shell/useRecentPages.d.ts +3 -4
- package/dist/src/shell/useRecentPages.js +1 -2
- package/dist/src/shell/useScrollMemory.d.ts +9 -1
- package/dist/src/shell/useScrollMemory.js +2 -3
- package/dist/src/shell/useSearchIndex.d.ts +24 -0
- package/dist/src/shell/useSearchIndex.js +51 -0
- package/dist/src/shell/useShownView.d.ts +3 -1
- package/dist/src/shell/useShownView.js +5 -5
- package/dist/src/shell/useSidebarLayout.d.ts +0 -1
- package/dist/src/shell/useSidebarLayout.js +0 -1
- package/dist/src/shell/useStored.d.ts +13 -1
- package/dist/src/shell/useStored.js +13 -5
- package/dist/src/shell/useStoryCheck.d.ts +20 -0
- package/dist/src/shell/useStoryCheck.js +33 -0
- package/dist/src/shell/useStoryCode.d.ts +0 -1
- package/dist/src/shell/useStoryCode.js +0 -1
- package/dist/src/shell/useStoryHeights.d.ts +0 -1
- package/dist/src/shell/useStoryHeights.js +0 -1
- package/dist/src/shell/useStoryIdsElement.d.ts +0 -1
- package/dist/src/shell/useStoryIdsElement.js +0 -1
- package/dist/src/shell/useStoryKeys.d.ts +0 -1
- package/dist/src/shell/useStoryKeys.js +0 -1
- package/dist/src/shell/useSyncedTab.d.ts +8 -0
- package/dist/src/shell/useSyncedTab.js +60 -0
- package/dist/src/shell/useSystemDark.d.ts +0 -1
- package/dist/src/shell/useSystemDark.js +0 -1
- package/dist/src/shell/useToolbarLayout.d.ts +0 -1
- package/dist/src/shell/useToolbarLayout.js +0 -1
- package/dist/src/shell/useToolbarOverflow.d.ts +0 -1
- package/dist/src/shell/useToolbarOverflow.js +0 -1
- package/dist/src/shell/useWorstCase.d.ts +0 -1
- package/dist/src/shell/useWorstCase.js +2 -2
- package/dist/src/shell/worstArgs.d.ts +0 -1
- package/dist/src/shell/worstArgs.js +0 -1
- package/dist/src/shellTheme.d.ts +64 -0
- package/dist/src/shellTheme.js +274 -0
- package/dist/src/shellTheme.types.d.ts +93 -0
- package/dist/src/shellTheme.types.js +10 -0
- package/dist/src/sourceFiles.d.ts +17 -3
- package/dist/src/sourceFiles.js +27 -1
- package/dist/src/spills.d.ts +0 -1
- package/dist/src/spills.js +0 -1
- package/dist/src/storyBackground.d.ts +0 -1
- package/dist/src/storyBackground.js +0 -1
- package/dist/src/storyCheck.d.ts +86 -2
- package/dist/src/storyCheck.js +12 -2
- package/dist/src/storyClock.d.ts +0 -1
- package/dist/src/storyClock.js +0 -1
- package/dist/src/storyGlobals.d.ts +0 -1
- package/dist/src/storyGlobals.js +0 -1
- package/dist/src/storyHeights.d.ts +0 -1
- package/dist/src/storyHeights.js +0 -1
- package/dist/src/storyIds.d.ts +36 -0
- package/dist/src/storyIds.js +52 -0
- package/dist/src/storyIdsElement.d.ts +0 -1
- package/dist/src/storyIdsElement.js +0 -1
- package/dist/src/storyTexts.d.ts +11 -5
- package/dist/src/storyTexts.js +16 -5
- package/dist/src/storyTree.d.ts +79 -25
- package/dist/src/storyTree.js +211 -127
- package/dist/src/switches.d.ts +0 -1
- package/dist/src/switches.js +6 -2
- package/dist/src/toolbarLayout.d.ts +0 -1
- package/dist/src/toolbarLayout.js +0 -1
- package/dist/src/treePlaces.d.ts +60 -0
- package/dist/src/treePlaces.js +89 -0
- package/dist/src/usedIn.d.ts +28 -1
- package/dist/src/usedIn.js +93 -3
- package/dist/src/viewState.d.ts +37 -9
- package/dist/src/viewState.js +67 -9
- package/dist/src/viewWords.d.ts +0 -13
- package/dist/src/viewWords.js +41 -3
- package/dist/src/vite/adapter.d.ts +62 -1
- package/dist/src/vite/adapter.js +20 -2
- package/dist/src/vite/agent.types.d.ts +279 -7
- package/dist/src/vite/agent.types.js +11 -1
- package/dist/src/vite/agentApi.d.ts +55 -2
- package/dist/src/vite/agentApi.js +130 -8
- package/dist/src/vite/agentIds.d.ts +25 -0
- package/dist/src/vite/agentIds.js +41 -0
- package/dist/src/vite/agentIndex.d.ts +63 -0
- package/dist/src/vite/agentIndex.js +91 -0
- package/dist/src/vite/agentIndexRoute.d.ts +10 -0
- package/dist/src/vite/agentIndexRoute.js +35 -0
- package/dist/src/vite/agentRoutes.d.ts +80 -19
- package/dist/src/vite/agentRoutes.js +167 -24
- package/dist/src/vite/autoTitle.d.ts +0 -1
- package/dist/src/vite/autoTitle.js +0 -1
- package/dist/src/vite/axeScript.d.ts +20 -0
- package/dist/src/vite/axeScript.js +60 -0
- package/dist/src/vite/builtTexts.d.ts +75 -0
- package/dist/src/vite/builtTexts.js +142 -0
- package/dist/src/vite/catalogueConfig.d.ts +10 -0
- package/dist/src/vite/catalogueConfig.js +64 -0
- package/dist/src/vite/checkCode.d.ts +67 -0
- package/dist/src/vite/checkCode.js +145 -0
- package/dist/src/vite/closeWatch.d.ts +96 -0
- package/dist/src/vite/closeWatch.js +219 -0
- package/dist/src/vite/codeFence.d.ts +78 -0
- package/dist/src/vite/codeFence.js +267 -0
- package/dist/src/vite/componentImport.d.ts +8 -0
- package/dist/src/vite/componentImport.js +35 -0
- package/dist/src/vite/componentPage.d.ts +15 -2
- package/dist/src/vite/componentPage.js +55 -16
- package/dist/src/vite/config.d.ts +51 -3
- package/dist/src/vite/config.js +0 -1
- package/dist/src/vite/configFile.d.ts +65 -9
- package/dist/src/vite/configFile.js +182 -28
- package/dist/src/vite/designTokens.d.ts +75 -0
- package/dist/src/vite/designTokens.js +382 -0
- package/dist/src/vite/diskCache.d.ts +51 -0
- package/dist/src/vite/diskCache.js +211 -0
- package/dist/src/vite/docDirectives.d.ts +116 -0
- package/dist/src/vite/docDirectives.js +425 -0
- package/dist/src/vite/docMarkdown.d.ts +76 -0
- package/dist/src/vite/docMarkdown.js +150 -0
- package/dist/src/vite/docPageBlocks.d.ts +64 -0
- package/dist/src/vite/docPageBlocks.js +322 -0
- package/dist/src/vite/docPageLinks.d.ts +72 -0
- package/dist/src/vite/docPageLinks.js +135 -0
- package/dist/src/vite/docPageMarkdown.d.ts +86 -0
- package/dist/src/vite/docPageMarkdown.js +133 -0
- package/dist/src/vite/docPageRender.d.ts +27 -0
- package/dist/src/vite/docPageRender.js +199 -0
- package/dist/src/vite/docPageTokens.d.ts +91 -0
- package/dist/src/vite/docPageTokens.js +186 -0
- package/dist/src/vite/docPagesModule.d.ts +50 -0
- package/dist/src/vite/docPagesModule.js +118 -0
- package/dist/src/vite/docPagesRoute.d.ts +38 -0
- package/dist/src/vite/docPagesRoute.js +154 -0
- package/dist/src/vite/docsDependencies.d.ts +6 -0
- package/dist/src/vite/docsDependencies.js +150 -0
- package/dist/src/vite/docsExtractor.d.ts +44 -3
- package/dist/src/vite/docsExtractor.js +160 -26
- package/dist/src/vite/docsProgram.d.ts +89 -9
- package/dist/src/vite/docsProgram.js +413 -50
- package/dist/src/vite/docsWorker.d.ts +0 -1
- package/dist/src/vite/docsWorker.js +49 -15
- package/dist/src/vite/figmaLink.d.ts +26 -0
- package/dist/src/vite/figmaLink.js +92 -0
- package/dist/src/vite/findComponent.d.ts +32 -0
- package/dist/src/vite/findComponent.js +52 -0
- package/dist/src/vite/findRoute.d.ts +14 -0
- package/dist/src/vite/findRoute.js +62 -0
- package/dist/src/vite/forcedStates.d.ts +0 -1
- package/dist/src/vite/forcedStates.js +0 -1
- package/dist/src/vite/forgebookPlugin.d.ts +1 -2
- package/dist/src/vite/forgebookPlugin.js +321 -263
- package/dist/src/vite/framesConfig.d.ts +89 -0
- package/dist/src/vite/framesConfig.js +149 -0
- package/dist/src/vite/framesServer.d.ts +43 -0
- package/dist/src/vite/framesServer.js +326 -0
- package/dist/src/vite/functionComponentDocs.d.ts +26 -0
- package/dist/src/vite/functionComponentDocs.js +193 -0
- package/dist/src/vite/gitChange.d.ts +56 -0
- package/dist/src/vite/gitChange.js +86 -0
- package/dist/src/vite/heightsRoute.d.ts +0 -1
- package/dist/src/vite/heightsRoute.js +0 -1
- package/dist/src/vite/highlightCode.d.ts +0 -1
- package/dist/src/vite/highlightCode.js +8 -27
- package/dist/src/vite/hotSnippets.d.ts +86 -0
- package/dist/src/vite/hotSnippets.js +168 -0
- package/dist/src/vite/indexFields.d.ts +61 -0
- package/dist/src/vite/indexFields.js +149 -0
- package/dist/src/vite/indexStoryFile.d.ts +19 -18
- package/dist/src/vite/indexStoryFile.js +165 -221
- package/dist/src/vite/indexedParameters.d.ts +10 -0
- package/dist/src/vite/indexedParameters.js +110 -0
- package/dist/src/vite/mcpProtocol.d.ts +36 -2
- package/dist/src/vite/mcpProtocol.js +100 -15
- package/dist/src/vite/moduleSummary.d.ts +17 -0
- package/dist/src/vite/moduleSummary.js +40 -0
- package/dist/src/vite/nearestToken.d.ts +50 -0
- package/dist/src/vite/nearestToken.js +295 -0
- package/dist/src/vite/originGuard.d.ts +87 -0
- package/dist/src/vite/originGuard.js +163 -0
- package/dist/src/vite/packedModule.d.ts +40 -0
- package/dist/src/vite/packedModule.js +74 -0
- package/dist/src/vite/pages.d.ts +63 -10
- package/dist/src/vite/pages.js +264 -33
- package/dist/src/vite/parsedFiles.d.ts +18 -0
- package/dist/src/vite/parsedFiles.js +91 -0
- package/dist/src/vite/plainGrammars.d.ts +20 -0
- package/dist/src/vite/plainGrammars.js +113 -0
- package/dist/src/vite/pluginConfig.d.ts +47 -0
- package/dist/src/vite/pluginConfig.js +220 -0
- package/dist/src/vite/pluginIds.d.ts +20 -0
- package/dist/src/vite/pluginIds.js +61 -0
- package/dist/src/vite/pluginModules.d.ts +140 -0
- package/dist/src/vite/pluginModules.js +176 -0
- package/dist/src/vite/prebundled.d.ts +18 -5
- package/dist/src/vite/prebundled.js +28 -18
- package/dist/src/vite/previewPages.d.ts +14 -0
- package/dist/src/vite/previewPages.js +81 -0
- package/dist/src/vite/previewRoute.d.ts +8 -0
- package/dist/src/vite/previewRoute.js +8 -0
- package/dist/src/vite/previewRunner.d.ts +56 -0
- package/dist/src/vite/previewRunner.js +207 -0
- package/dist/src/vite/propDocs.d.ts +60 -0
- package/dist/src/vite/propDocs.js +387 -0
- package/dist/src/vite/searchModule.d.ts +40 -0
- package/dist/src/vite/searchModule.js +212 -0
- package/dist/src/vite/searchRoute.d.ts +7 -0
- package/dist/src/vite/searchRoute.js +79 -0
- package/dist/src/vite/serverConditions.d.ts +31 -0
- package/dist/src/vite/serverConditions.js +69 -0
- package/dist/src/vite/signatureDocs.d.ts +18 -0
- package/dist/src/vite/signatureDocs.js +64 -0
- package/dist/src/vite/sourceTokens.d.ts +57 -0
- package/dist/src/vite/sourceTokens.js +164 -0
- package/dist/src/vite/storyCode.d.ts +0 -1
- package/dist/src/vite/storyCode.js +2 -3
- package/dist/src/vite/storyExports.d.ts +32 -0
- package/dist/src/vite/storyExports.js +27 -0
- package/dist/src/vite/storyFilesModule.d.ts +56 -4
- package/dist/src/vite/storyFilesModule.js +122 -34
- package/dist/src/vite/storyMeta.d.ts +20 -11
- package/dist/src/vite/storyMeta.js +74 -38
- package/dist/src/vite/storyParse.d.ts +18 -0
- package/dist/src/vite/storyParse.js +20 -0
- package/dist/src/vite/storyPlay.d.ts +29 -0
- package/dist/src/vite/storyPlay.js +54 -0
- package/dist/src/vite/storyReach.d.ts +42 -0
- package/dist/src/vite/storyReach.js +43 -0
- package/dist/src/vite/storylessRoutes.d.ts +29 -0
- package/dist/src/vite/storylessRoutes.js +126 -0
- package/dist/src/vite/textModules.d.ts +63 -0
- package/dist/src/vite/textModules.js +132 -0
- package/dist/src/vite/textQueries.d.ts +20 -0
- package/dist/src/vite/textQueries.js +20 -0
- package/dist/src/vite/themeFromTokens.d.ts +35 -0
- package/dist/src/vite/themeFromTokens.js +73 -0
- package/dist/src/vite/tokenAnswers.d.ts +20 -0
- package/dist/src/vite/tokenAnswers.js +86 -0
- package/dist/src/vite/tokenClashes.d.ts +44 -0
- package/dist/src/vite/tokenClashes.js +45 -0
- package/dist/src/vite/touchMedia.d.ts +0 -1
- package/dist/src/vite/touchMedia.js +0 -1
- package/dist/src/vite/typeScriptPieces.d.ts +0 -1
- package/dist/src/vite/typeScriptPieces.js +2 -3
- package/dist/src/vite/usageGraph.d.ts +6 -1
- package/dist/src/vite/usageGraph.js +41 -7
- package/dist/src/vite/usageGuidance.d.ts +33 -0
- package/dist/src/vite/usageGuidance.js +45 -0
- package/dist/src/vite/usageModule.d.ts +0 -1
- package/dist/src/vite/usageModule.js +0 -1
- package/dist/src/vite/vitePaths.d.ts +53 -0
- package/dist/src/vite/vitePaths.js +53 -0
- package/dist/src/worstCase.d.ts +0 -1
- package/dist/src/worstCase.js +0 -1
- package/package.json +68 -5
- package/dist/bin/forgebook/agentClient.d.ts.map +0 -1
- package/dist/bin/forgebook/agentClient.js.map +0 -1
- package/dist/bin/forgebook/agentLoopCommands.d.mts.map +0 -1
- package/dist/bin/forgebook/agentLoopCommands.mjs.map +0 -1
- package/dist/bin/forgebook/agentText.d.ts.map +0 -1
- package/dist/bin/forgebook/agentText.js.map +0 -1
- package/dist/bin/forgebook/agentsText.d.ts.map +0 -1
- package/dist/bin/forgebook/agentsText.js.map +0 -1
- package/dist/bin/forgebook/catalogueCommands.d.ts.map +0 -1
- package/dist/bin/forgebook/catalogueCommands.js.map +0 -1
- package/dist/bin/forgebook/catalogueVite.d.ts.map +0 -1
- package/dist/bin/forgebook/catalogueVite.js.map +0 -1
- package/dist/bin/forgebook/errorsRun.d.ts.map +0 -1
- package/dist/bin/forgebook/errorsRun.js.map +0 -1
- package/dist/bin/forgebook/forgebook.d.mts.map +0 -1
- package/dist/bin/forgebook/forgebook.mjs.map +0 -1
- package/dist/bin/forgebook/importers/storybook.d.ts.map +0 -1
- package/dist/bin/forgebook/importers/storybook.js.map +0 -1
- package/dist/bin/forgebook/initCommands.d.mts.map +0 -1
- package/dist/bin/forgebook/initCommands.mjs.map +0 -1
- package/dist/bin/forgebook/initConfig.d.ts.map +0 -1
- package/dist/bin/forgebook/initConfig.js.map +0 -1
- package/dist/bin/forgebook/mcpTools.d.ts.map +0 -1
- package/dist/bin/forgebook/mcpTools.js.map +0 -1
- package/dist/bin/forgebook/newStories.d.ts.map +0 -1
- package/dist/bin/forgebook/newStories.js.map +0 -1
- package/dist/bin/forgebook/newStoriesFile.d.ts.map +0 -1
- package/dist/bin/forgebook/newStoriesFile.js.map +0 -1
- package/dist/bin/forgebook/storyCheckRun.d.ts.map +0 -1
- package/dist/bin/forgebook/storyCheckRun.js.map +0 -1
- package/dist/bin/forgebook/touchWindowRun.d.ts.map +0 -1
- package/dist/bin/forgebook/touchWindowRun.js.map +0 -1
- package/dist/bin/forgebook-docs/catalogueDocs.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/catalogueDocs.js.map +0 -1
- package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/catalogueDocs.types.js.map +0 -1
- package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/catalogueMarkdown.js.map +0 -1
- package/dist/bin/forgebook-docs/catalogueOptions.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/catalogueOptions.js.map +0 -1
- package/dist/bin/forgebook-docs/collectDocs.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/collectDocs.js.map +0 -1
- package/dist/bin/forgebook-docs/forgebook-docs.d.mts.map +0 -1
- package/dist/bin/forgebook-docs/forgebook-docs.mjs.map +0 -1
- package/dist/bin/forgebook-docs/llmsText.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/llmsText.js.map +0 -1
- package/dist/bin/forgebook-docs/moduleDocs.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/moduleDocs.js.map +0 -1
- package/dist/bin/forgebook-docs/sassDocs.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/sassDocs.js.map +0 -1
- package/dist/bin/forgebook-docs/sourceId.d.ts +0 -9
- package/dist/bin/forgebook-docs/sourceId.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/sourceId.js +0 -45
- package/dist/bin/forgebook-docs/sourceId.js.map +0 -1
- package/dist/bin/forgebook-texts/forgebook-texts.d.mts.map +0 -1
- package/dist/bin/forgebook-texts/forgebook-texts.mjs.map +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.d.ts.map +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.js.map +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.types.d.ts.map +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.types.js.map +0 -1
- package/dist/bin/frameworkDocs.d.ts.map +0 -1
- package/dist/bin/frameworkDocs.js.map +0 -1
- package/dist/src/a11y.d.ts.map +0 -1
- package/dist/src/a11y.js.map +0 -1
- package/dist/src/argTypes.d.ts.map +0 -1
- package/dist/src/argTypes.js.map +0 -1
- package/dist/src/backdrops.d.ts.map +0 -1
- package/dist/src/backdrops.js.map +0 -1
- package/dist/src/catalogue.d.ts.map +0 -1
- package/dist/src/catalogue.js.map +0 -1
- package/dist/src/componentDocs.d.ts.map +0 -1
- package/dist/src/componentDocs.js.map +0 -1
- package/dist/src/controlKeys.d.ts.map +0 -1
- package/dist/src/controlKeys.js.map +0 -1
- package/dist/src/frame/checkStory.d.ts.map +0 -1
- package/dist/src/frame/checkStory.js.map +0 -1
- package/dist/src/frame/frameClock.d.ts.map +0 -1
- package/dist/src/frame/frameClock.js.map +0 -1
- package/dist/src/frame/frameStatus.d.ts.map +0 -1
- package/dist/src/frame/frameStatus.js.map +0 -1
- package/dist/src/frame/frameView.d.ts.map +0 -1
- package/dist/src/frame/frameView.js.map +0 -1
- package/dist/src/frame/matrixLayout.d.ts.map +0 -1
- package/dist/src/frame/matrixLayout.js.map +0 -1
- package/dist/src/frame/measureTools.d.ts.map +0 -1
- package/dist/src/frame/measureTools.js.map +0 -1
- package/dist/src/frame/mountFrame.d.ts.map +0 -1
- package/dist/src/frame/mountFrame.js.map +0 -1
- package/dist/src/frame/playStory.d.ts.map +0 -1
- package/dist/src/frame/playStory.js.map +0 -1
- package/dist/src/frame/renderer.d.ts.map +0 -1
- package/dist/src/frame/renderer.js.map +0 -1
- package/dist/src/frame/settle.d.ts.map +0 -1
- package/dist/src/frame/settle.js.map +0 -1
- package/dist/src/frame/spillOutline.d.ts.map +0 -1
- package/dist/src/frame/spillOutline.js.map +0 -1
- package/dist/src/frame/staleModule.d.ts.map +0 -1
- package/dist/src/frame/staleModule.js.map +0 -1
- package/dist/src/frame/storyCanvas.d.ts.map +0 -1
- package/dist/src/frame/storyCanvas.js.map +0 -1
- package/dist/src/frame/storyHooks.d.ts.map +0 -1
- package/dist/src/frame/storyHooks.js.map +0 -1
- package/dist/src/frame/storyModule.d.ts.map +0 -1
- package/dist/src/frame/storyModule.js.map +0 -1
- package/dist/src/frame/storyRun.d.ts.map +0 -1
- package/dist/src/frame/storyRun.js.map +0 -1
- package/dist/src/frame/touchDots.d.ts.map +0 -1
- package/dist/src/frame/touchDots.js.map +0 -1
- package/dist/src/frame/touchEvents.d.ts.map +0 -1
- package/dist/src/frame/touchEvents.js.map +0 -1
- package/dist/src/frame/touchGesture.d.ts.map +0 -1
- package/dist/src/frame/touchGesture.js.map +0 -1
- package/dist/src/frame/touchLayer.d.ts.map +0 -1
- package/dist/src/frame/touchLayer.js.map +0 -1
- package/dist/src/frame/touchScroll.d.ts.map +0 -1
- package/dist/src/frame/touchScroll.js.map +0 -1
- package/dist/src/languages.d.ts.map +0 -1
- package/dist/src/languages.js.map +0 -1
- package/dist/src/liveErrors.d.ts.map +0 -1
- package/dist/src/liveErrors.js.map +0 -1
- package/dist/src/matrix.d.ts.map +0 -1
- package/dist/src/matrix.js.map +0 -1
- package/dist/src/messages.d.ts.map +0 -1
- package/dist/src/messages.js.map +0 -1
- package/dist/src/namedValues.d.ts.map +0 -1
- package/dist/src/namedValues.js.map +0 -1
- package/dist/src/namedViews.d.ts.map +0 -1
- package/dist/src/namedViews.js.map +0 -1
- package/dist/src/pageConfig.d.ts.map +0 -1
- package/dist/src/pageConfig.js.map +0 -1
- package/dist/src/playTrace.d.ts.map +0 -1
- package/dist/src/playTrace.js.map +0 -1
- package/dist/src/realTouch.d.ts.map +0 -1
- package/dist/src/realTouch.js.map +0 -1
- package/dist/src/shell/A11yTab.d.ts.map +0 -1
- package/dist/src/shell/A11yTab.js.map +0 -1
- package/dist/src/shell/ApiReference.d.ts.map +0 -1
- package/dist/src/shell/ApiReference.js.map +0 -1
- package/dist/src/shell/AppearanceMenu.d.ts.map +0 -1
- package/dist/src/shell/AppearanceMenu.js.map +0 -1
- package/dist/src/shell/BoxWidth.d.ts.map +0 -1
- package/dist/src/shell/BoxWidth.js.map +0 -1
- package/dist/src/shell/ClockControls.d.ts.map +0 -1
- package/dist/src/shell/ClockControls.js.map +0 -1
- package/dist/src/shell/Code.d.ts.map +0 -1
- package/dist/src/shell/Code.js.map +0 -1
- package/dist/src/shell/CodeTab.d.ts.map +0 -1
- package/dist/src/shell/CodeTab.js.map +0 -1
- package/dist/src/shell/CodeText.d.ts.map +0 -1
- package/dist/src/shell/CodeText.js.map +0 -1
- package/dist/src/shell/ComponentPage.d.ts.map +0 -1
- package/dist/src/shell/ComponentPage.js.map +0 -1
- package/dist/src/shell/ControlKeyField.d.ts.map +0 -1
- package/dist/src/shell/ControlKeyField.js.map +0 -1
- package/dist/src/shell/ControlRow.d.ts.map +0 -1
- package/dist/src/shell/ControlRow.js.map +0 -1
- package/dist/src/shell/Dock.d.ts.map +0 -1
- package/dist/src/shell/Dock.js.map +0 -1
- package/dist/src/shell/EventsTab.d.ts.map +0 -1
- package/dist/src/shell/EventsTab.js.map +0 -1
- package/dist/src/shell/Example.d.ts.map +0 -1
- package/dist/src/shell/Example.js.map +0 -1
- package/dist/src/shell/FrameView.d.ts.map +0 -1
- package/dist/src/shell/FrameView.js.map +0 -1
- package/dist/src/shell/HomePage.d.ts.map +0 -1
- package/dist/src/shell/HomePage.js.map +0 -1
- package/dist/src/shell/InfoTip.d.ts.map +0 -1
- package/dist/src/shell/InfoTip.js.map +0 -1
- package/dist/src/shell/InteractionsTab.d.ts.map +0 -1
- package/dist/src/shell/InteractionsTab.js.map +0 -1
- package/dist/src/shell/LogicMark.d.ts.map +0 -1
- package/dist/src/shell/LogicMark.js.map +0 -1
- package/dist/src/shell/MatrixPicker.d.ts.map +0 -1
- package/dist/src/shell/MatrixPicker.js.map +0 -1
- package/dist/src/shell/NamedViews.d.ts.map +0 -1
- package/dist/src/shell/NamedViews.js.map +0 -1
- package/dist/src/shell/PackageHtml.d.ts.map +0 -1
- package/dist/src/shell/PackageHtml.js.map +0 -1
- package/dist/src/shell/PartsTab.d.ts.map +0 -1
- package/dist/src/shell/PartsTab.js.map +0 -1
- package/dist/src/shell/PinnedControl.d.ts.map +0 -1
- package/dist/src/shell/PinnedControl.js.map +0 -1
- package/dist/src/shell/PropFields.d.ts.map +0 -1
- package/dist/src/shell/PropFields.js.map +0 -1
- package/dist/src/shell/PropsTab.d.ts.map +0 -1
- package/dist/src/shell/PropsTab.js.map +0 -1
- package/dist/src/shell/Segmented.d.ts.map +0 -1
- package/dist/src/shell/Segmented.js.map +0 -1
- package/dist/src/shell/Shell.d.ts.map +0 -1
- package/dist/src/shell/Shell.js.map +0 -1
- package/dist/src/shell/Sidebar.d.ts.map +0 -1
- package/dist/src/shell/Sidebar.js.map +0 -1
- package/dist/src/shell/SidebarEntries.d.ts.map +0 -1
- package/dist/src/shell/SidebarEntries.js.map +0 -1
- package/dist/src/shell/SidebarHandle.d.ts.map +0 -1
- package/dist/src/shell/SidebarHandle.js.map +0 -1
- package/dist/src/shell/SignatureReference.d.ts.map +0 -1
- package/dist/src/shell/SignatureReference.js.map +0 -1
- package/dist/src/shell/Stage.d.ts.map +0 -1
- package/dist/src/shell/Stage.js.map +0 -1
- package/dist/src/shell/StageTools.d.ts.map +0 -1
- package/dist/src/shell/StageTools.js.map +0 -1
- package/dist/src/shell/StageViewport.d.ts.map +0 -1
- package/dist/src/shell/StageViewport.js.map +0 -1
- package/dist/src/shell/StoryCodeBlock.d.ts.map +0 -1
- package/dist/src/shell/StoryCodeBlock.js.map +0 -1
- package/dist/src/shell/StoryPicker.d.ts.map +0 -1
- package/dist/src/shell/StoryPicker.js.map +0 -1
- package/dist/src/shell/Toolbar.d.ts.map +0 -1
- package/dist/src/shell/Toolbar.js.map +0 -1
- package/dist/src/shell/ToolbarControl.d.ts.map +0 -1
- package/dist/src/shell/ToolbarControl.js.map +0 -1
- package/dist/src/shell/UsedIn.d.ts.map +0 -1
- package/dist/src/shell/UsedIn.js.map +0 -1
- package/dist/src/shell/ViewMenu.d.ts.map +0 -1
- package/dist/src/shell/ViewMenu.js.map +0 -1
- package/dist/src/shell/WidthField.d.ts.map +0 -1
- package/dist/src/shell/WidthField.js.map +0 -1
- package/dist/src/shell/catalogueContext.d.ts.map +0 -1
- package/dist/src/shell/catalogueContext.js.map +0 -1
- package/dist/src/shell/codeTokens.d.ts.map +0 -1
- package/dist/src/shell/codeTokens.js.map +0 -1
- package/dist/src/shell/codeWriter.d.ts.map +0 -1
- package/dist/src/shell/codeWriter.js.map +0 -1
- package/dist/src/shell/compareVariants.d.ts.map +0 -1
- package/dist/src/shell/compareVariants.js.map +0 -1
- package/dist/src/shell/controlCycle.d.ts.map +0 -1
- package/dist/src/shell/controlCycle.js.map +0 -1
- package/dist/src/shell/dockTabs.d.ts.map +0 -1
- package/dist/src/shell/dockTabs.js.map +0 -1
- package/dist/src/shell/icons.d.ts.map +0 -1
- package/dist/src/shell/icons.js.map +0 -1
- package/dist/src/shell/keyboard.d.ts.map +0 -1
- package/dist/src/shell/keyboard.js.map +0 -1
- package/dist/src/shell/logicView.d.ts.map +0 -1
- package/dist/src/shell/logicView.js.map +0 -1
- package/dist/src/shell/mountShell.d.ts.map +0 -1
- package/dist/src/shell/mountShell.js.map +0 -1
- package/dist/src/shell/storyTouch.d.ts.map +0 -1
- package/dist/src/shell/storyTouch.js.map +0 -1
- package/dist/src/shell/strings.d.ts.map +0 -1
- package/dist/src/shell/strings.js.map +0 -1
- package/dist/src/shell/switchView.d.ts.map +0 -1
- package/dist/src/shell/switchView.js.map +0 -1
- package/dist/src/shell/treeSearch.d.ts.map +0 -1
- package/dist/src/shell/treeSearch.js.map +0 -1
- package/dist/src/shell/useAppearance.d.ts.map +0 -1
- package/dist/src/shell/useAppearance.js.map +0 -1
- package/dist/src/shell/useComponentDocs.d.ts.map +0 -1
- package/dist/src/shell/useComponentDocs.js.map +0 -1
- package/dist/src/shell/useControlKeys.d.ts.map +0 -1
- package/dist/src/shell/useControlKeys.js.map +0 -1
- package/dist/src/shell/useCopy.d.ts.map +0 -1
- package/dist/src/shell/useCopy.js.map +0 -1
- package/dist/src/shell/useFold.d.ts.map +0 -1
- package/dist/src/shell/useFold.js.map +0 -1
- package/dist/src/shell/useFrameMessages.d.ts.map +0 -1
- package/dist/src/shell/useFrameMessages.js.map +0 -1
- package/dist/src/shell/useFrameQueue.d.ts.map +0 -1
- package/dist/src/shell/useFrameQueue.js.map +0 -1
- package/dist/src/shell/useFullPage.d.ts.map +0 -1
- package/dist/src/shell/useFullPage.js.map +0 -1
- package/dist/src/shell/useLiveView.d.ts.map +0 -1
- package/dist/src/shell/useLiveView.js.map +0 -1
- package/dist/src/shell/useLoaded.d.ts.map +0 -1
- package/dist/src/shell/useLoaded.js.map +0 -1
- package/dist/src/shell/usePageDoc.d.ts.map +0 -1
- package/dist/src/shell/usePageDoc.js.map +0 -1
- package/dist/src/shell/usePopover.d.ts.map +0 -1
- package/dist/src/shell/usePopover.js.map +0 -1
- package/dist/src/shell/useRecentPages.d.ts.map +0 -1
- package/dist/src/shell/useRecentPages.js.map +0 -1
- package/dist/src/shell/useScrollMemory.d.ts.map +0 -1
- package/dist/src/shell/useScrollMemory.js.map +0 -1
- package/dist/src/shell/useShownView.d.ts.map +0 -1
- package/dist/src/shell/useShownView.js.map +0 -1
- package/dist/src/shell/useSidebarLayout.d.ts.map +0 -1
- package/dist/src/shell/useSidebarLayout.js.map +0 -1
- package/dist/src/shell/useStored.d.ts.map +0 -1
- package/dist/src/shell/useStored.js.map +0 -1
- package/dist/src/shell/useStoryCode.d.ts.map +0 -1
- package/dist/src/shell/useStoryCode.js.map +0 -1
- package/dist/src/shell/useStoryHeights.d.ts.map +0 -1
- package/dist/src/shell/useStoryHeights.js.map +0 -1
- package/dist/src/shell/useStoryIdsElement.d.ts.map +0 -1
- package/dist/src/shell/useStoryIdsElement.js.map +0 -1
- package/dist/src/shell/useStoryKeys.d.ts.map +0 -1
- package/dist/src/shell/useStoryKeys.js.map +0 -1
- package/dist/src/shell/useSystemDark.d.ts.map +0 -1
- package/dist/src/shell/useSystemDark.js.map +0 -1
- package/dist/src/shell/useToolbarLayout.d.ts.map +0 -1
- package/dist/src/shell/useToolbarLayout.js.map +0 -1
- package/dist/src/shell/useToolbarOverflow.d.ts.map +0 -1
- package/dist/src/shell/useToolbarOverflow.js.map +0 -1
- package/dist/src/shell/useWorstCase.d.ts.map +0 -1
- package/dist/src/shell/useWorstCase.js.map +0 -1
- package/dist/src/shell/worstArgs.d.ts.map +0 -1
- package/dist/src/shell/worstArgs.js.map +0 -1
- package/dist/src/sourceFiles.d.ts.map +0 -1
- package/dist/src/sourceFiles.js.map +0 -1
- package/dist/src/spills.d.ts.map +0 -1
- package/dist/src/spills.js.map +0 -1
- package/dist/src/storyBackground.d.ts.map +0 -1
- package/dist/src/storyBackground.js.map +0 -1
- package/dist/src/storyCheck.d.ts.map +0 -1
- package/dist/src/storyCheck.js.map +0 -1
- package/dist/src/storyClock.d.ts.map +0 -1
- package/dist/src/storyClock.js.map +0 -1
- package/dist/src/storyGlobals.d.ts.map +0 -1
- package/dist/src/storyGlobals.js.map +0 -1
- package/dist/src/storyHeights.d.ts.map +0 -1
- package/dist/src/storyHeights.js.map +0 -1
- package/dist/src/storyIdsElement.d.ts.map +0 -1
- package/dist/src/storyIdsElement.js.map +0 -1
- package/dist/src/storyTexts.d.ts.map +0 -1
- package/dist/src/storyTexts.js.map +0 -1
- package/dist/src/storyTree.d.ts.map +0 -1
- package/dist/src/storyTree.js.map +0 -1
- package/dist/src/switches.d.ts.map +0 -1
- package/dist/src/switches.js.map +0 -1
- package/dist/src/toolbarLayout.d.ts.map +0 -1
- package/dist/src/toolbarLayout.js.map +0 -1
- package/dist/src/usedIn.d.ts.map +0 -1
- package/dist/src/usedIn.js.map +0 -1
- package/dist/src/viewState.d.ts.map +0 -1
- package/dist/src/viewState.js.map +0 -1
- package/dist/src/viewWords.d.ts.map +0 -1
- package/dist/src/viewWords.js.map +0 -1
- package/dist/src/vite/adapter.d.ts.map +0 -1
- package/dist/src/vite/adapter.js.map +0 -1
- package/dist/src/vite/agent.types.d.ts.map +0 -1
- package/dist/src/vite/agent.types.js.map +0 -1
- package/dist/src/vite/agentApi.d.ts.map +0 -1
- package/dist/src/vite/agentApi.js.map +0 -1
- package/dist/src/vite/agentRoutes.d.ts.map +0 -1
- package/dist/src/vite/agentRoutes.js.map +0 -1
- package/dist/src/vite/autoTitle.d.ts.map +0 -1
- package/dist/src/vite/autoTitle.js.map +0 -1
- package/dist/src/vite/componentPage.d.ts.map +0 -1
- package/dist/src/vite/componentPage.js.map +0 -1
- package/dist/src/vite/config.d.ts.map +0 -1
- package/dist/src/vite/config.js.map +0 -1
- package/dist/src/vite/configFile.d.ts.map +0 -1
- package/dist/src/vite/configFile.js.map +0 -1
- package/dist/src/vite/docsExtractor.d.ts.map +0 -1
- package/dist/src/vite/docsExtractor.js.map +0 -1
- package/dist/src/vite/docsProgram.d.ts.map +0 -1
- package/dist/src/vite/docsProgram.js.map +0 -1
- package/dist/src/vite/docsWorker.d.ts.map +0 -1
- package/dist/src/vite/docsWorker.js.map +0 -1
- package/dist/src/vite/forcedStates.d.ts.map +0 -1
- package/dist/src/vite/forcedStates.js.map +0 -1
- package/dist/src/vite/forgebookPlugin.d.ts.map +0 -1
- package/dist/src/vite/forgebookPlugin.js.map +0 -1
- package/dist/src/vite/heightsRoute.d.ts.map +0 -1
- package/dist/src/vite/heightsRoute.js.map +0 -1
- package/dist/src/vite/highlightCode.d.ts.map +0 -1
- package/dist/src/vite/highlightCode.js.map +0 -1
- package/dist/src/vite/indexStoryFile.d.ts.map +0 -1
- package/dist/src/vite/indexStoryFile.js.map +0 -1
- package/dist/src/vite/mcpProtocol.d.ts.map +0 -1
- package/dist/src/vite/mcpProtocol.js.map +0 -1
- package/dist/src/vite/pages.d.ts.map +0 -1
- package/dist/src/vite/pages.js.map +0 -1
- package/dist/src/vite/prebundled.d.ts.map +0 -1
- package/dist/src/vite/prebundled.js.map +0 -1
- package/dist/src/vite/storyCode.d.ts.map +0 -1
- package/dist/src/vite/storyCode.js.map +0 -1
- package/dist/src/vite/storyFilesModule.d.ts.map +0 -1
- package/dist/src/vite/storyFilesModule.js.map +0 -1
- package/dist/src/vite/storyMeta.d.ts.map +0 -1
- package/dist/src/vite/storyMeta.js.map +0 -1
- package/dist/src/vite/touchMedia.d.ts.map +0 -1
- package/dist/src/vite/touchMedia.js.map +0 -1
- package/dist/src/vite/typeScriptPieces.d.ts.map +0 -1
- package/dist/src/vite/typeScriptPieces.js.map +0 -1
- package/dist/src/vite/usageGraph.d.ts.map +0 -1
- package/dist/src/vite/usageGraph.js.map +0 -1
- package/dist/src/vite/usageModule.d.ts.map +0 -1
- package/dist/src/vite/usageModule.js.map +0 -1
- package/dist/src/worstCase.d.ts.map +0 -1
- package/dist/src/worstCase.js.map +0 -1
|
@@ -4,158 +4,33 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
6
|
* The sidebar lists every story before any is loaded, so the index comes from the code itself, parsed with Vite's
|
|
7
|
-
* parser (the same files Vite compiles). It reads a meta written inline or as a constant (`export default meta
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* parser (the same files Vite compiles). It reads a meta written inline or as a constant (`export default meta`,
|
|
8
|
+
* `export { meta as default }`), `includeStories`, `excludeStories`, `__namedExportsOrder`, the meta's and the
|
|
9
|
+
* stories' `tags`, the TSDoc above a story, and `parameters.docs.description`.
|
|
10
|
+
*
|
|
11
|
+
* Every named export the meta lets in is a story, as Storybook's indexer has it, whatever writes its value: an object
|
|
12
|
+
* (CSF 3), a function with its properties assigned after it (CSF 2: `A.storyName`, `A.parameters`), a template bound
|
|
13
|
+
* into a story, a helper's result (`makeStory(…)`), another constant (`export const B = A`), a re-export
|
|
14
|
+
* (`export { A as B }`, from this file or another). The fields come from the object a value is or names, and from what
|
|
15
|
+
* is assigned to the export; anything else is the frame's to read when the story loads. Only what does not exist when
|
|
16
|
+
* the file runs is left out: `export type`, and `export *`, whose names Storybook does not list either.
|
|
11
17
|
*
|
|
12
18
|
* A value the index needs (the title, a name, `parameters.controls`, `group`, `height`, `main`, the meta's `alsoIn`,
|
|
13
19
|
* `related`, `keywords`) is read when written plainly; written by code, it is left to the frame, which reads it when
|
|
14
|
-
* the story loads. `touch`
|
|
15
|
-
* written by code
|
|
20
|
+
* the story loads. `touch`, `logic`, `device`, `design.figma` and the meta's `propGroups` are read by the index only
|
|
21
|
+
* (`indexedParameters.ts`, `indexFields.ts`), so written by code they are a problem.
|
|
22
|
+
* A `design.figma` is checked here too, so the pages never carry the checker: one that is not a link to a Figma file is
|
|
23
|
+
* noted and left out, and the file keeps its stories. A title written by code, or none, is the file's path
|
|
24
|
+
* (`autoTitle`, as Storybook's auto-title); one written by code is also noted, since the author meant another. A value written plainly but wrongly
|
|
16
25
|
* (`controls: true`) is a problem. Pure: text in, index or problem out.
|
|
17
26
|
*
|
|
18
27
|
* @module
|
|
19
28
|
*/
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*/
|
|
26
|
-
export const unwrapped = (expression) => {
|
|
27
|
-
if (expression.type === "TSSatisfiesExpression" ||
|
|
28
|
-
expression.type === "TSAsExpression" ||
|
|
29
|
-
expression.type === "ParenthesizedExpression") {
|
|
30
|
-
return unwrapped(expression.expression);
|
|
31
|
-
}
|
|
32
|
-
return expression;
|
|
33
|
-
};
|
|
34
|
-
/** A property key's name: an identifier's or a literal's; `undefined` for any other key. */
|
|
35
|
-
const keyName = (key) => {
|
|
36
|
-
if (key.type === "Identifier")
|
|
37
|
-
return key.name;
|
|
38
|
-
return key.type === "Literal" ? String(key.value) : undefined;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* The value of an object's property written plainly (a name or a string as its key), its TypeScript wrappers removed.
|
|
42
|
-
*
|
|
43
|
-
* @param object - the object.
|
|
44
|
-
* @param name - the property's name.
|
|
45
|
-
*/
|
|
46
|
-
export const propertyValue = (object, name) => {
|
|
47
|
-
for (const property of object.properties) {
|
|
48
|
-
if (property.type !== "Property" || property.computed)
|
|
49
|
-
continue;
|
|
50
|
-
if (keyName(property.key) === name)
|
|
51
|
-
return unwrapped(property.value);
|
|
52
|
-
}
|
|
53
|
-
return undefined;
|
|
54
|
-
};
|
|
55
|
-
/** An object's fields. */
|
|
56
|
-
const objectFields = (object) => (name) => propertyValue(object, name);
|
|
57
|
-
/** Whether an expression is written plainly: a literal, or a list of literals; anything else is written by code. */
|
|
58
|
-
const isPlain = (expression) => expression.type === "Literal" ||
|
|
59
|
-
(expression.type === "ArrayExpression" &&
|
|
60
|
-
expression.elements.every((element) => element !== null && element.type === "Literal"));
|
|
61
|
-
/** A field's value when it is a plain string; `undefined` when it is missing or written by code. */
|
|
62
|
-
const stringField = (fields, name) => {
|
|
63
|
-
const value = fields(name);
|
|
64
|
-
return value?.type === "Literal" && typeof value.value === "string" ? value.value : undefined;
|
|
65
|
-
};
|
|
66
|
-
/** A field of the `parameters` object, when the fields write one as an object. */
|
|
67
|
-
const parameter = (fields, name) => {
|
|
68
|
-
const parameters = fields("parameters");
|
|
69
|
-
return parameters?.type === "ObjectExpression" ? propertyValue(parameters, name) : undefined;
|
|
70
|
-
};
|
|
71
|
-
/** Why `parameters.controls` cannot be read. */
|
|
72
|
-
const CONTROLS_PROBLEM = "`parameters.controls` must be written as `false` or a list of plain strings";
|
|
73
|
-
/**
|
|
74
|
-
* `parameters.controls`: `undefined` when none or written by code, `[]` for `false`, the names of a list, or a
|
|
75
|
-
* problem when written plainly but wrongly.
|
|
76
|
-
*/
|
|
77
|
-
const controlsOf = (fields) => {
|
|
78
|
-
const controls = parameter(fields, "controls");
|
|
79
|
-
if (controls === undefined || !isPlain(controls))
|
|
80
|
-
return undefined;
|
|
81
|
-
if (controls.type === "Literal" && controls.value === false)
|
|
82
|
-
return [];
|
|
83
|
-
if (controls.type !== "ArrayExpression")
|
|
84
|
-
return new Error(CONTROLS_PROBLEM);
|
|
85
|
-
const names = controls.elements.flatMap((element) => element?.type === "Literal" && typeof element.value === "string" ? [element.value] : []);
|
|
86
|
-
return names.length === controls.elements.length ? names : new Error(CONTROLS_PROBLEM);
|
|
87
|
-
};
|
|
88
|
-
/** A list of plain strings: `undefined` when none or written by code, the strings, or a problem when it is wrong. */
|
|
89
|
-
const stringListOf = (fields, name) => {
|
|
90
|
-
const list = fields(name);
|
|
91
|
-
if (list === undefined || !isPlain(list))
|
|
92
|
-
return undefined;
|
|
93
|
-
if (list.type !== "ArrayExpression")
|
|
94
|
-
return new Error(`\`${name}\` must be written as a list of plain strings`);
|
|
95
|
-
const strings = list.elements.flatMap((element) => element?.type === "Literal" && typeof element.value === "string" ? [element.value] : []);
|
|
96
|
-
return strings.length === list.elements.length
|
|
97
|
-
? strings
|
|
98
|
-
: new Error(`\`${name}\` must be written as a list of plain strings`);
|
|
99
|
-
};
|
|
100
|
-
/** `parameters.group`: `undefined` when none or written by code, the group, or a problem when it is wrong. */
|
|
101
|
-
const groupOf = (fields) => {
|
|
102
|
-
const group = parameter(fields, "group");
|
|
103
|
-
if (group === undefined || !isPlain(group))
|
|
104
|
-
return undefined;
|
|
105
|
-
if (group.type === "Literal" && typeof group.value === "string" && group.value !== "")
|
|
106
|
-
return group.value;
|
|
107
|
-
return new Error("`parameters.group` must be written as a plain string");
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* A boolean parameter only the index reads (`touch`, `logic`): `true` or `false` written plainly, `undefined` when
|
|
111
|
-
* none, or a problem otherwise. Written by code it would be lost, since the frame does not read it.
|
|
112
|
-
*
|
|
113
|
-
* @param fields - the story's or the meta's fields.
|
|
114
|
-
* @param name - the parameter's name.
|
|
115
|
-
*/
|
|
116
|
-
const booleanParameter = (fields, name) => {
|
|
117
|
-
const value = parameter(fields, name);
|
|
118
|
-
if (value === undefined)
|
|
119
|
-
return undefined;
|
|
120
|
-
if (value.type === "Literal" && typeof value.value === "boolean")
|
|
121
|
-
return value.value;
|
|
122
|
-
return new Error(`\`parameters.${name}\` must be written as a plain \`true\` or \`false\``);
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* The flags a meta or a story sets (`touch`, `logic`), as the index keeps them: each only when written, or a problem.
|
|
126
|
-
*
|
|
127
|
-
* @param fields - the story's or the meta's fields.
|
|
128
|
-
*/
|
|
129
|
-
const flagsOf = (fields) => {
|
|
130
|
-
const touch = booleanParameter(fields, "touch");
|
|
131
|
-
if (touch instanceof Error)
|
|
132
|
-
return touch;
|
|
133
|
-
const logic = booleanParameter(fields, "logic");
|
|
134
|
-
if (logic instanceof Error)
|
|
135
|
-
return logic;
|
|
136
|
-
return {
|
|
137
|
-
...(touch === undefined ? {} : { isTouch: touch }),
|
|
138
|
-
...(logic === undefined ? {} : { isLogic: logic })
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
/** `parameters.height`: `undefined` when none or written by code, the height in CSS px, or a problem when wrong. */
|
|
142
|
-
const heightOf = (fields) => {
|
|
143
|
-
const height = parameter(fields, "height");
|
|
144
|
-
if (height === undefined || !isPlain(height))
|
|
145
|
-
return undefined;
|
|
146
|
-
if (height.type === "Literal" && typeof height.value === "number" && height.value > 0)
|
|
147
|
-
return height.value;
|
|
148
|
-
return new Error("`parameters.height` must be written as a plain positive number of CSS px");
|
|
149
|
-
};
|
|
150
|
-
/** `parameters.docs.description.<kind>`, when written as a plain string. */
|
|
151
|
-
const docsDescription = (fields, kind) => {
|
|
152
|
-
const docs = parameter(fields, "docs");
|
|
153
|
-
const description = docs?.type === "ObjectExpression" ? propertyValue(docs, "description") : undefined;
|
|
154
|
-
if (description?.type !== "ObjectExpression")
|
|
155
|
-
return undefined;
|
|
156
|
-
const text = propertyValue(description, kind);
|
|
157
|
-
return text?.type === "Literal" && typeof text.value === "string" ? text.value : undefined;
|
|
158
|
-
};
|
|
29
|
+
import { indexedParameters } from "./indexedParameters.js";
|
|
30
|
+
import { controlsOf, designOf, docsDescription, groupOf, heightOf, objectFields, parameter, propertyValue, propGroupsOf, stringField, stringListOf, unwrapped } from "./indexFields.js";
|
|
31
|
+
import { moduleName, namedExports } from "./storyExports.js";
|
|
32
|
+
import { parseStoryFile } from "./storyParse.js";
|
|
33
|
+
import { playField } from "./storyPlay.js";
|
|
159
34
|
/**
|
|
160
35
|
* The first sentence of the TSDoc right above a statement, without its tags; `undefined` when there is none.
|
|
161
36
|
*
|
|
@@ -200,14 +75,39 @@ const combinedTags = (lists) => {
|
|
|
200
75
|
return [...tags];
|
|
201
76
|
};
|
|
202
77
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
78
|
+
* A story's own design as the index keeps it: a refused link stays as `null`, since the story meant to replace the
|
|
79
|
+
* meta's design, not to take it.
|
|
80
|
+
*
|
|
81
|
+
* @param design - the design, as `designOf` read it.
|
|
82
|
+
*/
|
|
83
|
+
const storyDesign = (design) => {
|
|
84
|
+
if (design === undefined)
|
|
85
|
+
return {};
|
|
86
|
+
return { design: typeof design === "string" ? null : design };
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* What a story's own object and assignments say of who it is: its id (`parameters.__id`, read by Storybook only when
|
|
90
|
+
* written plainly) and its name (`name`, or CSF 2's `storyName`).
|
|
205
91
|
*
|
|
206
|
-
* @param
|
|
92
|
+
* @param own - the story's own fields.
|
|
93
|
+
*/
|
|
94
|
+
const identityOf = (own) => {
|
|
95
|
+
const name = stringField(own, "name") ?? stringField(own, "storyName");
|
|
96
|
+
const id = parameter(own, "__id");
|
|
97
|
+
return {
|
|
98
|
+
...(id?.type === "Literal" && typeof id.value === "string" ? { id: id.value } : {}),
|
|
99
|
+
...(name === undefined ? {} : { name })
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* What the index reads of one story: its own id (`parameters.__id`), its name (`name`, or CSF 2's `storyName`),
|
|
104
|
+
* controls, group, height, design, whether it is the demo, and its tags under the meta's.
|
|
105
|
+
*
|
|
106
|
+
* @param fields - the story's fields: its own, for its name and id, and all it has, for the rest.
|
|
207
107
|
* @param metaTags - the meta's tags.
|
|
108
|
+
* @param notes - the file's notes, which a design left out adds to.
|
|
208
109
|
*/
|
|
209
|
-
const storyFields = (fields, metaTags) => {
|
|
210
|
-
const name = stringField(fields, "name") ?? stringField(fields, "storyName");
|
|
110
|
+
const storyFields = ({ own, fields }, metaTags, notes) => {
|
|
211
111
|
const controls = controlsOf(fields);
|
|
212
112
|
if (controls instanceof Error)
|
|
213
113
|
return controls;
|
|
@@ -217,29 +117,30 @@ const storyFields = (fields, metaTags) => {
|
|
|
217
117
|
const height = heightOf(fields);
|
|
218
118
|
if (height instanceof Error)
|
|
219
119
|
return height;
|
|
120
|
+
const design = designOf(fields);
|
|
121
|
+
if (design instanceof Error)
|
|
122
|
+
return design;
|
|
123
|
+
if (typeof design === "string")
|
|
124
|
+
notes.push(design);
|
|
220
125
|
const ownTags = stringListOf(fields, "tags");
|
|
221
126
|
if (ownTags instanceof Error)
|
|
222
127
|
return ownTags;
|
|
223
128
|
const tags = combinedTags([metaTags, ownTags]);
|
|
224
129
|
const main = parameter(fields, "main");
|
|
225
|
-
const flags =
|
|
130
|
+
const flags = indexedParameters(fields);
|
|
226
131
|
if (flags instanceof Error)
|
|
227
132
|
return flags;
|
|
228
133
|
return {
|
|
229
|
-
...(
|
|
134
|
+
...identityOf(own),
|
|
230
135
|
...(controls === undefined ? {} : { controls }),
|
|
231
136
|
...(group === undefined ? {} : { group }),
|
|
232
137
|
...(height === undefined ? {} : { height }),
|
|
138
|
+
...storyDesign(design),
|
|
233
139
|
...(main?.type === "Literal" && main.value === true ? { isMain: true } : {}),
|
|
234
140
|
...flags,
|
|
235
141
|
...(tags.length > 0 ? { tags } : {})
|
|
236
142
|
};
|
|
237
143
|
};
|
|
238
|
-
/** Whether an expression binds a template into a story function (`Template.bind({})`). */
|
|
239
|
-
const isBoundTemplate = (value) => value.type === "CallExpression" &&
|
|
240
|
-
value.callee.type === "MemberExpression" &&
|
|
241
|
-
value.callee.property.type === "Identifier" &&
|
|
242
|
-
value.callee.property.name === "bind";
|
|
243
144
|
/**
|
|
244
145
|
* The property a top-level statement assigns to a name, when it assigns one.
|
|
245
146
|
*
|
|
@@ -257,36 +158,27 @@ const assignedProperty = (statement) => {
|
|
|
257
158
|
return { name: object.name, property: property.name, value: unwrapped(expression.right) };
|
|
258
159
|
};
|
|
259
160
|
/**
|
|
260
|
-
* The
|
|
161
|
+
* The constants a top-level statement declares with a value, exported or not.
|
|
261
162
|
*
|
|
262
163
|
* @param statement - the statement.
|
|
263
164
|
*/
|
|
264
165
|
const declaredBy = (statement) => {
|
|
265
166
|
const declaration = statement.type === "ExportNamedDeclaration" ? statement.declaration : statement;
|
|
266
|
-
if (declaration?.type === "FunctionDeclaration" && declaration.id !== null)
|
|
267
|
-
return [{ kind: "function", name: declaration.id.name, value: declaration }];
|
|
268
167
|
if (declaration?.type !== "VariableDeclaration")
|
|
269
168
|
return [];
|
|
270
|
-
return declaration.declarations.flatMap(({ id, init }) => id.type === "Identifier" && init !== null
|
|
271
|
-
? [{ kind: "value", name: id.name, value: unwrapped(init) }]
|
|
272
|
-
: []);
|
|
169
|
+
return declaration.declarations.flatMap(({ id, init }) => id.type === "Identifier" && init !== null ? [{ name: id.name, value: unwrapped(init) }] : []);
|
|
273
170
|
};
|
|
274
171
|
/**
|
|
275
|
-
* The file's top level: its constants
|
|
172
|
+
* The file's top level: its constants, exported or not, and the properties assigned to names.
|
|
276
173
|
*
|
|
277
174
|
* @param program - the parsed file.
|
|
278
175
|
*/
|
|
279
176
|
const topLevelOf = (program) => {
|
|
280
177
|
const values = new Map();
|
|
281
|
-
const functions = new Map();
|
|
282
178
|
const assigned = new Map();
|
|
283
179
|
for (const statement of program.body) {
|
|
284
|
-
for (const declared of declaredBy(statement))
|
|
285
|
-
|
|
286
|
-
values.set(declared.name, declared.value);
|
|
287
|
-
else
|
|
288
|
-
functions.set(declared.name, declared.value);
|
|
289
|
-
}
|
|
180
|
+
for (const declared of declaredBy(statement))
|
|
181
|
+
values.set(declared.name, declared.value);
|
|
290
182
|
const property = assignedProperty(statement);
|
|
291
183
|
if (property === undefined)
|
|
292
184
|
continue;
|
|
@@ -294,49 +186,41 @@ const topLevelOf = (program) => {
|
|
|
294
186
|
properties.set(property.property, property.value);
|
|
295
187
|
assigned.set(property.name, properties);
|
|
296
188
|
}
|
|
297
|
-
return { values,
|
|
189
|
+
return { values, assigned };
|
|
298
190
|
};
|
|
299
191
|
/**
|
|
300
|
-
*
|
|
192
|
+
* The object a value is, or the one the constants it names lead to (`export const B = A`); `undefined` for any other
|
|
193
|
+
* value, or for names that lead back to themselves.
|
|
301
194
|
*
|
|
302
195
|
* @param top - the file's top level.
|
|
303
|
-
* @param
|
|
196
|
+
* @param value - the value.
|
|
197
|
+
* @param seen - the names followed so far.
|
|
304
198
|
*/
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
isBoundTemplate(value));
|
|
312
|
-
const node = isStory ? value : top.functions.get(local);
|
|
313
|
-
const properties = top.assigned.get(local);
|
|
314
|
-
const fields = node?.type === "ObjectExpression"
|
|
315
|
-
? objectFields(node)
|
|
316
|
-
: (name) => properties?.get(name);
|
|
317
|
-
return { node, fields };
|
|
199
|
+
const objectOf = (top, value, seen = new Set()) => {
|
|
200
|
+
if (value?.type === "ObjectExpression")
|
|
201
|
+
return value;
|
|
202
|
+
if (value?.type !== "Identifier" || seen.has(value.name))
|
|
203
|
+
return undefined;
|
|
204
|
+
return objectOf(top, top.values.get(value.name), new Set([...seen, value.name]));
|
|
318
205
|
};
|
|
319
206
|
/**
|
|
320
|
-
*
|
|
321
|
-
*
|
|
207
|
+
* A story's fields, by the export that names it: what is assigned to it after its declaration (`A.storyName = "…"`),
|
|
208
|
+
* else the object its value is or names. A story from another file has none.
|
|
322
209
|
*
|
|
323
|
-
* @param
|
|
210
|
+
* @param top - the file's top level.
|
|
211
|
+
* @param named - the export.
|
|
324
212
|
*/
|
|
325
|
-
const
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
return statement.specifiers.flatMap((specifier) => specifier.local.type === "Identifier" && specifier.exported.type === "Identifier"
|
|
337
|
-
? [{ exportName: specifier.exported.name, local: specifier.local.name, start: statement.start }]
|
|
338
|
-
: []);
|
|
339
|
-
});
|
|
213
|
+
const storyFieldsOf = (top, named) => {
|
|
214
|
+
const { local } = named;
|
|
215
|
+
if (local === undefined)
|
|
216
|
+
return { own: () => undefined, fields: () => undefined };
|
|
217
|
+
const assigned = top.assigned.get(local);
|
|
218
|
+
const value = top.values.get(local);
|
|
219
|
+
const declared = named.isDeclared && value?.type === "ObjectExpression" ? value : undefined;
|
|
220
|
+
const object = objectOf(top, value);
|
|
221
|
+
const read = (from) => (name) => assigned?.get(name) ?? (from === undefined ? undefined : propertyValue(from, name));
|
|
222
|
+
return { own: read(declared), fields: read(object) };
|
|
223
|
+
};
|
|
340
224
|
/**
|
|
341
225
|
* Whether an export is a story, as the meta's `includeStories` and `excludeStories` say (a list of names or a regular
|
|
342
226
|
* expression, written plainly).
|
|
@@ -367,7 +251,26 @@ const exportsOrder = (top) => {
|
|
|
367
251
|
return order.elements.flatMap((element) => element?.type === "Literal" && typeof element.value === "string" ? [element.value] : []);
|
|
368
252
|
};
|
|
369
253
|
/**
|
|
370
|
-
* The meta
|
|
254
|
+
* The meta exported by name (`export { meta as default }`), when it is a constant of the file written as an object.
|
|
255
|
+
*
|
|
256
|
+
* @param program - the parsed file.
|
|
257
|
+
* @param top - the file's top level.
|
|
258
|
+
*/
|
|
259
|
+
const namedMeta = (program, top) => {
|
|
260
|
+
for (const statement of program.body) {
|
|
261
|
+
if (statement.type !== "ExportNamedDeclaration" || statement.source !== null)
|
|
262
|
+
continue;
|
|
263
|
+
const specifier = statement.specifiers.find((each) => moduleName(each.exported) === "default");
|
|
264
|
+
if (specifier === undefined)
|
|
265
|
+
continue;
|
|
266
|
+
const value = top.values.get(moduleName(specifier.local));
|
|
267
|
+
return value?.type === "ObjectExpression" ? value : undefined;
|
|
268
|
+
}
|
|
269
|
+
return undefined;
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* The meta's object: the default export, inline or a constant of the file (`export default meta`,
|
|
273
|
+
* `export { meta as default }`).
|
|
371
274
|
*
|
|
372
275
|
* @param program - the parsed file.
|
|
373
276
|
* @param top - the file's top level.
|
|
@@ -375,7 +278,7 @@ const exportsOrder = (top) => {
|
|
|
375
278
|
const metaObject = (program, top) => {
|
|
376
279
|
const meta = program.body.find((statement) => statement.type === "ExportDefaultDeclaration");
|
|
377
280
|
if (meta === undefined)
|
|
378
|
-
return
|
|
281
|
+
return namedMeta(program, top);
|
|
379
282
|
const { declaration } = meta;
|
|
380
283
|
if (declaration.type === "FunctionDeclaration" ||
|
|
381
284
|
declaration.type === "ClassDeclaration" ||
|
|
@@ -385,6 +288,12 @@ const metaObject = (program, top) => {
|
|
|
385
288
|
const value = expression.type === "Identifier" ? top.values.get(expression.name) : expression;
|
|
386
289
|
return value?.type === "ObjectExpression" ? value : undefined;
|
|
387
290
|
};
|
|
291
|
+
/**
|
|
292
|
+
* A story file's meta object, as the index reads it: inline or a constant of the file, exported by default or by name.
|
|
293
|
+
*
|
|
294
|
+
* @param program - the parsed file.
|
|
295
|
+
*/
|
|
296
|
+
export const storyFileMeta = (program) => metaObject(program, topLevelOf(program));
|
|
388
297
|
/** The meta's lists of plain strings (`alsoIn`, `related`, `keywords`), each only when set, or the first problem. */
|
|
389
298
|
const metaListsOf = (meta) => {
|
|
390
299
|
const lists = {};
|
|
@@ -418,29 +327,60 @@ const titleOf = (meta, options) => {
|
|
|
418
327
|
};
|
|
419
328
|
};
|
|
420
329
|
/**
|
|
421
|
-
* The meta's
|
|
330
|
+
* The meta's design as the index keeps it: a link that is not a Figma file's is noted and left out.
|
|
331
|
+
*
|
|
332
|
+
* @param meta - the meta's fields.
|
|
333
|
+
* @param notes - the file's notes, which a design left out adds to.
|
|
334
|
+
*/
|
|
335
|
+
const metaDesign = (meta, notes) => {
|
|
336
|
+
const design = designOf(meta);
|
|
337
|
+
if (design instanceof Error)
|
|
338
|
+
return design;
|
|
339
|
+
if (typeof design === "string") {
|
|
340
|
+
notes.push(design);
|
|
341
|
+
return {};
|
|
342
|
+
}
|
|
343
|
+
return design === undefined ? {} : { design };
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* The meta's fields besides its title and stories (its `id` among them), or the first problem.
|
|
422
347
|
*
|
|
423
348
|
* @param meta - the meta's fields.
|
|
349
|
+
* @param notes - the file's notes, which a design left out adds to.
|
|
424
350
|
*/
|
|
425
|
-
const metaFieldsOf = (meta) => {
|
|
351
|
+
const metaFieldsOf = (meta, notes) => {
|
|
352
|
+
const id = meta("id");
|
|
353
|
+
// Storybook refuses a component id written by code: it would give ids no link can know
|
|
354
|
+
if (id !== undefined && (id.type !== "Literal" || typeof id.value !== "string"))
|
|
355
|
+
return new Error("`id` must be a plain string");
|
|
426
356
|
const controls = controlsOf(meta);
|
|
427
357
|
if (controls instanceof Error)
|
|
428
358
|
return controls;
|
|
429
359
|
const height = heightOf(meta);
|
|
430
360
|
if (height instanceof Error)
|
|
431
361
|
return height;
|
|
362
|
+
const design = metaDesign(meta, notes);
|
|
363
|
+
if (design instanceof Error)
|
|
364
|
+
return design;
|
|
432
365
|
const lists = metaListsOf(meta);
|
|
433
366
|
if (lists instanceof Error)
|
|
434
367
|
return lists;
|
|
368
|
+
const propGroups = propGroupsOf(meta);
|
|
369
|
+
if (propGroups instanceof Error)
|
|
370
|
+
return propGroups;
|
|
435
371
|
const description = docsDescription(meta, "component");
|
|
436
|
-
const flags =
|
|
372
|
+
const flags = indexedParameters(meta);
|
|
437
373
|
if (flags instanceof Error)
|
|
438
374
|
return flags;
|
|
439
375
|
return {
|
|
376
|
+
// an empty id is none, as Storybook's `meta.id || meta.title` has it
|
|
377
|
+
...(id === undefined || id.value === "" ? {} : { id: String(id.value) }),
|
|
440
378
|
...(controls === undefined ? {} : { controls }),
|
|
441
379
|
...(height === undefined ? {} : { height }),
|
|
380
|
+
...design,
|
|
442
381
|
...flags,
|
|
443
382
|
...lists,
|
|
383
|
+
...(propGroups === undefined ? {} : { propGroups }),
|
|
444
384
|
...(description === undefined ? {} : { description })
|
|
445
385
|
};
|
|
446
386
|
};
|
|
@@ -468,7 +408,7 @@ const storyExports = (program, top, meta) => {
|
|
|
468
408
|
* @returns the title and the stories, or a message saying why the file cannot be indexed.
|
|
469
409
|
*/
|
|
470
410
|
export const indexStoryFile = (file, text, options = {}) => {
|
|
471
|
-
const { program, comments, errors } =
|
|
411
|
+
const { program, comments, errors } = parseStoryFile(file, text);
|
|
472
412
|
const [error] = errors;
|
|
473
413
|
if (error !== undefined)
|
|
474
414
|
return `${file} does not parse: ${error.message}`;
|
|
@@ -484,24 +424,28 @@ export const indexStoryFile = (file, text, options = {}) => {
|
|
|
484
424
|
if (metaTags instanceof Error)
|
|
485
425
|
return `${file}: the meta's ${metaTags.message}`;
|
|
486
426
|
const stories = [];
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
const
|
|
427
|
+
const storyNotes = [];
|
|
428
|
+
for (const named of storyExports(program, top, meta)) {
|
|
429
|
+
const { exportName, start } = named;
|
|
430
|
+
const sources = storyFieldsOf(top, named);
|
|
431
|
+
const ownNotes = [];
|
|
432
|
+
const fields = storyFields(sources, metaTags, ownNotes);
|
|
492
433
|
if (fields instanceof Error)
|
|
493
434
|
return `${file}: story ${exportName}: ${fields.message}`;
|
|
494
|
-
|
|
495
|
-
|
|
435
|
+
storyNotes.push(...ownNotes.map((note) => `story ${exportName}: ${note}`));
|
|
436
|
+
const description = leadingSentence(text, comments, start) ?? docsDescription(sources.fields, "story");
|
|
437
|
+
const played = playField(named.local, top, meta("play"));
|
|
438
|
+
stories.push({ exportName, ...fields, ...(description === undefined ? {} : { description }), ...played });
|
|
496
439
|
}
|
|
497
|
-
const
|
|
440
|
+
const metaNotes = [];
|
|
441
|
+
const metaFields = metaFieldsOf(meta, metaNotes);
|
|
498
442
|
if (metaFields instanceof Error)
|
|
499
443
|
return `${file}: the meta's ${metaFields.message}`;
|
|
444
|
+
const notes = [...title.notes, ...metaNotes, ...storyNotes];
|
|
500
445
|
return {
|
|
501
446
|
title: title.title,
|
|
502
447
|
stories,
|
|
503
448
|
...metaFields,
|
|
504
|
-
...(
|
|
449
|
+
...(notes.length > 0 ? { notes } : {})
|
|
505
450
|
};
|
|
506
451
|
};
|
|
507
|
-
//# sourceMappingURL=indexStoryFile.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StoryIndexEntry } from "@forgebook/story-format/source";
|
|
2
|
+
import { type Fields } from "./indexFields.ts";
|
|
3
|
+
/** What the index keeps of these parameters: each only when written. */
|
|
4
|
+
export type IndexedParameters = Pick<StoryIndexEntry, "isTouch" | "isLogic" | "device">;
|
|
5
|
+
/**
|
|
6
|
+
* The parameters only the index reads, each only when written, or the first problem.
|
|
7
|
+
*
|
|
8
|
+
* @param fields - the story's or the meta's fields.
|
|
9
|
+
*/
|
|
10
|
+
export declare const indexedParameters: (fields: Fields) => IndexedParameters | Error;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { deviceSettingProblem, isDeviceOrientation } from "../deviceView.js";
|
|
2
|
+
import { keyName, parameter, unwrapped } from "./indexFields.js";
|
|
3
|
+
/** Why `parameters.device` cannot be read as it is written. */
|
|
4
|
+
const DEVICE_PROBLEM = '`parameters.device` must be written as a plain object (`{ frame: true, model: "iphone-16" }`)';
|
|
5
|
+
/**
|
|
6
|
+
* A boolean parameter: `true` or `false` written plainly, `undefined` when none, or a problem otherwise.
|
|
7
|
+
*
|
|
8
|
+
* @param value - the parameter's value.
|
|
9
|
+
* @param name - its name, for the problem.
|
|
10
|
+
*/
|
|
11
|
+
const booleanOf = (value, name) => {
|
|
12
|
+
if (value === undefined)
|
|
13
|
+
return undefined;
|
|
14
|
+
if (value.type === "Literal" && typeof value.value === "boolean")
|
|
15
|
+
return value.value;
|
|
16
|
+
return new Error(`\`${name}\` must be written as a plain \`true\` or \`false\``);
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A plain string field of a device setting: `undefined` when none, the string, or a problem.
|
|
20
|
+
*
|
|
21
|
+
* @param value - the field's value.
|
|
22
|
+
* @param name - its name, for the problem.
|
|
23
|
+
*/
|
|
24
|
+
const stringOf = (value, name) => {
|
|
25
|
+
if (value === undefined)
|
|
26
|
+
return undefined;
|
|
27
|
+
if (value.type === "Literal" && typeof value.value === "string")
|
|
28
|
+
return value.value;
|
|
29
|
+
return new Error(`\`parameters.device.${name}\` must be written as a plain string`);
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The fields `parameters.device` writes, by name, or a problem when it is written by code or names a field the
|
|
33
|
+
* setting has not.
|
|
34
|
+
*
|
|
35
|
+
* @param value - the parameter's value.
|
|
36
|
+
*/
|
|
37
|
+
const deviceFields = (value) => {
|
|
38
|
+
if (value.type !== "ObjectExpression")
|
|
39
|
+
return new Error(DEVICE_PROBLEM);
|
|
40
|
+
const fields = new Map();
|
|
41
|
+
for (const property of value.properties) {
|
|
42
|
+
const name = property.type === "Property" && !property.computed ? keyName(property.key) : undefined;
|
|
43
|
+
if (property.type !== "Property" || name === undefined)
|
|
44
|
+
return new Error(DEVICE_PROBLEM);
|
|
45
|
+
if (!["frame", "model", "orientation", "touch", "edgeToEdge"].includes(name))
|
|
46
|
+
return new Error(`\`parameters.device\` has no field \`${name}\`: it takes frame, model, orientation, touch and edgeToEdge`);
|
|
47
|
+
fields.set(name, unwrapped(property.value));
|
|
48
|
+
}
|
|
49
|
+
return fields;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* `parameters.device`: `undefined` when none, the setting with the fields it writes, or a problem when it is written
|
|
53
|
+
* by code, names a field the setting has not, or a model or an orientation that is none.
|
|
54
|
+
*
|
|
55
|
+
* @param value - the parameter's value.
|
|
56
|
+
*/
|
|
57
|
+
const deviceOf = (value) => {
|
|
58
|
+
if (value === undefined)
|
|
59
|
+
return undefined;
|
|
60
|
+
const fields = deviceFields(value);
|
|
61
|
+
if (fields instanceof Error)
|
|
62
|
+
return fields;
|
|
63
|
+
const frame = booleanOf(fields.get("frame"), "parameters.device.frame");
|
|
64
|
+
if (frame instanceof Error)
|
|
65
|
+
return frame;
|
|
66
|
+
const touch = booleanOf(fields.get("touch"), "parameters.device.touch");
|
|
67
|
+
if (touch instanceof Error)
|
|
68
|
+
return touch;
|
|
69
|
+
const edgeToEdge = booleanOf(fields.get("edgeToEdge"), "parameters.device.edgeToEdge");
|
|
70
|
+
if (edgeToEdge instanceof Error)
|
|
71
|
+
return edgeToEdge;
|
|
72
|
+
const model = stringOf(fields.get("model"), "model");
|
|
73
|
+
if (model instanceof Error)
|
|
74
|
+
return model;
|
|
75
|
+
const orientation = stringOf(fields.get("orientation"), "orientation");
|
|
76
|
+
if (orientation instanceof Error)
|
|
77
|
+
return orientation;
|
|
78
|
+
if (orientation !== undefined && !isDeviceOrientation(orientation))
|
|
79
|
+
return new Error(`\`parameters.device\`: "${orientation}" is no orientation; write portrait or landscape`);
|
|
80
|
+
const setting = {
|
|
81
|
+
...(frame === undefined ? {} : { frame }),
|
|
82
|
+
...(model === undefined ? {} : { model }),
|
|
83
|
+
...(orientation === undefined ? {} : { orientation }),
|
|
84
|
+
...(touch === undefined ? {} : { touch }),
|
|
85
|
+
...(edgeToEdge === undefined ? {} : { edgeToEdge })
|
|
86
|
+
};
|
|
87
|
+
const problem = deviceSettingProblem(setting);
|
|
88
|
+
return problem === undefined ? setting : new Error(`\`parameters.device\`: ${problem}`);
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* The parameters only the index reads, each only when written, or the first problem.
|
|
92
|
+
*
|
|
93
|
+
* @param fields - the story's or the meta's fields.
|
|
94
|
+
*/
|
|
95
|
+
export const indexedParameters = (fields) => {
|
|
96
|
+
const touch = booleanOf(parameter(fields, "touch"), "parameters.touch");
|
|
97
|
+
if (touch instanceof Error)
|
|
98
|
+
return touch;
|
|
99
|
+
const logic = booleanOf(parameter(fields, "logic"), "parameters.logic");
|
|
100
|
+
if (logic instanceof Error)
|
|
101
|
+
return logic;
|
|
102
|
+
const device = deviceOf(parameter(fields, "device"));
|
|
103
|
+
if (device instanceof Error)
|
|
104
|
+
return device;
|
|
105
|
+
return {
|
|
106
|
+
...(touch === undefined ? {} : { isTouch: touch }),
|
|
107
|
+
...(logic === undefined ? {} : { isLogic: logic }),
|
|
108
|
+
...(device === undefined ? {} : { device })
|
|
109
|
+
};
|
|
110
|
+
};
|