forgebook 0.0.0-stage → 0.1.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/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 +115 -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 +47 -0
- package/dist/src/shell/StageViewport.d.ts.map +1 -0
- package/dist/src/shell/StageViewport.js +174 -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,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `--json` document of `forgebook-texts`: the keys the stories use, what is wrong with them, and what each language
|
|
3
|
+
* still has to translate.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
/** A text one language still lacks: its key and the English to translate. */
|
|
8
|
+
export type UntranslatedText = {
|
|
9
|
+
/** The key (`skeleton.dashboard.title`). */
|
|
10
|
+
readonly key: string;
|
|
11
|
+
/** The English text. */
|
|
12
|
+
readonly text: string;
|
|
13
|
+
};
|
|
14
|
+
/** What `forgebook-texts` reports. */
|
|
15
|
+
export type StoryTextsReport = {
|
|
16
|
+
/** How many keys the stories use. */
|
|
17
|
+
readonly used: number;
|
|
18
|
+
/** Keys a story uses that the English file lacks: the story would show the key. */
|
|
19
|
+
readonly missing: readonly string[];
|
|
20
|
+
/** Keys of the English file no story uses. */
|
|
21
|
+
readonly unused: readonly string[];
|
|
22
|
+
/** By language id (every file but English), the texts it lacks. */
|
|
23
|
+
readonly untranslated: Readonly<Record<string, readonly UntranslatedText[]>>;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=storyTextsReport.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyTextsReport.types.d.ts","sourceRoot":"","sources":["../../../bin/forgebook-texts/storyTextsReport.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,6EAA6E;AAC7E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,4CAA4C;IAC5C,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wBAAwB;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,sCAAsC;AACtC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,qCAAqC;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,mEAAmE;IACnE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC,CAAC,CAAC;CAC9E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storyTextsReport.types.js","sourceRoot":"","sources":["../../../bin/forgebook-texts/storyTextsReport.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A violation of the accessibility check of a story, as the catalogue's Accessibility card shows it; the rules
|
|
3
|
+
* checked are the catalogue's (`catalogue.ts`, WCAG 2.2 A and AA by default), the same in the generated tests.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* The card runs the check in the story's frame, on what the story shows at that moment (an open menu, a dark theme),
|
|
7
|
+
* so a problem is seen while the story is written, not first in CI.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
/** How bad a violation is, as axe rates it. */
|
|
12
|
+
export type ViolationImpact = "minor" | "moderate" | "serious" | "critical";
|
|
13
|
+
/** One rule a story breaks. */
|
|
14
|
+
export type Violation = {
|
|
15
|
+
/** The rule's id (`color-contrast`). */
|
|
16
|
+
readonly id: string;
|
|
17
|
+
/** What the rule asks, in a sentence. */
|
|
18
|
+
readonly help: string;
|
|
19
|
+
/** How bad it is; none when axe does not say. */
|
|
20
|
+
readonly impact: ViolationImpact | undefined;
|
|
21
|
+
/** The page explaining the rule. */
|
|
22
|
+
readonly helpUrl: string;
|
|
23
|
+
/** A selector of each element that breaks it. */
|
|
24
|
+
readonly targets: readonly string[];
|
|
25
|
+
};
|
|
26
|
+
/** Whether a value is a violation, as it arrives in a message. */
|
|
27
|
+
export declare const isViolation: (value: unknown) => value is Violation;
|
|
28
|
+
//# sourceMappingURL=a11y.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../../src/a11y.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,+CAA+C;AAC/C,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAE5E,+BAA+B;AAC/B,MAAM,MAAM,SAAS,GAAG;IACtB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,CAAC;IAC7C,oCAAoC;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,SAiBrD,CAAC"}
|
package/dist/src/a11y.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A violation of the accessibility check of a story, as the catalogue's Accessibility card shows it; the rules
|
|
3
|
+
* checked are the catalogue's (`catalogue.ts`, WCAG 2.2 A and AA by default), the same in the generated tests.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* The card runs the check in the story's frame, on what the story shows at that moment (an open menu, a dark theme),
|
|
7
|
+
* so a problem is seen while the story is written, not first in CI.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
/** Whether a value is a violation, as it arrives in a message. */
|
|
12
|
+
export const isViolation = (value) => {
|
|
13
|
+
if (typeof value !== "object" || value === null)
|
|
14
|
+
return false;
|
|
15
|
+
const record = { ...value };
|
|
16
|
+
const impact = record["impact"];
|
|
17
|
+
const targets = record["targets"];
|
|
18
|
+
return (typeof record["id"] === "string" &&
|
|
19
|
+
typeof record["help"] === "string" &&
|
|
20
|
+
typeof record["helpUrl"] === "string" &&
|
|
21
|
+
(impact === undefined ||
|
|
22
|
+
impact === "minor" ||
|
|
23
|
+
impact === "moderate" ||
|
|
24
|
+
impact === "serious" ||
|
|
25
|
+
impact === "critical") &&
|
|
26
|
+
Array.isArray(targets) &&
|
|
27
|
+
targets.every((target) => typeof target === "string"));
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=a11y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a11y.js","sourceRoot":"","sources":["../../src/a11y.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAmBH,kEAAkE;AAClE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAsB,EAAE;IAChE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,MAAM,GAAsC,EAAE,GAAG,KAAK,EAAE,CAAC;IAC/D,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAClC,OAAO,CACL,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,QAAQ;QAChC,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,QAAQ;QAClC,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,QAAQ;QACrC,CAAC,MAAM,KAAK,SAAS;YACnB,MAAM,KAAK,OAAO;YAClB,MAAM,KAAK,UAAU;YACrB,MAAM,KAAK,SAAS;YACpB,MAAM,KAAK,UAAU,CAAC;QACxB,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,CAAC,CACtD,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A story's `argTypes` (Storybook's): read in the frame from the meta and the story, sent to the shell in a form that
|
|
3
|
+
* crosses between the documents, laid over the props the component's types give, and their `mapping` applied to the
|
|
4
|
+
* args the story receives.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The panel's props come from the component's types (`componentDocs.ts`); `argTypes` say otherwise where a story
|
|
8
|
+
* means another control, other options, other names, or an arg the types do not name. Without `argTypes` the panel
|
|
9
|
+
* shows the props exactly as the types give them. Option values that cannot cross (a component, a function) are
|
|
10
|
+
* sent as their `mapping` keys, which the frame turns back into the values. `object` and `file` controls have no
|
|
11
|
+
* control in the panel: their args are listed for reading. Pure.
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import type { StoryControlsSetting } from "@forgebook/story-format/source";
|
|
16
|
+
import type { PropDocs } from "./componentDocs.ts";
|
|
17
|
+
/** A control as the panel draws it; `none` for an arg the panel lists without a control. */
|
|
18
|
+
export type PanelControl = "select" | "radio" | "check" | "multi-select" | "boolean" | "text" | "number" | "range" | "color" | "date" | "none";
|
|
19
|
+
/** How the panel shows one arg, from its `argTypes` entry: what crosses from the frame to the shell. */
|
|
20
|
+
export type PanelArgType = {
|
|
21
|
+
/** The name the panel shows, when it is not the arg's. */
|
|
22
|
+
readonly label?: string;
|
|
23
|
+
/** What the arg does, over its TSDoc. */
|
|
24
|
+
readonly description?: string;
|
|
25
|
+
/** Whether the panel leaves the arg out. */
|
|
26
|
+
readonly isHidden: boolean;
|
|
27
|
+
/** Its control, when the entry names one (or gives options, which make a choice). */
|
|
28
|
+
readonly control?: PanelControl;
|
|
29
|
+
/** A choice's options: texts and numbers, or the `mapping` keys the story receives values for. */
|
|
30
|
+
readonly options?: readonly (string | number)[];
|
|
31
|
+
/** The names shown for the options, by option. */
|
|
32
|
+
readonly labels?: Readonly<Record<string, string>>;
|
|
33
|
+
/** A range's or a number's lowest value. */
|
|
34
|
+
readonly min?: number;
|
|
35
|
+
/** A range's or a number's highest value. */
|
|
36
|
+
readonly max?: number;
|
|
37
|
+
/** A range's or a number's step. */
|
|
38
|
+
readonly step?: number;
|
|
39
|
+
};
|
|
40
|
+
/** The panel's arg types, by arg. */
|
|
41
|
+
export type PanelArgTypes = Readonly<Record<string, PanelArgType>>;
|
|
42
|
+
/** A prop as the panel shows it: its docs with what `argTypes` say laid over them. */
|
|
43
|
+
export type PanelProp = PropDocs & {
|
|
44
|
+
/** The name the panel shows, when it is not the prop's. */
|
|
45
|
+
readonly label?: string;
|
|
46
|
+
/** The control `argTypes` name; none leaves it to the prop's kind. */
|
|
47
|
+
readonly control?: PanelControl;
|
|
48
|
+
/** The names shown for a choice's values, by value. */
|
|
49
|
+
readonly labels?: Readonly<Record<string, string>>;
|
|
50
|
+
/** A range's or a number's lowest value. */
|
|
51
|
+
readonly min?: number;
|
|
52
|
+
/** A range's or a number's highest value. */
|
|
53
|
+
readonly max?: number;
|
|
54
|
+
/** A range's or a number's step. */
|
|
55
|
+
readonly step?: number;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The `argTypes` of the meta and the story, merged: each arg's entry from both, the story's fields over the meta's.
|
|
59
|
+
*
|
|
60
|
+
* @param meta - the meta's `argTypes`.
|
|
61
|
+
* @param story - the story's `argTypes`.
|
|
62
|
+
*/
|
|
63
|
+
export declare const mergedArgTypes: (meta: unknown, story: unknown) => Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|
|
64
|
+
/**
|
|
65
|
+
* The arg types the frame sends: each entry read, and the args `parameters.controls.exclude` names hidden.
|
|
66
|
+
*
|
|
67
|
+
* @param argTypes - the merged `argTypes`.
|
|
68
|
+
* @param excluded - the args `parameters.controls.exclude` names.
|
|
69
|
+
*/
|
|
70
|
+
export declare const panelArgTypesOf: (argTypes: Readonly<Record<string, Readonly<Record<string, unknown>>>>, excluded: readonly string[]) => PanelArgTypes;
|
|
71
|
+
/**
|
|
72
|
+
* The args with each `mapping` applied: an arg whose value is a key of its entry's `mapping` receives the value the
|
|
73
|
+
* key stands for, as Storybook's (an arg written as the key in the story, or chosen in the panel).
|
|
74
|
+
*
|
|
75
|
+
* @param args - the args.
|
|
76
|
+
* @param argTypes - the merged `argTypes`.
|
|
77
|
+
*/
|
|
78
|
+
export declare const mappedArgs: (args: Readonly<Record<string, unknown>>, argTypes: Readonly<Record<string, Readonly<Record<string, unknown>>>>) => Readonly<Record<string, unknown>>;
|
|
79
|
+
/**
|
|
80
|
+
* The panel's props: the component's, with their arg types laid over them, the hidden ones left out, then the args
|
|
81
|
+
* only the arg types name, in their order.
|
|
82
|
+
*
|
|
83
|
+
* @param props - the props the component's types give.
|
|
84
|
+
* @param argTypes - the story's arg types; none leaves the props as they are.
|
|
85
|
+
*/
|
|
86
|
+
export declare const panelProps: (props: readonly PropDocs[], argTypes: PanelArgTypes) => readonly PanelProp[];
|
|
87
|
+
/**
|
|
88
|
+
* The props the panel can set, as the story's parameters say: `false` none, a list or `{ include }` those, anything
|
|
89
|
+
* else every one.
|
|
90
|
+
*
|
|
91
|
+
* @param value - `parameters.controls`.
|
|
92
|
+
*/
|
|
93
|
+
export declare const controlsOfParameter: (value: unknown) => StoryControlsSetting;
|
|
94
|
+
/**
|
|
95
|
+
* The args `parameters.controls.exclude` hides.
|
|
96
|
+
*
|
|
97
|
+
* @param value - `parameters.controls`.
|
|
98
|
+
*/
|
|
99
|
+
export declare const excludedControls: (value: unknown) => readonly string[];
|
|
100
|
+
/**
|
|
101
|
+
* Whether a value received from a frame is a story's panel arg types.
|
|
102
|
+
*
|
|
103
|
+
* @param value - the message's field.
|
|
104
|
+
*/
|
|
105
|
+
export declare const isPanelArgTypes: (value: unknown) => value is PanelArgTypes;
|
|
106
|
+
/**
|
|
107
|
+
* The args whose calls the Events tab records as actions: those whose value is a spy, and those whose `argTypes`
|
|
108
|
+
* entry names an `action`. Explicit only: no arg is recorded for its name alone.
|
|
109
|
+
*
|
|
110
|
+
* @param args - the story's args.
|
|
111
|
+
* @param argTypes - the merged `argTypes`.
|
|
112
|
+
*/
|
|
113
|
+
export declare const actionNames: (args: Readonly<Record<string, unknown>>, argTypes: Readonly<Record<string, Readonly<Record<string, unknown>>>>) => readonly string[];
|
|
114
|
+
//# sourceMappingURL=argTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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Q,EAAE,EAAE,UAAU,aAAa,KAAG,SAAS,SAAS,EAWlG,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,OAAO,KAAG,oBAMpD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,SAAS,MAAM,EAGhE,CAAC;AAWF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,aACK,CAAC;AAKhE;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GACtB,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACvC,UAAU,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KACpE,SAAS,MAAM,EAOjB,CAAC"}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A story's `argTypes` (Storybook's): read in the frame from the meta and the story, sent to the shell in a form that
|
|
3
|
+
* crosses between the documents, laid over the props the component's types give, and their `mapping` applied to the
|
|
4
|
+
* args the story receives.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* The panel's props come from the component's types (`componentDocs.ts`); `argTypes` say otherwise where a story
|
|
8
|
+
* means another control, other options, other names, or an arg the types do not name. Without `argTypes` the panel
|
|
9
|
+
* shows the props exactly as the types give them. Option values that cannot cross (a component, a function) are
|
|
10
|
+
* sent as their `mapping` keys, which the frame turns back into the values. `object` and `file` controls have no
|
|
11
|
+
* control in the panel: their args are listed for reading. Pure.
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
/** Whether a value is a plain object. */
|
|
16
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
17
|
+
/** Storybook's control names, as the panel draws them (the inline variants look the same here). */
|
|
18
|
+
const CONTROLS = {
|
|
19
|
+
select: "select",
|
|
20
|
+
radio: "radio",
|
|
21
|
+
"inline-radio": "radio",
|
|
22
|
+
check: "check",
|
|
23
|
+
"inline-check": "check",
|
|
24
|
+
"multi-select": "multi-select",
|
|
25
|
+
boolean: "boolean",
|
|
26
|
+
text: "text",
|
|
27
|
+
number: "number",
|
|
28
|
+
range: "range",
|
|
29
|
+
color: "color",
|
|
30
|
+
date: "date",
|
|
31
|
+
object: "none",
|
|
32
|
+
file: "none"
|
|
33
|
+
};
|
|
34
|
+
/** The panel controls, for the check on arrival. */
|
|
35
|
+
const PANEL_CONTROLS = [...new Set(Object.values(CONTROLS))];
|
|
36
|
+
/** A number field of an object, when it is a finite number. */
|
|
37
|
+
const numberOf = (part, name) => {
|
|
38
|
+
const value = part[name];
|
|
39
|
+
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
40
|
+
};
|
|
41
|
+
/** The labels of a control, when every one is a text. */
|
|
42
|
+
const labelsOf = (value) => isRecord(value) && Object.values(value).every((label) => typeof label === "string")
|
|
43
|
+
? Object.fromEntries(Object.entries(value).map(([option, label]) => [option, String(label)]))
|
|
44
|
+
: undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The control an entry names: `false` and a disabled control are none, a name or `{ type }` is that control, and
|
|
47
|
+
* options without a control make a select.
|
|
48
|
+
*/
|
|
49
|
+
const controlOf = (entry) => {
|
|
50
|
+
const control = entry["control"];
|
|
51
|
+
if (control === false)
|
|
52
|
+
return "none";
|
|
53
|
+
if (typeof control === "string")
|
|
54
|
+
return CONTROLS[control];
|
|
55
|
+
if (isRecord(control)) {
|
|
56
|
+
if (control["disable"] === true)
|
|
57
|
+
return "none";
|
|
58
|
+
if (typeof control["type"] === "string")
|
|
59
|
+
return CONTROLS[control["type"]];
|
|
60
|
+
}
|
|
61
|
+
return Array.isArray(entry["options"]) ? "select" : undefined;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* The options as they cross: texts and numbers as they are; any other value only through `mapping`, whose keys are
|
|
65
|
+
* the options then.
|
|
66
|
+
*/
|
|
67
|
+
const optionsOf = (entry) => {
|
|
68
|
+
const options = entry["options"];
|
|
69
|
+
if (!Array.isArray(options))
|
|
70
|
+
return undefined;
|
|
71
|
+
return options.filter((option) => typeof option === "string" || typeof option === "number");
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* One entry as the panel reads it.
|
|
75
|
+
*
|
|
76
|
+
* @param entry - the `argTypes` entry, the story's laid over the meta's.
|
|
77
|
+
* @param isExcluded - whether `parameters.controls.exclude` names the arg.
|
|
78
|
+
*/
|
|
79
|
+
const panelArgTypeOf = (entry, isExcluded) => {
|
|
80
|
+
const control = controlOf(entry);
|
|
81
|
+
const options = optionsOf(entry);
|
|
82
|
+
const settings = isRecord(entry["control"]) ? entry["control"] : {};
|
|
83
|
+
const table = entry["table"];
|
|
84
|
+
const name = entry["name"];
|
|
85
|
+
const description = entry["description"];
|
|
86
|
+
const labels = labelsOf(settings["labels"]);
|
|
87
|
+
const min = numberOf(settings, "min");
|
|
88
|
+
const max = numberOf(settings, "max");
|
|
89
|
+
const step = numberOf(settings, "step");
|
|
90
|
+
return {
|
|
91
|
+
isHidden: isExcluded || (isRecord(table) && table["disable"] === true),
|
|
92
|
+
...(typeof name === "string" ? { label: name } : {}),
|
|
93
|
+
...(typeof description === "string" ? { description } : {}),
|
|
94
|
+
...(control === undefined ? {} : { control }),
|
|
95
|
+
...(options === undefined ? {} : { options }),
|
|
96
|
+
...(labels === undefined ? {} : { labels }),
|
|
97
|
+
...(min === undefined ? {} : { min }),
|
|
98
|
+
...(max === undefined ? {} : { max }),
|
|
99
|
+
...(step === undefined ? {} : { step })
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* The `argTypes` of the meta and the story, merged: each arg's entry from both, the story's fields over the meta's.
|
|
104
|
+
*
|
|
105
|
+
* @param meta - the meta's `argTypes`.
|
|
106
|
+
* @param story - the story's `argTypes`.
|
|
107
|
+
*/
|
|
108
|
+
export const mergedArgTypes = (meta, story) => {
|
|
109
|
+
const merged = {};
|
|
110
|
+
for (const part of [meta, story]) {
|
|
111
|
+
if (!isRecord(part))
|
|
112
|
+
continue;
|
|
113
|
+
for (const [name, entry] of Object.entries(part)) {
|
|
114
|
+
if (isRecord(entry))
|
|
115
|
+
merged[name] = { ...merged[name], ...entry };
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return merged;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* The arg types the frame sends: each entry read, and the args `parameters.controls.exclude` names hidden.
|
|
122
|
+
*
|
|
123
|
+
* @param argTypes - the merged `argTypes`.
|
|
124
|
+
* @param excluded - the args `parameters.controls.exclude` names.
|
|
125
|
+
*/
|
|
126
|
+
export const panelArgTypesOf = (argTypes, excluded) => {
|
|
127
|
+
const names = [...new Set([...Object.keys(argTypes), ...excluded])];
|
|
128
|
+
return Object.fromEntries(names.map((name) => [name, panelArgTypeOf(argTypes[name] ?? {}, excluded.includes(name))]));
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* The args with each `mapping` applied: an arg whose value is a key of its entry's `mapping` receives the value the
|
|
132
|
+
* key stands for, as Storybook's (an arg written as the key in the story, or chosen in the panel).
|
|
133
|
+
*
|
|
134
|
+
* @param args - the args.
|
|
135
|
+
* @param argTypes - the merged `argTypes`.
|
|
136
|
+
*/
|
|
137
|
+
export const mappedArgs = (args, argTypes) => Object.fromEntries(Object.entries(args).map(([name, value]) => {
|
|
138
|
+
const mapping = argTypes[name]?.["mapping"];
|
|
139
|
+
if (!isRecord(mapping) || (typeof value !== "string" && typeof value !== "number"))
|
|
140
|
+
return [name, value];
|
|
141
|
+
const key = String(value);
|
|
142
|
+
return [name, key in mapping ? mapping[key] : value];
|
|
143
|
+
}));
|
|
144
|
+
/** The prop kind a control sets, for the panel's groups. */
|
|
145
|
+
const KIND_OF_CONTROL = {
|
|
146
|
+
select: "choice",
|
|
147
|
+
radio: "choice",
|
|
148
|
+
check: "choice",
|
|
149
|
+
"multi-select": "choice",
|
|
150
|
+
boolean: "toggle",
|
|
151
|
+
text: "text",
|
|
152
|
+
number: "number",
|
|
153
|
+
range: "number",
|
|
154
|
+
color: "text",
|
|
155
|
+
date: "number",
|
|
156
|
+
none: "other"
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* A prop with its arg type laid over it.
|
|
160
|
+
*
|
|
161
|
+
* @param prop - the prop as the types give it.
|
|
162
|
+
* @param argType - its arg type.
|
|
163
|
+
*/
|
|
164
|
+
const withArgType = (prop, argType) => {
|
|
165
|
+
const { control } = argType;
|
|
166
|
+
// a control the panel cannot draw makes the prop one it lists for reading, never one that takes a text
|
|
167
|
+
const isReadOnly = control === "none";
|
|
168
|
+
const { canTakeText: _canTakeText, ...rest } = prop;
|
|
169
|
+
return {
|
|
170
|
+
...(isReadOnly ? rest : prop),
|
|
171
|
+
...(control === undefined ? {} : { kind: KIND_OF_CONTROL[control], control }),
|
|
172
|
+
...(argType.options === undefined ? {} : { choices: argType.options }),
|
|
173
|
+
...(argType.description === undefined ? {} : { description: argType.description }),
|
|
174
|
+
...(argType.label === undefined ? {} : { label: argType.label }),
|
|
175
|
+
...(argType.labels === undefined ? {} : { labels: argType.labels }),
|
|
176
|
+
...(argType.min === undefined ? {} : { min: argType.min }),
|
|
177
|
+
...(argType.max === undefined ? {} : { max: argType.max }),
|
|
178
|
+
...(argType.step === undefined ? {} : { step: argType.step })
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
/** A prop the types do not name, made from its arg type alone: a text when it names no control. */
|
|
182
|
+
const propOfArgType = (name, argType) => withArgType({ name, kind: "text", type: "", description: "", isRequired: false }, argType);
|
|
183
|
+
/**
|
|
184
|
+
* The panel's props: the component's, with their arg types laid over them, the hidden ones left out, then the args
|
|
185
|
+
* only the arg types name, in their order.
|
|
186
|
+
*
|
|
187
|
+
* @param props - the props the component's types give.
|
|
188
|
+
* @param argTypes - the story's arg types; none leaves the props as they are.
|
|
189
|
+
*/
|
|
190
|
+
export const panelProps = (props, argTypes) => {
|
|
191
|
+
const typed = new Set(props.map((prop) => prop.name));
|
|
192
|
+
const fromTypes = props.flatMap((prop) => {
|
|
193
|
+
const argType = argTypes[prop.name];
|
|
194
|
+
if (argType === undefined)
|
|
195
|
+
return [prop];
|
|
196
|
+
return argType.isHidden ? [] : [withArgType(prop, argType)];
|
|
197
|
+
});
|
|
198
|
+
const fromArgTypes = Object.entries(argTypes).flatMap(([name, argType]) => typed.has(name) || argType.isHidden ? [] : [propOfArgType(name, argType)]);
|
|
199
|
+
return [...fromTypes, ...fromArgTypes];
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* The props the panel can set, as the story's parameters say: `false` none, a list or `{ include }` those, anything
|
|
203
|
+
* else every one.
|
|
204
|
+
*
|
|
205
|
+
* @param value - `parameters.controls`.
|
|
206
|
+
*/
|
|
207
|
+
export const controlsOfParameter = (value) => {
|
|
208
|
+
if (value === false)
|
|
209
|
+
return [];
|
|
210
|
+
if (Array.isArray(value) && value.every((name) => typeof name === "string"))
|
|
211
|
+
return value;
|
|
212
|
+
const include = isRecord(value) ? value["include"] : undefined;
|
|
213
|
+
if (Array.isArray(include) && include.every((name) => typeof name === "string"))
|
|
214
|
+
return include;
|
|
215
|
+
return "all";
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* The args `parameters.controls.exclude` hides.
|
|
219
|
+
*
|
|
220
|
+
* @param value - `parameters.controls`.
|
|
221
|
+
*/
|
|
222
|
+
export const excludedControls = (value) => {
|
|
223
|
+
const exclude = isRecord(value) ? value["exclude"] : undefined;
|
|
224
|
+
return Array.isArray(exclude) ? exclude.filter((name) => typeof name === "string") : [];
|
|
225
|
+
};
|
|
226
|
+
/** Whether a value is one arg's panel arg type. */
|
|
227
|
+
const isPanelArgType = (value) => isRecord(value) &&
|
|
228
|
+
typeof value["isHidden"] === "boolean" &&
|
|
229
|
+
(value["control"] === undefined || PANEL_CONTROLS.some((control) => control === value["control"])) &&
|
|
230
|
+
(value["options"] === undefined ||
|
|
231
|
+
(Array.isArray(value["options"]) &&
|
|
232
|
+
value["options"].every((option) => typeof option === "string" || typeof option === "number")));
|
|
233
|
+
/**
|
|
234
|
+
* Whether a value received from a frame is a story's panel arg types.
|
|
235
|
+
*
|
|
236
|
+
* @param value - the message's field.
|
|
237
|
+
*/
|
|
238
|
+
export const isPanelArgTypes = (value) => isRecord(value) && Object.values(value).every(isPanelArgType);
|
|
239
|
+
/** Whether a value is a spy (`fn()` of `storybook/test` or Vitest): a function with its calls under `mock`. */
|
|
240
|
+
const isSpy = (value) => typeof value === "function" && "mock" in value;
|
|
241
|
+
/**
|
|
242
|
+
* The args whose calls the Events tab records as actions: those whose value is a spy, and those whose `argTypes`
|
|
243
|
+
* entry names an `action`. Explicit only: no arg is recorded for its name alone.
|
|
244
|
+
*
|
|
245
|
+
* @param args - the story's args.
|
|
246
|
+
* @param argTypes - the merged `argTypes`.
|
|
247
|
+
*/
|
|
248
|
+
export const actionNames = (args, argTypes) => [
|
|
249
|
+
...new Set([
|
|
250
|
+
...Object.entries(args).flatMap(([name, value]) => (isSpy(value) ? [name] : [])),
|
|
251
|
+
...Object.entries(argTypes).flatMap(([name, entry]) => typeof entry["action"] === "string" || entry["action"] === true ? [name] : [])
|
|
252
|
+
])
|
|
253
|
+
];
|
|
254
|
+
//# sourceMappingURL=argTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argTypes.js","sourceRoot":"","sources":["../../src/argTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA6DH,yCAAyC;AACzC,MAAM,QAAQ,GAAG,CAAC,KAAc,EAA8C,EAAE,CAC9E,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAEvE,mGAAmG;AACnG,MAAM,QAAQ,GAA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CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CACpD,OAAO,KAAK,CAAC,QAAQ,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAC9E;KACF,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The backdrops Forgebook draws behind a story in place of its page's colour (D-644): a checkerboard, a vivid
|
|
3
|
+
* abstract picture, a light and a dark desktop-like picture, a page of content, and a catalogue's own. They show what a translucent
|
|
4
|
+
* surface (a menu's or a popover's glass, its blur) does, which the page's plain colour hides.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Every picture is drawn here in CSS gradients and inline SVG: no image file, nothing fetched, nothing of the library
|
|
8
|
+
* the catalogue shows (D-67), invented words only. The frame turns the chosen backdrop into a style sheet of its
|
|
9
|
+
* own (`backdropSheet`) that replaces the `body` background its source sets, so the story's own layout and colours
|
|
10
|
+
* are unchanged; the shell reads the backdrop's colour (`backdropColor`) for the box a story waits in while it loads.
|
|
11
|
+
* The desktop pictures are fixed whatever the theme; the page of content follows the theme, as an app's page would
|
|
12
|
+
* (D-651). With forced colours nothing is drawn: the system's palette decides the page (D-650). Pure.
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
/** A backdrop as CSS, for one colour scheme. */
|
|
17
|
+
export type BackdropLook = {
|
|
18
|
+
/** The colour under the pictures, which the box of a loading story waits on. */
|
|
19
|
+
readonly color: string;
|
|
20
|
+
/** The picture's layers, as the `background` shorthand writes them (image, position, size, repeat), top first. */
|
|
21
|
+
readonly layers: string;
|
|
22
|
+
};
|
|
23
|
+
/** A drawn backdrop: its look in a light and a dark theme, the same look when it does not follow the theme. */
|
|
24
|
+
export type DrawnBackdrop = {
|
|
25
|
+
/** The look in the light theme. */
|
|
26
|
+
readonly light: BackdropLook;
|
|
27
|
+
/** The look in the dark theme. */
|
|
28
|
+
readonly dark: BackdropLook;
|
|
29
|
+
};
|
|
30
|
+
/** A backdrop the View menu offers: its id (the address's `backdrop`), its name, its look. */
|
|
31
|
+
export type Backdrop = {
|
|
32
|
+
/** Its id, as the address writes it (`checkerboard`). */
|
|
33
|
+
readonly id: string;
|
|
34
|
+
/** Its name in the View menu. */
|
|
35
|
+
readonly label: string;
|
|
36
|
+
/** Its look in each scheme. */
|
|
37
|
+
readonly drawn: DrawnBackdrop;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* A catalogue's own backdrop, as its configuration writes it: a colour and, optionally, CSS layers over it, for the
|
|
41
|
+
* light scheme and, when it differs, the dark one.
|
|
42
|
+
*/
|
|
43
|
+
export type CustomBackdrop = {
|
|
44
|
+
/** Its id, as the address writes it. */
|
|
45
|
+
readonly id: string;
|
|
46
|
+
/** Its name in the View menu. */
|
|
47
|
+
readonly label: string;
|
|
48
|
+
/** Its look in the light scheme (and the dark one without `dark`). */
|
|
49
|
+
readonly light: {
|
|
50
|
+
readonly color: string;
|
|
51
|
+
readonly layers?: string;
|
|
52
|
+
};
|
|
53
|
+
/** Its look in the dark scheme; the light one by default. */
|
|
54
|
+
readonly dark?: {
|
|
55
|
+
readonly color: string;
|
|
56
|
+
readonly layers?: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/** The backdrops Forgebook draws, in the View menu's order: every one but the page's own colour. */
|
|
60
|
+
export declare const BUILT_IN_BACKDROPS: readonly Backdrop[];
|
|
61
|
+
/**
|
|
62
|
+
* A catalogue's own backdrop, drawn as the built-in ones are.
|
|
63
|
+
*
|
|
64
|
+
* @param custom - the backdrop as the configuration writes it.
|
|
65
|
+
*/
|
|
66
|
+
export declare const customBackdrop: (custom: CustomBackdrop) => Backdrop;
|
|
67
|
+
/**
|
|
68
|
+
* The colour a backdrop is drawn on, which the box of a loading story waits on.
|
|
69
|
+
*
|
|
70
|
+
* @param backdrop - the backdrop; none for the page's own colour.
|
|
71
|
+
* @param isDark - whether the story is drawn in the dark scheme (a backdrop may follow it).
|
|
72
|
+
* @returns the CSS colour; none for the page's own colour.
|
|
73
|
+
*/
|
|
74
|
+
export declare const backdropColor: (backdrop: Backdrop | undefined, isDark: boolean) => string | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* The style sheet that draws a backdrop behind a frame's story.
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* The rule sits on `body`, where the sources set their page colour, and wins over it with `!important`, so the
|
|
80
|
+
* story's own elements keep every colour they set. The dark look follows the scheme the view draws in (its colour
|
|
81
|
+
* scheme switch's, `switches.ts`), the system's preference for `system`; with forced colours the sheet draws nothing.
|
|
82
|
+
*
|
|
83
|
+
* @param backdrop - the backdrop; none for the page's own colour.
|
|
84
|
+
* @param scheme - the scheme the story is drawn in.
|
|
85
|
+
* @returns the CSS; empty for the page's own colour.
|
|
86
|
+
*/
|
|
87
|
+
export declare const backdropSheet: (backdrop: Backdrop | undefined, scheme: "light" | "dark" | "system") => string;
|
|
88
|
+
//# sourceMappingURL=backdrops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backdrops.d.ts","sourceRoot":"","sources":["../../src/backdrops.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,gDAAgD;AAChD,MAAM,MAAM,YAAY,GAAG;IACzB,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,kHAAkH;IAClH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,+GAA+G;AAC/G,MAAM,MAAM,aAAa,GAAG;IAC1B,mCAAmC;IACnC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,8FAA8F;AAC9F,MAAM,MAAM,QAAQ,GA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