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,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every text the catalogue's shell shows, in one place: the catalogue is a development tool in English, and keeping
|
|
3
|
+
* its words together keeps them consistent and ready for a translation.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* A catalogue may replace any plain text by its name (`strings: { props: "Controls", "tabs.props": "Controls" }` in
|
|
7
|
+
* its configuration): the shell applies the replacements once, before it draws (`configureStrings`), as a translation
|
|
8
|
+
* is set up, so every module keeps reading `STRINGS`. A text that takes values (`allStories(count)`) stays the shell's.
|
|
9
|
+
*
|
|
10
|
+
* @module
|
|
11
|
+
*/
|
|
12
|
+
import type { TextScale } from "../viewState.ts";
|
|
13
|
+
/** The shell's texts, as Forgebook writes them; `configureStrings` replaces some before the shell draws. */
|
|
14
|
+
declare const shellStrings: {
|
|
15
|
+
searchPlaceholder: string;
|
|
16
|
+
searchLabel: string;
|
|
17
|
+
componentsNav: string;
|
|
18
|
+
sidebarWidth: string;
|
|
19
|
+
hideSidebar: string;
|
|
20
|
+
showSidebar: string;
|
|
21
|
+
storiesNav: string;
|
|
22
|
+
allStories: (count: number) => string;
|
|
23
|
+
noMatch: string;
|
|
24
|
+
aliasPlace: (family: string) => string;
|
|
25
|
+
aliasHint: (place: string) => string;
|
|
26
|
+
alsoIn: (places: string) => string;
|
|
27
|
+
related: string;
|
|
28
|
+
view: string;
|
|
29
|
+
viewChanged: string;
|
|
30
|
+
backdrop: string;
|
|
31
|
+
backdropPlain: string;
|
|
32
|
+
sheets: string;
|
|
33
|
+
sheetChoices: {
|
|
34
|
+
full: string;
|
|
35
|
+
structure: string;
|
|
36
|
+
restyled: string;
|
|
37
|
+
};
|
|
38
|
+
text: string;
|
|
39
|
+
textScale: (scale: TextScale) => string;
|
|
40
|
+
resetView: string;
|
|
41
|
+
viewInAddress: string;
|
|
42
|
+
compare: string;
|
|
43
|
+
compareOff: string;
|
|
44
|
+
compareText: string;
|
|
45
|
+
compareSheets: string;
|
|
46
|
+
compareOf: (labels: readonly string[]) => string;
|
|
47
|
+
compareCell: (labels: readonly string[]) => string;
|
|
48
|
+
width: string;
|
|
49
|
+
widthFill: string;
|
|
50
|
+
widthPx: (width: number) => string;
|
|
51
|
+
copyStoryId: string;
|
|
52
|
+
clearSearch: string;
|
|
53
|
+
fromTexts: string;
|
|
54
|
+
backToText: string;
|
|
55
|
+
widthTyped: string;
|
|
56
|
+
widthAuto: string;
|
|
57
|
+
zoom: string;
|
|
58
|
+
zoomIn: string;
|
|
59
|
+
zoomOut: string;
|
|
60
|
+
zoomReset: string;
|
|
61
|
+
stageTools: string;
|
|
62
|
+
tools: {
|
|
63
|
+
outline: string;
|
|
64
|
+
grid: string;
|
|
65
|
+
measure: string;
|
|
66
|
+
};
|
|
67
|
+
widthHandle: string;
|
|
68
|
+
widthHandleHint: string;
|
|
69
|
+
heightHandle: string;
|
|
70
|
+
heightHandleHint: string;
|
|
71
|
+
widthFillNote: string;
|
|
72
|
+
panel: string;
|
|
73
|
+
panelHeight: string;
|
|
74
|
+
closePanel: string;
|
|
75
|
+
tabs: {
|
|
76
|
+
props: string;
|
|
77
|
+
events: string;
|
|
78
|
+
play: string;
|
|
79
|
+
parts: string;
|
|
80
|
+
code: string;
|
|
81
|
+
a11y: string;
|
|
82
|
+
};
|
|
83
|
+
playTitle: string;
|
|
84
|
+
playStatus: {
|
|
85
|
+
running: string;
|
|
86
|
+
passed: string;
|
|
87
|
+
failed: string;
|
|
88
|
+
};
|
|
89
|
+
playTime: (ms: number) => string;
|
|
90
|
+
playAgain: string;
|
|
91
|
+
playNoSteps: string;
|
|
92
|
+
fixedExamples: string;
|
|
93
|
+
allProps: string;
|
|
94
|
+
openFrame: string;
|
|
95
|
+
code: string;
|
|
96
|
+
codeFromArgs: string;
|
|
97
|
+
codeRender: string;
|
|
98
|
+
codeError: string;
|
|
99
|
+
copy: string;
|
|
100
|
+
copied: string;
|
|
101
|
+
matrix: string;
|
|
102
|
+
matrixNone: string;
|
|
103
|
+
matrixColumns: string;
|
|
104
|
+
a11y: string;
|
|
105
|
+
a11yCheck: string;
|
|
106
|
+
a11yRunning: string;
|
|
107
|
+
a11yPasses: string;
|
|
108
|
+
a11yCount: (count: number) => string;
|
|
109
|
+
a11yNone: string;
|
|
110
|
+
a11yError: string;
|
|
111
|
+
a11yNotInCompare: string;
|
|
112
|
+
replay: string;
|
|
113
|
+
clockLabel: string;
|
|
114
|
+
clockPause: string;
|
|
115
|
+
clockResume: string;
|
|
116
|
+
clockRestart: string;
|
|
117
|
+
clockSpeed: string;
|
|
118
|
+
clockRate: (rate: number) => string;
|
|
119
|
+
loadingStory: string;
|
|
120
|
+
apiReference: string;
|
|
121
|
+
apiProp: string;
|
|
122
|
+
apiEvent: string;
|
|
123
|
+
apiType: string;
|
|
124
|
+
apiSignature: string;
|
|
125
|
+
apiDefault: string;
|
|
126
|
+
apiWhat: string;
|
|
127
|
+
showCode: string;
|
|
128
|
+
hideCode: string;
|
|
129
|
+
openStory: string;
|
|
130
|
+
examples: string;
|
|
131
|
+
pageError: string;
|
|
132
|
+
storyLabel: string;
|
|
133
|
+
frameTitle: (component: string, story: string) => string;
|
|
134
|
+
home: string;
|
|
135
|
+
homeEmpty: string;
|
|
136
|
+
homeSummary: (components: number, sources: number) => string;
|
|
137
|
+
homeIntroError: string;
|
|
138
|
+
recentlyOpened: string;
|
|
139
|
+
componentsCount: (count: number) => string;
|
|
140
|
+
showAll: (count: number) => string;
|
|
141
|
+
showFewer: string;
|
|
142
|
+
unknownStory: (id: string) => string;
|
|
143
|
+
unknownComponent: (id: string) => string;
|
|
144
|
+
props: string;
|
|
145
|
+
propGroups: {
|
|
146
|
+
choice: string;
|
|
147
|
+
text: string;
|
|
148
|
+
toggle: string;
|
|
149
|
+
};
|
|
150
|
+
otherProps: string;
|
|
151
|
+
unset: string;
|
|
152
|
+
unsetDefault: (value: string) => string;
|
|
153
|
+
defaultIs: string;
|
|
154
|
+
pickColor: (prop: string) => string;
|
|
155
|
+
rangeValue: (prop: string) => string;
|
|
156
|
+
setByStory: string;
|
|
157
|
+
required: string;
|
|
158
|
+
resetArgs: string;
|
|
159
|
+
events: string;
|
|
160
|
+
calls: string;
|
|
161
|
+
noCalls: string;
|
|
162
|
+
clearCalls: string;
|
|
163
|
+
parts: string;
|
|
164
|
+
partCount: (count: number) => string;
|
|
165
|
+
partsList: string;
|
|
166
|
+
styleHooks: string;
|
|
167
|
+
testIds: string;
|
|
168
|
+
noProps: string;
|
|
169
|
+
docsLoading: string;
|
|
170
|
+
docsError: string;
|
|
171
|
+
indexProblems: string;
|
|
172
|
+
};
|
|
173
|
+
/** The shell's texts. */
|
|
174
|
+
export type ShellStrings = typeof shellStrings;
|
|
175
|
+
/** The shell's texts, as shown. */
|
|
176
|
+
export declare const STRINGS: ShellStrings;
|
|
177
|
+
/**
|
|
178
|
+
* Applies a catalogue's replacements to the shell's texts, once, before the shell draws.
|
|
179
|
+
*
|
|
180
|
+
* @param replacements - the new texts, by their path (`tabs.props`).
|
|
181
|
+
*/
|
|
182
|
+
export declare const configureStrings: (replacements: Readonly<Record<string, string>>) => void;
|
|
183
|
+
export {};
|
|
184
|
+
//# sourceMappingURL=strings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../src/shell/strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE/D,4GAA4G;AAE5G,QAAA,MAAM,YAAY;;;;;;;;wBAQI,MAAM,KAAG,MAAM;;yBAEd,MAAM,KAAG,MAAM;uBACjB,MAAM,KAAG,MAAM;qBACjB,MAAM,KAAG,MAAM;;;;;;;;;;;;;uBAYb,SAAS,KAAG,MAAM;;;;;;;wBAOjB,SAAS,MAAM,EAAE,KAAG,MAAM;0BACxB,SAAS,MAAM,EAAE,KAAG,MAAM;;;qBAG/B,MAAM,KAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAmCjB,MAAM,KAAG,MAAM;;;;;;;;;;;;;;;;;;;uBAmBX,MAAM,KAAG,MAAM;;;;;;;;;;sBAUhB,MAAM,KAAG,MAAM;;;;;;;;;;;;;;;4BAeT,MAAM,SAAS,MAAM,KAAG,MAAM;;;8BAG5B,MAAM,WAAW,MAAM,KAAG,MAAM;;;6BAIjC,MAAM,KAAG,MAAM;qBACvB,MAAM,KAAG,MAAM;;uBAEb,MAAM,KAAG,MAAM;2BAEX,MAAM,KAAG,MAAM;;;;;;;;;0BAMhB,MAAM,KAAG,MAAM;;sBAEnB,MAAM,KAAG,MAAM;uBACd,MAAM,KAAG,MAAM;;;;;;;;;uBASf,MAAM,KAAG,MAAM;;;;;;;;CAQnC,CAAC;AAEF,yBAAyB;AACzB,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC;AAE/C,mCAAmC;AACnC,eAAO,MAAM,OAAO,EAAE,YAA2B,CAAC;AA6BlD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAAG,IAEjF,CAAC"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/** The shell's texts, as Forgebook writes them; `configureStrings` replaces some before the shell draws. */
|
|
2
|
+
// biome-ignore lint/nursery/useExplicitType: the texts' type is their own shape (`ShellStrings`); a written one would repeat every key
|
|
3
|
+
const shellStrings = {
|
|
4
|
+
searchPlaceholder: "Search",
|
|
5
|
+
searchLabel: "Search components and stories",
|
|
6
|
+
componentsNav: "Components",
|
|
7
|
+
sidebarWidth: "Sidebar width",
|
|
8
|
+
hideSidebar: "Hide the sidebar",
|
|
9
|
+
showSidebar: "Show the sidebar",
|
|
10
|
+
storiesNav: "Stories",
|
|
11
|
+
allStories: (count) => `All ${count} stories`,
|
|
12
|
+
noMatch: "No component matches",
|
|
13
|
+
aliasPlace: (family) => `in ${family}`,
|
|
14
|
+
aliasHint: (place) => `Lives in ${place}: listed here too`,
|
|
15
|
+
alsoIn: (places) => `also listed in ${places}`,
|
|
16
|
+
related: "Related",
|
|
17
|
+
view: "View",
|
|
18
|
+
viewChanged: "A view setting is changed",
|
|
19
|
+
backdrop: "Background",
|
|
20
|
+
backdropPlain: "Plain",
|
|
21
|
+
sheets: "Styles",
|
|
22
|
+
sheetChoices: { full: "Full", structure: "Structure only", restyled: "Restyled" },
|
|
23
|
+
text: "Text",
|
|
24
|
+
textScale: (scale) => `${scale}%`,
|
|
25
|
+
resetView: "Reset to defaults",
|
|
26
|
+
viewInAddress: "Saved in the address",
|
|
27
|
+
compare: "Compare",
|
|
28
|
+
compareOff: "Off",
|
|
29
|
+
compareText: "Text sizes",
|
|
30
|
+
compareSheets: "Styles",
|
|
31
|
+
compareOf: (labels) => labels.join(" × "),
|
|
32
|
+
compareCell: (labels) => labels.join(" · "),
|
|
33
|
+
width: "Width",
|
|
34
|
+
widthFill: "Fill",
|
|
35
|
+
widthPx: (width) => `${width}`,
|
|
36
|
+
copyStoryId: "Copy the story's id",
|
|
37
|
+
clearSearch: "Clear the search",
|
|
38
|
+
fromTexts: "From the story's texts:",
|
|
39
|
+
backToText: "Back to the text",
|
|
40
|
+
widthTyped: "Width in px",
|
|
41
|
+
widthAuto: "auto",
|
|
42
|
+
zoom: "Zoom",
|
|
43
|
+
zoomIn: "Zoom in",
|
|
44
|
+
zoomOut: "Zoom out",
|
|
45
|
+
zoomReset: "Back to 100%",
|
|
46
|
+
stageTools: "Zoom and measuring tools",
|
|
47
|
+
tools: {
|
|
48
|
+
outline: "Outline every element",
|
|
49
|
+
grid: "8 px grid",
|
|
50
|
+
measure: "Measure the element under the pointer"
|
|
51
|
+
},
|
|
52
|
+
widthHandle: "Story width",
|
|
53
|
+
widthHandleHint: "Drag to resize the story; double-click for the whole stage",
|
|
54
|
+
heightHandle: "Story height",
|
|
55
|
+
heightHandleHint: "Drag to change the story's height; double-click for its own",
|
|
56
|
+
widthFillNote: "Fill: the story takes the whole stage",
|
|
57
|
+
panel: "Panel",
|
|
58
|
+
panelHeight: "Panel height",
|
|
59
|
+
closePanel: "Close the panel",
|
|
60
|
+
tabs: {
|
|
61
|
+
props: "Props",
|
|
62
|
+
events: "Events",
|
|
63
|
+
play: "Interactions",
|
|
64
|
+
parts: "Parts and styling",
|
|
65
|
+
code: "Code",
|
|
66
|
+
a11y: "Accessibility"
|
|
67
|
+
},
|
|
68
|
+
playTitle: "Play function",
|
|
69
|
+
playStatus: { running: "running", passed: "passed", failed: "failed" },
|
|
70
|
+
playTime: (ms) => `${ms} ms`,
|
|
71
|
+
playAgain: "Run again",
|
|
72
|
+
playNoSteps: "The play names no steps: wrap its parts in step(label, run) to see them here.",
|
|
73
|
+
fixedExamples: "This story draws fixed examples: its props are not set from here. Every prop, for reading:",
|
|
74
|
+
allProps: "Props",
|
|
75
|
+
openFrame: "Open in a new tab",
|
|
76
|
+
code: "Code",
|
|
77
|
+
codeFromArgs: "from the args",
|
|
78
|
+
codeRender: "the story's render",
|
|
79
|
+
codeError: "The story's code could not be read",
|
|
80
|
+
copy: "Copy",
|
|
81
|
+
copied: "Copied",
|
|
82
|
+
matrix: "Matrix",
|
|
83
|
+
matrixNone: "—",
|
|
84
|
+
matrixColumns: "Matrix columns",
|
|
85
|
+
a11y: "Accessibility",
|
|
86
|
+
a11yCheck: "Check the story",
|
|
87
|
+
a11yRunning: "Checking…",
|
|
88
|
+
a11yPasses: "passes",
|
|
89
|
+
a11yCount: (count) => `${count} ${count === 1 ? "problem" : "problems"}`,
|
|
90
|
+
a11yNone: "No WCAG 2.2 A or AA rule is broken in the story as it is now.",
|
|
91
|
+
a11yError: "The check could not run",
|
|
92
|
+
a11yNotInCompare: "One story at a time: leave Compare to check it",
|
|
93
|
+
replay: "Replay",
|
|
94
|
+
clockLabel: "Story clock",
|
|
95
|
+
clockPause: "Pause the clock",
|
|
96
|
+
clockResume: "Resume the clock",
|
|
97
|
+
clockRestart: "Restart",
|
|
98
|
+
clockSpeed: "Clock speed",
|
|
99
|
+
clockRate: (rate) => `×${rate}`,
|
|
100
|
+
loadingStory: "Loading the story…",
|
|
101
|
+
apiReference: "API reference",
|
|
102
|
+
apiProp: "Prop",
|
|
103
|
+
apiEvent: "Event",
|
|
104
|
+
apiType: "Type",
|
|
105
|
+
apiSignature: "Signature",
|
|
106
|
+
apiDefault: "Default",
|
|
107
|
+
apiWhat: "What it does",
|
|
108
|
+
showCode: "Show code",
|
|
109
|
+
hideCode: "Hide code",
|
|
110
|
+
openStory: "Open the story",
|
|
111
|
+
examples: "Examples",
|
|
112
|
+
pageError: "The component's page could not be read",
|
|
113
|
+
storyLabel: "Story",
|
|
114
|
+
frameTitle: (component, story) => `${component}: ${story}`,
|
|
115
|
+
home: "Home",
|
|
116
|
+
homeEmpty: "No stories yet: a source with story files shows its families here.",
|
|
117
|
+
homeSummary: (components, sources) => `${components} ${components === 1 ? "component" : "components"} in ${sources} ${sources === 1 ? "library" : "libraries"}.`,
|
|
118
|
+
homeIntroError: "The library's introduction could not be read",
|
|
119
|
+
recentlyOpened: "Recently opened",
|
|
120
|
+
componentsCount: (count) => `${count} ${count === 1 ? "component" : "components"}`,
|
|
121
|
+
showAll: (count) => `Show all ${count}`,
|
|
122
|
+
showFewer: "Show fewer",
|
|
123
|
+
unknownStory: (id) => `No story "${id}": it may have been renamed. Pick one in the sidebar.`,
|
|
124
|
+
unknownComponent: (id) => `No component "${id}": it may have been renamed. Pick one in the sidebar.`,
|
|
125
|
+
props: "Props",
|
|
126
|
+
propGroups: { choice: "Choices", text: "Text and numbers", toggle: "Toggles" },
|
|
127
|
+
otherProps: "Other props",
|
|
128
|
+
unset: "—",
|
|
129
|
+
unsetDefault: (value) => `— (${value})`,
|
|
130
|
+
defaultIs: "Default:",
|
|
131
|
+
pickColor: (prop) => `${prop}: pick a colour`,
|
|
132
|
+
rangeValue: (prop) => `${prop}: value`,
|
|
133
|
+
setByStory: "Set by the story",
|
|
134
|
+
required: "Required",
|
|
135
|
+
resetArgs: "Reset",
|
|
136
|
+
events: "Events",
|
|
137
|
+
calls: "Calls",
|
|
138
|
+
noCalls: "No call yet",
|
|
139
|
+
clearCalls: "Clear",
|
|
140
|
+
parts: "Parts and styling",
|
|
141
|
+
partCount: (count) => `${count} ${count === 1 ? "part" : "parts"}`,
|
|
142
|
+
partsList: "Parts",
|
|
143
|
+
styleHooks: "Styling attributes",
|
|
144
|
+
testIds: "Test ids",
|
|
145
|
+
noProps: "This page has no props",
|
|
146
|
+
docsLoading: "Reading the component…",
|
|
147
|
+
docsError: "The component could not be read",
|
|
148
|
+
indexProblems: "Some story files could not be placed"
|
|
149
|
+
};
|
|
150
|
+
/** The shell's texts, as shown. */
|
|
151
|
+
export const STRINGS = shellStrings;
|
|
152
|
+
/**
|
|
153
|
+
* Whether a value is a group of texts (`tabs`), whose members a path can name.
|
|
154
|
+
*
|
|
155
|
+
* @param value - a value among the texts.
|
|
156
|
+
*/
|
|
157
|
+
const isTextGroup = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
158
|
+
/**
|
|
159
|
+
* Replaces one text, by its path among the shell's texts (`props`, `tabs.props`): only a plain text, never a text
|
|
160
|
+
* that takes values, and nothing for a path that names none.
|
|
161
|
+
*
|
|
162
|
+
* @param texts - the texts, or a group of them.
|
|
163
|
+
* @param path - the text's name, then its name within each group.
|
|
164
|
+
* @param text - the new text.
|
|
165
|
+
*/
|
|
166
|
+
const replaceText = (texts, path, text) => {
|
|
167
|
+
const [name, ...rest] = path;
|
|
168
|
+
if (name === undefined)
|
|
169
|
+
return;
|
|
170
|
+
const current = texts[name];
|
|
171
|
+
if (rest.length === 0) {
|
|
172
|
+
if (typeof current === "string")
|
|
173
|
+
texts[name] = text;
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (isTextGroup(current))
|
|
177
|
+
replaceText(current, rest, text);
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Applies a catalogue's replacements to the shell's texts, once, before the shell draws.
|
|
181
|
+
*
|
|
182
|
+
* @param replacements - the new texts, by their path (`tabs.props`).
|
|
183
|
+
*/
|
|
184
|
+
export const configureStrings = (replacements) => {
|
|
185
|
+
for (const [path, text] of Object.entries(replacements))
|
|
186
|
+
replaceText(STRINGS, path.split("."), text);
|
|
187
|
+
};
|
|
188
|
+
//# sourceMappingURL=strings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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YAA8C,EAAQ,EAAE;IACvF,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC;QAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;AACvG,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A view's switches as the toolbar reads and sets them: a switch's value in a view, and a view with one switch set.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type { ViewSwitch } from "../switches.ts";
|
|
7
|
+
import type { ViewState } from "../viewState.ts";
|
|
8
|
+
/**
|
|
9
|
+
* A view with one switch set.
|
|
10
|
+
*
|
|
11
|
+
* @param view - the view.
|
|
12
|
+
* @param each - the switch.
|
|
13
|
+
* @param value - its new value.
|
|
14
|
+
*/
|
|
15
|
+
export declare const withSwitch: (view: ViewState, each: ViewSwitch, value: string) => ViewState;
|
|
16
|
+
/**
|
|
17
|
+
* A switch's value in a view.
|
|
18
|
+
*
|
|
19
|
+
* @param view - the view.
|
|
20
|
+
* @param each - the switch.
|
|
21
|
+
*/
|
|
22
|
+
export declare const switchValueIn: (view: ViewState, each: ViewSwitch) => string;
|
|
23
|
+
//# sourceMappingURL=switchView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switchView.d.ts","sourceRoot":"","sources":["../../../src/shell/switchView.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,MAAM,SAAS,EAAE,MAAM,UAAU,EAAE,OAAO,MAAM,KAAG,SAG5E,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,SAAS,EAAE,MAAM,UAAU,KAAG,MAC1B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A view with one switch set.
|
|
3
|
+
*
|
|
4
|
+
* @param view - the view.
|
|
5
|
+
* @param each - the switch.
|
|
6
|
+
* @param value - its new value.
|
|
7
|
+
*/
|
|
8
|
+
export const withSwitch = (view, each, value) => ({
|
|
9
|
+
...view,
|
|
10
|
+
switches: { ...view.switches, [each.id]: value }
|
|
11
|
+
});
|
|
12
|
+
/**
|
|
13
|
+
* A switch's value in a view.
|
|
14
|
+
*
|
|
15
|
+
* @param view - the view.
|
|
16
|
+
* @param each - the switch.
|
|
17
|
+
*/
|
|
18
|
+
export const switchValueIn = (view, each) => view.switches[each.id] ?? each.default;
|
|
19
|
+
//# sourceMappingURL=switchView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switchView.js","sourceRoot":"","sources":["../../../src/shell/switchView.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAe,EAAE,IAAgB,EAAE,KAAa,EAAa,EAAE,CAAC,CAAC;IAC1F,GAAG,IAAI;IACP,QAAQ,EAAE,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE;CACjD,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAe,EAAE,IAAgB,EAAU,EAAE,CACzE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sidebar's search: every word of the query must appear in a component's name, its title (family and group), its
|
|
3
|
+
* meta's search words or one of its stories' names and descriptions, in any order, so "button danger" or "inputs date"
|
|
4
|
+
* find what they mean, and "hstack" finds the row another library calls so.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Case and accents are ignored. A component whose own name, title and search words hold every word is found whole; otherwise only
|
|
8
|
+
* the stories that hold the words the component lacks are kept. An alias entry is found by its name, the place
|
|
9
|
+
* it is listed in and the place it lives in, whole or not at all: its stories are picked on its page. Pure.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
13
|
+
import type { TreeComponent, TreeFamily } from "../storyTree.ts";
|
|
14
|
+
/**
|
|
15
|
+
* The words of a query, folded; none for an empty query.
|
|
16
|
+
*
|
|
17
|
+
* @param query - what the user typed.
|
|
18
|
+
*/
|
|
19
|
+
export declare const searchWords: (query: string) => readonly string[];
|
|
20
|
+
/**
|
|
21
|
+
* A component as the search finds it: whole when its name, title and search words hold every word, else only the stories that hold
|
|
22
|
+
* the rest; `undefined` when nothing matches.
|
|
23
|
+
*
|
|
24
|
+
* @param component - the component.
|
|
25
|
+
* @param words - the query's words (`searchWords`).
|
|
26
|
+
*/
|
|
27
|
+
export declare const foundComponent: (component: TreeComponent, words: readonly string[]) => TreeComponent | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* A family with only what the search finds: `undefined` when it finds nothing, the family as it is for no words.
|
|
30
|
+
*
|
|
31
|
+
* @param family - the family.
|
|
32
|
+
* @param words - the query's words (`searchWords`).
|
|
33
|
+
*/
|
|
34
|
+
export declare const foundFamily: (family: TreeFamily, words: readonly string[]) => TreeFamily | undefined;
|
|
35
|
+
//# sourceMappingURL=treeSearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeSearch.d.ts","sourceRoot":"","sources":["../../../src/shell/treeSearch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAa,aAAa,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAC;AAalG;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,SAAS,MAAM,EAGzB,CAAC;AASnC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACzB,WAAW,aAAa,EACxB,OAAO,SAAS,MAAM,EAAE,KACvB,aAAa,GAAG,SAQlB,CAAC;AAcF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,UAAU,EAAE,OAAO,SAAS,MAAM,EAAE,KAAG,UAAU,GAAG,SAavF,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A text as the search compares it: lower case, without accents.
|
|
3
|
+
*
|
|
4
|
+
* @param text - any text.
|
|
5
|
+
*/
|
|
6
|
+
const folded = (text) => text
|
|
7
|
+
.normalize("NFD")
|
|
8
|
+
.replace(/\p{Diacritic}/gu, "")
|
|
9
|
+
.toLowerCase();
|
|
10
|
+
/**
|
|
11
|
+
* The words of a query, folded; none for an empty query.
|
|
12
|
+
*
|
|
13
|
+
* @param query - what the user typed.
|
|
14
|
+
*/
|
|
15
|
+
export const searchWords = (query) => folded(query)
|
|
16
|
+
.split(/\s+/)
|
|
17
|
+
.filter((word) => word !== "");
|
|
18
|
+
/** Whether every word appears in the text. */
|
|
19
|
+
const holdsEvery = (text, words) => words.every((word) => text.includes(word));
|
|
20
|
+
/** The text a story is found by. */
|
|
21
|
+
const storyText = (story) => folded(`${story.name} ${story.description ?? ""}`);
|
|
22
|
+
/**
|
|
23
|
+
* A component as the search finds it: whole when its name, title and search words hold every word, else only the stories that hold
|
|
24
|
+
* the rest; `undefined` when nothing matches.
|
|
25
|
+
*
|
|
26
|
+
* @param component - the component.
|
|
27
|
+
* @param words - the query's words (`searchWords`).
|
|
28
|
+
*/
|
|
29
|
+
export const foundComponent = (component, words) => {
|
|
30
|
+
const own = folded(`${component.name} ${component.title.replaceAll("/", " ")} ${component.keywords.join(" ")}`);
|
|
31
|
+
if (holdsEvery(own, words))
|
|
32
|
+
return component;
|
|
33
|
+
const rest = words.filter((word) => !own.includes(word));
|
|
34
|
+
const stories = component.stories.filter((story) => holdsEvery(storyText(story), rest));
|
|
35
|
+
return stories.length === 0 ? undefined : { ...component, stories };
|
|
36
|
+
};
|
|
37
|
+
/** Whether an alias entry holds every word in its name, the place it is listed in or the place it lives in. */
|
|
38
|
+
const isAliasFound = (alias, family, group, words) => holdsEvery(folded(`${alias.name} ${family.name} ${group.name ?? ""} ${alias.title.replaceAll("/", " ")}`), words);
|
|
39
|
+
/**
|
|
40
|
+
* A family with only what the search finds: `undefined` when it finds nothing, the family as it is for no words.
|
|
41
|
+
*
|
|
42
|
+
* @param family - the family.
|
|
43
|
+
* @param words - the query's words (`searchWords`).
|
|
44
|
+
*/
|
|
45
|
+
export const foundFamily = (family, words) => {
|
|
46
|
+
if (words.length === 0)
|
|
47
|
+
return family;
|
|
48
|
+
const groups = family.groups
|
|
49
|
+
.map((group) => ({
|
|
50
|
+
...group,
|
|
51
|
+
components: group.components.flatMap((component) => {
|
|
52
|
+
const found = foundComponent(component, words);
|
|
53
|
+
return found === undefined ? [] : [found];
|
|
54
|
+
}),
|
|
55
|
+
aliases: group.aliases.filter((alias) => isAliasFound(alias, family, group, words))
|
|
56
|
+
}))
|
|
57
|
+
.filter((group) => group.components.length > 0 || group.aliases.length > 0);
|
|
58
|
+
return groups.length === 0 ? undefined : { ...family, groups };
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=treeSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeSearch.js","sourceRoot":"","sources":["../../../src/shell/treeSearch.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,MAAM,MAAM,GAAG,CAAC,IAAY,EAAU,EAAE,CACtC,IAAI;KACD,SAAS,CAAC,KAAK,CAAC;KAChB,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC;KAC9B,WAAW,EAAE,CAAC;AAEnB;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAqB,EAAE,CAC9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AAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC;AACjE,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The props panel's data for a story file: loaded from the source's `docs` when the component changes.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { type ComponentDocs } from "../componentDocs.ts";
|
|
7
|
+
import { type Loaded } from "./useLoaded.ts";
|
|
8
|
+
/** The panel's data: loading, a component, no component (a page), or why it failed. */
|
|
9
|
+
export type DocsState = Loaded<ComponentDocs>;
|
|
10
|
+
/**
|
|
11
|
+
* The docs of a story file's component.
|
|
12
|
+
*
|
|
13
|
+
* @param load - the source's loader for the file; `undefined` when it has none.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useComponentDocs: (load: (() => Promise<unknown>) | undefined) => DocsState;
|
|
16
|
+
//# sourceMappingURL=useComponentDocs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useComponentDocs.d.ts","sourceRoot":"","sources":["../../../src/shell/useComponentDocs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,KAAK,MAAM,EAAa,MAAM,gBAAgB,CAAC;AAExD,uFAAuF;AACvF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAa9C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,CAAC,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,KAAG,SAClD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The props panel's data for a story file: loaded from the source's `docs` when the component changes.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { isComponentDocs } from "../componentDocs.js";
|
|
7
|
+
import { useLoaded } from "./useLoaded.js";
|
|
8
|
+
/** What the plugin answered, as a state. */
|
|
9
|
+
const docsState = (value) => {
|
|
10
|
+
if (isComponentDocs(value))
|
|
11
|
+
return { status: "ready", value };
|
|
12
|
+
if (typeof value === "object" && value !== null && "error" in value && typeof value.error === "string") {
|
|
13
|
+
return { status: "error", message: value.error };
|
|
14
|
+
}
|
|
15
|
+
if (typeof value === "object" && value !== null && "name" in value && value.name === null)
|
|
16
|
+
return { status: "none" };
|
|
17
|
+
return { status: "error", message: "The component's docs have an unexpected shape" };
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The docs of a story file's component.
|
|
21
|
+
*
|
|
22
|
+
* @param load - the source's loader for the file; `undefined` when it has none.
|
|
23
|
+
*/
|
|
24
|
+
export const useComponentDocs = (load) => useLoaded(load, docsState);
|
|
25
|
+
//# sourceMappingURL=useComponentDocs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useComponentDocs.js","sourceRoot":"","sources":["../../../src/shell/useComponentDocs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAsB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAe,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKxD,4CAA4C;AAC5C,MAAM,SAAS,GAAG,CAAC,KAAc,EAAa,EAAE;IAC9C,IAAI,eAAe,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC9D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvG,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACnD,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI;QACvF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,+CAA+C,EAAE,CAAC;AACvF,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAA0C,EAAa,EAAE,CACxF,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** What the hook gives a button. */
|
|
2
|
+
export type Copy = {
|
|
3
|
+
/** Whether the text was copied a moment ago. */
|
|
4
|
+
readonly isCopied: boolean;
|
|
5
|
+
/** Copies a text to the clipboard. */
|
|
6
|
+
readonly copy: (text: string) => void;
|
|
7
|
+
};
|
|
8
|
+
/** Copies texts, remembering the last copy for a moment. */
|
|
9
|
+
export declare const useCopy: () => Copy;
|
|
10
|
+
//# sourceMappingURL=useCopy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopy.d.ts","sourceRoot":"","sources":["../../../src/shell/useCopy.ts"],"names":[],"mappings":"AAUA,oCAAoC;AACpC,MAAM,MAAM,IAAI,GAAG;IACjB,gDAAgD;IAChD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,sCAAsC;IACtC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,OAAO,QAAO,IAY1B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A button that copies a text: whether it just did, so the button can say "Copied" for a moment.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
7
|
+
/** How long "Copied" shows on the button, in ms. */
|
|
8
|
+
const COPIED_FOR = 1500;
|
|
9
|
+
/** Copies texts, remembering the last copy for a moment. */
|
|
10
|
+
export const useCopy = () => {
|
|
11
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
12
|
+
const timer = useRef(undefined);
|
|
13
|
+
useEffect(() => () => window.clearTimeout(timer.current), []);
|
|
14
|
+
const copy = useCallback((text) => {
|
|
15
|
+
void navigator.clipboard.writeText(text).then(() => {
|
|
16
|
+
setIsCopied(true);
|
|
17
|
+
window.clearTimeout(timer.current);
|
|
18
|
+
timer.current = window.setTimeout(() => setIsCopied(false), COPIED_FOR);
|
|
19
|
+
});
|
|
20
|
+
}, []);
|
|
21
|
+
return { isCopied, copy };
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=useCopy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopy.js","sourceRoot":"","sources":["../../../src/shell/useCopy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjE,oDAAoD;AACpD,MAAM,UAAU,GAAG,IAAI,CAAC;AAUxB,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,GAAS,EAAE;IAChC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,KAAK,GAAG,MAAM,CAAqB,SAAS,CAAC,CAAC;IACpD,SAAS,CAAC,GAAG,EAAE,CAAC,GAAS,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IACpE,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,IAAY,EAAQ,EAAE;QAC9C,KAAK,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACjD,WAAW,CAAC,IAAI,CAAC,CAAC;YAClB,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC5B,CAAC,CAAC"}
|