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
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { findPage } from "../pageTree.js";
|
|
4
|
+
import { findComponent, findStory } from "../storyTree.js";
|
|
4
5
|
import { PackageHtml } from "./PackageHtml.js";
|
|
6
|
+
import { PAGE_STRINGS } from "./pageStrings.js";
|
|
5
7
|
import { STRINGS } from "./strings.js";
|
|
6
8
|
import { useLoaded } from "./useLoaded.js";
|
|
7
9
|
/** The most components a family's card lists before "Show all". */
|
|
8
10
|
const CARD_COMPONENTS = 6;
|
|
9
11
|
/** A link to a page, opened in place unless the user asks for another tab. */
|
|
10
|
-
const PageLink = ({ page, hrefOf, onOpen, className, children }) => (_jsx("a", { className: className, href: hrefOf(page), onClick: (event) => {
|
|
12
|
+
export const PageLink = ({ page, hrefOf, onOpen, className, children }) => (_jsx("a", { className: className, href: hrefOf(page), onClick: (event) => {
|
|
11
13
|
if (event.metaKey || event.ctrlKey || event.shiftKey || event.button !== 0)
|
|
12
14
|
return;
|
|
13
15
|
event.preventDefault();
|
|
@@ -19,7 +21,7 @@ const PageLink = ({ page, hrefOf, onOpen, className, children }) => (_jsx("a", {
|
|
|
19
21
|
* @param tree - the tree.
|
|
20
22
|
* @param recent - the pages opened last.
|
|
21
23
|
*/
|
|
22
|
-
const recentEntries = (tree, recent) => recent.flatMap((page) => {
|
|
24
|
+
export const recentEntries = (tree, recent) => recent.flatMap((page) => {
|
|
23
25
|
if (page.kind === "story") {
|
|
24
26
|
const location = findStory(tree, page.id);
|
|
25
27
|
if (location === undefined)
|
|
@@ -27,6 +29,13 @@ const recentEntries = (tree, recent) => recent.flatMap((page) => {
|
|
|
27
29
|
const place = [location.source.name, location.family.name, location.component.name].join(" · ");
|
|
28
30
|
return [{ page, name: location.story.name, place }];
|
|
29
31
|
}
|
|
32
|
+
if (page.kind === "page") {
|
|
33
|
+
const location = findPage(tree, page.id);
|
|
34
|
+
if (location === undefined)
|
|
35
|
+
return [];
|
|
36
|
+
const place = [location.source.name, location.page.group].filter((part) => part !== undefined);
|
|
37
|
+
return [{ page, name: location.page.name, place: place.join(" · ") }];
|
|
38
|
+
}
|
|
30
39
|
const location = findComponent(tree, page.id);
|
|
31
40
|
if (location === undefined)
|
|
32
41
|
return [];
|
|
@@ -51,35 +60,65 @@ const introState = (value) => {
|
|
|
51
60
|
*
|
|
52
61
|
* @param props - the loader.
|
|
53
62
|
*/
|
|
54
|
-
const SourceIntro = ({ load }) => {
|
|
63
|
+
export const SourceIntro = ({ load }) => {
|
|
55
64
|
const intro = useLoaded(load, introState);
|
|
56
65
|
if (intro.status === "error") {
|
|
57
|
-
return (_jsxs("p", { className: "forgebook-problems", role: "alert", children: [
|
|
66
|
+
return (_jsxs("p", { className: "forgebook-problems", role: "alert", children: [PAGE_STRINGS.homeIntroError, ": ", intro.message] }));
|
|
58
67
|
}
|
|
59
68
|
return intro.status === "ready" ? (_jsx(PackageHtml, { className: "forgebook-prose", html: intro.value.html })) : null;
|
|
60
69
|
};
|
|
61
70
|
/**
|
|
62
71
|
* A family's card: its name and how many components it has, then its components, the first few until asked for all.
|
|
63
72
|
*
|
|
64
|
-
* @param props - the
|
|
73
|
+
* @param props - the family, and how to open a component.
|
|
65
74
|
*/
|
|
66
|
-
const FamilyCard = ({
|
|
75
|
+
export const FamilyCard = ({ family, hrefOf, onOpen }) => {
|
|
67
76
|
const [isOpen, setIsOpen] = useState(false);
|
|
68
77
|
const components = family.groups.flatMap((group) => [...group.components]);
|
|
69
78
|
const shown = isOpen ? components : components.slice(0, CARD_COMPONENTS);
|
|
70
|
-
return (_jsxs("article", { className: "forgebook-home__card", "aria-label": family.name, children: [_jsxs("h3", { className: "forgebook-home__card-title", children: [family.name, _jsx("span", { className: "forgebook-home__count", children:
|
|
79
|
+
return (_jsxs("article", { className: "forgebook-home__card", "aria-label": family.name, children: [_jsxs("h3", { className: "forgebook-home__card-title", children: [family.name, _jsx("span", { className: "forgebook-home__count", children: PAGE_STRINGS.componentsCount(components.length) })] }), _jsx("ul", { className: "forgebook-home__components", children: shown.map((component) => (_jsx("li", { children: _jsx(PageLink, { page: { kind: "component", id: component.id }, hrefOf: hrefOf, onOpen: onOpen, className: "forgebook-link", children: component.name }) }, component.title))) }), components.length > CARD_COMPONENTS ? (_jsx("button", { type: "button", className: "forgebook-text-button", "aria-expanded": isOpen, onClick: () => setIsOpen(!isOpen), children: isOpen ? PAGE_STRINGS.showFewer : PAGE_STRINGS.showAll(components.length) })) : null] }));
|
|
71
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* A source's docs pages as a card, in their reading order, first among its families.
|
|
83
|
+
*
|
|
84
|
+
* @param props - the source, and how to open a page.
|
|
85
|
+
*/
|
|
86
|
+
export const DocsCard = ({ source, hrefOf, onOpen }) => (_jsxs("article", { className: "forgebook-home__card", "aria-label": STRINGS.docsNav, children: [_jsx("h3", { className: "forgebook-home__card-title", children: STRINGS.docsNav }), _jsx("ul", { className: "forgebook-home__components", children: source.pages.map((page) => (_jsx("li", { children: _jsx(PageLink, { page: { kind: "page", id: page.id }, hrefOf: hrefOf, onOpen: onOpen, className: "forgebook-link", children: page.name }) }, page.id))) })] }));
|
|
87
|
+
/**
|
|
88
|
+
* How many components a tree has, in every library.
|
|
89
|
+
*
|
|
90
|
+
* @param tree - the tree.
|
|
91
|
+
*/
|
|
92
|
+
export const componentCount = (tree) => tree.sources.reduce((total, source) => total +
|
|
93
|
+
source.families.reduce((sum, family) => sum + family.groups.reduce((count, group) => count + group.components.length, 0), 0), 0);
|
|
94
|
+
/**
|
|
95
|
+
* How many libraries of a tree have components.
|
|
96
|
+
*
|
|
97
|
+
* @param tree - the tree.
|
|
98
|
+
*/
|
|
99
|
+
export const libraryCount = (tree) => tree.sources.filter((source) => source.families.length > 0).length;
|
|
100
|
+
/**
|
|
101
|
+
* The pages opened last, under their heading; nothing when there are none.
|
|
102
|
+
*
|
|
103
|
+
* @param props - the tree, the recent pages, how to open one, and the heading; "Recently opened" by default.
|
|
104
|
+
*/
|
|
105
|
+
export const RecentSection = ({ tree, recent, hrefOf, onOpen, label = PAGE_STRINGS.recentlyOpened }) => {
|
|
106
|
+
const entries = recentEntries(tree, recent);
|
|
107
|
+
return entries.length === 0 ? null : (_jsxs("section", { className: "forgebook-doc__section", "aria-labelledby": "forgebook-recent", children: [_jsx("h2", { id: "forgebook-recent", children: label }), _jsx("ul", { className: "forgebook-home__recent", children: entries.map((entry) => (_jsx("li", { children: _jsxs(PageLink, { page: entry.page, hrefOf: hrefOf, onOpen: onOpen, className: "forgebook-home__recent-link", children: [_jsx("span", { className: "forgebook-home__recent-name", children: entry.name }), _jsx("span", { className: "forgebook-home__recent-place", children: entry.place })] }) }, `${entry.page.kind}:${entry.page.id}`))) })] }));
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* A library on the home: its name and logo, its introduction, its docs pages and its families.
|
|
111
|
+
*
|
|
112
|
+
* @param props - the library, the sources for its introduction, and how to open a page.
|
|
113
|
+
*/
|
|
114
|
+
export const LibrarySection = ({ source, sources, hrefOf, onOpen }) => (_jsxs("section", { className: "forgebook-doc__section", "aria-labelledby": `forgebook-source-${source.id}`, children: [_jsxs("h2", { id: `forgebook-source-${source.id}`, className: "forgebook-home__source", children: [source.logo === undefined ? null : (_jsx("img", { className: "forgebook-source-logo", src: source.logo, alt: "", width: 28, height: 28 })), source.name] }), _jsx(SourceIntro, { load: sources.find((candidate) => candidate.id === source.id)?.home }), _jsxs("div", { className: "forgebook-home__families", children: [source.pages.length === 0 ? null : _jsx(DocsCard, { source: source, hrefOf: hrefOf, onOpen: onOpen }), source.families.map((family) => (_jsx(FamilyCard, { family: family, hrefOf: hrefOf, onOpen: onOpen }, family.name)))] })] }));
|
|
72
115
|
/**
|
|
73
116
|
* The home.
|
|
74
117
|
*
|
|
75
118
|
* @param props - the title, the tree, the sources, the recent pages, and how to open a page.
|
|
76
119
|
*/
|
|
77
120
|
export const HomePage = ({ title, tree, sources, recent, hrefOf, onOpen, header }) => {
|
|
78
|
-
const entries = recentEntries(tree, recent);
|
|
79
|
-
const componentCount = tree.sources.reduce((total, source) => total +
|
|
80
|
-
source.families.reduce((sum, family) => sum + family.groups.reduce((count, group) => count + group.components.length, 0), 0), 0);
|
|
81
121
|
return (_jsxs("div", { className: "forgebook-workspace", children: [header, _jsx("div", { className: "forgebook-scroll", children: _jsxs("div", { className: "forgebook-home", children: [_jsxs("header", { className: "forgebook-home__head", children: [_jsx("h1", { className: "forgebook-home__title", children: title }), _jsx("p", { className: "forgebook-doc__lead", children: tree.sources.length === 0
|
|
82
|
-
?
|
|
83
|
-
:
|
|
122
|
+
? PAGE_STRINGS.homeEmpty
|
|
123
|
+
: PAGE_STRINGS.homeSummary(componentCount(tree), libraryCount(tree)) })] }), _jsx(RecentSection, { tree: tree, recent: recent, hrefOf: hrefOf, onOpen: onOpen }), tree.sources.map((source) => (_jsx(LibrarySection, { source: source, sources: sources, hrefOf: hrefOf, onOpen: onOpen }, source.id)))] }) })] }));
|
|
84
124
|
};
|
|
85
|
-
//# sourceMappingURL=HomePage.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pieces of the generated home a written home places among its own text: the pages opened last (`::recent`), the
|
|
3
|
+
* libraries (`::libraries`), their families (`::families`) and their docs pages (`::pages`).
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Each piece is drawn by the generated home's own components (`HomePage.tsx`), so a written home that places them
|
|
7
|
+
* looks and behaves as the generated one, and both change together. A piece may show one library (`source="kit"`);
|
|
8
|
+
* a library the catalogue does not have is said in place.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import type { StorySource } from "@forgebook/story-format/source";
|
|
13
|
+
import type { ReactNode } from "react";
|
|
14
|
+
import type { HomePiece } from "../docPages.ts";
|
|
15
|
+
import type { StoryTree } from "../storyTree.ts";
|
|
16
|
+
import type { RecentPage } from "./useRecentPages.ts";
|
|
17
|
+
/** What the home's pieces read. */
|
|
18
|
+
export type HomePiecesContext = {
|
|
19
|
+
/** The tree. */
|
|
20
|
+
readonly tree: StoryTree;
|
|
21
|
+
/** The sources, for their introductions. */
|
|
22
|
+
readonly sources: readonly StorySource[];
|
|
23
|
+
/** The pages opened last, the newest first. */
|
|
24
|
+
readonly recent: readonly RecentPage[];
|
|
25
|
+
/** A page's address, for its link. */
|
|
26
|
+
readonly hrefOf: (page: RecentPage) => string;
|
|
27
|
+
/** Opens a page. */
|
|
28
|
+
readonly onOpen: (page: RecentPage) => void;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* One piece of the generated home.
|
|
32
|
+
*
|
|
33
|
+
* @param props - the piece, its heading, the library it shows alone, and what the pieces read.
|
|
34
|
+
*/
|
|
35
|
+
export declare const HomePieceView: ({ piece, label, source, context }: {
|
|
36
|
+
readonly piece: HomePiece;
|
|
37
|
+
readonly label: string | undefined;
|
|
38
|
+
readonly source: string | undefined;
|
|
39
|
+
readonly context: HomePiecesContext;
|
|
40
|
+
}) => ReactNode;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DocsCard, FamilyCard, LibrarySection, RecentSection } from "./HomePage.js";
|
|
3
|
+
import { PAGE_STRINGS } from "./pageStrings.js";
|
|
4
|
+
/**
|
|
5
|
+
* A piece's heading, when the home gives it one.
|
|
6
|
+
*
|
|
7
|
+
* @param props - the heading.
|
|
8
|
+
*/
|
|
9
|
+
const PieceHeading = ({ label }) => label === undefined ? null : _jsx("h2", { children: label });
|
|
10
|
+
/**
|
|
11
|
+
* One piece of the generated home.
|
|
12
|
+
*
|
|
13
|
+
* @param props - the piece, its heading, the library it shows alone, and what the pieces read.
|
|
14
|
+
*/
|
|
15
|
+
export const HomePieceView = ({ piece, label, source, context }) => {
|
|
16
|
+
const { tree, sources, recent, hrefOf, onOpen } = context;
|
|
17
|
+
if (piece === "recent")
|
|
18
|
+
return _jsx(RecentSection, { tree: tree, recent: recent, hrefOf: hrefOf, onOpen: onOpen, label: label });
|
|
19
|
+
const shown = source === undefined ? tree.sources : tree.sources.filter((each) => each.id === source);
|
|
20
|
+
if (source !== undefined && shown.length === 0) {
|
|
21
|
+
return (_jsx("p", { className: "forgebook-problems", role: "alert", children: PAGE_STRINGS.unknownSource(source) }));
|
|
22
|
+
}
|
|
23
|
+
if (piece === "libraries") {
|
|
24
|
+
return shown.map((each) => (_jsx(LibrarySection, { source: each, sources: sources, hrefOf: hrefOf, onOpen: onOpen }, each.id)));
|
|
25
|
+
}
|
|
26
|
+
return (_jsxs("section", { className: "forgebook-doc__section", children: [_jsx(PieceHeading, { label: label }), _jsx("div", { className: "forgebook-home__families", children: piece === "pages"
|
|
27
|
+
? shown.map((each) => each.pages.length === 0 ? null : (_jsx(DocsCard, { source: each, hrefOf: hrefOf, onOpen: onOpen }, each.id)))
|
|
28
|
+
: shown.flatMap((each) => each.families.map((family) => (_jsx(FamilyCard, { family: family, hrefOf: hrefOf, onOpen: onOpen }, `${each.id}:${family.name}`)))) })] }));
|
|
29
|
+
};
|
|
@@ -50,4 +50,3 @@ export const InfoTip = ({ note, about }) => {
|
|
|
50
50
|
hide();
|
|
51
51
|
}, children: _jsx(Icon, { name: "info", size: 14 }) }), _jsx("span", { ref: noteRef, id: noteId, className: "forgebook-info-tip__note", popover: "manual", role: "tooltip", children: note })] }));
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=InfoTip.js.map
|
|
@@ -13,16 +13,9 @@ export type InteractionsTabProps = {
|
|
|
13
13
|
/** Runs the play again on a fresh mount. */
|
|
14
14
|
readonly onPlayAgain: () => void;
|
|
15
15
|
};
|
|
16
|
-
/**
|
|
17
|
-
* The tab's hint: the play's status.
|
|
18
|
-
*
|
|
19
|
-
* @param trace - the trace.
|
|
20
|
-
*/
|
|
21
|
-
export declare const interactionsHint: (trace: PlayTrace) => string;
|
|
22
16
|
/**
|
|
23
17
|
* The Interactions tab.
|
|
24
18
|
*
|
|
25
19
|
* @param props - the trace and how to run the play again.
|
|
26
20
|
*/
|
|
27
21
|
export declare const InteractionsTab: ({ trace, onPlayAgain }: InteractionsTabProps) => ReactNode;
|
|
28
|
-
//# sourceMappingURL=InteractionsTab.d.ts.map
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
2
3
|
import { STRINGS } from "./strings.js";
|
|
3
|
-
/**
|
|
4
|
-
* The tab's hint: the play's status.
|
|
5
|
-
*
|
|
6
|
-
* @param trace - the trace.
|
|
7
|
-
*/
|
|
8
|
-
export const interactionsHint = (trace) => STRINGS.playStatus[trace.status];
|
|
9
4
|
/** A status with its time, as a line ends. */
|
|
10
|
-
const StatusNote = ({ status, ms }) => (_jsxs("span", { className: "forgebook-play__status", "data-status": status, children: [STRINGS.playStatus[status], ms === undefined ? null : ` · ${
|
|
5
|
+
const StatusNote = ({ status, ms }) => (_jsxs("span", { className: "forgebook-play__status", "data-status": status, children: [STRINGS.playStatus[status], ms === undefined ? null : ` · ${LATER_STRINGS.playTime(ms)}`] }));
|
|
11
6
|
/**
|
|
12
7
|
* The Interactions tab.
|
|
13
8
|
*
|
|
14
9
|
* @param props - the trace and how to run the play again.
|
|
15
10
|
*/
|
|
16
|
-
export const InteractionsTab = ({ trace, onPlayAgain }) => (_jsxs("div", { className: "forgebook-prop-group", "aria-live": "polite", children: [_jsxs("div", { className: "forgebook-calls__head", children: [_jsxs("h3", { className: "forgebook-prop-group__title", children: [
|
|
17
|
-
//# sourceMappingURL=InteractionsTab.js.map
|
|
11
|
+
export const InteractionsTab = ({ trace, onPlayAgain }) => (_jsxs("div", { className: "forgebook-prop-group", "aria-live": "polite", children: [_jsxs("div", { className: "forgebook-calls__head", children: [_jsxs("h3", { className: "forgebook-prop-group__title", children: [LATER_STRINGS.playTitle, " ", _jsx(StatusNote, { status: trace.status, ms: trace.ms })] }), _jsx("button", { type: "button", className: "forgebook-button", disabled: trace.status === "running", onClick: onPlayAgain, children: LATER_STRINGS.playAgain })] }), trace.error === undefined ? null : (_jsx("p", { className: "forgebook-problems", role: "alert", children: trace.error })), trace.steps.length === 0 ? (_jsx("p", { className: "forgebook-prop__description", children: LATER_STRINGS.playNoSteps })) : (_jsx("ol", { className: "forgebook-play__steps", children: trace.steps.map((step, index) => (_jsxs("li", { className: "forgebook-play__step", "data-status": step.status, children: [_jsx("span", { className: "forgebook-play__label", children: step.label }), _jsx(StatusNote, { status: step.status, ms: step.ms }), step.error === undefined ? null : _jsx("p", { className: "forgebook-play__error", children: step.error })] }, index))) }))] }));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads a plugin view's host the first time it is needed, so a catalogue pays nothing for it until then; a host that
|
|
3
|
+
* cannot load is said in place, and leaves the page standing.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
8
|
+
/**
|
|
9
|
+
* A host, once its module is there.
|
|
10
|
+
*
|
|
11
|
+
* @param props - how it loads, and its own props.
|
|
12
|
+
*/
|
|
13
|
+
export declare const LazyHost: <TProps extends object>({ loadHost, props }: {
|
|
14
|
+
readonly loadHost: () => Promise<ComponentType<TProps>>;
|
|
15
|
+
readonly props: TProps;
|
|
16
|
+
}) => ReactNode;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Loads a plugin view's host the first time it is needed, so a catalogue pays nothing for it until then; a host that
|
|
4
|
+
* cannot load is said in place, and leaves the page standing.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import { useEffect, useState } from "react";
|
|
9
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
10
|
+
/**
|
|
11
|
+
* A host, once its module is there.
|
|
12
|
+
*
|
|
13
|
+
* @param props - how it loads, and its own props.
|
|
14
|
+
*/
|
|
15
|
+
export const LazyHost = ({ loadHost, props }) => {
|
|
16
|
+
const [host, setHost] = useState({
|
|
17
|
+
status: "loading"
|
|
18
|
+
});
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
let isCurrent = true;
|
|
21
|
+
loadHost()
|
|
22
|
+
.then((component) => {
|
|
23
|
+
if (isCurrent)
|
|
24
|
+
setHost({ status: "ready", value: { component } });
|
|
25
|
+
})
|
|
26
|
+
.catch((error) => {
|
|
27
|
+
if (isCurrent)
|
|
28
|
+
setHost({ status: "error", message: error instanceof Error ? error.message : String(error) });
|
|
29
|
+
});
|
|
30
|
+
return () => {
|
|
31
|
+
isCurrent = false;
|
|
32
|
+
};
|
|
33
|
+
}, [loadHost]);
|
|
34
|
+
if (host.status === "ready") {
|
|
35
|
+
const Host = host.value.component;
|
|
36
|
+
return _jsx(Host, { ...props });
|
|
37
|
+
}
|
|
38
|
+
if (host.status === "error") {
|
|
39
|
+
return (_jsxs("p", { className: "forgebook-problems", role: "alert", children: [LATER_STRINGS.pluginError, ": ", host.message] }));
|
|
40
|
+
}
|
|
41
|
+
return _jsx("p", { className: "forgebook-tab-note", children: LATER_STRINGS.pluginLoading });
|
|
42
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A page of the shell other than a story's (the home, a component's page, a docs page), loaded the first time it is
|
|
3
|
+
* opened (`lazyModule.tsx`): most visits open a story, so their first load leaves these pages out. The workspace and
|
|
4
|
+
* its header show while the page's code arrives, and the reason when it cannot.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import type { ReactNode } from "react";
|
|
9
|
+
import { type LazyModule } from "./lazyModule.tsx";
|
|
10
|
+
/** The props of a page drawn from its module. */
|
|
11
|
+
export type LazyPageProps<TProps> = {
|
|
12
|
+
/** The page's module. */
|
|
13
|
+
readonly module: LazyModule<TProps>;
|
|
14
|
+
/** The page's own props. */
|
|
15
|
+
readonly pageProps: TProps;
|
|
16
|
+
/** The workspace's header, drawn until the page draws its own. */
|
|
17
|
+
readonly header: ReactNode;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* A page drawn once its module is there.
|
|
21
|
+
*
|
|
22
|
+
* @param props - the page's module, its own props and the header.
|
|
23
|
+
*/
|
|
24
|
+
export declare const LazyPage: <TProps extends object>({ module, pageProps, header }: LazyPageProps<TProps>) => ReactNode;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LazyView } from "./lazyModule.js";
|
|
3
|
+
import { STRINGS } from "./strings.js";
|
|
4
|
+
/**
|
|
5
|
+
* A page drawn once its module is there.
|
|
6
|
+
*
|
|
7
|
+
* @param props - the page's module, its own props and the header.
|
|
8
|
+
*/
|
|
9
|
+
export const LazyPage = ({ module, pageProps, header }) => (_jsx(LazyView, { module: module, props: pageProps, loading: _jsx("div", { className: "forgebook-workspace", "aria-busy": "true", children: header }), failed: (message) => (_jsxs("div", { className: "forgebook-workspace", children: [header, _jsxs("p", { className: "forgebook-problems", role: "alert", children: [STRINGS.pageLoadError, ": ", message] })] })) }));
|
|
@@ -3,4 +3,3 @@ import { Icon } from "./icons.js";
|
|
|
3
3
|
import { STRINGS } from "./strings.js";
|
|
4
4
|
/** The mark. */
|
|
5
5
|
export const LogicMark = () => (_jsxs("span", { className: "forgebook-logic-mark", title: STRINGS.logicHint, children: [_jsx(Icon, { name: "function", size: 12 }), STRINGS.logic] }));
|
|
6
|
-
//# sourceMappingURL=LogicMark.js.map
|
|
@@ -21,4 +21,3 @@ export type MatrixPickerProps = {
|
|
|
21
21
|
* @param props - the props that can make an axis, the chosen ones and the setter.
|
|
22
22
|
*/
|
|
23
23
|
export declare const MatrixPicker: ({ props, axes, onAxesChange }: MatrixPickerProps) => ReactNode;
|
|
24
|
-
//# sourceMappingURL=MatrixPicker.d.ts.map
|
|
@@ -11,7 +11,7 @@ import { checkedView, isSameView, namedViewsText, readNamedViews, viewValues, wi
|
|
|
11
11
|
import { parseView } from "../viewState.js";
|
|
12
12
|
import { useCatalogue } from "./catalogueContext.js";
|
|
13
13
|
import { Icon } from "./icons.js";
|
|
14
|
-
import {
|
|
14
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
15
15
|
import { useStored } from "./useStored.js";
|
|
16
16
|
/**
|
|
17
17
|
* The named views.
|
|
@@ -41,9 +41,8 @@ export const NamedViews = ({ view, ownView, onViewChange }) => {
|
|
|
41
41
|
event.stopPropagation();
|
|
42
42
|
setIsNaming(false);
|
|
43
43
|
};
|
|
44
|
-
const chip = (each, isOwn) => (_jsxs("span", { className: "forgebook-named-view", children: [_jsx("button", { type: "button", className: "forgebook-named-view__pick", "aria-pressed": isSameView(each.values, own, catalogue.switches), onClick: () => onViewChange(checkedView(withViewValues(view, each.values), catalogue)), children: each.name }), isOwn ? (_jsx("button", { type: "button", className: "forgebook-named-view__remove", "aria-label":
|
|
45
|
-
return (_jsxs("section", { className: "forgebook-named-views", "aria-label":
|
|
44
|
+
const chip = (each, isOwn) => (_jsxs("span", { className: "forgebook-named-view", children: [_jsx("button", { type: "button", className: "forgebook-named-view__pick", "aria-pressed": isSameView(each.values, own, catalogue.switches), onClick: () => onViewChange(checkedView(withViewValues(view, each.values), catalogue)), children: each.name }), isOwn ? (_jsx("button", { type: "button", className: "forgebook-named-view__remove", "aria-label": LATER_STRINGS.removeView(each.name), title: LATER_STRINGS.removeView(each.name), onClick: () => setSaved((current) => withoutView(current, each.name)), children: _jsx(Icon, { name: "close", size: 10 }) })) : null] }, `${isOwn ? "own" : "catalogue"}:${each.name}`));
|
|
45
|
+
return (_jsxs("section", { className: "forgebook-named-views", "aria-label": LATER_STRINGS.namedViews, children: [declared.map((each) => chip(each, false)), saved.map((each) => chip(each, true)), isNaming ? (_jsx("form", { className: "forgebook-named-views__form", onSubmit: save, children: _jsx("input", { type: "text", "aria-label": LATER_STRINGS.viewName, placeholder: LATER_STRINGS.viewName, value: name,
|
|
46
46
|
// biome-ignore lint/a11y/noAutofocus: the field opens on the person's press, to be typed in at once
|
|
47
|
-
autoFocus: true, onKeyDown: cancel, onChange: (event) => setName(event.target.value) }) })) : (_jsx("button", { type: "button", className: "forgebook-text-button", onClick: () => setIsNaming(true), children:
|
|
47
|
+
autoFocus: true, onKeyDown: cancel, onChange: (event) => setName(event.target.value) }) })) : (_jsx("button", { type: "button", className: "forgebook-text-button", onClick: () => setIsNaming(true), children: LATER_STRINGS.saveView }))] }));
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=NamedViews.js.map
|
|
@@ -10,4 +10,3 @@ export const PackageHtml = ({ className, html }) => {
|
|
|
10
10
|
// biome-ignore lint/security/noDangerouslySetInnerHtml: the package's own Markdown, rendered by the plugin
|
|
11
11
|
return _jsx("div", { className: className, dangerouslySetInnerHTML: markup });
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=PackageHtml.js.map
|
|
@@ -6,12 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ReactNode } from "react";
|
|
8
8
|
import type { ComponentDocs } from "../componentDocs.ts";
|
|
9
|
-
/**
|
|
10
|
-
* The `data-*` hooks of a component's modifiers.
|
|
11
|
-
*
|
|
12
|
-
* @param docs - the component's docs.
|
|
13
|
-
*/
|
|
14
|
-
export declare const styleHooks: (docs: ComponentDocs) => string[];
|
|
15
9
|
/**
|
|
16
10
|
* The Parts and styling tab.
|
|
17
11
|
*
|
|
@@ -20,4 +14,3 @@ export declare const styleHooks: (docs: ComponentDocs) => string[];
|
|
|
20
14
|
export declare const PartsTab: ({ docs }: {
|
|
21
15
|
readonly docs: ComponentDocs;
|
|
22
16
|
}) => ReactNode;
|
|
23
|
-
//# sourceMappingURL=PartsTab.d.ts.map
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Code } from "./Code.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const MODIFIERS = ["variant", "size", "tone", "shape", "width", "orientation"];
|
|
6
|
-
/**
|
|
7
|
-
* The `data-*` hooks of a component's modifiers.
|
|
8
|
-
*
|
|
9
|
-
* @param docs - the component's docs.
|
|
10
|
-
*/
|
|
11
|
-
export const styleHooks = (docs) => docs.props
|
|
12
|
-
.filter((prop) => prop.kind === "choice" && MODIFIERS.includes(prop.name))
|
|
13
|
-
.map((prop) => `data-${prop.name}="${(prop.choices ?? []).join(" | ")}"`);
|
|
3
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
4
|
+
import { styleHooks } from "./tabSummaries.js";
|
|
14
5
|
/**
|
|
15
6
|
* The Parts and styling tab.
|
|
16
7
|
*
|
|
@@ -18,6 +9,5 @@ export const styleHooks = (docs) => docs.props
|
|
|
18
9
|
*/
|
|
19
10
|
export const PartsTab = ({ docs }) => {
|
|
20
11
|
const hooks = styleHooks(docs);
|
|
21
|
-
return (_jsxs("div", { className: "forgebook-tab-columns", children: [docs.parts.length === 0 ? null : (_jsxs("div", { className: "forgebook-prop-group", children: [_jsx("h3", { className: "forgebook-prop-group__title", children:
|
|
12
|
+
return (_jsxs("div", { className: "forgebook-tab-columns", children: [docs.parts.length === 0 ? null : (_jsxs("div", { className: "forgebook-prop-group", children: [_jsx("h3", { className: "forgebook-prop-group__title", children: LATER_STRINGS.partsList }), _jsxs("p", { className: "forgebook-prop__description", children: [_jsx("code", { children: "classNames" }), ", ", _jsx("code", { children: "styles" }), ", ", _jsx("code", { children: "refs" }), ": ", docs.parts.join(", ")] }), _jsx("h3", { className: "forgebook-prop-group__title", children: LATER_STRINGS.testIds }), _jsx("p", { className: "forgebook-prop__description", children: docs.parts.map((part) => `<testId>__${part}`).join(", ") })] })), hooks.length === 0 ? null : (_jsxs("div", { className: "forgebook-prop-group", children: [_jsx("h3", { className: "forgebook-prop-group__title", children: LATER_STRINGS.styleHooks }), hooks.map((hook) => (_jsx(Code, { text: hook, names: [] }, hook)))] }))] }));
|
|
22
13
|
};
|
|
23
|
-
//# sourceMappingURL=PartsTab.js.map
|
|
@@ -7,9 +7,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
9
|
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
10
|
+
import { controlLabel } from "./controlLabel.js";
|
|
10
11
|
import { InfoTip } from "./InfoTip.js";
|
|
11
12
|
import { STRINGS } from "./strings.js";
|
|
12
|
-
import {
|
|
13
|
+
import { ToolbarControl } from "./ToolbarControl.js";
|
|
13
14
|
/** The room the menu keeps from the window's edges, in CSS px. */
|
|
14
15
|
const EDGE_PX = 8;
|
|
15
16
|
/**
|
|
@@ -90,4 +91,3 @@ export const PinnedControl = ({ control, isHidden, isChanged, layout, ...context
|
|
|
90
91
|
// the key that cycles it, in the tooltip of every part that has no tooltip of its own
|
|
91
92
|
title: shortcut === undefined ? undefined : STRINGS.cycleKey(controlLabel(control), shortcut.toUpperCase()), onContextMenu: open, children: [_jsx(ToolbarControl, { control: control, form: "bar", ...context }), control.kind === "switch" && control.switch.description !== undefined ? (_jsx(InfoTip, { note: control.switch.description, about: controlLabel(control) })) : null, isChanged ? (_jsx("span", { className: "forgebook-dot forgebook-toolbar__changed", role: "img", "aria-label": STRINGS.controlChanged(controlLabel(control)) })) : null, menuAt === undefined ? null : (_jsx(ControlMenu, { control: control, isHidden: isHidden, at: menuAt, layout: layout, onClose: close }))] }));
|
|
92
93
|
};
|
|
93
|
-
//# sourceMappingURL=PinnedControl.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A plugin's block of a docs page: what it is told.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from "react";
|
|
7
|
+
import type { PluginDocBlockContext, PluginView } from "../plugin.ts";
|
|
8
|
+
import { type StoryTree, type TreeSource } from "../storyTree.ts";
|
|
9
|
+
import type { ViewSwitch } from "../switches.ts";
|
|
10
|
+
import { type ViewState } from "../viewState.ts";
|
|
11
|
+
/** What a block needs of its page. */
|
|
12
|
+
export type PluginBlockPage = {
|
|
13
|
+
/** The tree, where a story is found. */
|
|
14
|
+
readonly tree: StoryTree;
|
|
15
|
+
/** The view. */
|
|
16
|
+
readonly view: ViewState;
|
|
17
|
+
/** The frame page's address. */
|
|
18
|
+
readonly frameUrl: string;
|
|
19
|
+
/** The catalogue's switches, for a frame's address. */
|
|
20
|
+
readonly switches: readonly ViewSwitch[];
|
|
21
|
+
/** The colour a source's stories' page has in the view. */
|
|
22
|
+
readonly backgroundOf: (source: TreeSource) => string | undefined;
|
|
23
|
+
/** The texts the catalogue replaces, by name. */
|
|
24
|
+
readonly strings: Readonly<Record<string, string>>;
|
|
25
|
+
};
|
|
26
|
+
/** The host's props. */
|
|
27
|
+
export type PluginBlockHostProps = {
|
|
28
|
+
/** Loads the module that draws the block. */
|
|
29
|
+
readonly load: () => Promise<{
|
|
30
|
+
readonly view: PluginView<PluginDocBlockContext>;
|
|
31
|
+
}>;
|
|
32
|
+
/** The plugin's id, which names its texts. */
|
|
33
|
+
readonly pluginId: string;
|
|
34
|
+
/** What the fence's line says after its name. */
|
|
35
|
+
readonly argument: string;
|
|
36
|
+
/** The text inside the fence. */
|
|
37
|
+
readonly body: string;
|
|
38
|
+
/** Its page. */
|
|
39
|
+
readonly page: PluginBlockPage;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A plugin's docs block.
|
|
43
|
+
*
|
|
44
|
+
* @param props - how it loads, and what it is told.
|
|
45
|
+
*/
|
|
46
|
+
export declare const PluginBlockHost: ({ load, pluginId, argument, body, page }: PluginBlockHostProps) => ReactNode;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* A plugin's block of a docs page: what it is told.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { useCallback, useMemo, useRef } from "react";
|
|
8
|
+
import { findStory } from "../storyTree.js";
|
|
9
|
+
import { frameAddress, isComparing, liveView } from "../viewState.js";
|
|
10
|
+
import { showAsideStory } from "./asideStory.js";
|
|
11
|
+
import { PluginViewHost, pluginText, useShellAppearance } from "./PluginViewHost.js";
|
|
12
|
+
import { STRINGS } from "./strings.js";
|
|
13
|
+
/**
|
|
14
|
+
* A plugin's docs block.
|
|
15
|
+
*
|
|
16
|
+
* @param props - how it loads, and what it is told.
|
|
17
|
+
*/
|
|
18
|
+
export const PluginBlockHost = ({ load, pluginId, argument, body, page }) => {
|
|
19
|
+
const appearance = useShellAppearance();
|
|
20
|
+
// read when the view asks: the page of that moment
|
|
21
|
+
const pageRef = useRef(page);
|
|
22
|
+
pageRef.current = page;
|
|
23
|
+
const showStory = useCallback((target, options) => {
|
|
24
|
+
const { tree, view, frameUrl, switches, backgroundOf } = pageRef.current;
|
|
25
|
+
const location = findStory(tree, options.storyId);
|
|
26
|
+
if (location === undefined)
|
|
27
|
+
throw new Error(STRINGS.unknownStory(options.storyId));
|
|
28
|
+
return showAsideStory(target, options.title, {
|
|
29
|
+
address: frameAddress(frameUrl, options.storyId, view, switches),
|
|
30
|
+
width: "fill",
|
|
31
|
+
background: backgroundOf(location.source),
|
|
32
|
+
args: {},
|
|
33
|
+
view: isComparing(view) ? undefined : liveView(view)
|
|
34
|
+
});
|
|
35
|
+
}, []);
|
|
36
|
+
const text = useMemo(() => pluginText(page.strings, pluginId), [page.strings, pluginId]);
|
|
37
|
+
const context = useMemo(() => ({ appearance, text, argument, body, showStory }), [appearance, text, argument, body, showStory]);
|
|
38
|
+
return _jsx(PluginViewHost, { load: load, context: context });
|
|
39
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A plugin's tab in the panel: what it is told. The dock draws a tab's content only while it is chosen, so a view's own
|
|
3
|
+
* state goes when another tab is chosen; a frame's report does not, since the stage keeps it.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode } from "react";
|
|
8
|
+
import type { JsonValue, PluginStory, PluginTabContext, PluginView } from "../plugin.ts";
|
|
9
|
+
import { type AsideStory } from "./asideStory.ts";
|
|
10
|
+
/** The host's props. */
|
|
11
|
+
export type PluginTabHostProps = {
|
|
12
|
+
/** Loads the module that draws the tab. */
|
|
13
|
+
readonly load: () => Promise<{
|
|
14
|
+
readonly view: PluginView<PluginTabContext>;
|
|
15
|
+
}>;
|
|
16
|
+
/** The plugin's id, which names its texts. */
|
|
17
|
+
readonly pluginId: string;
|
|
18
|
+
/** The texts the catalogue replaces, by name. */
|
|
19
|
+
readonly strings: Readonly<Record<string, string>>;
|
|
20
|
+
/** The story shown. */
|
|
21
|
+
readonly story: PluginStory;
|
|
22
|
+
/** What the plugin's frame module last reported; none before it did. */
|
|
23
|
+
readonly report: JsonValue | undefined;
|
|
24
|
+
/** How the story is drawn again for the view. */
|
|
25
|
+
readonly aside: AsideStory;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A plugin's tab.
|
|
29
|
+
*
|
|
30
|
+
* @param props - how it loads, and what it is told.
|
|
31
|
+
*/
|
|
32
|
+
export declare const PluginTabHost: ({ load, pluginId, strings, story, report, aside }: PluginTabHostProps) => ReactNode;
|