@signal9/era-ui 1.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/dist/dev/audit/audits/_helpers.d.ts +5 -0
- package/dist/dev/audit/audits/_helpers.js +11 -0
- package/dist/dev/audit/audits/concentric-inset.d.ts +2 -0
- package/dist/dev/audit/audits/concentric-inset.js +33 -0
- package/dist/dev/audit/audits/index.d.ts +4 -0
- package/dist/dev/audit/audits/index.js +9 -0
- package/dist/dev/audit/audits/uniform-sibling-gaps.d.ts +2 -0
- package/dist/dev/audit/audits/uniform-sibling-gaps.js +29 -0
- package/dist/dev/audit/audits/wall-matches-gap.d.ts +2 -0
- package/dist/dev/audit/audits/wall-matches-gap.js +30 -0
- package/dist/dev/audit/index.d.ts +4 -0
- package/dist/dev/audit/index.js +3 -0
- package/dist/dev/audit/registry.d.ts +13 -0
- package/dist/dev/audit/registry.js +50 -0
- package/dist/dev/audit/runner.d.ts +3 -0
- package/dist/dev/audit/runner.js +27 -0
- package/dist/dev/audit/types.d.ts +28 -0
- package/dist/dev/audit/types.js +7 -0
- package/dist/dev/audit-overlay.svelte +125 -0
- package/dist/dev/audit-overlay.svelte.d.ts +9 -0
- package/dist/dev/index.d.ts +2 -0
- package/dist/dev/index.js +2 -0
- package/dist/docs/badge.md +18 -0
- package/dist/docs/bits-ui-audit.md +58 -0
- package/dist/docs/button.md +18 -0
- package/dist/docs/chip.md +20 -0
- package/dist/docs/component-docs-core.d.ts +8 -0
- package/dist/docs/component-docs-core.js +72 -0
- package/dist/docs/component-docs.d.ts +2 -0
- package/dist/docs/component-docs.js +25 -0
- package/dist/docs/component-source-scanners.d.ts +18 -0
- package/dist/docs/component-source-scanners.js +46 -0
- package/dist/docs/extract-props.d.ts +13 -0
- package/dist/docs/extract-props.js +324 -0
- package/dist/docs/generated-docs.d.ts +4 -0
- package/dist/docs/generated-docs.js +23 -0
- package/dist/docs/index.d.ts +5 -0
- package/dist/docs/index.js +62 -0
- package/dist/docs/llms-txt.d.ts +2 -0
- package/dist/docs/llms-txt.js +84 -0
- package/dist/docs/quickstart.md +43 -0
- package/dist/docs/separator.md +20 -0
- package/dist/docs/table.md +35 -0
- package/dist/era-ui.css +2 -0
- package/dist/generated-docs/accordion.md +57 -0
- package/dist/generated-docs/alert-dialog.md +81 -0
- package/dist/generated-docs/aspect-ratio.md +17 -0
- package/dist/generated-docs/avatar.md +39 -0
- package/dist/generated-docs/badge.md +38 -0
- package/dist/generated-docs/bar.md +19 -0
- package/dist/generated-docs/button-group.md +19 -0
- package/dist/generated-docs/button.md +46 -0
- package/dist/generated-docs/calendar.md +126 -0
- package/dist/generated-docs/card.md +26 -0
- package/dist/generated-docs/checkbox.md +42 -0
- package/dist/generated-docs/chip.md +40 -0
- package/dist/generated-docs/code-block.md +20 -0
- package/dist/generated-docs/collapsible.md +30 -0
- package/dist/generated-docs/combobox.md +74 -0
- package/dist/generated-docs/command.md +123 -0
- package/dist/generated-docs/context-menu.md +94 -0
- package/dist/generated-docs/date-field.md +49 -0
- package/dist/generated-docs/date-picker.md +180 -0
- package/dist/generated-docs/date-range-field.md +50 -0
- package/dist/generated-docs/date-range-picker.md +180 -0
- package/dist/generated-docs/dialog.md +70 -0
- package/dist/generated-docs/draggable.md +3 -0
- package/dist/generated-docs/dropdown-menu.md +94 -0
- package/dist/generated-docs/file-upload.md +18 -0
- package/dist/generated-docs/input.md +18 -0
- package/dist/generated-docs/kv.md +20 -0
- package/dist/generated-docs/label.md +17 -0
- package/dist/generated-docs/link-preview.md +30 -0
- package/dist/generated-docs/llms-full.txt +3104 -0
- package/dist/generated-docs/llms.txt +34 -0
- package/dist/generated-docs/manifest.json +812 -0
- package/dist/generated-docs/menu.md +11 -0
- package/dist/generated-docs/menubar.md +103 -0
- package/dist/generated-docs/meter.md +17 -0
- package/dist/generated-docs/mode.md +24 -0
- package/dist/generated-docs/navigation-menu.md +11 -0
- package/dist/generated-docs/pagination.md +55 -0
- package/dist/generated-docs/pane.md +30 -0
- package/dist/generated-docs/pin-input.md +31 -0
- package/dist/generated-docs/popover.md +43 -0
- package/dist/generated-docs/progress.md +17 -0
- package/dist/generated-docs/quickstart.md +47 -0
- package/dist/generated-docs/radio-group.md +31 -0
- package/dist/generated-docs/range-calendar.md +11 -0
- package/dist/generated-docs/rating-group.md +31 -0
- package/dist/generated-docs/scroll-area.md +57 -0
- package/dist/generated-docs/select.md +49 -0
- package/dist/generated-docs/separator.md +39 -0
- package/dist/generated-docs/sheet.md +11 -0
- package/dist/generated-docs/skeleton.md +18 -0
- package/dist/generated-docs/slider.md +71 -0
- package/dist/generated-docs/surfaces.md +3 -0
- package/dist/generated-docs/switch.md +18 -0
- package/dist/generated-docs/table.md +113 -0
- package/dist/generated-docs/tabs.md +48 -0
- package/dist/generated-docs/time-field.md +49 -0
- package/dist/generated-docs/time-range-field.md +50 -0
- package/dist/generated-docs/toggle-group.md +30 -0
- package/dist/generated-docs/toggle.md +20 -0
- package/dist/generated-docs/toolbar.md +11 -0
- package/dist/generated-docs/tooltip.md +30 -0
- package/dist/generated-docs/video-player.md +73 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/styles/density.css +274 -0
- package/dist/styles/index.css +77 -0
- package/dist/styles/motion.css +56 -0
- package/dist/styles/surfaces/base.css +103 -0
- package/dist/styles/surfaces/bevel.css +71 -0
- package/dist/styles/surfaces/cartoon.css +27 -0
- package/dist/styles/surfaces/glass.css +127 -0
- package/dist/styles/themes.css +351 -0
- package/dist/styles/typography.css +28 -0
- package/dist/ui/accordion/accordion-content.svelte +15 -0
- package/dist/ui/accordion/accordion-content.svelte.d.ts +4 -0
- package/dist/ui/accordion/accordion-header.svelte +8 -0
- package/dist/ui/accordion/accordion-header.svelte.d.ts +4 -0
- package/dist/ui/accordion/accordion-item.svelte +12 -0
- package/dist/ui/accordion/accordion-item.svelte.d.ts +4 -0
- package/dist/ui/accordion/accordion-trigger.svelte +24 -0
- package/dist/ui/accordion/accordion-trigger.svelte.d.ts +5 -0
- package/dist/ui/accordion/accordion.svelte +8 -0
- package/dist/ui/accordion/accordion.svelte.d.ts +4 -0
- package/dist/ui/accordion/index.d.ts +5 -0
- package/dist/ui/accordion/index.js +5 -0
- package/dist/ui/alert-dialog/alert-dialog-action.svelte +41 -0
- package/dist/ui/alert-dialog/alert-dialog-action.svelte.d.ts +9 -0
- package/dist/ui/alert-dialog/alert-dialog-cancel.svelte +39 -0
- package/dist/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +9 -0
- package/dist/ui/alert-dialog/alert-dialog-content.svelte +25 -0
- package/dist/ui/alert-dialog/alert-dialog-content.svelte.d.ts +4 -0
- package/dist/ui/alert-dialog/alert-dialog-description.svelte +16 -0
- package/dist/ui/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
- package/dist/ui/alert-dialog/alert-dialog-overlay.svelte +16 -0
- package/dist/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
- package/dist/ui/alert-dialog/alert-dialog-title.svelte +12 -0
- package/dist/ui/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
- package/dist/ui/alert-dialog/alert-dialog-trigger.svelte +28 -0
- package/dist/ui/alert-dialog/alert-dialog-trigger.svelte.d.ts +9 -0
- package/dist/ui/alert-dialog/index.d.ts +10 -0
- package/dist/ui/alert-dialog/index.js +10 -0
- package/dist/ui/aspect-ratio/aspect-ratio.svelte +19 -0
- package/dist/ui/aspect-ratio/aspect-ratio.svelte.d.ts +5 -0
- package/dist/ui/aspect-ratio/index.d.ts +1 -0
- package/dist/ui/aspect-ratio/index.js +1 -0
- package/dist/ui/avatar/avatar-fallback.svelte +22 -0
- package/dist/ui/avatar/avatar-fallback.svelte.d.ts +5 -0
- package/dist/ui/avatar/avatar-image.svelte +8 -0
- package/dist/ui/avatar/avatar-image.svelte.d.ts +4 -0
- package/dist/ui/avatar/avatar-root.svelte +22 -0
- package/dist/ui/avatar/avatar-root.svelte.d.ts +5 -0
- package/dist/ui/avatar/index.d.ts +3 -0
- package/dist/ui/avatar/index.js +3 -0
- package/dist/ui/badge/badge.svelte +40 -0
- package/dist/ui/badge/badge.svelte.d.ts +32 -0
- package/dist/ui/badge/index.d.ts +1 -0
- package/dist/ui/badge/index.js +1 -0
- package/dist/ui/bar/bar.svelte +45 -0
- package/dist/ui/bar/bar.svelte.d.ts +30 -0
- package/dist/ui/bar/index.d.ts +1 -0
- package/dist/ui/bar/index.js +1 -0
- package/dist/ui/button/button.svelte +53 -0
- package/dist/ui/button/button.svelte.d.ts +21 -0
- package/dist/ui/button/index.d.ts +12 -0
- package/dist/ui/button/index.js +3 -0
- package/dist/ui/button/variants.d.ts +70 -0
- package/dist/ui/button/variants.js +97 -0
- package/dist/ui/button-group/button-group.svelte +31 -0
- package/dist/ui/button-group/button-group.svelte.d.ts +10 -0
- package/dist/ui/button-group/index.d.ts +1 -0
- package/dist/ui/button-group/index.js +1 -0
- package/dist/ui/calendar/calendar-cell.svelte +8 -0
- package/dist/ui/calendar/calendar-cell.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-day.svelte +15 -0
- package/dist/ui/calendar/calendar-day.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-grid-body.svelte +7 -0
- package/dist/ui/calendar/calendar-grid-body.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-grid-head.svelte +7 -0
- package/dist/ui/calendar/calendar-grid-head.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-grid-row.svelte +8 -0
- package/dist/ui/calendar/calendar-grid-row.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-grid.svelte +8 -0
- package/dist/ui/calendar/calendar-grid.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-head-cell.svelte +15 -0
- package/dist/ui/calendar/calendar-head-cell.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-header.svelte +12 -0
- package/dist/ui/calendar/calendar-header.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-heading.svelte +8 -0
- package/dist/ui/calendar/calendar-heading.svelte.d.ts +4 -0
- package/dist/ui/calendar/calendar-next-button.svelte +30 -0
- package/dist/ui/calendar/calendar-next-button.svelte.d.ts +9 -0
- package/dist/ui/calendar/calendar-prev-button.svelte +30 -0
- package/dist/ui/calendar/calendar-prev-button.svelte.d.ts +9 -0
- package/dist/ui/calendar/calendar-root.svelte +30 -0
- package/dist/ui/calendar/calendar-root.svelte.d.ts +4 -0
- package/dist/ui/calendar/index.d.ts +12 -0
- package/dist/ui/calendar/index.js +12 -0
- package/dist/ui/card/card.svelte +159 -0
- package/dist/ui/card/card.svelte.d.ts +63 -0
- package/dist/ui/card/index.d.ts +1 -0
- package/dist/ui/card/index.js +1 -0
- package/dist/ui/checkbox/checkbox-group-label.svelte +12 -0
- package/dist/ui/checkbox/checkbox-group-label.svelte.d.ts +4 -0
- package/dist/ui/checkbox/checkbox-group.svelte +18 -0
- package/dist/ui/checkbox/checkbox-group.svelte.d.ts +4 -0
- package/dist/ui/checkbox/checkbox.svelte +33 -0
- package/dist/ui/checkbox/checkbox.svelte.d.ts +4 -0
- package/dist/ui/checkbox/index.d.ts +3 -0
- package/dist/ui/checkbox/index.js +3 -0
- package/dist/ui/chip/chip.svelte +66 -0
- package/dist/ui/chip/chip.svelte.d.ts +26 -0
- package/dist/ui/chip/index.d.ts +1 -0
- package/dist/ui/chip/index.js +1 -0
- package/dist/ui/code-block/code-block.svelte +58 -0
- package/dist/ui/code-block/code-block.svelte.d.ts +11 -0
- package/dist/ui/code-block/index.d.ts +1 -0
- package/dist/ui/code-block/index.js +1 -0
- package/dist/ui/collapsible/collapsible-content.svelte +15 -0
- package/dist/ui/collapsible/collapsible-content.svelte.d.ts +5 -0
- package/dist/ui/collapsible/collapsible-trigger.svelte +22 -0
- package/dist/ui/collapsible/collapsible-trigger.svelte.d.ts +5 -0
- package/dist/ui/collapsible/index.d.ts +4 -0
- package/dist/ui/collapsible/index.js +4 -0
- package/dist/ui/combobox/combobox-content.svelte +25 -0
- package/dist/ui/combobox/combobox-content.svelte.d.ts +5 -0
- package/dist/ui/combobox/combobox-empty.svelte +22 -0
- package/dist/ui/combobox/combobox-empty.svelte.d.ts +8 -0
- package/dist/ui/combobox/combobox-group-heading.svelte +19 -0
- package/dist/ui/combobox/combobox-group-heading.svelte.d.ts +5 -0
- package/dist/ui/combobox/combobox-group.svelte +8 -0
- package/dist/ui/combobox/combobox-group.svelte.d.ts +4 -0
- package/dist/ui/combobox/combobox-input.svelte +15 -0
- package/dist/ui/combobox/combobox-input.svelte.d.ts +4 -0
- package/dist/ui/combobox/combobox-item.svelte +17 -0
- package/dist/ui/combobox/combobox-item.svelte.d.ts +4 -0
- package/dist/ui/combobox/combobox-trigger.svelte +27 -0
- package/dist/ui/combobox/combobox-trigger.svelte.d.ts +5 -0
- package/dist/ui/combobox/index.d.ts +10 -0
- package/dist/ui/combobox/index.js +10 -0
- package/dist/ui/command/command-empty.svelte +15 -0
- package/dist/ui/command/command-empty.svelte.d.ts +4 -0
- package/dist/ui/command/command-group-heading.svelte +16 -0
- package/dist/ui/command/command-group-heading.svelte.d.ts +4 -0
- package/dist/ui/command/command-group-items.svelte +12 -0
- package/dist/ui/command/command-group-items.svelte.d.ts +4 -0
- package/dist/ui/command/command-group.svelte +7 -0
- package/dist/ui/command/command-group.svelte.d.ts +4 -0
- package/dist/ui/command/command-input.svelte +45 -0
- package/dist/ui/command/command-input.svelte.d.ts +10 -0
- package/dist/ui/command/command-item.svelte +15 -0
- package/dist/ui/command/command-item.svelte.d.ts +4 -0
- package/dist/ui/command/command-link-item.svelte +15 -0
- package/dist/ui/command/command-link-item.svelte.d.ts +4 -0
- package/dist/ui/command/command-list.svelte +12 -0
- package/dist/ui/command/command-list.svelte.d.ts +4 -0
- package/dist/ui/command/command-loading.svelte +15 -0
- package/dist/ui/command/command-loading.svelte.d.ts +4 -0
- package/dist/ui/command/command-root.svelte +21 -0
- package/dist/ui/command/command-root.svelte.d.ts +4 -0
- package/dist/ui/command/command-separator.svelte +12 -0
- package/dist/ui/command/command-separator.svelte.d.ts +4 -0
- package/dist/ui/command/command-viewport.svelte +8 -0
- package/dist/ui/command/command-viewport.svelte.d.ts +4 -0
- package/dist/ui/command/index.d.ts +12 -0
- package/dist/ui/command/index.js +12 -0
- package/dist/ui/context-menu/context-menu-checkbox-item.svelte +21 -0
- package/dist/ui/context-menu/context-menu-checkbox-item.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-content.svelte +27 -0
- package/dist/ui/context-menu/context-menu-content.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-group-heading.svelte +16 -0
- package/dist/ui/context-menu/context-menu-group-heading.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-item.svelte +22 -0
- package/dist/ui/context-menu/context-menu-item.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-radio-item.svelte +19 -0
- package/dist/ui/context-menu/context-menu-radio-item.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-separator.svelte +16 -0
- package/dist/ui/context-menu/context-menu-separator.svelte.d.ts +4 -0
- package/dist/ui/context-menu/context-menu-sub-content.svelte +26 -0
- package/dist/ui/context-menu/context-menu-sub-content.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-sub-trigger.svelte +24 -0
- package/dist/ui/context-menu/context-menu-sub-trigger.svelte.d.ts +5 -0
- package/dist/ui/context-menu/context-menu-trigger.svelte +12 -0
- package/dist/ui/context-menu/context-menu-trigger.svelte.d.ts +4 -0
- package/dist/ui/context-menu/index.d.ts +14 -0
- package/dist/ui/context-menu/index.js +14 -0
- package/dist/ui/date-field/date-field-input.svelte +15 -0
- package/dist/ui/date-field/date-field-input.svelte.d.ts +4 -0
- package/dist/ui/date-field/date-field-label.svelte +8 -0
- package/dist/ui/date-field/date-field-label.svelte.d.ts +4 -0
- package/dist/ui/date-field/date-field-root.svelte +11 -0
- package/dist/ui/date-field/date-field-root.svelte.d.ts +3 -0
- package/dist/ui/date-field/date-field-segment.svelte +15 -0
- package/dist/ui/date-field/date-field-segment.svelte.d.ts +4 -0
- package/dist/ui/date-field/index.d.ts +4 -0
- package/dist/ui/date-field/index.js +4 -0
- package/dist/ui/date-picker/date-picker-calendar.svelte +16 -0
- package/dist/ui/date-picker/date-picker-calendar.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-cell.svelte +8 -0
- package/dist/ui/date-picker/date-picker-cell.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-content.svelte +25 -0
- package/dist/ui/date-picker/date-picker-content.svelte.d.ts +5 -0
- package/dist/ui/date-picker/date-picker-day.svelte +15 -0
- package/dist/ui/date-picker/date-picker-day.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-grid-body.svelte +11 -0
- package/dist/ui/date-picker/date-picker-grid-body.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-grid-head.svelte +11 -0
- package/dist/ui/date-picker/date-picker-grid-head.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-grid-row.svelte +8 -0
- package/dist/ui/date-picker/date-picker-grid-row.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-grid.svelte +8 -0
- package/dist/ui/date-picker/date-picker-grid.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-head-cell.svelte +19 -0
- package/dist/ui/date-picker/date-picker-head-cell.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-header.svelte +12 -0
- package/dist/ui/date-picker/date-picker-header.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-heading.svelte +12 -0
- package/dist/ui/date-picker/date-picker-heading.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-input.svelte +15 -0
- package/dist/ui/date-picker/date-picker-input.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-label.svelte +8 -0
- package/dist/ui/date-picker/date-picker-label.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-next-button.svelte +30 -0
- package/dist/ui/date-picker/date-picker-next-button.svelte.d.ts +9 -0
- package/dist/ui/date-picker/date-picker-prev-button.svelte +30 -0
- package/dist/ui/date-picker/date-picker-prev-button.svelte.d.ts +9 -0
- package/dist/ui/date-picker/date-picker-root.svelte +19 -0
- package/dist/ui/date-picker/date-picker-root.svelte.d.ts +3 -0
- package/dist/ui/date-picker/date-picker-segment.svelte +15 -0
- package/dist/ui/date-picker/date-picker-segment.svelte.d.ts +4 -0
- package/dist/ui/date-picker/date-picker-trigger.svelte +27 -0
- package/dist/ui/date-picker/date-picker-trigger.svelte.d.ts +5 -0
- package/dist/ui/date-picker/index.d.ts +18 -0
- package/dist/ui/date-picker/index.js +18 -0
- package/dist/ui/date-range-field/date-range-field-input.svelte +19 -0
- package/dist/ui/date-range-field/date-range-field-input.svelte.d.ts +4 -0
- package/dist/ui/date-range-field/date-range-field-label.svelte +12 -0
- package/dist/ui/date-range-field/date-range-field-label.svelte.d.ts +4 -0
- package/dist/ui/date-range-field/date-range-field-root.svelte +13 -0
- package/dist/ui/date-range-field/date-range-field-root.svelte.d.ts +4 -0
- package/dist/ui/date-range-field/date-range-field-segment.svelte +19 -0
- package/dist/ui/date-range-field/date-range-field-segment.svelte.d.ts +3 -0
- package/dist/ui/date-range-field/index.d.ts +4 -0
- package/dist/ui/date-range-field/index.js +4 -0
- package/dist/ui/date-range-picker/date-range-picker-calendar.svelte +16 -0
- package/dist/ui/date-range-picker/date-range-picker-calendar.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-cell.svelte +12 -0
- package/dist/ui/date-range-picker/date-range-picker-cell.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-content.svelte +25 -0
- package/dist/ui/date-range-picker/date-range-picker-content.svelte.d.ts +5 -0
- package/dist/ui/date-range-picker/date-range-picker-day.svelte +19 -0
- package/dist/ui/date-range-picker/date-range-picker-day.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-body.svelte +12 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-body.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-head.svelte +12 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-head.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-row.svelte +12 -0
- package/dist/ui/date-range-picker/date-range-picker-grid-row.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-grid.svelte +16 -0
- package/dist/ui/date-range-picker/date-range-picker-grid.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-head-cell.svelte +19 -0
- package/dist/ui/date-range-picker/date-range-picker-head-cell.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-header.svelte +16 -0
- package/dist/ui/date-range-picker/date-range-picker-header.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-heading.svelte +16 -0
- package/dist/ui/date-range-picker/date-range-picker-heading.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-input.svelte +19 -0
- package/dist/ui/date-range-picker/date-range-picker-input.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-label.svelte +12 -0
- package/dist/ui/date-range-picker/date-range-picker-label.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-next-button.svelte +30 -0
- package/dist/ui/date-range-picker/date-range-picker-next-button.svelte.d.ts +9 -0
- package/dist/ui/date-range-picker/date-range-picker-prev-button.svelte +30 -0
- package/dist/ui/date-range-picker/date-range-picker-prev-button.svelte.d.ts +9 -0
- package/dist/ui/date-range-picker/date-range-picker-root.svelte +19 -0
- package/dist/ui/date-range-picker/date-range-picker-root.svelte.d.ts +4 -0
- package/dist/ui/date-range-picker/date-range-picker-segment.svelte +19 -0
- package/dist/ui/date-range-picker/date-range-picker-segment.svelte.d.ts +3 -0
- package/dist/ui/date-range-picker/date-range-picker-trigger.svelte +27 -0
- package/dist/ui/date-range-picker/date-range-picker-trigger.svelte.d.ts +5 -0
- package/dist/ui/date-range-picker/index.d.ts +18 -0
- package/dist/ui/date-range-picker/index.js +18 -0
- package/dist/ui/dialog/dialog-close.svelte +39 -0
- package/dist/ui/dialog/dialog-close.svelte.d.ts +9 -0
- package/dist/ui/dialog/dialog-content.svelte +25 -0
- package/dist/ui/dialog/dialog-content.svelte.d.ts +5 -0
- package/dist/ui/dialog/dialog-description.svelte +12 -0
- package/dist/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/ui/dialog/dialog-overlay.svelte +12 -0
- package/dist/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/ui/dialog/dialog-title.svelte +8 -0
- package/dist/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/ui/dialog/dialog-trigger.svelte +28 -0
- package/dist/ui/dialog/dialog-trigger.svelte.d.ts +9 -0
- package/dist/ui/dialog/index.d.ts +9 -0
- package/dist/ui/dialog/index.js +9 -0
- package/dist/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +21 -0
- package/dist/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +4 -0
- package/dist/ui/dropdown-menu/dropdown-menu-content.svelte +27 -0
- package/dist/ui/dropdown-menu/dropdown-menu-content.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-group-heading.svelte +16 -0
- package/dist/ui/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +4 -0
- package/dist/ui/dropdown-menu/dropdown-menu-item.svelte +22 -0
- package/dist/ui/dropdown-menu/dropdown-menu-item.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-radio-item.svelte +19 -0
- package/dist/ui/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
- package/dist/ui/dropdown-menu/dropdown-menu-separator.svelte +16 -0
- package/dist/ui/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte +26 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +24 -0
- package/dist/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/dropdown-menu-trigger.svelte +24 -0
- package/dist/ui/dropdown-menu/dropdown-menu-trigger.svelte.d.ts +5 -0
- package/dist/ui/dropdown-menu/index.d.ts +14 -0
- package/dist/ui/dropdown-menu/index.js +14 -0
- package/dist/ui/file-upload/file-upload.svelte +98 -0
- package/dist/ui/file-upload/file-upload.svelte.d.ts +8 -0
- package/dist/ui/file-upload/index.d.ts +1 -0
- package/dist/ui/file-upload/index.js +1 -0
- package/dist/ui/index.d.ts +58 -0
- package/dist/ui/index.js +62 -0
- package/dist/ui/input/index.d.ts +2 -0
- package/dist/ui/input/index.js +2 -0
- package/dist/ui/input/input.svelte +23 -0
- package/dist/ui/input/input.svelte.d.ts +7 -0
- package/dist/ui/input/textarea.svelte +23 -0
- package/dist/ui/input/textarea.svelte.d.ts +7 -0
- package/dist/ui/kv/index.d.ts +1 -0
- package/dist/ui/kv/index.js +1 -0
- package/dist/ui/kv/kv.svelte +33 -0
- package/dist/ui/kv/kv.svelte.d.ts +10 -0
- package/dist/ui/label/index.d.ts +1 -0
- package/dist/ui/label/index.js +1 -0
- package/dist/ui/label/label.svelte +15 -0
- package/dist/ui/label/label.svelte.d.ts +5 -0
- package/dist/ui/link-preview/index.d.ts +7 -0
- package/dist/ui/link-preview/index.js +7 -0
- package/dist/ui/link-preview/link-preview-content.svelte +26 -0
- package/dist/ui/link-preview/link-preview-content.svelte.d.ts +5 -0
- package/dist/ui/link-preview/link-preview-trigger.svelte +19 -0
- package/dist/ui/link-preview/link-preview-trigger.svelte.d.ts +5 -0
- package/dist/ui/menu/index.d.ts +1 -0
- package/dist/ui/menu/index.js +3 -0
- package/dist/ui/menubar/index.d.ts +16 -0
- package/dist/ui/menubar/index.js +16 -0
- package/dist/ui/menubar/menubar-checkbox-item.svelte +21 -0
- package/dist/ui/menubar/menubar-checkbox-item.svelte.d.ts +4 -0
- package/dist/ui/menubar/menubar-content.svelte +27 -0
- package/dist/ui/menubar/menubar-content.svelte.d.ts +5 -0
- package/dist/ui/menubar/menubar-group-heading.svelte +16 -0
- package/dist/ui/menubar/menubar-group-heading.svelte.d.ts +4 -0
- package/dist/ui/menubar/menubar-item.svelte +22 -0
- package/dist/ui/menubar/menubar-item.svelte.d.ts +5 -0
- package/dist/ui/menubar/menubar-radio-item.svelte +15 -0
- package/dist/ui/menubar/menubar-radio-item.svelte.d.ts +4 -0
- package/dist/ui/menubar/menubar-root.svelte +15 -0
- package/dist/ui/menubar/menubar-root.svelte.d.ts +4 -0
- package/dist/ui/menubar/menubar-separator.svelte +12 -0
- package/dist/ui/menubar/menubar-separator.svelte.d.ts +4 -0
- package/dist/ui/menubar/menubar-sub-content.svelte +26 -0
- package/dist/ui/menubar/menubar-sub-content.svelte.d.ts +5 -0
- package/dist/ui/menubar/menubar-sub-trigger.svelte +24 -0
- package/dist/ui/menubar/menubar-sub-trigger.svelte.d.ts +5 -0
- package/dist/ui/menubar/menubar-trigger.svelte +22 -0
- package/dist/ui/menubar/menubar-trigger.svelte.d.ts +5 -0
- package/dist/ui/meter/index.d.ts +1 -0
- package/dist/ui/meter/index.js +1 -0
- package/dist/ui/meter/meter.svelte +32 -0
- package/dist/ui/meter/meter.svelte.d.ts +4 -0
- package/dist/ui/mode/index.d.ts +1 -0
- package/dist/ui/mode/index.js +1 -0
- package/dist/ui/mode/mode.svelte +61 -0
- package/dist/ui/mode/mode.svelte.d.ts +18 -0
- package/dist/ui/navigation-menu/index.d.ts +10 -0
- package/dist/ui/navigation-menu/index.js +10 -0
- package/dist/ui/pagination/index.d.ts +4 -0
- package/dist/ui/pagination/index.js +4 -0
- package/dist/ui/pagination/pagination-next-button.svelte +30 -0
- package/dist/ui/pagination/pagination-next-button.svelte.d.ts +9 -0
- package/dist/ui/pagination/pagination-page.svelte +32 -0
- package/dist/ui/pagination/pagination-page.svelte.d.ts +9 -0
- package/dist/ui/pagination/pagination-prev-button.svelte +30 -0
- package/dist/ui/pagination/pagination-prev-button.svelte.d.ts +9 -0
- package/dist/ui/pagination/pagination-root.svelte +18 -0
- package/dist/ui/pagination/pagination-root.svelte.d.ts +4 -0
- package/dist/ui/pane/index.d.ts +1 -0
- package/dist/ui/pane/index.js +1 -0
- package/dist/ui/pane/pane.svelte +145 -0
- package/dist/ui/pane/pane.svelte.d.ts +34 -0
- package/dist/ui/pin-input/index.d.ts +2 -0
- package/dist/ui/pin-input/index.js +2 -0
- package/dist/ui/pin-input/pin-input-cell.svelte +30 -0
- package/dist/ui/pin-input/pin-input-cell.svelte.d.ts +4 -0
- package/dist/ui/pin-input/pin-input-root.svelte +18 -0
- package/dist/ui/pin-input/pin-input-root.svelte.d.ts +4 -0
- package/dist/ui/popover/index.d.ts +7 -0
- package/dist/ui/popover/index.js +7 -0
- package/dist/ui/popover/popover-close.svelte +27 -0
- package/dist/ui/popover/popover-close.svelte.d.ts +9 -0
- package/dist/ui/popover/popover-content.svelte +24 -0
- package/dist/ui/popover/popover-content.svelte.d.ts +5 -0
- package/dist/ui/popover/popover-trigger.svelte +41 -0
- package/dist/ui/popover/popover-trigger.svelte.d.ts +9 -0
- package/dist/ui/progress/index.d.ts +1 -0
- package/dist/ui/progress/index.js +1 -0
- package/dist/ui/progress/progress.svelte +47 -0
- package/dist/ui/progress/progress.svelte.d.ts +4 -0
- package/dist/ui/provider/axes.d.ts +74 -0
- package/dist/ui/provider/axes.js +70 -0
- package/dist/ui/provider/index.d.ts +6 -0
- package/dist/ui/provider/index.js +6 -0
- package/dist/ui/provider/modes.d.ts +12 -0
- package/dist/ui/provider/modes.js +14 -0
- package/dist/ui/provider/surfaces.d.ts +45 -0
- package/dist/ui/provider/surfaces.js +24 -0
- package/dist/ui/radio-group/index.d.ts +2 -0
- package/dist/ui/radio-group/index.js +2 -0
- package/dist/ui/radio-group/radio-group-item.svelte +19 -0
- package/dist/ui/radio-group/radio-group-item.svelte.d.ts +4 -0
- package/dist/ui/radio-group/radio-group-root.svelte +18 -0
- package/dist/ui/radio-group/radio-group-root.svelte.d.ts +4 -0
- package/dist/ui/range-calendar/index.d.ts +15 -0
- package/dist/ui/range-calendar/index.js +15 -0
- package/dist/ui/rating-group/index.d.ts +2 -0
- package/dist/ui/rating-group/index.js +2 -0
- package/dist/ui/rating-group/rating-group-item.svelte +17 -0
- package/dist/ui/rating-group/rating-group-item.svelte.d.ts +4 -0
- package/dist/ui/rating-group/rating-group-root.svelte +20 -0
- package/dist/ui/rating-group/rating-group-root.svelte.d.ts +4 -0
- package/dist/ui/scroll-area/index.d.ts +5 -0
- package/dist/ui/scroll-area/index.js +5 -0
- package/dist/ui/scroll-area/scroll-area-corner.svelte +7 -0
- package/dist/ui/scroll-area/scroll-area-corner.svelte.d.ts +4 -0
- package/dist/ui/scroll-area/scroll-area-scrollbar.svelte +19 -0
- package/dist/ui/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
- package/dist/ui/scroll-area/scroll-area-thumb.svelte +12 -0
- package/dist/ui/scroll-area/scroll-area-thumb.svelte.d.ts +4 -0
- package/dist/ui/scroll-area/scroll-area-viewport.svelte +12 -0
- package/dist/ui/scroll-area/scroll-area-viewport.svelte.d.ts +4 -0
- package/dist/ui/scroll-area/scroll-area.svelte +18 -0
- package/dist/ui/scroll-area/scroll-area.svelte.d.ts +4 -0
- package/dist/ui/select/index.d.ts +6 -0
- package/dist/ui/select/index.js +6 -0
- package/dist/ui/select/select-content.svelte +25 -0
- package/dist/ui/select/select-content.svelte.d.ts +5 -0
- package/dist/ui/select/select-item.svelte +17 -0
- package/dist/ui/select/select-item.svelte.d.ts +4 -0
- package/dist/ui/select/select-trigger.svelte +24 -0
- package/dist/ui/select/select-trigger.svelte.d.ts +5 -0
- package/dist/ui/select/select-value.svelte +71 -0
- package/dist/ui/select/select-value.svelte.d.ts +9 -0
- package/dist/ui/separator/index.d.ts +1 -0
- package/dist/ui/separator/index.js +1 -0
- package/dist/ui/separator/separator.svelte +31 -0
- package/dist/ui/separator/separator.svelte.d.ts +8 -0
- package/dist/ui/sheet/index.d.ts +2 -0
- package/dist/ui/sheet/index.js +5 -0
- package/dist/ui/sheet/sheet-content.svelte +41 -0
- package/dist/ui/sheet/sheet-content.svelte.d.ts +31 -0
- package/dist/ui/skeleton/index.d.ts +1 -0
- package/dist/ui/skeleton/index.js +1 -0
- package/dist/ui/skeleton/skeleton.svelte +43 -0
- package/dist/ui/skeleton/skeleton.svelte.d.ts +27 -0
- package/dist/ui/slider/index.d.ts +6 -0
- package/dist/ui/slider/index.js +6 -0
- package/dist/ui/slider/slider-range.svelte +40 -0
- package/dist/ui/slider/slider-range.svelte.d.ts +13 -0
- package/dist/ui/slider/slider-root.svelte +29 -0
- package/dist/ui/slider/slider-root.svelte.d.ts +4 -0
- package/dist/ui/slider/slider-thumb-label.svelte +12 -0
- package/dist/ui/slider/slider-thumb-label.svelte.d.ts +4 -0
- package/dist/ui/slider/slider-thumb.svelte +15 -0
- package/dist/ui/slider/slider-thumb.svelte.d.ts +4 -0
- package/dist/ui/slider/slider-tick-label.svelte +12 -0
- package/dist/ui/slider/slider-tick-label.svelte.d.ts +4 -0
- package/dist/ui/slider/slider-tick.svelte +15 -0
- package/dist/ui/slider/slider-tick.svelte.d.ts +4 -0
- package/dist/ui/switch/index.d.ts +1 -0
- package/dist/ui/switch/index.js +1 -0
- package/dist/ui/switch/switch.svelte +36 -0
- package/dist/ui/switch/switch.svelte.d.ts +4 -0
- package/dist/ui/table/index.d.ts +6 -0
- package/dist/ui/table/index.js +6 -0
- package/dist/ui/table/table-body.svelte +18 -0
- package/dist/ui/table/table-body.svelte.d.ts +9 -0
- package/dist/ui/table/table-cell.svelte +26 -0
- package/dist/ui/table/table-cell.svelte.d.ts +9 -0
- package/dist/ui/table/table-head-cell.svelte +26 -0
- package/dist/ui/table/table-head-cell.svelte.d.ts +9 -0
- package/dist/ui/table/table-head.svelte +18 -0
- package/dist/ui/table/table-head.svelte.d.ts +9 -0
- package/dist/ui/table/table-root.svelte +36 -0
- package/dist/ui/table/table-root.svelte.d.ts +17 -0
- package/dist/ui/table/table-row.svelte +26 -0
- package/dist/ui/table/table-row.svelte.d.ts +9 -0
- package/dist/ui/tabs/index.d.ts +4 -0
- package/dist/ui/tabs/index.js +4 -0
- package/dist/ui/tabs/tabs-content.svelte +7 -0
- package/dist/ui/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/ui/tabs/tabs-list.svelte +7 -0
- package/dist/ui/tabs/tabs-list.svelte.d.ts +4 -0
- package/dist/ui/tabs/tabs-trigger.svelte +7 -0
- package/dist/ui/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/dist/ui/tabs/tabs.svelte +7 -0
- package/dist/ui/tabs/tabs.svelte.d.ts +4 -0
- package/dist/ui/time-field/index.d.ts +4 -0
- package/dist/ui/time-field/index.js +4 -0
- package/dist/ui/time-field/time-field-input.svelte +15 -0
- package/dist/ui/time-field/time-field-input.svelte.d.ts +4 -0
- package/dist/ui/time-field/time-field-label.svelte +8 -0
- package/dist/ui/time-field/time-field-label.svelte.d.ts +4 -0
- package/dist/ui/time-field/time-field-root.svelte +11 -0
- package/dist/ui/time-field/time-field-root.svelte.d.ts +4 -0
- package/dist/ui/time-field/time-field-segment.svelte +15 -0
- package/dist/ui/time-field/time-field-segment.svelte.d.ts +4 -0
- package/dist/ui/time-range-field/index.d.ts +4 -0
- package/dist/ui/time-range-field/index.js +4 -0
- package/dist/ui/time-range-field/time-range-field-input.svelte +19 -0
- package/dist/ui/time-range-field/time-range-field-input.svelte.d.ts +4 -0
- package/dist/ui/time-range-field/time-range-field-label.svelte +12 -0
- package/dist/ui/time-range-field/time-range-field-label.svelte.d.ts +4 -0
- package/dist/ui/time-range-field/time-range-field-root.svelte +13 -0
- package/dist/ui/time-range-field/time-range-field-root.svelte.d.ts +4 -0
- package/dist/ui/time-range-field/time-range-field-segment.svelte +19 -0
- package/dist/ui/time-range-field/time-range-field-segment.svelte.d.ts +3 -0
- package/dist/ui/toggle/index.d.ts +1 -0
- package/dist/ui/toggle/index.js +1 -0
- package/dist/ui/toggle/toggle.svelte +27 -0
- package/dist/ui/toggle/toggle.svelte.d.ts +9 -0
- package/dist/ui/toggle-group/index.d.ts +2 -0
- package/dist/ui/toggle-group/index.js +2 -0
- package/dist/ui/toggle-group/toggle-group-item.svelte +17 -0
- package/dist/ui/toggle-group/toggle-group-item.svelte.d.ts +4 -0
- package/dist/ui/toggle-group/toggle-group-root.svelte +19 -0
- package/dist/ui/toggle-group/toggle-group-root.svelte.d.ts +5 -0
- package/dist/ui/toolbar/index.d.ts +6 -0
- package/dist/ui/toolbar/index.js +6 -0
- package/dist/ui/tooltip/index.d.ts +7 -0
- package/dist/ui/tooltip/index.js +7 -0
- package/dist/ui/tooltip/tooltip-content.svelte +26 -0
- package/dist/ui/tooltip/tooltip-content.svelte.d.ts +5 -0
- package/dist/ui/tooltip/tooltip-trigger.svelte +7 -0
- package/dist/ui/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/dist/ui/video-player/index.d.ts +1 -0
- package/dist/ui/video-player/index.js +1 -0
- package/dist/ui/video-player/video-player.svelte +1377 -0
- package/dist/ui/video-player/video-player.svelte.d.ts +107 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.js +24 -0
- package/package.json +115 -0
- package/readme +127 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { buildComponentDocFromSources } from './component-docs-core.js';
|
|
2
|
+
import { groupSvelteBySlug, parseAllSubExports, parseRootExports } from './component-source-scanners.js';
|
|
3
|
+
const svelteSources = import.meta.glob('../ui/**/*.svelte', {
|
|
4
|
+
query: '?raw',
|
|
5
|
+
import: 'default',
|
|
6
|
+
eager: true
|
|
7
|
+
});
|
|
8
|
+
const componentIndexSources = import.meta.glob('../ui/*/index.ts', {
|
|
9
|
+
query: '?raw',
|
|
10
|
+
import: 'default',
|
|
11
|
+
eager: true
|
|
12
|
+
});
|
|
13
|
+
const rootIndexSources = import.meta.glob('../ui/index.ts', {
|
|
14
|
+
query: '?raw',
|
|
15
|
+
import: 'default',
|
|
16
|
+
eager: true
|
|
17
|
+
});
|
|
18
|
+
const sources = {
|
|
19
|
+
rootExports: parseRootExports(Object.values(rootIndexSources)[0] ?? ''),
|
|
20
|
+
subExportsBySlug: parseAllSubExports(componentIndexSources),
|
|
21
|
+
svelteBySlug: groupSvelteBySlug(svelteSources)
|
|
22
|
+
};
|
|
23
|
+
export function buildComponentDoc(entry, appendix) {
|
|
24
|
+
return buildComponentDocFromSources(entry, sources, appendix);
|
|
25
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface RootExport {
|
|
2
|
+
kind: 'named' | 'namespace';
|
|
3
|
+
alias: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SubExport {
|
|
6
|
+
name: string;
|
|
7
|
+
source: {
|
|
8
|
+
kind: 'file';
|
|
9
|
+
file: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'passthrough';
|
|
12
|
+
ref: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare function parseRootExports(src: string): Record<string, RootExport>;
|
|
16
|
+
export declare function parseAllSubExports(sources: Record<string, string>): Record<string, SubExport[]>;
|
|
17
|
+
export declare function parseSubExports(src: string): SubExport[];
|
|
18
|
+
export declare function groupSvelteBySlug(sources: Record<string, string>): Record<string, Record<string, string>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export function parseRootExports(src) {
|
|
2
|
+
const out = {};
|
|
3
|
+
for (const m of src.matchAll(/export\s*\{\s*([\w]+)(?:\s+as\s+[\w]+)?\s*(?:,[^}]*)?\}\s*from\s*["']\.\/([^/"']+)\/index\.js["']/g)) {
|
|
4
|
+
out[m[2]] = { kind: 'named', alias: m[1] };
|
|
5
|
+
}
|
|
6
|
+
for (const m of src.matchAll(/export\s*\*\s*as\s*([\w]+)\s*from\s*["']\.\/([^/"']+)\/index\.js["']/g)) {
|
|
7
|
+
out[m[2]] = { kind: 'namespace', alias: m[1] };
|
|
8
|
+
}
|
|
9
|
+
return out;
|
|
10
|
+
}
|
|
11
|
+
export function parseAllSubExports(sources) {
|
|
12
|
+
const out = {};
|
|
13
|
+
for (const [path, src] of Object.entries(sources)) {
|
|
14
|
+
const m = path.match(/\/ui\/([^/]+)\/index\.ts$/);
|
|
15
|
+
if (!m)
|
|
16
|
+
continue;
|
|
17
|
+
out[m[1]] = parseSubExports(src);
|
|
18
|
+
}
|
|
19
|
+
return out;
|
|
20
|
+
}
|
|
21
|
+
export function parseSubExports(src) {
|
|
22
|
+
const out = [];
|
|
23
|
+
for (const m of src.matchAll(/export\s*\{\s*default\s+as\s+([\w]+)\s*\}\s*from\s*["']\.\/([^"']+\.svelte)["']/g)) {
|
|
24
|
+
out.push({ name: m[1], source: { kind: 'file', file: m[2] } });
|
|
25
|
+
}
|
|
26
|
+
for (const m of src.matchAll(/export\s+const\s+([\w]+)\s*=\s*([\w.]+)\s*;/g)) {
|
|
27
|
+
out.push({ name: m[1], source: { kind: 'passthrough', ref: m[2] } });
|
|
28
|
+
}
|
|
29
|
+
for (const m of src.matchAll(/export\s*\{\s*([\w]+)\s*\}\s*from\s*["']\.\/([^"']+\.svelte)["']/g)) {
|
|
30
|
+
out.push({ name: m[1], source: { kind: 'file', file: m[2] } });
|
|
31
|
+
}
|
|
32
|
+
for (const m of src.matchAll(/export\s*\{\s*default\s*\}\s*from\s*["']\.\/([^"']+\.svelte)["']/g)) {
|
|
33
|
+
out.push({ name: 'default', source: { kind: 'file', file: m[1] } });
|
|
34
|
+
}
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
export function groupSvelteBySlug(sources) {
|
|
38
|
+
const out = {};
|
|
39
|
+
for (const [path, src] of Object.entries(sources)) {
|
|
40
|
+
const m = path.match(/\/ui\/([^/]+)\/([^/]+\.svelte)$/);
|
|
41
|
+
if (!m)
|
|
42
|
+
continue;
|
|
43
|
+
(out[m[1]] ??= {})[m[2]] = src;
|
|
44
|
+
}
|
|
45
|
+
return out;
|
|
46
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface PropSpec {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
optional: boolean;
|
|
5
|
+
default?: string;
|
|
6
|
+
bindable?: boolean;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ComponentSpec {
|
|
10
|
+
inherits: string[];
|
|
11
|
+
props: PropSpec[];
|
|
12
|
+
}
|
|
13
|
+
export declare function extractProps(source: string): ComponentSpec | null;
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
export function extractProps(source) {
|
|
2
|
+
const script = extractScript(source);
|
|
3
|
+
if (!script)
|
|
4
|
+
return null;
|
|
5
|
+
const propsIdx = script.indexOf('$props(');
|
|
6
|
+
if (propsIdx === -1)
|
|
7
|
+
return null;
|
|
8
|
+
// Walk backwards through balanced brackets to locate `let { … }: … = $props()`.
|
|
9
|
+
// We find the `=` directly preceding `$props(`, then the matching `:`, then
|
|
10
|
+
// the destructure's closing `}`. Both the `=` and `:` must be at bracket
|
|
11
|
+
// depth 0 so we skip past any `=`/`:` buried inside the destructure or
|
|
12
|
+
// generic type arguments.
|
|
13
|
+
const eqIdx = findPrevTopLevel(script, propsIdx - 1, '=');
|
|
14
|
+
if (eqIdx === -1)
|
|
15
|
+
return null;
|
|
16
|
+
const typeEnd = eqIdx;
|
|
17
|
+
const typeStart = findPrevTopLevel(script, typeEnd - 1, ':');
|
|
18
|
+
if (typeStart === -1)
|
|
19
|
+
return null;
|
|
20
|
+
const typeExpr = script.slice(typeStart + 1, typeEnd).trim();
|
|
21
|
+
// Before `:` should be the destructure's closing `}`.
|
|
22
|
+
let braceEnd = typeStart - 1;
|
|
23
|
+
while (braceEnd >= 0 && /\s/.test(script[braceEnd]))
|
|
24
|
+
braceEnd--;
|
|
25
|
+
if (script[braceEnd] !== '}')
|
|
26
|
+
return null;
|
|
27
|
+
const braceStart = findMatchingOpen(script, braceEnd);
|
|
28
|
+
if (braceStart === -1)
|
|
29
|
+
return null;
|
|
30
|
+
const destructure = script.slice(braceStart + 1, braceEnd);
|
|
31
|
+
const defaults = parseDestructure(destructure);
|
|
32
|
+
const { inherits, literal } = parseTypeExpr(typeExpr);
|
|
33
|
+
// Merge defaults onto literal members; anything declared as bindable in the
|
|
34
|
+
// destructure is marked here too.
|
|
35
|
+
for (const prop of literal) {
|
|
36
|
+
const d = defaults[prop.name];
|
|
37
|
+
if (!d)
|
|
38
|
+
continue;
|
|
39
|
+
if (d.default !== undefined)
|
|
40
|
+
prop.default = d.default;
|
|
41
|
+
if (d.bindable)
|
|
42
|
+
prop.bindable = true;
|
|
43
|
+
}
|
|
44
|
+
// If the destructure introduces bindables not visible in the literal (a
|
|
45
|
+
// forwarded prop like `value` on Slider.Root), surface them anyway so the
|
|
46
|
+
// doc notes binding support.
|
|
47
|
+
for (const [name, d] of Object.entries(defaults)) {
|
|
48
|
+
if (literal.find((p) => p.name === name))
|
|
49
|
+
continue;
|
|
50
|
+
if (!d.bindable)
|
|
51
|
+
continue;
|
|
52
|
+
literal.push({
|
|
53
|
+
name,
|
|
54
|
+
type: '(forwarded)',
|
|
55
|
+
optional: true,
|
|
56
|
+
default: d.default,
|
|
57
|
+
bindable: true
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return { inherits, props: literal };
|
|
61
|
+
}
|
|
62
|
+
function extractScript(source) {
|
|
63
|
+
// A component may have both a `<script module>` (tv() variants, etc.) and
|
|
64
|
+
// the instance `<script>`. $props() lives in the instance block, so scan
|
|
65
|
+
// all blocks and prefer the one that actually contains $props(); fall back
|
|
66
|
+
// to the last non-module block. Reading only the first block silently
|
|
67
|
+
// missed props on module-first components (badge/chip/card/skeleton).
|
|
68
|
+
const blocks = [...source.matchAll(/<script([^>]*)>([\s\S]*?)<\/script>/g)];
|
|
69
|
+
if (blocks.length === 0)
|
|
70
|
+
return null;
|
|
71
|
+
const withProps = blocks.find((b) => b[2].includes('$props('));
|
|
72
|
+
if (withProps)
|
|
73
|
+
return withProps[2];
|
|
74
|
+
const instance = blocks.filter((b) => !/\bmodule\b/.test(b[1])).at(-1);
|
|
75
|
+
return (instance ?? blocks[0])[2];
|
|
76
|
+
}
|
|
77
|
+
// If `src[i]` starts a string, template literal, or comment, skip past it and
|
|
78
|
+
// return the next index. Otherwise returns `i` unchanged so callers can decide
|
|
79
|
+
// what to do with the character.
|
|
80
|
+
function skipNonCode(src, i) {
|
|
81
|
+
const c = src[i];
|
|
82
|
+
// Arrow `=>` is neither a bracket nor an operator we track. Skipping it as a
|
|
83
|
+
// unit keeps the lone `>` from being counted as a generic-bracket close
|
|
84
|
+
// (which corrupted depth on arrow-typed props like `(d: E) => void`) and
|
|
85
|
+
// keeps its `=` from being mistaken for the `= $props()` assignment.
|
|
86
|
+
if (c === '=' && src[i + 1] === '>')
|
|
87
|
+
return i + 2;
|
|
88
|
+
if (c === '"' || c === "'") {
|
|
89
|
+
const quote = c;
|
|
90
|
+
i++;
|
|
91
|
+
while (i < src.length && src[i] !== quote) {
|
|
92
|
+
if (src[i] === '\\')
|
|
93
|
+
i++;
|
|
94
|
+
i++;
|
|
95
|
+
}
|
|
96
|
+
return i + 1;
|
|
97
|
+
}
|
|
98
|
+
if (c === '`') {
|
|
99
|
+
i++;
|
|
100
|
+
while (i < src.length && src[i] !== '`') {
|
|
101
|
+
if (src[i] === '\\')
|
|
102
|
+
i++;
|
|
103
|
+
else if (src[i] === '$' && src[i + 1] === '{') {
|
|
104
|
+
i = findMatchingClose(src, i + 1) + 1;
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
i++;
|
|
108
|
+
}
|
|
109
|
+
return i + 1;
|
|
110
|
+
}
|
|
111
|
+
if (c === '/' && src[i + 1] === '/') {
|
|
112
|
+
while (i < src.length && src[i] !== '\n')
|
|
113
|
+
i++;
|
|
114
|
+
return i;
|
|
115
|
+
}
|
|
116
|
+
if (c === '/' && src[i + 1] === '*') {
|
|
117
|
+
i += 2;
|
|
118
|
+
while (i < src.length - 1 && !(src[i] === '*' && src[i + 1] === '/'))
|
|
119
|
+
i++;
|
|
120
|
+
return i + 2;
|
|
121
|
+
}
|
|
122
|
+
return i;
|
|
123
|
+
}
|
|
124
|
+
function findMatchingClose(src, openIdx) {
|
|
125
|
+
const open = src[openIdx];
|
|
126
|
+
const close = { '{': '}', '(': ')', '[': ']', '<': '>' }[open];
|
|
127
|
+
if (!close)
|
|
128
|
+
return -1;
|
|
129
|
+
let depth = 0;
|
|
130
|
+
let i = openIdx;
|
|
131
|
+
while (i < src.length) {
|
|
132
|
+
const next = skipNonCode(src, i);
|
|
133
|
+
if (next !== i) {
|
|
134
|
+
i = next;
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const c = src[i];
|
|
138
|
+
if (c === open)
|
|
139
|
+
depth++;
|
|
140
|
+
else if (c === close) {
|
|
141
|
+
depth--;
|
|
142
|
+
if (depth === 0)
|
|
143
|
+
return i;
|
|
144
|
+
}
|
|
145
|
+
i++;
|
|
146
|
+
}
|
|
147
|
+
return -1;
|
|
148
|
+
}
|
|
149
|
+
function findMatchingOpen(src, closeIdx) {
|
|
150
|
+
const close = src[closeIdx];
|
|
151
|
+
const open = { '}': '{', ')': '(', ']': '[', '>': '<' }[close];
|
|
152
|
+
if (!open)
|
|
153
|
+
return -1;
|
|
154
|
+
// Rescan forward tracking balance rather than scanning backwards — handling
|
|
155
|
+
// string/comment boundaries in reverse is error-prone.
|
|
156
|
+
const stack = [];
|
|
157
|
+
let i = 0;
|
|
158
|
+
while (i <= closeIdx) {
|
|
159
|
+
const next = skipNonCode(src, i);
|
|
160
|
+
if (next !== i) {
|
|
161
|
+
i = next;
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
const c = src[i];
|
|
165
|
+
if (c === open)
|
|
166
|
+
stack.push(i);
|
|
167
|
+
else if (c === close) {
|
|
168
|
+
const o = stack.pop();
|
|
169
|
+
if (i === closeIdx)
|
|
170
|
+
return o ?? -1;
|
|
171
|
+
}
|
|
172
|
+
i++;
|
|
173
|
+
}
|
|
174
|
+
return -1;
|
|
175
|
+
}
|
|
176
|
+
function findPrevTopLevel(src, end, token) {
|
|
177
|
+
// Records only matches at bracket depth 0, skipping nested expressions.
|
|
178
|
+
let found = -1;
|
|
179
|
+
let depth = 0;
|
|
180
|
+
let i = 0;
|
|
181
|
+
while (i <= end) {
|
|
182
|
+
const next = skipNonCode(src, i);
|
|
183
|
+
if (next !== i) {
|
|
184
|
+
i = next;
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
const c = src[i];
|
|
188
|
+
if (c === '{' || c === '(' || c === '[' || c === '<')
|
|
189
|
+
depth++;
|
|
190
|
+
else if (c === '}' || c === ')' || c === ']' || c === '>')
|
|
191
|
+
depth--;
|
|
192
|
+
else if (depth === 0 && c === token)
|
|
193
|
+
found = i;
|
|
194
|
+
i++;
|
|
195
|
+
}
|
|
196
|
+
return found;
|
|
197
|
+
}
|
|
198
|
+
function splitTopLevel(s, delim) {
|
|
199
|
+
const out = [];
|
|
200
|
+
let start = 0;
|
|
201
|
+
let depth = 0;
|
|
202
|
+
let i = 0;
|
|
203
|
+
while (i < s.length) {
|
|
204
|
+
const next = skipNonCode(s, i);
|
|
205
|
+
if (next !== i) {
|
|
206
|
+
i = next;
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
const c = s[i];
|
|
210
|
+
if (c === '{' || c === '(' || c === '[' || c === '<')
|
|
211
|
+
depth++;
|
|
212
|
+
else if (c === '}' || c === ')' || c === ']' || c === '>')
|
|
213
|
+
depth--;
|
|
214
|
+
else if (depth === 0 && c === delim) {
|
|
215
|
+
out.push(s.slice(start, i));
|
|
216
|
+
start = i + 1;
|
|
217
|
+
}
|
|
218
|
+
i++;
|
|
219
|
+
}
|
|
220
|
+
out.push(s.slice(start));
|
|
221
|
+
return out;
|
|
222
|
+
}
|
|
223
|
+
function parseTypeExpr(typeExpr) {
|
|
224
|
+
const branches = splitTopLevel(typeExpr, '&')
|
|
225
|
+
.map((b) => b.trim())
|
|
226
|
+
.filter(Boolean);
|
|
227
|
+
const inherits = [];
|
|
228
|
+
const literal = [];
|
|
229
|
+
for (const branch of branches) {
|
|
230
|
+
if (branch.startsWith('{')) {
|
|
231
|
+
const close = findMatchingClose(branch, 0);
|
|
232
|
+
if (close === -1)
|
|
233
|
+
continue;
|
|
234
|
+
literal.push(...parseLiteralMembers(branch.slice(1, close)));
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
inherits.push(branch);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return { inherits, literal };
|
|
241
|
+
}
|
|
242
|
+
function parseLiteralMembers(body) {
|
|
243
|
+
const entries = splitTopLevel(body, ';')
|
|
244
|
+
.map((s) => s.trim())
|
|
245
|
+
.filter(Boolean);
|
|
246
|
+
const props = [];
|
|
247
|
+
for (const entry of entries) {
|
|
248
|
+
let description;
|
|
249
|
+
let remainder = entry;
|
|
250
|
+
const jsdoc = remainder.match(/^\/\*\*([\s\S]*?)\*\/\s*/);
|
|
251
|
+
if (jsdoc) {
|
|
252
|
+
description = jsdoc[1].replace(/^\s*\*\s?/gm, '').trim();
|
|
253
|
+
remainder = remainder.slice(jsdoc[0].length);
|
|
254
|
+
}
|
|
255
|
+
// Strip any remaining leading line comments.
|
|
256
|
+
while (remainder.startsWith('//')) {
|
|
257
|
+
const nl = remainder.indexOf('\n');
|
|
258
|
+
remainder = nl === -1 ? '' : remainder.slice(nl + 1).trimStart();
|
|
259
|
+
}
|
|
260
|
+
const m = remainder.match(/^([A-Za-z_$][\w$]*)(\??)\s*:\s*([\s\S]+)$/);
|
|
261
|
+
if (!m)
|
|
262
|
+
continue;
|
|
263
|
+
props.push({
|
|
264
|
+
name: m[1],
|
|
265
|
+
optional: m[2] === '?',
|
|
266
|
+
type: m[3].trim(),
|
|
267
|
+
description
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
return props;
|
|
271
|
+
}
|
|
272
|
+
function parseDestructure(body) {
|
|
273
|
+
const entries = splitTopLevel(body, ',')
|
|
274
|
+
.map((s) => s.trim())
|
|
275
|
+
.filter(Boolean);
|
|
276
|
+
const out = {};
|
|
277
|
+
for (const entry of entries) {
|
|
278
|
+
if (entry.startsWith('...'))
|
|
279
|
+
continue;
|
|
280
|
+
let left = entry;
|
|
281
|
+
let defaultVal;
|
|
282
|
+
const eq = findTopLevelChar(entry, '=');
|
|
283
|
+
if (eq !== -1) {
|
|
284
|
+
left = entry.slice(0, eq).trim();
|
|
285
|
+
defaultVal = entry.slice(eq + 1).trim();
|
|
286
|
+
}
|
|
287
|
+
// Strip alias: `class: className` → name is `class`.
|
|
288
|
+
const colon = findTopLevelChar(left, ':');
|
|
289
|
+
if (colon !== -1)
|
|
290
|
+
left = left.slice(0, colon).trim();
|
|
291
|
+
const bindable = /^\$bindable\b/.test(defaultVal ?? '');
|
|
292
|
+
let normalizedDefault = defaultVal;
|
|
293
|
+
if (bindable && defaultVal) {
|
|
294
|
+
// `$bindable(null)` → `null`; `$bindable<T>(x)` → `x`.
|
|
295
|
+
const paren = defaultVal.indexOf('(');
|
|
296
|
+
const close = paren === -1 ? -1 : findMatchingClose(defaultVal, paren);
|
|
297
|
+
if (paren !== -1 && close !== -1) {
|
|
298
|
+
normalizedDefault = defaultVal.slice(paren + 1, close).trim() || undefined;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
out[left] = { default: normalizedDefault, bindable };
|
|
302
|
+
}
|
|
303
|
+
return out;
|
|
304
|
+
}
|
|
305
|
+
function findTopLevelChar(s, ch) {
|
|
306
|
+
let depth = 0;
|
|
307
|
+
let i = 0;
|
|
308
|
+
while (i < s.length) {
|
|
309
|
+
const next = skipNonCode(s, i);
|
|
310
|
+
if (next !== i) {
|
|
311
|
+
i = next;
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
const c = s[i];
|
|
315
|
+
if (c === '{' || c === '(' || c === '[' || c === '<')
|
|
316
|
+
depth++;
|
|
317
|
+
else if (c === '}' || c === ')' || c === ']' || c === '>')
|
|
318
|
+
depth--;
|
|
319
|
+
else if (depth === 0 && c === ch)
|
|
320
|
+
return i;
|
|
321
|
+
i++;
|
|
322
|
+
}
|
|
323
|
+
return -1;
|
|
324
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const markdownFiles = import.meta.glob('../generated-docs/*.md', {
|
|
2
|
+
query: '?raw',
|
|
3
|
+
import: 'default',
|
|
4
|
+
eager: true
|
|
5
|
+
});
|
|
6
|
+
const textFiles = import.meta.glob('../generated-docs/*.txt', {
|
|
7
|
+
query: '?raw',
|
|
8
|
+
import: 'default',
|
|
9
|
+
eager: true
|
|
10
|
+
});
|
|
11
|
+
const manifestModules = import.meta.glob('../generated-docs/manifest.json', {
|
|
12
|
+
import: 'default',
|
|
13
|
+
eager: true
|
|
14
|
+
});
|
|
15
|
+
function stem(path) {
|
|
16
|
+
return path.replace(/^\.\.\/generated-docs\//, '').replace(/\.(md|txt)$/, '');
|
|
17
|
+
}
|
|
18
|
+
export const docsBySlug = Object.fromEntries(Object.entries(markdownFiles).map(([file, body]) => [stem(file), body]));
|
|
19
|
+
const manifest = Object.values(manifestModules)[0];
|
|
20
|
+
const manifestSlugs = manifest?.entries?.map((entry) => entry.slug) ?? [];
|
|
21
|
+
export const knownSlugs = new Set(manifestSlugs.length ? manifestSlugs : Object.keys(docsBySlug));
|
|
22
|
+
export const llmsTxtTemplate = textFiles['../generated-docs/llms.txt'] ?? '';
|
|
23
|
+
export const llmsFullTxt = textFiles['../generated-docs/llms-full.txt'] ?? '';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ComponentEntry } from '../../routes/registry.js';
|
|
2
|
+
export declare const docs: Record<string, string>;
|
|
3
|
+
export declare function getDoc(slug: string): string | undefined;
|
|
4
|
+
export declare function hasDoc(slug: string): boolean;
|
|
5
|
+
export declare function listEntries(): ComponentEntry[];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { components, guides } from '../../routes/registry.js';
|
|
2
|
+
import { buildComponentDoc } from './component-docs.js';
|
|
3
|
+
const rootUiIndexSources = import.meta.glob('../ui/index.ts', {
|
|
4
|
+
query: '?raw',
|
|
5
|
+
import: 'default',
|
|
6
|
+
eager: true
|
|
7
|
+
});
|
|
8
|
+
const markdownModules = import.meta.glob('./*.md', {
|
|
9
|
+
query: '?raw',
|
|
10
|
+
import: 'default',
|
|
11
|
+
eager: true
|
|
12
|
+
});
|
|
13
|
+
function slugFromPath(path) {
|
|
14
|
+
return path.replace(/^\.\//, '').replace(/\.md$/, '');
|
|
15
|
+
}
|
|
16
|
+
const appendices = Object.fromEntries(Object.entries(markdownModules).map(([path, body]) => [slugFromPath(path), body]));
|
|
17
|
+
function titleFromSlug(slug) {
|
|
18
|
+
return slug
|
|
19
|
+
.split('-')
|
|
20
|
+
.map((part) => part[0]?.toUpperCase() + part.slice(1))
|
|
21
|
+
.join(' ');
|
|
22
|
+
}
|
|
23
|
+
function inferMissingEntriesFromRootUiIndex() {
|
|
24
|
+
const src = Object.values(rootUiIndexSources)[0] ?? '';
|
|
25
|
+
const mentioned = new Set();
|
|
26
|
+
for (const m of src.matchAll(/from\s+['"]\.\/([^/'"]+)\/index\.js['"]/g)) {
|
|
27
|
+
mentioned.add(m[1]);
|
|
28
|
+
}
|
|
29
|
+
// Provider exports theme tokens/types rather than a renderable component.
|
|
30
|
+
mentioned.delete('provider');
|
|
31
|
+
const existing = new Set([...guides, ...components].map((entry) => entry.slug));
|
|
32
|
+
const fallbackIcon = components[0]?.icon ?? guides[0].icon;
|
|
33
|
+
return [...mentioned]
|
|
34
|
+
.filter((slug) => !existing.has(slug))
|
|
35
|
+
.sort((a, b) => a.localeCompare(b))
|
|
36
|
+
.map((slug) => ({
|
|
37
|
+
name: titleFromSlug(slug),
|
|
38
|
+
slug,
|
|
39
|
+
description: `Component docs for ${titleFromSlug(slug)} (auto-discovered from src/lib/ui/index.ts exports).`,
|
|
40
|
+
icon: fallbackIcon
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
const inferredEntries = inferMissingEntriesFromRootUiIndex();
|
|
44
|
+
const allEntries = [...guides, ...components, ...inferredEntries];
|
|
45
|
+
const entriesBySlug = Object.fromEntries(allEntries.map((e) => [e.slug, e]));
|
|
46
|
+
// Synthesize every entry at module-init. Hand-authored markdown under
|
|
47
|
+
// `src/lib/docs/<slug>.md` (if present) is appended verbatim as additional
|
|
48
|
+
// notes — the header, import snippet, and props table always come from the
|
|
49
|
+
// component source so the library stays in sync with itself.
|
|
50
|
+
export const docs = Object.fromEntries(Object.values(entriesBySlug).map((entry) => [
|
|
51
|
+
entry.slug,
|
|
52
|
+
buildComponentDoc(entry, appendices[entry.slug])
|
|
53
|
+
]));
|
|
54
|
+
export function getDoc(slug) {
|
|
55
|
+
return docs[slug];
|
|
56
|
+
}
|
|
57
|
+
export function hasDoc(slug) {
|
|
58
|
+
return slug in docs;
|
|
59
|
+
}
|
|
60
|
+
export function listEntries() {
|
|
61
|
+
return allEntries;
|
|
62
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { docs, hasDoc, listEntries } from './index.js';
|
|
2
|
+
import { modes, defaultMode, surfaces, defaultSurface, corners, defaultCorners, fonts, defaultFont, motions, defaultMotion } from '../ui/provider/index.js';
|
|
3
|
+
const H1 = '# era-ui';
|
|
4
|
+
const MISSION = '> A Svelte 5 + Bits UI component library. Every surface — heights, paddings, radii, gaps — derives from a single spacing atom, so density is a one-attribute override at any scope.';
|
|
5
|
+
function orientation(origin) {
|
|
6
|
+
const axisList = (arr, dflt) => arr.map((v) => (v === dflt ? `**${v}** (default)` : v)).join(' · ');
|
|
7
|
+
return [
|
|
8
|
+
'## Using the library',
|
|
9
|
+
'',
|
|
10
|
+
'```ts',
|
|
11
|
+
'import { Button, Table, Select } from "@sig-nine/era-ui";',
|
|
12
|
+
'import "@sig-nine/era-ui/css";',
|
|
13
|
+
'```',
|
|
14
|
+
'',
|
|
15
|
+
'Named exports wrap a single primitive (`Button`, `Badge`, `Chip`, `Input`, …). Namespace exports compose primitives via sub-components (`Table.Root`, `Table.Row`, `Select.Trigger`, `Dialog.Content`, …). Every wrapper forwards unknown props to its underlying element or bits-ui primitive, so standard HTML attributes (`class`, `style`, event handlers, `aria-*`, `data-*`) work without ceremony.',
|
|
16
|
+
'',
|
|
17
|
+
'## Scoped overrides',
|
|
18
|
+
'',
|
|
19
|
+
'Five orthogonal axes are exposed as HTML attributes on any ancestor. The entire subtree re-tiers through CSS inheritance — no JS, no context provider.',
|
|
20
|
+
'',
|
|
21
|
+
`- \`data-mode\`: ${axisList(modes, defaultMode)} — adjusts the spacing atom (\`--era-sp\`).`,
|
|
22
|
+
`- \`data-surface\`: ${axisList(surfaces, defaultSurface)} — swaps the background treatment.`,
|
|
23
|
+
`- \`data-corners\`: ${axisList(corners, defaultCorners)} — scales all radii toward 0.`,
|
|
24
|
+
`- \`data-font\`: ${axisList(fonts, defaultFont)} — switches the font stack.`,
|
|
25
|
+
`- \`data-motion\`: ${axisList(motions, defaultMotion)} — sets animation speed (\`--era-duration\` / \`--era-ease\`), independent of density.`,
|
|
26
|
+
'',
|
|
27
|
+
'The `Mode` component is a thin wrapper that applies these attributes plus optional `primary` / `primaryFg` color overrides to a subtree.',
|
|
28
|
+
'',
|
|
29
|
+
'## Spacing system',
|
|
30
|
+
'',
|
|
31
|
+
'One atom, `--era-sp` (8px dense / 10px balanced / 12px spacious), drives everything. The tier ladder is:',
|
|
32
|
+
'',
|
|
33
|
+
'```',
|
|
34
|
+
'xs = sp + 6 icons, tight affordances 14 / 16 / 18 px',
|
|
35
|
+
'xxs = sp + 10 nested pill (badge, chip) 18 / 20 / 22 px',
|
|
36
|
+
'sm = 2·sp + 6 standalone pill (kv) 22 / 26 / 30 px',
|
|
37
|
+
'md = 3·sp buttons, inputs, triggers 24 / 30 / 36 px',
|
|
38
|
+
'lg = 4·sp bars, top-level containers 32 / 40 / 48 px',
|
|
39
|
+
'```',
|
|
40
|
+
'',
|
|
41
|
+
'Heights (`--era-h-*`), insets (`--era-inset-*`), radii (`--era-rd-*`), and concentric gaps (`--era-xs-inset-sm`, `--era-xxs-inset-md`, …) are all `calc()` chains off `--era-sp`. Never hard-code pixel values — setting `data-mode` on any ancestor re-derives the whole subtree. Text size is static (14 px) across modes; only the spacing atom moves.',
|
|
42
|
+
'',
|
|
43
|
+
'## Per-component docs',
|
|
44
|
+
'',
|
|
45
|
+
`Every component has a passive markdown doc at \`${origin}/<slug>.md\`.`,
|
|
46
|
+
`Examples: \`${origin}/button.md\`, \`${origin}/select.md\`, \`${origin}/table.md\`.`,
|
|
47
|
+
`Full concatenated reference: \`${origin}/llms-full.txt\`.`,
|
|
48
|
+
'',
|
|
49
|
+
'Each page is generated from the component source, so props/variants/defaults stay in sync with the code automatically.'
|
|
50
|
+
].join('\n');
|
|
51
|
+
}
|
|
52
|
+
export function buildLlmsTxt(origin = '') {
|
|
53
|
+
const entries = listEntries();
|
|
54
|
+
const lines = [H1, '', MISSION, '', orientation(origin), ''];
|
|
55
|
+
if (entries.length) {
|
|
56
|
+
lines.push('## Components', '');
|
|
57
|
+
lines.push(entries.map((e) => e.slug).join(', '), '');
|
|
58
|
+
}
|
|
59
|
+
return lines.join('\n');
|
|
60
|
+
}
|
|
61
|
+
// Module-init-cached: the concatenated reference has no request-dependent
|
|
62
|
+
// inputs, so we pay its ~80 KB assembly cost once per worker instance instead
|
|
63
|
+
// of on every request.
|
|
64
|
+
let llmsFullTxtCache;
|
|
65
|
+
export function buildLlmsFullTxt() {
|
|
66
|
+
if (llmsFullTxtCache !== undefined)
|
|
67
|
+
return llmsFullTxtCache;
|
|
68
|
+
const entries = listEntries().filter((e) => hasDoc(e.slug));
|
|
69
|
+
const parts = [
|
|
70
|
+
H1,
|
|
71
|
+
'',
|
|
72
|
+
MISSION,
|
|
73
|
+
'',
|
|
74
|
+
orientation(''),
|
|
75
|
+
'',
|
|
76
|
+
'<!-- Full component documentation, concatenated. -->',
|
|
77
|
+
''
|
|
78
|
+
];
|
|
79
|
+
for (const e of entries) {
|
|
80
|
+
parts.push(`<!-- begin: ${e.slug} -->`, '', docs[e.slug].trim(), '', `<!-- end: ${e.slug} -->`, '');
|
|
81
|
+
}
|
|
82
|
+
llmsFullTxtCache = parts.join('\n');
|
|
83
|
+
return llmsFullTxtCache;
|
|
84
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
## Hero Template
|
|
2
|
+
|
|
3
|
+
Use a single, pure component import from `$lib/ui` for a clean docs-friendly starter hero.
|
|
4
|
+
|
|
5
|
+
```svelte
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { Badge, Bar, Button, ButtonGroup, Card, Separator } from '$lib/ui';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<section class="mx-auto flex w-full max-w-4xl flex-col gap-(--era-content-p) p-(--era-content-p)">
|
|
11
|
+
<Badge tone="accent">Now shipping v0.8</Badge>
|
|
12
|
+
|
|
13
|
+
<div class="space-y-(--era-gap)">
|
|
14
|
+
<h1 class="font-mono text-[length:calc(var(--era-text)*2)] font-semibold text-bright">
|
|
15
|
+
Era Hero
|
|
16
|
+
</h1>
|
|
17
|
+
<p class="max-w-prose text-muted">
|
|
18
|
+
Build once, then switch feel instantly with density and surface tokens.
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<Bar class="border border-[color:var(--era-border-color)] bg-[var(--era-surface-bg)]">
|
|
23
|
+
<ButtonGroup>
|
|
24
|
+
<Button tone="accent">Get started</Button>
|
|
25
|
+
<Button variant="outline">Live preview</Button>
|
|
26
|
+
</ButtonGroup>
|
|
27
|
+
</Bar>
|
|
28
|
+
|
|
29
|
+
<Separator />
|
|
30
|
+
|
|
31
|
+
<div class="grid gap-(--era-gap) md:grid-cols-3">
|
|
32
|
+
<Card class="p-(--era-gap)">Dense-ready</Card>
|
|
33
|
+
<Card class="p-(--era-gap)">Balanced defaults</Card>
|
|
34
|
+
<Card class="p-(--era-gap)">Spacious polish</Card>
|
|
35
|
+
</div>
|
|
36
|
+
</section>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Why this template
|
|
40
|
+
|
|
41
|
+
- Pure imports keep setup simple for first-time users.
|
|
42
|
+
- Every spacing and size value comes from era tokens.
|
|
43
|
+
- Works in all density modes without rewriting markup.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
## Usage
|
|
2
|
+
|
|
3
|
+
```svelte
|
|
4
|
+
<script>
|
|
5
|
+
import { Separator } from '$lib/ui/separator';
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
era
|
|
10
|
+
<Separator variant="slant" decorative />
|
|
11
|
+
ui
|
|
12
|
+
<Separator variant="slant" decorative />
|
|
13
|
+
separator
|
|
14
|
+
</p>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Notes
|
|
18
|
+
|
|
19
|
+
- `variant="slant"` is for inline text separators only, such as breadcrumbs, compact metadata, and split titles.
|
|
20
|
+
- Mark slant separators `decorative` unless they communicate a meaningful boundary to assistive technology.
|