forgebook 0.1.8 → 0.3.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 +987 -28
- 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 +164 -40
- package/dist/bin/forgebook/agentText.d.ts +76 -5
- package/dist/bin/forgebook/agentText.js +197 -11
- package/dist/bin/forgebook/agents.md +158 -9
- 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 +30 -13
- 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/argsProps.d.ts +32 -0
- package/dist/src/argsProps.js +69 -0
- 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 +103 -24
- package/dist/src/catalogue.js +78 -20
- 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 +184 -66
- 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/touchCaret.d.ts +43 -0
- package/dist/src/frame/touchCaret.js +195 -0
- package/dist/src/frame/touchDots.d.ts +0 -1
- package/dist/src/frame/touchDots.js +0 -1
- package/dist/src/frame/touchEvents.d.ts +3 -3
- package/dist/src/frame/touchEvents.js +17 -19
- 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 +52 -37
- 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 +109 -0
- package/dist/src/propGroups.js +113 -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 +16 -4
- package/dist/src/shell/ApiReference.js +82 -20
- 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 +48 -7
- package/dist/src/shell/ComponentPage.js +101 -59
- 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/PropRows.d.ts +42 -0
- package/dist/src/shell/PropRows.js +60 -0
- package/dist/src/shell/PropsTab.d.ts +24 -11
- package/dist/src/shell/PropsTab.js +31 -45
- package/dist/src/shell/RequiredFirstSwitch.d.ts +16 -0
- package/dist/src/shell/RequiredFirstSwitch.js +8 -0
- 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 +116 -75
- 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 +129 -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 +457 -0
- package/dist/src/shell/dockTabs.d.ts +20 -10
- package/dist/src/shell/dockTabs.js +42 -20
- 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/reportedPanel.d.ts +12 -0
- package/dist/src/shell/reportedPanel.js +19 -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 +341 -140
- 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 +58 -80
- package/dist/src/shell/strings.js +55 -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/usePanelDocs.d.ts +11 -0
- package/dist/src/shell/usePanelDocs.js +29 -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/useRequiredFirst.d.ts +27 -0
- package/dist/src/shell/useRequiredFirst.js +67 -0
- 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 +88 -2
- package/dist/src/storyCheck.js +14 -3
- 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 +2 -2
- 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 +89 -25
- package/dist/src/storyTree.js +213 -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 +44 -9
- package/dist/src/viewState.js +80 -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 +291 -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 +136 -9
- 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 +184 -27
- 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 +143 -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 +66 -9
- package/dist/src/vite/configFile.js +236 -33
- 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 +53 -0
- package/dist/src/vite/docPagesModule.js +121 -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 +50 -3
- package/dist/src/vite/docsExtractor.js +173 -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/fileAccess.d.ts +51 -0
- package/dist/src/vite/fileAccess.js +109 -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 +0 -1
- package/dist/src/vite/forgebookPlugin.js +305 -282
- 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 +342 -0
- package/dist/src/vite/functionComponentDocs.d.ts +26 -0
- package/dist/src/vite/functionComponentDocs.js +193 -0
- package/dist/src/vite/generatedModules.d.ts +23 -0
- package/dist/src/vite/generatedModules.js +58 -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 +172 -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 +130 -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 +97 -0
- package/dist/src/vite/originGuard.js +172 -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 +64 -10
- package/dist/src/vite/pages.js +278 -40
- 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 +27 -0
- package/dist/src/vite/pluginIds.js +76 -0
- package/dist/src/vite/pluginModules.d.ts +169 -0
- package/dist/src/vite/pluginModules.js +221 -0
- package/dist/src/vite/prebundled.d.ts +18 -5
- package/dist/src/vite/prebundled.js +29 -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 +42 -0
- package/dist/src/vite/searchModule.js +213 -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 +104 -20
- package/dist/src/vite/storyFilesModule.js +178 -60
- 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/storyPatterns.d.ts +39 -0
- package/dist/src/vite/storyPatterns.js +100 -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 +26 -0
- package/dist/src/vite/textQueries.js +26 -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
|
@@ -14,19 +14,23 @@ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExte
|
|
|
14
14
|
* `main` is loaded, as Storybook loads it (Node strips a `main.ts`'s types), so a `stories` list it computes is read
|
|
15
15
|
* too. The preview is read from its source, never run: it imports style sheets and components Node cannot load, so its
|
|
16
16
|
* `globalTypes` and `initialGlobals` are read only when written as plain values; anything else is named in the notes
|
|
17
|
-
* instead. Forgebook
|
|
17
|
+
* instead. Which Forgebook framework the stories move to, and what it takes besides them, is `storybookFrameworks.ts`'s
|
|
18
|
+
* choice; a framework it does not know is refused with what Forgebook supports. On-device React Native Storybook keeps
|
|
19
|
+
* its `main` in `.rnstorybook`, looked for after `.storybook`.
|
|
18
20
|
* Each tool is an importer of its own: another tool is another module beside this one.
|
|
19
21
|
*
|
|
20
22
|
* @module
|
|
21
23
|
*/
|
|
22
24
|
import { existsSync, readFileSync } from "node:fs";
|
|
23
|
-
import { basename, join, relative
|
|
25
|
+
import { basename, join, relative } from "node:path";
|
|
24
26
|
import { pathToFileURL } from "node:url";
|
|
25
27
|
import ts from "typescript-6";
|
|
26
28
|
import { switchesFromGlobalTypes } from "../../../src/switches.js";
|
|
27
29
|
import { STORY_FILE } from "../../../src/vite/autoTitle.js";
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
import { VITE_PATHS } from "../../../src/vite/vitePaths.js";
|
|
31
|
+
import { frameworkOf, frameworkSettings, STORYBOOK_PACKAGES, storybookPackage } from "./storybookFrameworks.js";
|
|
32
|
+
/** Storybook's folders, in the order they are looked for: Storybook's own, then on-device Storybook's. */
|
|
33
|
+
const STORYBOOK_DIRS = [".storybook", ".rnstorybook"];
|
|
30
34
|
/** Storybook's own default for a `stories` entry given as a folder. */
|
|
31
35
|
const DEFAULT_FILES = "**/*.@(mdx|stories.@(js|jsx|mjs|ts|tsx))";
|
|
32
36
|
/** The names `main` and the preview may have, in the order Storybook looks for them. */
|
|
@@ -41,16 +45,33 @@ const isRecord = (value) => typeof value === "object" && value !== null && !Arra
|
|
|
41
45
|
*/
|
|
42
46
|
const scriptFile = (dir, name) => SCRIPT_EXTENSIONS.map((extension) => join(dir, `${name}.${extension}`)).find((file) => existsSync(file));
|
|
43
47
|
/**
|
|
44
|
-
*
|
|
48
|
+
* The globs a group stands for, once its alternatives are read: each in place, and nothing in place too for an optional
|
|
49
|
+
* group (`?(a|b)`), unless nothing leaves two dots or a final dot, which no file's name has.
|
|
50
|
+
*
|
|
51
|
+
* @param head - the glob before the group.
|
|
52
|
+
* @param parts - the group's alternatives.
|
|
53
|
+
* @param tail - the glob after the group.
|
|
54
|
+
* @param isOptional - whether the group may be left out.
|
|
55
|
+
*/
|
|
56
|
+
const groupGlobs = (head, parts, tail, isOptional) => {
|
|
57
|
+
const spelled = parts.flatMap((part) => expandedGlobs(`${head}${part}${tail}`));
|
|
58
|
+
if (!isOptional || (head.endsWith(".") && (tail === "" || tail.startsWith("."))))
|
|
59
|
+
return spelled;
|
|
60
|
+
// nothing in place of a folder's name leaves the folder out (`src/?(ui)/*` is also `src/*`)
|
|
61
|
+
const without = head.endsWith("/") && tail.startsWith("/") ? `${head}${tail.slice(1)}` : `${head}${tail}`;
|
|
62
|
+
return [...spelled, ...expandedGlobs(without)];
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Every glob a glob with alternatives stands for: `@(a|b)`, `?(a|b)` and `{a,b}` written out, nested ones too, so the
|
|
45
66
|
* configuration lists plain globs a person reads at a glance.
|
|
46
67
|
*
|
|
47
68
|
* @param glob - the glob.
|
|
48
69
|
*/
|
|
49
70
|
export const expandedGlobs = (glob) => {
|
|
50
|
-
const start = glob.search(
|
|
71
|
+
const start = glob.search(/[@?]\(|\{/);
|
|
51
72
|
if (start === -1)
|
|
52
73
|
return [glob];
|
|
53
|
-
const isExtglob = glob[start]
|
|
74
|
+
const isExtglob = glob[start] !== "{";
|
|
54
75
|
const separator = isExtglob ? "|" : ",";
|
|
55
76
|
const contentStart = start + (isExtglob ? 2 : 1);
|
|
56
77
|
// every bracket counts, so a group nested in another of the other kind is kept whole
|
|
@@ -69,9 +90,7 @@ export const expandedGlobs = (glob) => {
|
|
|
69
90
|
}
|
|
70
91
|
else if (depth === 0) {
|
|
71
92
|
parts.push(glob.slice(partStart, index));
|
|
72
|
-
|
|
73
|
-
const tail = glob.slice(index + 1);
|
|
74
|
-
return parts.flatMap((part) => expandedGlobs(`${head}${part}${tail}`));
|
|
93
|
+
return groupGlobs(glob.slice(0, start), parts, glob.slice(index + 1), glob[start] === "?");
|
|
75
94
|
}
|
|
76
95
|
}
|
|
77
96
|
return [glob];
|
|
@@ -103,21 +122,19 @@ const entryGlob = (entry, fromProject, notes) => {
|
|
|
103
122
|
* @param entries - `main`'s `stories`.
|
|
104
123
|
* @param storybookDir - the `.storybook` folder, absolute.
|
|
105
124
|
* @param projectDir - the project's folder, absolute.
|
|
106
|
-
* @
|
|
125
|
+
* @param paths - the path functions; the running system's unless a test names another.
|
|
126
|
+
* @returns the globs, with forward slashes on every system as globs take them, and what was not read.
|
|
107
127
|
*/
|
|
108
|
-
export const storyGlobs = (entries, storybookDir, projectDir) => {
|
|
128
|
+
export const storyGlobs = (entries, storybookDir, projectDir, paths = VITE_PATHS) => {
|
|
109
129
|
const globs = [];
|
|
110
130
|
const notes = [];
|
|
111
|
-
const fromProject = (path) => relative(projectDir, resolve(storybookDir, path)) || ".";
|
|
131
|
+
const fromProject = (path) => paths.relative(projectDir, paths.resolve(storybookDir, path)) || ".";
|
|
112
132
|
for (const entry of entries) {
|
|
113
133
|
const glob = entryGlob(entry, fromProject, notes);
|
|
114
134
|
if (glob === undefined)
|
|
115
135
|
continue;
|
|
116
136
|
// `.stories.*` names every script extension: written out as the ones Forgebook reads
|
|
117
|
-
const named = glob
|
|
118
|
-
.split("\\")
|
|
119
|
-
.join("/")
|
|
120
|
-
.replace(/\.stories\.\*$/, ".stories.@(js|jsx|mjs|ts|tsx)");
|
|
137
|
+
const named = glob.replace(/\.stories\.\*$/, ".stories.@(js|jsx|mjs|ts|tsx)");
|
|
121
138
|
for (const each of expandedGlobs(named)) {
|
|
122
139
|
if (STORY_FILE.test(each))
|
|
123
140
|
globs.push(each);
|
|
@@ -267,24 +284,34 @@ export const previewSwitches = (text, file) => {
|
|
|
267
284
|
* @param dir - the project's folder.
|
|
268
285
|
*/
|
|
269
286
|
const projectTitle = (dir) => {
|
|
287
|
+
const manifest = projectManifest(dir);
|
|
288
|
+
return typeof manifest["name"] === "string" && manifest["name"] !== "" ? manifest["name"] : basename(dir);
|
|
289
|
+
};
|
|
290
|
+
/**
|
|
291
|
+
* The project's `package.json`, parsed; empty when it has none.
|
|
292
|
+
*
|
|
293
|
+
* @param dir - the project's folder.
|
|
294
|
+
*/
|
|
295
|
+
const projectManifest = (dir) => {
|
|
270
296
|
const file = join(dir, "package.json");
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
if (isRecord(parsed) && typeof parsed["name"] === "string" && parsed["name"] !== "")
|
|
274
|
-
return parsed["name"];
|
|
275
|
-
}
|
|
276
|
-
return basename(dir);
|
|
297
|
+
const parsed = existsSync(file) ? JSON.parse(readFileSync(file, "utf8")) : {};
|
|
298
|
+
return isRecord(parsed) ? parsed : {};
|
|
277
299
|
};
|
|
278
300
|
/**
|
|
279
|
-
*
|
|
301
|
+
* Whether a project is on-device Storybook's: its folder is `.rnstorybook` (from version 9), or it depends on
|
|
302
|
+
* `@storybook/react-native`, whose `main` in `.storybook` names no framework (before version 9).
|
|
280
303
|
*
|
|
281
|
-
* @param
|
|
304
|
+
* @param projectDir - the project's folder.
|
|
305
|
+
* @param storybookDir - the Storybook folder read.
|
|
282
306
|
*/
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
return
|
|
307
|
+
const isOnDeviceStorybook = (projectDir, storybookDir) => {
|
|
308
|
+
if (basename(storybookDir) === ".rnstorybook")
|
|
309
|
+
return true;
|
|
310
|
+
const manifest = projectManifest(projectDir);
|
|
311
|
+
return ["dependencies", "devDependencies"].some((field) => {
|
|
312
|
+
const list = manifest[field];
|
|
313
|
+
return isRecord(list) && "@storybook/react-native" in list;
|
|
314
|
+
});
|
|
288
315
|
};
|
|
289
316
|
/**
|
|
290
317
|
* Storybook's `main`, loaded as Node loads a module.
|
|
@@ -306,14 +333,6 @@ const loadedMain = async (mainFile, projectDir) => {
|
|
|
306
333
|
const main = isRecord(loaded) && isRecord(loaded["default"]) ? loaded["default"] : loaded;
|
|
307
334
|
return isRecord(main) ? main : `${relative(projectDir, mainFile)} exports no configuration`;
|
|
308
335
|
};
|
|
309
|
-
/**
|
|
310
|
-
* Whether `main`'s framework is React on Vite: its name, or a path to its package, as Storybook's monorepo template
|
|
311
|
-
* writes it (`getAbsolutePath("@storybook/react-vite")`).
|
|
312
|
-
*
|
|
313
|
-
* @param framework - the framework's name or path.
|
|
314
|
-
*/
|
|
315
|
-
const isReactVite = (framework) => framework !== undefined &&
|
|
316
|
-
(framework === REACT_VITE || framework.split("\\").join("/").endsWith(`/${REACT_VITE}`));
|
|
317
336
|
/**
|
|
318
337
|
* Reads a project's Storybook configuration.
|
|
319
338
|
*
|
|
@@ -321,32 +340,39 @@ const isReactVite = (framework) => framework !== undefined &&
|
|
|
321
340
|
* @returns what a Forgebook configuration takes from it, or why it cannot be read.
|
|
322
341
|
*/
|
|
323
342
|
export const importStorybook = async (projectDir) => {
|
|
324
|
-
const
|
|
343
|
+
const found = STORYBOOK_DIRS.map((name) => join(projectDir, name)).find((dir) => scriptFile(dir, "main") !== undefined);
|
|
344
|
+
const storybookDir = found ?? join(projectDir, STORYBOOK_DIRS[0] ?? ".storybook");
|
|
325
345
|
const mainFile = scriptFile(storybookDir, "main");
|
|
326
346
|
if (mainFile === undefined)
|
|
327
|
-
return `No .storybook/main file in ${projectDir}`;
|
|
347
|
+
return `No .storybook/main (or .rnstorybook/main) file in ${projectDir}`;
|
|
328
348
|
const main = await loadedMain(mainFile, projectDir);
|
|
329
349
|
if (typeof main === "string")
|
|
330
350
|
return main;
|
|
331
|
-
const
|
|
332
|
-
if (
|
|
333
|
-
|
|
351
|
+
const storybook = storybookPackage(main, isOnDeviceStorybook(projectDir, storybookDir));
|
|
352
|
+
if (storybook === undefined) {
|
|
353
|
+
const supported = STORYBOOK_PACKAGES.join(", ");
|
|
354
|
+
return `Forgebook reads the stories of Storybook's ${supported}; this project uses ${frameworkOf(main).name ?? "no framework"}`;
|
|
355
|
+
}
|
|
356
|
+
const settings = frameworkSettings(storybook, main, projectDir, storybookDir);
|
|
334
357
|
const entries = Array.isArray(main["stories"]) ? main["stories"] : [];
|
|
335
358
|
const { globs, notes } = storyGlobs(entries, storybookDir, projectDir);
|
|
336
359
|
if (globs.length === 0)
|
|
337
360
|
return `${relative(projectDir, mainFile)} names no story file Forgebook reads`;
|
|
338
361
|
if (Array.isArray(main["addons"]) && main["addons"].length > 0)
|
|
339
362
|
notes.push("The addons are left out: Forgebook has its own panel, toolbar and checks");
|
|
363
|
+
notes.push(...settings.notes);
|
|
340
364
|
const previewFile = scriptFile(storybookDir, "preview");
|
|
341
365
|
const read = previewFile === undefined
|
|
342
366
|
? { switches: undefined, notes: [] }
|
|
343
367
|
: previewSwitches(readFileSync(previewFile, "utf8"), previewFile);
|
|
344
368
|
return {
|
|
369
|
+
framework: settings.framework,
|
|
370
|
+
frameworkOptions: settings.options,
|
|
345
371
|
title: projectTitle(projectDir),
|
|
346
372
|
stories: globs,
|
|
347
|
-
|
|
373
|
+
// with forward slashes: it is written into the configuration, which may be shared across systems
|
|
374
|
+
preview: previewFile === undefined ? undefined : VITE_PATHS.relative(projectDir, previewFile),
|
|
348
375
|
switches: read.switches,
|
|
349
376
|
notes: [...notes, ...read.notes]
|
|
350
377
|
};
|
|
351
378
|
};
|
|
352
|
-
//# sourceMappingURL=storybook.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** What the Angular adapter's options take from the project, and what was not read. */
|
|
2
|
+
export type AngularImport = {
|
|
3
|
+
/** The adapter's options, as `angular({ … })` writes them; none for the defaults. */
|
|
4
|
+
readonly options: Readonly<Record<string, string>> | undefined;
|
|
5
|
+
/** What was not read, each a sentence for the person who runs the command. */
|
|
6
|
+
readonly notes: readonly string[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Reads what an Angular project's Storybook adds to `.storybook`.
|
|
10
|
+
*
|
|
11
|
+
* @param projectDir - the project's folder, absolute.
|
|
12
|
+
* @param storybookDir - the `.storybook` folder, absolute.
|
|
13
|
+
* @param frameworkOptions - the options `main` gives its framework (`{ name, options }`'s `options`).
|
|
14
|
+
*/
|
|
15
|
+
export declare const importAngular: (projectDir: string, storybookDir: string, frameworkOptions: Readonly<Record<string, unknown>>) => AngularImport;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `forgebook init --from storybook` reads of an Angular project besides `.storybook`: the TypeScript configuration
|
|
3
|
+
* the stories are compiled with, and the builder options of `angular.json` it cannot carry over.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Storybook's Angular builders compile the stories with `.storybook/tsconfig.json` unless `angular.json` or the
|
|
7
|
+
* framework's options name another; Forgebook's Angular adapter takes the same file as its `tsconfig` option, so the
|
|
8
|
+
* components compile as they did. The builders' `styles` and `compodoc` live in `angular.json`, which Forgebook does not
|
|
9
|
+
* read: each is named in the notes, with what to do instead.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
14
|
+
import { join, relative, resolve } from "node:path";
|
|
15
|
+
/** The builders whose options hold a Storybook's own settings, by their names in `angular.json`. */
|
|
16
|
+
const STORYBOOK_BUILDERS = [
|
|
17
|
+
"@storybook/angular:start-storybook",
|
|
18
|
+
"@analogjs/storybook-angular:start-storybook"
|
|
19
|
+
];
|
|
20
|
+
/** Whether a value is a plain object. */
|
|
21
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22
|
+
/**
|
|
23
|
+
* The options of the `angular.json` targets that start a Storybook.
|
|
24
|
+
*
|
|
25
|
+
* @param projectDir - the project's folder.
|
|
26
|
+
*/
|
|
27
|
+
const storybookTargets = (projectDir) => {
|
|
28
|
+
const file = join(projectDir, "angular.json");
|
|
29
|
+
if (!existsSync(file))
|
|
30
|
+
return [];
|
|
31
|
+
let parsed;
|
|
32
|
+
try {
|
|
33
|
+
parsed = JSON.parse(readFileSync(file, "utf8"));
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
const projects = isRecord(parsed) && isRecord(parsed["projects"]) ? Object.values(parsed["projects"]) : [];
|
|
39
|
+
return projects.flatMap((project) => {
|
|
40
|
+
const targets = isRecord(project) ? (project["architect"] ?? project["targets"]) : undefined;
|
|
41
|
+
if (!isRecord(targets))
|
|
42
|
+
return [];
|
|
43
|
+
return Object.values(targets).flatMap((target) => isRecord(target) &&
|
|
44
|
+
STORYBOOK_BUILDERS.includes(String(target["builder"] ?? target["executor"])) &&
|
|
45
|
+
isRecord(target["options"])
|
|
46
|
+
? [target["options"]]
|
|
47
|
+
: []);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The TypeScript configuration the stories were compiled with, from the project's folder: the framework's `tsconfig`
|
|
52
|
+
* option, the builder's `tsConfig`, or Storybook's default beside `main`.
|
|
53
|
+
*
|
|
54
|
+
* @param projectDir - the project's folder, absolute.
|
|
55
|
+
* @param storybookDir - the `.storybook` folder, absolute.
|
|
56
|
+
* @param frameworkOptions - the options `main` gives its framework.
|
|
57
|
+
* @param targets - the builders' options.
|
|
58
|
+
*/
|
|
59
|
+
const tsconfigOf = (projectDir, storybookDir, frameworkOptions, targets) => {
|
|
60
|
+
const named = frameworkOptions["tsconfig"];
|
|
61
|
+
if (typeof named === "string")
|
|
62
|
+
return relative(projectDir, resolve(storybookDir, named));
|
|
63
|
+
// a builder's path is from the workspace's folder, and only a single Storybook says which project is meant
|
|
64
|
+
const fromBuilder = targets.length === 1 ? targets[0]?.["tsConfig"] : undefined;
|
|
65
|
+
if (typeof fromBuilder === "string")
|
|
66
|
+
return fromBuilder;
|
|
67
|
+
const beside = join(storybookDir, "tsconfig.json");
|
|
68
|
+
return existsSync(beside) ? relative(projectDir, beside) : undefined;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Reads what an Angular project's Storybook adds to `.storybook`.
|
|
72
|
+
*
|
|
73
|
+
* @param projectDir - the project's folder, absolute.
|
|
74
|
+
* @param storybookDir - the `.storybook` folder, absolute.
|
|
75
|
+
* @param frameworkOptions - the options `main` gives its framework (`{ name, options }`'s `options`).
|
|
76
|
+
*/
|
|
77
|
+
export const importAngular = (projectDir, storybookDir, frameworkOptions) => {
|
|
78
|
+
const targets = storybookTargets(projectDir);
|
|
79
|
+
const tsconfig = tsconfigOf(projectDir, storybookDir, frameworkOptions, targets);
|
|
80
|
+
const styles = [
|
|
81
|
+
...new Set(targets.flatMap((options) => Array.isArray(options["styles"]) ? options["styles"].filter((style) => typeof style === "string") : []))
|
|
82
|
+
];
|
|
83
|
+
const notes = [
|
|
84
|
+
...(styles.length === 0
|
|
85
|
+
? []
|
|
86
|
+
: [
|
|
87
|
+
`angular.json's Storybook styles are not loaded (${styles.join(", ")}): import them in the preview`
|
|
88
|
+
]),
|
|
89
|
+
...(targets.some((options) => options["compodoc"] === true)
|
|
90
|
+
? ["Compodoc is not run: Forgebook reads the components' inputs, outputs and content from their types"]
|
|
91
|
+
: [])
|
|
92
|
+
];
|
|
93
|
+
return {
|
|
94
|
+
options: tsconfig === undefined ? undefined : { tsconfig: tsconfig.split("\\").join("/") },
|
|
95
|
+
notes
|
|
96
|
+
};
|
|
97
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** The frameworks a project's stories can move to Forgebook with: `@forgebook/<name>`. */
|
|
2
|
+
export type ImportedFramework = "react" | "vue" | "svelte" | "sveltekit" | "preact" | "solid" | "nextjs" | "web-components" | "html" | "nuxt" | "angular" | "react-native-web";
|
|
3
|
+
/**
|
|
4
|
+
* The function each framework's `@forgebook/<name>/vite` exports, which a configuration calls: the framework's name, or
|
|
5
|
+
* its camel case where the name is no identifier.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ADAPTER_FUNCTIONS: Readonly<Record<ImportedFramework, string>>;
|
|
8
|
+
/** The Storybook packages Forgebook reads, as a refusal names them. */
|
|
9
|
+
export declare const STORYBOOK_PACKAGES: readonly string[];
|
|
10
|
+
/** What a framework takes from a project's Storybook besides its stories. */
|
|
11
|
+
export type FrameworkSettings = {
|
|
12
|
+
/** The Forgebook framework. */
|
|
13
|
+
readonly framework: ImportedFramework;
|
|
14
|
+
/** Its adapter's options, plain values; none for its defaults. */
|
|
15
|
+
readonly options: Readonly<Record<string, unknown>> | undefined;
|
|
16
|
+
/** What was not read, each a sentence for the person who runs the command. */
|
|
17
|
+
readonly notes: readonly string[];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The framework `main` names: a text, or an object with its `name` and its `options`.
|
|
21
|
+
*
|
|
22
|
+
* @param main - `main`'s configuration.
|
|
23
|
+
*/
|
|
24
|
+
export declare const frameworkOf: (main: Readonly<Record<string, unknown>>) => {
|
|
25
|
+
readonly name: string | undefined;
|
|
26
|
+
readonly options: Readonly<Record<string, unknown>>;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* The Storybook package that decides a project's framework: React Native Web's addon when `main` lists it, else the
|
|
30
|
+
* framework `main` names, else on-device Storybook's for a project on it whose `main` names none.
|
|
31
|
+
*
|
|
32
|
+
* @param main - `main`'s configuration.
|
|
33
|
+
* @param isOnDevice - whether the project is on-device Storybook's (`.rnstorybook`, or `@storybook/react-native`).
|
|
34
|
+
* @returns the package, or none for a framework Forgebook does not read.
|
|
35
|
+
*/
|
|
36
|
+
export declare const storybookPackage: (main: Readonly<Record<string, unknown>>, isOnDevice: boolean) => string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The Forgebook framework of a Storybook package, with what it takes from the project besides its stories: its
|
|
39
|
+
* adapter's options, and what was not read.
|
|
40
|
+
*
|
|
41
|
+
* @param storybook - the Storybook package (`storybookPackage`).
|
|
42
|
+
* @param main - `main`'s configuration.
|
|
43
|
+
* @param projectDir - the project's folder, absolute.
|
|
44
|
+
* @param storybookDir - the Storybook folder, absolute.
|
|
45
|
+
*/
|
|
46
|
+
export declare const frameworkSettings: (storybook: string, main: Readonly<Record<string, unknown>>, projectDir: string, storybookDir: string) => FrameworkSettings;
|
|
47
|
+
/**
|
|
48
|
+
* The packages a framework's adapter needs beside its own that a project may not have yet: none for most.
|
|
49
|
+
*
|
|
50
|
+
* @param framework - the Forgebook framework.
|
|
51
|
+
* @param options - its adapter's options.
|
|
52
|
+
*/
|
|
53
|
+
export declare const frameworkPeers: (framework: ImportedFramework, options: Readonly<Record<string, unknown>> | undefined) => readonly string[];
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Forgebook framework a project's Storybook moves to, chosen from the Storybook framework `main` names (or, for
|
|
3
|
+
* React Native, the addon or the folder that says it), with what that framework takes from the project: its adapter's
|
|
4
|
+
* options and what was not read.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* One table maps Storybook's frameworks to Forgebook's; `storybook.ts` loads `main` and asks this module which one it
|
|
8
|
+
* is, so a framework is added in one place. A framework whose project says more than its stories (a Next.js app's
|
|
9
|
+
* `next.config`, an Angular project's `angular.json`, React Native's compiled packages and Babel) has a reader of its
|
|
10
|
+
* own beside this one, called from `frameworkSettings`.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
import { basename } from "node:path";
|
|
15
|
+
import { VITE_PATHS } from "../../../src/vite/vitePaths.js";
|
|
16
|
+
import { importAngular } from "./storybookAngular.js";
|
|
17
|
+
import { importReactNative, ON_DEVICE_STORYBOOK, REACT_NATIVE_WEB_ADDON, REACT_NATIVE_WEB_VITE, reactNativePeers } from "./storybookReactNative.js";
|
|
18
|
+
/**
|
|
19
|
+
* The function each framework's `@forgebook/<name>/vite` exports, which a configuration calls: the framework's name, or
|
|
20
|
+
* its camel case where the name is no identifier.
|
|
21
|
+
*/
|
|
22
|
+
export const ADAPTER_FUNCTIONS = {
|
|
23
|
+
react: "react",
|
|
24
|
+
vue: "vue",
|
|
25
|
+
svelte: "svelte",
|
|
26
|
+
sveltekit: "sveltekit",
|
|
27
|
+
preact: "preact",
|
|
28
|
+
solid: "solid",
|
|
29
|
+
nextjs: "nextjs",
|
|
30
|
+
"web-components": "webComponents",
|
|
31
|
+
html: "html",
|
|
32
|
+
nuxt: "nuxt",
|
|
33
|
+
angular: "angular",
|
|
34
|
+
"react-native-web": "reactNativeWeb"
|
|
35
|
+
};
|
|
36
|
+
/** The Forgebook frameworks a project's Storybook can move to, by Storybook's framework. */
|
|
37
|
+
const STORYBOOK_FRAMEWORKS = {
|
|
38
|
+
"@storybook/react-vite": "react",
|
|
39
|
+
"@storybook/vue3-vite": "vue",
|
|
40
|
+
"@storybook/svelte-vite": "svelte",
|
|
41
|
+
"@storybook/sveltekit": "sveltekit",
|
|
42
|
+
"@storybook/preact-vite": "preact",
|
|
43
|
+
// Solid's Storybook framework is the community's, published under its own name
|
|
44
|
+
"storybook-solidjs-vite": "solid",
|
|
45
|
+
"@storybook/web-components-vite": "web-components",
|
|
46
|
+
"@storybook/html-vite": "html",
|
|
47
|
+
// Nuxt's Storybook module sets up a framework of its own, on Vue's
|
|
48
|
+
"@storybook-vue/nuxt": "nuxt",
|
|
49
|
+
// Angular's two compile a story the same way, through the Angular adapter's Vite plugin
|
|
50
|
+
"@storybook/angular": "angular",
|
|
51
|
+
"@analogjs/storybook-angular": "angular",
|
|
52
|
+
"@storybook/nextjs-vite": "nextjs",
|
|
53
|
+
"@storybook/nextjs": "nextjs",
|
|
54
|
+
[REACT_NATIVE_WEB_VITE]: "react-native-web",
|
|
55
|
+
// an addon beside a React framework on webpack, which makes the stories React Native's whatever the framework
|
|
56
|
+
[REACT_NATIVE_WEB_ADDON]: "react-native-web",
|
|
57
|
+
// on-device Storybook, drawn in the browser through react-native-web
|
|
58
|
+
[ON_DEVICE_STORYBOOK]: "react-native-web"
|
|
59
|
+
};
|
|
60
|
+
/** The Storybook packages Forgebook reads, as a refusal names them. */
|
|
61
|
+
export const STORYBOOK_PACKAGES = Object.keys(STORYBOOK_FRAMEWORKS);
|
|
62
|
+
/** What a Nuxt project's stories get differently once moved, said once the configuration is written. */
|
|
63
|
+
const NUXT_NOTES = [
|
|
64
|
+
"Nuxt's modules and plugins are not run: a component that needs what one provides (a store, i18n) gets it from a decorator",
|
|
65
|
+
"A story's route, data, state and cookies are set with parameters.nuxt (route, data, state, cookies), not by a decorator that drives the router"
|
|
66
|
+
];
|
|
67
|
+
/** Whether a value is a plain object. */
|
|
68
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
69
|
+
/**
|
|
70
|
+
* A framework or an addon as `main` writes it: a text, or an object with its `name` and its `options`.
|
|
71
|
+
*
|
|
72
|
+
* @param entry - the entry.
|
|
73
|
+
*/
|
|
74
|
+
const entryOf = (entry) => {
|
|
75
|
+
if (typeof entry === "string")
|
|
76
|
+
return { name: entry, options: {} };
|
|
77
|
+
if (!isRecord(entry))
|
|
78
|
+
return { name: undefined, options: {} };
|
|
79
|
+
return {
|
|
80
|
+
name: typeof entry["name"] === "string" ? entry["name"] : undefined,
|
|
81
|
+
options: isRecord(entry["options"]) ? entry["options"] : {}
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* The framework `main` names: a text, or an object with its `name` and its `options`.
|
|
86
|
+
*
|
|
87
|
+
* @param main - `main`'s configuration.
|
|
88
|
+
*/
|
|
89
|
+
export const frameworkOf = (main) => entryOf(main["framework"]);
|
|
90
|
+
/**
|
|
91
|
+
* The Storybook package a name or a path stands for, among the table's: its name, or a path to its package, as
|
|
92
|
+
* Storybook's monorepo template writes it (`getAbsolutePath("@storybook/react-vite")`).
|
|
93
|
+
*
|
|
94
|
+
* @param written - the name or the path.
|
|
95
|
+
*/
|
|
96
|
+
const knownPackage = (written) => {
|
|
97
|
+
if (written === undefined)
|
|
98
|
+
return undefined;
|
|
99
|
+
const path = VITE_PATHS.normalize(written).replace(/\/$/, "");
|
|
100
|
+
return STORYBOOK_PACKAGES.find((name) => path === name || path.endsWith(`/${name}`));
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* The addon `main` lists by a package, with its options.
|
|
104
|
+
*
|
|
105
|
+
* @param main - `main`'s configuration.
|
|
106
|
+
* @param name - the addon's package.
|
|
107
|
+
*/
|
|
108
|
+
const addonOf = (main, name) => {
|
|
109
|
+
const addons = Array.isArray(main["addons"]) ? main["addons"].map(entryOf) : [];
|
|
110
|
+
return addons.find((addon) => knownPackage(addon.name) === name);
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* The Storybook package that decides a project's framework: React Native Web's addon when `main` lists it, else the
|
|
114
|
+
* framework `main` names, else on-device Storybook's for a project on it whose `main` names none.
|
|
115
|
+
*
|
|
116
|
+
* @param main - `main`'s configuration.
|
|
117
|
+
* @param isOnDevice - whether the project is on-device Storybook's (`.rnstorybook`, or `@storybook/react-native`).
|
|
118
|
+
* @returns the package, or none for a framework Forgebook does not read.
|
|
119
|
+
*/
|
|
120
|
+
export const storybookPackage = (main, isOnDevice) => {
|
|
121
|
+
if (addonOf(main, REACT_NATIVE_WEB_ADDON) !== undefined)
|
|
122
|
+
return REACT_NATIVE_WEB_ADDON;
|
|
123
|
+
const { name } = frameworkOf(main);
|
|
124
|
+
if (name === undefined)
|
|
125
|
+
return isOnDevice ? ON_DEVICE_STORYBOOK : undefined;
|
|
126
|
+
return knownPackage(name);
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* What a Next.js project's Storybook says that the Next.js framework reads: its `next.config` when not where Next.js
|
|
130
|
+
* looks, and what Forgebook does without being told.
|
|
131
|
+
*
|
|
132
|
+
* @param main - `main`'s configuration.
|
|
133
|
+
* @param storybook - Storybook's framework package.
|
|
134
|
+
* @param projectDir - the project's folder.
|
|
135
|
+
* @returns the framework's options, and the notes.
|
|
136
|
+
*/
|
|
137
|
+
const nextjsSettings = (main, storybook, projectDir) => {
|
|
138
|
+
const notes = [];
|
|
139
|
+
if (storybook === "@storybook/nextjs")
|
|
140
|
+
notes.push("Storybook's Next.js framework on webpack: Forgebook runs on Vite, so webpackFinal and a Babel configuration are not read");
|
|
141
|
+
const features = main["features"];
|
|
142
|
+
if (isRecord(features) && features["experimentalRSC"] === true)
|
|
143
|
+
notes.push("experimentalRSC is not needed: Forgebook draws async server components without a flag");
|
|
144
|
+
const { nextConfigPath } = frameworkOf(main).options;
|
|
145
|
+
// the Next.js app's folder is where its next.config is: its tsconfig, .env files and PostCSS are there too
|
|
146
|
+
const file = typeof nextConfigPath === "string" ? VITE_PATHS.resolve(projectDir, nextConfigPath) : undefined;
|
|
147
|
+
const appDir = file === undefined ? "" : VITE_PATHS.relative(projectDir, VITE_PATHS.dirname(file));
|
|
148
|
+
const options = file === undefined
|
|
149
|
+
? undefined
|
|
150
|
+
: { ...(appDir === "" ? {} : { dir: appDir }), nextConfig: basename(file) };
|
|
151
|
+
return { options, notes };
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* The Forgebook framework of a Storybook package, with what it takes from the project besides its stories: its
|
|
155
|
+
* adapter's options, and what was not read.
|
|
156
|
+
*
|
|
157
|
+
* @param storybook - the Storybook package (`storybookPackage`).
|
|
158
|
+
* @param main - `main`'s configuration.
|
|
159
|
+
* @param projectDir - the project's folder, absolute.
|
|
160
|
+
* @param storybookDir - the Storybook folder, absolute.
|
|
161
|
+
*/
|
|
162
|
+
export const frameworkSettings = (storybook, main, projectDir, storybookDir) => {
|
|
163
|
+
const framework = STORYBOOK_FRAMEWORKS[storybook] ?? "react";
|
|
164
|
+
if (framework === "nextjs")
|
|
165
|
+
return { framework, ...nextjsSettings(main, storybook, projectDir) };
|
|
166
|
+
if (framework === "angular")
|
|
167
|
+
return { framework, ...importAngular(projectDir, storybookDir, frameworkOf(main).options) };
|
|
168
|
+
if (framework === "react-native-web") {
|
|
169
|
+
const options = addonOf(main, storybook)?.options ?? frameworkOf(main).options;
|
|
170
|
+
return { framework, ...importReactNative(storybook, options, main) };
|
|
171
|
+
}
|
|
172
|
+
return { framework, options: undefined, notes: framework === "nuxt" ? NUXT_NOTES : [] };
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* The packages a framework's adapter needs beside its own that a project may not have yet: none for most.
|
|
176
|
+
*
|
|
177
|
+
* @param framework - the Forgebook framework.
|
|
178
|
+
* @param options - its adapter's options.
|
|
179
|
+
*/
|
|
180
|
+
export const frameworkPeers = (framework, options) => (framework === "react-native-web" ? reactNativePeers(options) : []);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `forgebook init --from storybook` reads of a React Native project's Storybook: the options of Storybook's React
|
|
3
|
+
* Native Web framework or of its older addon, turned into `reactNativeWeb()`'s, and what on-device Storybook draws
|
|
4
|
+
* differently in a browser.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Pure: the options `main` gives in, the adapter's options and the notes out; `storybookFrameworks.ts` chooses the
|
|
8
|
+
* framework and hands them over. The packages Storybook compiled (`modulesToTranspile`) become `nativePackages`; its
|
|
9
|
+
* `pluginReactOptions` (the JSX import source, Babel's plugins and presets, the files) become the adapter's options of
|
|
10
|
+
* the same meaning; what cannot be written as a plain value (a function, a regular expression) is named in a note.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
/** Storybook's React Native framework for the browser, on Vite. */
|
|
15
|
+
export declare const REACT_NATIVE_WEB_VITE = "@storybook/react-native-web-vite";
|
|
16
|
+
/** Storybook's older React Native Web addon, on webpack, beside a React framework. */
|
|
17
|
+
export declare const REACT_NATIVE_WEB_ADDON = "@storybook/addon-react-native-web";
|
|
18
|
+
/** On-device Storybook's package, which `main` names as its framework or not at all. */
|
|
19
|
+
export declare const ON_DEVICE_STORYBOOK = "@storybook/react-native";
|
|
20
|
+
/** What the React Native Web adapter's options take from the project, and what was not read. */
|
|
21
|
+
export type ReactNativeImport = {
|
|
22
|
+
/** The adapter's options, plain values written into the configuration; none for the defaults. */
|
|
23
|
+
readonly options: Readonly<Record<string, unknown>> | undefined;
|
|
24
|
+
/** What was not read, each a sentence for the person who runs the command. */
|
|
25
|
+
readonly notes: readonly string[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* What a React Native project's Storybook gives `reactNativeWeb()`.
|
|
29
|
+
*
|
|
30
|
+
* @param storybook - the Storybook package read: the framework on Vite, the older addon, or on-device Storybook.
|
|
31
|
+
* @param options - that framework's or addon's options.
|
|
32
|
+
* @param main - `main`'s configuration, for on-device Storybook's device addons.
|
|
33
|
+
*/
|
|
34
|
+
export declare const importReactNative: (storybook: string, options: Readonly<Record<string, unknown>>, main: Readonly<Record<string, unknown>>) => ReactNativeImport;
|
|
35
|
+
/**
|
|
36
|
+
* The packages `reactNativeWeb()` needs beside its own that a project may not have yet.
|
|
37
|
+
*
|
|
38
|
+
* @param options - the adapter's options.
|
|
39
|
+
*/
|
|
40
|
+
export declare const reactNativePeers: (options: Readonly<Record<string, unknown>> | undefined) => readonly string[];
|