forgebook 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +875 -23
- package/dist/bin/forgebook/agentClient.d.ts +30 -1
- package/dist/bin/forgebook/agentClient.js +155 -14
- package/dist/bin/forgebook/agentLoopCommands.d.mts +0 -1
- package/dist/bin/forgebook/agentLoopCommands.mjs +161 -40
- package/dist/bin/forgebook/agentText.d.ts +74 -3
- package/dist/bin/forgebook/agentText.js +192 -8
- package/dist/bin/forgebook/agents.md +141 -7
- package/dist/bin/forgebook/agentsText.d.ts +7 -3
- package/dist/bin/forgebook/agentsText.js +7 -3
- package/dist/bin/forgebook/builtCatalogue.d.ts +31 -0
- package/dist/bin/forgebook/builtCatalogue.js +96 -0
- package/dist/bin/forgebook/catalogueCommands.d.ts +22 -3
- package/dist/bin/forgebook/catalogueCommands.js +21 -2
- package/dist/bin/forgebook/catalogueVite.d.ts +51 -9
- package/dist/bin/forgebook/catalogueVite.js +95 -9
- package/dist/bin/forgebook/checkCodeRun.d.ts +8 -0
- package/dist/bin/forgebook/checkCodeRun.js +27 -0
- package/dist/bin/forgebook/commandServer.d.ts +11 -0
- package/dist/bin/forgebook/commandServer.js +39 -0
- package/dist/bin/forgebook/compileCache.d.ts +7 -0
- package/dist/bin/forgebook/compileCache.js +24 -0
- package/dist/bin/forgebook/devCommands.d.mts +14 -0
- package/dist/bin/forgebook/devCommands.mjs +104 -0
- package/dist/bin/forgebook/errorsRun.d.ts +0 -1
- package/dist/bin/forgebook/errorsRun.js +0 -1
- package/dist/bin/forgebook/forgebook.d.mts +0 -1
- package/dist/bin/forgebook/forgebook.mjs +18 -302
- package/dist/bin/forgebook/forgebookCommands.d.mts +1 -0
- package/dist/bin/forgebook/forgebookCommands.mjs +292 -0
- package/dist/bin/forgebook/importers/storybook.d.ts +10 -4
- package/dist/bin/forgebook/importers/storybook.js +71 -45
- package/dist/bin/forgebook/importers/storybookAngular.d.ts +15 -0
- package/dist/bin/forgebook/importers/storybookAngular.js +97 -0
- package/dist/bin/forgebook/importers/storybookFrameworks.d.ts +53 -0
- package/dist/bin/forgebook/importers/storybookFrameworks.js +180 -0
- package/dist/bin/forgebook/importers/storybookReactNative.d.ts +40 -0
- package/dist/bin/forgebook/importers/storybookReactNative.js +179 -0
- package/dist/bin/forgebook/initCommands.d.mts +0 -1
- package/dist/bin/forgebook/initCommands.mjs +23 -12
- package/dist/bin/forgebook/initConfig.d.ts +0 -1
- package/dist/bin/forgebook/initConfig.js +17 -3
- package/dist/bin/forgebook/mcpCommand.d.mts +8 -0
- package/dist/bin/forgebook/mcpCommand.mjs +99 -0
- package/dist/bin/forgebook/mcpPreview.d.ts +32 -0
- package/dist/bin/forgebook/mcpPreview.js +107 -0
- package/dist/bin/forgebook/mcpToolParts.d.ts +28 -0
- package/dist/bin/forgebook/mcpToolParts.js +24 -0
- package/dist/bin/forgebook/mcpTools.d.ts +12 -6
- package/dist/bin/forgebook/mcpTools.js +148 -27
- package/dist/bin/forgebook/newStories.d.ts +2 -3
- package/dist/bin/forgebook/newStories.js +4 -3
- package/dist/bin/forgebook/newStoriesFile.d.ts +3 -4
- package/dist/bin/forgebook/newStoriesFile.js +23 -11
- package/dist/bin/forgebook/pageTools.d.ts +8 -0
- package/dist/bin/forgebook/pageTools.js +71 -0
- package/dist/bin/forgebook/pagesCommands.d.mts +14 -0
- package/dist/bin/forgebook/pagesCommands.mjs +109 -0
- package/dist/bin/forgebook/prebundleChild.d.ts +1 -0
- package/dist/bin/forgebook/prebundleChild.js +34 -0
- package/dist/bin/forgebook/prebundleRun.d.ts +22 -0
- package/dist/bin/forgebook/prebundleRun.js +49 -0
- package/dist/bin/forgebook/prebundleStart.d.ts +44 -0
- package/dist/bin/forgebook/prebundleStart.js +82 -0
- package/dist/bin/forgebook/semanticOptions.d.ts +45 -0
- package/dist/bin/forgebook/semanticOptions.js +36 -0
- package/dist/bin/forgebook/storyCheckCommands.d.mts +13 -0
- package/dist/bin/forgebook/storyCheckCommands.mjs +69 -0
- package/dist/bin/forgebook/storyCheckRun.d.ts +40 -6
- package/dist/bin/forgebook/storyCheckRun.js +90 -17
- package/dist/bin/forgebook/tokensRun.d.ts +41 -0
- package/dist/bin/forgebook/tokensRun.js +42 -0
- package/dist/bin/forgebook/touchWindowRun.d.ts +0 -1
- package/dist/bin/forgebook/touchWindowRun.js +0 -1
- package/dist/bin/forgebook/visualCommands.d.mts +37 -0
- package/dist/bin/forgebook/visualCommands.mjs +162 -0
- package/dist/bin/forgebook/viteCache.d.ts +48 -0
- package/dist/bin/forgebook/viteCache.js +112 -0
- package/dist/bin/forgebook-docs/catalogueDocs.d.ts +1 -2
- package/dist/bin/forgebook-docs/catalogueDocs.js +8 -5
- package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts +22 -3
- package/dist/bin/forgebook-docs/catalogueDocs.types.js +0 -1
- package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts +0 -1
- package/dist/bin/forgebook-docs/catalogueMarkdown.js +67 -19
- package/dist/bin/forgebook-docs/catalogueOptions.d.ts +1 -2
- package/dist/bin/forgebook-docs/catalogueOptions.js +8 -2
- package/dist/bin/forgebook-docs/collectDocs.d.ts +4 -4
- package/dist/bin/forgebook-docs/collectDocs.js +122 -30
- package/dist/bin/forgebook-docs/forgebook-docs.d.mts +0 -1
- package/dist/bin/forgebook-docs/forgebook-docs.mjs +0 -1
- package/dist/bin/forgebook-docs/llmsText.d.ts +5 -1
- package/dist/bin/forgebook-docs/llmsText.js +5 -2
- package/dist/bin/forgebook-docs/moduleDocs.d.ts +0 -1
- package/dist/bin/forgebook-docs/moduleDocs.js +0 -1
- package/dist/bin/forgebook-docs/sassDocs.d.ts +0 -1
- package/dist/bin/forgebook-docs/sassDocs.js +0 -1
- package/dist/bin/forgebook-texts/forgebook-texts.d.mts +0 -1
- package/dist/bin/forgebook-texts/forgebook-texts.mjs +1 -2
- package/dist/bin/forgebook-texts/storyTextsReport.d.ts +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.js +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.types.d.ts +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.types.js +0 -1
- package/dist/bin/frameworkDocs.d.ts +0 -1
- package/dist/bin/frameworkDocs.js +0 -1
- package/dist/src/a11y.d.ts +0 -1
- package/dist/src/a11y.js +0 -1
- package/dist/src/addressArgs.d.ts +74 -0
- package/dist/src/addressArgs.js +109 -0
- package/dist/src/addressTexts.d.ts +35 -0
- package/dist/src/addressTexts.js +51 -0
- package/dist/src/argTypes.d.ts +0 -1
- package/dist/src/argTypes.js +2 -2
- package/dist/src/audiences.d.ts +17 -0
- package/dist/src/audiences.js +15 -0
- package/dist/src/backdrops.d.ts +39 -40
- package/dist/src/backdrops.js +37 -174
- package/dist/src/catalogue.d.ts +56 -20
- package/dist/src/catalogue.js +33 -14
- package/dist/src/codeLiteral.d.ts +41 -0
- package/dist/src/codeLiteral.js +51 -0
- package/dist/src/componentDocs.d.ts +57 -1
- package/dist/src/componentDocs.js +20 -3
- package/dist/src/controlKeys.d.ts +0 -1
- package/dist/src/controlKeys.js +0 -1
- package/dist/src/deviceDrawing.d.ts +114 -0
- package/dist/src/deviceDrawing.js +358 -0
- package/dist/src/deviceMenuView.d.ts +17 -0
- package/dist/src/deviceMenuView.js +22 -0
- package/dist/src/devicePicture.d.ts +57 -0
- package/dist/src/devicePicture.js +104 -0
- package/dist/src/deviceView.d.ts +172 -0
- package/dist/src/deviceView.js +111 -0
- package/dist/src/devices.d.ts +115 -0
- package/dist/src/devices.js +135 -0
- package/dist/src/docAnchors.d.ts +27 -0
- package/dist/src/docAnchors.js +33 -0
- package/dist/src/docPages.d.ts +203 -0
- package/dist/src/docPages.js +169 -0
- package/dist/src/embed.d.ts +32 -0
- package/dist/src/embed.js +24 -0
- package/dist/src/embedCode.d.ts +31 -0
- package/dist/src/embedCode.js +88 -0
- package/dist/src/frame/backdropPictures.d.ts +29 -0
- package/dist/src/frame/backdropPictures.js +187 -0
- package/dist/src/frame/checkStory.d.ts +6 -3
- package/dist/src/frame/checkStory.js +76 -5
- package/dist/src/frame/followTouch.d.ts +9 -0
- package/dist/src/frame/followTouch.js +43 -0
- package/dist/src/frame/frame.css +8 -3
- package/dist/src/frame/frameClock.d.ts +0 -1
- package/dist/src/frame/frameClock.js +0 -1
- package/dist/src/frame/frameStatus.d.ts +2 -1
- package/dist/src/frame/frameStatus.js +2 -1
- package/dist/src/frame/frameView.d.ts +0 -1
- package/dist/src/frame/frameView.js +1 -2
- package/dist/src/frame/matrixLayout.d.ts +0 -1
- package/dist/src/frame/matrixLayout.js +0 -1
- package/dist/src/frame/measureTools.d.ts +0 -1
- package/dist/src/frame/measureTools.js +0 -1
- package/dist/src/frame/mountFrame.d.ts +10 -3
- package/dist/src/frame/mountFrame.js +162 -63
- package/dist/src/frame/playStory.d.ts +0 -1
- package/dist/src/frame/playStory.js +0 -1
- package/dist/src/frame/pluginFrames.d.ts +31 -0
- package/dist/src/frame/pluginFrames.js +23 -0
- package/dist/src/frame/renderer.d.ts +50 -12
- package/dist/src/frame/renderer.js +27 -6
- package/dist/src/frame/settle.d.ts +0 -1
- package/dist/src/frame/settle.js +0 -1
- package/dist/src/frame/shellChannel.d.ts +47 -0
- package/dist/src/frame/shellChannel.js +39 -0
- package/dist/src/frame/spillOutline.d.ts +0 -1
- package/dist/src/frame/spillOutline.js +0 -1
- package/dist/src/frame/staleModule.d.ts +14 -2
- package/dist/src/frame/staleModule.js +19 -2
- package/dist/src/frame/storyCanvas.d.ts +0 -1
- package/dist/src/frame/storyCanvas.js +0 -1
- package/dist/src/frame/storyHooks.d.ts +0 -1
- package/dist/src/frame/storyHooks.js +0 -1
- package/dist/src/frame/storyModule.d.ts +13 -2
- package/dist/src/frame/storyModule.js +45 -3
- package/dist/src/frame/storyRun.d.ts +21 -4
- package/dist/src/frame/storyRun.js +100 -19
- package/dist/src/frame/touchDots.d.ts +0 -1
- package/dist/src/frame/touchDots.js +0 -1
- package/dist/src/frame/touchEvents.d.ts +0 -1
- package/dist/src/frame/touchEvents.js +0 -1
- package/dist/src/frame/touchGesture.d.ts +0 -1
- package/dist/src/frame/touchGesture.js +0 -1
- package/dist/src/frame/touchLayer.d.ts +3 -3
- package/dist/src/frame/touchLayer.js +4 -30
- package/dist/src/frame/touchScroll.d.ts +0 -1
- package/dist/src/frame/touchScroll.js +0 -1
- package/dist/src/frameOrigins.d.ts +62 -0
- package/dist/src/frameOrigins.js +49 -0
- package/dist/src/hotModules.d.ts +48 -0
- package/dist/src/hotModules.js +53 -0
- package/dist/src/jsxCode.d.ts +22 -0
- package/dist/src/jsxCode.js +36 -0
- package/dist/src/languages.d.ts +0 -1
- package/dist/src/languages.js +0 -1
- package/dist/src/liveErrors.d.ts +0 -1
- package/dist/src/liveErrors.js +0 -1
- package/dist/src/matrix.d.ts +0 -1
- package/dist/src/matrix.js +0 -1
- package/dist/src/messages.d.ts +28 -2
- package/dist/src/messages.js +24 -3
- package/dist/src/namedValues.d.ts +11 -1
- package/dist/src/namedValues.js +25 -2
- package/dist/src/namedViews.d.ts +1 -13
- package/dist/src/namedViews.js +30 -7
- package/dist/src/packedText.d.ts +21 -0
- package/dist/src/packedText.js +36 -0
- package/dist/src/pageAddress.d.ts +26 -0
- package/dist/src/pageAddress.js +39 -0
- package/dist/src/pageConfig.d.ts +3 -1
- package/dist/src/pageConfig.js +0 -1
- package/dist/src/pageTree.d.ts +79 -0
- package/dist/src/pageTree.js +108 -0
- package/dist/src/playTrace.d.ts +0 -1
- package/dist/src/playTrace.js +0 -1
- package/dist/src/plugin.d.ts +230 -0
- package/dist/src/plugin.js +12 -0
- package/dist/src/pluginReact.d.ts +23 -0
- package/dist/src/pluginReact.js +24 -0
- package/dist/src/previewRelay.d.ts +40 -0
- package/dist/src/previewRelay.js +69 -0
- package/dist/src/previewTexts.d.ts +26 -0
- package/dist/src/previewTexts.js +33 -0
- package/dist/src/previewView.d.ts +31 -0
- package/dist/src/previewView.js +264 -0
- package/dist/src/propGroups.d.ts +46 -0
- package/dist/src/propGroups.js +59 -0
- package/dist/src/realTouch.d.ts +1 -2
- package/dist/src/realTouch.js +1 -2
- package/dist/src/safeAreaParameter.d.ts +42 -0
- package/dist/src/safeAreaParameter.js +50 -0
- package/dist/src/search.d.ts +154 -0
- package/dist/src/search.js +265 -0
- package/dist/src/searchIndex.d.ts +61 -0
- package/dist/src/searchIndex.js +55 -0
- package/dist/src/searchMarks.d.ts +29 -0
- package/dist/src/searchMarks.js +165 -0
- package/dist/src/searchMatch.d.ts +58 -0
- package/dist/src/searchMatch.js +127 -0
- package/dist/src/shell/A11yTab.d.ts +0 -7
- package/dist/src/shell/A11yTab.js +4 -15
- package/dist/src/shell/AnchorScroll.d.ts +25 -0
- package/dist/src/shell/AnchorScroll.js +10 -0
- package/dist/src/shell/ApiReference.d.ts +11 -4
- package/dist/src/shell/ApiReference.js +73 -19
- package/dist/src/shell/AppearanceMenu.d.ts +1 -2
- package/dist/src/shell/AppearanceMenu.js +8 -5
- package/dist/src/shell/AudienceSections.d.ts +106 -0
- package/dist/src/shell/AudienceSections.js +154 -0
- package/dist/src/shell/AuthoredHome.d.ts +37 -0
- package/dist/src/shell/AuthoredHome.js +96 -0
- package/dist/src/shell/BoxWidth.d.ts +0 -1
- package/dist/src/shell/BoxWidth.js +0 -1
- package/dist/src/shell/ClockBar.d.ts +19 -0
- package/dist/src/shell/ClockBar.js +15 -0
- package/dist/src/shell/ClockControls.d.ts +5 -9
- package/dist/src/shell/ClockControls.js +13 -16
- package/dist/src/shell/Code.d.ts +0 -1
- package/dist/src/shell/Code.js +0 -1
- package/dist/src/shell/CodeTab.d.ts +0 -1
- package/dist/src/shell/CodeTab.js +2 -2
- package/dist/src/shell/CodeText.d.ts +0 -1
- package/dist/src/shell/CodeText.js +0 -1
- package/dist/src/shell/CompareGrid.d.ts +37 -0
- package/dist/src/shell/CompareGrid.js +24 -0
- package/dist/src/shell/ComponentPage.d.ts +45 -7
- package/dist/src/shell/ComponentPage.js +105 -49
- package/dist/src/shell/ControlKeyField.d.ts +0 -1
- package/dist/src/shell/ControlKeyField.js +3 -4
- package/dist/src/shell/ControlRow.d.ts +4 -4
- package/dist/src/shell/ControlRow.js +5 -5
- package/dist/src/shell/DeviceControl.d.ts +31 -0
- package/dist/src/shell/DeviceControl.js +33 -0
- package/dist/src/shell/DeviceSlot.d.ts +114 -0
- package/dist/src/shell/DeviceSlot.js +134 -0
- package/dist/src/shell/DocBlocks.d.ts +100 -0
- package/dist/src/shell/DocBlocks.js +206 -0
- package/dist/src/shell/DocContainers.d.ts +70 -0
- package/dist/src/shell/DocContainers.js +94 -0
- package/dist/src/shell/DocContents.d.ts +29 -0
- package/dist/src/shell/DocContents.js +88 -0
- package/dist/src/shell/DocPage.d.ts +69 -0
- package/dist/src/shell/DocPage.js +141 -0
- package/dist/src/shell/Dock.d.ts +1 -2
- package/dist/src/shell/Dock.js +1 -2
- package/dist/src/shell/DroppedArgsList.d.ts +26 -0
- package/dist/src/shell/DroppedArgsList.js +8 -0
- package/dist/src/shell/DroppedArgsNote.d.ts +14 -0
- package/dist/src/shell/DroppedArgsNote.js +10 -0
- package/dist/src/shell/EmbedButton.d.ts +19 -0
- package/dist/src/shell/EmbedButton.js +96 -0
- package/dist/src/shell/EmbedPage.d.ts +23 -0
- package/dist/src/shell/EmbedPage.js +168 -0
- package/dist/src/shell/EmbedPanel.d.ts +25 -0
- package/dist/src/shell/EmbedPanel.js +46 -0
- package/dist/src/shell/EventsTab.d.ts +0 -1
- package/dist/src/shell/EventsTab.js +2 -3
- package/dist/src/shell/Example.d.ts +20 -2
- package/dist/src/shell/Example.js +75 -22
- package/dist/src/shell/FrameView.d.ts +1 -2
- package/dist/src/shell/FrameView.js +4 -4
- package/dist/src/shell/HomePage.d.ts +78 -4
- package/dist/src/shell/HomePage.js +53 -14
- package/dist/src/shell/HomePieces.d.ts +40 -0
- package/dist/src/shell/HomePieces.js +29 -0
- package/dist/src/shell/InfoTip.d.ts +0 -1
- package/dist/src/shell/InfoTip.js +0 -1
- package/dist/src/shell/InteractionsTab.d.ts +0 -7
- package/dist/src/shell/InteractionsTab.js +3 -9
- package/dist/src/shell/LazyHost.d.ts +16 -0
- package/dist/src/shell/LazyHost.js +42 -0
- package/dist/src/shell/LazyPage.d.ts +24 -0
- package/dist/src/shell/LazyPage.js +9 -0
- package/dist/src/shell/LogicMark.d.ts +0 -1
- package/dist/src/shell/LogicMark.js +0 -1
- package/dist/src/shell/MatrixPicker.d.ts +0 -1
- package/dist/src/shell/MatrixPicker.js +0 -1
- package/dist/src/shell/NamedViews.d.ts +0 -1
- package/dist/src/shell/NamedViews.js +4 -5
- package/dist/src/shell/PackageHtml.d.ts +0 -1
- package/dist/src/shell/PackageHtml.js +0 -1
- package/dist/src/shell/PartsTab.d.ts +0 -7
- package/dist/src/shell/PartsTab.js +3 -13
- package/dist/src/shell/PinnedControl.d.ts +0 -1
- package/dist/src/shell/PinnedControl.js +2 -2
- package/dist/src/shell/PluginBlockHost.d.ts +46 -0
- package/dist/src/shell/PluginBlockHost.js +39 -0
- package/dist/src/shell/PluginTabHost.d.ts +32 -0
- package/dist/src/shell/PluginTabHost.js +25 -0
- package/dist/src/shell/PluginViewHost.d.ts +37 -0
- package/dist/src/shell/PluginViewHost.js +89 -0
- package/dist/src/shell/PropFields.d.ts +0 -1
- package/dist/src/shell/PropFields.js +0 -1
- package/dist/src/shell/PropsTab.d.ts +11 -2
- package/dist/src/shell/PropsTab.js +31 -5
- package/dist/src/shell/SearchPanel.d.ts +63 -0
- package/dist/src/shell/SearchPanel.js +209 -0
- package/dist/src/shell/Segmented.d.ts +0 -1
- package/dist/src/shell/Segmented.js +0 -1
- package/dist/src/shell/Shell.d.ts +34 -6
- package/dist/src/shell/Shell.js +271 -70
- package/dist/src/shell/Sidebar.d.ts +20 -5
- package/dist/src/shell/Sidebar.js +23 -56
- package/dist/src/shell/SidebarDocs.d.ts +38 -0
- package/dist/src/shell/SidebarDocs.js +30 -0
- package/dist/src/shell/SidebarEntries.d.ts +9 -1
- package/dist/src/shell/SidebarEntries.js +1 -2
- package/dist/src/shell/SidebarHandle.d.ts +0 -1
- package/dist/src/shell/SidebarHandle.js +0 -1
- package/dist/src/shell/SidebarSearch.d.ts +40 -0
- package/dist/src/shell/SidebarSearch.js +85 -0
- package/dist/src/shell/SignatureReference.d.ts +0 -1
- package/dist/src/shell/SignatureReference.js +1 -2
- package/dist/src/shell/Stage.d.ts +9 -4
- package/dist/src/shell/Stage.js +112 -59
- package/dist/src/shell/StageCompare.d.ts +14 -0
- package/dist/src/shell/StageCompare.js +11 -0
- package/dist/src/shell/StageTools.d.ts +0 -1
- package/dist/src/shell/StageTools.js +0 -1
- package/dist/src/shell/StageViewport.d.ts +7 -3
- package/dist/src/shell/StageViewport.js +4 -5
- package/dist/src/shell/StoryBar.d.ts +40 -0
- package/dist/src/shell/StoryBar.js +23 -0
- package/dist/src/shell/StoryCodeBlock.d.ts +1 -2
- package/dist/src/shell/StoryCodeBlock.js +0 -1
- package/dist/src/shell/StoryCoverage.d.ts +36 -0
- package/dist/src/shell/StoryCoverage.js +126 -0
- package/dist/src/shell/StoryPicker.d.ts +0 -1
- package/dist/src/shell/StoryPicker.js +0 -1
- package/dist/src/shell/Toolbar.d.ts +7 -3
- package/dist/src/shell/Toolbar.js +6 -6
- package/dist/src/shell/ToolbarControl.d.ts +6 -8
- package/dist/src/shell/ToolbarControl.js +28 -20
- package/dist/src/shell/UsedIn.d.ts +5 -6
- package/dist/src/shell/UsedIn.js +7 -20
- package/dist/src/shell/ViewMenu.d.ts +7 -7
- package/dist/src/shell/ViewMenu.js +61 -176
- package/dist/src/shell/ViewMenuPanel.d.ts +41 -0
- package/dist/src/shell/ViewMenuPanel.js +199 -0
- package/dist/src/shell/WidthField.d.ts +3 -2
- package/dist/src/shell/WidthField.js +2 -3
- package/dist/src/shell/asideStory.d.ts +34 -0
- package/dist/src/shell/asideStory.js +55 -0
- package/dist/src/shell/audienceLayout.d.ts +39 -0
- package/dist/src/shell/audienceLayout.js +33 -0
- package/dist/src/shell/audiencePage.d.ts +113 -0
- package/dist/src/shell/audiencePage.js +144 -0
- package/dist/src/shell/audienceSections.css +95 -0
- package/dist/src/shell/catalogueContext.d.ts +24 -2
- package/dist/src/shell/catalogueContext.js +12 -9
- package/dist/src/shell/codeTokens.d.ts +0 -1
- package/dist/src/shell/codeTokens.js +0 -1
- package/dist/src/shell/codeWriter.d.ts +0 -1
- package/dist/src/shell/codeWriter.js +0 -1
- package/dist/src/shell/compareVariants.d.ts +0 -1
- package/dist/src/shell/compareVariants.js +2 -2
- package/dist/src/shell/controlCycle.d.ts +0 -1
- package/dist/src/shell/controlCycle.js +13 -1
- package/dist/src/shell/controlLabel.d.ts +7 -0
- package/dist/src/shell/controlLabel.js +17 -0
- package/dist/src/shell/device/deviceFrame.css +42 -0
- package/dist/src/shell/device/deviceParts.d.ts +90 -0
- package/dist/src/shell/device/deviceParts.js +120 -0
- package/dist/src/shell/docPage.css +451 -0
- package/dist/src/shell/dockTabs.d.ts +13 -5
- package/dist/src/shell/dockTabs.js +40 -18
- package/dist/src/shell/embed.css +74 -0
- package/dist/src/shell/filesCode.d.ts +21 -0
- package/dist/src/shell/filesCode.js +37 -0
- package/dist/src/shell/forgebookMark.d.ts +15 -0
- package/dist/src/shell/forgebookMark.js +28 -0
- package/dist/src/shell/framesOrigin.d.ts +23 -0
- package/dist/src/shell/framesOrigin.js +69 -0
- package/dist/src/shell/icons.d.ts +3 -1
- package/dist/src/shell/icons.js +3 -1
- package/dist/src/shell/keyboard.d.ts +0 -1
- package/dist/src/shell/keyboard.js +0 -1
- package/dist/src/shell/laterStrings.d.ts +91 -0
- package/dist/src/shell/laterStrings.js +102 -0
- package/dist/src/shell/lazyModule.d.ts +49 -0
- package/dist/src/shell/lazyModule.js +72 -0
- package/dist/src/shell/lazyTab.d.ts +21 -0
- package/dist/src/shell/lazyTab.js +9 -0
- package/dist/src/shell/logicView.d.ts +0 -12
- package/dist/src/shell/logicView.js +2 -2
- package/dist/src/shell/mountShell.d.ts +5 -3
- package/dist/src/shell/mountShell.js +43 -12
- package/dist/src/shell/pageStrings.d.ts +24 -0
- package/dist/src/shell/pageStrings.js +26 -0
- package/dist/src/shell/pluginHosts.d.ts +9 -0
- package/dist/src/shell/pluginHosts.js +6 -0
- package/dist/src/shell/pluginHostsContext.d.ts +20 -0
- package/dist/src/shell/pluginHostsContext.js +16 -0
- package/dist/src/shell/pluginTabs.d.ts +63 -0
- package/dist/src/shell/pluginTabs.js +60 -0
- package/dist/src/shell/search.css +172 -0
- package/dist/src/shell/searchStrings.d.ts +24 -0
- package/dist/src/shell/searchStrings.js +31 -0
- package/dist/src/shell/shell.css +285 -139
- package/dist/src/shell/shellScheme.d.ts +37 -0
- package/dist/src/shell/shellScheme.js +32 -0
- package/dist/src/shell/storyTouch.d.ts +19 -6
- package/dist/src/shell/storyTouch.js +26 -4
- package/dist/src/shell/strings.d.ts +56 -80
- package/dist/src/shell/strings.js +53 -78
- package/dist/src/shell/switchView.d.ts +0 -1
- package/dist/src/shell/switchView.js +0 -1
- package/dist/src/shell/tabSummaries.d.ts +31 -0
- package/dist/src/shell/tabSummaries.js +27 -0
- package/dist/src/shell/treeSearch.d.ts +39 -3
- package/dist/src/shell/treeSearch.js +27 -1
- package/dist/src/shell/useAddressArgs.d.ts +55 -0
- package/dist/src/shell/useAddressArgs.js +62 -0
- package/dist/src/shell/useAnchorScroll.d.ts +24 -0
- package/dist/src/shell/useAnchorScroll.js +90 -0
- package/dist/src/shell/useAppearance.d.ts +7 -2
- package/dist/src/shell/useAppearance.js +14 -5
- package/dist/src/shell/useComponentDocs.d.ts +0 -1
- package/dist/src/shell/useComponentDocs.js +0 -1
- package/dist/src/shell/useControlKeys.d.ts +2 -1
- package/dist/src/shell/useControlKeys.js +2 -3
- package/dist/src/shell/useCopy.d.ts +2 -1
- package/dist/src/shell/useCopy.js +11 -6
- package/dist/src/shell/useFold.d.ts +0 -1
- package/dist/src/shell/useFold.js +0 -1
- package/dist/src/shell/useFrameMessages.d.ts +19 -4
- package/dist/src/shell/useFrameMessages.js +23 -7
- package/dist/src/shell/useFrameQueue.d.ts +7 -3
- package/dist/src/shell/useFrameQueue.js +39 -22
- package/dist/src/shell/useFullPage.d.ts +0 -1
- package/dist/src/shell/useFullPage.js +0 -1
- package/dist/src/shell/useLiveView.d.ts +0 -1
- package/dist/src/shell/useLiveView.js +0 -1
- package/dist/src/shell/useLoaded.d.ts +1 -2
- package/dist/src/shell/useLoaded.js +28 -6
- package/dist/src/shell/usePageDoc.d.ts +0 -1
- package/dist/src/shell/usePageDoc.js +0 -1
- package/dist/src/shell/usePageFrames.d.ts +46 -0
- package/dist/src/shell/usePageFrames.js +50 -0
- package/dist/src/shell/usePluginTabs.d.ts +18 -0
- package/dist/src/shell/usePluginTabs.js +45 -0
- package/dist/src/shell/usePopover.d.ts +0 -1
- package/dist/src/shell/usePopover.js +0 -1
- package/dist/src/shell/useProseLinks.d.ts +14 -0
- package/dist/src/shell/useProseLinks.js +30 -0
- package/dist/src/shell/useRecentPages.d.ts +3 -4
- package/dist/src/shell/useRecentPages.js +1 -2
- package/dist/src/shell/useScrollMemory.d.ts +9 -1
- package/dist/src/shell/useScrollMemory.js +2 -3
- package/dist/src/shell/useSearchIndex.d.ts +24 -0
- package/dist/src/shell/useSearchIndex.js +51 -0
- package/dist/src/shell/useShownView.d.ts +3 -1
- package/dist/src/shell/useShownView.js +5 -5
- package/dist/src/shell/useSidebarLayout.d.ts +0 -1
- package/dist/src/shell/useSidebarLayout.js +0 -1
- package/dist/src/shell/useStored.d.ts +13 -1
- package/dist/src/shell/useStored.js +13 -5
- package/dist/src/shell/useStoryCheck.d.ts +20 -0
- package/dist/src/shell/useStoryCheck.js +33 -0
- package/dist/src/shell/useStoryCode.d.ts +0 -1
- package/dist/src/shell/useStoryCode.js +0 -1
- package/dist/src/shell/useStoryHeights.d.ts +0 -1
- package/dist/src/shell/useStoryHeights.js +0 -1
- package/dist/src/shell/useStoryIdsElement.d.ts +0 -1
- package/dist/src/shell/useStoryIdsElement.js +0 -1
- package/dist/src/shell/useStoryKeys.d.ts +0 -1
- package/dist/src/shell/useStoryKeys.js +0 -1
- package/dist/src/shell/useSyncedTab.d.ts +8 -0
- package/dist/src/shell/useSyncedTab.js +60 -0
- package/dist/src/shell/useSystemDark.d.ts +0 -1
- package/dist/src/shell/useSystemDark.js +0 -1
- package/dist/src/shell/useToolbarLayout.d.ts +0 -1
- package/dist/src/shell/useToolbarLayout.js +0 -1
- package/dist/src/shell/useToolbarOverflow.d.ts +0 -1
- package/dist/src/shell/useToolbarOverflow.js +0 -1
- package/dist/src/shell/useWorstCase.d.ts +0 -1
- package/dist/src/shell/useWorstCase.js +2 -2
- package/dist/src/shell/worstArgs.d.ts +0 -1
- package/dist/src/shell/worstArgs.js +0 -1
- package/dist/src/shellTheme.d.ts +64 -0
- package/dist/src/shellTheme.js +274 -0
- package/dist/src/shellTheme.types.d.ts +93 -0
- package/dist/src/shellTheme.types.js +10 -0
- package/dist/src/sourceFiles.d.ts +17 -3
- package/dist/src/sourceFiles.js +27 -1
- package/dist/src/spills.d.ts +0 -1
- package/dist/src/spills.js +0 -1
- package/dist/src/storyBackground.d.ts +0 -1
- package/dist/src/storyBackground.js +0 -1
- package/dist/src/storyCheck.d.ts +86 -2
- package/dist/src/storyCheck.js +12 -2
- package/dist/src/storyClock.d.ts +0 -1
- package/dist/src/storyClock.js +0 -1
- package/dist/src/storyGlobals.d.ts +0 -1
- package/dist/src/storyGlobals.js +0 -1
- package/dist/src/storyHeights.d.ts +0 -1
- package/dist/src/storyHeights.js +0 -1
- package/dist/src/storyIds.d.ts +36 -0
- package/dist/src/storyIds.js +52 -0
- package/dist/src/storyIdsElement.d.ts +0 -1
- package/dist/src/storyIdsElement.js +0 -1
- package/dist/src/storyTexts.d.ts +11 -5
- package/dist/src/storyTexts.js +16 -5
- package/dist/src/storyTree.d.ts +79 -25
- package/dist/src/storyTree.js +211 -127
- package/dist/src/switches.d.ts +0 -1
- package/dist/src/switches.js +6 -2
- package/dist/src/toolbarLayout.d.ts +0 -1
- package/dist/src/toolbarLayout.js +0 -1
- package/dist/src/treePlaces.d.ts +60 -0
- package/dist/src/treePlaces.js +89 -0
- package/dist/src/usedIn.d.ts +28 -1
- package/dist/src/usedIn.js +93 -3
- package/dist/src/viewState.d.ts +37 -9
- package/dist/src/viewState.js +67 -9
- package/dist/src/viewWords.d.ts +0 -13
- package/dist/src/viewWords.js +41 -3
- package/dist/src/vite/adapter.d.ts +62 -1
- package/dist/src/vite/adapter.js +20 -2
- package/dist/src/vite/agent.types.d.ts +279 -7
- package/dist/src/vite/agent.types.js +11 -1
- package/dist/src/vite/agentApi.d.ts +55 -2
- package/dist/src/vite/agentApi.js +130 -8
- package/dist/src/vite/agentIds.d.ts +25 -0
- package/dist/src/vite/agentIds.js +41 -0
- package/dist/src/vite/agentIndex.d.ts +63 -0
- package/dist/src/vite/agentIndex.js +91 -0
- package/dist/src/vite/agentIndexRoute.d.ts +10 -0
- package/dist/src/vite/agentIndexRoute.js +35 -0
- package/dist/src/vite/agentRoutes.d.ts +80 -19
- package/dist/src/vite/agentRoutes.js +167 -24
- package/dist/src/vite/autoTitle.d.ts +0 -1
- package/dist/src/vite/autoTitle.js +0 -1
- package/dist/src/vite/axeScript.d.ts +20 -0
- package/dist/src/vite/axeScript.js +60 -0
- package/dist/src/vite/builtTexts.d.ts +75 -0
- package/dist/src/vite/builtTexts.js +142 -0
- package/dist/src/vite/catalogueConfig.d.ts +10 -0
- package/dist/src/vite/catalogueConfig.js +64 -0
- package/dist/src/vite/checkCode.d.ts +67 -0
- package/dist/src/vite/checkCode.js +145 -0
- package/dist/src/vite/closeWatch.d.ts +96 -0
- package/dist/src/vite/closeWatch.js +219 -0
- package/dist/src/vite/codeFence.d.ts +78 -0
- package/dist/src/vite/codeFence.js +267 -0
- package/dist/src/vite/componentImport.d.ts +8 -0
- package/dist/src/vite/componentImport.js +35 -0
- package/dist/src/vite/componentPage.d.ts +15 -2
- package/dist/src/vite/componentPage.js +55 -16
- package/dist/src/vite/config.d.ts +51 -3
- package/dist/src/vite/config.js +0 -1
- package/dist/src/vite/configFile.d.ts +65 -9
- package/dist/src/vite/configFile.js +182 -28
- package/dist/src/vite/designTokens.d.ts +75 -0
- package/dist/src/vite/designTokens.js +382 -0
- package/dist/src/vite/diskCache.d.ts +51 -0
- package/dist/src/vite/diskCache.js +211 -0
- package/dist/src/vite/docDirectives.d.ts +116 -0
- package/dist/src/vite/docDirectives.js +425 -0
- package/dist/src/vite/docMarkdown.d.ts +76 -0
- package/dist/src/vite/docMarkdown.js +150 -0
- package/dist/src/vite/docPageBlocks.d.ts +64 -0
- package/dist/src/vite/docPageBlocks.js +322 -0
- package/dist/src/vite/docPageLinks.d.ts +72 -0
- package/dist/src/vite/docPageLinks.js +135 -0
- package/dist/src/vite/docPageMarkdown.d.ts +86 -0
- package/dist/src/vite/docPageMarkdown.js +133 -0
- package/dist/src/vite/docPageRender.d.ts +27 -0
- package/dist/src/vite/docPageRender.js +199 -0
- package/dist/src/vite/docPageTokens.d.ts +91 -0
- package/dist/src/vite/docPageTokens.js +186 -0
- package/dist/src/vite/docPagesModule.d.ts +50 -0
- package/dist/src/vite/docPagesModule.js +118 -0
- package/dist/src/vite/docPagesRoute.d.ts +38 -0
- package/dist/src/vite/docPagesRoute.js +154 -0
- package/dist/src/vite/docsDependencies.d.ts +6 -0
- package/dist/src/vite/docsDependencies.js +150 -0
- package/dist/src/vite/docsExtractor.d.ts +44 -3
- package/dist/src/vite/docsExtractor.js +160 -26
- package/dist/src/vite/docsProgram.d.ts +89 -9
- package/dist/src/vite/docsProgram.js +413 -50
- package/dist/src/vite/docsWorker.d.ts +0 -1
- package/dist/src/vite/docsWorker.js +49 -15
- package/dist/src/vite/figmaLink.d.ts +26 -0
- package/dist/src/vite/figmaLink.js +92 -0
- package/dist/src/vite/findComponent.d.ts +32 -0
- package/dist/src/vite/findComponent.js +52 -0
- package/dist/src/vite/findRoute.d.ts +14 -0
- package/dist/src/vite/findRoute.js +62 -0
- package/dist/src/vite/forcedStates.d.ts +0 -1
- package/dist/src/vite/forcedStates.js +0 -1
- package/dist/src/vite/forgebookPlugin.d.ts +1 -2
- package/dist/src/vite/forgebookPlugin.js +321 -263
- package/dist/src/vite/framesConfig.d.ts +89 -0
- package/dist/src/vite/framesConfig.js +149 -0
- package/dist/src/vite/framesServer.d.ts +43 -0
- package/dist/src/vite/framesServer.js +326 -0
- package/dist/src/vite/functionComponentDocs.d.ts +26 -0
- package/dist/src/vite/functionComponentDocs.js +193 -0
- package/dist/src/vite/gitChange.d.ts +56 -0
- package/dist/src/vite/gitChange.js +86 -0
- package/dist/src/vite/heightsRoute.d.ts +0 -1
- package/dist/src/vite/heightsRoute.js +0 -1
- package/dist/src/vite/highlightCode.d.ts +0 -1
- package/dist/src/vite/highlightCode.js +8 -27
- package/dist/src/vite/hotSnippets.d.ts +86 -0
- package/dist/src/vite/hotSnippets.js +168 -0
- package/dist/src/vite/indexFields.d.ts +61 -0
- package/dist/src/vite/indexFields.js +149 -0
- package/dist/src/vite/indexStoryFile.d.ts +19 -18
- package/dist/src/vite/indexStoryFile.js +165 -221
- package/dist/src/vite/indexedParameters.d.ts +10 -0
- package/dist/src/vite/indexedParameters.js +110 -0
- package/dist/src/vite/mcpProtocol.d.ts +36 -2
- package/dist/src/vite/mcpProtocol.js +100 -15
- package/dist/src/vite/moduleSummary.d.ts +17 -0
- package/dist/src/vite/moduleSummary.js +40 -0
- package/dist/src/vite/nearestToken.d.ts +50 -0
- package/dist/src/vite/nearestToken.js +295 -0
- package/dist/src/vite/originGuard.d.ts +87 -0
- package/dist/src/vite/originGuard.js +163 -0
- package/dist/src/vite/packedModule.d.ts +40 -0
- package/dist/src/vite/packedModule.js +74 -0
- package/dist/src/vite/pages.d.ts +63 -10
- package/dist/src/vite/pages.js +264 -33
- package/dist/src/vite/parsedFiles.d.ts +18 -0
- package/dist/src/vite/parsedFiles.js +91 -0
- package/dist/src/vite/plainGrammars.d.ts +20 -0
- package/dist/src/vite/plainGrammars.js +113 -0
- package/dist/src/vite/pluginConfig.d.ts +47 -0
- package/dist/src/vite/pluginConfig.js +220 -0
- package/dist/src/vite/pluginIds.d.ts +20 -0
- package/dist/src/vite/pluginIds.js +61 -0
- package/dist/src/vite/pluginModules.d.ts +140 -0
- package/dist/src/vite/pluginModules.js +176 -0
- package/dist/src/vite/prebundled.d.ts +18 -5
- package/dist/src/vite/prebundled.js +28 -18
- package/dist/src/vite/previewPages.d.ts +14 -0
- package/dist/src/vite/previewPages.js +81 -0
- package/dist/src/vite/previewRoute.d.ts +8 -0
- package/dist/src/vite/previewRoute.js +8 -0
- package/dist/src/vite/previewRunner.d.ts +56 -0
- package/dist/src/vite/previewRunner.js +207 -0
- package/dist/src/vite/propDocs.d.ts +60 -0
- package/dist/src/vite/propDocs.js +387 -0
- package/dist/src/vite/searchModule.d.ts +40 -0
- package/dist/src/vite/searchModule.js +212 -0
- package/dist/src/vite/searchRoute.d.ts +7 -0
- package/dist/src/vite/searchRoute.js +79 -0
- package/dist/src/vite/serverConditions.d.ts +31 -0
- package/dist/src/vite/serverConditions.js +69 -0
- package/dist/src/vite/signatureDocs.d.ts +18 -0
- package/dist/src/vite/signatureDocs.js +64 -0
- package/dist/src/vite/sourceTokens.d.ts +57 -0
- package/dist/src/vite/sourceTokens.js +164 -0
- package/dist/src/vite/storyCode.d.ts +0 -1
- package/dist/src/vite/storyCode.js +2 -3
- package/dist/src/vite/storyExports.d.ts +32 -0
- package/dist/src/vite/storyExports.js +27 -0
- package/dist/src/vite/storyFilesModule.d.ts +56 -4
- package/dist/src/vite/storyFilesModule.js +122 -34
- package/dist/src/vite/storyMeta.d.ts +20 -11
- package/dist/src/vite/storyMeta.js +74 -38
- package/dist/src/vite/storyParse.d.ts +18 -0
- package/dist/src/vite/storyParse.js +20 -0
- package/dist/src/vite/storyPlay.d.ts +29 -0
- package/dist/src/vite/storyPlay.js +54 -0
- package/dist/src/vite/storyReach.d.ts +42 -0
- package/dist/src/vite/storyReach.js +43 -0
- package/dist/src/vite/storylessRoutes.d.ts +29 -0
- package/dist/src/vite/storylessRoutes.js +126 -0
- package/dist/src/vite/textModules.d.ts +63 -0
- package/dist/src/vite/textModules.js +132 -0
- package/dist/src/vite/textQueries.d.ts +20 -0
- package/dist/src/vite/textQueries.js +20 -0
- package/dist/src/vite/themeFromTokens.d.ts +35 -0
- package/dist/src/vite/themeFromTokens.js +73 -0
- package/dist/src/vite/tokenAnswers.d.ts +20 -0
- package/dist/src/vite/tokenAnswers.js +86 -0
- package/dist/src/vite/tokenClashes.d.ts +44 -0
- package/dist/src/vite/tokenClashes.js +45 -0
- package/dist/src/vite/touchMedia.d.ts +0 -1
- package/dist/src/vite/touchMedia.js +0 -1
- package/dist/src/vite/typeScriptPieces.d.ts +0 -1
- package/dist/src/vite/typeScriptPieces.js +2 -3
- package/dist/src/vite/usageGraph.d.ts +6 -1
- package/dist/src/vite/usageGraph.js +41 -7
- package/dist/src/vite/usageGuidance.d.ts +33 -0
- package/dist/src/vite/usageGuidance.js +45 -0
- package/dist/src/vite/usageModule.d.ts +0 -1
- package/dist/src/vite/usageModule.js +0 -1
- package/dist/src/vite/vitePaths.d.ts +53 -0
- package/dist/src/vite/vitePaths.js +53 -0
- package/dist/src/worstCase.d.ts +0 -1
- package/dist/src/worstCase.js +0 -1
- package/package.json +68 -5
- package/dist/bin/forgebook/agentClient.d.ts.map +0 -1
- package/dist/bin/forgebook/agentClient.js.map +0 -1
- package/dist/bin/forgebook/agentLoopCommands.d.mts.map +0 -1
- package/dist/bin/forgebook/agentLoopCommands.mjs.map +0 -1
- package/dist/bin/forgebook/agentText.d.ts.map +0 -1
- package/dist/bin/forgebook/agentText.js.map +0 -1
- package/dist/bin/forgebook/agentsText.d.ts.map +0 -1
- package/dist/bin/forgebook/agentsText.js.map +0 -1
- package/dist/bin/forgebook/catalogueCommands.d.ts.map +0 -1
- package/dist/bin/forgebook/catalogueCommands.js.map +0 -1
- package/dist/bin/forgebook/catalogueVite.d.ts.map +0 -1
- package/dist/bin/forgebook/catalogueVite.js.map +0 -1
- package/dist/bin/forgebook/errorsRun.d.ts.map +0 -1
- package/dist/bin/forgebook/errorsRun.js.map +0 -1
- package/dist/bin/forgebook/forgebook.d.mts.map +0 -1
- package/dist/bin/forgebook/forgebook.mjs.map +0 -1
- package/dist/bin/forgebook/importers/storybook.d.ts.map +0 -1
- package/dist/bin/forgebook/importers/storybook.js.map +0 -1
- package/dist/bin/forgebook/initCommands.d.mts.map +0 -1
- package/dist/bin/forgebook/initCommands.mjs.map +0 -1
- package/dist/bin/forgebook/initConfig.d.ts.map +0 -1
- package/dist/bin/forgebook/initConfig.js.map +0 -1
- package/dist/bin/forgebook/mcpTools.d.ts.map +0 -1
- package/dist/bin/forgebook/mcpTools.js.map +0 -1
- package/dist/bin/forgebook/newStories.d.ts.map +0 -1
- package/dist/bin/forgebook/newStories.js.map +0 -1
- package/dist/bin/forgebook/newStoriesFile.d.ts.map +0 -1
- package/dist/bin/forgebook/newStoriesFile.js.map +0 -1
- package/dist/bin/forgebook/storyCheckRun.d.ts.map +0 -1
- package/dist/bin/forgebook/storyCheckRun.js.map +0 -1
- package/dist/bin/forgebook/touchWindowRun.d.ts.map +0 -1
- package/dist/bin/forgebook/touchWindowRun.js.map +0 -1
- package/dist/bin/forgebook-docs/catalogueDocs.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/catalogueDocs.js.map +0 -1
- package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/catalogueDocs.types.js.map +0 -1
- package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/catalogueMarkdown.js.map +0 -1
- package/dist/bin/forgebook-docs/catalogueOptions.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/catalogueOptions.js.map +0 -1
- package/dist/bin/forgebook-docs/collectDocs.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/collectDocs.js.map +0 -1
- package/dist/bin/forgebook-docs/forgebook-docs.d.mts.map +0 -1
- package/dist/bin/forgebook-docs/forgebook-docs.mjs.map +0 -1
- package/dist/bin/forgebook-docs/llmsText.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/llmsText.js.map +0 -1
- package/dist/bin/forgebook-docs/moduleDocs.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/moduleDocs.js.map +0 -1
- package/dist/bin/forgebook-docs/sassDocs.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/sassDocs.js.map +0 -1
- package/dist/bin/forgebook-docs/sourceId.d.ts +0 -9
- package/dist/bin/forgebook-docs/sourceId.d.ts.map +0 -1
- package/dist/bin/forgebook-docs/sourceId.js +0 -45
- package/dist/bin/forgebook-docs/sourceId.js.map +0 -1
- package/dist/bin/forgebook-texts/forgebook-texts.d.mts.map +0 -1
- package/dist/bin/forgebook-texts/forgebook-texts.mjs.map +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.d.ts.map +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.js.map +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.types.d.ts.map +0 -1
- package/dist/bin/forgebook-texts/storyTextsReport.types.js.map +0 -1
- package/dist/bin/frameworkDocs.d.ts.map +0 -1
- package/dist/bin/frameworkDocs.js.map +0 -1
- package/dist/src/a11y.d.ts.map +0 -1
- package/dist/src/a11y.js.map +0 -1
- package/dist/src/argTypes.d.ts.map +0 -1
- package/dist/src/argTypes.js.map +0 -1
- package/dist/src/backdrops.d.ts.map +0 -1
- package/dist/src/backdrops.js.map +0 -1
- package/dist/src/catalogue.d.ts.map +0 -1
- package/dist/src/catalogue.js.map +0 -1
- package/dist/src/componentDocs.d.ts.map +0 -1
- package/dist/src/componentDocs.js.map +0 -1
- package/dist/src/controlKeys.d.ts.map +0 -1
- package/dist/src/controlKeys.js.map +0 -1
- package/dist/src/frame/checkStory.d.ts.map +0 -1
- package/dist/src/frame/checkStory.js.map +0 -1
- package/dist/src/frame/frameClock.d.ts.map +0 -1
- package/dist/src/frame/frameClock.js.map +0 -1
- package/dist/src/frame/frameStatus.d.ts.map +0 -1
- package/dist/src/frame/frameStatus.js.map +0 -1
- package/dist/src/frame/frameView.d.ts.map +0 -1
- package/dist/src/frame/frameView.js.map +0 -1
- package/dist/src/frame/matrixLayout.d.ts.map +0 -1
- package/dist/src/frame/matrixLayout.js.map +0 -1
- package/dist/src/frame/measureTools.d.ts.map +0 -1
- package/dist/src/frame/measureTools.js.map +0 -1
- package/dist/src/frame/mountFrame.d.ts.map +0 -1
- package/dist/src/frame/mountFrame.js.map +0 -1
- package/dist/src/frame/playStory.d.ts.map +0 -1
- package/dist/src/frame/playStory.js.map +0 -1
- package/dist/src/frame/renderer.d.ts.map +0 -1
- package/dist/src/frame/renderer.js.map +0 -1
- package/dist/src/frame/settle.d.ts.map +0 -1
- package/dist/src/frame/settle.js.map +0 -1
- package/dist/src/frame/spillOutline.d.ts.map +0 -1
- package/dist/src/frame/spillOutline.js.map +0 -1
- package/dist/src/frame/staleModule.d.ts.map +0 -1
- package/dist/src/frame/staleModule.js.map +0 -1
- package/dist/src/frame/storyCanvas.d.ts.map +0 -1
- package/dist/src/frame/storyCanvas.js.map +0 -1
- package/dist/src/frame/storyHooks.d.ts.map +0 -1
- package/dist/src/frame/storyHooks.js.map +0 -1
- package/dist/src/frame/storyModule.d.ts.map +0 -1
- package/dist/src/frame/storyModule.js.map +0 -1
- package/dist/src/frame/storyRun.d.ts.map +0 -1
- package/dist/src/frame/storyRun.js.map +0 -1
- package/dist/src/frame/touchDots.d.ts.map +0 -1
- package/dist/src/frame/touchDots.js.map +0 -1
- package/dist/src/frame/touchEvents.d.ts.map +0 -1
- package/dist/src/frame/touchEvents.js.map +0 -1
- package/dist/src/frame/touchGesture.d.ts.map +0 -1
- package/dist/src/frame/touchGesture.js.map +0 -1
- package/dist/src/frame/touchLayer.d.ts.map +0 -1
- package/dist/src/frame/touchLayer.js.map +0 -1
- package/dist/src/frame/touchScroll.d.ts.map +0 -1
- package/dist/src/frame/touchScroll.js.map +0 -1
- package/dist/src/languages.d.ts.map +0 -1
- package/dist/src/languages.js.map +0 -1
- package/dist/src/liveErrors.d.ts.map +0 -1
- package/dist/src/liveErrors.js.map +0 -1
- package/dist/src/matrix.d.ts.map +0 -1
- package/dist/src/matrix.js.map +0 -1
- package/dist/src/messages.d.ts.map +0 -1
- package/dist/src/messages.js.map +0 -1
- package/dist/src/namedValues.d.ts.map +0 -1
- package/dist/src/namedValues.js.map +0 -1
- package/dist/src/namedViews.d.ts.map +0 -1
- package/dist/src/namedViews.js.map +0 -1
- package/dist/src/pageConfig.d.ts.map +0 -1
- package/dist/src/pageConfig.js.map +0 -1
- package/dist/src/playTrace.d.ts.map +0 -1
- package/dist/src/playTrace.js.map +0 -1
- package/dist/src/realTouch.d.ts.map +0 -1
- package/dist/src/realTouch.js.map +0 -1
- package/dist/src/shell/A11yTab.d.ts.map +0 -1
- package/dist/src/shell/A11yTab.js.map +0 -1
- package/dist/src/shell/ApiReference.d.ts.map +0 -1
- package/dist/src/shell/ApiReference.js.map +0 -1
- package/dist/src/shell/AppearanceMenu.d.ts.map +0 -1
- package/dist/src/shell/AppearanceMenu.js.map +0 -1
- package/dist/src/shell/BoxWidth.d.ts.map +0 -1
- package/dist/src/shell/BoxWidth.js.map +0 -1
- package/dist/src/shell/ClockControls.d.ts.map +0 -1
- package/dist/src/shell/ClockControls.js.map +0 -1
- package/dist/src/shell/Code.d.ts.map +0 -1
- package/dist/src/shell/Code.js.map +0 -1
- package/dist/src/shell/CodeTab.d.ts.map +0 -1
- package/dist/src/shell/CodeTab.js.map +0 -1
- package/dist/src/shell/CodeText.d.ts.map +0 -1
- package/dist/src/shell/CodeText.js.map +0 -1
- package/dist/src/shell/ComponentPage.d.ts.map +0 -1
- package/dist/src/shell/ComponentPage.js.map +0 -1
- package/dist/src/shell/ControlKeyField.d.ts.map +0 -1
- package/dist/src/shell/ControlKeyField.js.map +0 -1
- package/dist/src/shell/ControlRow.d.ts.map +0 -1
- package/dist/src/shell/ControlRow.js.map +0 -1
- package/dist/src/shell/Dock.d.ts.map +0 -1
- package/dist/src/shell/Dock.js.map +0 -1
- package/dist/src/shell/EventsTab.d.ts.map +0 -1
- package/dist/src/shell/EventsTab.js.map +0 -1
- package/dist/src/shell/Example.d.ts.map +0 -1
- package/dist/src/shell/Example.js.map +0 -1
- package/dist/src/shell/FrameView.d.ts.map +0 -1
- package/dist/src/shell/FrameView.js.map +0 -1
- package/dist/src/shell/HomePage.d.ts.map +0 -1
- package/dist/src/shell/HomePage.js.map +0 -1
- package/dist/src/shell/InfoTip.d.ts.map +0 -1
- package/dist/src/shell/InfoTip.js.map +0 -1
- package/dist/src/shell/InteractionsTab.d.ts.map +0 -1
- package/dist/src/shell/InteractionsTab.js.map +0 -1
- package/dist/src/shell/LogicMark.d.ts.map +0 -1
- package/dist/src/shell/LogicMark.js.map +0 -1
- package/dist/src/shell/MatrixPicker.d.ts.map +0 -1
- package/dist/src/shell/MatrixPicker.js.map +0 -1
- package/dist/src/shell/NamedViews.d.ts.map +0 -1
- package/dist/src/shell/NamedViews.js.map +0 -1
- package/dist/src/shell/PackageHtml.d.ts.map +0 -1
- package/dist/src/shell/PackageHtml.js.map +0 -1
- package/dist/src/shell/PartsTab.d.ts.map +0 -1
- package/dist/src/shell/PartsTab.js.map +0 -1
- package/dist/src/shell/PinnedControl.d.ts.map +0 -1
- package/dist/src/shell/PinnedControl.js.map +0 -1
- package/dist/src/shell/PropFields.d.ts.map +0 -1
- package/dist/src/shell/PropFields.js.map +0 -1
- package/dist/src/shell/PropsTab.d.ts.map +0 -1
- package/dist/src/shell/PropsTab.js.map +0 -1
- package/dist/src/shell/Segmented.d.ts.map +0 -1
- package/dist/src/shell/Segmented.js.map +0 -1
- package/dist/src/shell/Shell.d.ts.map +0 -1
- package/dist/src/shell/Shell.js.map +0 -1
- package/dist/src/shell/Sidebar.d.ts.map +0 -1
- package/dist/src/shell/Sidebar.js.map +0 -1
- package/dist/src/shell/SidebarEntries.d.ts.map +0 -1
- package/dist/src/shell/SidebarEntries.js.map +0 -1
- package/dist/src/shell/SidebarHandle.d.ts.map +0 -1
- package/dist/src/shell/SidebarHandle.js.map +0 -1
- package/dist/src/shell/SignatureReference.d.ts.map +0 -1
- package/dist/src/shell/SignatureReference.js.map +0 -1
- package/dist/src/shell/Stage.d.ts.map +0 -1
- package/dist/src/shell/Stage.js.map +0 -1
- package/dist/src/shell/StageTools.d.ts.map +0 -1
- package/dist/src/shell/StageTools.js.map +0 -1
- package/dist/src/shell/StageViewport.d.ts.map +0 -1
- package/dist/src/shell/StageViewport.js.map +0 -1
- package/dist/src/shell/StoryCodeBlock.d.ts.map +0 -1
- package/dist/src/shell/StoryCodeBlock.js.map +0 -1
- package/dist/src/shell/StoryPicker.d.ts.map +0 -1
- package/dist/src/shell/StoryPicker.js.map +0 -1
- package/dist/src/shell/Toolbar.d.ts.map +0 -1
- package/dist/src/shell/Toolbar.js.map +0 -1
- package/dist/src/shell/ToolbarControl.d.ts.map +0 -1
- package/dist/src/shell/ToolbarControl.js.map +0 -1
- package/dist/src/shell/UsedIn.d.ts.map +0 -1
- package/dist/src/shell/UsedIn.js.map +0 -1
- package/dist/src/shell/ViewMenu.d.ts.map +0 -1
- package/dist/src/shell/ViewMenu.js.map +0 -1
- package/dist/src/shell/WidthField.d.ts.map +0 -1
- package/dist/src/shell/WidthField.js.map +0 -1
- package/dist/src/shell/catalogueContext.d.ts.map +0 -1
- package/dist/src/shell/catalogueContext.js.map +0 -1
- package/dist/src/shell/codeTokens.d.ts.map +0 -1
- package/dist/src/shell/codeTokens.js.map +0 -1
- package/dist/src/shell/codeWriter.d.ts.map +0 -1
- package/dist/src/shell/codeWriter.js.map +0 -1
- package/dist/src/shell/compareVariants.d.ts.map +0 -1
- package/dist/src/shell/compareVariants.js.map +0 -1
- package/dist/src/shell/controlCycle.d.ts.map +0 -1
- package/dist/src/shell/controlCycle.js.map +0 -1
- package/dist/src/shell/dockTabs.d.ts.map +0 -1
- package/dist/src/shell/dockTabs.js.map +0 -1
- package/dist/src/shell/icons.d.ts.map +0 -1
- package/dist/src/shell/icons.js.map +0 -1
- package/dist/src/shell/keyboard.d.ts.map +0 -1
- package/dist/src/shell/keyboard.js.map +0 -1
- package/dist/src/shell/logicView.d.ts.map +0 -1
- package/dist/src/shell/logicView.js.map +0 -1
- package/dist/src/shell/mountShell.d.ts.map +0 -1
- package/dist/src/shell/mountShell.js.map +0 -1
- package/dist/src/shell/storyTouch.d.ts.map +0 -1
- package/dist/src/shell/storyTouch.js.map +0 -1
- package/dist/src/shell/strings.d.ts.map +0 -1
- package/dist/src/shell/strings.js.map +0 -1
- package/dist/src/shell/switchView.d.ts.map +0 -1
- package/dist/src/shell/switchView.js.map +0 -1
- package/dist/src/shell/treeSearch.d.ts.map +0 -1
- package/dist/src/shell/treeSearch.js.map +0 -1
- package/dist/src/shell/useAppearance.d.ts.map +0 -1
- package/dist/src/shell/useAppearance.js.map +0 -1
- package/dist/src/shell/useComponentDocs.d.ts.map +0 -1
- package/dist/src/shell/useComponentDocs.js.map +0 -1
- package/dist/src/shell/useControlKeys.d.ts.map +0 -1
- package/dist/src/shell/useControlKeys.js.map +0 -1
- package/dist/src/shell/useCopy.d.ts.map +0 -1
- package/dist/src/shell/useCopy.js.map +0 -1
- package/dist/src/shell/useFold.d.ts.map +0 -1
- package/dist/src/shell/useFold.js.map +0 -1
- package/dist/src/shell/useFrameMessages.d.ts.map +0 -1
- package/dist/src/shell/useFrameMessages.js.map +0 -1
- package/dist/src/shell/useFrameQueue.d.ts.map +0 -1
- package/dist/src/shell/useFrameQueue.js.map +0 -1
- package/dist/src/shell/useFullPage.d.ts.map +0 -1
- package/dist/src/shell/useFullPage.js.map +0 -1
- package/dist/src/shell/useLiveView.d.ts.map +0 -1
- package/dist/src/shell/useLiveView.js.map +0 -1
- package/dist/src/shell/useLoaded.d.ts.map +0 -1
- package/dist/src/shell/useLoaded.js.map +0 -1
- package/dist/src/shell/usePageDoc.d.ts.map +0 -1
- package/dist/src/shell/usePageDoc.js.map +0 -1
- package/dist/src/shell/usePopover.d.ts.map +0 -1
- package/dist/src/shell/usePopover.js.map +0 -1
- package/dist/src/shell/useRecentPages.d.ts.map +0 -1
- package/dist/src/shell/useRecentPages.js.map +0 -1
- package/dist/src/shell/useScrollMemory.d.ts.map +0 -1
- package/dist/src/shell/useScrollMemory.js.map +0 -1
- package/dist/src/shell/useShownView.d.ts.map +0 -1
- package/dist/src/shell/useShownView.js.map +0 -1
- package/dist/src/shell/useSidebarLayout.d.ts.map +0 -1
- package/dist/src/shell/useSidebarLayout.js.map +0 -1
- package/dist/src/shell/useStored.d.ts.map +0 -1
- package/dist/src/shell/useStored.js.map +0 -1
- package/dist/src/shell/useStoryCode.d.ts.map +0 -1
- package/dist/src/shell/useStoryCode.js.map +0 -1
- package/dist/src/shell/useStoryHeights.d.ts.map +0 -1
- package/dist/src/shell/useStoryHeights.js.map +0 -1
- package/dist/src/shell/useStoryIdsElement.d.ts.map +0 -1
- package/dist/src/shell/useStoryIdsElement.js.map +0 -1
- package/dist/src/shell/useStoryKeys.d.ts.map +0 -1
- package/dist/src/shell/useStoryKeys.js.map +0 -1
- package/dist/src/shell/useSystemDark.d.ts.map +0 -1
- package/dist/src/shell/useSystemDark.js.map +0 -1
- package/dist/src/shell/useToolbarLayout.d.ts.map +0 -1
- package/dist/src/shell/useToolbarLayout.js.map +0 -1
- package/dist/src/shell/useToolbarOverflow.d.ts.map +0 -1
- package/dist/src/shell/useToolbarOverflow.js.map +0 -1
- package/dist/src/shell/useWorstCase.d.ts.map +0 -1
- package/dist/src/shell/useWorstCase.js.map +0 -1
- package/dist/src/shell/worstArgs.d.ts.map +0 -1
- package/dist/src/shell/worstArgs.js.map +0 -1
- package/dist/src/sourceFiles.d.ts.map +0 -1
- package/dist/src/sourceFiles.js.map +0 -1
- package/dist/src/spills.d.ts.map +0 -1
- package/dist/src/spills.js.map +0 -1
- package/dist/src/storyBackground.d.ts.map +0 -1
- package/dist/src/storyBackground.js.map +0 -1
- package/dist/src/storyCheck.d.ts.map +0 -1
- package/dist/src/storyCheck.js.map +0 -1
- package/dist/src/storyClock.d.ts.map +0 -1
- package/dist/src/storyClock.js.map +0 -1
- package/dist/src/storyGlobals.d.ts.map +0 -1
- package/dist/src/storyGlobals.js.map +0 -1
- package/dist/src/storyHeights.d.ts.map +0 -1
- package/dist/src/storyHeights.js.map +0 -1
- package/dist/src/storyIdsElement.d.ts.map +0 -1
- package/dist/src/storyIdsElement.js.map +0 -1
- package/dist/src/storyTexts.d.ts.map +0 -1
- package/dist/src/storyTexts.js.map +0 -1
- package/dist/src/storyTree.d.ts.map +0 -1
- package/dist/src/storyTree.js.map +0 -1
- package/dist/src/switches.d.ts.map +0 -1
- package/dist/src/switches.js.map +0 -1
- package/dist/src/toolbarLayout.d.ts.map +0 -1
- package/dist/src/toolbarLayout.js.map +0 -1
- package/dist/src/usedIn.d.ts.map +0 -1
- package/dist/src/usedIn.js.map +0 -1
- package/dist/src/viewState.d.ts.map +0 -1
- package/dist/src/viewState.js.map +0 -1
- package/dist/src/viewWords.d.ts.map +0 -1
- package/dist/src/viewWords.js.map +0 -1
- package/dist/src/vite/adapter.d.ts.map +0 -1
- package/dist/src/vite/adapter.js.map +0 -1
- package/dist/src/vite/agent.types.d.ts.map +0 -1
- package/dist/src/vite/agent.types.js.map +0 -1
- package/dist/src/vite/agentApi.d.ts.map +0 -1
- package/dist/src/vite/agentApi.js.map +0 -1
- package/dist/src/vite/agentRoutes.d.ts.map +0 -1
- package/dist/src/vite/agentRoutes.js.map +0 -1
- package/dist/src/vite/autoTitle.d.ts.map +0 -1
- package/dist/src/vite/autoTitle.js.map +0 -1
- package/dist/src/vite/componentPage.d.ts.map +0 -1
- package/dist/src/vite/componentPage.js.map +0 -1
- package/dist/src/vite/config.d.ts.map +0 -1
- package/dist/src/vite/config.js.map +0 -1
- package/dist/src/vite/configFile.d.ts.map +0 -1
- package/dist/src/vite/configFile.js.map +0 -1
- package/dist/src/vite/docsExtractor.d.ts.map +0 -1
- package/dist/src/vite/docsExtractor.js.map +0 -1
- package/dist/src/vite/docsProgram.d.ts.map +0 -1
- package/dist/src/vite/docsProgram.js.map +0 -1
- package/dist/src/vite/docsWorker.d.ts.map +0 -1
- package/dist/src/vite/docsWorker.js.map +0 -1
- package/dist/src/vite/forcedStates.d.ts.map +0 -1
- package/dist/src/vite/forcedStates.js.map +0 -1
- package/dist/src/vite/forgebookPlugin.d.ts.map +0 -1
- package/dist/src/vite/forgebookPlugin.js.map +0 -1
- package/dist/src/vite/heightsRoute.d.ts.map +0 -1
- package/dist/src/vite/heightsRoute.js.map +0 -1
- package/dist/src/vite/highlightCode.d.ts.map +0 -1
- package/dist/src/vite/highlightCode.js.map +0 -1
- package/dist/src/vite/indexStoryFile.d.ts.map +0 -1
- package/dist/src/vite/indexStoryFile.js.map +0 -1
- package/dist/src/vite/mcpProtocol.d.ts.map +0 -1
- package/dist/src/vite/mcpProtocol.js.map +0 -1
- package/dist/src/vite/pages.d.ts.map +0 -1
- package/dist/src/vite/pages.js.map +0 -1
- package/dist/src/vite/prebundled.d.ts.map +0 -1
- package/dist/src/vite/prebundled.js.map +0 -1
- package/dist/src/vite/storyCode.d.ts.map +0 -1
- package/dist/src/vite/storyCode.js.map +0 -1
- package/dist/src/vite/storyFilesModule.d.ts.map +0 -1
- package/dist/src/vite/storyFilesModule.js.map +0 -1
- package/dist/src/vite/storyMeta.d.ts.map +0 -1
- package/dist/src/vite/storyMeta.js.map +0 -1
- package/dist/src/vite/touchMedia.d.ts.map +0 -1
- package/dist/src/vite/touchMedia.js.map +0 -1
- package/dist/src/vite/typeScriptPieces.d.ts.map +0 -1
- package/dist/src/vite/typeScriptPieces.js.map +0 -1
- package/dist/src/vite/usageGraph.d.ts.map +0 -1
- package/dist/src/vite/usageGraph.js.map +0 -1
- package/dist/src/vite/usageModule.d.ts.map +0 -1
- package/dist/src/vite/usageModule.js.map +0 -1
- package/dist/src/worstCase.d.ts.map +0 -1
- package/dist/src/worstCase.js.map +0 -1
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* One story alone, for a page of someone else's: no sidebar, no toolbar, no panel, nothing but the story at the width
|
|
4
|
+
* it is given, in the catalogue's theme. What `?embed` mounts instead of the shell; loaded only then.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* It stays the catalogue's page around the story's frame, so a story keeps the document of its own it has everywhere
|
|
8
|
+
* else, and whatever is not the story (the wait, the message when there is none) is drawn by the shell's style sheets
|
|
9
|
+
* with the catalogue's theme. Its appearance follows the story, so a dark story has no light edge. It never needs the
|
|
10
|
+
* browser's storage, which a third-party frame may be denied, and nothing listens to the page around it: all that
|
|
11
|
+
* crosses is the height (`EmbedSizeMessage`), for a page that wants to follow it. A page that cannot, such
|
|
12
|
+
* as a wiki with a fixed box, gets a story that fills the box and scrolls inside it when it is taller.
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
import "./embed.css";
|
|
17
|
+
import { useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
18
|
+
import { addressArgsFor } from "../addressTexts.js";
|
|
19
|
+
import { EMBED_SIZE_TYPE } from "../embed.js";
|
|
20
|
+
import { parsePanelArgsParam } from "../messages.js";
|
|
21
|
+
import { storyBackground } from "../storyBackground.js";
|
|
22
|
+
import { NOT_FIXED, withFixed } from "../storyGlobals.js";
|
|
23
|
+
import { findStory, storyTree } from "../storyTree.js";
|
|
24
|
+
import { frameAddress, parseView, STAGE_HEIGHT_RANGE } from "../viewState.js";
|
|
25
|
+
import { CatalogueContext, useCatalogue, useConfiguredCatalogue } from "./catalogueContext.js";
|
|
26
|
+
import { FrameView } from "./FrameView.js";
|
|
27
|
+
import { framesOrigin } from "./framesOrigin.js";
|
|
28
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
29
|
+
import { shellIsDark } from "./shellScheme.js";
|
|
30
|
+
import { STRINGS } from "./strings.js";
|
|
31
|
+
import { APPEARANCE_ATTRIBUTE } from "./useAppearance.js";
|
|
32
|
+
import { useFrameMessages } from "./useFrameMessages.js";
|
|
33
|
+
import { useSystemDark } from "./useSystemDark.js";
|
|
34
|
+
/** The height of the frame before its story reports its own, in CSS px, in a page with no height of its own yet. */
|
|
35
|
+
const WAITING_HEIGHT = 240;
|
|
36
|
+
/**
|
|
37
|
+
* Tells the page around the embed how tall the story is.
|
|
38
|
+
*
|
|
39
|
+
* @param height - the height, in CSS px; none until it is known, so a page never shrinks to a story still loading.
|
|
40
|
+
*/
|
|
41
|
+
const useHostHeight = (height) => {
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (height === undefined || window.parent === window)
|
|
44
|
+
return;
|
|
45
|
+
const message = { type: EMBED_SIZE_TYPE, height };
|
|
46
|
+
window.parent.postMessage(message, "*");
|
|
47
|
+
}, [height]);
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* The height the story's frame is held at: the one the address sets, or the tallest the stage allows. A story that
|
|
51
|
+
* grows with its window would otherwise grow its frame, and a page that follows it, for ever; one that is really
|
|
52
|
+
* taller scrolls inside its frame.
|
|
53
|
+
*
|
|
54
|
+
* @param view - the view.
|
|
55
|
+
* @param reported - the height the story reported, in CSS px.
|
|
56
|
+
*/
|
|
57
|
+
const heightSet = (view, reported) => {
|
|
58
|
+
if (view.height !== "auto")
|
|
59
|
+
return view.height;
|
|
60
|
+
return reported !== undefined && reported > STAGE_HEIGHT_RANGE.max ? STAGE_HEIGHT_RANGE.max : undefined;
|
|
61
|
+
};
|
|
62
|
+
/** Follows the window's height: the room the page around the embed gives it. */
|
|
63
|
+
const subscribeToResize = (onChange) => {
|
|
64
|
+
window.addEventListener("resize", onChange);
|
|
65
|
+
return () => window.removeEventListener("resize", onChange);
|
|
66
|
+
};
|
|
67
|
+
/** The window's height, in CSS px. */
|
|
68
|
+
const useWindowHeight = () => useSyncExternalStore(subscribeToResize, () => window.innerHeight);
|
|
69
|
+
/**
|
|
70
|
+
* An element's height, followed: a message wraps as the page around it narrows.
|
|
71
|
+
*
|
|
72
|
+
* @param element - the element.
|
|
73
|
+
*/
|
|
74
|
+
const useElementHeight = (element) => {
|
|
75
|
+
const [height, setHeight] = useState(undefined);
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
const shown = element.current;
|
|
78
|
+
if (shown === null)
|
|
79
|
+
return;
|
|
80
|
+
const observer = new ResizeObserver(() => setHeight(Math.ceil(shown.getBoundingClientRect().height)));
|
|
81
|
+
observer.observe(shown);
|
|
82
|
+
return () => observer.disconnect();
|
|
83
|
+
}, [element]);
|
|
84
|
+
return height;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* A text in place of a story, in the catalogue's theme; the frame's own error box would be drawn by the frame.
|
|
88
|
+
*
|
|
89
|
+
* @param props - the message, what went wrong when it is known, and whether something failed.
|
|
90
|
+
*/
|
|
91
|
+
const EmbedNotice = ({ message, detail, isFailure }) => {
|
|
92
|
+
const notice = useRef(null);
|
|
93
|
+
useHostHeight(useElementHeight(notice));
|
|
94
|
+
return (_jsxs("div", { ref: notice, className: "forgebook-embed__message", role: "alert", "data-failed": isFailure === true ? "" : undefined, children: [message, detail === undefined ? null : _jsx("p", { className: "forgebook-embed__detail", children: detail })] }));
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* The story, in its frame, as tall as it is and at least the height the window gives it.
|
|
98
|
+
*
|
|
99
|
+
* @param props - the story, the view, its args and the frame page.
|
|
100
|
+
*/
|
|
101
|
+
const EmbedStory = ({ location, view, panelArgs, frameUrl }) => {
|
|
102
|
+
const catalogue = useCatalogue();
|
|
103
|
+
const { story, component, source } = location;
|
|
104
|
+
const [fixed, setFixed] = useState(NOT_FIXED);
|
|
105
|
+
const [failure, setFailure] = useState(undefined);
|
|
106
|
+
const { heights, settled } = useFrameMessages({
|
|
107
|
+
onReady: (frame, message) => {
|
|
108
|
+
setFixed(message.fixed);
|
|
109
|
+
setFailure(undefined);
|
|
110
|
+
const args = { type: "forgebook:args", args: panelArgs };
|
|
111
|
+
frame.postMessage(args, framesOrigin());
|
|
112
|
+
},
|
|
113
|
+
onCall: () => undefined,
|
|
114
|
+
onFailed: (_storyId, message) => setFailure(message)
|
|
115
|
+
});
|
|
116
|
+
const shownView = withFixed(view, fixed);
|
|
117
|
+
const isSystemDark = useSystemDark();
|
|
118
|
+
const isDark = shellIsDark({
|
|
119
|
+
appearance: "story",
|
|
120
|
+
values: shownView.switches,
|
|
121
|
+
switches: catalogue.switches,
|
|
122
|
+
isSystemDark,
|
|
123
|
+
isComparing: false
|
|
124
|
+
});
|
|
125
|
+
useEffect(() => {
|
|
126
|
+
document.documentElement.setAttribute(APPEARANCE_ATTRIBUTE, isDark ? "dark" : "light");
|
|
127
|
+
}, [isDark]);
|
|
128
|
+
const windowHeight = useWindowHeight();
|
|
129
|
+
// the frame's address is the one the page opened with: what the story fixes comes from the frame itself, and a new
|
|
130
|
+
// address would load it again
|
|
131
|
+
const address = frameAddress(frameUrl, story.id, view, catalogue.switches);
|
|
132
|
+
const reported = settled.has(address) ? heights.get(address) : undefined;
|
|
133
|
+
const fixedHeight = heightSet(shownView, reported);
|
|
134
|
+
const ownHeight = fixedHeight ?? (reported === undefined ? undefined : Math.max(reported, story.height ?? 0));
|
|
135
|
+
useHostHeight(failure === undefined ? ownHeight : undefined);
|
|
136
|
+
return (_jsxs("main", { className: "forgebook-embed", style: {
|
|
137
|
+
backgroundColor: storyBackground(source.background, shownView, catalogue, isSystemDark)
|
|
138
|
+
}, children: [failure === undefined ? null : (_jsx(EmbedNotice, { message: STRINGS.embedFailed, detail: failure, isFailure: true })), _jsx("div", { className: "forgebook-embed__story", hidden: failure !== undefined, style: { width: shownView.width === "fill" ? undefined : shownView.width }, children: _jsx(FrameView, { title: STRINGS.frameTitle(component.name, story.name), address: address, heights: heights, settled: settled, fallbackHeight: WAITING_HEIGHT, sceneHeight: Math.max(story.height ?? 0, windowHeight), fixedHeight: fixedHeight }) })] }));
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* The page: the story the address names, or why there is none.
|
|
142
|
+
*
|
|
143
|
+
* @param props - the catalogue's name, its sources, its frame page, and how its stories take the address's texts.
|
|
144
|
+
*/
|
|
145
|
+
const EmbedContent = ({ title, sources, frameUrl, addressTexts }) => {
|
|
146
|
+
const catalogue = useCatalogue();
|
|
147
|
+
const tree = useMemo(() => storyTree(sources), [sources]);
|
|
148
|
+
// the address is read once: an embed has nowhere to go, so nothing rewrites it
|
|
149
|
+
const [params] = useState(() => new URLSearchParams(window.location.search));
|
|
150
|
+
const storyId = params.get("story");
|
|
151
|
+
const location = storyId === null ? undefined : findStory(tree, storyId);
|
|
152
|
+
const name = location?.component.name;
|
|
153
|
+
useEffect(() => {
|
|
154
|
+
document.title = name === undefined ? title : `${name} · ${title}`;
|
|
155
|
+
}, [name, title]);
|
|
156
|
+
if (location === undefined) {
|
|
157
|
+
return (_jsx("main", { className: "forgebook-embed", children: _jsx(EmbedNotice, { message: storyId === null ? LATER_STRINGS.embedNoStory : LATER_STRINGS.embedUnknownStory(storyId) }) }));
|
|
158
|
+
}
|
|
159
|
+
return (_jsx(EmbedStory, { location: location, view: parseView(params.toString(), catalogue),
|
|
160
|
+
// whoever embeds the story writes its address, as whoever shares a link does: the same rule applies
|
|
161
|
+
panelArgs: addressArgsFor(parsePanelArgsParam(params.get("args")), addressTexts), frameUrl: frameUrl }));
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* One story alone, inside the catalogue's settings.
|
|
165
|
+
*
|
|
166
|
+
* @param props - the catalogue's configuration.
|
|
167
|
+
*/
|
|
168
|
+
export const EmbedPage = (props) => (_jsx(CatalogueContext.Provider, { value: useConfiguredCatalogue(props), children: _jsx(EmbedContent, { title: props.title, sources: props.sources, frameUrl: props.frameUrl, addressTexts: props.addressTexts ?? "any" }) }));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the Embed button opens: the story's link, for a wiki or Notion, and its HTML, for a page of one's own, each with
|
|
3
|
+
* a button that copies it. Loaded the first time it opens.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import "./embed.scss";
|
|
8
|
+
import { type ReactNode } from "react";
|
|
9
|
+
/** What the panel shows. */
|
|
10
|
+
export type EmbedPanelProps = {
|
|
11
|
+
/** The story's id. */
|
|
12
|
+
readonly storyId: string;
|
|
13
|
+
/** The iframe's accessible title. */
|
|
14
|
+
readonly title: string;
|
|
15
|
+
/** The view and the args to embed the story in, as the address's query. */
|
|
16
|
+
readonly query: string;
|
|
17
|
+
/** The story's height now, in CSS px: what the iframe starts at. */
|
|
18
|
+
readonly height: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* The panel.
|
|
22
|
+
*
|
|
23
|
+
* @param props - the story, its view and its height.
|
|
24
|
+
*/
|
|
25
|
+
export declare const EmbedPanel: ({ storyId, title, query, height }: EmbedPanelProps) => ReactNode;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* What the Embed button opens: the story's link, for a wiki or Notion, and its HTML, for a page of one's own, each with
|
|
4
|
+
* a button that copies it. Loaded the first time it opens.
|
|
5
|
+
*
|
|
6
|
+
* @module
|
|
7
|
+
*/
|
|
8
|
+
import "./embed.css";
|
|
9
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
10
|
+
import { embedAddressOf, embedCode, isLocalAddress } from "../embedCode.js";
|
|
11
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
12
|
+
import { STRINGS } from "./strings.js";
|
|
13
|
+
import { useCopy } from "./useCopy.js";
|
|
14
|
+
/**
|
|
15
|
+
* One text to copy: its label, the text in a field that selects it when focused, and the button.
|
|
16
|
+
*
|
|
17
|
+
* @param props - the label, the text, and whether the panel's focus starts here.
|
|
18
|
+
*/
|
|
19
|
+
const EmbedField = ({ label, value, isFirst }) => {
|
|
20
|
+
const { isCopied, hasFailed, copy } = useCopy();
|
|
21
|
+
const id = useId();
|
|
22
|
+
const field = useRef(null);
|
|
23
|
+
// the panel loads after the popover opens, so the popover's own focus finds nothing to take it
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (isFirst === true)
|
|
26
|
+
field.current?.focus();
|
|
27
|
+
}, [isFirst]);
|
|
28
|
+
// with no clipboard, the text selected is one key away
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (hasFailed)
|
|
31
|
+
field.current?.select();
|
|
32
|
+
}, [hasFailed]);
|
|
33
|
+
const buttonText = isCopied ? STRINGS.copied : LATER_STRINGS.copy;
|
|
34
|
+
return (_jsxs("div", { className: "forgebook-embed-field", children: [_jsx("label", { className: "forgebook-embed-field__label", htmlFor: id, children: label }), _jsx("input", { ref: field, id: id, className: "forgebook-embed-field__value", readOnly: true, value: value, onFocus: (event) => event.currentTarget.select() }), _jsx("button", { type: "button", className: "forgebook-button", "aria-label": `${LATER_STRINGS.copy}: ${label}`, "aria-live": "polite", onClick: () => copy(value), children: hasFailed ? LATER_STRINGS.embedCopyFailed : buttonText })] }));
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* The panel.
|
|
38
|
+
*
|
|
39
|
+
* @param props - the story, its view and its height.
|
|
40
|
+
*/
|
|
41
|
+
export const EmbedPanel = ({ storyId, title, query, height }) => {
|
|
42
|
+
const [isFollowing, setIsFollowing] = useState(false);
|
|
43
|
+
const page = `${window.location.origin}${window.location.pathname}`;
|
|
44
|
+
const link = embedAddressOf(page, storyId, query);
|
|
45
|
+
return (_jsxs(_Fragment, { children: [_jsx("p", { className: "forgebook-embed-panel__hint", children: LATER_STRINGS.embedHint }), _jsx(EmbedField, { label: LATER_STRINGS.embedLink, value: link, isFirst: true }), _jsx(EmbedField, { label: LATER_STRINGS.embedCode, value: embedCode({ link, title, height, isFollowing }) }), _jsxs("label", { className: "forgebook-embed-panel__follow", children: [_jsx("input", { type: "checkbox", role: "switch", "aria-checked": isFollowing, className: "forgebook-switch", checked: isFollowing, onChange: (event) => setIsFollowing(event.currentTarget.checked) }), LATER_STRINGS.embedFollow] }), isFollowing ? _jsx("p", { className: "forgebook-embed-panel__hint", children: LATER_STRINGS.embedFollowHint }) : null, isLocalAddress(link) ? (_jsx("p", { className: "forgebook-embed-panel__hint", "data-warning": "", children: LATER_STRINGS.embedLocal })) : null] }));
|
|
46
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Code } from "./Code.js";
|
|
3
|
-
import {
|
|
3
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
4
4
|
/** An event's signature as TypeScript would write it. */
|
|
5
5
|
const signatureText = (event) => event.signature === undefined
|
|
6
6
|
? event.type
|
|
@@ -22,5 +22,4 @@ const CallLine = ({ call }) => {
|
|
|
22
22
|
*
|
|
23
23
|
* @param props - the events, the calls and how to clear them.
|
|
24
24
|
*/
|
|
25
|
-
export const EventsTab = ({ events, calls, onClearCalls }) => (_jsxs("div", { className: "forgebook-tab-columns", children: [_jsxs("div", { className: "forgebook-prop-group", children: [_jsx("h3", { className: "forgebook-prop-group__title", children:
|
|
26
|
-
//# sourceMappingURL=EventsTab.js.map
|
|
25
|
+
export const EventsTab = ({ events, calls, onClearCalls }) => (_jsxs("div", { className: "forgebook-tab-columns", children: [events.length === 0 ? null : (_jsxs("div", { className: "forgebook-prop-group", children: [_jsx("h3", { className: "forgebook-prop-group__title", children: LATER_STRINGS.events }), events.map((event) => (_jsxs("div", { className: "forgebook-event", children: [_jsx("code", { className: "forgebook-prop__name", children: event.name }), _jsx(Code, { text: signatureText(event), names: event.signature?.parameters.map((parameter) => parameter.name) ?? [] }), _jsx("p", { className: "forgebook-prop__description", children: event.description })] }, event.name)))] })), _jsxs("div", { className: "forgebook-prop-group forgebook-calls", children: [_jsxs("div", { className: "forgebook-calls__head", children: [_jsx("h3", { className: "forgebook-prop-group__title", children: LATER_STRINGS.calls }), _jsx("button", { type: "button", className: "forgebook-text-button", onClick: onClearCalls, children: LATER_STRINGS.clearCalls })] }), calls.length === 0 ? _jsx("p", { className: "forgebook-prop__description", children: LATER_STRINGS.noCalls }) : null, _jsx("ol", { className: "forgebook-calls__list", "aria-live": "polite", children: calls.map((call) => (_jsxs("li", { className: "forgebook-calls__item", children: [_jsx(CallLine, { call: call }), _jsx("time", { className: "forgebook-calls__time", dateTime: new Date(call.time).toISOString(), children: new Date(call.time).toLocaleTimeString() })] }, `${call.time}-${call.name}-${call.values.join(",")}`))) })] })] }));
|
|
@@ -12,6 +12,15 @@ import type { ViewSwitch } from "../switches.ts";
|
|
|
12
12
|
import { type ViewState } from "../viewState.ts";
|
|
13
13
|
import { type StoryTouches } from "./storyTouch.ts";
|
|
14
14
|
import type { Loaded } from "./useLoaded.ts";
|
|
15
|
+
/** How a page's audience draws its examples. */
|
|
16
|
+
export type ExampleReading = {
|
|
17
|
+
/** Whether the examples offer their code. */
|
|
18
|
+
readonly hasCode: boolean;
|
|
19
|
+
/** Whether their code starts open. */
|
|
20
|
+
readonly isCodeOpen: boolean;
|
|
21
|
+
/** Whether the demo is drawn larger, with more room around it. */
|
|
22
|
+
readonly isDemoLarge: boolean;
|
|
23
|
+
};
|
|
15
24
|
/** What every example of the page shares: the frames' address, view and reports, the code, how to open a story. */
|
|
16
25
|
export type ExampleContext = {
|
|
17
26
|
/** The component. */
|
|
@@ -38,7 +47,7 @@ export type ExampleContext = {
|
|
|
38
47
|
readonly settled: ReadonlySet<string>;
|
|
39
48
|
/** The story file's code. */
|
|
40
49
|
readonly code: Loaded<StoryFileCode>;
|
|
41
|
-
/** The component's name, for the
|
|
50
|
+
/** The component's name as code writes it (`codeNameOf`), for the code of a story drawn from its args. */
|
|
42
51
|
readonly componentName: string;
|
|
43
52
|
/** A story's own args, as its frame reported them; none before it loads. */
|
|
44
53
|
readonly argsOf: (storyId: string) => PanelArgs;
|
|
@@ -46,7 +55,17 @@ export type ExampleContext = {
|
|
|
46
55
|
readonly heightOf: (storyId: string) => number | undefined;
|
|
47
56
|
/** The colour the stories' page has, which each box waits on. */
|
|
48
57
|
readonly background: string | undefined;
|
|
58
|
+
/** How the page's audience draws its examples. */
|
|
59
|
+
readonly reading: ExampleReading;
|
|
49
60
|
};
|
|
61
|
+
/** A link to a story's own page, opened in place unless the user asks for another tab. */
|
|
62
|
+
export declare const StoryLink: ({ story, hrefOf, onOpen, className, label, children }: Pick<ExampleContext, "hrefOf" | "onOpen"> & {
|
|
63
|
+
readonly story: TreeStory;
|
|
64
|
+
readonly className: string;
|
|
65
|
+
/** The link's name when its text is the same for every story; its text by default. */
|
|
66
|
+
readonly label?: string;
|
|
67
|
+
readonly children: ReactNode;
|
|
68
|
+
}) => ReactNode;
|
|
50
69
|
/**
|
|
51
70
|
* One example: its title and description (the demo has none: it opens the page), its story in a frame, and a bar
|
|
52
71
|
* that shows its code and opens the story on its own page.
|
|
@@ -60,4 +79,3 @@ export declare const Example: ({ story, isDemo, isMounted, observe, ...context }
|
|
|
60
79
|
readonly isMounted: boolean;
|
|
61
80
|
readonly observe?: (element: HTMLElement | null) => void;
|
|
62
81
|
}) => ReactNode;
|
|
63
|
-
//# sourceMappingURL=Example.d.ts.map
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { deviceDefaultOf, shownDevice } from "../deviceView.js";
|
|
4
|
+
import { frameAddress, schemeOf } from "../viewState.js";
|
|
4
5
|
import { BoxWidthControl, useBoxWidth } from "./BoxWidth.js";
|
|
5
6
|
import { CodeText } from "./CodeText.js";
|
|
6
7
|
import { useCatalogue } from "./catalogueContext.js";
|
|
7
8
|
import { useCodeWriter } from "./codeWriter.js";
|
|
9
|
+
import { DeviceSlot, deviceAddress, inkScheme, isWaitingForDevice, roomSizing, useFramedDevice } from "./DeviceSlot.js";
|
|
8
10
|
import { FrameView } from "./FrameView.js";
|
|
9
11
|
import { Icon } from "./icons.js";
|
|
12
|
+
import { LATER_STRINGS } from "./laterStrings.js";
|
|
10
13
|
import { StageViewport } from "./StageViewport.js";
|
|
11
14
|
import { StoryCodeBlock, storyCodeText } from "./StoryCodeBlock.js";
|
|
12
15
|
import { touchedView } from "./storyTouch.js";
|
|
@@ -14,12 +17,15 @@ import { STRINGS } from "./strings.js";
|
|
|
14
17
|
import { useCopy } from "./useCopy.js";
|
|
15
18
|
import { useFullPage } from "./useFullPage.js";
|
|
16
19
|
import { useLoadedView } from "./useLiveView.js";
|
|
20
|
+
import { useSystemDark } from "./useSystemDark.js";
|
|
17
21
|
/** The height of a frame before its story reports its own, in CSS px. */
|
|
18
22
|
const FALLBACK_HEIGHT = 160;
|
|
19
23
|
/** The demo's height before its story reports its own, in CSS px: the demo is the page's first, larger frame. */
|
|
20
24
|
const DEMO_FALLBACK_HEIGHT = 280;
|
|
25
|
+
/** The least height of a demo an audience draws larger, in CSS px: its room, never a scale, so its sizes stay true. */
|
|
26
|
+
const LARGE_DEMO_HEIGHT = 360;
|
|
21
27
|
/** A link to a story's own page, opened in place unless the user asks for another tab. */
|
|
22
|
-
const StoryLink = ({ story, hrefOf, onOpen, className, label, children }) => (_jsx("a", { className: className, "aria-label": label, href: hrefOf(story), onClick: (event) => {
|
|
28
|
+
export const StoryLink = ({ story, hrefOf, onOpen, className, label, children }) => (_jsx("a", { className: className, "aria-label": label, href: hrefOf(story), onClick: (event) => {
|
|
23
29
|
if (event.metaKey || event.ctrlKey || event.shiftKey || event.button !== 0)
|
|
24
30
|
return;
|
|
25
31
|
event.preventDefault();
|
|
@@ -33,7 +39,7 @@ const StoryLink = ({ story, hrefOf, onOpen, className, label, children }) => (_j
|
|
|
33
39
|
const ExampleCode = ({ id, source, isShown }) => {
|
|
34
40
|
const { isCopied, copy } = useCopy();
|
|
35
41
|
const write = useCodeWriter();
|
|
36
|
-
return (_jsx("div", { id: id, className: "forgebook-example__code", "data-open": isShown ? "" : undefined, inert: !isShown, children: _jsxs("div", { className: "forgebook-example__code-inner", children: [_jsx("button", { type: "button", className: "forgebook-example__copy", onClick: () => copy(storyCodeText(source, write)), "aria-live": "polite", children: isCopied ? STRINGS.copied :
|
|
42
|
+
return (_jsx("div", { id: id, className: "forgebook-example__code", "data-open": isShown ? "" : undefined, inert: !isShown, children: _jsxs("div", { className: "forgebook-example__code-inner", children: [_jsx("button", { type: "button", className: "forgebook-example__copy", onClick: () => copy(storyCodeText(source, write)), "aria-live": "polite", children: isCopied ? STRINGS.copied : LATER_STRINGS.copy }), _jsx(StoryCodeBlock, { ...source })] }) }));
|
|
37
43
|
};
|
|
38
44
|
/**
|
|
39
45
|
* The height an example's story is drawn at least at: its scene's, and over the page the room its stage has.
|
|
@@ -61,16 +67,68 @@ const FullPageSlot = ({ full }) => (_jsxs(_Fragment, { children: [_jsx("div", {
|
|
|
61
67
|
*
|
|
62
68
|
* @param props - the story, whether its finger is on, and how to change it.
|
|
63
69
|
*/
|
|
64
|
-
const TouchToggle = ({ story, isTouch, onTouchChange }) => (_jsxs("label", { className: "forgebook-example__touch", children: [_jsx("input", { type: "checkbox", role: "switch", "aria-checked": isTouch, "aria-label":
|
|
70
|
+
const TouchToggle = ({ story, isTouch, onTouchChange }) => (_jsxs("label", { className: "forgebook-example__touch", children: [_jsx("input", { type: "checkbox", role: "switch", "aria-checked": isTouch, "aria-label": LATER_STRINGS.touchNamed(story.name), className: "forgebook-switch", checked: isTouch, onChange: (event) => onTouchChange(story.id, event.currentTarget.checked) }), LATER_STRINGS.touch] }));
|
|
65
71
|
/**
|
|
66
72
|
* An example's bar: its code shown or hidden, the story's width while its box fills the page, its box filling the page
|
|
67
73
|
* or back in its place, and its story opened on its own page.
|
|
68
74
|
*
|
|
69
75
|
* @param props - the story, what every example shares, its code's state and its box's state over the page.
|
|
70
76
|
*/
|
|
71
|
-
const ExampleBar = ({ story, context, hasCode, isCodeShown, onCodeShownChange, codeId, full, boxWidth }) => {
|
|
77
|
+
const ExampleBar = ({ story, context, hasCode, isCodeShown, onCodeShownChange, codeId, full, boxWidth, isFramed }) => {
|
|
72
78
|
const isTouch = context.touches.get(story.id);
|
|
73
|
-
return (_jsxs("div", { className: "forgebook-example__bar", children: [hasCode ? (_jsxs("button", { type: "button", className: "forgebook-example__toggle", "aria-expanded": isCodeShown, "aria-controls": codeId, onClick: () => onCodeShownChange(!isCodeShown), children: [_jsx(Icon, { name: "chevronRight", size: 12 }), isCodeShown ?
|
|
79
|
+
return (_jsxs("div", { className: "forgebook-example__bar", children: [hasCode ? (_jsxs("button", { type: "button", className: "forgebook-example__toggle", "aria-expanded": isCodeShown, "aria-controls": codeId, onClick: () => onCodeShownChange(!isCodeShown), children: [_jsx(Icon, { name: "chevronRight", size: 12 }), isCodeShown ? LATER_STRINGS.hideCode : LATER_STRINGS.showCode] })) : null, isTouch === undefined ? null : (_jsx(TouchToggle, { story: story, isTouch: isTouch, onTouchChange: context.onTouchChange })), isFramed ? null : _jsx(BoxWidthControl, { boxWidth: boxWidth }), _jsxs("button", { type: "button", className: "forgebook-example__full", "aria-label": full.isFull ? LATER_STRINGS.backToPlaceNamed(story.name) : LATER_STRINGS.fillPageNamed(story.name), onClick: (event) => full.toggle(event), children: [_jsx(Icon, { name: full.isFull ? "collapse" : "expand", size: 12 }), full.isFull ? LATER_STRINGS.backToPlace : LATER_STRINGS.fillPage] }), _jsxs(StoryLink, { story: story, hrefOf: context.hrefOf, onOpen: context.onOpen, className: "forgebook-example__open", label: LATER_STRINGS.openStoryNamed(story.name), children: [LATER_STRINGS.openStory, _jsx(Icon, { name: "external", size: 12 })] })] }));
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* An example's code: what it shows, whether its audience offers it, and whether it is open: the audience's default until
|
|
83
|
+
* the person says otherwise, so changing audience opens or closes what they left alone.
|
|
84
|
+
*
|
|
85
|
+
* @param story - the story.
|
|
86
|
+
* @param context - what every example shares.
|
|
87
|
+
*/
|
|
88
|
+
const useExampleCode = (story, context) => {
|
|
89
|
+
const [ownCodeShown, setIsCodeShown] = useState(undefined);
|
|
90
|
+
const source = context.code.status === "ready"
|
|
91
|
+
? {
|
|
92
|
+
code: context.code.value,
|
|
93
|
+
exportName: story.exportName,
|
|
94
|
+
componentName: context.componentName,
|
|
95
|
+
args: context.argsOf(story.id)
|
|
96
|
+
}
|
|
97
|
+
: undefined;
|
|
98
|
+
return {
|
|
99
|
+
source,
|
|
100
|
+
hasCode: source !== undefined && context.reading.hasCode,
|
|
101
|
+
isCodeShown: ownCodeShown ?? context.reading.isCodeOpen,
|
|
102
|
+
setIsCodeShown
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* The device an example is drawn in, over the page as in the list: the view's choice over the story's and the
|
|
107
|
+
* catalogue's defaults, and the ink of its status bar.
|
|
108
|
+
*
|
|
109
|
+
* @param story - the story.
|
|
110
|
+
* @param context - the page's view and switches.
|
|
111
|
+
*/
|
|
112
|
+
const useExampleDevice = (story, context) => {
|
|
113
|
+
const shown = shownDevice(context.view, deviceDefaultOf(useCatalogue().device, story.device));
|
|
114
|
+
return {
|
|
115
|
+
shown,
|
|
116
|
+
framed: useFramedDevice(shown),
|
|
117
|
+
scheme: inkScheme(schemeOf(context.view, context.switches), useSystemDark())
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* The heights an example's frame waits at: the story's measured one when there is one, a guess otherwise (larger for
|
|
122
|
+
* the demo), never below the height its scene needs; and the least a large demo is given.
|
|
123
|
+
*
|
|
124
|
+
* @param story - the story.
|
|
125
|
+
* @param context - the page's measured heights and how it reads.
|
|
126
|
+
* @param isDemo - whether it is the page's demo.
|
|
127
|
+
*/
|
|
128
|
+
const exampleHeights = (story, context, isDemo) => {
|
|
129
|
+
const least = isDemo && context.reading.isDemoLarge ? LARGE_DEMO_HEIGHT : 0;
|
|
130
|
+
const guess = isDemo ? DEMO_FALLBACK_HEIGHT : FALLBACK_HEIGHT;
|
|
131
|
+
return { fallback: Math.max(story.height ?? 0, context.heightOf(story.id) ?? guess, least), least };
|
|
74
132
|
};
|
|
75
133
|
/**
|
|
76
134
|
* One example: its title and description (the demo has none: it opens the page), its story in a frame, and a bar
|
|
@@ -80,26 +138,21 @@ const ExampleBar = ({ story, context, hasCode, isCodeShown, onCodeShownChange, c
|
|
|
80
138
|
* every example shares.
|
|
81
139
|
*/
|
|
82
140
|
export const Example = ({ story, isDemo, isMounted, observe, ...context }) => {
|
|
83
|
-
const
|
|
141
|
+
const { source, hasCode, isCodeShown, setIsCodeShown } = useExampleCode(story, context);
|
|
84
142
|
const codeId = useId();
|
|
85
143
|
const full = useFullPage();
|
|
86
144
|
const { touch } = useCatalogue();
|
|
145
|
+
const { shown, framed, scheme } = useExampleDevice(story, context);
|
|
87
146
|
// the frame loads with the story's finger as it is then; a change after reaches it live, keeping the story's state
|
|
88
147
|
const loadedView = useLoadedView(context.frameView.sheets, touchedView(context.frameView, story.id, context.touches, touch));
|
|
89
148
|
const boxWidth = useBoxWidth(full.isOver, context.view.width);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
: undefined;
|
|
101
|
-
return (_jsxs("article", { ref: observe, className: "forgebook-example", "data-demo": isDemo ? "" : undefined, "aria-label": isDemo ? STRINGS.frameTitle(context.component.name, story.name) : story.name, children: [isDemo ? null : _jsx(ExampleHead, { story: story, context: context }), full.isOver ? _jsx(FullPageSlot, { full: full }) : null, _jsxs("div", { ref: full.boxRef, className: "forgebook-example__box", "data-full": full.isOver ? "" : undefined, ...(full.isFull ? { role: "dialog", "aria-label": story.name } : {}), children: [_jsx("div", { ref: full.stageRef, className: "forgebook-example__stage", children: _jsx(StageViewport, { width: boxWidth.width, onWidthChange: boxWidth.onWidthChange, onShownWidthChange: boxWidth.onShownWidthChange, background: context.background, children: isMounted ? (_jsx(FrameView, { title: STRINGS.frameTitle(context.component.name, story.name), address: frameAddress(context.frameUrl, story.id, loadedView, context.switches), heights: context.heights, settled: context.settled, fallbackHeight: fallbackHeight,
|
|
102
|
-
// over the page, the story fills the room it has
|
|
103
|
-
sceneHeight: sceneHeightOf(story, full.stageHeight) })) : (_jsx("div", { className: "forgebook-frame-placeholder", style: { height: fallbackHeight } })) }) }), _jsx(ExampleBar, { story: story, context: context, hasCode: source !== undefined, isCodeShown: isCodeShown, onCodeShownChange: setIsCodeShown, codeId: codeId, full: full, boxWidth: boxWidth }), source === undefined ? null : _jsx(ExampleCode, { id: codeId, source: source, isShown: isCodeShown })] })] }));
|
|
149
|
+
const { fallback: fallbackHeight, least: leastHeight } = exampleHeights(story, context, isDemo);
|
|
150
|
+
return (_jsxs("article", { ref: observe, className: "forgebook-example", "data-demo": isDemo ? "" : undefined, "aria-label": isDemo ? STRINGS.frameTitle(context.component.name, story.name) : story.name, children: [isDemo ? null : _jsx(ExampleHead, { story: story, context: context }), full.isOver ? _jsx(FullPageSlot, { full: full }) : null, _jsxs("div", { ref: full.boxRef, className: "forgebook-example__box", "data-full": full.isOver ? "" : undefined, ...(full.isFull ? { role: "dialog", "aria-label": story.name } : {}), children: [_jsx("div", { ref: full.stageRef, className: "forgebook-example__stage", children: _jsx(StageViewport, { ...roomSizing(framed, {
|
|
151
|
+
width: boxWidth.width,
|
|
152
|
+
onWidthChange: boxWidth.onWidthChange,
|
|
153
|
+
onShownWidthChange: boxWidth.onShownWidthChange,
|
|
154
|
+
background: context.background
|
|
155
|
+
}), children: _jsx(DeviceSlot, { framed: framed, scheme: scheme, background: context.background, children: isMounted && !isWaitingForDevice(shown, framed) ? (_jsx(FrameView, { title: STRINGS.frameTitle(context.component.name, story.name), address: deviceAddress(frameAddress(context.frameUrl, story.id, loadedView, context.switches), framed), heights: context.heights, settled: context.settled, fallbackHeight: fallbackHeight,
|
|
156
|
+
// over the page, the story fills the room it has
|
|
157
|
+
sceneHeight: Math.max(sceneHeightOf(story, full.stageHeight) ?? 0, leastHeight), fixedHeight: framed?.area.height })) : (_jsx("div", { className: "forgebook-frame-placeholder", style: { height: framed?.area.height ?? fallbackHeight } })) }) }) }), _jsx(ExampleBar, { story: story, context: context, hasCode: hasCode, isCodeShown: isCodeShown, onCodeShownChange: setIsCodeShown, codeId: codeId, full: full, boxWidth: boxWidth, isFramed: framed !== undefined }), source === undefined || !hasCode ? null : (_jsx(ExampleCode, { id: codeId, source: source, isShown: isCodeShown }))] })] }));
|
|
104
158
|
};
|
|
105
|
-
//# sourceMappingURL=Example.js.map
|
|
@@ -23,7 +23,7 @@ export type FrameViewProps = {
|
|
|
23
23
|
*/
|
|
24
24
|
readonly sceneHeight?: number | undefined;
|
|
25
25
|
/**
|
|
26
|
-
* A height set on the stage (the foot handle
|
|
26
|
+
* A height set on the stage (the foot handle), in CSS px: the frame takes it whatever its story's;
|
|
27
27
|
* none by default.
|
|
28
28
|
*/
|
|
29
29
|
readonly fixedHeight?: number | undefined;
|
|
@@ -53,4 +53,3 @@ export declare const tellFrames: (container: HTMLElement | null, message: ShellM
|
|
|
53
53
|
* @param messageOf - the message for a frame's story (the address's `story`; none when it names none).
|
|
54
54
|
*/
|
|
55
55
|
export declare const tellEachFrame: (container: HTMLElement | null, messageOf: (storyId: string | undefined) => ShellMessage) => void;
|
|
56
|
-
//# sourceMappingURL=FrameView.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { framesOrigin, storyFrameAttributes } from "./framesOrigin.js";
|
|
2
3
|
import { STRINGS } from "./strings.js";
|
|
3
4
|
/**
|
|
4
5
|
* A story's frame, as tall as its story.
|
|
@@ -13,7 +14,7 @@ export const FrameView = ({ title, address, heights, fallbackHeight, settled, sc
|
|
|
13
14
|
const reported = heights.get(address);
|
|
14
15
|
const contentHeight = isLoading ? Math.max(reported ?? 0, fallbackHeight) : (reported ?? fallbackHeight);
|
|
15
16
|
const height = fixedHeight ?? Math.max(contentHeight, sceneHeight);
|
|
16
|
-
return (_jsxs("div", { className: "forgebook-frame-box", "data-loading": isLoading ? "" : undefined, children: [_jsx("iframe", { ref: ref, className: "forgebook-frame-view", title: title, src: address, style: { height } }), isLoading ? (_jsx("div", { className: "forgebook-frame-loading", role: "status", children: _jsxs("span", { className: "forgebook-frame-loading__label", children: [_jsx("span", { className: "forgebook-spinner", "aria-hidden": "true" }), STRINGS.loadingStory] }) })) : null] }));
|
|
17
|
+
return (_jsxs("div", { className: "forgebook-frame-box", "data-loading": isLoading ? "" : undefined, children: [_jsx("iframe", { ref: ref, className: "forgebook-frame-view", title: title, src: address, ...storyFrameAttributes(), style: { height } }), isLoading ? (_jsx("div", { className: "forgebook-frame-loading", role: "status", children: _jsxs("span", { className: "forgebook-frame-loading__label", children: [_jsx("span", { className: "forgebook-spinner", "aria-hidden": "true" }), STRINGS.loadingStory] }) })) : null] }));
|
|
17
18
|
};
|
|
18
19
|
/**
|
|
19
20
|
* Sends a message to every frame inside an element.
|
|
@@ -23,7 +24,7 @@ export const FrameView = ({ title, address, heights, fallbackHeight, settled, sc
|
|
|
23
24
|
*/
|
|
24
25
|
export const tellFrames = (container, message) => {
|
|
25
26
|
for (const frame of container?.querySelectorAll("iframe") ?? []) {
|
|
26
|
-
frame.contentWindow?.postMessage(message,
|
|
27
|
+
frame.contentWindow?.postMessage(message, framesOrigin());
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
@@ -35,7 +36,6 @@ export const tellFrames = (container, message) => {
|
|
|
35
36
|
export const tellEachFrame = (container, messageOf) => {
|
|
36
37
|
for (const frame of container?.querySelectorAll("iframe") ?? []) {
|
|
37
38
|
const storyId = new URL(frame.src, window.location.href).searchParams.get("story") ?? undefined;
|
|
38
|
-
frame.contentWindow?.postMessage(messageOf(storyId),
|
|
39
|
+
frame.contentWindow?.postMessage(messageOf(storyId), framesOrigin());
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
|
-
//# sourceMappingURL=FrameView.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The catalogue's home: the pages opened last, then each source with its own introduction and its
|
|
3
|
-
* family a card of its components. The logo opens it, and so does an address that names no page.
|
|
2
|
+
* The catalogue's home: the pages opened last, then each source with its own introduction, its docs pages and its
|
|
3
|
+
* families, each family a card of its components. The logo opens it, and so does an address that names no page.
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
6
|
* Everything but a source's introduction is drawn from the tree, so it never goes stale; the introduction is the
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { StorySource } from "@forgebook/story-format/source";
|
|
13
13
|
import { type ReactNode } from "react";
|
|
14
|
-
import { type StoryTree } from "../storyTree.ts";
|
|
14
|
+
import { type StoryTree, type TreeFamily, type TreeSource } from "../storyTree.ts";
|
|
15
15
|
import type { RecentPage } from "./useRecentPages.ts";
|
|
16
16
|
/** The home's props. */
|
|
17
17
|
export type HomePageProps = {
|
|
@@ -30,10 +30,84 @@ export type HomePageProps = {
|
|
|
30
30
|
/** What stays above the home: the index's problems, when it has some. */
|
|
31
31
|
readonly header: ReactNode;
|
|
32
32
|
};
|
|
33
|
+
/** A link to a page, opened in place unless the user asks for another tab. */
|
|
34
|
+
export declare const PageLink: ({ page, hrefOf, onOpen, className, children }: Pick<HomePageProps, "hrefOf" | "onOpen"> & {
|
|
35
|
+
readonly page: RecentPage;
|
|
36
|
+
readonly className: string;
|
|
37
|
+
readonly children: ReactNode;
|
|
38
|
+
}) => ReactNode;
|
|
39
|
+
/** A recent page as the home lists it: its name and its place, or none when the tree no longer has it. */
|
|
40
|
+
type RecentEntry = {
|
|
41
|
+
/** The page. */
|
|
42
|
+
readonly page: RecentPage;
|
|
43
|
+
/** The component's or the story's name. */
|
|
44
|
+
readonly name: string;
|
|
45
|
+
/** Where it sits: the component's place, and its name for a story. */
|
|
46
|
+
readonly place: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The recent pages the tree still has, with their names and places.
|
|
50
|
+
*
|
|
51
|
+
* @param tree - the tree.
|
|
52
|
+
* @param recent - the pages opened last.
|
|
53
|
+
*/
|
|
54
|
+
export declare const recentEntries: (tree: StoryTree, recent: readonly RecentPage[]) => RecentEntry[];
|
|
55
|
+
/**
|
|
56
|
+
* A source's introduction, as its package wrote it; nothing while it loads or when the source has none.
|
|
57
|
+
*
|
|
58
|
+
* @param props - the loader.
|
|
59
|
+
*/
|
|
60
|
+
export declare const SourceIntro: ({ load }: {
|
|
61
|
+
readonly load: StorySource["home"];
|
|
62
|
+
}) => ReactNode;
|
|
63
|
+
/**
|
|
64
|
+
* A family's card: its name and how many components it has, then its components, the first few until asked for all.
|
|
65
|
+
*
|
|
66
|
+
* @param props - the family, and how to open a component.
|
|
67
|
+
*/
|
|
68
|
+
export declare const FamilyCard: ({ family, hrefOf, onOpen }: Pick<HomePageProps, "hrefOf" | "onOpen"> & {
|
|
69
|
+
readonly family: TreeFamily;
|
|
70
|
+
}) => ReactNode;
|
|
71
|
+
/**
|
|
72
|
+
* A source's docs pages as a card, in their reading order, first among its families.
|
|
73
|
+
*
|
|
74
|
+
* @param props - the source, and how to open a page.
|
|
75
|
+
*/
|
|
76
|
+
export declare const DocsCard: ({ source, hrefOf, onOpen }: Pick<HomePageProps, "hrefOf" | "onOpen"> & {
|
|
77
|
+
readonly source: TreeSource;
|
|
78
|
+
}) => ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* How many components a tree has, in every library.
|
|
81
|
+
*
|
|
82
|
+
* @param tree - the tree.
|
|
83
|
+
*/
|
|
84
|
+
export declare const componentCount: (tree: StoryTree) => number;
|
|
85
|
+
/**
|
|
86
|
+
* How many libraries of a tree have components.
|
|
87
|
+
*
|
|
88
|
+
* @param tree - the tree.
|
|
89
|
+
*/
|
|
90
|
+
export declare const libraryCount: (tree: StoryTree) => number;
|
|
91
|
+
/**
|
|
92
|
+
* The pages opened last, under their heading; nothing when there are none.
|
|
93
|
+
*
|
|
94
|
+
* @param props - the tree, the recent pages, how to open one, and the heading; "Recently opened" by default.
|
|
95
|
+
*/
|
|
96
|
+
export declare const RecentSection: ({ tree, recent, hrefOf, onOpen, label }: Pick<HomePageProps, "tree" | "recent" | "hrefOf" | "onOpen"> & {
|
|
97
|
+
readonly label?: string | undefined;
|
|
98
|
+
}) => ReactNode;
|
|
99
|
+
/**
|
|
100
|
+
* A library on the home: its name and logo, its introduction, its docs pages and its families.
|
|
101
|
+
*
|
|
102
|
+
* @param props - the library, the sources for its introduction, and how to open a page.
|
|
103
|
+
*/
|
|
104
|
+
export declare const LibrarySection: ({ source, sources, hrefOf, onOpen }: Pick<HomePageProps, "sources" | "hrefOf" | "onOpen"> & {
|
|
105
|
+
readonly source: TreeSource;
|
|
106
|
+
}) => ReactNode;
|
|
33
107
|
/**
|
|
34
108
|
* The home.
|
|
35
109
|
*
|
|
36
110
|
* @param props - the title, the tree, the sources, the recent pages, and how to open a page.
|
|
37
111
|
*/
|
|
38
112
|
export declare const HomePage: ({ title, tree, sources, recent, hrefOf, onOpen, header }: HomePageProps) => ReactNode;
|
|
39
|
-
|
|
113
|
+
export {};
|