forgebook 0.1.7 → 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 +906 -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 +145 -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 -16
- 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 +24 -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 +88 -24
- 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 +128 -29
- 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 +57 -21
- package/dist/src/catalogue.js +34 -15
- package/dist/src/codeLiteral.d.ts +41 -0
- package/dist/src/codeLiteral.js +51 -0
- package/dist/src/componentDocs.d.ts +86 -1
- package/dist/src/componentDocs.js +33 -3
- package/dist/src/controlKeys.d.ts +0 -1
- package/dist/src/controlKeys.js +2 -2
- 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 +12 -4
- package/dist/src/shell/ApiReference.js +74 -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 +107 -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 +9 -0
- package/dist/src/shell/LogicMark.js +5 -0
- 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 +292 -84
- 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 +10 -2
- package/dist/src/shell/SidebarEntries.js +3 -3
- 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 +25 -0
- package/dist/src/shell/SignatureReference.js +25 -0
- package/dist/src/shell/Stage.d.ts +9 -4
- package/dist/src/shell/Stage.js +121 -60
- 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 +9 -3
- package/dist/src/shell/Toolbar.js +12 -7
- 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 +3 -3
- package/dist/src/shell/compareVariants.js +6 -5
- 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 +15 -4
- package/dist/src/shell/dockTabs.js +69 -26
- 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 +4 -1
- package/dist/src/shell/icons.js +4 -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 +24 -0
- package/dist/src/shell/logicView.js +39 -0
- 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 +310 -136
- 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 +62 -80
- package/dist/src/shell/strings.js +60 -79
- 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 +35 -0
- package/dist/src/shell/useShownView.js +36 -0
- 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 +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 +88 -25
- package/dist/src/storyTree.js +219 -126
- 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 +281 -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 +131 -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 +330 -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 +24 -0
- package/dist/src/vite/heightsRoute.js +42 -0
- 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 +20 -19
- package/dist/src/vite/indexStoryFile.js +172 -201
- 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 +66 -3
- 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/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/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/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/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/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
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { frameAddress, schemeOf } from "../viewState.js";
|
|
3
|
+
import { useCatalogue } from "./catalogueContext.js";
|
|
4
|
+
import { compareVariants } from "./compareVariants.js";
|
|
5
|
+
import { DeviceSlot, deviceAddress, inkScheme } from "./DeviceSlot.js";
|
|
6
|
+
import { FrameView } from "./FrameView.js";
|
|
7
|
+
import { useSystemDark } from "./useSystemDark.js";
|
|
8
|
+
/**
|
|
9
|
+
* The compare view's cells.
|
|
10
|
+
*
|
|
11
|
+
* @param props - the story, the view, the device and the frames' reports.
|
|
12
|
+
*/
|
|
13
|
+
export const CompareGrid = ({ story, title, view, frameUrl, framed, heights, settled, fallbackHeight, backgroundOf }) => {
|
|
14
|
+
const catalogue = useCatalogue();
|
|
15
|
+
const { switches } = catalogue;
|
|
16
|
+
const isSystemDark = useSystemDark();
|
|
17
|
+
return (_jsx("div", { className: "forgebook-compare", ...framed?.parts.compareGridProps(framed.drawing), children: compareVariants(view.compare, catalogue).map((variant) => {
|
|
18
|
+
const cellView = variant.viewOf(view);
|
|
19
|
+
// the label (the shell's text) reads on the page's colour, or on the shell's around a device, whose screen
|
|
20
|
+
// has it; the frame draws the backdrop
|
|
21
|
+
const background = backgroundOf({ ...cellView, backdrop: "plain" });
|
|
22
|
+
return (_jsxs("figure", { className: "forgebook-compare__cell", style: { backgroundColor: framed === undefined ? background : undefined }, children: [_jsx("figcaption", { className: "forgebook-compare__label", children: variant.label }), _jsx(DeviceSlot, { framed: framed, scheme: inkScheme(schemeOf(cellView, switches), isSystemDark), background: background, children: _jsx(FrameView, { title: `${title} · ${variant.label}`, address: deviceAddress(frameAddress(frameUrl, story.id, cellView, switches), framed), heights: heights, settled: settled, fallbackHeight: fallbackHeight, sceneHeight: story.height, fixedHeight: framed?.area.height }) })] }, variant.label));
|
|
23
|
+
}) }));
|
|
24
|
+
};
|
|
@@ -4,23 +4,30 @@
|
|
|
4
4
|
* example.
|
|
5
5
|
*
|
|
6
6
|
* @remarks
|
|
7
|
-
* The
|
|
8
|
-
*
|
|
7
|
+
* The frames load a few at a time (`useFrameQueue`), in the page's order, the demo first, each as it comes near the
|
|
8
|
+
* visible part of the page: a component may have twenty stories. The view's live part reaches every frame as a message, as
|
|
9
9
|
* on the story page; the props panel and Replay belong to a story's own page, which each story's name links to. The
|
|
10
|
-
* documentation file's HTML is the package's own, made at build time (`vite/componentPage.ts`).
|
|
10
|
+
* documentation file's HTML is the package's own, made at build time (`vite/componentPage.ts`). Who reads the page
|
|
11
|
+
* reorders and filters what goes around the frames (`audienceLayout.ts`); what only one audience wants loads on first use,
|
|
12
|
+
* its data alongside the sections' code rather than after it.
|
|
11
13
|
*
|
|
12
14
|
* @module
|
|
13
15
|
*/
|
|
14
16
|
import { type ReactNode } from "react";
|
|
15
|
-
import { type
|
|
17
|
+
import { type ComponentDocs } from "../componentDocs.ts";
|
|
18
|
+
import { type StoryTree, type TreeComponent, type TreeStory } from "../storyTree.ts";
|
|
16
19
|
import { type ViewState } from "../viewState.ts";
|
|
17
|
-
import {
|
|
20
|
+
import type { TouchOverrides } from "./storyTouch.ts";
|
|
18
21
|
import { type UsedInProps } from "./UsedIn.tsx";
|
|
22
|
+
import type { Loaded } from "./useLoaded.ts";
|
|
23
|
+
import { type PageDoc } from "./usePageDoc.ts";
|
|
19
24
|
import { type PageScroll } from "./useScrollMemory.ts";
|
|
20
25
|
/** The component page's props. */
|
|
21
26
|
export type ComponentPageProps = {
|
|
22
27
|
/** The component. */
|
|
23
28
|
readonly component: TreeComponent;
|
|
29
|
+
/** The heading or the prop the address names; none when it names none. */
|
|
30
|
+
readonly anchor: string | undefined;
|
|
24
31
|
/** The view. */
|
|
25
32
|
readonly view: ViewState;
|
|
26
33
|
/** What the user chose for each story marked for a phone. */
|
|
@@ -49,11 +56,42 @@ export type ComponentPageProps = {
|
|
|
49
56
|
readonly scroll: PageScroll;
|
|
50
57
|
/** What "Used in" reads and opens; none when the catalogue turned it off. */
|
|
51
58
|
readonly usedIn?: Omit<UsedInProps, "title"> | undefined;
|
|
59
|
+
/** Called with the changed view: the page's note goes back to the whole page. */
|
|
60
|
+
readonly onViewChange: (view: ViewState) => void;
|
|
61
|
+
/** The tree, where a designer's page finds the docs pages that show the component. */
|
|
62
|
+
readonly tree: StoryTree;
|
|
63
|
+
/** The component's id in the tree. */
|
|
64
|
+
readonly componentId: string;
|
|
65
|
+
/** The address of a docs page. */
|
|
66
|
+
readonly pageHrefOf: (id: string) => string;
|
|
67
|
+
/** Opens a docs page. */
|
|
68
|
+
readonly onOpenPage: (id: string) => void;
|
|
69
|
+
/** Loads the catalogue's design tokens, for a designer; `undefined` when it has none. */
|
|
70
|
+
readonly loadTokens: (() => Promise<unknown>) | undefined;
|
|
52
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* The page's lead: what the component is and does, from its file's `@module` comment (its own TSDoc is often a bare
|
|
74
|
+
* name), read with the documentation file so it comes with the page; else its TSDoc summary, once the docs come.
|
|
75
|
+
*
|
|
76
|
+
* @param props - the loaded page and the component's docs.
|
|
77
|
+
*/
|
|
78
|
+
export declare const Lead: ({ page, docs }: {
|
|
79
|
+
readonly page: Loaded<PageDoc>;
|
|
80
|
+
readonly docs: ComponentDocs | undefined;
|
|
81
|
+
}) => ReactNode;
|
|
82
|
+
/**
|
|
83
|
+
* The API reference; nothing without props, or a signature for what is about logic.
|
|
84
|
+
*
|
|
85
|
+
* @param props - the component's docs, whether it is about logic, and the prop groups its meta lists first.
|
|
86
|
+
*/
|
|
87
|
+
export declare const PageApi: ({ docs, isLogic, componentGroups }: {
|
|
88
|
+
readonly docs: ComponentDocs | undefined;
|
|
89
|
+
readonly isLogic: boolean;
|
|
90
|
+
readonly componentGroups: readonly string[];
|
|
91
|
+
}) => ReactNode;
|
|
53
92
|
/**
|
|
54
93
|
* A component's page.
|
|
55
94
|
*
|
|
56
95
|
* @param props - the component, the view, its loaders and how to open a story.
|
|
57
96
|
*/
|
|
58
|
-
export declare const ComponentPage: ({ component, view, touchOverrides, onTouchChange, frameUrl, hrefOf, onOpen, loadDocs, loadCode, loadPage, heightOf, background, header, scroll, usedIn }: ComponentPageProps) => ReactNode;
|
|
59
|
-
//# sourceMappingURL=ComponentPage.d.ts.map
|
|
97
|
+
export declare const ComponentPage: ({ component, anchor, view, touchOverrides, onTouchChange, frameUrl, hrefOf, onOpen, loadDocs, loadCode, loadPage, heightOf, background, header, scroll, usedIn, onViewChange, tree, componentId, pageHrefOf, onOpenPage, loadTokens }: ComponentPageProps) => ReactNode;
|
|
@@ -5,39 +5,69 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
* example.
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* The
|
|
9
|
-
*
|
|
8
|
+
* The frames load a few at a time (`useFrameQueue`), in the page's order, the demo first, each as it comes near the
|
|
9
|
+
* visible part of the page: a component may have twenty stories. The view's live part reaches every frame as a message, as
|
|
10
10
|
* on the story page; the props panel and Replay belong to a story's own page, which each story's name links to. The
|
|
11
|
-
* documentation file's HTML is the package's own, made at build time (`vite/componentPage.ts`).
|
|
11
|
+
* documentation file's HTML is the package's own, made at build time (`vite/componentPage.ts`). Who reads the page
|
|
12
|
+
* reorders and filters what goes around the frames (`audienceLayout.ts`); what only one audience wants loads on first use,
|
|
13
|
+
* its data alongside the sections' code rather than after it.
|
|
12
14
|
*
|
|
13
15
|
* @module
|
|
14
16
|
*/
|
|
15
|
-
import { useMemo, useRef
|
|
17
|
+
import { lazy, Suspense, useEffect, useMemo, useRef } from "react";
|
|
16
18
|
import { groupLabel } from "../catalogue.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
+
import { codeNameOf } from "../componentDocs.js";
|
|
20
|
+
import { groupedStories, isLogicComponent, mainStory } from "../storyTree.js";
|
|
21
|
+
import { usageLoader } from "../usedIn.js";
|
|
22
|
+
import { viewParams } from "../viewState.js";
|
|
19
23
|
import { ApiReference } from "./ApiReference.js";
|
|
24
|
+
import { showsSection } from "./audienceLayout.js";
|
|
20
25
|
import { CodeText } from "./CodeText.js";
|
|
21
26
|
import { useCatalogue } from "./catalogueContext.js";
|
|
22
27
|
import { Example } from "./Example.js";
|
|
28
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
29
|
+
import { LazyView, lazyModule } from "./lazyModule.js";
|
|
23
30
|
import { PackageHtml } from "./PackageHtml.js";
|
|
24
|
-
import { storyTouchesOf, touchedView } from "./storyTouch.js";
|
|
25
|
-
import { STRINGS } from "./strings.js";
|
|
26
31
|
import { UsedIn } from "./UsedIn.js";
|
|
27
32
|
import { useComponentDocs } from "./useComponentDocs.js";
|
|
28
|
-
import { useFrameMessages } from "./useFrameMessages.js";
|
|
29
|
-
import { useFrameQueue } from "./useFrameQueue.js";
|
|
30
|
-
import { useLiveView, useLoadedView } from "./useLiveView.js";
|
|
31
33
|
import { usePageDoc } from "./usePageDoc.js";
|
|
34
|
+
import { usePageFrames } from "./usePageFrames.js";
|
|
32
35
|
import { useScrollMemory } from "./useScrollMemory.js";
|
|
33
36
|
import { useStoryCode } from "./useStoryCode.js";
|
|
37
|
+
/** What opens the page at an anchor, loaded with the first one: most pages open at their top. */
|
|
38
|
+
const AnchorScroll = lazy(() => import("./AnchorScroll.js").then((module) => ({ default: module.AnchorScroll }),
|
|
39
|
+
// a chunk gone after a new deployment costs the place on the page, never the page
|
|
40
|
+
() => ({ default: () => null })));
|
|
41
|
+
/** What a page drawn for one audience adds around its frames, loaded the first time a page is drawn for one. */
|
|
42
|
+
const AUDIENCE_SECTIONS = lazyModule(() => import("./AudienceSections.js").then((module) => module.AudienceSections));
|
|
43
|
+
/**
|
|
44
|
+
* Starts loading what an audience's sections read (the design tokens, "Used in") as soon as the page is drawn for it.
|
|
45
|
+
* Asked by the sections themselves, these loads would wait for the sections' chunk and its styles first: seconds on a
|
|
46
|
+
* dev server's first visit, before a request that may itself take seconds. The loaders keep their answer, so the
|
|
47
|
+
* sections read it at once when they come.
|
|
48
|
+
*
|
|
49
|
+
* @param audience - who the page is drawn for.
|
|
50
|
+
* @param loadTokens - the catalogue's tokens loader; `undefined` when it has none.
|
|
51
|
+
* @param loadUsage - "Used in"'s loader; `undefined` when the catalogue turned it off.
|
|
52
|
+
*/
|
|
53
|
+
const useAudienceLoads = (audience, loadTokens, loadUsage) => {
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
const loads = [
|
|
56
|
+
showsSection(audience, "tokens") ? loadTokens?.() : undefined,
|
|
57
|
+
showsSection(audience, "usedIn") ? loadUsage?.() : undefined
|
|
58
|
+
];
|
|
59
|
+
// a failed load is its section's to report, when it asks the same loader
|
|
60
|
+
for (const load of loads)
|
|
61
|
+
void load?.catch(() => undefined);
|
|
62
|
+
}, [audience, loadTokens, loadUsage]);
|
|
63
|
+
};
|
|
34
64
|
/**
|
|
35
65
|
* The page's lead: what the component is and does, from its file's `@module` comment (its own TSDoc is often a bare
|
|
36
66
|
* name), read with the documentation file so it comes with the page; else its TSDoc summary, once the docs come.
|
|
37
67
|
*
|
|
38
68
|
* @param props - the loaded page and the component's docs.
|
|
39
69
|
*/
|
|
40
|
-
const Lead = ({ page, docs }) => {
|
|
70
|
+
export const Lead = ({ page, docs }) => {
|
|
41
71
|
const summary = page.status === "ready" ? page.value.summary : "";
|
|
42
72
|
const lead = summary || docs?.summary || docs?.description || "";
|
|
43
73
|
return lead === "" ? null : (_jsx("p", { className: "forgebook-doc__lead", children: _jsx(CodeText, { text: lead }) }));
|
|
@@ -49,71 +79,99 @@ const Lead = ({ page, docs }) => {
|
|
|
49
79
|
*/
|
|
50
80
|
const Prose = ({ page }) => {
|
|
51
81
|
if (page.status === "error") {
|
|
52
|
-
return (_jsxs("p", { className: "forgebook-problems", role: "alert", children: [
|
|
82
|
+
return (_jsxs("p", { className: "forgebook-problems", role: "alert", children: [LATER_STRINGS.pageError, ": ", page.message] }));
|
|
53
83
|
}
|
|
54
84
|
if (page.status !== "ready" || page.value.html === "")
|
|
55
85
|
return null;
|
|
56
86
|
return _jsx(PackageHtml, { className: "forgebook-prose", html: page.value.html });
|
|
57
87
|
};
|
|
88
|
+
/**
|
|
89
|
+
* One place around the frames: the page's own sections, or an audience's in their place. Always one element, so the
|
|
90
|
+
* frames after it keep their place and never load again.
|
|
91
|
+
*
|
|
92
|
+
* @param props - the place, the audience's props (none for everyone) and the page's own sections.
|
|
93
|
+
*/
|
|
94
|
+
const AudienceSlot = ({ place, audience, children }) => audience === undefined ? (children) : (_jsx(LazyView, { module: AUDIENCE_SECTIONS, props: { place, ...audience }, loading: null, failed: (message) => (_jsxs("p", { className: "forgebook-problems", role: "alert", children: [LATER_STRINGS.audienceError, ": ", message] })) }));
|
|
95
|
+
/**
|
|
96
|
+
* The API reference; nothing without props, or a signature for what is about logic.
|
|
97
|
+
*
|
|
98
|
+
* @param props - the component's docs, whether it is about logic, and the prop groups its meta lists first.
|
|
99
|
+
*/
|
|
100
|
+
export const PageApi = ({ docs, isLogic, componentGroups }) => docs === undefined || (docs.props.length === 0 && !(isLogic && docs.signature !== undefined)) ? null : (_jsx(ApiReference, { docs: docs, isLogic: isLogic, componentGroups: componentGroups }));
|
|
58
101
|
/**
|
|
59
102
|
* A component's page.
|
|
60
103
|
*
|
|
61
104
|
* @param props - the component, the view, its loaders and how to open a story.
|
|
62
105
|
*/
|
|
63
|
-
export const ComponentPage = ({ component, view, touchOverrides, onTouchChange, frameUrl, hrefOf, onOpen, loadDocs, loadCode, loadPage, heightOf, background, header, scroll, usedIn }) => {
|
|
106
|
+
export const ComponentPage = ({ component, anchor, view, touchOverrides, onTouchChange, frameUrl, hrefOf, onOpen, loadDocs, loadCode, loadPage, heightOf, background, header, scroll, usedIn, onViewChange, tree, componentId, pageHrefOf, onOpenPage, loadTokens }) => {
|
|
64
107
|
const pageRef = useRef(null);
|
|
65
108
|
const docs = useComponentDocs(loadDocs);
|
|
66
109
|
const code = useStoryCode(loadCode);
|
|
67
110
|
const page = usePageDoc(loadPage);
|
|
68
|
-
// each story's own args, as its frame reports them: the code of a story drawn from its args is written from them
|
|
69
|
-
const [storyArgs, setStoryArgs] = useState(new Map());
|
|
70
111
|
const demo = mainStory(component);
|
|
71
112
|
const examples = useMemo(() => component.stories.filter((story) => story.id !== demo?.id), [component, demo]);
|
|
72
|
-
// the frames keep the view they loaded with; only the style sheets load them again, the rest of the view (the
|
|
73
|
-
// switches, the language among them) is sent to them live
|
|
74
|
-
const frameView = useLoadedView(view.sheets, view);
|
|
75
113
|
const catalogue = useCatalogue();
|
|
76
|
-
|
|
77
|
-
//
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const send = (shellMessage) => frame.postMessage(shellMessage, window.location.origin);
|
|
86
|
-
send({
|
|
87
|
-
type: "forgebook:view",
|
|
88
|
-
view: touchedView(liveView(view), message.storyId, touches, catalogue.touch)
|
|
89
|
-
});
|
|
90
|
-
send({ type: "forgebook:tools", tools: view.tools });
|
|
91
|
-
},
|
|
92
|
-
onCall: () => undefined,
|
|
93
|
-
// a frame that failed is over too: its place in the queue goes to the next one
|
|
94
|
-
onFailed: queue.markReady
|
|
114
|
+
// the demo first in the queue, at the top of the page, and counted in it: a frame of a library served as source asks
|
|
115
|
+
// for thousands of modules, and one more beside those the queue allows makes the browser refuse some of them
|
|
116
|
+
const queued = useMemo(() => [...(demo === undefined ? [] : [demo.id]), ...examples.map((story) => story.id)], [demo, examples]);
|
|
117
|
+
const { queue, ...frames } = usePageFrames({
|
|
118
|
+
stories: component.stories,
|
|
119
|
+
queued,
|
|
120
|
+
pageRef,
|
|
121
|
+
view,
|
|
122
|
+
touchOverrides
|
|
95
123
|
});
|
|
96
|
-
useLiveView(pageRef, view, true, { touches, choice: catalogue.touch });
|
|
97
124
|
useScrollMemory(pageRef, scroll);
|
|
125
|
+
useAudienceLoads(view.audience, loadTokens, usedIn === undefined ? undefined : usageLoader(usedIn.source));
|
|
98
126
|
const componentDocs = docs.status === "ready" ? docs.value : undefined;
|
|
127
|
+
const isLogic = isLogicComponent(component);
|
|
128
|
+
const reading = {
|
|
129
|
+
hasCode: view.audience !== "designer",
|
|
130
|
+
isCodeOpen: view.audience === "coder",
|
|
131
|
+
isDemoLarge: view.audience === "designer"
|
|
132
|
+
};
|
|
99
133
|
const context = {
|
|
134
|
+
...frames,
|
|
100
135
|
component,
|
|
101
136
|
view,
|
|
102
137
|
frameUrl,
|
|
103
138
|
hrefOf,
|
|
104
139
|
onOpen,
|
|
105
|
-
|
|
106
|
-
switches,
|
|
107
|
-
touches,
|
|
140
|
+
switches: catalogue.switches,
|
|
108
141
|
onTouchChange,
|
|
109
|
-
heights,
|
|
110
|
-
settled,
|
|
111
142
|
code,
|
|
112
|
-
componentName: componentDocs
|
|
113
|
-
argsOf: (storyId) => storyArgs.get(storyId) ?? {},
|
|
143
|
+
componentName: componentDocs === undefined ? component.name : codeNameOf(componentDocs),
|
|
114
144
|
heightOf,
|
|
115
|
-
background
|
|
145
|
+
background,
|
|
146
|
+
reading
|
|
116
147
|
};
|
|
117
|
-
|
|
148
|
+
const audienceProps = view.audience === "everyone"
|
|
149
|
+
? undefined
|
|
150
|
+
: {
|
|
151
|
+
audience: view.audience,
|
|
152
|
+
hasNote: catalogue.ownControls.includes("audience"),
|
|
153
|
+
onShowAll: () => onViewChange({ ...view, audience: "everyone" }),
|
|
154
|
+
component,
|
|
155
|
+
docs: componentDocs,
|
|
156
|
+
isLogic,
|
|
157
|
+
page,
|
|
158
|
+
tree,
|
|
159
|
+
componentId,
|
|
160
|
+
pageHrefOf,
|
|
161
|
+
onOpenPage,
|
|
162
|
+
loadTokens,
|
|
163
|
+
coverage: {
|
|
164
|
+
viewKey: viewParams(view, catalogue.switches, catalogue.audience).toString(),
|
|
165
|
+
stories: component.stories,
|
|
166
|
+
storyGroups: catalogue.storyGroups,
|
|
167
|
+
queue,
|
|
168
|
+
pageRef,
|
|
169
|
+
settled: frames.settled,
|
|
170
|
+
hrefOf,
|
|
171
|
+
onOpen
|
|
172
|
+
},
|
|
173
|
+
usedIn,
|
|
174
|
+
pageRef
|
|
175
|
+
};
|
|
176
|
+
return (_jsxs("div", { className: "forgebook-workspace", children: [header, anchor === undefined ? null : (_jsx(Suspense, { fallback: null, children: _jsx(AnchorScroll, { pageRef: pageRef, anchor: anchor, visit: scroll.visit, isReady: docs.status !== "loading" && page.status !== "loading" }) })), _jsx("div", { ref: pageRef, className: "forgebook-scroll", children: _jsxs("div", { className: "forgebook-doc", "data-audience": view.audience === "everyone" ? undefined : view.audience, children: [_jsx(AudienceSlot, { place: "beforeDemo", audience: audienceProps, children: _jsx(Lead, { page: page, docs: componentDocs }) }), demo === undefined ? null : (_jsx(Example, { ...context, story: demo, isDemo: true, isMounted: queue.mounted.has(demo.id), observe: queue.observerOf(demo.id) })), _jsxs(AudienceSlot, { place: "afterDemo", audience: audienceProps, children: [_jsx(Prose, { page: page }), _jsx(PageApi, { docs: componentDocs, isLogic: isLogic, componentGroups: component.propGroups })] }), examples.length === 0 ? null : (_jsxs("section", { className: "forgebook-doc__section", "aria-labelledby": "forgebook-examples", children: [_jsx("h2", { id: "forgebook-examples", children: LATER_STRINGS.examples }), groupedStories(examples, catalogue.storyGroups.map((group) => group.id)).map((section) => (_jsxs("section", { className: "forgebook-doc__group", children: [section.group === undefined ? null : (_jsx("h3", { className: "forgebook-doc__group-name", children: groupLabel(catalogue.storyGroups, section.group) })), section.stories.map((story) => (_jsx(Example, { ...context, story: story, isDemo: false, isMounted: queue.mounted.has(story.id), observe: queue.observerOf(story.id) }, story.id)))] }, section.group ?? "")))] })), _jsx(AudienceSlot, { place: "afterExamples", audience: audienceProps, children: usedIn === undefined ? null : _jsx(UsedIn, { title: component.title, ...usedIn }) })] }, `${component.file}|${component.title}`) })] }));
|
|
118
177
|
};
|
|
119
|
-
//# sourceMappingURL=ComponentPage.js.map
|
|
@@ -18,4 +18,3 @@ export declare const ControlKeyField: ({ label, shortcut, onKeyChange }: {
|
|
|
18
18
|
/** Gives it another key (`null` takes it away); answers why a key cannot be given. */
|
|
19
19
|
readonly onKeyChange: (key: string | null) => string | undefined;
|
|
20
20
|
}) => ReactNode;
|
|
21
|
-
//# sourceMappingURL=ControlKeyField.d.ts.map
|
|
@@ -7,7 +7,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
*/
|
|
8
8
|
import { useState } from "react";
|
|
9
9
|
import { keyOf } from "../controlKeys.js";
|
|
10
|
-
import {
|
|
10
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
11
11
|
/** The keys that take a control's key away while one is recorded. */
|
|
12
12
|
const REMOVE_KEYS = ["Backspace", "Delete"];
|
|
13
13
|
/**
|
|
@@ -38,9 +38,8 @@ export const ControlKeyField = ({ label, shortcut, onKeyChange }) => {
|
|
|
38
38
|
if (refused === undefined)
|
|
39
39
|
setIsRecording(false);
|
|
40
40
|
};
|
|
41
|
-
return (_jsxs("span", { className: "forgebook-key-field", children: [_jsx("button", { type: "button", className: "forgebook-key-field__button", "aria-label":
|
|
41
|
+
return (_jsxs("span", { className: "forgebook-key-field", children: [_jsx("button", { type: "button", className: "forgebook-key-field__button", "aria-label": LATER_STRINGS.controlKey(label, shortcut), "aria-pressed": isRecording, title: isRecording ? LATER_STRINGS.pressAKey : LATER_STRINGS.changeKey, onClick: () => {
|
|
42
42
|
setProblem(undefined);
|
|
43
43
|
setIsRecording(!isRecording);
|
|
44
|
-
}, onBlur: () => setIsRecording(false), onKeyDown: record, children: isRecording ?
|
|
44
|
+
}, onBlur: () => setIsRecording(false), onKeyDown: record, children: isRecording ? LATER_STRINGS.pressAKey : _jsx("kbd", { children: shortcut?.toUpperCase() ?? "–" }) }), _jsx("span", { className: "forgebook-key-field__problem", role: "status", children: problem ?? "" })] }));
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=ControlKeyField.js.map
|
|
@@ -6,15 +6,14 @@
|
|
|
6
6
|
* @module
|
|
7
7
|
*/
|
|
8
8
|
import type { PointerEvent, ReactNode } from "react";
|
|
9
|
-
import type { PlacedControl } from "../toolbarLayout.ts";
|
|
10
|
-
import { type ControlContext } from "./ToolbarControl.tsx";
|
|
9
|
+
import type { ToolbarControl as Control, PlacedControl } from "../toolbarLayout.ts";
|
|
11
10
|
import type { ToolbarLayout } from "./useToolbarLayout.ts";
|
|
12
11
|
/**
|
|
13
12
|
* One control's row: its handle, its name, its value, its key, its pin and its hide button.
|
|
14
13
|
*
|
|
15
14
|
* @param props - the placed control, its position, what moving and placing it do, and what every control shares.
|
|
16
15
|
*/
|
|
17
|
-
export declare const ControlRow: ({ each, index, count, isDragged, isMoved, isChanged, layout, hintId, onGrab, onAnnounce,
|
|
16
|
+
export declare const ControlRow: ({ each, index, count, isDragged, isMoved, isChanged, layout, hintId, onGrab, onAnnounce, drawControl }: {
|
|
18
17
|
readonly each: PlacedControl;
|
|
19
18
|
readonly index: number;
|
|
20
19
|
readonly count: number;
|
|
@@ -27,5 +26,6 @@ export declare const ControlRow: ({ each, index, count, isDragged, isMoved, isCh
|
|
|
27
26
|
readonly hintId: string;
|
|
28
27
|
readonly onGrab: (event: PointerEvent<HTMLButtonElement>, id: string) => void;
|
|
29
28
|
readonly onAnnounce: (text: string) => void;
|
|
29
|
+
/** Draws a control in a row's form, as the toolbar draws it, with the view it reads and sets. */
|
|
30
|
+
readonly drawControl: (control: Control) => ReactNode;
|
|
30
31
|
}) => ReactNode;
|
|
31
|
-
//# sourceMappingURL=ControlRow.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ControlKeyField } from "./ControlKeyField.js";
|
|
3
|
+
import { controlLabel } from "./controlLabel.js";
|
|
3
4
|
import { InfoTip } from "./InfoTip.js";
|
|
4
5
|
import { Icon } from "./icons.js";
|
|
6
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
5
7
|
import { STRINGS } from "./strings.js";
|
|
6
|
-
import { controlLabel, ToolbarControl } from "./ToolbarControl.js";
|
|
7
8
|
/** The arrow keys that move a row, and by how much. */
|
|
8
9
|
const ARROW_STEPS = { ArrowUp: -1, ArrowDown: 1 };
|
|
9
10
|
/**
|
|
@@ -11,7 +12,7 @@ const ARROW_STEPS = { ArrowUp: -1, ArrowDown: 1 };
|
|
|
11
12
|
*
|
|
12
13
|
* @param props - the placed control, its position, what moving and placing it do, and what every control shares.
|
|
13
14
|
*/
|
|
14
|
-
export const ControlRow = ({ each, index, count, isDragged, isMoved, isChanged, layout, hintId, onGrab, onAnnounce,
|
|
15
|
+
export const ControlRow = ({ each, index, count, isDragged, isMoved, isChanged, layout, hintId, onGrab, onAnnounce, drawControl }) => {
|
|
15
16
|
const { control, isPinned } = each;
|
|
16
17
|
const label = controlLabel(control);
|
|
17
18
|
const step = (event) => {
|
|
@@ -21,10 +22,9 @@ export const ControlRow = ({ each, index, count, isDragged, isMoved, isChanged,
|
|
|
21
22
|
return;
|
|
22
23
|
event.preventDefault();
|
|
23
24
|
layout.move(control.id, target);
|
|
24
|
-
onAnnounce(
|
|
25
|
+
onAnnounce(LATER_STRINGS.controlMoved(label, target + 1, count));
|
|
25
26
|
};
|
|
26
27
|
// a switch's note (the touch simulation's limits): an info button beside its value
|
|
27
28
|
const description = control.kind === "switch" ? control.switch.description : undefined;
|
|
28
|
-
return (_jsxs("li", { className: "forgebook-arrange", "data-control": control.id, "data-pinned": isPinned ? "" : undefined, "data-dragged": isDragged ? "" : undefined, "data-moved": isMoved ? "" : undefined, children: [_jsx("button", { type: "button", className: "forgebook-arrange__handle", "aria-label":
|
|
29
|
+
return (_jsxs("li", { className: "forgebook-arrange", "data-control": control.id, "data-pinned": isPinned ? "" : undefined, "data-dragged": isDragged ? "" : undefined, "data-moved": isMoved ? "" : undefined, children: [_jsx("button", { type: "button", className: "forgebook-arrange__handle", "aria-label": LATER_STRINGS.moveControl(label), "aria-describedby": hintId, onPointerDown: (event) => onGrab(event, control.id), onKeyDown: step, children: _jsx(Icon, { name: "grip", size: 14 }) }), _jsxs("span", { className: "forgebook-popover__label", children: [label, isChanged ? (_jsx("span", { className: "forgebook-dot", role: "img", "aria-label": STRINGS.controlChanged(label) })) : null] }), _jsxs("div", { className: "forgebook-arrange__control", children: [drawControl(control), description === undefined ? null : _jsx(InfoTip, { note: description, about: label })] }), _jsx(ControlKeyField, { label: label, shortcut: layout.keys[control.id], onKeyChange: (key) => layout.setKey(control.id, key) }), _jsx("button", { type: "button", className: "forgebook-icon-button", "aria-label": LATER_STRINGS.pinControl(label), title: isMoved ? LATER_STRINGS.pinnedNoRoom : LATER_STRINGS.pinControl(label), "aria-pressed": isPinned, onClick: () => layout.pin(control.id, !isPinned), children: _jsx(Icon, { name: "pin", size: 14 }) }), _jsx("button", { type: "button", className: "forgebook-icon-button", "aria-label": LATER_STRINGS.hideControl(label), title: LATER_STRINGS.hideControl(label), onClick: () => layout.hide(control.id, true), children: _jsx(Icon, { name: "eyeOff", size: 14 }) })] }));
|
|
29
30
|
};
|
|
30
|
-
//# sourceMappingURL=ControlRow.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The device control of the toolbar and the View menu: a list that says what the story is shown in ("No frame", "iPhone
|
|
3
|
+
* 16"…), turns the frame off and picks the model, and, while a device is shown, the button that turns it.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* A native list, for the platform's keys and screen reader, its models grouped by kind. The address keeps only what
|
|
7
|
+
* differs from the page's default (`deviceView.ts`, `deviceMenuView.ts`). The device's drawing is not here: it loads
|
|
8
|
+
* with the device's parts the first time a story is framed (`DeviceSlot.tsx`).
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import type { ReactNode } from "react";
|
|
13
|
+
import { type DeviceDefault } from "../deviceView.ts";
|
|
14
|
+
import type { ViewState } from "../viewState.ts";
|
|
15
|
+
/** The device control's props. */
|
|
16
|
+
export type DeviceControlProps = {
|
|
17
|
+
/** Where it is drawn: on the toolbar, with its icon, or in a row of the View menu, whose row names it. */
|
|
18
|
+
readonly form: "bar" | "row";
|
|
19
|
+
/** The view shown. */
|
|
20
|
+
readonly view: ViewState;
|
|
21
|
+
/** Called with the changed view. */
|
|
22
|
+
readonly onViewChange: (view: ViewState) => void;
|
|
23
|
+
/** The page's default device: the shown story's, a component's stories', or the catalogue's. */
|
|
24
|
+
readonly defaults: DeviceDefault;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* The device control.
|
|
28
|
+
*
|
|
29
|
+
* @param props - its form, the view, its setter and the page's default device.
|
|
30
|
+
*/
|
|
31
|
+
export declare const DeviceControl: ({ form, view, onViewChange, defaults }: DeviceControlProps) => ReactNode;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { withModel, withTurn } from "../deviceMenuView.js";
|
|
3
|
+
import { DEVICE_ENTRIES, isDeviceId, shownDevice, withFrame } from "../deviceView.js";
|
|
4
|
+
import { Icon } from "./icons.js";
|
|
5
|
+
import { STRINGS } from "./strings.js";
|
|
6
|
+
/** The value of the list's first choice: no device. */
|
|
7
|
+
const NO_FRAME = "off";
|
|
8
|
+
/** The list's groups, in its order. */
|
|
9
|
+
const KIND_GROUPS = [
|
|
10
|
+
{ kind: "phone", label: () => STRINGS.devicePhones },
|
|
11
|
+
{ kind: "tablet", label: () => STRINGS.deviceTablets }
|
|
12
|
+
];
|
|
13
|
+
/**
|
|
14
|
+
* A model's name in the list: the generic phone's is the shell's text, so a catalogue can translate it.
|
|
15
|
+
*
|
|
16
|
+
* @param entry - the model.
|
|
17
|
+
*/
|
|
18
|
+
const entryName = (entry) => (entry.id === "phone" ? STRINGS.deviceGeneric : entry.name);
|
|
19
|
+
/**
|
|
20
|
+
* The device control.
|
|
21
|
+
*
|
|
22
|
+
* @param props - its form, the view, its setter and the page's default device.
|
|
23
|
+
*/
|
|
24
|
+
export const DeviceControl = ({ form, view, onViewChange, defaults }) => {
|
|
25
|
+
const shown = shownDevice(view, defaults);
|
|
26
|
+
const choose = (value) => {
|
|
27
|
+
if (value === NO_FRAME)
|
|
28
|
+
onViewChange(withFrame(view, defaults, false));
|
|
29
|
+
else if (isDeviceId(value))
|
|
30
|
+
onViewChange(withModel(view, defaults, value));
|
|
31
|
+
};
|
|
32
|
+
return (_jsxs("div", { className: "forgebook-toolbar__control forgebook-device-control", children: [form === "bar" ? (_jsx("span", { className: "forgebook-toolbar__icon", title: STRINGS.device, children: _jsx(Icon, { name: "device", size: 14 }) })) : null, _jsxs("select", { className: "forgebook-select", "aria-label": STRINGS.device, value: shown?.model ?? NO_FRAME, onChange: (event) => choose(event.currentTarget.value), children: [_jsx("option", { value: NO_FRAME, children: STRINGS.deviceNone }), KIND_GROUPS.map((group) => (_jsx("optgroup", { label: group.label(), children: DEVICE_ENTRIES.filter((entry) => entry.kind === group.kind).map((entry) => (_jsx("option", { value: entry.id, children: entryName(entry) }, entry.id))) }, group.kind)))] }), shown === undefined ? null : (_jsx("button", { type: "button", className: "forgebook-button forgebook-button--icon", title: STRINGS.deviceTurn, "aria-label": STRINGS.deviceTurn, "aria-pressed": shown.orientation === "landscape", onClick: () => onViewChange(withTurn(view, defaults, shown)), children: _jsx(Icon, { name: "turn", size: 14 }) }))] }));
|
|
33
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The place of a story's frame that a device can be drawn around: always there, so turning the device on or off adds
|
|
3
|
+
* the drawing beside the frame and never mounts the frame again (the story keeps its state), and the loader of the
|
|
4
|
+
* device's parts, which only a framed story fetches.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The models' sizes, their drawings, the device menu and their styles are one chunk (`device/deviceParts.tsx`),
|
|
8
|
+
* imported the first time a story is shown in a device: a catalogue that never shows one never loads it, so the
|
|
9
|
+
* shell's first load does not grow with it. Until it arrives the story is shown as without a device, for the moment
|
|
10
|
+
* a local chunk takes.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
import type { StoryDeviceSetting } from "@forgebook/story-format/csf";
|
|
15
|
+
import { type ReactNode } from "react";
|
|
16
|
+
import type { DeviceDrawing } from "../deviceDrawing.ts";
|
|
17
|
+
import type { StoryArea } from "../devices.ts";
|
|
18
|
+
import { type DeviceView, type ShownDevice, type StoryDevice } from "../deviceView.ts";
|
|
19
|
+
import type * as DevicePartsModule from "./device/deviceParts.tsx";
|
|
20
|
+
import type { StageViewportProps } from "./StageViewport.tsx";
|
|
21
|
+
/** The device's parts, as their chunk exports them. */
|
|
22
|
+
export type DeviceParts = typeof DevicePartsModule;
|
|
23
|
+
/**
|
|
24
|
+
* The device's parts, loaded the first time they are needed.
|
|
25
|
+
*
|
|
26
|
+
* @param isNeeded - whether a device is to be drawn.
|
|
27
|
+
* @returns the parts once loaded; none before, or when the chunk could not be fetched (the story is then shown
|
|
28
|
+
* without its device, never broken).
|
|
29
|
+
*/
|
|
30
|
+
export declare const useDeviceParts: (isNeeded: boolean) => DeviceParts | undefined;
|
|
31
|
+
/** A device ready to draw: its parts, which device, and its drawing. */
|
|
32
|
+
export type FramedDevice = {
|
|
33
|
+
/** The parts that draw it. */
|
|
34
|
+
readonly parts: DeviceParts;
|
|
35
|
+
/** The device shown. */
|
|
36
|
+
readonly shown: ShownDevice;
|
|
37
|
+
/** Its drawing. */
|
|
38
|
+
readonly drawing: DeviceDrawing;
|
|
39
|
+
/** The part of its screen the story is drawn in: its viewport, and the safe areas it is told. */
|
|
40
|
+
readonly area: StoryArea;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The device a story is drawn in, once its parts are there.
|
|
44
|
+
*
|
|
45
|
+
* @param shown - the device shown; none for no device.
|
|
46
|
+
*/
|
|
47
|
+
export declare const useFramedDevice: (shown: StoryDevice | undefined) => FramedDevice | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* The device a story on the stage is drawn in: the view's choice over the story's and the catalogue's defaults, and
|
|
50
|
+
* once its parts are there, its screen's width told as the story's width.
|
|
51
|
+
*
|
|
52
|
+
* @param view - the view's device.
|
|
53
|
+
* @param storyDevice - the story's own setting, over the catalogue's.
|
|
54
|
+
* @param onShownWidthChange - told the width the story really has.
|
|
55
|
+
*/
|
|
56
|
+
export declare const useStageDevice: (view: DeviceView, storyDevice: StoryDeviceSetting | undefined, onShownWidthChange: (width: number | undefined) => void) => {
|
|
57
|
+
readonly shown: StoryDevice | undefined;
|
|
58
|
+
readonly framed: FramedDevice | undefined;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Whether a story's frame waits for its device's parts before it loads: a story drawn edge to edge is told its safe
|
|
62
|
+
* areas in its address, which only the parts know, and loading it first would load it twice.
|
|
63
|
+
*
|
|
64
|
+
* @param shown - the device shown; none for none.
|
|
65
|
+
* @param framed - the device once its parts are there.
|
|
66
|
+
*/
|
|
67
|
+
export declare const isWaitingForDevice: (shown: StoryDevice | undefined, framed: FramedDevice | undefined) => boolean;
|
|
68
|
+
/**
|
|
69
|
+
* A story frame's address in its device: with the safe areas a story drawn edge to edge is told; as it is otherwise.
|
|
70
|
+
*
|
|
71
|
+
* @param address - the frame's address.
|
|
72
|
+
* @param framed - the device; none for none.
|
|
73
|
+
*/
|
|
74
|
+
export declare const deviceAddress: (address: string, framed: FramedDevice | undefined) => string;
|
|
75
|
+
/** The slot's props. */
|
|
76
|
+
export type DeviceSlotProps = {
|
|
77
|
+
/** The device drawn around the frame; none shows the frame alone. */
|
|
78
|
+
readonly framed: FramedDevice | undefined;
|
|
79
|
+
/** The story's scheme, which the status bar's ink follows. */
|
|
80
|
+
readonly scheme: "light" | "dark";
|
|
81
|
+
/** The colour of the story's page, which the screen waits on while the story loads. */
|
|
82
|
+
readonly background?: string | undefined;
|
|
83
|
+
/** The frame. */
|
|
84
|
+
readonly children: ReactNode;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* The frame's place, with the device around it when there is one: the parts draw it, this place stays.
|
|
88
|
+
*
|
|
89
|
+
* @param props - the device, the story's scheme and page colour, and the frame.
|
|
90
|
+
*/
|
|
91
|
+
export declare const DeviceSlot: ({ framed, scheme, background, children }: DeviceSlotProps) => ReactNode;
|
|
92
|
+
/**
|
|
93
|
+
* The scheme a story is drawn in, for the status bar's ink: its colour scheme switch's, the system's for `system`.
|
|
94
|
+
*
|
|
95
|
+
* @param scheme - the view's scheme (`schemeOf`).
|
|
96
|
+
* @param isSystemDark - whether the system is dark.
|
|
97
|
+
*/
|
|
98
|
+
export declare const inkScheme: (scheme: "light" | "dark" | "system", isSystemDark: boolean) => "light" | "dark";
|
|
99
|
+
/**
|
|
100
|
+
* The scheme a story is drawn in, for the status bar's ink, following the system's for `system`.
|
|
101
|
+
*
|
|
102
|
+
* @param scheme - the view's scheme (`schemeOf`).
|
|
103
|
+
*/
|
|
104
|
+
export declare const useInkScheme: (scheme: "light" | "dark" | "system") => "light" | "dark";
|
|
105
|
+
/** What sizes a story's room on the stage, and what the stage's handles and its width field are told. */
|
|
106
|
+
export type RoomSizing = Pick<StageViewportProps, "width" | "onWidthChange" | "onShownWidthChange" | "background" | "height" | "onHeightChange" | "isDevice">;
|
|
107
|
+
/**
|
|
108
|
+
* The room's sizing with a device: the device's size, no handles (the device sets the width and the height), no
|
|
109
|
+
* surface of the room's own; the stage's own sizing without one.
|
|
110
|
+
*
|
|
111
|
+
* @param framed - the device; none keeps the stage's own.
|
|
112
|
+
* @param own - the stage's own sizing.
|
|
113
|
+
*/
|
|
114
|
+
export declare const roomSizing: (framed: FramedDevice | undefined, own: RoomSizing) => RoomSizing;
|