@misoto22/folio 0.0.0 → 0.17.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/AGENTS.md +88 -0
- package/CLAUDE.md +1 -0
- package/LICENSE +21 -0
- package/README.md +208 -2
- package/bin/folio-design.mjs +277 -0
- package/bin/migrate-legacy.mjs +81 -0
- package/dist/agent/Accordion.md +65 -0
- package/dist/agent/Actions.md +49 -0
- package/dist/agent/Alert.md +65 -0
- package/dist/agent/AppShell.md +69 -0
- package/dist/agent/ArchitectureFigure.md +72 -0
- package/dist/agent/AreaChart.md +94 -0
- package/dist/agent/Article.md +65 -0
- package/dist/agent/AspectRatio.md +58 -0
- package/dist/agent/Avatar.md +53 -0
- package/dist/agent/Badge.md +62 -0
- package/dist/agent/BarChart.md +93 -0
- package/dist/agent/BarList.md +67 -0
- package/dist/agent/BigNumber.md +70 -0
- package/dist/agent/BoxPlot.md +82 -0
- package/dist/agent/Breadcrumb.md +55 -0
- package/dist/agent/BulletChart.md +71 -0
- package/dist/agent/Button.md +81 -0
- package/dist/agent/Calendar.md +77 -0
- package/dist/agent/CalendarHeatmap.md +75 -0
- package/dist/agent/Card.md +72 -0
- package/dist/agent/Checkbox.md +57 -0
- package/dist/agent/Code.md +51 -0
- package/dist/agent/CodeBlock.md +77 -0
- package/dist/agent/Collapsible.md +68 -0
- package/dist/agent/Collection.md +169 -0
- package/dist/agent/ColorPicker.md +76 -0
- package/dist/agent/Combobox.md +77 -0
- package/dist/agent/Command.md +122 -0
- package/dist/agent/ComposedChart.md +82 -0
- package/dist/agent/Contact.md +90 -0
- package/dist/agent/Content.md +70 -0
- package/dist/agent/ContextMenu.md +93 -0
- package/dist/agent/Conversation.md +247 -0
- package/dist/agent/DataflowFigure.md +49 -0
- package/dist/agent/DatePicker.md +104 -0
- package/dist/agent/DescriptionList.md +69 -0
- package/dist/agent/Diagram.md +71 -0
- package/dist/agent/DiagramCanvas.md +71 -0
- package/dist/agent/DiagramExportMenu.md +65 -0
- package/dist/agent/DiagramInspector.md +73 -0
- package/dist/agent/DiagramLegend.md +56 -0
- package/dist/agent/DiagramMinimap.md +69 -0
- package/dist/agent/DiagramToolbar.md +70 -0
- package/dist/agent/Dialog.md +76 -0
- package/dist/agent/DropdownMenu.md +110 -0
- package/dist/agent/EmptyState.md +63 -0
- package/dist/agent/ErrorState.md +67 -0
- package/dist/agent/Evidence.md +165 -0
- package/dist/agent/Facet.md +107 -0
- package/dist/agent/Field.md +79 -0
- package/dist/agent/FigureBand.md +49 -0
- package/dist/agent/FloatingIconButton.md +61 -0
- package/dist/agent/FunnelChart.md +75 -0
- package/dist/agent/Heading.md +65 -0
- package/dist/agent/Heatmap.md +78 -0
- package/dist/agent/Histogram.md +88 -0
- package/dist/agent/Input.md +52 -0
- package/dist/agent/Kbd.md +48 -0
- package/dist/agent/LifecycleFigure.md +50 -0
- package/dist/agent/LineChart.md +85 -0
- package/dist/agent/LinkArrow.md +49 -0
- package/dist/agent/Markdown.md +69 -0
- package/dist/agent/Media.md +261 -0
- package/dist/agent/Metric.md +70 -0
- package/dist/agent/Metrics.md +114 -0
- package/dist/agent/Music.md +86 -0
- package/dist/agent/NativeSelect.md +62 -0
- package/dist/agent/NavItem.md +56 -0
- package/dist/agent/NumberField.md +73 -0
- package/dist/agent/PageHeader.md +69 -0
- package/dist/agent/Pagination.md +70 -0
- package/dist/agent/PieChart.md +80 -0
- package/dist/agent/Popover.md +80 -0
- package/dist/agent/Portfolio.md +93 -0
- package/dist/agent/PortfolioIndex.md +34 -0
- package/dist/agent/Progress.md +58 -0
- package/dist/agent/RadarChart.md +79 -0
- package/dist/agent/RadialChart.md +81 -0
- package/dist/agent/RadioGroup.md +66 -0
- package/dist/agent/Reading.md +233 -0
- package/dist/agent/Recovery.md +72 -0
- package/dist/agent/SankeyChart.md +85 -0
- package/dist/agent/ScatterChart.md +80 -0
- package/dist/agent/ScrollArea.md +62 -0
- package/dist/agent/SearchPalette.md +51 -0
- package/dist/agent/SearchableMenu.md +69 -0
- package/dist/agent/Select.md +102 -0
- package/dist/agent/Separator.md +60 -0
- package/dist/agent/SequenceFigure.md +51 -0
- package/dist/agent/Sheet.md +82 -0
- package/dist/agent/Sidebar.md +194 -0
- package/dist/agent/SiteNavigation.md +62 -0
- package/dist/agent/SiteShell.md +67 -0
- package/dist/agent/Skeleton.md +96 -0
- package/dist/agent/Slider.md +67 -0
- package/dist/agent/Sparkline.md +68 -0
- package/dist/agent/Spinner.md +62 -0
- package/dist/agent/StatusDot.md +56 -0
- package/dist/agent/StatusPill.md +55 -0
- package/dist/agent/Steps.md +68 -0
- package/dist/agent/Switch.md +50 -0
- package/dist/agent/Table.md +111 -0
- package/dist/agent/Tabs.md +71 -0
- package/dist/agent/Tag.md +67 -0
- package/dist/agent/Text.md +66 -0
- package/dist/agent/Textarea.md +46 -0
- package/dist/agent/Timeline.md +114 -0
- package/dist/agent/Timestamp.md +65 -0
- package/dist/agent/Toast.md +51 -0
- package/dist/agent/ToggleGroup.md +67 -0
- package/dist/agent/Toolbar.md +72 -0
- package/dist/agent/Tooltip.md +74 -0
- package/dist/agent/TreemapChart.md +76 -0
- package/dist/agent/WaterfallChart.md +86 -0
- package/dist/agent/Workbench.md +142 -0
- package/dist/agent/WorkflowFigure.md +51 -0
- package/dist/agent/catalog.json +8055 -0
- package/dist/agent/index.md +185 -0
- package/dist/article.css +407 -0
- package/dist/charts/AreaChart/AreaChart.d.ts +198 -0
- package/dist/charts/AreaChart/AreaChart.js +479 -0
- package/dist/charts/AreaChart/AreaChart.js.map +1 -0
- package/dist/charts/BarChart/BarChart.d.ts +190 -0
- package/dist/charts/BarChart/BarChart.js +599 -0
- package/dist/charts/BarChart/BarChart.js.map +1 -0
- package/dist/charts/BarList/BarList.d.ts +65 -0
- package/dist/charts/BarList/BarList.js +79 -0
- package/dist/charts/BarList/BarList.js.map +1 -0
- package/dist/charts/BigNumber/BigNumber.d.ts +72 -0
- package/dist/charts/BigNumber/BigNumber.js +51 -0
- package/dist/charts/BigNumber/BigNumber.js.map +1 -0
- package/dist/charts/BoxPlot/BoxPlot.d.ts +177 -0
- package/dist/charts/BoxPlot/BoxPlot.js +497 -0
- package/dist/charts/BoxPlot/BoxPlot.js.map +1 -0
- package/dist/charts/BulletChart/BulletChart.d.ts +100 -0
- package/dist/charts/BulletChart/BulletChart.js +197 -0
- package/dist/charts/BulletChart/BulletChart.js.map +1 -0
- package/dist/charts/CalendarHeatmap/CalendarHeatmap.d.ts +106 -0
- package/dist/charts/CalendarHeatmap/CalendarHeatmap.js +103 -0
- package/dist/charts/CalendarHeatmap/CalendarHeatmap.js.map +1 -0
- package/dist/charts/ComposedChart/ComposedChart.d.ts +178 -0
- package/dist/charts/ComposedChart/ComposedChart.js +667 -0
- package/dist/charts/ComposedChart/ComposedChart.js.map +1 -0
- package/dist/charts/Facet/Facet.d.ts +240 -0
- package/dist/charts/Facet/Facet.js +133 -0
- package/dist/charts/Facet/Facet.js.map +1 -0
- package/dist/charts/Facet/panels.d.ts +187 -0
- package/dist/charts/Facet/panels.js +203 -0
- package/dist/charts/Facet/panels.js.map +1 -0
- package/dist/charts/FunnelChart/FunnelChart.d.ts +106 -0
- package/dist/charts/FunnelChart/FunnelChart.js +137 -0
- package/dist/charts/FunnelChart/FunnelChart.js.map +1 -0
- package/dist/charts/Heatmap/Heatmap.d.ts +101 -0
- package/dist/charts/Heatmap/Heatmap.js +125 -0
- package/dist/charts/Heatmap/Heatmap.js.map +1 -0
- package/dist/charts/Histogram/Histogram.d.ts +188 -0
- package/dist/charts/Histogram/Histogram.js +382 -0
- package/dist/charts/Histogram/Histogram.js.map +1 -0
- package/dist/charts/LineChart/LineChart.d.ts +174 -0
- package/dist/charts/LineChart/LineChart.js +485 -0
- package/dist/charts/LineChart/LineChart.js.map +1 -0
- package/dist/charts/PieChart/PieChart.d.ts +140 -0
- package/dist/charts/PieChart/PieChart.js +317 -0
- package/dist/charts/PieChart/PieChart.js.map +1 -0
- package/dist/charts/RadarChart/RadarChart.d.ts +135 -0
- package/dist/charts/RadarChart/RadarChart.js +303 -0
- package/dist/charts/RadarChart/RadarChart.js.map +1 -0
- package/dist/charts/RadialChart/RadialChart.d.ts +142 -0
- package/dist/charts/RadialChart/RadialChart.js +279 -0
- package/dist/charts/RadialChart/RadialChart.js.map +1 -0
- package/dist/charts/SankeyChart/SankeyChart.d.ts +149 -0
- package/dist/charts/SankeyChart/SankeyChart.js +509 -0
- package/dist/charts/SankeyChart/SankeyChart.js.map +1 -0
- package/dist/charts/ScatterChart/ScatterChart.d.ts +149 -0
- package/dist/charts/ScatterChart/ScatterChart.js +275 -0
- package/dist/charts/ScatterChart/ScatterChart.js.map +1 -0
- package/dist/charts/Sparkline/Sparkline.d.ts +53 -0
- package/dist/charts/Sparkline/Sparkline.js +95 -0
- package/dist/charts/Sparkline/Sparkline.js.map +1 -0
- package/dist/charts/TreemapChart/TreemapChart.d.ts +98 -0
- package/dist/charts/TreemapChart/TreemapChart.js +127 -0
- package/dist/charts/TreemapChart/TreemapChart.js.map +1 -0
- package/dist/charts/WaterfallChart/WaterfallChart.d.ts +164 -0
- package/dist/charts/WaterfallChart/WaterfallChart.js +321 -0
- package/dist/charts/WaterfallChart/WaterfallChart.js.map +1 -0
- package/dist/charts/index.d.ts +43 -0
- package/dist/charts/index.js +130 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/charts/lib/annotations.d.ts +103 -0
- package/dist/charts/lib/annotations.js +99 -0
- package/dist/charts/lib/annotations.js.map +1 -0
- package/dist/charts/lib/axis.d.ts +18 -0
- package/dist/charts/lib/axis.js +21 -0
- package/dist/charts/lib/axis.js.map +1 -0
- package/dist/charts/lib/background.d.ts +33 -0
- package/dist/charts/lib/background.js +173 -0
- package/dist/charts/lib/background.js.map +1 -0
- package/dist/charts/lib/brush.d.ts +94 -0
- package/dist/charts/lib/brush.js +535 -0
- package/dist/charts/lib/brush.js.map +1 -0
- package/dist/charts/lib/chart.d.ts +94 -0
- package/dist/charts/lib/chart.js +149 -0
- package/dist/charts/lib/chart.js.map +1 -0
- package/dist/charts/lib/dot.d.ts +29 -0
- package/dist/charts/lib/dot.js +78 -0
- package/dist/charts/lib/dot.js.map +1 -0
- package/dist/charts/lib/empty.d.ts +31 -0
- package/dist/charts/lib/empty.js +24 -0
- package/dist/charts/lib/empty.js.map +1 -0
- package/dist/charts/lib/export.d.ts +94 -0
- package/dist/charts/lib/export.js +62 -0
- package/dist/charts/lib/export.js.map +1 -0
- package/dist/charts/lib/figure.d.ts +81 -0
- package/dist/charts/lib/figure.js +62 -0
- package/dist/charts/lib/figure.js.map +1 -0
- package/dist/charts/lib/format.d.ts +46 -0
- package/dist/charts/lib/format.js +56 -0
- package/dist/charts/lib/format.js.map +1 -0
- package/dist/charts/lib/legend.d.ts +45 -0
- package/dist/charts/lib/legend.js +117 -0
- package/dist/charts/lib/legend.js.map +1 -0
- package/dist/charts/lib/loading.d.ts +48 -0
- package/dist/charts/lib/loading.js +105 -0
- package/dist/charts/lib/loading.js.map +1 -0
- package/dist/charts/lib/paint.d.ts +154 -0
- package/dist/charts/lib/paint.js +551 -0
- package/dist/charts/lib/paint.js.map +1 -0
- package/dist/charts/lib/scale.d.ts +23 -0
- package/dist/charts/lib/scale.js +13 -0
- package/dist/charts/lib/scale.js.map +1 -0
- package/dist/charts/lib/selection.d.ts +20 -0
- package/dist/charts/lib/selection.js +18 -0
- package/dist/charts/lib/selection.js.map +1 -0
- package/dist/charts/lib/sonify-control.d.ts +163 -0
- package/dist/charts/lib/sonify-control.js +172 -0
- package/dist/charts/lib/sonify-control.js.map +1 -0
- package/dist/charts/lib/sonify.d.ts +248 -0
- package/dist/charts/lib/sonify.js +262 -0
- package/dist/charts/lib/sonify.js.map +1 -0
- package/dist/charts/lib/toolbar.d.ts +144 -0
- package/dist/charts/lib/toolbar.js +156 -0
- package/dist/charts/lib/toolbar.js.map +1 -0
- package/dist/charts/lib/tooltip.d.ts +59 -0
- package/dist/charts/lib/tooltip.js +135 -0
- package/dist/charts/lib/tooltip.js.map +1 -0
- package/dist/charts/lib/values.d.ts +56 -0
- package/dist/charts/lib/values.js +71 -0
- package/dist/charts/lib/values.js.map +1 -0
- package/dist/charts/lib/zoom.d.ts +139 -0
- package/dist/charts/lib/zoom.js +314 -0
- package/dist/charts/lib/zoom.js.map +1 -0
- package/dist/components/Accordion/Accordion.d.ts +34 -0
- package/dist/components/Accordion/Accordion.js +43 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Alert/Alert.d.ts +32 -0
- package/dist/components/Alert/Alert.js +49 -0
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/AppShell/AppShell.d.ts +58 -0
- package/dist/components/AppShell/AppShell.js +126 -0
- package/dist/components/AppShell/AppShell.js.map +1 -0
- package/dist/components/Article/Article.d.ts +58 -0
- package/dist/components/Article/Article.js +34 -0
- package/dist/components/Article/Article.js.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +46 -0
- package/dist/components/AspectRatio/AspectRatio.js +33 -0
- package/dist/components/AspectRatio/AspectRatio.js.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +38 -0
- package/dist/components/Avatar/Avatar.js +44 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Badge/Badge.d.ts +30 -0
- package/dist/components/Badge/Badge.js +29 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +37 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +46 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/Button/Button.d.ts +70 -0
- package/dist/components/Button/Button.js +95 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Calendar/Calendar.d.ts +54 -0
- package/dist/components/Calendar/Calendar.js +369 -0
- package/dist/components/Calendar/Calendar.js.map +1 -0
- package/dist/components/Card/Card.d.ts +55 -0
- package/dist/components/Card/Card.js +64 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +26 -0
- package/dist/components/Checkbox/Checkbox.js +34 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Code/Code.d.ts +30 -0
- package/dist/components/Code/Code.js +21 -0
- package/dist/components/Code/Code.js.map +1 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +145 -0
- package/dist/components/CodeBlock/CodeBlock.js +114 -0
- package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
- package/dist/components/Collapsible/Collapsible.d.ts +45 -0
- package/dist/components/Collapsible/Collapsible.js +60 -0
- package/dist/components/Collapsible/Collapsible.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +67 -0
- package/dist/components/ColorPicker/ColorPicker.js +334 -0
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts +77 -0
- package/dist/components/Combobox/Combobox.js +170 -0
- package/dist/components/Combobox/Combobox.js.map +1 -0
- package/dist/components/Command/Command.d.ts +125 -0
- package/dist/components/Command/Command.js +204 -0
- package/dist/components/Command/Command.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +63 -0
- package/dist/components/ContextMenu/ContextMenu.js +109 -0
- package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +130 -0
- package/dist/components/DatePicker/DatePicker.js +257 -0
- package/dist/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +73 -0
- package/dist/components/DescriptionList/DescriptionList.js +35 -0
- package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
- package/dist/components/Diagram/Diagram.d.ts +86 -0
- package/dist/components/Diagram/Diagram.js +211 -0
- package/dist/components/Diagram/Diagram.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +63 -0
- package/dist/components/Dialog/Dialog.js +90 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +87 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +120 -0
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
- package/dist/components/EmptyState/EmptyState.d.ts +55 -0
- package/dist/components/EmptyState/EmptyState.js +32 -0
- package/dist/components/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/ErrorState/ErrorState.d.ts +55 -0
- package/dist/components/ErrorState/ErrorState.js +41 -0
- package/dist/components/ErrorState/ErrorState.js.map +1 -0
- package/dist/components/Field/Field.d.ts +111 -0
- package/dist/components/Field/Field.js +95 -0
- package/dist/components/Field/Field.js.map +1 -0
- package/dist/components/Field/field-control.d.ts +31 -0
- package/dist/components/Field/field-control.js +12 -0
- package/dist/components/Field/field-control.js.map +1 -0
- package/dist/components/FigureBand/FigureBand.d.ts +31 -0
- package/dist/components/FigureBand/FigureBand.js +51 -0
- package/dist/components/FigureBand/FigureBand.js.map +1 -0
- package/dist/components/FloatingIconButton/FloatingIconButton.d.ts +29 -0
- package/dist/components/FloatingIconButton/FloatingIconButton.js +34 -0
- package/dist/components/FloatingIconButton/FloatingIconButton.js.map +1 -0
- package/dist/components/Heading/Heading.d.ts +62 -0
- package/dist/components/Heading/Heading.js +44 -0
- package/dist/components/Heading/Heading.js.map +1 -0
- package/dist/components/Input/Input.d.ts +22 -0
- package/dist/components/Input/Input.js +21 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Kbd/Kbd.d.ts +27 -0
- package/dist/components/Kbd/Kbd.js +21 -0
- package/dist/components/Kbd/Kbd.js.map +1 -0
- package/dist/components/LinkArrow/LinkArrow.d.ts +24 -0
- package/dist/components/LinkArrow/LinkArrow.js +24 -0
- package/dist/components/LinkArrow/LinkArrow.js.map +1 -0
- package/dist/components/Markdown/Markdown.d.ts +139 -0
- package/dist/components/Markdown/Markdown.js +135 -0
- package/dist/components/Markdown/Markdown.js.map +1 -0
- package/dist/components/Markdown/inline.d.ts +29 -0
- package/dist/components/Markdown/inline.js +74 -0
- package/dist/components/Markdown/inline.js.map +1 -0
- package/dist/components/Markdown/nodes.d.ts +65 -0
- package/dist/components/Markdown/nodes.js +1 -0
- package/dist/components/Markdown/nodes.js.map +1 -0
- package/dist/components/Markdown/parse.d.ts +24 -0
- package/dist/components/Markdown/parse.js +110 -0
- package/dist/components/Markdown/parse.js.map +1 -0
- package/dist/components/Markdown/slug.d.ts +15 -0
- package/dist/components/Markdown/slug.js +7 -0
- package/dist/components/Markdown/slug.js.map +1 -0
- package/dist/components/Metric/Metric.d.ts +61 -0
- package/dist/components/Metric/Metric.js +51 -0
- package/dist/components/Metric/Metric.js.map +1 -0
- package/dist/components/NativeSelect/NativeSelect.d.ts +33 -0
- package/dist/components/NativeSelect/NativeSelect.js +44 -0
- package/dist/components/NativeSelect/NativeSelect.js.map +1 -0
- package/dist/components/NavItem/NavItem.d.ts +39 -0
- package/dist/components/NavItem/NavItem.js +31 -0
- package/dist/components/NavItem/NavItem.js.map +1 -0
- package/dist/components/NumberField/NumberField.d.ts +69 -0
- package/dist/components/NumberField/NumberField.js +162 -0
- package/dist/components/NumberField/NumberField.js.map +1 -0
- package/dist/components/PageHeader/PageHeader.d.ts +92 -0
- package/dist/components/PageHeader/PageHeader.js +37 -0
- package/dist/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +67 -0
- package/dist/components/Pagination/Pagination.js +112 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts +39 -0
- package/dist/components/Popover/Popover.js +57 -0
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Progress/Progress.d.ts +43 -0
- package/dist/components/Progress/Progress.js +57 -0
- package/dist/components/Progress/Progress.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +49 -0
- package/dist/components/RadioGroup/RadioGroup.js +53 -0
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +46 -0
- package/dist/components/ScrollArea/ScrollArea.js +54 -0
- package/dist/components/ScrollArea/ScrollArea.js.map +1 -0
- package/dist/components/SearchableMenu/SearchableMenu.d.ts +68 -0
- package/dist/components/SearchableMenu/SearchableMenu.js +101 -0
- package/dist/components/SearchableMenu/SearchableMenu.js.map +1 -0
- package/dist/components/Select/Select.d.ts +87 -0
- package/dist/components/Select/Select.js +130 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Separator/Separator.d.ts +48 -0
- package/dist/components/Separator/Separator.js +43 -0
- package/dist/components/Separator/Separator.js.map +1 -0
- package/dist/components/Sheet/Sheet.d.ts +43 -0
- package/dist/components/Sheet/Sheet.js +79 -0
- package/dist/components/Sheet/Sheet.js.map +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +357 -0
- package/dist/components/Sidebar/Sidebar.js +447 -0
- package/dist/components/Sidebar/Sidebar.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +70 -0
- package/dist/components/Skeleton/Skeleton.js +44 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Slider/Slider.d.ts +74 -0
- package/dist/components/Slider/Slider.js +143 -0
- package/dist/components/Slider/Slider.js.map +1 -0
- package/dist/components/Spinner/Spinner.d.ts +58 -0
- package/dist/components/Spinner/Spinner.js +49 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/StatusDot/StatusDot.d.ts +29 -0
- package/dist/components/StatusDot/StatusDot.js +44 -0
- package/dist/components/StatusDot/StatusDot.js.map +1 -0
- package/dist/components/StatusPill/StatusPill.d.ts +30 -0
- package/dist/components/StatusPill/StatusPill.js +37 -0
- package/dist/components/StatusPill/StatusPill.js.map +1 -0
- package/dist/components/Steps/Steps.d.ts +65 -0
- package/dist/components/Steps/Steps.js +25 -0
- package/dist/components/Steps/Steps.js.map +1 -0
- package/dist/components/Switch/Switch.d.ts +23 -0
- package/dist/components/Switch/Switch.js +23 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Table/Table.d.ts +116 -0
- package/dist/components/Table/Table.js +137 -0
- package/dist/components/Table/Table.js.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts +37 -0
- package/dist/components/Tabs/Tabs.js +205 -0
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tag/Tag.d.ts +87 -0
- package/dist/components/Tag/Tag.js +62 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Text/Text.d.ts +62 -0
- package/dist/components/Text/Text.js +30 -0
- package/dist/components/Text/Text.js.map +1 -0
- package/dist/components/Textarea/Textarea.d.ts +20 -0
- package/dist/components/Textarea/Textarea.js +32 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Timestamp/Timestamp.d.ts +59 -0
- package/dist/components/Timestamp/Timestamp.js +56 -0
- package/dist/components/Timestamp/Timestamp.js.map +1 -0
- package/dist/components/Toast/Toast.d.ts +32 -0
- package/dist/components/Toast/Toast.js +64 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +46 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +88 -0
- package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -0
- package/dist/components/Toolbar/Toolbar.d.ts +55 -0
- package/dist/components/Toolbar/Toolbar.js +43 -0
- package/dist/components/Toolbar/Toolbar.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +43 -0
- package/dist/components/Tooltip/Tooltip.js +40 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.d.ts +55 -0
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js +175 -0
- package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js.map +1 -0
- package/dist/diagrams/DataflowFigure/DataflowFigure.d.ts +28 -0
- package/dist/diagrams/DataflowFigure/DataflowFigure.js +148 -0
- package/dist/diagrams/DataflowFigure/DataflowFigure.js.map +1 -0
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.d.ts +78 -0
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.js +229 -0
- package/dist/diagrams/DiagramCanvas/DiagramCanvas.js.map +1 -0
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.d.ts +106 -0
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js +123 -0
- package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js.map +1 -0
- package/dist/diagrams/DiagramInspector/DiagramInspector.d.ts +70 -0
- package/dist/diagrams/DiagramInspector/DiagramInspector.js +94 -0
- package/dist/diagrams/DiagramInspector/DiagramInspector.js.map +1 -0
- package/dist/diagrams/DiagramLegend/DiagramLegend.d.ts +42 -0
- package/dist/diagrams/DiagramLegend/DiagramLegend.js +35 -0
- package/dist/diagrams/DiagramLegend/DiagramLegend.js.map +1 -0
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.d.ts +77 -0
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.js +106 -0
- package/dist/diagrams/DiagramMinimap/DiagramMinimap.js.map +1 -0
- package/dist/diagrams/DiagramToolbar/DiagramToolbar.d.ts +48 -0
- package/dist/diagrams/DiagramToolbar/DiagramToolbar.js +53 -0
- package/dist/diagrams/DiagramToolbar/DiagramToolbar.js.map +1 -0
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.d.ts +31 -0
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.js +234 -0
- package/dist/diagrams/LifecycleFigure/LifecycleFigure.js.map +1 -0
- package/dist/diagrams/SequenceFigure/SequenceFigure.d.ts +38 -0
- package/dist/diagrams/SequenceFigure/SequenceFigure.js +261 -0
- package/dist/diagrams/SequenceFigure/SequenceFigure.js.map +1 -0
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.d.ts +36 -0
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.js +259 -0
- package/dist/diagrams/WorkflowFigure/WorkflowFigure.js.map +1 -0
- package/dist/diagrams/index.d.ts +17 -0
- package/dist/diagrams/index.js +29 -0
- package/dist/diagrams/index.js.map +1 -0
- package/dist/diagrams/lib/dev.d.ts +61 -0
- package/dist/diagrams/lib/dev.js +96 -0
- package/dist/diagrams/lib/dev.js.map +1 -0
- package/dist/diagrams/lib/frame.d.ts +138 -0
- package/dist/diagrams/lib/frame.js +131 -0
- package/dist/diagrams/lib/frame.js.map +1 -0
- package/dist/diagrams/lib/geometry.d.ts +114 -0
- package/dist/diagrams/lib/geometry.js +113 -0
- package/dist/diagrams/lib/geometry.js.map +1 -0
- package/dist/diagrams/lib/legend.d.ts +32 -0
- package/dist/diagrams/lib/legend.js +84 -0
- package/dist/diagrams/lib/legend.js.map +1 -0
- package/dist/diagrams/lib/marks.d.ts +207 -0
- package/dist/diagrams/lib/marks.js +480 -0
- package/dist/diagrams/lib/marks.js.map +1 -0
- package/dist/diagrams/lib/route.d.ts +106 -0
- package/dist/diagrams/lib/route.js +201 -0
- package/dist/diagrams/lib/route.js.map +1 -0
- package/dist/diagrams/lib/wires.d.ts +59 -0
- package/dist/diagrams/lib/wires.js +94 -0
- package/dist/diagrams/lib/wires.js.map +1 -0
- package/dist/diagrams/spec.d.ts +405 -0
- package/dist/diagrams/spec.js +1 -0
- package/dist/diagrams/spec.js.map +1 -0
- package/dist/fonts/hanken-grotesk-300.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-400.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-500.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-600.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-700.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-400.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-500.woff2 +0 -0
- package/dist/fonts/ibm-plex-mono-600.woff2 +0 -0
- package/dist/fonts/newsreader-300.woff2 +0 -0
- package/dist/fonts/newsreader-400.woff2 +0 -0
- package/dist/fonts/newsreader-500.woff2 +0 -0
- package/dist/fonts/newsreader-600.woff2 +0 -0
- package/dist/fonts.css +96 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -0
- package/dist/keyframes.css +300 -0
- package/dist/lib/cn.d.ts +21 -0
- package/dist/lib/cn.js +9 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/color.d.ts +80 -0
- package/dist/lib/color.js +189 -0
- package/dist/lib/color.js.map +1 -0
- package/dist/lib/control.d.ts +32 -0
- package/dist/lib/control.js +14 -0
- package/dist/lib/control.js.map +1 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/index.js +11 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/numeric.d.ts +35 -0
- package/dist/lib/numeric.js +29 -0
- package/dist/lib/numeric.js.map +1 -0
- package/dist/lib/overlay-container.d.ts +48 -0
- package/dist/lib/overlay-container.js +15 -0
- package/dist/lib/overlay-container.js.map +1 -0
- package/dist/lib/slot-content.d.ts +8 -0
- package/dist/lib/slot-content.js +17 -0
- package/dist/lib/slot-content.js.map +1 -0
- package/dist/lib/step-rail.d.ts +45 -0
- package/dist/lib/step-rail.js +47 -0
- package/dist/lib/step-rail.js.map +1 -0
- package/dist/lib/svg-export.d.ts +138 -0
- package/dist/lib/svg-export.js +198 -0
- package/dist/lib/svg-export.js.map +1 -0
- package/dist/lib/useClipboardCopy.d.ts +30 -0
- package/dist/lib/useClipboardCopy.js +37 -0
- package/dist/lib/useClipboardCopy.js.map +1 -0
- package/dist/lib/useSelectionIndicator.d.ts +29 -0
- package/dist/lib/useSelectionIndicator.js +49 -0
- package/dist/lib/useSelectionIndicator.js.map +1 -0
- package/dist/lib/warn.d.ts +73 -0
- package/dist/lib/warn.js +38 -0
- package/dist/lib/warn.js.map +1 -0
- package/dist/semantic.css +200 -0
- package/dist/styles.css +98 -0
- package/dist/themes.css +607 -0
- package/dist/tokens/brand.d.ts +47 -0
- package/dist/tokens/brand.js +38 -0
- package/dist/tokens/brand.js.map +1 -0
- package/dist/tokens.css +666 -0
- package/dist/tokens.d.ts +205 -0
- package/dist/tokens.js +1056 -0
- package/dist/tokens.json +1055 -0
- package/dist/website/Actions/Actions.d.ts +34 -0
- package/dist/website/Actions/Actions.js +29 -0
- package/dist/website/Actions/Actions.js.map +1 -0
- package/dist/website/Collection/Collection.d.ts +128 -0
- package/dist/website/Collection/Collection.js +162 -0
- package/dist/website/Collection/Collection.js.map +1 -0
- package/dist/website/Contact/Contact.d.ts +87 -0
- package/dist/website/Contact/Contact.js +94 -0
- package/dist/website/Contact/Contact.js.map +1 -0
- package/dist/website/Content/CodePanel.d.ts +27 -0
- package/dist/website/Content/CodePanel.js +30 -0
- package/dist/website/Content/CodePanel.js.map +1 -0
- package/dist/website/Content/Content.d.ts +29 -0
- package/dist/website/Content/Content.js +38 -0
- package/dist/website/Content/Content.js.map +1 -0
- package/dist/website/Conversation/Conversation.d.ts +193 -0
- package/dist/website/Conversation/Conversation.js +252 -0
- package/dist/website/Conversation/Conversation.js.map +1 -0
- package/dist/website/Evidence/Evidence.d.ts +116 -0
- package/dist/website/Evidence/Evidence.js +142 -0
- package/dist/website/Evidence/Evidence.js.map +1 -0
- package/dist/website/Media/Media.d.ts +173 -0
- package/dist/website/Media/Media.js +225 -0
- package/dist/website/Media/Media.js.map +1 -0
- package/dist/website/Media/MediaLightbox.d.ts +18 -0
- package/dist/website/Media/MediaLightbox.js +38 -0
- package/dist/website/Media/MediaLightbox.js.map +1 -0
- package/dist/website/Metrics/Metrics.d.ts +74 -0
- package/dist/website/Metrics/Metrics.js +96 -0
- package/dist/website/Metrics/Metrics.js.map +1 -0
- package/dist/website/Music/Music.d.ts +60 -0
- package/dist/website/Music/Music.js +80 -0
- package/dist/website/Music/Music.js.map +1 -0
- package/dist/website/Portfolio/FrameLayout.d.ts +9 -0
- package/dist/website/Portfolio/FrameLayout.js +42 -0
- package/dist/website/Portfolio/FrameLayout.js.map +1 -0
- package/dist/website/Portfolio/Portfolio.d.ts +49 -0
- package/dist/website/Portfolio/Portfolio.js +66 -0
- package/dist/website/Portfolio/Portfolio.js.map +1 -0
- package/dist/website/Portfolio/QuestionCard.d.ts +22 -0
- package/dist/website/Portfolio/QuestionCard.js +33 -0
- package/dist/website/Portfolio/QuestionCard.js.map +1 -0
- package/dist/website/PortfolioIndex/PortfolioIndex.d.ts +21 -0
- package/dist/website/PortfolioIndex/PortfolioIndex.js +31 -0
- package/dist/website/PortfolioIndex/PortfolioIndex.js.map +1 -0
- package/dist/website/Reading/Reading.d.ts +203 -0
- package/dist/website/Reading/Reading.js +357 -0
- package/dist/website/Reading/Reading.js.map +1 -0
- package/dist/website/Recovery/Recovery.d.ts +39 -0
- package/dist/website/Recovery/Recovery.js +96 -0
- package/dist/website/Recovery/Recovery.js.map +1 -0
- package/dist/website/SearchPalette/SearchPalette.d.ts +59 -0
- package/dist/website/SearchPalette/SearchPalette.js +120 -0
- package/dist/website/SearchPalette/SearchPalette.js.map +1 -0
- package/dist/website/SiteNavigation/SiteNavigation.d.ts +46 -0
- package/dist/website/SiteNavigation/SiteNavigation.js +101 -0
- package/dist/website/SiteNavigation/SiteNavigation.js.map +1 -0
- package/dist/website/SiteShell/SiteShell.d.ts +45 -0
- package/dist/website/SiteShell/SiteShell.js +46 -0
- package/dist/website/SiteShell/SiteShell.js.map +1 -0
- package/dist/website/Timeline/Timeline.d.ts +80 -0
- package/dist/website/Timeline/Timeline.js +99 -0
- package/dist/website/Timeline/Timeline.js.map +1 -0
- package/dist/website/Workbench/Chronology.d.ts +32 -0
- package/dist/website/Workbench/Chronology.js +32 -0
- package/dist/website/Workbench/Chronology.js.map +1 -0
- package/dist/website/Workbench/ContactRow.d.ts +13 -0
- package/dist/website/Workbench/ContactRow.js +11 -0
- package/dist/website/Workbench/ContactRow.js.map +1 -0
- package/dist/website/Workbench/PhotoMosaic.d.ts +13 -0
- package/dist/website/Workbench/PhotoMosaic.js +15 -0
- package/dist/website/Workbench/PhotoMosaic.js.map +1 -0
- package/dist/website/Workbench/Reveal.d.ts +19 -0
- package/dist/website/Workbench/Reveal.js +29 -0
- package/dist/website/Workbench/Reveal.js.map +1 -0
- package/dist/website/Workbench/ToolStrip.d.ts +18 -0
- package/dist/website/Workbench/ToolStrip.js +15 -0
- package/dist/website/Workbench/ToolStrip.js.map +1 -0
- package/dist/website/Workbench/Workbench.d.ts +23 -0
- package/dist/website/Workbench/Workbench.js +22 -0
- package/dist/website/Workbench/Workbench.js.map +1 -0
- package/dist/website/Workbench/WorkbenchCard.d.ts +29 -0
- package/dist/website/Workbench/WorkbenchCard.js +21 -0
- package/dist/website/Workbench/WorkbenchCard.js.map +1 -0
- package/dist/website/Workbench/WorkbenchEntries.d.ts +22 -0
- package/dist/website/Workbench/WorkbenchEntries.js +24 -0
- package/dist/website/Workbench/WorkbenchEntries.js.map +1 -0
- package/dist/website/Workbench/WorkbenchFigure.d.ts +20 -0
- package/dist/website/Workbench/WorkbenchFigure.js +15 -0
- package/dist/website/Workbench/WorkbenchFigure.js.map +1 -0
- package/dist/website/Workbench/WorkbenchHero.d.ts +24 -0
- package/dist/website/Workbench/WorkbenchHero.js +24 -0
- package/dist/website/Workbench/WorkbenchHero.js.map +1 -0
- package/dist/website/Workbench/theme.d.ts +22 -0
- package/dist/website/Workbench/theme.js +12 -0
- package/dist/website/Workbench/theme.js.map +1 -0
- package/dist/website/index.d.ts +38 -0
- package/dist/website/index.js +32 -0
- package/dist/website/index.js.map +1 -0
- package/dist/website-actions.css +6 -0
- package/dist/website-base.css +46 -0
- package/dist/website-collection.css +89 -0
- package/dist/website-contact.css +29 -0
- package/dist/website-content.css +20 -0
- package/dist/website-controls.css +91 -0
- package/dist/website-conversation.css +115 -0
- package/dist/website-evidence.css +56 -0
- package/dist/website-media.css +227 -0
- package/dist/website-metrics.css +15 -0
- package/dist/website-music.css +27 -0
- package/dist/website-portfolio.css +94 -0
- package/dist/website-reading.css +159 -0
- package/dist/website-recovery.css +28 -0
- package/dist/website-search.css +26 -0
- package/dist/website-shell.css +89 -0
- package/dist/website-timeline.css +43 -0
- package/dist/website-workbench.css +162 -0
- package/dist/website.css +26 -0
- package/llms.txt +35 -0
- package/package.json +163 -5
- package/skills/folio-design/SKILL.md +228 -0
- package/skills/folio-design/evals/claims.json +95 -0
- package/skills/folio-design/evals/evals.json +84 -0
- package/skills/folio-design/rules/a11y.md +167 -0
- package/skills/folio-design/rules/composition.md +108 -0
- package/skills/folio-design/rules/forms.md +135 -0
- package/skills/folio-design/rules/naming.md +155 -0
- package/skills/folio-design/rules/tokens.md +135 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# @misoto22/folio — for agents
|
|
2
|
+
|
|
3
|
+
Pointers, not content. Everything below is generated from the source in this
|
|
4
|
+
same tarball, so nothing here can describe a version that is not installed.
|
|
5
|
+
|
|
6
|
+
## You have installed this package
|
|
7
|
+
|
|
8
|
+
You are probably reading this because you searched `node_modules` for a filename
|
|
9
|
+
you recognise. The three commands are what you came for:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @misoto22/folio docs Button # one component, in full
|
|
13
|
+
npx @misoto22/folio docs --installed # this version, and every component in it
|
|
14
|
+
npx @misoto22/folio init --agents-md # install the skill into this project
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`docs` resolves parts and types as well as components, so `docs CardBody`,
|
|
18
|
+
`docs TH` and `docs ButtonVariant` all land on the right file. When an import
|
|
19
|
+
fails, ask it about the identifier you tried.
|
|
20
|
+
|
|
21
|
+
Read `skills/folio-design/SKILL.md` in this package before writing components
|
|
22
|
+
against it. The names diverge from shadcn/ui in several places, and colour is
|
|
23
|
+
never written as a raw class; the skill leads with both.
|
|
24
|
+
|
|
25
|
+
`init` writes it to `.agents/skills/` — the path Codex, Cursor, Copilot, Gemini
|
|
26
|
+
CLI, OpenCode, Cline, Zed and Warp share — and to `.claude/skills/` when the
|
|
27
|
+
project already has one. For anything else, `npx skills add
|
|
28
|
+
Misoto22/folio` finds this skill with no configuration.
|
|
29
|
+
|
|
30
|
+
Some misuse fails silently, so the components say so in development:
|
|
31
|
+
`FIELD_CONTROL_NOT_LABELLABLE` when a wrapper takes the label instead of the
|
|
32
|
+
control, `BUTTON_ICON_ONLY_UNNAMED` when an icon-only button has no accessible
|
|
33
|
+
name, `REQUIRED_NAME_BLANK` when a required name is an empty string. Each prints
|
|
34
|
+
the field and an imperative fix, once per problem, and none reaches a production
|
|
35
|
+
bundle.
|
|
36
|
+
|
|
37
|
+
Nineteen codes in all. Eight on the primitives —
|
|
38
|
+
`ARTICLE_HTML_AND_CHILDREN`, `BREADCRUMB_CRUMB_NOT_LINKED`,
|
|
39
|
+
`BUTTON_ICON_ONLY_UNNAMED`, `DIALOG_TITLE_MISSING`,
|
|
40
|
+
`FIELD_CONTROL_NOT_LABELLABLE`, `FIELD_CONTROL_NOT_WIRED`,
|
|
41
|
+
`REQUIRED_NAME_BLANK`, `SEARCHABLE_MENU_LABEL_UNREADABLE`. Five on `Diagram`,
|
|
42
|
+
which checks the spec it was handed because a figure that ignores an edge still
|
|
43
|
+
renders beautifully — `DIAGRAM_ACCENT_ON_CONTAINER`, `DIAGRAM_DIRECTION_ON_LEAF`,
|
|
44
|
+
`DIAGRAM_DUPLICATE_ID`, `DIAGRAM_EDGE_NOT_ADJACENT`,
|
|
45
|
+
`DIAGRAM_EDGE_UNKNOWN_NODE`. And six on the figures in
|
|
46
|
+
`@misoto22/folio/diagrams` — `DIAGRAM_CELL_COLLISION`, `DIAGRAM_EDGE_DANGLING`,
|
|
47
|
+
`DIAGRAM_LANE_UNKNOWN`, `DIAGRAM_REF_UNKNOWN`, `DIAGRAM_SPEC_MUTATED`,
|
|
48
|
+
`DIAGRAM_STAGE_OUT_OF_RANGE`. `skills/folio-design/rules/a11y.md` tables what
|
|
49
|
+
each one fires on; `src/lib/warn.ts` is where they are printed.
|
|
50
|
+
|
|
51
|
+
Four entry points, and importing from the wrong one throws rather than renders
|
|
52
|
+
blank. Each `docs` file names its own on the `Import:` line.
|
|
53
|
+
|
|
54
|
+
| Specifier | What ships from it |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `@misoto22/folio` | The primitives |
|
|
57
|
+
| `@misoto22/folio/charts` | Charts — needs the `recharts` and `motion` peers |
|
|
58
|
+
| `@misoto22/folio/diagrams` | Figures with routed edges |
|
|
59
|
+
| `@misoto22/folio/website` | Website compositions, with data and routes supplied by the host — styled by `website.css`, which `styles.css` does not include |
|
|
60
|
+
|
|
61
|
+
## You are working ON this package, in its repository
|
|
62
|
+
|
|
63
|
+
The repository root `AGENTS.md` still applies in full — this file is additive,
|
|
64
|
+
not a replacement, and the Harness rules there (`HAR-*`, `DESIGN-*`) govern this
|
|
65
|
+
directory as much as any other. Read it first.
|
|
66
|
+
|
|
67
|
+
What is specific to here:
|
|
68
|
+
|
|
69
|
+
- **`dist/` is generated.** `dist/agent/**` included — it is written by
|
|
70
|
+
`scripts/emit-agent.mjs` at build time. Edit the source, then rebuild.
|
|
71
|
+
- **`agent/catalog.mjs` is the one hand-written description** of what each
|
|
72
|
+
component IS: its group, summary, when to reach for it, accessibility
|
|
73
|
+
promises and keyboard contract. Everything mechanical is parsed out of
|
|
74
|
+
`src/**` by `scripts/extract-props.mjs`. `src/__tests__/catalog.test.ts`
|
|
75
|
+
fails when the two disagree.
|
|
76
|
+
- **The skill is tested.** `src/__tests__/skill.test.ts` asserts every claim in
|
|
77
|
+
`skills/` against the extracted source, in both directions — an identifier the
|
|
78
|
+
rules tell an agent to write must exist, and one they say to avoid must not.
|
|
79
|
+
Renaming an export without updating the rules fails the build, on purpose.
|
|
80
|
+
- **Gates:** `pnpm lint && pnpm typecheck && pnpm test && pnpm build`, from the
|
|
81
|
+
repository root.
|
|
82
|
+
|
|
83
|
+
## On the web
|
|
84
|
+
|
|
85
|
+
`https://ui.misoto22.com` — and `/llms.txt`, `/llms-full.txt`, and
|
|
86
|
+
`/components/<slug>/llms.txt` for the same content without the CSS. Prefer the
|
|
87
|
+
CLI above when the package is installed: it is version-locked and needs no
|
|
88
|
+
network.
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@AGENTS.md
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Henry Chen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,4 +1,210 @@
|
|
|
1
1
|
# @misoto22/folio
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
A monochrome design system for software, writing and photography: portable CSS
|
|
4
|
+
tokens and accessible React 19 primitives. Paper ground, near-black mark, and
|
|
5
|
+
status is the only chroma in the file.
|
|
6
|
+
|
|
7
|
+
Components ship compiled — you import them, you do not copy them into your
|
|
8
|
+
project.
|
|
9
|
+
|
|
10
|
+
**[ui.misoto22.com](https://ui.misoto22.com)** · [Changelog](./CHANGELOG.md)
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @misoto22/folio
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { Button, Field, Input } from '@misoto22/folio'
|
|
20
|
+
import '@misoto22/folio/styles.css'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`styles.css` is the whole compiled sheet — tokens, roles, themes, motion and
|
|
24
|
+
the vendored faces. An app that compiles its own Tailwind can take the portable
|
|
25
|
+
layers instead:
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import '@misoto22/folio/tokens.css' // primitives, plus data-mode and data-density
|
|
29
|
+
import '@misoto22/folio/semantic.css' // roles
|
|
30
|
+
import '@misoto22/folio/themes.css' // the other six theming axes
|
|
31
|
+
import '@misoto22/folio/keyframes.css' // motion
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
All four, or the theming table below is a table of attributes that do nothing.
|
|
35
|
+
`data-mode` and `data-density` are declared in `tokens.css`; every other axis
|
|
36
|
+
lives only in `themes.css`, and an app that skips it writes `data-radius="sharp"`
|
|
37
|
+
and gets no error, no warning, and no corner. Two more layers are opt-in rather
|
|
38
|
+
than missing: `@misoto22/folio/fonts.css` carries the vendored faces, and
|
|
39
|
+
`@misoto22/folio/article.css` styles long-form prose.
|
|
40
|
+
|
|
41
|
+
Diagrams ship from their own specifier, so a page that renders a `Badge` does
|
|
42
|
+
not pay for a routing engine:
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
import { ArchitectureFigure, DiagramCanvas } from '@misoto22/folio/diagrams'
|
|
46
|
+
import { SiteShell, Portfolio, CollectionIntro, SearchPalette } from '@misoto22/folio/website'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Five server-rendered figures — architecture, workflow, sequence, data-flow and
|
|
50
|
+
lifecycle — plus the chrome to explore one. They read the JSON schemas
|
|
51
|
+
published by [archify](https://github.com/tt-a1i/archify), so a specification
|
|
52
|
+
authored for that tool renders here with no translation step.
|
|
53
|
+
|
|
54
|
+
## Theming
|
|
55
|
+
|
|
56
|
+
Eight independent axes, each an attribute, each working on **any** element
|
|
57
|
+
rather than only on the root. An unset axis is the default.
|
|
58
|
+
|
|
59
|
+
| Attribute | Values |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| `data-mode` | `light` `dark` |
|
|
62
|
+
| `data-surface` | `warm` `cool` `glass` |
|
|
63
|
+
| `data-radius` | `sharp` `round` |
|
|
64
|
+
| `data-rules` | `quiet` `firm` |
|
|
65
|
+
| `data-type` | `grotesk` `bookish` |
|
|
66
|
+
| `data-motion` | `still` `snappy` |
|
|
67
|
+
| `data-density` | `compact` |
|
|
68
|
+
| `data-chart-palette` | `chroma` |
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
<section data-surface="warm" data-radius="sharp">…</section>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
No component reads any of them, and none of them introduces a token. To
|
|
75
|
+
re-accent the system, re-point one custom property:
|
|
76
|
+
|
|
77
|
+
```css
|
|
78
|
+
:root { --accent: var(--ok); }
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## For agents
|
|
82
|
+
|
|
83
|
+
This package is documented for the reader that installed it, not only for the
|
|
84
|
+
one that can open a browser — and the two need different things. Everything
|
|
85
|
+
below is generated from the source in this same tarball, so it describes the
|
|
86
|
+
version you actually have rather than whatever the website shipped last.
|
|
87
|
+
|
|
88
|
+
**One component, in full** — every prop with its type and default, the exported
|
|
89
|
+
unions, the keyboard contract, the accessibility promises, the examples:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx @misoto22/folio docs Button
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The median component is about 500 tokens. It resolves parts and types too, so
|
|
96
|
+
`docs CardBody`, `docs TH` and `docs ButtonVariant` all land on the right file —
|
|
97
|
+
useful when an import just failed.
|
|
98
|
+
|
|
99
|
+
**What is installed here**, as a few hundred tokens rather than fifty prop
|
|
100
|
+
tables:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npx @misoto22/folio docs --installed
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Install the skill** into your project, so a coding agent picks up the
|
|
107
|
+
conventions without being told each time:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npx @misoto22/folio init --agents-md
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
That writes the skill to `.agents/skills/` — the path Codex, Cursor, GitHub
|
|
114
|
+
Copilot, Gemini CLI, OpenCode, Cline, Zed and Warp all read — and to
|
|
115
|
+
`.claude/skills/` as well when the project already has a `.claude/`. Use
|
|
116
|
+
`--agent agents` or `--agent claude` to pick one. For any other agent,
|
|
117
|
+
[`skills`](https://github.com/vercel-labs/skills) covers around seventy of them
|
|
118
|
+
and finds this one without any configuration:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
npx skills add Misoto22/folio
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The skill is progressive: its name and description are about 110 tokens and are
|
|
125
|
+
all that sits in a session until something actually touches this package. The
|
|
126
|
+
body is around 2,200, and the five rule files load one at a time, only when the
|
|
127
|
+
work reaches them.
|
|
128
|
+
|
|
129
|
+
An agent that explores `node_modules` by filename rather than by command finds
|
|
130
|
+
`AGENTS.md`, `CLAUDE.md` and `llms.txt` at the package root. They are pointers
|
|
131
|
+
to the above and nothing else, so they cannot go stale between releases.
|
|
132
|
+
|
|
133
|
+
The names diverge from shadcn/ui in a handful of places that a model writing
|
|
134
|
+
from habit gets wrong — `CardBody` not `CardContent`, `THead`/`TBody`/`TR`/`TH`/`TD`
|
|
135
|
+
not `TableHeader`/…, and `title` as a prop on `DialogContent` rather than a
|
|
136
|
+
`DialogTitle` child. The skill leads with that table, and
|
|
137
|
+
`src/__tests__/skill.test.ts` fails the build if any of it stops being true.
|
|
138
|
+
|
|
139
|
+
On the web, the same content is at
|
|
140
|
+
[`/llms.txt`](https://ui.misoto22.com/llms.txt) (index),
|
|
141
|
+
[`/llms-full.txt`](https://ui.misoto22.com/llms-full.txt) (everything inline),
|
|
142
|
+
and `/components/<slug>/llms.txt` (one component).
|
|
143
|
+
|
|
144
|
+
### It tells you when you get it wrong
|
|
145
|
+
|
|
146
|
+
Some ways of misusing a component fail silently — a `Field` whose child is a
|
|
147
|
+
wrapper wires the label onto the box, an icon-only `Button` with no accessible
|
|
148
|
+
name renders perfectly and is invisible to a screen reader. Development warns on
|
|
149
|
+
those where it happens, with a stable code, the offending field and an
|
|
150
|
+
imperative fix:
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
[@misoto22/folio] FIELD_CONTROL_NOT_LABELLABLE
|
|
154
|
+
Field's child is a <div>, which cannot take a label — so the id,
|
|
155
|
+
aria-describedby, aria-required and aria-invalid were applied to it rather
|
|
156
|
+
than to a control.
|
|
157
|
+
field: children
|
|
158
|
+
fix: Put the control itself directly inside Field, with no wrapper. For a
|
|
159
|
+
row of controls, give each its own Field and lay them out around it.
|
|
160
|
+
docs: npx @misoto22/folio docs Field
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Every call site is behind `process.env.NODE_ENV`, so none of it reaches a
|
|
164
|
+
production bundle.
|
|
165
|
+
|
|
166
|
+
## Accessibility
|
|
167
|
+
|
|
168
|
+
Every component is tested against `axe-core` best-practice rules, keyboard
|
|
169
|
+
contracts are asserted key by key, and a prop that is required for
|
|
170
|
+
accessibility is required in the type — `Table.caption`, `Progress.label`,
|
|
171
|
+
`Avatar.alt`, `FloatingIconButton.label`. If it can be forgotten, it will be.
|
|
172
|
+
|
|
173
|
+
Logical properties throughout, so the system is RTL-correct; motion is gated
|
|
174
|
+
behind `prefers-reduced-motion`.
|
|
175
|
+
|
|
176
|
+
## Requirements
|
|
177
|
+
|
|
178
|
+
React 19, Node 24+. ESM only.
|
|
179
|
+
|
|
180
|
+
## Licence
|
|
181
|
+
|
|
182
|
+
MIT © Henry Chen
|
|
183
|
+
|
|
184
|
+
## Website compositions
|
|
185
|
+
|
|
186
|
+
Import page composition families from `@misoto22/folio/website`. They include
|
|
187
|
+
navigation, portfolios, content collections, reading layouts, media browsing,
|
|
188
|
+
contact forms, listening views, metrics, search and conversations. Pass localized
|
|
189
|
+
labels, router link elements and plain view data; keep backend requests, routing
|
|
190
|
+
and authentication in the application.
|
|
191
|
+
|
|
192
|
+
`styles.css` does not include these compositions, so an application that renders
|
|
193
|
+
only the primitives receives none of their rules. Import `website.css` beside it —
|
|
194
|
+
or beside the portable token, semantic, theme and keyframe layers in an
|
|
195
|
+
application that already builds Tailwind, scanning the package's `dist`
|
|
196
|
+
directory. A host whose whole page is a website also imports `website-base.css`,
|
|
197
|
+
which sets the body type, heading and paragraph margins and a site-wide focus
|
|
198
|
+
ring; an application that embeds a composition in its own chrome leaves it out.
|
|
199
|
+
|
|
200
|
+
```tsx
|
|
201
|
+
import '@misoto22/folio/styles.css'
|
|
202
|
+
import '@misoto22/folio/website.css'
|
|
203
|
+
import '@misoto22/folio/website-base.css' // only when the whole page is a website
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
`npx @misoto22/folio docs SiteShell` and `docs SearchPalette` explain the contracts.
|
|
207
|
+
|
|
208
|
+
For metadata and build scripts, `import { BRAND } from '@misoto22/folio/brand'`
|
|
209
|
+
loads the token mirror without loading React components. This data-only entry
|
|
210
|
+
also supports Node's native ESM loading from CommonJS on the supported Node versions.
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* The package's own documentation, for the reader that installed it.
|
|
4
|
+
*
|
|
5
|
+
* A website is the wrong source for an agent writing against a pinned version:
|
|
6
|
+
* it documents whatever shipped last, the agent is holding whatever is in
|
|
7
|
+
* `node_modules`, and neither side can see the disagreement. Everything printed
|
|
8
|
+
* here is generated at build time from the source in the same tarball, so the
|
|
9
|
+
* answer is always about the version actually installed.
|
|
10
|
+
*
|
|
11
|
+
* It is also the cheap half of the deal. `docs --installed` is a few hundred
|
|
12
|
+
* tokens and says what exists; `docs <Component>` is under a thousand and says
|
|
13
|
+
* everything about one of them. The alternative an agent reaches for otherwise
|
|
14
|
+
* is the whole of `llms-full.txt`, which is fifty times that and mostly about
|
|
15
|
+
* components it is not using.
|
|
16
|
+
*/
|
|
17
|
+
import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from 'node:fs'
|
|
18
|
+
import { dirname, join, resolve } from 'node:path'
|
|
19
|
+
import { fileURLToPath } from 'node:url'
|
|
20
|
+
import { migrateLegacySkills, replaceLegacyAgentsBlock } from './migrate-legacy.mjs'
|
|
21
|
+
|
|
22
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
23
|
+
const AGENT = join(ROOT, 'dist', 'agent')
|
|
24
|
+
const SKILL_NAME = 'folio-design'
|
|
25
|
+
const SKILL = join(ROOT, 'skills', SKILL_NAME)
|
|
26
|
+
|
|
27
|
+
const { version } = JSON.parse(readFileSync(join(ROOT, 'package.json'), 'utf8'))
|
|
28
|
+
|
|
29
|
+
const USAGE = `@misoto22/folio ${version}
|
|
30
|
+
|
|
31
|
+
folio-design docs <Component> One component, in full — props, types,
|
|
32
|
+
keyboard, accessibility, examples.
|
|
33
|
+
folio-design docs --list Every component, one line each.
|
|
34
|
+
folio-design docs --installed This package's version and what it ships.
|
|
35
|
+
[--json]
|
|
36
|
+
folio-design init Install the agent skill into this project.
|
|
37
|
+
[--agents-md] Also point AGENTS.md at it.
|
|
38
|
+
[--agent <id>] Write only to one agent's directory:
|
|
39
|
+
"agents" (the shared path) or "claude".
|
|
40
|
+
|
|
41
|
+
Docs on the web: https://ui.misoto22.com`
|
|
42
|
+
|
|
43
|
+
function fail(message) {
|
|
44
|
+
process.stderr.write(`${message}\n`)
|
|
45
|
+
process.exit(1)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** The emitted docs are a build artifact; a source checkout may not have them. */
|
|
49
|
+
function requireBuilt() {
|
|
50
|
+
if (!existsSync(AGENT)) {
|
|
51
|
+
fail(
|
|
52
|
+
'No generated docs found. This package ships them in dist/agent/;\n' +
|
|
53
|
+
'in a source checkout, run `pnpm build:agent` first.',
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function componentNames() {
|
|
59
|
+
return readdirSync(AGENT)
|
|
60
|
+
.filter((file) => file.endsWith('.md') && file !== 'index.md')
|
|
61
|
+
.map((file) => file.replace(/\.md$/, ''))
|
|
62
|
+
.sort()
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function catalog() {
|
|
66
|
+
return JSON.parse(readFileSync(join(AGENT, 'catalog.json'), 'utf8'))
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* What a skill injects at the top of a session: the version in this project and
|
|
71
|
+
* the names it can ask about. Deliberately names-only — the point is that the
|
|
72
|
+
* agent then fetches the one component it needs, rather than being handed all
|
|
73
|
+
* fifty-two prop tables it does not.
|
|
74
|
+
*/
|
|
75
|
+
function installed(asJson) {
|
|
76
|
+
requireBuilt()
|
|
77
|
+
const { groups, components } = catalog()
|
|
78
|
+
if (asJson) {
|
|
79
|
+
const byGroup = Object.fromEntries(
|
|
80
|
+
groups
|
|
81
|
+
.map((group) => [group, components.filter((c) => c.group === group).map((c) => c.name)])
|
|
82
|
+
.filter(([, names]) => names.length > 0),
|
|
83
|
+
)
|
|
84
|
+
process.stdout.write(
|
|
85
|
+
`${JSON.stringify(
|
|
86
|
+
{
|
|
87
|
+
package: '@misoto22/folio',
|
|
88
|
+
version,
|
|
89
|
+
components: byGroup,
|
|
90
|
+
styles: [
|
|
91
|
+
'@misoto22/folio/styles.css',
|
|
92
|
+
'@misoto22/folio/tokens.css',
|
|
93
|
+
'@misoto22/folio/semantic.css',
|
|
94
|
+
'@misoto22/folio/keyframes.css',
|
|
95
|
+
],
|
|
96
|
+
detail: 'npx @misoto22/folio docs <Component>',
|
|
97
|
+
},
|
|
98
|
+
null,
|
|
99
|
+
2,
|
|
100
|
+
)}\n`,
|
|
101
|
+
)
|
|
102
|
+
return
|
|
103
|
+
}
|
|
104
|
+
const lines = [`@misoto22/folio ${version} — ${components.length} components`, '']
|
|
105
|
+
for (const group of groups) {
|
|
106
|
+
const names = components.filter((c) => c.group === group).map((c) => c.name)
|
|
107
|
+
if (names.length > 0) lines.push(`${group}: ${names.join(', ')}`)
|
|
108
|
+
}
|
|
109
|
+
lines.push('', 'One in full: npx @misoto22/folio docs <Component>')
|
|
110
|
+
process.stdout.write(`${lines.join('\n')}\n`)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function docs(args) {
|
|
114
|
+
if (args.includes('--installed')) return installed(args.includes('--json'))
|
|
115
|
+
requireBuilt()
|
|
116
|
+
if (args.includes('--list')) {
|
|
117
|
+
process.stdout.write(readFileSync(join(AGENT, 'index.md'), 'utf8'))
|
|
118
|
+
return
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const name = args.find((arg) => !arg.startsWith('-'))
|
|
122
|
+
if (!name) fail(`Which component? Try one of:\n\n ${componentNames().join(', ')}`)
|
|
123
|
+
|
|
124
|
+
// What the caller holds is usually the identifier it just failed to import —
|
|
125
|
+
// a part (`CardBody`, `TH`) or a type (`ButtonVariant`) rather than the
|
|
126
|
+
// component that owns it. Resolve those rather than making it guess again.
|
|
127
|
+
const owner = catalog().exports?.[name]
|
|
128
|
+
const file = join(AGENT, `${owner ?? name}.md`)
|
|
129
|
+
if (existsSync(file)) {
|
|
130
|
+
if (owner && owner !== name) {
|
|
131
|
+
process.stderr.write(`\`${name}\` is part of ${owner}.\n`)
|
|
132
|
+
}
|
|
133
|
+
process.stdout.write(readFileSync(file, 'utf8'))
|
|
134
|
+
return
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// A miss is usually a near miss — a habit from another library, or a part
|
|
138
|
+
// name rather than the component that owns it. Say what exists instead.
|
|
139
|
+
const wanted = name.toLowerCase()
|
|
140
|
+
const near = componentNames().filter(
|
|
141
|
+
(candidate) =>
|
|
142
|
+
candidate.toLowerCase().startsWith(wanted.slice(0, 3)) ||
|
|
143
|
+
wanted.startsWith(candidate.toLowerCase()),
|
|
144
|
+
)
|
|
145
|
+
fail(
|
|
146
|
+
near.length > 0
|
|
147
|
+
? `No component named "${name}". Did you mean: ${near.join(', ')}?`
|
|
148
|
+
: `No component named "${name}". Run \`folio-design docs --list\` for all ${componentNames().length}.`,
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const AGENTS_BLOCK = `
|
|
153
|
+
## @misoto22/folio
|
|
154
|
+
|
|
155
|
+
UI comes from \`@misoto22/folio\`. Read \`SKILL.md\` in the installed skill
|
|
156
|
+
directory before writing components against it — the names diverge from
|
|
157
|
+
shadcn/ui in several places, and colour is never written as a raw class.
|
|
158
|
+
|
|
159
|
+
- One component in full: \`npx @misoto22/folio docs <Component>\`
|
|
160
|
+
- Everything it ships: \`npx @misoto22/folio docs --installed\`
|
|
161
|
+
`
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Where a skill goes, for the agents worth covering directly.
|
|
165
|
+
*
|
|
166
|
+
* `.agents/skills/` is the shared path — Codex, Cursor, GitHub Copilot, Gemini
|
|
167
|
+
* CLI, OpenCode, Cline, Zed, Warp, Amp and Replit all read it — and Claude Code
|
|
168
|
+
* is the one common agent with its own. Writing only to `.claude/` handed every
|
|
169
|
+
* other agent nothing, which was the bug.
|
|
170
|
+
*
|
|
171
|
+
* Deliberately two entries rather than the whole ecosystem. `npx skills` tracks
|
|
172
|
+
* around seventy directories and is one command away; a copy of that table kept
|
|
173
|
+
* here would be stale within a release, and this package's own rules are about
|
|
174
|
+
* not keeping copies of things that move.
|
|
175
|
+
*/
|
|
176
|
+
const AGENT_DIRS = {
|
|
177
|
+
agents: '.agents/skills',
|
|
178
|
+
claude: '.claude/skills',
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Which directories to write, given the flags and what the project already has.
|
|
183
|
+
*
|
|
184
|
+
* The shared path is unconditional — it is the one an unknown agent is most
|
|
185
|
+
* likely to read. Claude's is added when the project already has a `.claude/`,
|
|
186
|
+
* so a project that does not use it does not grow a directory it will never
|
|
187
|
+
* open.
|
|
188
|
+
*/
|
|
189
|
+
function initTargets(args) {
|
|
190
|
+
const wanted = args[args.indexOf('--agent') + 1]
|
|
191
|
+
if (args.includes('--agent')) {
|
|
192
|
+
if (!wanted || !AGENT_DIRS[wanted]) {
|
|
193
|
+
fail(
|
|
194
|
+
`Unknown --agent "${wanted ?? ''}". Known: ${Object.keys(AGENT_DIRS).join(', ')}.\n` +
|
|
195
|
+
'For any other agent, `npx skills add Misoto22/folio` covers ~70 of them.',
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
return [AGENT_DIRS[wanted]]
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const targets = [AGENT_DIRS.agents]
|
|
202
|
+
if (existsSync(join(process.cwd(), '.claude'))) targets.push(AGENT_DIRS.claude)
|
|
203
|
+
return targets
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function init(args) {
|
|
207
|
+
if (!existsSync(SKILL)) fail('This build has no skills/ directory.')
|
|
208
|
+
|
|
209
|
+
const cwd = process.cwd()
|
|
210
|
+
const requested = initTargets(args)
|
|
211
|
+
// A directory that held the pre-rename skill is written whatever the flags
|
|
212
|
+
// say: the migration moved the old copy to the new name, and it still holds
|
|
213
|
+
// the old content until it is refreshed here.
|
|
214
|
+
const migrated = migrateLegacySkills(cwd, Object.values(AGENT_DIRS), SKILL_NAME)
|
|
215
|
+
const written = migrated.map(({ from, to }) => ` migrated ${resolve(from)} -> ${resolve(to)}`)
|
|
216
|
+
for (const dir of new Set([...requested, ...migrated.map((entry) => entry.dir)])) {
|
|
217
|
+
const target = join(cwd, dir, SKILL_NAME)
|
|
218
|
+
const existed = existsSync(target)
|
|
219
|
+
mkdirSync(dirname(target), { recursive: true })
|
|
220
|
+
cpSync(SKILL, target, { recursive: true })
|
|
221
|
+
written.push(` ${existed ? 'updated' : 'installed'} ${resolve(target)}`)
|
|
222
|
+
}
|
|
223
|
+
process.stdout.write(`${written.join('\n')}\n`)
|
|
224
|
+
pointAgentsMd(cwd, args)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Append the AGENTS.md section when asked, and replace the pre-rename one
|
|
229
|
+
* whether asked or not — it names a bin this package no longer ships, so
|
|
230
|
+
* leaving it is leaving an instruction that fails.
|
|
231
|
+
*/
|
|
232
|
+
function pointAgentsMd(cwd, args) {
|
|
233
|
+
const agentsFile = join(cwd, 'AGENTS.md')
|
|
234
|
+
const existing = existsSync(agentsFile) ? readFileSync(agentsFile, 'utf8') : null
|
|
235
|
+
if (existing !== null) {
|
|
236
|
+
const rewritten = replaceLegacyAgentsBlock(existing, AGENTS_BLOCK)
|
|
237
|
+
if (rewritten !== existing) {
|
|
238
|
+
writeFileSync(agentsFile, rewritten)
|
|
239
|
+
process.stdout.write(`Replaced the pre-rename section in ${resolve(agentsFile)}\n`)
|
|
240
|
+
return
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (!args.includes('--agents-md')) {
|
|
245
|
+
process.stdout.write('Pass --agents-md to also point AGENTS.md at it.\n')
|
|
246
|
+
return
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const current = existing ?? '# AGENTS.md\n'
|
|
250
|
+
if (current.includes('@misoto22/folio')) {
|
|
251
|
+
process.stdout.write('AGENTS.md already mentions the package; left alone.\n')
|
|
252
|
+
return
|
|
253
|
+
}
|
|
254
|
+
writeFileSync(agentsFile, `${current.trimEnd()}\n${AGENTS_BLOCK}`)
|
|
255
|
+
process.stdout.write(`Appended a section to ${resolve(agentsFile)}\n`)
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const [command, ...args] = process.argv.slice(2)
|
|
259
|
+
switch (command) {
|
|
260
|
+
case 'docs':
|
|
261
|
+
docs(args)
|
|
262
|
+
break
|
|
263
|
+
case 'init':
|
|
264
|
+
init(args)
|
|
265
|
+
break
|
|
266
|
+
case undefined:
|
|
267
|
+
case '--help':
|
|
268
|
+
case '-h':
|
|
269
|
+
process.stdout.write(`${USAGE}\n`)
|
|
270
|
+
break
|
|
271
|
+
case '--version':
|
|
272
|
+
case '-v':
|
|
273
|
+
process.stdout.write(`${version}\n`)
|
|
274
|
+
break
|
|
275
|
+
default:
|
|
276
|
+
fail(`Unknown command "${command}".\n\n${USAGE}`)
|
|
277
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What `init` cleans up from before the Folio rename.
|
|
3
|
+
*
|
|
4
|
+
* Up to 0.15.0 this package was `@misoto22/design`: `init` installed its skill
|
|
5
|
+
* as `misoto22-design`, and `--agents-md` appended a section naming that bin. A
|
|
6
|
+
* project upgraded to `@misoto22/folio` would otherwise keep the old copy next
|
|
7
|
+
* to the new one — two skills describing one package, the older one telling an
|
|
8
|
+
* agent to run a command the package no longer ships.
|
|
9
|
+
*
|
|
10
|
+
* The old names below are literal ON PURPOSE. The rename codemod skips this file
|
|
11
|
+
* and its guard test (`src/__tests__/bin-init.test.ts`): rewritten to the new
|
|
12
|
+
* names, the migration would look for the new skill and migrate nothing.
|
|
13
|
+
*/
|
|
14
|
+
import { existsSync, readFileSync, renameSync, rmSync } from 'node:fs'
|
|
15
|
+
import { join } from 'node:path'
|
|
16
|
+
|
|
17
|
+
/** The skill's directory and frontmatter name before the rename. */
|
|
18
|
+
export const LEGACY_SKILL_NAME = 'misoto22-design'
|
|
19
|
+
|
|
20
|
+
/** The section `init --agents-md` appended to AGENTS.md before the rename, verbatim. */
|
|
21
|
+
export const LEGACY_AGENTS_BLOCK = `
|
|
22
|
+
## @misoto22/design
|
|
23
|
+
|
|
24
|
+
UI comes from \`@misoto22/design\`. Read \`SKILL.md\` in the installed skill
|
|
25
|
+
directory before writing components against it — the names diverge from
|
|
26
|
+
shadcn/ui in several places, and colour is never written as a raw class.
|
|
27
|
+
|
|
28
|
+
- One component in full: \`npx misoto22-design docs <Component>\`
|
|
29
|
+
- Everything it ships: \`npx misoto22-design docs --installed\`
|
|
30
|
+
`
|
|
31
|
+
|
|
32
|
+
const LEGACY_NAME_LINE = new RegExp(`^name:\\s*['"]?${LEGACY_SKILL_NAME}['"]?\\s*$`, 'm')
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Whether `dir` holds the old skill, judged by the name in its frontmatter
|
|
36
|
+
* rather than by the directory name — a directory someone else called
|
|
37
|
+
* `misoto22-design` is not ours to move.
|
|
38
|
+
*/
|
|
39
|
+
export function isLegacySkill(dir) {
|
|
40
|
+
const file = join(dir, 'SKILL.md')
|
|
41
|
+
if (!existsSync(file)) return false
|
|
42
|
+
const frontmatter = /^---\r?\n([\s\S]*?)\r?\n---/.exec(readFileSync(file, 'utf8'))
|
|
43
|
+
return Boolean(frontmatter && LEGACY_NAME_LINE.test(frontmatter[1]))
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Move the old skill in each agent directory to `skillName`.
|
|
48
|
+
*
|
|
49
|
+
* Renamed rather than deleted when nothing sits at the new path, so anything a
|
|
50
|
+
* project added beside the skill survives. When the new skill is already there
|
|
51
|
+
* the old copy is only a duplicate, and is removed.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} cwd the project root
|
|
54
|
+
* @param {string[]} agentDirs skill directories relative to it, e.g. `.claude/skills`
|
|
55
|
+
* @param {string} skillName the skill's current directory name
|
|
56
|
+
* @returns {{ dir: string, from: string, to: string }[]} one entry per directory migrated
|
|
57
|
+
*/
|
|
58
|
+
export function migrateLegacySkills(cwd, agentDirs, skillName) {
|
|
59
|
+
const migrated = []
|
|
60
|
+
for (const dir of agentDirs) {
|
|
61
|
+
const from = join(cwd, dir, LEGACY_SKILL_NAME)
|
|
62
|
+
if (!isLegacySkill(from)) continue
|
|
63
|
+
const to = join(cwd, dir, skillName)
|
|
64
|
+
if (existsSync(to)) rmSync(from, { recursive: true, force: true })
|
|
65
|
+
else renameSync(from, to)
|
|
66
|
+
migrated.push({ dir, from, to })
|
|
67
|
+
}
|
|
68
|
+
return migrated
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* `text` with the old AGENTS.md section replaced by `block`.
|
|
73
|
+
*
|
|
74
|
+
* Only the exact section `init` wrote is replaced: a hand-edited one is the
|
|
75
|
+
* project's own prose, and is returned unchanged along with everything else.
|
|
76
|
+
*/
|
|
77
|
+
export function replaceLegacyAgentsBlock(text, block) {
|
|
78
|
+
const legacy = LEGACY_AGENTS_BLOCK.trim()
|
|
79
|
+
if (!text.includes(legacy)) return text
|
|
80
|
+
return text.replace(legacy, () => block.trim())
|
|
81
|
+
}
|