forgebook 0.0.0-stage → 0.1.2
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/LICENSE +21 -0
- package/README.md +136 -2
- package/dist/bin/forgebook/catalogueVite.d.ts +16 -0
- package/dist/bin/forgebook/catalogueVite.d.ts.map +1 -0
- package/dist/bin/forgebook/catalogueVite.js +15 -0
- package/dist/bin/forgebook/catalogueVite.js.map +1 -0
- package/dist/bin/forgebook/forgebook.d.mts +3 -0
- package/dist/bin/forgebook/forgebook.d.mts.map +1 -0
- package/dist/bin/forgebook/forgebook.mjs +93 -0
- package/dist/bin/forgebook/forgebook.mjs.map +1 -0
- package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts +90 -0
- package/dist/bin/forgebook-docs/catalogueDocs.types.d.ts.map +1 -0
- package/dist/bin/forgebook-docs/catalogueDocs.types.js +1 -0
- package/dist/bin/forgebook-docs/catalogueDocs.types.js.map +1 -0
- package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts +9 -0
- package/dist/bin/forgebook-docs/catalogueMarkdown.d.ts.map +1 -0
- package/dist/bin/forgebook-docs/catalogueMarkdown.js +132 -0
- package/dist/bin/forgebook-docs/catalogueMarkdown.js.map +1 -0
- package/dist/bin/forgebook-docs/collectDocs.d.ts +17 -0
- package/dist/bin/forgebook-docs/collectDocs.d.ts.map +1 -0
- package/dist/bin/forgebook-docs/collectDocs.js +115 -0
- package/dist/bin/forgebook-docs/collectDocs.js.map +1 -0
- package/dist/bin/forgebook-docs/forgebook-docs.d.mts +3 -0
- package/dist/bin/forgebook-docs/forgebook-docs.d.mts.map +1 -0
- package/dist/bin/forgebook-docs/forgebook-docs.mjs +114 -0
- package/dist/bin/forgebook-docs/forgebook-docs.mjs.map +1 -0
- package/dist/bin/forgebook-docs/moduleDocs.d.ts +9 -0
- package/dist/bin/forgebook-docs/moduleDocs.d.ts.map +1 -0
- package/dist/bin/forgebook-docs/moduleDocs.js +62 -0
- package/dist/bin/forgebook-docs/moduleDocs.js.map +1 -0
- package/dist/bin/forgebook-docs/sassDocs.d.ts +20 -0
- package/dist/bin/forgebook-docs/sassDocs.d.ts.map +1 -0
- package/dist/bin/forgebook-docs/sassDocs.js +77 -0
- package/dist/bin/forgebook-docs/sassDocs.js.map +1 -0
- package/dist/bin/forgebook-texts/forgebook-texts.d.mts +3 -0
- package/dist/bin/forgebook-texts/forgebook-texts.d.mts.map +1 -0
- package/dist/bin/forgebook-texts/forgebook-texts.mjs +94 -0
- package/dist/bin/forgebook-texts/forgebook-texts.mjs.map +1 -0
- package/dist/bin/forgebook-texts/storyTextsReport.d.ts +26 -0
- package/dist/bin/forgebook-texts/storyTextsReport.d.ts.map +1 -0
- package/dist/bin/forgebook-texts/storyTextsReport.js +35 -0
- package/dist/bin/forgebook-texts/storyTextsReport.js.map +1 -0
- package/dist/bin/forgebook-texts/storyTextsReport.types.d.ts +25 -0
- package/dist/bin/forgebook-texts/storyTextsReport.types.d.ts.map +1 -0
- package/dist/bin/forgebook-texts/storyTextsReport.types.js +7 -0
- package/dist/bin/forgebook-texts/storyTextsReport.types.js.map +1 -0
- package/dist/src/a11y.d.ts +28 -0
- package/dist/src/a11y.d.ts.map +1 -0
- package/dist/src/a11y.js +29 -0
- package/dist/src/a11y.js.map +1 -0
- package/dist/src/argTypes.d.ts +114 -0
- package/dist/src/argTypes.d.ts.map +1 -0
- package/dist/src/argTypes.js +254 -0
- package/dist/src/argTypes.js.map +1 -0
- package/dist/src/backdrops.d.ts +88 -0
- package/dist/src/backdrops.d.ts.map +1 -0
- package/dist/src/backdrops.js +202 -0
- package/dist/src/backdrops.js.map +1 -0
- package/dist/src/catalogue.d.ts +120 -0
- package/dist/src/catalogue.d.ts.map +1 -0
- package/dist/src/catalogue.js +80 -0
- package/dist/src/catalogue.js.map +1 -0
- package/dist/src/componentDocs.d.ts +98 -0
- package/dist/src/componentDocs.d.ts.map +1 -0
- package/dist/src/componentDocs.js +47 -0
- package/dist/src/componentDocs.js.map +1 -0
- package/dist/src/frame/checkStory.d.ts +20 -0
- package/dist/src/frame/checkStory.d.ts.map +1 -0
- package/dist/src/frame/checkStory.js +31 -0
- package/dist/src/frame/checkStory.js.map +1 -0
- package/dist/src/frame/frame.css +51 -0
- package/dist/src/frame/frameClock.d.ts +53 -0
- package/dist/src/frame/frameClock.d.ts.map +1 -0
- package/dist/src/frame/frameClock.js +80 -0
- package/dist/src/frame/frameClock.js.map +1 -0
- package/dist/src/frame/frameStatus.d.ts +8 -0
- package/dist/src/frame/frameStatus.d.ts.map +1 -0
- package/dist/src/frame/frameStatus.js +8 -0
- package/dist/src/frame/frameStatus.js.map +1 -0
- package/dist/src/frame/frameView.d.ts +33 -0
- package/dist/src/frame/frameView.d.ts.map +1 -0
- package/dist/src/frame/frameView.js +134 -0
- package/dist/src/frame/frameView.js.map +1 -0
- package/dist/src/frame/matrixLayout.d.ts +36 -0
- package/dist/src/frame/matrixLayout.d.ts.map +1 -0
- package/dist/src/frame/matrixLayout.js +87 -0
- package/dist/src/frame/matrixLayout.js.map +1 -0
- package/dist/src/frame/measureTools.d.ts +24 -0
- package/dist/src/frame/measureTools.d.ts.map +1 -0
- package/dist/src/frame/measureTools.js +141 -0
- package/dist/src/frame/measureTools.js.map +1 -0
- package/dist/src/frame/mountFrame.d.ts +47 -0
- package/dist/src/frame/mountFrame.d.ts.map +1 -0
- package/dist/src/frame/mountFrame.js +229 -0
- package/dist/src/frame/mountFrame.js.map +1 -0
- package/dist/src/frame/playStory.d.ts +40 -0
- package/dist/src/frame/playStory.d.ts.map +1 -0
- package/dist/src/frame/playStory.js +55 -0
- package/dist/src/frame/playStory.js.map +1 -0
- package/dist/src/frame/renderer.d.ts +85 -0
- package/dist/src/frame/renderer.d.ts.map +1 -0
- package/dist/src/frame/renderer.js +18 -0
- package/dist/src/frame/renderer.js.map +1 -0
- package/dist/src/frame/settle.d.ts +24 -0
- package/dist/src/frame/settle.d.ts.map +1 -0
- package/dist/src/frame/settle.js +25 -0
- package/dist/src/frame/settle.js.map +1 -0
- package/dist/src/frame/staleModule.d.ts +40 -0
- package/dist/src/frame/staleModule.d.ts.map +1 -0
- package/dist/src/frame/staleModule.js +74 -0
- package/dist/src/frame/staleModule.js.map +1 -0
- package/dist/src/frame/storyCanvas.d.ts +21 -0
- package/dist/src/frame/storyCanvas.d.ts.map +1 -0
- package/dist/src/frame/storyCanvas.js +30 -0
- package/dist/src/frame/storyCanvas.js.map +1 -0
- package/dist/src/frame/storyHooks.d.ts +31 -0
- package/dist/src/frame/storyHooks.d.ts.map +1 -0
- package/dist/src/frame/storyHooks.js +59 -0
- package/dist/src/frame/storyHooks.js.map +1 -0
- package/dist/src/frame/storyModule.d.ts +104 -0
- package/dist/src/frame/storyModule.d.ts.map +1 -0
- package/dist/src/frame/storyModule.js +205 -0
- package/dist/src/frame/storyModule.js.map +1 -0
- package/dist/src/frame/storyRun.d.ts +96 -0
- package/dist/src/frame/storyRun.d.ts.map +1 -0
- package/dist/src/frame/storyRun.js +318 -0
- package/dist/src/frame/storyRun.js.map +1 -0
- package/dist/src/languages.d.ts +15 -0
- package/dist/src/languages.d.ts.map +1 -0
- package/dist/src/languages.js +8 -0
- package/dist/src/languages.js.map +1 -0
- package/dist/src/matrix.d.ts +56 -0
- package/dist/src/matrix.d.ts.map +1 -0
- package/dist/src/matrix.js +61 -0
- package/dist/src/matrix.js.map +1 -0
- package/dist/src/messages.d.ts +203 -0
- package/dist/src/messages.d.ts.map +1 -0
- package/dist/src/messages.js +193 -0
- package/dist/src/messages.js.map +1 -0
- package/dist/src/namedValues.d.ts +38 -0
- package/dist/src/namedValues.d.ts.map +1 -0
- package/dist/src/namedValues.js +48 -0
- package/dist/src/namedValues.js.map +1 -0
- package/dist/src/pageConfig.d.ts +23 -0
- package/dist/src/pageConfig.d.ts.map +1 -0
- package/dist/src/pageConfig.js +1 -0
- package/dist/src/pageConfig.js.map +1 -0
- package/dist/src/playTrace.d.ts +41 -0
- package/dist/src/playTrace.d.ts.map +1 -0
- package/dist/src/playTrace.js +35 -0
- package/dist/src/playTrace.js.map +1 -0
- package/dist/src/shell/A11yTab.d.ts +44 -0
- package/dist/src/shell/A11yTab.d.ts.map +1 -0
- package/dist/src/shell/A11yTab.js +30 -0
- package/dist/src/shell/A11yTab.js.map +1 -0
- package/dist/src/shell/ApiReference.d.ts +18 -0
- package/dist/src/shell/ApiReference.d.ts.map +1 -0
- package/dist/src/shell/ApiReference.js +41 -0
- package/dist/src/shell/ApiReference.js.map +1 -0
- package/dist/src/shell/ClockControls.d.ts +43 -0
- package/dist/src/shell/ClockControls.d.ts.map +1 -0
- package/dist/src/shell/ClockControls.js +53 -0
- package/dist/src/shell/ClockControls.js.map +1 -0
- package/dist/src/shell/Code.d.ts +16 -0
- package/dist/src/shell/Code.d.ts.map +1 -0
- package/dist/src/shell/Code.js +9 -0
- package/dist/src/shell/Code.js.map +1 -0
- package/dist/src/shell/CodeTab.d.ts +17 -0
- package/dist/src/shell/CodeTab.d.ts.map +1 -0
- package/dist/src/shell/CodeTab.js +17 -0
- package/dist/src/shell/CodeTab.js.map +1 -0
- package/dist/src/shell/CodeText.d.ts +16 -0
- package/dist/src/shell/CodeText.d.ts.map +1 -0
- package/dist/src/shell/CodeText.js +10 -0
- package/dist/src/shell/CodeText.js.map +1 -0
- package/dist/src/shell/ComponentPage.d.ts +38 -0
- package/dist/src/shell/ComponentPage.d.ts.map +1 -0
- package/dist/src/shell/ComponentPage.js +146 -0
- package/dist/src/shell/ComponentPage.js.map +1 -0
- package/dist/src/shell/Dock.d.ts +42 -0
- package/dist/src/shell/Dock.d.ts.map +1 -0
- package/dist/src/shell/Dock.js +90 -0
- package/dist/src/shell/Dock.js.map +1 -0
- package/dist/src/shell/EventsTab.d.ts +25 -0
- package/dist/src/shell/EventsTab.d.ts.map +1 -0
- package/dist/src/shell/EventsTab.js +26 -0
- package/dist/src/shell/EventsTab.js.map +1 -0
- package/dist/src/shell/FrameView.d.ts +49 -0
- package/dist/src/shell/FrameView.d.ts.map +1 -0
- package/dist/src/shell/FrameView.js +29 -0
- package/dist/src/shell/FrameView.js.map +1 -0
- package/dist/src/shell/HomePage.d.ts +39 -0
- package/dist/src/shell/HomePage.d.ts.map +1 -0
- package/dist/src/shell/HomePage.js +85 -0
- package/dist/src/shell/HomePage.js.map +1 -0
- package/dist/src/shell/InteractionsTab.d.ts +28 -0
- package/dist/src/shell/InteractionsTab.d.ts.map +1 -0
- package/dist/src/shell/InteractionsTab.js +17 -0
- package/dist/src/shell/InteractionsTab.js.map +1 -0
- package/dist/src/shell/MatrixPicker.d.ts +24 -0
- package/dist/src/shell/MatrixPicker.d.ts.map +1 -0
- package/dist/src/shell/MatrixPicker.js +29 -0
- package/dist/src/shell/MatrixPicker.js.map +1 -0
- package/dist/src/shell/PackageHtml.d.ts +17 -0
- package/dist/src/shell/PackageHtml.d.ts.map +1 -0
- package/dist/src/shell/PackageHtml.js +13 -0
- package/dist/src/shell/PackageHtml.js.map +1 -0
- package/dist/src/shell/PartsTab.d.ts +23 -0
- package/dist/src/shell/PartsTab.d.ts.map +1 -0
- package/dist/src/shell/PartsTab.js +23 -0
- package/dist/src/shell/PartsTab.js.map +1 -0
- package/dist/src/shell/PropFields.d.ts +31 -0
- package/dist/src/shell/PropFields.d.ts.map +1 -0
- package/dist/src/shell/PropFields.js +81 -0
- package/dist/src/shell/PropFields.js.map +1 -0
- package/dist/src/shell/PropsTab.d.ts +45 -0
- package/dist/src/shell/PropsTab.d.ts.map +1 -0
- package/dist/src/shell/PropsTab.js +81 -0
- package/dist/src/shell/PropsTab.js.map +1 -0
- package/dist/src/shell/SchemeSwitches.d.ts +24 -0
- package/dist/src/shell/SchemeSwitches.d.ts.map +1 -0
- package/dist/src/shell/SchemeSwitches.js +36 -0
- package/dist/src/shell/SchemeSwitches.js.map +1 -0
- package/dist/src/shell/Segmented.d.ts +41 -0
- package/dist/src/shell/Segmented.d.ts.map +1 -0
- package/dist/src/shell/Segmented.js +19 -0
- package/dist/src/shell/Segmented.js.map +1 -0
- package/dist/src/shell/Shell.d.ts +49 -0
- package/dist/src/shell/Shell.d.ts.map +1 -0
- package/dist/src/shell/Shell.js +279 -0
- package/dist/src/shell/Shell.js.map +1 -0
- package/dist/src/shell/Sidebar.d.ts +52 -0
- package/dist/src/shell/Sidebar.d.ts.map +1 -0
- package/dist/src/shell/Sidebar.js +132 -0
- package/dist/src/shell/Sidebar.js.map +1 -0
- package/dist/src/shell/SidebarHandle.d.ts +29 -0
- package/dist/src/shell/SidebarHandle.d.ts.map +1 -0
- package/dist/src/shell/SidebarHandle.js +46 -0
- package/dist/src/shell/SidebarHandle.js.map +1 -0
- package/dist/src/shell/Stage.d.ts +68 -0
- package/dist/src/shell/Stage.d.ts.map +1 -0
- package/dist/src/shell/Stage.js +218 -0
- package/dist/src/shell/Stage.js.map +1 -0
- package/dist/src/shell/StageTools.d.ts +27 -0
- package/dist/src/shell/StageTools.d.ts.map +1 -0
- package/dist/src/shell/StageTools.js +34 -0
- package/dist/src/shell/StageTools.js.map +1 -0
- package/dist/src/shell/StageViewport.d.ts +46 -0
- package/dist/src/shell/StageViewport.d.ts.map +1 -0
- package/dist/src/shell/StageViewport.js +173 -0
- package/dist/src/shell/StageViewport.js.map +1 -0
- package/dist/src/shell/StoryCodeBlock.d.ts +35 -0
- package/dist/src/shell/StoryCodeBlock.d.ts.map +1 -0
- package/dist/src/shell/StoryCodeBlock.js +27 -0
- package/dist/src/shell/StoryCodeBlock.js.map +1 -0
- package/dist/src/shell/StoryPicker.d.ts +26 -0
- package/dist/src/shell/StoryPicker.d.ts.map +1 -0
- package/dist/src/shell/StoryPicker.js +32 -0
- package/dist/src/shell/StoryPicker.js.map +1 -0
- package/dist/src/shell/Toolbar.d.ts +40 -0
- package/dist/src/shell/Toolbar.d.ts.map +1 -0
- package/dist/src/shell/Toolbar.js +125 -0
- package/dist/src/shell/Toolbar.js.map +1 -0
- package/dist/src/shell/WidthField.d.ts +24 -0
- package/dist/src/shell/WidthField.d.ts.map +1 -0
- package/dist/src/shell/WidthField.js +40 -0
- package/dist/src/shell/WidthField.js.map +1 -0
- package/dist/src/shell/catalogueContext.d.ts +6 -0
- package/dist/src/shell/catalogueContext.d.ts.map +1 -0
- package/dist/src/shell/catalogueContext.js +14 -0
- package/dist/src/shell/catalogueContext.js.map +1 -0
- package/dist/src/shell/codeTokens.d.ts +23 -0
- package/dist/src/shell/codeTokens.d.ts.map +1 -0
- package/dist/src/shell/codeTokens.js +48 -0
- package/dist/src/shell/codeTokens.js.map +1 -0
- package/dist/src/shell/codeWriter.d.ts +6 -0
- package/dist/src/shell/codeWriter.d.ts.map +1 -0
- package/dist/src/shell/codeWriter.js +14 -0
- package/dist/src/shell/codeWriter.js.map +1 -0
- package/dist/src/shell/compareVariants.d.ts +35 -0
- package/dist/src/shell/compareVariants.d.ts.map +1 -0
- package/dist/src/shell/compareVariants.js +68 -0
- package/dist/src/shell/compareVariants.js.map +1 -0
- package/dist/src/shell/dockTabs.d.ts +63 -0
- package/dist/src/shell/dockTabs.d.ts.map +1 -0
- package/dist/src/shell/dockTabs.js +140 -0
- package/dist/src/shell/dockTabs.js.map +1 -0
- package/dist/src/shell/icons.d.ts +47 -0
- package/dist/src/shell/icons.d.ts.map +1 -0
- package/dist/src/shell/icons.js +36 -0
- package/dist/src/shell/icons.js.map +1 -0
- package/dist/src/shell/keyboard.d.ts +35 -0
- package/dist/src/shell/keyboard.d.ts.map +1 -0
- package/dist/src/shell/keyboard.js +51 -0
- package/dist/src/shell/keyboard.js.map +1 -0
- package/dist/src/shell/mountShell.d.ts +22 -0
- package/dist/src/shell/mountShell.d.ts.map +1 -0
- package/dist/src/shell/mountShell.js +39 -0
- package/dist/src/shell/mountShell.js.map +1 -0
- package/dist/src/shell/shell.css +1831 -0
- package/dist/src/shell/strings.d.ts +184 -0
- package/dist/src/shell/strings.d.ts.map +1 -0
- package/dist/src/shell/strings.js +188 -0
- package/dist/src/shell/strings.js.map +1 -0
- package/dist/src/shell/switchView.d.ts +23 -0
- package/dist/src/shell/switchView.d.ts.map +1 -0
- package/dist/src/shell/switchView.js +19 -0
- package/dist/src/shell/switchView.js.map +1 -0
- package/dist/src/shell/treeSearch.d.ts +35 -0
- package/dist/src/shell/treeSearch.d.ts.map +1 -0
- package/dist/src/shell/treeSearch.js +60 -0
- package/dist/src/shell/treeSearch.js.map +1 -0
- package/dist/src/shell/useComponentDocs.d.ts +16 -0
- package/dist/src/shell/useComponentDocs.d.ts.map +1 -0
- package/dist/src/shell/useComponentDocs.js +25 -0
- package/dist/src/shell/useComponentDocs.js.map +1 -0
- package/dist/src/shell/useCopy.d.ts +10 -0
- package/dist/src/shell/useCopy.d.ts.map +1 -0
- package/dist/src/shell/useCopy.js +23 -0
- package/dist/src/shell/useCopy.js.map +1 -0
- package/dist/src/shell/useFrameMessages.d.ts +54 -0
- package/dist/src/shell/useFrameMessages.d.ts.map +1 -0
- package/dist/src/shell/useFrameMessages.js +90 -0
- package/dist/src/shell/useFrameMessages.js.map +1 -0
- package/dist/src/shell/useFrameQueue.d.ts +29 -0
- package/dist/src/shell/useFrameQueue.d.ts.map +1 -0
- package/dist/src/shell/useFrameQueue.js +72 -0
- package/dist/src/shell/useFrameQueue.js.map +1 -0
- package/dist/src/shell/useLiveView.d.ts +29 -0
- package/dist/src/shell/useLiveView.d.ts.map +1 -0
- package/dist/src/shell/useLiveView.js +51 -0
- package/dist/src/shell/useLiveView.js.map +1 -0
- package/dist/src/shell/useLoaded.d.ts +20 -0
- package/dist/src/shell/useLoaded.d.ts.map +1 -0
- package/dist/src/shell/useLoaded.js +40 -0
- package/dist/src/shell/useLoaded.js.map +1 -0
- package/dist/src/shell/usePageDoc.d.ts +20 -0
- package/dist/src/shell/usePageDoc.d.ts.map +1 -0
- package/dist/src/shell/usePageDoc.js +21 -0
- package/dist/src/shell/usePageDoc.js.map +1 -0
- package/dist/src/shell/usePopover.d.ts +23 -0
- package/dist/src/shell/usePopover.d.ts.map +1 -0
- package/dist/src/shell/usePopover.js +39 -0
- package/dist/src/shell/usePopover.js.map +1 -0
- package/dist/src/shell/useRecentPages.d.ts +21 -0
- package/dist/src/shell/useRecentPages.d.ts.map +1 -0
- package/dist/src/shell/useRecentPages.js +62 -0
- package/dist/src/shell/useRecentPages.js.map +1 -0
- package/dist/src/shell/useScrollMemory.d.ts +40 -0
- package/dist/src/shell/useScrollMemory.d.ts.map +1 -0
- package/dist/src/shell/useScrollMemory.js +69 -0
- package/dist/src/shell/useScrollMemory.js.map +1 -0
- package/dist/src/shell/useSidebarLayout.d.ts +14 -0
- package/dist/src/shell/useSidebarLayout.d.ts.map +1 -0
- package/dist/src/shell/useSidebarLayout.js +19 -0
- package/dist/src/shell/useSidebarLayout.js.map +1 -0
- package/dist/src/shell/useStored.d.ts +11 -0
- package/dist/src/shell/useStored.d.ts.map +1 -0
- package/dist/src/shell/useStored.js +68 -0
- package/dist/src/shell/useStored.js.map +1 -0
- package/dist/src/shell/useStoryCode.d.ts +14 -0
- package/dist/src/shell/useStoryCode.d.ts.map +1 -0
- package/dist/src/shell/useStoryCode.js +29 -0
- package/dist/src/shell/useStoryCode.js.map +1 -0
- package/dist/src/shell/useStoryHeights.d.ts +9 -0
- package/dist/src/shell/useStoryHeights.d.ts.map +1 -0
- package/dist/src/shell/useStoryHeights.js +31 -0
- package/dist/src/shell/useStoryHeights.js.map +1 -0
- package/dist/src/shell/useStoryIdsElement.d.ts +7 -0
- package/dist/src/shell/useStoryIdsElement.d.ts.map +1 -0
- package/dist/src/shell/useStoryIdsElement.js +29 -0
- package/dist/src/shell/useStoryIdsElement.js.map +1 -0
- package/dist/src/shell/useStoryKeys.d.ts +11 -0
- package/dist/src/shell/useStoryKeys.d.ts.map +1 -0
- package/dist/src/shell/useStoryKeys.js +40 -0
- package/dist/src/shell/useStoryKeys.js.map +1 -0
- package/dist/src/shell/useSystemDark.d.ts +3 -0
- package/dist/src/shell/useSystemDark.d.ts.map +1 -0
- package/dist/src/shell/useSystemDark.js +19 -0
- package/dist/src/shell/useSystemDark.js.map +1 -0
- package/dist/src/sourceFiles.d.ts +18 -0
- package/dist/src/sourceFiles.d.ts.map +1 -0
- package/dist/src/sourceFiles.js +22 -0
- package/dist/src/sourceFiles.js.map +1 -0
- package/dist/src/storyBackground.d.ts +21 -0
- package/dist/src/storyBackground.d.ts.map +1 -0
- package/dist/src/storyBackground.js +27 -0
- package/dist/src/storyBackground.js.map +1 -0
- package/dist/src/storyClock.d.ts +62 -0
- package/dist/src/storyClock.d.ts.map +1 -0
- package/dist/src/storyClock.js +51 -0
- package/dist/src/storyClock.js.map +1 -0
- package/dist/src/storyGlobals.d.ts +60 -0
- package/dist/src/storyGlobals.d.ts.map +1 -0
- package/dist/src/storyGlobals.js +117 -0
- package/dist/src/storyGlobals.js.map +1 -0
- package/dist/src/storyHeights.d.ts +37 -0
- package/dist/src/storyHeights.d.ts.map +1 -0
- package/dist/src/storyHeights.js +53 -0
- package/dist/src/storyHeights.js.map +1 -0
- package/dist/src/storyIdsElement.d.ts +9 -0
- package/dist/src/storyIdsElement.d.ts.map +1 -0
- package/dist/src/storyIdsElement.js +9 -0
- package/dist/src/storyIdsElement.js.map +1 -0
- package/dist/src/storyTexts.d.ts +43 -0
- package/dist/src/storyTexts.d.ts.map +1 -0
- package/dist/src/storyTexts.js +71 -0
- package/dist/src/storyTexts.js.map +1 -0
- package/dist/src/storyTree.d.ts +215 -0
- package/dist/src/storyTree.d.ts.map +1 -0
- package/dist/src/storyTree.js +308 -0
- package/dist/src/storyTree.js.map +1 -0
- package/dist/src/switches.d.ts +156 -0
- package/dist/src/switches.d.ts.map +1 -0
- package/dist/src/switches.js +193 -0
- package/dist/src/switches.js.map +1 -0
- package/dist/src/viewState.d.ts +194 -0
- package/dist/src/viewState.d.ts.map +1 -0
- package/dist/src/viewState.js +303 -0
- package/dist/src/viewState.js.map +1 -0
- package/dist/src/vite/adapter.d.ts +70 -0
- package/dist/src/vite/adapter.d.ts.map +1 -0
- package/dist/src/vite/adapter.js +22 -0
- package/dist/src/vite/adapter.js.map +1 -0
- package/dist/src/vite/autoTitle.d.ts +28 -0
- package/dist/src/vite/autoTitle.d.ts.map +1 -0
- package/dist/src/vite/autoTitle.js +44 -0
- package/dist/src/vite/autoTitle.js.map +1 -0
- package/dist/src/vite/componentPage.d.ts +34 -0
- package/dist/src/vite/componentPage.d.ts.map +1 -0
- package/dist/src/vite/componentPage.js +94 -0
- package/dist/src/vite/componentPage.js.map +1 -0
- package/dist/src/vite/config.d.ts +72 -0
- package/dist/src/vite/config.d.ts.map +1 -0
- package/dist/src/vite/config.js +25 -0
- package/dist/src/vite/config.js.map +1 -0
- package/dist/src/vite/configFile.d.ts +76 -0
- package/dist/src/vite/configFile.d.ts.map +1 -0
- package/dist/src/vite/configFile.js +190 -0
- package/dist/src/vite/configFile.js.map +1 -0
- package/dist/src/vite/docsExtractor.d.ts +46 -0
- package/dist/src/vite/docsExtractor.d.ts.map +1 -0
- package/dist/src/vite/docsExtractor.js +88 -0
- package/dist/src/vite/docsExtractor.js.map +1 -0
- package/dist/src/vite/docsProgram.d.ts +42 -0
- package/dist/src/vite/docsProgram.d.ts.map +1 -0
- package/dist/src/vite/docsProgram.js +144 -0
- package/dist/src/vite/docsProgram.js.map +1 -0
- package/dist/src/vite/docsWorker.d.ts +2 -0
- package/dist/src/vite/docsWorker.d.ts.map +1 -0
- package/dist/src/vite/docsWorker.js +68 -0
- package/dist/src/vite/docsWorker.js.map +1 -0
- package/dist/src/vite/forcedStates.d.ts +27 -0
- package/dist/src/vite/forcedStates.d.ts.map +1 -0
- package/dist/src/vite/forcedStates.js +60 -0
- package/dist/src/vite/forcedStates.js.map +1 -0
- package/dist/src/vite/forgebookPlugin.d.ts +28 -0
- package/dist/src/vite/forgebookPlugin.d.ts.map +1 -0
- package/dist/src/vite/forgebookPlugin.js +375 -0
- package/dist/src/vite/forgebookPlugin.js.map +1 -0
- package/dist/src/vite/highlightCode.d.ts +16 -0
- package/dist/src/vite/highlightCode.d.ts.map +1 -0
- package/dist/src/vite/highlightCode.js +82 -0
- package/dist/src/vite/highlightCode.js.map +1 -0
- package/dist/src/vite/indexStoryFile.d.ts +35 -0
- package/dist/src/vite/indexStoryFile.d.ts.map +1 -0
- package/dist/src/vite/indexStoryFile.js +458 -0
- package/dist/src/vite/indexStoryFile.js.map +1 -0
- package/dist/src/vite/pages.d.ts +49 -0
- package/dist/src/vite/pages.d.ts.map +1 -0
- package/dist/src/vite/pages.js +171 -0
- package/dist/src/vite/pages.js.map +1 -0
- package/dist/src/vite/prebundled.d.ts +30 -0
- package/dist/src/vite/prebundled.d.ts.map +1 -0
- package/dist/src/vite/prebundled.js +81 -0
- package/dist/src/vite/prebundled.js.map +1 -0
- package/dist/src/vite/storyCode.d.ts +28 -0
- package/dist/src/vite/storyCode.d.ts.map +1 -0
- package/dist/src/vite/storyCode.js +80 -0
- package/dist/src/vite/storyCode.js.map +1 -0
- package/dist/src/vite/storyFilesModule.d.ts +17 -0
- package/dist/src/vite/storyFilesModule.d.ts.map +1 -0
- package/dist/src/vite/storyFilesModule.js +64 -0
- package/dist/src/vite/storyFilesModule.js.map +1 -0
- package/dist/src/vite/storyMeta.d.ts +34 -0
- package/dist/src/vite/storyMeta.d.ts.map +1 -0
- package/dist/src/vite/storyMeta.js +74 -0
- package/dist/src/vite/storyMeta.js.map +1 -0
- package/dist/src/vite/typeScriptPieces.d.ts +23 -0
- package/dist/src/vite/typeScriptPieces.d.ts.map +1 -0
- package/dist/src/vite/typeScriptPieces.js +236 -0
- package/dist/src/vite/typeScriptPieces.js.map +1 -0
- package/package.json +202 -3
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Violation } from "../a11y.ts";
|
|
2
|
+
import { type FrameMessage } from "../messages.ts";
|
|
3
|
+
import type { PlayTrace } from "../playTrace.ts";
|
|
4
|
+
/** A message of a frame that the stage answers. */
|
|
5
|
+
export type ReadyMessage = Extract<FrameMessage, {
|
|
6
|
+
type: "forgebook:ready";
|
|
7
|
+
}>;
|
|
8
|
+
/** A call of an event, as the log shows it. */
|
|
9
|
+
export type EventCall = Omit<Extract<FrameMessage, {
|
|
10
|
+
type: "forgebook:call";
|
|
11
|
+
}>, "type"> & {
|
|
12
|
+
/** When it arrived, in ms since the epoch. */
|
|
13
|
+
readonly time: number;
|
|
14
|
+
};
|
|
15
|
+
/** What the frames have reported. */
|
|
16
|
+
export type FrameReports = {
|
|
17
|
+
/** The id of the last story that said it can replay. */
|
|
18
|
+
readonly replayable: string | undefined;
|
|
19
|
+
/** The id of the last story that said it reads the story clock (a Live story). */
|
|
20
|
+
readonly clocked: string | undefined;
|
|
21
|
+
/** Each frame's content height in CSS px, by its address. */
|
|
22
|
+
readonly heights: ReadonlyMap<string, number>;
|
|
23
|
+
/** The addresses of the frames that finished loading: their story is shown, or why it could not be. */
|
|
24
|
+
readonly settled: ReadonlySet<string>;
|
|
25
|
+
};
|
|
26
|
+
/** What the stage does when a frame reports. */
|
|
27
|
+
export type FrameHandlers = {
|
|
28
|
+
/** A frame rendered its story: the stage sends it the panel's values and the events to record. */
|
|
29
|
+
readonly onReady: (frame: Window, message: ReadyMessage) => void;
|
|
30
|
+
/** An event was called. */
|
|
31
|
+
readonly onCall: (call: EventCall) => void;
|
|
32
|
+
/** A frame could not show its story; none where nothing waits for it. */
|
|
33
|
+
readonly onFailed?: (storyId: string) => void;
|
|
34
|
+
/** A story's play function reported its trace; none where nothing shows it. */
|
|
35
|
+
readonly onPlay?: (storyId: string, trace: PlayTrace) => void;
|
|
36
|
+
/** An accessibility check is over: the rules broken, or why it could not run; none where nothing asks for one. */
|
|
37
|
+
readonly onChecked?: (result: CheckResult) => void;
|
|
38
|
+
};
|
|
39
|
+
/** An accessibility check's result, as a frame reported it. */
|
|
40
|
+
export type CheckResult = {
|
|
41
|
+
readonly storyId: string;
|
|
42
|
+
readonly violations: readonly Violation[];
|
|
43
|
+
} | {
|
|
44
|
+
readonly storyId: string;
|
|
45
|
+
readonly error: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Listens to the frames of the page.
|
|
49
|
+
*
|
|
50
|
+
* @param handlers - what to do when a frame is ready or an event is called.
|
|
51
|
+
* @returns what they reported.
|
|
52
|
+
*/
|
|
53
|
+
export declare const useFrameMessages: (handlers: FrameHandlers) => FrameReports;
|
|
54
|
+
//# sourceMappingURL=useFrameMessages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFrameMessages.d.ts","sourceRoot":"","sources":["../../../src/shell/useFrameMessages.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,mDAAmD;AACnD,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAC,CAAC;AAE9E,+CAA+C;AAC/C,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAAC,EAAE,MAAM,CAAC,GAAG;IACxF,8CAA8C;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,qCAAqC;AACrC,MAAM,MAAM,YAAY,GAAG;IACzB,wDAAwD;IACxD,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,kFAAkF;IAClF,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,uGAAuG;IACvG,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACvC,CAAC;AAEF,gDAAgD;AAChD,MAAM,MAAM,aAAa,GAAG;IAC1B,kGAAkG;IAClG,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IACjE,2BAA2B;IAC3B,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IAC3C,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAC9D,kHAAkH;IAClH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF,+DAA+D;AAC/D,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAA;CAAE,GACvE;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAsEzD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU,aAAa,KAAG,YA2B1D,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the frames tell the shell: which story can replay, which reads the story clock, each frame's content height, which frames finished loading, its story's own args, the
|
|
3
|
+
* calls of its events, its play function's trace, and the result of an accessibility check.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { useEffect, useRef, useState } from "react";
|
|
8
|
+
import { isFrameMessage } from "../messages.js";
|
|
9
|
+
/** The frame element a message came from. */
|
|
10
|
+
const frameOf = (source) => source === null
|
|
11
|
+
? undefined
|
|
12
|
+
: [...document.querySelectorAll("iframe")].find((element) => element.contentWindow === source);
|
|
13
|
+
/** Whether a message ends a frame's loading: its story is shown, or why it could not be. */
|
|
14
|
+
const isSettling = (message) => message.type === "forgebook:ready" || message.type === "forgebook:error";
|
|
15
|
+
/** Acts on one message of a frame. */
|
|
16
|
+
const onFrameMessage = (message, frame, targets) => {
|
|
17
|
+
const address = frame?.getAttribute("src") ?? undefined;
|
|
18
|
+
if (isSettling(message) && address !== undefined)
|
|
19
|
+
targets.markSettled(address);
|
|
20
|
+
const { handlers } = targets;
|
|
21
|
+
switch (message.type) {
|
|
22
|
+
case "forgebook:ready":
|
|
23
|
+
if (message.canReplay)
|
|
24
|
+
targets.setReplayable(message.storyId);
|
|
25
|
+
if (message.hasClock)
|
|
26
|
+
targets.setClocked(message.storyId);
|
|
27
|
+
if (frame?.contentWindow)
|
|
28
|
+
handlers.onReady(frame.contentWindow, message);
|
|
29
|
+
return;
|
|
30
|
+
case "forgebook:size":
|
|
31
|
+
if (address !== undefined)
|
|
32
|
+
targets.setHeight(address, message.height);
|
|
33
|
+
return;
|
|
34
|
+
case "forgebook:error":
|
|
35
|
+
handlers.onFailed?.(message.storyId);
|
|
36
|
+
return;
|
|
37
|
+
case "forgebook:play":
|
|
38
|
+
handlers.onPlay?.(message.storyId, message.trace);
|
|
39
|
+
return;
|
|
40
|
+
case "forgebook:checked":
|
|
41
|
+
handlers.onChecked?.({ storyId: message.storyId, violations: message.violations });
|
|
42
|
+
return;
|
|
43
|
+
case "forgebook:check-error":
|
|
44
|
+
handlers.onChecked?.({ storyId: message.storyId, error: message.message });
|
|
45
|
+
return;
|
|
46
|
+
case "forgebook:call":
|
|
47
|
+
handlers.onCall({
|
|
48
|
+
storyId: message.storyId,
|
|
49
|
+
name: message.name,
|
|
50
|
+
values: message.values,
|
|
51
|
+
details: message.details,
|
|
52
|
+
time: Date.now()
|
|
53
|
+
});
|
|
54
|
+
return;
|
|
55
|
+
default:
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Listens to the frames of the page.
|
|
61
|
+
*
|
|
62
|
+
* @param handlers - what to do when a frame is ready or an event is called.
|
|
63
|
+
* @returns what they reported.
|
|
64
|
+
*/
|
|
65
|
+
export const useFrameMessages = (handlers) => {
|
|
66
|
+
const [replayable, setReplayable] = useState(undefined);
|
|
67
|
+
const [clocked, setClocked] = useState(undefined);
|
|
68
|
+
const [heights, setHeights] = useState(new Map());
|
|
69
|
+
const [settled, setSettled] = useState(new Set());
|
|
70
|
+
// the latest handlers, without listening again on every render
|
|
71
|
+
const handlersRef = useRef(handlers);
|
|
72
|
+
handlersRef.current = handlers;
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
const listen = (event) => {
|
|
75
|
+
if (event.origin !== window.location.origin || !isFrameMessage(event.data))
|
|
76
|
+
return;
|
|
77
|
+
onFrameMessage(event.data, frameOf(event.source), {
|
|
78
|
+
handlers: handlersRef.current,
|
|
79
|
+
setReplayable,
|
|
80
|
+
setClocked,
|
|
81
|
+
setHeight: (address, height) => setHeights((current) => new Map(current).set(address, height)),
|
|
82
|
+
markSettled: (address) => setSettled((current) => (current.has(address) ? current : new Set(current).add(address)))
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
window.addEventListener("message", listen);
|
|
86
|
+
return () => window.removeEventListener("message", listen);
|
|
87
|
+
}, []);
|
|
88
|
+
return { replayable, clocked, heights, settled };
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=useFrameMessages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFrameMessages.js","sourceRoot":"","sources":["../../../src/shell/useFrameMessages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAqB,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA2CnE,6CAA6C;AAC7C,MAAM,OAAO,GA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EAAE,CAAC;AACnD,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which frames of a page of many stories may load: those near the visible part of the page, a few at a time, so the
|
|
3
|
+
* browser is never asked for thousands of modules at once.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* In development every frame loads its sources' modules one by one (a few hundred requests); twenty frames at once
|
|
7
|
+
* exhaust the browser ("insufficient resources") and stories stay blank. A frame loads once its story is near the
|
|
8
|
+
* visible part of the scrolling page and fewer than `MAX_LOADING` frames are still loading; once loaded it stays.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { type RefObject } from "react";
|
|
13
|
+
/** What the queue gives a page. */
|
|
14
|
+
export type FrameQueue = {
|
|
15
|
+
/** The stories whose frames may be mounted. */
|
|
16
|
+
readonly mounted: ReadonlySet<string>;
|
|
17
|
+
/** Registers the element that holds a story's frame, to know when it is near; `null` when it goes away. */
|
|
18
|
+
readonly observe: (storyId: string, element: HTMLElement | null) => void;
|
|
19
|
+
/** Records a story whose frame finished loading. */
|
|
20
|
+
readonly markReady: (storyId: string) => void;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The queue of a page's frames.
|
|
24
|
+
*
|
|
25
|
+
* @param storyIds - the stories, in the page's order.
|
|
26
|
+
* @param root - the element that scrolls the page.
|
|
27
|
+
*/
|
|
28
|
+
export declare const useFrameQueue: (storyIds: readonly string[], root: RefObject<HTMLElement | null>) => FrameQueue;
|
|
29
|
+
//# sourceMappingURL=useFrameQueue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFrameQueue.d.ts","sourceRoot":"","sources":["../../../src/shell/useFrameQueue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AAQjF,mCAAmC;AACnC,MAAM,MAAM,UAAU,GAAG;IACvB,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,2GAA2G;IAC3G,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACzE,oDAAoD;IACpD,QAAQ,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,UAAU,SAAS,MAAM,EAAE,EAC3B,MAAM,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,KAClC,UAuDF,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which frames of a page of many stories may load: those near the visible part of the page, a few at a time, so the
|
|
3
|
+
* browser is never asked for thousands of modules at once.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* In development every frame loads its sources' modules one by one (a few hundred requests); twenty frames at once
|
|
7
|
+
* exhaust the browser ("insufficient resources") and stories stay blank. A frame loads once its story is near the
|
|
8
|
+
* visible part of the scrolling page and fewer than `MAX_LOADING` frames are still loading; once loaded it stays.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
13
|
+
/** The most frames loading at once. */
|
|
14
|
+
const MAX_LOADING = 2;
|
|
15
|
+
/** How far beyond the visible part a story counts as near, as an IntersectionObserver margin. */
|
|
16
|
+
const NEAR_MARGIN = "600px 0px";
|
|
17
|
+
/**
|
|
18
|
+
* The queue of a page's frames.
|
|
19
|
+
*
|
|
20
|
+
* @param storyIds - the stories, in the page's order.
|
|
21
|
+
* @param root - the element that scrolls the page.
|
|
22
|
+
*/
|
|
23
|
+
export const useFrameQueue = (storyIds, root) => {
|
|
24
|
+
const [near, setNear] = useState(new Set());
|
|
25
|
+
const [ready, setReady] = useState(new Set());
|
|
26
|
+
const [mounted, setMounted] = useState(new Set());
|
|
27
|
+
const observerRef = useRef(undefined);
|
|
28
|
+
const elements = useRef(new Map());
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
const observer = new IntersectionObserver((entries) => setNear((current) => {
|
|
31
|
+
const next = new Set(current);
|
|
32
|
+
for (const entry of entries) {
|
|
33
|
+
const id = elements.current.get(entry.target);
|
|
34
|
+
if (id === undefined)
|
|
35
|
+
continue;
|
|
36
|
+
if (entry.isIntersecting)
|
|
37
|
+
next.add(id);
|
|
38
|
+
else
|
|
39
|
+
next.delete(id);
|
|
40
|
+
}
|
|
41
|
+
return next;
|
|
42
|
+
}), { root: root.current, rootMargin: NEAR_MARGIN });
|
|
43
|
+
for (const element of elements.current.keys())
|
|
44
|
+
observer.observe(element);
|
|
45
|
+
observerRef.current = observer;
|
|
46
|
+
return () => observer.disconnect();
|
|
47
|
+
}, [root]);
|
|
48
|
+
// a few more frames whenever a story comes near or a frame finishes loading
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
setMounted((current) => {
|
|
51
|
+
const loading = [...current].filter((id) => !ready.has(id)).length;
|
|
52
|
+
const waiting = storyIds.filter((id) => near.has(id) && !current.has(id));
|
|
53
|
+
const next = waiting.slice(0, Math.max(0, MAX_LOADING - loading));
|
|
54
|
+
return next.length === 0 ? current : new Set([...current, ...next]);
|
|
55
|
+
});
|
|
56
|
+
}, [storyIds, near, ready]);
|
|
57
|
+
const observe = useCallback((storyId, element) => {
|
|
58
|
+
for (const [known, id] of elements.current) {
|
|
59
|
+
if (id !== storyId)
|
|
60
|
+
continue;
|
|
61
|
+
observerRef.current?.unobserve(known);
|
|
62
|
+
elements.current.delete(known);
|
|
63
|
+
}
|
|
64
|
+
if (element === null)
|
|
65
|
+
return;
|
|
66
|
+
elements.current.set(element, storyId);
|
|
67
|
+
observerRef.current?.observe(element);
|
|
68
|
+
}, []);
|
|
69
|
+
const markReady = useCallback((storyId) => setReady((current) => (current.has(storyId) ? current : new Set(current).add(storyId))), []);
|
|
70
|
+
return { mounted, observe, markReady };
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=useFrameQueue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFrameQueue.js","sourceRoot":"","sources":["../../../src/shell/useFrameQueue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAkB,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjF,uCAAuC;AACvC,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,iGAAiG;AACjG,MAAM,WAAW,GAAG,WAAW,CAAC;AAYhC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,QAA2B,EAC3B,IAAmC,EACvB,EAAE;IACd,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAsB,IAAI,GAAG,EAAE,CAAC,CAAC;IACjE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAsB,IAAI,GAAG,EAAE,CAAC,CAAC;IACnE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAsB,IAAI,GAAG,EAAE,CAAC,CAAC;IACvE,MAAM,WAAW,GAAG,MAAM,CAAmC,SAAS,CAAC,CAAC;IACxE,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,GAAG,EAAmB,CAAC,CAAC;IAEpD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,QAAQ,GAAG,IAAI,oBAAoB,CACvC,CAAC,OAAO,EAAE,EAAE,CACV,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAClB,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;YAC9B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,MAAM,EAAE,GAAG,QAAQ,CAAC,OA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
|
3
|
+
* theme, contrast, motion, speed, press feedback, backdrop or text size is sent to them, so their stories keep their
|
|
4
|
+
* state.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Only another story, other style sheets or another language load a frame again: those change its document. The
|
|
8
|
+
* story page and the component page use both hooks.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { type RefObject } from "react";
|
|
13
|
+
import { type ViewState } from "../viewState.ts";
|
|
14
|
+
/**
|
|
15
|
+
* The view the frames load with: the current one when the load key changes, otherwise the one they loaded with.
|
|
16
|
+
*
|
|
17
|
+
* @param loadKey - what loads the frames again (the story, the style sheets, the language), as one text.
|
|
18
|
+
* @param view - the current view.
|
|
19
|
+
*/
|
|
20
|
+
export declare const useLoadedView: (loadKey: string, view: ViewState) => ViewState;
|
|
21
|
+
/**
|
|
22
|
+
* Sends the view's live part to every frame in a container whenever it changes, and the tools drawn over them.
|
|
23
|
+
*
|
|
24
|
+
* @param container - the element that holds the frames.
|
|
25
|
+
* @param view - the current view.
|
|
26
|
+
* @param isEnabled - whether the frames follow the view (the compare view's frames fix their own theme).
|
|
27
|
+
*/
|
|
28
|
+
export declare const useLiveView: (container: RefObject<HTMLElement | null>, view: ViewState, isEnabled: boolean) => void;
|
|
29
|
+
//# sourceMappingURL=useLiveView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLiveView.d.ts","sourceRoot":"","sources":["../../../src/shell/useLiveView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAmC,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAOlF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,EAAE,MAAM,SAAS,KAAG,SAKhE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GACtB,WAAW,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EACxC,MAAM,SAAS,EACf,WAAW,OAAO,KACjB,IAYF,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The view's live part on the frames of a page: the frames load once with the view they need, and a change of the
|
|
3
|
+
* theme, contrast, motion, speed, press feedback, backdrop or text size is sent to them, so their stories keep their
|
|
4
|
+
* state.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Only another story, other style sheets or another language load a frame again: those change its document. The
|
|
8
|
+
* story page and the component page use both hooks.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import { useEffect, useState } from "react";
|
|
13
|
+
import { MEASURE_TOOLS } from "../viewState.js";
|
|
14
|
+
import { tellFrames } from "./FrameView.js";
|
|
15
|
+
/** The tools a joined list names, back as a list (the effect depends on the text, not on a new list each render). */
|
|
16
|
+
const toolsOf = (joined) => MEASURE_TOOLS.filter((tool) => joined.split(",").includes(tool));
|
|
17
|
+
/**
|
|
18
|
+
* The view the frames load with: the current one when the load key changes, otherwise the one they loaded with.
|
|
19
|
+
*
|
|
20
|
+
* @param loadKey - what loads the frames again (the story, the style sheets, the language), as one text.
|
|
21
|
+
* @param view - the current view.
|
|
22
|
+
*/
|
|
23
|
+
export const useLoadedView = (loadKey, view) => {
|
|
24
|
+
const [loaded, setLoaded] = useState({ key: loadKey, view });
|
|
25
|
+
// set while rendering, as React allows for a value derived from props: the frames never get a stale address
|
|
26
|
+
if (loaded.key !== loadKey)
|
|
27
|
+
setLoaded({ key: loadKey, view });
|
|
28
|
+
return loaded.key === loadKey ? loaded.view : view;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Sends the view's live part to every frame in a container whenever it changes, and the tools drawn over them.
|
|
32
|
+
*
|
|
33
|
+
* @param container - the element that holds the frames.
|
|
34
|
+
* @param view - the current view.
|
|
35
|
+
* @param isEnabled - whether the frames follow the view (the compare view's frames fix their own theme).
|
|
36
|
+
*/
|
|
37
|
+
export const useLiveView = (container, view, isEnabled) => {
|
|
38
|
+
// a view changed elsewhere (the width, the panel) keeps its switches' object, so it sends nothing
|
|
39
|
+
const { switches, backdrop, text } = view;
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (!isEnabled)
|
|
42
|
+
return;
|
|
43
|
+
tellFrames(container.current, { type: "forgebook:view", view: { switches, backdrop, text } });
|
|
44
|
+
}, [container, switches, backdrop, text, isEnabled]);
|
|
45
|
+
// the tools draw over every frame, the compare view's too
|
|
46
|
+
const tools = view.tools.join(",");
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
tellFrames(container.current, { type: "forgebook:tools", tools: toolsOf(tools) });
|
|
49
|
+
}, [container, tools]);
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=useLiveView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLiveView.js","sourceRoot":"","sources":["../../../src/shell/useLiveView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAoC,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAiB,CAAC;AAE7C,qHAAqH;AACrH,MAAM,OAAO,GAAG,CAAC,MAAc,EAAiB,EAAE,CAChD,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAe,EAAE,IAAe,EAAa,EAAE;IAC3E,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,4GAA4G;IAC5G,IAAI,MAAM,CAAC,GAAG,KAAK,OAAO;QAAE,SAAS,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9D,OAAO,MAAM,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACrD,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,SAAwC,EACxC,IAAe,EACf,SAAkB,EACZ,EAAE;IACR,kGAAkG;IAClG,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAC1C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,SAAS;YAAE,OAAO;QACvB,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAChG,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACrD,0DAA0D;IAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnC,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACpF,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;AACzB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** A lazily loaded value: loading, read, none (the source has no loader for the file), or why it failed. */
|
|
2
|
+
export type Loaded<TValue> = {
|
|
3
|
+
readonly status: "loading";
|
|
4
|
+
} | {
|
|
5
|
+
readonly status: "ready";
|
|
6
|
+
readonly value: TValue;
|
|
7
|
+
} | {
|
|
8
|
+
readonly status: "none";
|
|
9
|
+
} | {
|
|
10
|
+
readonly status: "error";
|
|
11
|
+
readonly message: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Loads a value when its loader changes, and reads it.
|
|
15
|
+
*
|
|
16
|
+
* @param load - the source's loader for the file; `undefined` when it has none.
|
|
17
|
+
* @param read - turns what the loader gave into the state: the module's default export is unchecked data.
|
|
18
|
+
*/
|
|
19
|
+
export declare const useLoaded: <TValue>(load: (() => Promise<unknown>) | undefined, read: (value: unknown) => Loaded<TValue>) => Loaded<TValue>;
|
|
20
|
+
//# sourceMappingURL=useLoaded.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLoaded.d.ts","sourceRoot":"","sources":["../../../src/shell/useLoaded.ts"],"names":[],"mappings":"AAQA,4GAA4G;AAC5G,MAAM,MAAM,MAAM,CAAC,MAAM,IACrB;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,EAC9B,MAAM,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,EAC1C,MAAM,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,KACvC,MAAM,CAAC,MAAM,CAwBf,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A value a source loads lazily (a story file's docs or code), read into a state the shell can show: loading, the
|
|
3
|
+
* value, nothing to load, or why it failed.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { useEffect, useState } from "react";
|
|
8
|
+
/**
|
|
9
|
+
* Loads a value when its loader changes, and reads it.
|
|
10
|
+
*
|
|
11
|
+
* @param load - the source's loader for the file; `undefined` when it has none.
|
|
12
|
+
* @param read - turns what the loader gave into the state: the module's default export is unchecked data.
|
|
13
|
+
*/
|
|
14
|
+
export const useLoaded = (load, read) => {
|
|
15
|
+
const [state, setState] = useState({ status: "loading" });
|
|
16
|
+
// the reader of the first render: a reader written inline must not load the value again on every render
|
|
17
|
+
const [reader] = useState(() => read);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (load === undefined) {
|
|
20
|
+
setState({ status: "none" });
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
let isCurrent = true;
|
|
24
|
+
setState({ status: "loading" });
|
|
25
|
+
load()
|
|
26
|
+
.then((value) => {
|
|
27
|
+
if (isCurrent)
|
|
28
|
+
setState(reader(value));
|
|
29
|
+
})
|
|
30
|
+
.catch((error) => {
|
|
31
|
+
if (isCurrent)
|
|
32
|
+
setState({ status: "error", message: error instanceof Error ? error.message : String(error) });
|
|
33
|
+
});
|
|
34
|
+
return () => {
|
|
35
|
+
isCurrent = false;
|
|
36
|
+
};
|
|
37
|
+
}, [load, reader]);
|
|
38
|
+
return state;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=useLoaded.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLoaded.js","sourceRoot":"","sources":["../../../src/shell/useLoaded.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAS5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,IAA0C,EAC1C,IAAwC,EACxB,EAAE;IAClB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAiB,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC1E,wGAAwG;IACxG,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACtC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7B,OAAO;QACT,CAAC;QACD,IAAI,SAAS,GAAG,IAAI,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;QAChC,IAAI,EAAE;aACH,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE;YACd,IAAI,SAAS;gBAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACzC,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;YACxB,IAAI,SAAS;gBACX,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACnG,CAAC,CAAC,CAAC;QACL,OAAO,GAAS,EAAE;YAChB,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IACnB,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A component's page text for its page: its documentation file as HTML, loaded from the source's `pages`.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { type Loaded } from "./useLoaded.ts";
|
|
7
|
+
/** A component's page text: its documentation file's HTML and its file's summary. */
|
|
8
|
+
export type PageDoc = {
|
|
9
|
+
/** The documentation file as HTML, its title and its generated sections left out; empty without one. */
|
|
10
|
+
readonly html: string;
|
|
11
|
+
/** The first paragraph of the component file's `@module` comment, the page's lead; empty without one. */
|
|
12
|
+
readonly summary: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The page text of a story file's component.
|
|
16
|
+
*
|
|
17
|
+
* @param load - the source's loader for the file; `undefined` when it has none.
|
|
18
|
+
*/
|
|
19
|
+
export declare const usePageDoc: (load: (() => Promise<unknown>) | undefined) => Loaded<PageDoc>;
|
|
20
|
+
//# sourceMappingURL=usePageDoc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePageDoc.d.ts","sourceRoot":"","sources":["../../../src/shell/usePageDoc.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,MAAM,EAAa,MAAM,gBAAgB,CAAC;AAExD,qFAAqF;AACrF,MAAM,MAAM,OAAO,GAAG;IACpB,wGAAwG;IACxG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yGAAyG;IACzG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAWF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,KAAG,MAAM,CAAC,OAAO,CAC1D,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A component's page text for its page: its documentation file as HTML, loaded from the source's `pages`.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { useLoaded } from "./useLoaded.js";
|
|
7
|
+
/** What the plugin answered, as a state: the HTML and the summary, or why it failed. */
|
|
8
|
+
const pageState = (value) => {
|
|
9
|
+
if (typeof value === "object" && value !== null && "html" in value && typeof value.html === "string") {
|
|
10
|
+
const summary = "summary" in value && typeof value.summary === "string" ? value.summary : "";
|
|
11
|
+
return { status: "ready", value: { html: value.html, summary } };
|
|
12
|
+
}
|
|
13
|
+
return { status: "error", message: "The component's page has an unexpected shape" };
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The page text of a story file's component.
|
|
17
|
+
*
|
|
18
|
+
* @param load - the source's loader for the file; `undefined` when it has none.
|
|
19
|
+
*/
|
|
20
|
+
export const usePageDoc = (load) => useLoaded(load, pageState);
|
|
21
|
+
//# sourceMappingURL=usePageDoc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePageDoc.js","sourceRoot":"","sources":["../../../src/shell/usePageDoc.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAe,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAUxD,wFAAwF;AACxF,MAAM,SAAS,GAAG,CAAC,KAAc,EAAmB,EAAE;IACpD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACrG,MAAM,OAAO,GAAG,SAAS,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC;IACnE,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,8CAA8C,EAAE,CAAC;AACtF,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAA0C,EAAmB,EAAE,CACxF,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A button's popover: open and closed, closed by a press outside or Escape (the focus going back to the button), with
|
|
3
|
+
* the focus on its chosen option when it opens. The View and Compare menus use it.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { type RefObject } from "react";
|
|
8
|
+
/** What a menu wires to its button and panel. */
|
|
9
|
+
export type Popover = {
|
|
10
|
+
/** Whether the panel is shown. */
|
|
11
|
+
readonly isOpen: boolean;
|
|
12
|
+
/** Opens or closes the panel. */
|
|
13
|
+
readonly setIsOpen: (isOpen: boolean) => void;
|
|
14
|
+
/** The button. */
|
|
15
|
+
readonly buttonRef: RefObject<HTMLButtonElement | null>;
|
|
16
|
+
/** The panel. */
|
|
17
|
+
readonly panelRef: RefObject<HTMLDivElement | null>;
|
|
18
|
+
/** The panel's id, for the button's `aria-controls`. */
|
|
19
|
+
readonly panelId: string;
|
|
20
|
+
};
|
|
21
|
+
/** A button's popover. */
|
|
22
|
+
export declare const usePopover: () => Popover;
|
|
23
|
+
//# sourceMappingURL=usePopover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePopover.d.ts","sourceRoot":"","sources":["../../../src/shell/usePopover.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,SAAS,EAAsC,MAAM,OAAO,CAAC;AAE3E,iDAAiD;AACjD,MAAM,MAAM,OAAO,GAAG;IACpB,kCAAkC;IAClC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,iCAAiC;IACjC,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,kBAAkB;IAClB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACxD,iBAAiB;IACjB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACpD,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,0BAA0B;AAC1B,eAAO,MAAM,UAAU,QAAO,OA6B7B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A button's popover: open and closed, closed by a press outside or Escape (the focus going back to the button), with
|
|
3
|
+
* the focus on its chosen option when it opens. The View and Compare menus use it.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
8
|
+
/** A button's popover. */
|
|
9
|
+
export const usePopover = () => {
|
|
10
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
11
|
+
const buttonRef = useRef(null);
|
|
12
|
+
const panelRef = useRef(null);
|
|
13
|
+
const panelId = useId();
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!isOpen)
|
|
16
|
+
return;
|
|
17
|
+
panelRef.current?.querySelector("input:checked")?.focus();
|
|
18
|
+
const close = (event) => {
|
|
19
|
+
const target = event.target instanceof Node ? event.target : null;
|
|
20
|
+
const isOutside = event instanceof PointerEvent &&
|
|
21
|
+
!panelRef.current?.contains(target) &&
|
|
22
|
+
!buttonRef.current?.contains(target);
|
|
23
|
+
const isEscape = event instanceof KeyboardEvent && event.key === "Escape";
|
|
24
|
+
if (!isOutside && !isEscape)
|
|
25
|
+
return;
|
|
26
|
+
setIsOpen(false);
|
|
27
|
+
if (isEscape)
|
|
28
|
+
buttonRef.current?.focus();
|
|
29
|
+
};
|
|
30
|
+
document.addEventListener("pointerdown", close);
|
|
31
|
+
document.addEventListener("keydown", close);
|
|
32
|
+
return () => {
|
|
33
|
+
document.removeEventListener("pointerdown", close);
|
|
34
|
+
document.removeEventListener("keydown", close);
|
|
35
|
+
};
|
|
36
|
+
}, [isOpen]);
|
|
37
|
+
return { isOpen, setIsOpen, buttonRef, panelRef, panelId };
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=usePopover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePopover.js","sourceRoot":"","sources":["../../../src/shell/usePopover.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAkB,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAgB3E,0BAA0B;AAC1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAY,EAAE;IACtC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IAExB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAmB,eAAe,CAAC,EAAE,KAAK,EAAE,CAAC;QAC5E,MAAM,KAAK,GAAG,CAAC,KAAmC,EAAQ,EAAE;YAC1D,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,YAAY,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;YAClE,MAAM,SAAS,GACb,KAAK,YAAY,YAAY;gBAC7B,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC;gBACnC,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;YACvC,MAAM,QAAQ,GAAG,KAAK,YAAY,aAAa,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC;YAC1E,IAAI,CAAC,SAAS,IAAI,CAAC,QAAQ;gBAAE,OAAO;YACpC,SAAS,CAAC,KAAK,CAAC,CAAC;YACjB,IAAI,QAAQ;gBAAE,SAAS,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;QAC3C,CAAC,CAAC;QACF,QAAQ,CAAC,gBAAgB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QAChD,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC5C,OAAO,GAAS,EAAE;YAChB,QAAQ,CAAC,mBAAmB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;YACnD,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACjD,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC7D,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** A page the home can list: a story's or a component's, by id. */
|
|
2
|
+
export type RecentPage = {
|
|
3
|
+
/** Which kind of page. */
|
|
4
|
+
readonly kind: "story" | "component";
|
|
5
|
+
/** The story's or the component's id. */
|
|
6
|
+
readonly id: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The list with a page opened now: first, once, the oldest dropped past the limit.
|
|
10
|
+
*
|
|
11
|
+
* @param pages - the list.
|
|
12
|
+
* @param page - the page opened.
|
|
13
|
+
*/
|
|
14
|
+
export declare const withRecentPage: (pages: readonly RecentPage[], page: RecentPage) => readonly RecentPage[];
|
|
15
|
+
/**
|
|
16
|
+
* The pages opened last, recording the shown one.
|
|
17
|
+
*
|
|
18
|
+
* @param shown - the page shown now; none on the home or a missing page.
|
|
19
|
+
*/
|
|
20
|
+
export declare const useRecentPages: (shown: RecentPage | undefined) => readonly RecentPage[];
|
|
21
|
+
//# sourceMappingURL=useRecentPages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRecentPages.d.ts","sourceRoot":"","sources":["../../../src/shell/useRecentPages.ts"],"names":[],"mappings":"AAaA,mEAAmE;AACnE,MAAM,MAAM,UAAU,GAAG;IACvB,0BAA0B;IAC1B,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CAAC;IACrC,yCAAyC;IACzC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,CAAC;AA4BF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,UAAU,EAAE,EAAE,MAAM,UAAU,KAAG,SAAS,UAAU,EACS,CAAC;AAE7G;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,UAAU,GAAG,SAAS,KAAG,SAAS,UAAU,EAYjF,CAAC"}
|