@thalavaisankar/atoms 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/README.md +196 -2
- package/THIRD_PARTY_NOTICES.md +275 -0
- package/dist/blocks/index.d.mts +2 -0
- package/dist/blocks/index.mjs +1 -0
- package/dist/blocks/index.mjs.map +1 -0
- package/dist/components/ui/accordion/accordion.mjs +194 -0
- package/dist/components/ui/accordion/accordion.mjs.map +1 -0
- package/dist/components/ui/accordion/index.mjs +15 -0
- package/dist/components/ui/accordion/index.mjs.map +1 -0
- package/dist/components/ui/activity-feed/activity-feed.mjs +287 -0
- package/dist/components/ui/activity-feed/activity-feed.mjs.map +1 -0
- package/dist/components/ui/activity-feed/index.mjs +39 -0
- package/dist/components/ui/activity-feed/index.mjs.map +1 -0
- package/dist/components/ui/alert/alert.mjs +128 -0
- package/dist/components/ui/alert/alert.mjs.map +1 -0
- package/dist/components/ui/alert/index.mjs +17 -0
- package/dist/components/ui/alert/index.mjs.map +1 -0
- package/dist/components/ui/animated-label/animated-label.mjs +89 -0
- package/dist/components/ui/animated-label/animated-label.mjs.map +1 -0
- package/dist/components/ui/animated-label/index.mjs +9 -0
- package/dist/components/ui/animated-label/index.mjs.map +1 -0
- package/dist/components/ui/animated-number/animated-number.mjs +101 -0
- package/dist/components/ui/animated-number/animated-number.mjs.map +1 -0
- package/dist/components/ui/animated-number/index.mjs +5 -0
- package/dist/components/ui/animated-number/index.mjs.map +1 -0
- package/dist/components/ui/avatar/avatar.mjs +130 -0
- package/dist/components/ui/avatar/avatar.mjs.map +1 -0
- package/dist/components/ui/avatar/index.mjs +17 -0
- package/dist/components/ui/avatar/index.mjs.map +1 -0
- package/dist/components/ui/avatar-group/avatar-group.mjs +49 -0
- package/dist/components/ui/avatar-group/avatar-group.mjs.map +1 -0
- package/dist/components/ui/avatar-group/index.mjs +5 -0
- package/dist/components/ui/avatar-group/index.mjs.map +1 -0
- package/dist/components/ui/badge/badge-motion.mjs +108 -0
- package/dist/components/ui/badge/badge-motion.mjs.map +1 -0
- package/dist/components/ui/badge/badge.mjs +314 -0
- package/dist/components/ui/badge/badge.mjs.map +1 -0
- package/dist/components/ui/badge/index.mjs +27 -0
- package/dist/components/ui/badge/index.mjs.map +1 -0
- package/dist/components/ui/badge/readable-ink.mjs +36 -0
- package/dist/components/ui/badge/readable-ink.mjs.map +1 -0
- package/dist/components/ui/badge-group/badge-group.mjs +132 -0
- package/dist/components/ui/badge-group/badge-group.mjs.map +1 -0
- package/dist/components/ui/badge-group/index.mjs +5 -0
- package/dist/components/ui/badge-group/index.mjs.map +1 -0
- package/dist/components/ui/breadcrumb/breadcrumb.mjs +108 -0
- package/dist/components/ui/breadcrumb/breadcrumb.mjs.map +1 -0
- package/dist/components/ui/breadcrumb/index.mjs +19 -0
- package/dist/components/ui/breadcrumb/index.mjs.map +1 -0
- package/dist/components/ui/button/button-variants.mjs +80 -0
- package/dist/components/ui/button/button-variants.mjs.map +1 -0
- package/dist/components/ui/button/button.mjs +74 -0
- package/dist/components/ui/button/button.mjs.map +1 -0
- package/dist/components/ui/button/index.mjs +17 -0
- package/dist/components/ui/button/index.mjs.map +1 -0
- package/dist/components/ui/button/social-button.mjs +45 -0
- package/dist/components/ui/button/social-button.mjs.map +1 -0
- package/dist/components/ui/button/social-logos.mjs +179 -0
- package/dist/components/ui/button/social-logos.mjs.map +1 -0
- package/dist/components/ui/button/split-button.mjs +72 -0
- package/dist/components/ui/button/split-button.mjs.map +1 -0
- package/dist/components/ui/button-group/button-group.mjs +58 -0
- package/dist/components/ui/button-group/button-group.mjs.map +1 -0
- package/dist/components/ui/button-group/index.mjs +11 -0
- package/dist/components/ui/button-group/index.mjs.map +1 -0
- package/dist/components/ui/card/card.mjs +131 -0
- package/dist/components/ui/card/card.mjs.map +1 -0
- package/dist/components/ui/card/index.mjs +23 -0
- package/dist/components/ui/card/index.mjs.map +1 -0
- package/dist/components/ui/chart/bar-list.mjs +87 -0
- package/dist/components/ui/chart/bar-list.mjs.map +1 -0
- package/dist/components/ui/chart/chart-colors.mjs +68 -0
- package/dist/components/ui/chart/chart-colors.mjs.map +1 -0
- package/dist/components/ui/chart/chart-geometry.mjs +152 -0
- package/dist/components/ui/chart/chart-geometry.mjs.map +1 -0
- package/dist/components/ui/chart/chart-specialized.mjs +194 -0
- package/dist/components/ui/chart/chart-specialized.mjs.map +1 -0
- package/dist/components/ui/chart/chart.mjs +648 -0
- package/dist/components/ui/chart/chart.mjs.map +1 -0
- package/dist/components/ui/chart/index.mjs +88 -0
- package/dist/components/ui/chart/index.mjs.map +1 -0
- package/dist/components/ui/chart/radial-meter.mjs +142 -0
- package/dist/components/ui/chart/radial-meter.mjs.map +1 -0
- package/dist/components/ui/chart/types.mjs +1 -0
- package/dist/components/ui/chart/types.mjs.map +1 -0
- package/dist/components/ui/checkbox/checkbox.mjs +183 -0
- package/dist/components/ui/checkbox/checkbox.mjs.map +1 -0
- package/dist/components/ui/checkbox/index.mjs +11 -0
- package/dist/components/ui/checkbox/index.mjs.map +1 -0
- package/dist/components/ui/checklist/checklist.mjs +353 -0
- package/dist/components/ui/checklist/checklist.mjs.map +1 -0
- package/dist/components/ui/checklist/index.mjs +33 -0
- package/dist/components/ui/checklist/index.mjs.map +1 -0
- package/dist/components/ui/chip/chip.mjs +202 -0
- package/dist/components/ui/chip/chip.mjs.map +1 -0
- package/dist/components/ui/chip/index.mjs +13 -0
- package/dist/components/ui/chip/index.mjs.map +1 -0
- package/dist/components/ui/chip-group/chip-group.mjs +204 -0
- package/dist/components/ui/chip-group/chip-group.mjs.map +1 -0
- package/dist/components/ui/chip-group/index.mjs +11 -0
- package/dist/components/ui/chip-group/index.mjs.map +1 -0
- package/dist/components/ui/code-snippet/code-highlighter.mjs +16 -0
- package/dist/components/ui/code-snippet/code-highlighter.mjs.map +1 -0
- package/dist/components/ui/code-snippet/code-snippet.mjs +437 -0
- package/dist/components/ui/code-snippet/code-snippet.mjs.map +1 -0
- package/dist/components/ui/code-snippet/index.mjs +17 -0
- package/dist/components/ui/code-snippet/index.mjs.map +1 -0
- package/dist/components/ui/code-snippet/labels.mjs +16 -0
- package/dist/components/ui/code-snippet/labels.mjs.map +1 -0
- package/dist/components/ui/code-snippet/tokenize.mjs +715 -0
- package/dist/components/ui/code-snippet/tokenize.mjs.map +1 -0
- package/dist/components/ui/code-snippet/types.mjs +1 -0
- package/dist/components/ui/code-snippet/types.mjs.map +1 -0
- package/dist/components/ui/collapsible/collapsible.mjs +85 -0
- package/dist/components/ui/collapsible/collapsible.mjs.map +1 -0
- package/dist/components/ui/collapsible/index.mjs +15 -0
- package/dist/components/ui/collapsible/index.mjs.map +1 -0
- package/dist/components/ui/color-picker/color-picker.mjs +852 -0
- package/dist/components/ui/color-picker/color-picker.mjs.map +1 -0
- package/dist/components/ui/color-picker/index.mjs +47 -0
- package/dist/components/ui/color-picker/index.mjs.map +1 -0
- package/dist/components/ui/combobox/combobox.mjs +745 -0
- package/dist/components/ui/combobox/combobox.mjs.map +1 -0
- package/dist/components/ui/combobox/index.mjs +27 -0
- package/dist/components/ui/combobox/index.mjs.map +1 -0
- package/dist/components/ui/command/command.mjs +439 -0
- package/dist/components/ui/command/command.mjs.map +1 -0
- package/dist/components/ui/command/index.mjs +31 -0
- package/dist/components/ui/command/index.mjs.map +1 -0
- package/dist/components/ui/compare-slider/compare-slider.mjs +335 -0
- package/dist/components/ui/compare-slider/compare-slider.mjs.map +1 -0
- package/dist/components/ui/compare-slider/index.mjs +17 -0
- package/dist/components/ui/compare-slider/index.mjs.map +1 -0
- package/dist/components/ui/context-menu/context-menu.mjs +184 -0
- package/dist/components/ui/context-menu/context-menu.mjs.map +1 -0
- package/dist/components/ui/context-menu/index.mjs +37 -0
- package/dist/components/ui/context-menu/index.mjs.map +1 -0
- package/dist/components/ui/data-table/active-filters.mjs +69 -0
- package/dist/components/ui/data-table/active-filters.mjs.map +1 -0
- package/dist/components/ui/data-table/body-row.mjs +118 -0
- package/dist/components/ui/data-table/body-row.mjs.map +1 -0
- package/dist/components/ui/data-table/cards.mjs +76 -0
- package/dist/components/ui/data-table/cards.mjs.map +1 -0
- package/dist/components/ui/data-table/data-table.mjs +680 -0
- package/dist/components/ui/data-table/data-table.mjs.map +1 -0
- package/dist/components/ui/data-table/empty.mjs +26 -0
- package/dist/components/ui/data-table/empty.mjs.map +1 -0
- package/dist/components/ui/data-table/expand.mjs +70 -0
- package/dist/components/ui/data-table/expand.mjs.map +1 -0
- package/dist/components/ui/data-table/faceted-filter.mjs +112 -0
- package/dist/components/ui/data-table/faceted-filter.mjs.map +1 -0
- package/dist/components/ui/data-table/features.mjs +96 -0
- package/dist/components/ui/data-table/features.mjs.map +1 -0
- package/dist/components/ui/data-table/grip.mjs +37 -0
- package/dist/components/ui/data-table/grip.mjs.map +1 -0
- package/dist/components/ui/data-table/header-cell.mjs +85 -0
- package/dist/components/ui/data-table/header-cell.mjs.map +1 -0
- package/dist/components/ui/data-table/index.mjs +55 -0
- package/dist/components/ui/data-table/index.mjs.map +1 -0
- package/dist/components/ui/data-table/labels.mjs +55 -0
- package/dist/components/ui/data-table/labels.mjs.map +1 -0
- package/dist/components/ui/data-table/load-more.mjs +56 -0
- package/dist/components/ui/data-table/load-more.mjs.map +1 -0
- package/dist/components/ui/data-table/move-item.mjs +11 -0
- package/dist/components/ui/data-table/move-item.mjs.map +1 -0
- package/dist/components/ui/data-table/persist.mjs +65 -0
- package/dist/components/ui/data-table/persist.mjs.map +1 -0
- package/dist/components/ui/data-table/selection-bar.mjs +51 -0
- package/dist/components/ui/data-table/selection-bar.mjs.map +1 -0
- package/dist/components/ui/data-table/tabs.mjs +48 -0
- package/dist/components/ui/data-table/tabs.mjs.map +1 -0
- package/dist/components/ui/data-table/toolbar.mjs +92 -0
- package/dist/components/ui/data-table/toolbar.mjs.map +1 -0
- package/dist/components/ui/data-table/use-reorder.mjs +239 -0
- package/dist/components/ui/data-table/use-reorder.mjs.map +1 -0
- package/dist/components/ui/data-table/use-reveal.mjs +24 -0
- package/dist/components/ui/data-table/use-reveal.mjs.map +1 -0
- package/dist/components/ui/data-table/use-table-state.mjs +38 -0
- package/dist/components/ui/data-table/use-table-state.mjs.map +1 -0
- package/dist/components/ui/data-table/view-options.mjs +66 -0
- package/dist/components/ui/data-table/view-options.mjs.map +1 -0
- package/dist/components/ui/date-picker/calendar.mjs +466 -0
- package/dist/components/ui/date-picker/calendar.mjs.map +1 -0
- package/dist/components/ui/date-picker/date-picker.mjs +366 -0
- package/dist/components/ui/date-picker/date-picker.mjs.map +1 -0
- package/dist/components/ui/date-picker/index.mjs +17 -0
- package/dist/components/ui/date-picker/index.mjs.map +1 -0
- package/dist/components/ui/date-picker/presets.mjs +49 -0
- package/dist/components/ui/date-picker/presets.mjs.map +1 -0
- package/dist/components/ui/description-list/description-list.mjs +40 -0
- package/dist/components/ui/description-list/description-list.mjs.map +1 -0
- package/dist/components/ui/description-list/index.mjs +15 -0
- package/dist/components/ui/description-list/index.mjs.map +1 -0
- package/dist/components/ui/dialog/dialog-stepper.mjs +23 -0
- package/dist/components/ui/dialog/dialog-stepper.mjs.map +1 -0
- package/dist/components/ui/dialog/dialog.mjs +343 -0
- package/dist/components/ui/dialog/dialog.mjs.map +1 -0
- package/dist/components/ui/dialog/focus-return.mjs +21 -0
- package/dist/components/ui/dialog/focus-return.mjs.map +1 -0
- package/dist/components/ui/dialog/index.mjs +33 -0
- package/dist/components/ui/dialog/index.mjs.map +1 -0
- package/dist/components/ui/divider/divider.mjs +130 -0
- package/dist/components/ui/divider/divider.mjs.map +1 -0
- package/dist/components/ui/divider/index.mjs +6 -0
- package/dist/components/ui/divider/index.mjs.map +1 -0
- package/dist/components/ui/dock/dock.mjs +444 -0
- package/dist/components/ui/dock/dock.mjs.map +1 -0
- package/dist/components/ui/dock/index.mjs +19 -0
- package/dist/components/ui/dock/index.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-actions.mjs +118 -0
- package/dist/components/ui/document-editor/block-actions.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-commands.mjs +182 -0
- package/dist/components/ui/document-editor/block-commands.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-handle.mjs +387 -0
- package/dist/components/ui/document-editor/block-handle.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-morph.mjs +95 -0
- package/dist/components/ui/document-editor/block-morph.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-selection.mjs +81 -0
- package/dist/components/ui/document-editor/block-selection.mjs.map +1 -0
- package/dist/components/ui/document-editor/blocks.mjs +30 -0
- package/dist/components/ui/document-editor/blocks.mjs.map +1 -0
- package/dist/components/ui/document-editor/bubble-menu.mjs +120 -0
- package/dist/components/ui/document-editor/bubble-menu.mjs.map +1 -0
- package/dist/components/ui/document-editor/code-block.mjs +89 -0
- package/dist/components/ui/document-editor/code-block.mjs.map +1 -0
- package/dist/components/ui/document-editor/collaboration-types.mjs +9 -0
- package/dist/components/ui/document-editor/collaboration-types.mjs.map +1 -0
- package/dist/components/ui/document-editor/collaboration.mjs +198 -0
- package/dist/components/ui/document-editor/collaboration.mjs.map +1 -0
- package/dist/components/ui/document-editor/columns.mjs +52 -0
- package/dist/components/ui/document-editor/columns.mjs.map +1 -0
- package/dist/components/ui/document-editor/contents.mjs +60 -0
- package/dist/components/ui/document-editor/contents.mjs.map +1 -0
- package/dist/components/ui/document-editor/date-chip.mjs +115 -0
- package/dist/components/ui/document-editor/date-chip.mjs.map +1 -0
- package/dist/components/ui/document-editor/date-words.mjs +101 -0
- package/dist/components/ui/document-editor/date-words.mjs.map +1 -0
- package/dist/components/ui/document-editor/doc-labels.mjs +19 -0
- package/dist/components/ui/document-editor/doc-labels.mjs.map +1 -0
- package/dist/components/ui/document-editor/document-editor.mjs +496 -0
- package/dist/components/ui/document-editor/document-editor.mjs.map +1 -0
- package/dist/components/ui/document-editor/emoji-suggest.mjs +81 -0
- package/dist/components/ui/document-editor/emoji-suggest.mjs.map +1 -0
- package/dist/components/ui/document-editor/focus-mode.mjs +32 -0
- package/dist/components/ui/document-editor/focus-mode.mjs.map +1 -0
- package/dist/components/ui/document-editor/geometry.mjs +35 -0
- package/dist/components/ui/document-editor/geometry.mjs.map +1 -0
- package/dist/components/ui/document-editor/ghost-text.mjs +154 -0
- package/dist/components/ui/document-editor/ghost-text.mjs.map +1 -0
- package/dist/components/ui/document-editor/gliding-caret.mjs +118 -0
- package/dist/components/ui/document-editor/gliding-caret.mjs.map +1 -0
- package/dist/components/ui/document-editor/headings.mjs +64 -0
- package/dist/components/ui/document-editor/headings.mjs.map +1 -0
- package/dist/components/ui/document-editor/image.mjs +318 -0
- package/dist/components/ui/document-editor/image.mjs.map +1 -0
- package/dist/components/ui/document-editor/index.mjs +131 -0
- package/dist/components/ui/document-editor/index.mjs.map +1 -0
- package/dist/components/ui/document-editor/labels.mjs +96 -0
- package/dist/components/ui/document-editor/labels.mjs.map +1 -0
- package/dist/components/ui/document-editor/link-card.mjs +138 -0
- package/dist/components/ui/document-editor/link-card.mjs.map +1 -0
- package/dist/components/ui/document-editor/mentions.mjs +105 -0
- package/dist/components/ui/document-editor/mentions.mjs.map +1 -0
- package/dist/components/ui/document-editor/outline.mjs +138 -0
- package/dist/components/ui/document-editor/outline.mjs.map +1 -0
- package/dist/components/ui/document-editor/section-fold.mjs +124 -0
- package/dist/components/ui/document-editor/section-fold.mjs.map +1 -0
- package/dist/components/ui/document-editor/slash-command.mjs +210 -0
- package/dist/components/ui/document-editor/slash-command.mjs.map +1 -0
- package/dist/components/ui/document-editor/suggest-list.mjs +187 -0
- package/dist/components/ui/document-editor/suggest-list.mjs.map +1 -0
- package/dist/components/ui/document-editor/table.mjs +242 -0
- package/dist/components/ui/document-editor/table.mjs.map +1 -0
- package/dist/components/ui/document-editor/templates.mjs +66 -0
- package/dist/components/ui/document-editor/templates.mjs.map +1 -0
- package/dist/components/ui/document-editor/toggle.mjs +176 -0
- package/dist/components/ui/document-editor/toggle.mjs.map +1 -0
- package/dist/components/ui/document-editor/typography-rules.mjs +8 -0
- package/dist/components/ui/document-editor/typography-rules.mjs.map +1 -0
- package/dist/components/ui/document-editor/use-editor-value.mjs +34 -0
- package/dist/components/ui/document-editor/use-editor-value.mjs.map +1 -0
- package/dist/components/ui/drawer/drawer-nav.mjs +153 -0
- package/dist/components/ui/drawer/drawer-nav.mjs.map +1 -0
- package/dist/components/ui/drawer/drawer.mjs +334 -0
- package/dist/components/ui/drawer/drawer.mjs.map +1 -0
- package/dist/components/ui/drawer/index.mjs +37 -0
- package/dist/components/ui/drawer/index.mjs.map +1 -0
- package/dist/components/ui/drawer/use-swipe-to-close.mjs +77 -0
- package/dist/components/ui/drawer/use-swipe-to-close.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.mjs +567 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu/index.mjs +43 -0
- package/dist/components/ui/dropdown-menu/index.mjs.map +1 -0
- package/dist/components/ui/editable-text/editable-text.mjs +148 -0
- package/dist/components/ui/editable-text/editable-text.mjs.map +1 -0
- package/dist/components/ui/editable-text/index.mjs +6 -0
- package/dist/components/ui/editable-text/index.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/emoji-data.mjs +469 -0
- package/dist/components/ui/emoji-picker/emoji-data.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/emoji-picker.mjs +464 -0
- package/dist/components/ui/emoji-picker/emoji-picker.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/index.mjs +19 -0
- package/dist/components/ui/emoji-picker/index.mjs.map +1 -0
- package/dist/components/ui/empty-state/empty-state.mjs +110 -0
- package/dist/components/ui/empty-state/empty-state.mjs.map +1 -0
- package/dist/components/ui/empty-state/index.mjs +17 -0
- package/dist/components/ui/empty-state/index.mjs.map +1 -0
- package/dist/components/ui/event-calendar/calendar-math.mjs +256 -0
- package/dist/components/ui/event-calendar/calendar-math.mjs.map +1 -0
- package/dist/components/ui/event-calendar/context.mjs +51 -0
- package/dist/components/ui/event-calendar/context.mjs.map +1 -0
- package/dist/components/ui/event-calendar/editor.mjs +292 -0
- package/dist/components/ui/event-calendar/editor.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-block.mjs +55 -0
- package/dist/components/ui/event-calendar/event-block.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-calendar.mjs +438 -0
- package/dist/components/ui/event-calendar/event-calendar.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-keys.mjs +41 -0
- package/dist/components/ui/event-calendar/event-keys.mjs.map +1 -0
- package/dist/components/ui/event-calendar/index.mjs +37 -0
- package/dist/components/ui/event-calendar/index.mjs.map +1 -0
- package/dist/components/ui/event-calendar/month-grid.mjs +207 -0
- package/dist/components/ui/event-calendar/month-grid.mjs.map +1 -0
- package/dist/components/ui/event-calendar/narrow.mjs +193 -0
- package/dist/components/ui/event-calendar/narrow.mjs.map +1 -0
- package/dist/components/ui/event-calendar/time-grid.mjs +534 -0
- package/dist/components/ui/event-calendar/time-grid.mjs.map +1 -0
- package/dist/components/ui/expandable-search/expandable-search.mjs +174 -0
- package/dist/components/ui/expandable-search/expandable-search.mjs.map +1 -0
- package/dist/components/ui/expandable-search/index.mjs +6 -0
- package/dist/components/ui/expandable-search/index.mjs.map +1 -0
- package/dist/components/ui/field/field.mjs +444 -0
- package/dist/components/ui/field/field.mjs.map +1 -0
- package/dist/components/ui/field/index.mjs +21 -0
- package/dist/components/ui/field/index.mjs.map +1 -0
- package/dist/components/ui/file-card/file-card.mjs +198 -0
- package/dist/components/ui/file-card/file-card.mjs.map +1 -0
- package/dist/components/ui/file-card/file-icon.mjs +66 -0
- package/dist/components/ui/file-card/file-icon.mjs.map +1 -0
- package/dist/components/ui/file-card/file-types.mjs +70 -0
- package/dist/components/ui/file-card/file-types.mjs.map +1 -0
- package/dist/components/ui/file-card/index.mjs +32 -0
- package/dist/components/ui/file-card/index.mjs.map +1 -0
- package/dist/components/ui/file-preview/context.mjs +77 -0
- package/dist/components/ui/file-preview/context.mjs.map +1 -0
- package/dist/components/ui/file-preview/file-preview.mjs +865 -0
- package/dist/components/ui/file-preview/file-preview.mjs.map +1 -0
- package/dist/components/ui/file-preview/index.mjs +56 -0
- package/dist/components/ui/file-preview/index.mjs.map +1 -0
- package/dist/components/ui/file-preview/pdf.mjs +250 -0
- package/dist/components/ui/file-preview/pdf.mjs.map +1 -0
- package/dist/components/ui/file-preview/renderers.mjs +257 -0
- package/dist/components/ui/file-preview/renderers.mjs.map +1 -0
- package/dist/components/ui/file-upload/file-upload.mjs +633 -0
- package/dist/components/ui/file-upload/file-upload.mjs.map +1 -0
- package/dist/components/ui/file-upload/index.mjs +42 -0
- package/dist/components/ui/file-upload/index.mjs.map +1 -0
- package/dist/components/ui/file-upload/validate.mjs +111 -0
- package/dist/components/ui/file-upload/validate.mjs.map +1 -0
- package/dist/components/ui/flag/flag.mjs +39 -0
- package/dist/components/ui/flag/flag.mjs.map +1 -0
- package/dist/components/ui/flag/index.mjs +7 -0
- package/dist/components/ui/flag/index.mjs.map +1 -0
- package/dist/components/ui/floating-window/floating-window.mjs +255 -0
- package/dist/components/ui/floating-window/floating-window.mjs.map +1 -0
- package/dist/components/ui/floating-window/index.mjs +11 -0
- package/dist/components/ui/floating-window/index.mjs.map +1 -0
- package/dist/components/ui/form/form-section.mjs +87 -0
- package/dist/components/ui/form/form-section.mjs.map +1 -0
- package/dist/components/ui/form/form.mjs +205 -0
- package/dist/components/ui/form/form.mjs.map +1 -0
- package/dist/components/ui/form/index.mjs +29 -0
- package/dist/components/ui/form/index.mjs.map +1 -0
- package/dist/components/ui/globe/globe-data.mjs +9 -0
- package/dist/components/ui/globe/globe-data.mjs.map +1 -0
- package/dist/components/ui/globe/globe-math.mjs +269 -0
- package/dist/components/ui/globe/globe-math.mjs.map +1 -0
- package/dist/components/ui/globe/globe.mjs +719 -0
- package/dist/components/ui/globe/globe.mjs.map +1 -0
- package/dist/components/ui/globe/index.mjs +13 -0
- package/dist/components/ui/globe/index.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-children.mjs +13 -0
- package/dist/components/ui/highlight-match/highlight-children.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-match-variants.mjs +17 -0
- package/dist/components/ui/highlight-match/highlight-match-variants.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-match.mjs +37 -0
- package/dist/components/ui/highlight-match/highlight-match.mjs.map +1 -0
- package/dist/components/ui/highlight-match/index.mjs +15 -0
- package/dist/components/ui/highlight-match/index.mjs.map +1 -0
- package/dist/components/ui/highlight-match/match-ranges.mjs +50 -0
- package/dist/components/ui/highlight-match/match-ranges.mjs.map +1 -0
- package/dist/components/ui/histogram-slider/histogram-slider.mjs +83 -0
- package/dist/components/ui/histogram-slider/histogram-slider.mjs.map +1 -0
- package/dist/components/ui/histogram-slider/index.mjs +6 -0
- package/dist/components/ui/histogram-slider/index.mjs.map +1 -0
- package/dist/components/ui/hold-button/hold-button.mjs +258 -0
- package/dist/components/ui/hold-button/hold-button.mjs.map +1 -0
- package/dist/components/ui/hold-button/index.mjs +6 -0
- package/dist/components/ui/hold-button/index.mjs.map +1 -0
- package/dist/components/ui/hover-card/hover-card.mjs +111 -0
- package/dist/components/ui/hover-card/hover-card.mjs.map +1 -0
- package/dist/components/ui/hover-card/index.mjs +21 -0
- package/dist/components/ui/hover-card/index.mjs.map +1 -0
- package/dist/components/ui/ink-tray/index.mjs +29 -0
- package/dist/components/ui/ink-tray/index.mjs.map +1 -0
- package/dist/components/ui/ink-tray/ink-tray-art.mjs +68 -0
- package/dist/components/ui/ink-tray/ink-tray-art.mjs.map +1 -0
- package/dist/components/ui/ink-tray/ink-tray.mjs +350 -0
- package/dist/components/ui/ink-tray/ink-tray.mjs.map +1 -0
- package/dist/components/ui/input/index.mjs +41 -0
- package/dist/components/ui/input/index.mjs.map +1 -0
- package/dist/components/ui/input/input.mjs +268 -0
- package/dist/components/ui/input/input.mjs.map +1 -0
- package/dist/components/ui/input/number-input.mjs +272 -0
- package/dist/components/ui/input/number-input.mjs.map +1 -0
- package/dist/components/ui/input/password-input.mjs +49 -0
- package/dist/components/ui/input/password-input.mjs.map +1 -0
- package/dist/components/ui/input/phone-input-countries.mjs +216 -0
- package/dist/components/ui/input/phone-input-countries.mjs.map +1 -0
- package/dist/components/ui/input/phone-input.mjs +326 -0
- package/dist/components/ui/input/phone-input.mjs.map +1 -0
- package/dist/components/ui/input/use-controllable-state.mjs +24 -0
- package/dist/components/ui/input/use-controllable-state.mjs.map +1 -0
- package/dist/components/ui/input/use-hold-repeat.mjs +35 -0
- package/dist/components/ui/input/use-hold-repeat.mjs.map +1 -0
- package/dist/components/ui/input-group/index.mjs +11 -0
- package/dist/components/ui/input-group/index.mjs.map +1 -0
- package/dist/components/ui/input-group/input-group.mjs +78 -0
- package/dist/components/ui/input-group/input-group.mjs.map +1 -0
- package/dist/components/ui/island/index.mjs +23 -0
- package/dist/components/ui/island/index.mjs.map +1 -0
- package/dist/components/ui/island/island.mjs +328 -0
- package/dist/components/ui/island/island.mjs.map +1 -0
- package/dist/components/ui/kbd/index.mjs +6 -0
- package/dist/components/ui/kbd/index.mjs.map +1 -0
- package/dist/components/ui/kbd/kbd.mjs +73 -0
- package/dist/components/ui/kbd/kbd.mjs.map +1 -0
- package/dist/components/ui/keypad/index.mjs +23 -0
- package/dist/components/ui/keypad/index.mjs.map +1 -0
- package/dist/components/ui/keypad/keypad.mjs +345 -0
- package/dist/components/ui/keypad/keypad.mjs.map +1 -0
- package/dist/components/ui/label/index.mjs +7 -0
- package/dist/components/ui/label/index.mjs.map +1 -0
- package/dist/components/ui/label/label.mjs +117 -0
- package/dist/components/ui/label/label.mjs.map +1 -0
- package/dist/components/ui/lightbox/index.mjs +47 -0
- package/dist/components/ui/lightbox/index.mjs.map +1 -0
- package/dist/components/ui/lightbox/labels.mjs +23 -0
- package/dist/components/ui/lightbox/labels.mjs.map +1 -0
- package/dist/components/ui/lightbox/lightbox.mjs +1359 -0
- package/dist/components/ui/lightbox/lightbox.mjs.map +1 -0
- package/dist/components/ui/link/index.mjs +6 -0
- package/dist/components/ui/link/index.mjs.map +1 -0
- package/dist/components/ui/link/link.mjs +64 -0
- package/dist/components/ui/link/link.mjs.map +1 -0
- package/dist/components/ui/list/index.mjs +35 -0
- package/dist/components/ui/list/index.mjs.map +1 -0
- package/dist/components/ui/list/list.mjs +505 -0
- package/dist/components/ui/list/list.mjs.map +1 -0
- package/dist/components/ui/load-more/index.mjs +23 -0
- package/dist/components/ui/load-more/index.mjs.map +1 -0
- package/dist/components/ui/load-more/load-more.mjs +409 -0
- package/dist/components/ui/load-more/load-more.mjs.map +1 -0
- package/dist/components/ui/map/index.mjs +27 -0
- package/dist/components/ui/map/index.mjs.map +1 -0
- package/dist/components/ui/map/map-style.mjs +169 -0
- package/dist/components/ui/map/map-style.mjs.map +1 -0
- package/dist/components/ui/map/map.mjs +624 -0
- package/dist/components/ui/map/map.mjs.map +1 -0
- package/dist/components/ui/map-pin/index.mjs +6 -0
- package/dist/components/ui/map-pin/index.mjs.map +1 -0
- package/dist/components/ui/map-pin/map-pin.mjs +55 -0
- package/dist/components/ui/map-pin/map-pin.mjs.map +1 -0
- package/dist/components/ui/mention/index.mjs +29 -0
- package/dist/components/ui/mention/index.mjs.map +1 -0
- package/dist/components/ui/mention/mention.mjs +262 -0
- package/dist/components/ui/mention/mention.mjs.map +1 -0
- package/dist/components/ui/mention/split-mentions.mjs +24 -0
- package/dist/components/ui/mention/split-mentions.mjs.map +1 -0
- package/dist/components/ui/menubar/index.mjs +39 -0
- package/dist/components/ui/menubar/index.mjs.map +1 -0
- package/dist/components/ui/menubar/menubar.mjs +222 -0
- package/dist/components/ui/menubar/menubar.mjs.map +1 -0
- package/dist/components/ui/meter/index.mjs +21 -0
- package/dist/components/ui/meter/index.mjs.map +1 -0
- package/dist/components/ui/meter/meter.mjs +167 -0
- package/dist/components/ui/meter/meter.mjs.map +1 -0
- package/dist/components/ui/multi-select/index.mjs +25 -0
- package/dist/components/ui/multi-select/index.mjs.map +1 -0
- package/dist/components/ui/multi-select/multi-select.mjs +285 -0
- package/dist/components/ui/multi-select/multi-select.mjs.map +1 -0
- package/dist/components/ui/navigation-menu/index.mjs +41 -0
- package/dist/components/ui/navigation-menu/index.mjs.map +1 -0
- package/dist/components/ui/navigation-menu/navigation-menu.mjs +396 -0
- package/dist/components/ui/navigation-menu/navigation-menu.mjs.map +1 -0
- package/dist/components/ui/notebook-page/index.mjs +15 -0
- package/dist/components/ui/notebook-page/index.mjs.map +1 -0
- package/dist/components/ui/notebook-page/notebook-page.mjs +162 -0
- package/dist/components/ui/notebook-page/notebook-page.mjs.map +1 -0
- package/dist/components/ui/notification-inbox/index.mjs +47 -0
- package/dist/components/ui/notification-inbox/index.mjs.map +1 -0
- package/dist/components/ui/notification-inbox/notification-inbox.mjs +422 -0
- package/dist/components/ui/notification-inbox/notification-inbox.mjs.map +1 -0
- package/dist/components/ui/number-field/index.mjs +24 -0
- package/dist/components/ui/number-field/index.mjs.map +1 -0
- package/dist/components/ui/number-field/number-field.mjs +460 -0
- package/dist/components/ui/number-field/number-field.mjs.map +1 -0
- package/dist/components/ui/number-field/number-format.mjs +48 -0
- package/dist/components/ui/number-field/number-format.mjs.map +1 -0
- package/dist/components/ui/otp-input/index.mjs +9 -0
- package/dist/components/ui/otp-input/index.mjs.map +1 -0
- package/dist/components/ui/otp-input/otp-input.mjs +285 -0
- package/dist/components/ui/otp-input/otp-input.mjs.map +1 -0
- package/dist/components/ui/pager/index.mjs +7 -0
- package/dist/components/ui/pager/index.mjs.map +1 -0
- package/dist/components/ui/pager/pager.mjs +86 -0
- package/dist/components/ui/pager/pager.mjs.map +1 -0
- package/dist/components/ui/pagination/index.mjs +23 -0
- package/dist/components/ui/pagination/index.mjs.map +1 -0
- package/dist/components/ui/pagination/pagination.mjs +210 -0
- package/dist/components/ui/pagination/pagination.mjs.map +1 -0
- package/dist/components/ui/password-strength/index.mjs +21 -0
- package/dist/components/ui/password-strength/index.mjs.map +1 -0
- package/dist/components/ui/password-strength/password-rules.mjs +25 -0
- package/dist/components/ui/password-strength/password-rules.mjs.map +1 -0
- package/dist/components/ui/password-strength/password-strength.mjs +125 -0
- package/dist/components/ui/password-strength/password-strength.mjs.map +1 -0
- package/dist/components/ui/popover/index.mjs +31 -0
- package/dist/components/ui/popover/index.mjs.map +1 -0
- package/dist/components/ui/popover/popover.mjs +574 -0
- package/dist/components/ui/popover/popover.mjs.map +1 -0
- package/dist/components/ui/progress/index.mjs +15 -0
- package/dist/components/ui/progress/index.mjs.map +1 -0
- package/dist/components/ui/progress/progress.mjs +224 -0
- package/dist/components/ui/progress/progress.mjs.map +1 -0
- package/dist/components/ui/prose/index.mjs +6 -0
- package/dist/components/ui/prose/index.mjs.map +1 -0
- package/dist/components/ui/prose/prose.mjs +89 -0
- package/dist/components/ui/prose/prose.mjs.map +1 -0
- package/dist/components/ui/radio-group/index.mjs +15 -0
- package/dist/components/ui/radio-group/index.mjs.map +1 -0
- package/dist/components/ui/radio-group/radio-group.mjs +88 -0
- package/dist/components/ui/radio-group/radio-group.mjs.map +1 -0
- package/dist/components/ui/rating/index.mjs +6 -0
- package/dist/components/ui/rating/index.mjs.map +1 -0
- package/dist/components/ui/rating/rating.mjs +119 -0
- package/dist/components/ui/rating/rating.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/bubble-menu.mjs +120 -0
- package/dist/components/ui/rich-text-editor/bubble-menu.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/image-links.mjs +63 -0
- package/dist/components/ui/rich-text-editor/image-links.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/index.mjs +37 -0
- package/dist/components/ui/rich-text-editor/index.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/labels.mjs +27 -0
- package/dist/components/ui/rich-text-editor/labels.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.mjs +149 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/toolbar.mjs +325 -0
- package/dist/components/ui/rich-text-editor/toolbar.mjs.map +1 -0
- package/dist/components/ui/save-bar/index.mjs +13 -0
- package/dist/components/ui/save-bar/index.mjs.map +1 -0
- package/dist/components/ui/save-bar/save-bar.mjs +59 -0
- package/dist/components/ui/save-bar/save-bar.mjs.map +1 -0
- package/dist/components/ui/scroll-area/index.mjs +6 -0
- package/dist/components/ui/scroll-area/index.mjs.map +1 -0
- package/dist/components/ui/scroll-area/scroll-area.mjs +148 -0
- package/dist/components/ui/scroll-area/scroll-area.mjs.map +1 -0
- package/dist/components/ui/scroll-area/use-drag-scroll.mjs +134 -0
- package/dist/components/ui/scroll-area/use-drag-scroll.mjs.map +1 -0
- package/dist/components/ui/select/index.mjs +23 -0
- package/dist/components/ui/select/index.mjs.map +1 -0
- package/dist/components/ui/select/select.mjs +216 -0
- package/dist/components/ui/select/select.mjs.map +1 -0
- package/dist/components/ui/sheet/index.mjs +23 -0
- package/dist/components/ui/sheet/index.mjs.map +1 -0
- package/dist/components/ui/sheet/sheet.mjs +292 -0
- package/dist/components/ui/sheet/sheet.mjs.map +1 -0
- package/dist/components/ui/sidebar/index.mjs +122 -0
- package/dist/components/ui/sidebar/index.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-group.mjs +75 -0
- package/dist/components/ui/sidebar/sidebar-group.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-item.mjs +199 -0
- package/dist/components/ui/sidebar/sidebar-item.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-panels.mjs +182 -0
- package/dist/components/ui/sidebar/sidebar-panels.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-peek.mjs +324 -0
- package/dist/components/ui/sidebar/sidebar-peek.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-rich.mjs +65 -0
- package/dist/components/ui/sidebar/sidebar-rich.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-tree.mjs +224 -0
- package/dist/components/ui/sidebar/sidebar-tree.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar.mjs +205 -0
- package/dist/components/ui/sidebar/sidebar.mjs.map +1 -0
- package/dist/components/ui/sidebar/variants.mjs +396 -0
- package/dist/components/ui/sidebar/variants.mjs.map +1 -0
- package/dist/components/ui/signature/index.mjs +6 -0
- package/dist/components/ui/signature/index.mjs.map +1 -0
- package/dist/components/ui/signature/signature.mjs +145 -0
- package/dist/components/ui/signature/signature.mjs.map +1 -0
- package/dist/components/ui/signature-pad/index.mjs +19 -0
- package/dist/components/ui/signature-pad/index.mjs.map +1 -0
- package/dist/components/ui/signature-pad/signature-pad.mjs +210 -0
- package/dist/components/ui/signature-pad/signature-pad.mjs.map +1 -0
- package/dist/components/ui/signature-pad/strokes.mjs +68 -0
- package/dist/components/ui/signature-pad/strokes.mjs.map +1 -0
- package/dist/components/ui/skeleton/index.mjs +9 -0
- package/dist/components/ui/skeleton/index.mjs.map +1 -0
- package/dist/components/ui/skeleton/skeleton.mjs +58 -0
- package/dist/components/ui/skeleton/skeleton.mjs.map +1 -0
- package/dist/components/ui/slide/index.mjs +25 -0
- package/dist/components/ui/slide/index.mjs.map +1 -0
- package/dist/components/ui/slide/slide.mjs +159 -0
- package/dist/components/ui/slide/slide.mjs.map +1 -0
- package/dist/components/ui/slider/index.mjs +21 -0
- package/dist/components/ui/slider/index.mjs.map +1 -0
- package/dist/components/ui/slider/slider-input.mjs +449 -0
- package/dist/components/ui/slider/slider-input.mjs.map +1 -0
- package/dist/components/ui/slider/slider.mjs +235 -0
- package/dist/components/ui/slider/slider.mjs.map +1 -0
- package/dist/components/ui/slides/index.mjs +31 -0
- package/dist/components/ui/slides/index.mjs.map +1 -0
- package/dist/components/ui/slides/slides.mjs +890 -0
- package/dist/components/ui/slides/slides.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/index.mjs +17 -0
- package/dist/components/ui/smooth-anchors/index.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/smooth-anchors.mjs +75 -0
- package/dist/components/ui/smooth-anchors/smooth-anchors.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/smooth-scroll.mjs +87 -0
- package/dist/components/ui/smooth-anchors/smooth-scroll.mjs.map +1 -0
- package/dist/components/ui/spinner/index.mjs +6 -0
- package/dist/components/ui/spinner/index.mjs.map +1 -0
- package/dist/components/ui/spinner/spinner.mjs +49 -0
- package/dist/components/ui/spinner/spinner.mjs.map +1 -0
- package/dist/components/ui/stat/index.mjs +29 -0
- package/dist/components/ui/stat/index.mjs.map +1 -0
- package/dist/components/ui/stat/stat.mjs +226 -0
- package/dist/components/ui/stat/stat.mjs.map +1 -0
- package/dist/components/ui/status-bar/index.mjs +17 -0
- package/dist/components/ui/status-bar/index.mjs.map +1 -0
- package/dist/components/ui/status-bar/status-bar.mjs +96 -0
- package/dist/components/ui/status-bar/status-bar.mjs.map +1 -0
- package/dist/components/ui/stepper/index.mjs +25 -0
- package/dist/components/ui/stepper/index.mjs.map +1 -0
- package/dist/components/ui/stepper/stepper.mjs +235 -0
- package/dist/components/ui/stepper/stepper.mjs.map +1 -0
- package/dist/components/ui/steps/index.mjs +9 -0
- package/dist/components/ui/steps/index.mjs.map +1 -0
- package/dist/components/ui/steps/steps.mjs +70 -0
- package/dist/components/ui/steps/steps.mjs.map +1 -0
- package/dist/components/ui/swatch-grid/index.mjs +7 -0
- package/dist/components/ui/swatch-grid/index.mjs.map +1 -0
- package/dist/components/ui/swatch-grid/swatch-grid.mjs +110 -0
- package/dist/components/ui/swatch-grid/swatch-grid.mjs.map +1 -0
- package/dist/components/ui/switch/index.mjs +7 -0
- package/dist/components/ui/switch/index.mjs.map +1 -0
- package/dist/components/ui/switch/switch.mjs +79 -0
- package/dist/components/ui/switch/switch.mjs.map +1 -0
- package/dist/components/ui/tab-strip/index.mjs +13 -0
- package/dist/components/ui/tab-strip/index.mjs.map +1 -0
- package/dist/components/ui/tab-strip/tab-strip.mjs +244 -0
- package/dist/components/ui/tab-strip/tab-strip.mjs.map +1 -0
- package/dist/components/ui/table/index.mjs +27 -0
- package/dist/components/ui/table/index.mjs.map +1 -0
- package/dist/components/ui/table/table.mjs +290 -0
- package/dist/components/ui/table/table.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/index.mjs +20 -0
- package/dist/components/ui/table-of-contents/index.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/scroll-spy.mjs +60 -0
- package/dist/components/ui/table-of-contents/scroll-spy.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/table-of-contents.mjs +371 -0
- package/dist/components/ui/table-of-contents/table-of-contents.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/use-headings.mjs +40 -0
- package/dist/components/ui/table-of-contents/use-headings.mjs.map +1 -0
- package/dist/components/ui/tablet-frame/index.mjs +7 -0
- package/dist/components/ui/tablet-frame/index.mjs.map +1 -0
- package/dist/components/ui/tablet-frame/tablet-frame.mjs +48 -0
- package/dist/components/ui/tablet-frame/tablet-frame.mjs.map +1 -0
- package/dist/components/ui/tabs/index.mjs +25 -0
- package/dist/components/ui/tabs/index.mjs.map +1 -0
- package/dist/components/ui/tabs/tabs.mjs +382 -0
- package/dist/components/ui/tabs/tabs.mjs.map +1 -0
- package/dist/components/ui/tabs/use-tabs-indicator.mjs +90 -0
- package/dist/components/ui/tabs/use-tabs-indicator.mjs.map +1 -0
- package/dist/components/ui/tags-input/index.mjs +9 -0
- package/dist/components/ui/tags-input/index.mjs.map +1 -0
- package/dist/components/ui/tags-input/split.mjs +38 -0
- package/dist/components/ui/tags-input/split.mjs.map +1 -0
- package/dist/components/ui/tags-input/tags-input.mjs +328 -0
- package/dist/components/ui/tags-input/tags-input.mjs.map +1 -0
- package/dist/components/ui/terminal/index.mjs +41 -0
- package/dist/components/ui/terminal/index.mjs.map +1 -0
- package/dist/components/ui/terminal/terminal.mjs +287 -0
- package/dist/components/ui/terminal/terminal.mjs.map +1 -0
- package/dist/components/ui/textarea/index.mjs +21 -0
- package/dist/components/ui/textarea/index.mjs.map +1 -0
- package/dist/components/ui/textarea/textarea.mjs +244 -0
- package/dist/components/ui/textarea/textarea.mjs.map +1 -0
- package/dist/components/ui/theme-provider/index.mjs +6 -0
- package/dist/components/ui/theme-provider/index.mjs.map +1 -0
- package/dist/components/ui/theme-provider/theme-provider.mjs +70 -0
- package/dist/components/ui/theme-provider/theme-provider.mjs.map +1 -0
- package/dist/components/ui/toast/index.mjs +19 -0
- package/dist/components/ui/toast/index.mjs.map +1 -0
- package/dist/components/ui/toast/store.mjs +96 -0
- package/dist/components/ui/toast/store.mjs.map +1 -0
- package/dist/components/ui/toast/toast.mjs +395 -0
- package/dist/components/ui/toast/toast.mjs.map +1 -0
- package/dist/components/ui/toggle/index.mjs +13 -0
- package/dist/components/ui/toggle/index.mjs.map +1 -0
- package/dist/components/ui/toggle/toggle.mjs +123 -0
- package/dist/components/ui/toggle/toggle.mjs.map +1 -0
- package/dist/components/ui/toggle-group/index.mjs +11 -0
- package/dist/components/ui/toggle-group/index.mjs.map +1 -0
- package/dist/components/ui/toggle-group/toggle-group.mjs +243 -0
- package/dist/components/ui/toggle-group/toggle-group.mjs.map +1 -0
- package/dist/components/ui/toggletip/index.mjs +6 -0
- package/dist/components/ui/toggletip/index.mjs.map +1 -0
- package/dist/components/ui/toggletip/toggletip.mjs +95 -0
- package/dist/components/ui/toggletip/toggletip.mjs.map +1 -0
- package/dist/components/ui/toolbar/index.mjs +21 -0
- package/dist/components/ui/toolbar/index.mjs.map +1 -0
- package/dist/components/ui/toolbar/toolbar.mjs +130 -0
- package/dist/components/ui/toolbar/toolbar.mjs.map +1 -0
- package/dist/components/ui/tooltip/index.mjs +29 -0
- package/dist/components/ui/tooltip/index.mjs.map +1 -0
- package/dist/components/ui/tooltip/tooltip.mjs +640 -0
- package/dist/components/ui/tooltip/tooltip.mjs.map +1 -0
- package/dist/components/ui/tree/index.mjs +11 -0
- package/dist/components/ui/tree/index.mjs.map +1 -0
- package/dist/components/ui/tree/tree.mjs +450 -0
- package/dist/components/ui/tree/tree.mjs.map +1 -0
- package/dist/index.d.mts +19397 -0
- package/dist/index.mjs +157 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/color.mjs +78 -0
- package/dist/lib/color.mjs.map +1 -0
- package/dist/lib/create-context.mjs +31 -0
- package/dist/lib/create-context.mjs.map +1 -0
- package/dist/lib/date.mjs +116 -0
- package/dist/lib/date.mjs.map +1 -0
- package/dist/lib/density.mjs +79 -0
- package/dist/lib/density.mjs.map +1 -0
- package/dist/lib/field-context.mjs +13 -0
- package/dist/lib/field-context.mjs.map +1 -0
- package/dist/lib/filter.mjs +28 -0
- package/dist/lib/filter.mjs.map +1 -0
- package/dist/lib/gesture.mjs +38 -0
- package/dist/lib/gesture.mjs.map +1 -0
- package/dist/lib/hit-area.mjs +14 -0
- package/dist/lib/hit-area.mjs.map +1 -0
- package/dist/lib/labels.mjs +27 -0
- package/dist/lib/labels.mjs.map +1 -0
- package/dist/lib/morph-box.mjs +56 -0
- package/dist/lib/morph-box.mjs.map +1 -0
- package/dist/lib/motion.mjs +70 -0
- package/dist/lib/motion.mjs.map +1 -0
- package/dist/lib/pulse.mjs +69 -0
- package/dist/lib/pulse.mjs.map +1 -0
- package/dist/lib/roving-focus.mjs +74 -0
- package/dist/lib/roving-focus.mjs.map +1 -0
- package/dist/lib/theme.mjs +67 -0
- package/dist/lib/theme.mjs.map +1 -0
- package/dist/lib/tv.mjs +11 -0
- package/dist/lib/tv.mjs.map +1 -0
- package/dist/lib/utils.mjs +82 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +133 -4
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
export * from "./components/ui/accordion/index.mjs";
|
|
2
|
+
export * from "./components/ui/activity-feed/index.mjs";
|
|
3
|
+
export * from "./components/ui/alert/index.mjs";
|
|
4
|
+
export * from "./components/ui/animated-label/index.mjs";
|
|
5
|
+
export * from "./components/ui/animated-number/index.mjs";
|
|
6
|
+
export * from "./components/ui/avatar/index.mjs";
|
|
7
|
+
export * from "./components/ui/avatar-group/index.mjs";
|
|
8
|
+
export * from "./components/ui/badge/index.mjs";
|
|
9
|
+
export * from "./components/ui/badge-group/index.mjs";
|
|
10
|
+
export * from "./components/ui/breadcrumb/index.mjs";
|
|
11
|
+
export * from "./components/ui/button/index.mjs";
|
|
12
|
+
export * from "./components/ui/button-group/index.mjs";
|
|
13
|
+
export * from "./components/ui/card/index.mjs";
|
|
14
|
+
export * from "./components/ui/chart/index.mjs";
|
|
15
|
+
export * from "./components/ui/checkbox/index.mjs";
|
|
16
|
+
export * from "./components/ui/checklist/index.mjs";
|
|
17
|
+
export * from "./components/ui/chip/index.mjs";
|
|
18
|
+
export * from "./components/ui/chip-group/index.mjs";
|
|
19
|
+
export * from "./components/ui/code-snippet/index.mjs";
|
|
20
|
+
export * from "./components/ui/collapsible/index.mjs";
|
|
21
|
+
export * from "./components/ui/color-picker/index.mjs";
|
|
22
|
+
export * from "./components/ui/combobox/index.mjs";
|
|
23
|
+
export * from "./components/ui/command/index.mjs";
|
|
24
|
+
export * from "./components/ui/compare-slider/index.mjs";
|
|
25
|
+
export * from "./components/ui/context-menu/index.mjs";
|
|
26
|
+
export * from "./components/ui/data-table/index.mjs";
|
|
27
|
+
export * from "./components/ui/date-picker/index.mjs";
|
|
28
|
+
export * from "./components/ui/description-list/index.mjs";
|
|
29
|
+
export * from "./components/ui/dialog/index.mjs";
|
|
30
|
+
export * from "./components/ui/divider/index.mjs";
|
|
31
|
+
export * from "./components/ui/dock/index.mjs";
|
|
32
|
+
export * from "./components/ui/document-editor/index.mjs";
|
|
33
|
+
export * from "./components/ui/drawer/index.mjs";
|
|
34
|
+
export * from "./components/ui/dropdown-menu/index.mjs";
|
|
35
|
+
export * from "./components/ui/editable-text/index.mjs";
|
|
36
|
+
export * from "./components/ui/emoji-picker/index.mjs";
|
|
37
|
+
export * from "./components/ui/empty-state/index.mjs";
|
|
38
|
+
export * from "./components/ui/event-calendar/index.mjs";
|
|
39
|
+
export * from "./components/ui/expandable-search/index.mjs";
|
|
40
|
+
export * from "./components/ui/field/index.mjs";
|
|
41
|
+
export * from "./components/ui/file-card/index.mjs";
|
|
42
|
+
export * from "./components/ui/file-preview/index.mjs";
|
|
43
|
+
export * from "./components/ui/file-upload/index.mjs";
|
|
44
|
+
export * from "./components/ui/flag/index.mjs";
|
|
45
|
+
export * from "./components/ui/floating-window/index.mjs";
|
|
46
|
+
export * from "./components/ui/form/index.mjs";
|
|
47
|
+
export * from "./components/ui/globe/index.mjs";
|
|
48
|
+
export * from "./components/ui/highlight-match/index.mjs";
|
|
49
|
+
export * from "./components/ui/histogram-slider/index.mjs";
|
|
50
|
+
export * from "./components/ui/hold-button/index.mjs";
|
|
51
|
+
export * from "./components/ui/hover-card/index.mjs";
|
|
52
|
+
export * from "./components/ui/ink-tray/index.mjs";
|
|
53
|
+
export * from "./components/ui/input/index.mjs";
|
|
54
|
+
export * from "./components/ui/input-group/index.mjs";
|
|
55
|
+
export * from "./components/ui/island/index.mjs";
|
|
56
|
+
export * from "./components/ui/kbd/index.mjs";
|
|
57
|
+
export * from "./components/ui/keypad/index.mjs";
|
|
58
|
+
export * from "./components/ui/label/index.mjs";
|
|
59
|
+
export * from "./components/ui/lightbox/index.mjs";
|
|
60
|
+
export * from "./components/ui/link/index.mjs";
|
|
61
|
+
export * from "./components/ui/list/index.mjs";
|
|
62
|
+
export * from "./components/ui/load-more/index.mjs";
|
|
63
|
+
export * from "./components/ui/map/index.mjs";
|
|
64
|
+
export * from "./components/ui/mention/index.mjs";
|
|
65
|
+
export * from "./components/ui/menubar/index.mjs";
|
|
66
|
+
export * from "./components/ui/meter/index.mjs";
|
|
67
|
+
export * from "./components/ui/multi-select/index.mjs";
|
|
68
|
+
export * from "./components/ui/navigation-menu/index.mjs";
|
|
69
|
+
export * from "./components/ui/notebook-page/index.mjs";
|
|
70
|
+
export * from "./components/ui/notification-inbox/index.mjs";
|
|
71
|
+
export * from "./components/ui/number-field/index.mjs";
|
|
72
|
+
export * from "./components/ui/otp-input/index.mjs";
|
|
73
|
+
export * from "./components/ui/pager/index.mjs";
|
|
74
|
+
export * from "./components/ui/pagination/index.mjs";
|
|
75
|
+
export * from "./components/ui/password-strength/index.mjs";
|
|
76
|
+
export * from "./components/ui/popover/index.mjs";
|
|
77
|
+
export * from "./components/ui/progress/index.mjs";
|
|
78
|
+
export * from "./components/ui/prose/index.mjs";
|
|
79
|
+
export * from "./components/ui/radio-group/index.mjs";
|
|
80
|
+
export * from "./components/ui/rating/index.mjs";
|
|
81
|
+
export * from "./components/ui/rich-text-editor/index.mjs";
|
|
82
|
+
export * from "./components/ui/save-bar/index.mjs";
|
|
83
|
+
export * from "./components/ui/scroll-area/index.mjs";
|
|
84
|
+
export * from "./components/ui/select/index.mjs";
|
|
85
|
+
export * from "./components/ui/sheet/index.mjs";
|
|
86
|
+
export * from "./components/ui/sidebar/index.mjs";
|
|
87
|
+
export * from "./components/ui/signature/index.mjs";
|
|
88
|
+
export * from "./components/ui/signature-pad/index.mjs";
|
|
89
|
+
export * from "./components/ui/skeleton/index.mjs";
|
|
90
|
+
export * from "./components/ui/slide/index.mjs";
|
|
91
|
+
export * from "./components/ui/slider/index.mjs";
|
|
92
|
+
export * from "./components/ui/slides/index.mjs";
|
|
93
|
+
export * from "./components/ui/smooth-anchors/index.mjs";
|
|
94
|
+
export * from "./components/ui/spinner/index.mjs";
|
|
95
|
+
export * from "./components/ui/stat/index.mjs";
|
|
96
|
+
export * from "./components/ui/status-bar/index.mjs";
|
|
97
|
+
export * from "./components/ui/stepper/index.mjs";
|
|
98
|
+
export * from "./components/ui/steps/index.mjs";
|
|
99
|
+
export * from "./components/ui/swatch-grid/index.mjs";
|
|
100
|
+
export * from "./components/ui/switch/index.mjs";
|
|
101
|
+
export * from "./components/ui/tab-strip/index.mjs";
|
|
102
|
+
export * from "./components/ui/table/index.mjs";
|
|
103
|
+
export * from "./components/ui/table-of-contents/index.mjs";
|
|
104
|
+
export * from "./components/ui/tablet-frame/index.mjs";
|
|
105
|
+
export * from "./components/ui/tabs/index.mjs";
|
|
106
|
+
export * from "./components/ui/tags-input/index.mjs";
|
|
107
|
+
export * from "./components/ui/terminal/index.mjs";
|
|
108
|
+
export * from "./components/ui/textarea/index.mjs";
|
|
109
|
+
export * from "./components/ui/theme-provider/index.mjs";
|
|
110
|
+
export * from "./components/ui/toast/index.mjs";
|
|
111
|
+
export * from "./components/ui/toggle/index.mjs";
|
|
112
|
+
export * from "./components/ui/toggle-group/index.mjs";
|
|
113
|
+
export * from "./components/ui/toggletip/index.mjs";
|
|
114
|
+
export * from "./components/ui/toolbar/index.mjs";
|
|
115
|
+
export * from "./components/ui/tooltip/index.mjs";
|
|
116
|
+
export * from "./components/ui/tree/index.mjs";
|
|
117
|
+
import { MapPin } from "./components/ui/map/index.mjs";
|
|
118
|
+
import { MapPin as MapPin2, mapPinVariants } from "./components/ui/map-pin/index.mjs";
|
|
119
|
+
import { clamp } from "./components/ui/chart/index.mjs";
|
|
120
|
+
import { useControllableState } from "./components/ui/input/use-controllable-state.mjs";
|
|
121
|
+
import { LabelInfo, RequiredMark } from "./components/ui/label/label.mjs";
|
|
122
|
+
import {
|
|
123
|
+
RichTextEditorContextProvider,
|
|
124
|
+
useRichTextEditorContext
|
|
125
|
+
} from "./components/ui/rich-text-editor/rich-text-editor.mjs";
|
|
126
|
+
import { fileTypes, fileTypeFromName } from "./components/ui/file-card/file-types.mjs";
|
|
127
|
+
import { parseAccept, matchesAccept, describeRejection } from "./components/ui/file-upload/validate.mjs";
|
|
128
|
+
import {
|
|
129
|
+
documentEditorCollaboration
|
|
130
|
+
} from "./components/ui/document-editor/collaboration.mjs";
|
|
131
|
+
export * from "./lib/utils.mjs";
|
|
132
|
+
export * from "./lib/tv.mjs";
|
|
133
|
+
export * from "./lib/density.mjs";
|
|
134
|
+
export * from "./lib/theme.mjs";
|
|
135
|
+
export * from "./lib/field-context.mjs";
|
|
136
|
+
export * from "./lib/labels.mjs";
|
|
137
|
+
export * from "./lib/roving-focus.mjs";
|
|
138
|
+
export * from "./lib/motion.mjs";
|
|
139
|
+
export * from "./lib/hit-area.mjs";
|
|
140
|
+
export {
|
|
141
|
+
MapPin2 as GlobePin,
|
|
142
|
+
LabelInfo,
|
|
143
|
+
MapPin,
|
|
144
|
+
RequiredMark,
|
|
145
|
+
RichTextEditorContextProvider,
|
|
146
|
+
clamp,
|
|
147
|
+
describeRejection,
|
|
148
|
+
documentEditorCollaboration,
|
|
149
|
+
fileTypeFromName,
|
|
150
|
+
fileTypes,
|
|
151
|
+
mapPinVariants,
|
|
152
|
+
matchesAccept,
|
|
153
|
+
parseAccept,
|
|
154
|
+
useControllableState,
|
|
155
|
+
useRichTextEditorContext
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// The `@thalavaisankar/atoms` package entry: every component, plus the shared helpers they are built on.\n// Each line re-exports a component folder's own index, so the public API is exactly what the\n// folders already export. Built by `npm run build:package` (tsup.config.ts); not used by the\n// docs site, which imports the folders directly.\n\nexport * from \"./components/ui/accordion/index.mjs\"\nexport * from \"./components/ui/activity-feed/index.mjs\"\nexport * from \"./components/ui/alert/index.mjs\"\nexport * from \"./components/ui/animated-label/index.mjs\"\nexport * from \"./components/ui/animated-number/index.mjs\"\nexport * from \"./components/ui/avatar/index.mjs\"\nexport * from \"./components/ui/avatar-group/index.mjs\"\nexport * from \"./components/ui/badge/index.mjs\"\nexport * from \"./components/ui/badge-group/index.mjs\"\nexport * from \"./components/ui/breadcrumb/index.mjs\"\nexport * from \"./components/ui/button/index.mjs\"\nexport * from \"./components/ui/button-group/index.mjs\"\nexport * from \"./components/ui/card/index.mjs\"\nexport * from \"./components/ui/chart/index.mjs\"\nexport * from \"./components/ui/checkbox/index.mjs\"\nexport * from \"./components/ui/checklist/index.mjs\"\nexport * from \"./components/ui/chip/index.mjs\"\nexport * from \"./components/ui/chip-group/index.mjs\"\nexport * from \"./components/ui/code-snippet/index.mjs\"\nexport * from \"./components/ui/collapsible/index.mjs\"\nexport * from \"./components/ui/color-picker/index.mjs\"\nexport * from \"./components/ui/combobox/index.mjs\"\nexport * from \"./components/ui/command/index.mjs\"\nexport * from \"./components/ui/compare-slider/index.mjs\"\nexport * from \"./components/ui/context-menu/index.mjs\"\nexport * from \"./components/ui/data-table/index.mjs\"\nexport * from \"./components/ui/date-picker/index.mjs\"\nexport * from \"./components/ui/description-list/index.mjs\"\nexport * from \"./components/ui/dialog/index.mjs\"\nexport * from \"./components/ui/divider/index.mjs\"\nexport * from \"./components/ui/dock/index.mjs\"\nexport * from \"./components/ui/document-editor/index.mjs\"\nexport * from \"./components/ui/drawer/index.mjs\"\nexport * from \"./components/ui/dropdown-menu/index.mjs\"\nexport * from \"./components/ui/editable-text/index.mjs\"\nexport * from \"./components/ui/emoji-picker/index.mjs\"\nexport * from \"./components/ui/empty-state/index.mjs\"\nexport * from \"./components/ui/event-calendar/index.mjs\"\nexport * from \"./components/ui/expandable-search/index.mjs\"\nexport * from \"./components/ui/field/index.mjs\"\nexport * from \"./components/ui/file-card/index.mjs\"\nexport * from \"./components/ui/file-preview/index.mjs\"\nexport * from \"./components/ui/file-upload/index.mjs\"\nexport * from \"./components/ui/flag/index.mjs\"\nexport * from \"./components/ui/floating-window/index.mjs\"\nexport * from \"./components/ui/form/index.mjs\"\nexport * from \"./components/ui/globe/index.mjs\"\nexport * from \"./components/ui/highlight-match/index.mjs\"\nexport * from \"./components/ui/histogram-slider/index.mjs\"\nexport * from \"./components/ui/hold-button/index.mjs\"\nexport * from \"./components/ui/hover-card/index.mjs\"\nexport * from \"./components/ui/ink-tray/index.mjs\"\nexport * from \"./components/ui/input/index.mjs\"\nexport * from \"./components/ui/input-group/index.mjs\"\nexport * from \"./components/ui/island/index.mjs\"\nexport * from \"./components/ui/kbd/index.mjs\"\nexport * from \"./components/ui/keypad/index.mjs\"\nexport * from \"./components/ui/label/index.mjs\"\nexport * from \"./components/ui/lightbox/index.mjs\"\nexport * from \"./components/ui/link/index.mjs\"\nexport * from \"./components/ui/list/index.mjs\"\nexport * from \"./components/ui/load-more/index.mjs\"\nexport * from \"./components/ui/map/index.mjs\"\nexport * from \"./components/ui/mention/index.mjs\"\nexport * from \"./components/ui/menubar/index.mjs\"\nexport * from \"./components/ui/meter/index.mjs\"\nexport * from \"./components/ui/multi-select/index.mjs\"\nexport * from \"./components/ui/navigation-menu/index.mjs\"\nexport * from \"./components/ui/notebook-page/index.mjs\"\nexport * from \"./components/ui/notification-inbox/index.mjs\"\nexport * from \"./components/ui/number-field/index.mjs\"\nexport * from \"./components/ui/otp-input/index.mjs\"\nexport * from \"./components/ui/pager/index.mjs\"\nexport * from \"./components/ui/pagination/index.mjs\"\nexport * from \"./components/ui/password-strength/index.mjs\"\nexport * from \"./components/ui/popover/index.mjs\"\nexport * from \"./components/ui/progress/index.mjs\"\nexport * from \"./components/ui/prose/index.mjs\"\nexport * from \"./components/ui/radio-group/index.mjs\"\nexport * from \"./components/ui/rating/index.mjs\"\nexport * from \"./components/ui/rich-text-editor/index.mjs\"\nexport * from \"./components/ui/save-bar/index.mjs\"\nexport * from \"./components/ui/scroll-area/index.mjs\"\nexport * from \"./components/ui/select/index.mjs\"\nexport * from \"./components/ui/sheet/index.mjs\"\nexport * from \"./components/ui/sidebar/index.mjs\"\nexport * from \"./components/ui/signature/index.mjs\"\nexport * from \"./components/ui/signature-pad/index.mjs\"\nexport * from \"./components/ui/skeleton/index.mjs\"\nexport * from \"./components/ui/slide/index.mjs\"\nexport * from \"./components/ui/slider/index.mjs\"\nexport * from \"./components/ui/slides/index.mjs\"\nexport * from \"./components/ui/smooth-anchors/index.mjs\"\nexport * from \"./components/ui/spinner/index.mjs\"\nexport * from \"./components/ui/stat/index.mjs\"\nexport * from \"./components/ui/status-bar/index.mjs\"\nexport * from \"./components/ui/stepper/index.mjs\"\nexport * from \"./components/ui/steps/index.mjs\"\nexport * from \"./components/ui/swatch-grid/index.mjs\"\nexport * from \"./components/ui/switch/index.mjs\"\nexport * from \"./components/ui/tab-strip/index.mjs\"\nexport * from \"./components/ui/table/index.mjs\"\nexport * from \"./components/ui/table-of-contents/index.mjs\"\nexport * from \"./components/ui/tablet-frame/index.mjs\"\nexport * from \"./components/ui/tabs/index.mjs\"\nexport * from \"./components/ui/tags-input/index.mjs\"\nexport * from \"./components/ui/terminal/index.mjs\"\nexport * from \"./components/ui/textarea/index.mjs\"\nexport * from \"./components/ui/theme-provider/index.mjs\"\nexport * from \"./components/ui/toast/index.mjs\"\nexport * from \"./components/ui/toggle/index.mjs\"\nexport * from \"./components/ui/toggle-group/index.mjs\"\nexport * from \"./components/ui/toggletip/index.mjs\"\nexport * from \"./components/ui/toolbar/index.mjs\"\nexport * from \"./components/ui/tooltip/index.mjs\"\nexport * from \"./components/ui/tree/index.mjs\"\n\n// Names two folders both export. An explicit re-export picks one for the package entry; the other\n// folder keeps its own export unchanged.\n// - `MapPin`: Map's pin (src/components/ui/map) keeps the name. The lighter Map Pin made for Globe\n// markers (src/components/ui/map-pin) is exported here as `GlobePin`.\n// - `LngLat`: Map's and Globe's are the same `[longitude, latitude]` tuple.\n// - `clamp`: Chart's and Event Calendar's do the same thing.\nexport { MapPin, type MapPinProps, type LngLat } from \"./components/ui/map/index.mjs\"\nexport { MapPin as GlobePin, type MapPinProps as GlobePinProps, mapPinVariants } from \"./components/ui/map-pin/index.mjs\"\nexport { clamp } from \"./components/ui/chart/index.mjs\"\n\n// Parts other components already share, which their folder index does not list.\nexport { useControllableState } from \"./components/ui/input/use-controllable-state.mjs\"\nexport { LabelInfo, RequiredMark, type LabelInfoProps } from \"./components/ui/label/label.mjs\"\nexport {\n RichTextEditorContextProvider,\n useRichTextEditorContext,\n} from \"./components/ui/rich-text-editor/rich-text-editor.mjs\"\nexport { fileTypes, fileTypeFromName, type FileType } from \"./components/ui/file-card/file-types.mjs\"\nexport { parseAccept, matchesAccept, describeRejection } from \"./components/ui/file-upload/validate.mjs\"\nexport {\n documentEditorCollaboration,\n type Collaborator,\n type CollaborationAwareness,\n type DocumentEditorCollaborationOptions,\n} from \"./components/ui/document-editor/collaboration.mjs\"\n\n// Shared helpers: class merging, variants, density, theming axes, field wiring, labels, focus, motion, hit areas.\nexport * from \"./lib/utils.mjs\"\nexport * from \"./lib/tv.mjs\"\nexport * from \"./lib/density.mjs\"\nexport * from \"./lib/theme.mjs\"\nexport * from \"./lib/field-context.mjs\"\nexport * from \"./lib/labels.mjs\"\nexport * from \"./lib/roving-focus.mjs\"\nexport * from \"./lib/motion.mjs\"\nexport * from \"./lib/hit-area.mjs\"\n"],"mappings":"AAKA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAQd,SAAS,cAA6C;AACtD,SAAmB,UAAVA,SAAuD,sBAAsB;AACtF,SAAS,aAAa;AAGtB,SAAS,4BAA4B;AACrC,SAAS,WAAW,oBAAyC;AAC7D;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,WAAW,wBAAuC;AAC3D,SAAS,aAAa,eAAe,yBAAyB;AAC9D;AAAA,EACE;AAAA,OAIK;AAGP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":["MapPin"]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
2
|
+
function parseHex(input) {
|
|
3
|
+
let hex = input.trim().replace(/^#/, "");
|
|
4
|
+
if (!/^[0-9a-f]+$/i.test(hex) || ![3, 4, 6, 8].includes(hex.length)) return null;
|
|
5
|
+
if (hex.length <= 4) hex = [...hex].map((c) => c + c).join("");
|
|
6
|
+
const n = (i) => parseInt(hex.slice(i, i + 2), 16);
|
|
7
|
+
return { r: n(0), g: n(2), b: n(4), a: hex.length === 8 ? n(6) / 255 : 1 };
|
|
8
|
+
}
|
|
9
|
+
const byte = (n) => Math.round(clamp(n, 0, 255)).toString(16).padStart(2, "0");
|
|
10
|
+
function toHex({ r, g, b, a }) {
|
|
11
|
+
const alpha = Math.round(clamp(a, 0, 1) * 255);
|
|
12
|
+
return `#${byte(r)}${byte(g)}${byte(b)}${alpha < 255 ? byte(alpha) : ""}`;
|
|
13
|
+
}
|
|
14
|
+
function hsvToRgb({ h, s, v, a }) {
|
|
15
|
+
const sat = s / 100;
|
|
16
|
+
const val = v / 100;
|
|
17
|
+
const k = (n) => (n + h / 60) % 6;
|
|
18
|
+
const f = (n) => val - val * sat * Math.max(0, Math.min(k(n), 4 - k(n), 1));
|
|
19
|
+
return { r: f(5) * 255, g: f(3) * 255, b: f(1) * 255, a };
|
|
20
|
+
}
|
|
21
|
+
function rgbToHsv({ r, g, b, a }, hue = 0) {
|
|
22
|
+
const rr = r / 255;
|
|
23
|
+
const gg = g / 255;
|
|
24
|
+
const bb = b / 255;
|
|
25
|
+
const max = Math.max(rr, gg, bb);
|
|
26
|
+
const min = Math.min(rr, gg, bb);
|
|
27
|
+
const d = max - min;
|
|
28
|
+
let h = hue;
|
|
29
|
+
if (d > 0) {
|
|
30
|
+
if (max === rr) h = 60 * ((gg - bb) / d % 6);
|
|
31
|
+
else if (max === gg) h = 60 * ((bb - rr) / d + 2);
|
|
32
|
+
else h = 60 * ((rr - gg) / d + 4);
|
|
33
|
+
if (h < 0) h += 360;
|
|
34
|
+
}
|
|
35
|
+
return { h, s: max === 0 ? 0 : d / max * 100, v: max * 100, a };
|
|
36
|
+
}
|
|
37
|
+
function hsvToHsl({ h, s, v, a }) {
|
|
38
|
+
const sv = s / 100;
|
|
39
|
+
const vv = v / 100;
|
|
40
|
+
const l = vv * (1 - sv / 2);
|
|
41
|
+
const sl = l === 0 || l === 1 ? 0 : (vv - l) / Math.min(l, 1 - l);
|
|
42
|
+
return { h, s: sl * 100, l: l * 100, a };
|
|
43
|
+
}
|
|
44
|
+
function hslToHsv({ h, s, l, a }) {
|
|
45
|
+
const sl = s / 100;
|
|
46
|
+
const ll = l / 100;
|
|
47
|
+
const v = ll + sl * Math.min(ll, 1 - ll);
|
|
48
|
+
const sv = v === 0 ? 0 : 2 * (1 - ll / v);
|
|
49
|
+
return { h, s: sv * 100, v: v * 100, a };
|
|
50
|
+
}
|
|
51
|
+
function hsvToHex(hsva) {
|
|
52
|
+
return toHex(hsvToRgb(hsva));
|
|
53
|
+
}
|
|
54
|
+
function hexToHsv(hex, hue = 0) {
|
|
55
|
+
const rgba = parseHex(hex);
|
|
56
|
+
return rgba ? rgbToHsv(rgba, hue) : null;
|
|
57
|
+
}
|
|
58
|
+
function rgbString({ r, g, b }) {
|
|
59
|
+
return `rgb(${Math.round(r)}, ${Math.round(g)}, ${Math.round(b)})`;
|
|
60
|
+
}
|
|
61
|
+
const checkerboard = {
|
|
62
|
+
backgroundImage: "linear-gradient(45deg, color-mix(in srgb, var(--muted-foreground) 22%, transparent) 25%, transparent 25%, transparent 75%, color-mix(in srgb, var(--muted-foreground) 22%, transparent) 75%), linear-gradient(45deg, color-mix(in srgb, var(--muted-foreground) 22%, transparent) 25%, transparent 25%, transparent 75%, color-mix(in srgb, var(--muted-foreground) 22%, transparent) 75%)",
|
|
63
|
+
backgroundSize: "8px 8px",
|
|
64
|
+
backgroundPosition: "0 0, 4px 4px"
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
checkerboard,
|
|
68
|
+
hexToHsv,
|
|
69
|
+
hslToHsv,
|
|
70
|
+
hsvToHex,
|
|
71
|
+
hsvToHsl,
|
|
72
|
+
hsvToRgb,
|
|
73
|
+
parseHex,
|
|
74
|
+
rgbString,
|
|
75
|
+
rgbToHsv,
|
|
76
|
+
toHex
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=color.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/color.ts"],"sourcesContent":["/*\r\n * Colour maths for the Color Picker. HSV is the working model, so switching the fields between\r\n * HEX, HSL and RGB never moves the colour; hex is what goes in and out. Alpha runs 0 to 1, and a\r\n * hex carries the `aa` byte only below full opacity.\r\n */\r\n\r\nimport type { CSSProperties } from \"react\"\r\n\r\nexport interface RGBA {\r\n r: number\r\n g: number\r\n b: number\r\n a: number\r\n}\r\n\r\nexport interface HSVA {\r\n /** 0 to 360. */\r\n h: number\r\n /** 0 to 100. */\r\n s: number\r\n /** 0 to 100. */\r\n v: number\r\n /** 0 to 1. */\r\n a: number\r\n}\r\n\r\nexport interface HSLA {\r\n h: number\r\n s: number\r\n l: number\r\n a: number\r\n}\r\n\r\nconst clamp = (n: number, min: number, max: number) => Math.min(max, Math.max(min, n))\r\n\r\n/** #rgb, #rgba, #rrggbb or #rrggbbaa (the # optional) into channels, or null. */\r\nexport function parseHex(input: string): RGBA | null {\r\n let hex = input.trim().replace(/^#/, \"\")\r\n if (!/^[0-9a-f]+$/i.test(hex) || ![3, 4, 6, 8].includes(hex.length)) return null\r\n if (hex.length <= 4) hex = [...hex].map((c) => c + c).join(\"\")\r\n const n = (i: number) => parseInt(hex.slice(i, i + 2), 16)\r\n return { r: n(0), g: n(2), b: n(4), a: hex.length === 8 ? n(6) / 255 : 1 }\r\n}\r\n\r\nconst byte = (n: number) => Math.round(clamp(n, 0, 255)).toString(16).padStart(2, \"0\")\r\n\r\n/** Channels into #rrggbb, plus `aa` when alpha is below 1. */\r\nexport function toHex({ r, g, b, a }: RGBA): string {\r\n const alpha = Math.round(clamp(a, 0, 1) * 255)\r\n return `#${byte(r)}${byte(g)}${byte(b)}${alpha < 255 ? byte(alpha) : \"\"}`\r\n}\r\n\r\nexport function hsvToRgb({ h, s, v, a }: HSVA): RGBA {\r\n const sat = s / 100\r\n const val = v / 100\r\n const k = (n: number) => (n + h / 60) % 6\r\n const f = (n: number) => val - val * sat * Math.max(0, Math.min(k(n), 4 - k(n), 1))\r\n return { r: f(5) * 255, g: f(3) * 255, b: f(1) * 255, a }\r\n}\r\n\r\n/** Channels into HSV. `hue` is kept for greys and black, where the hue is undefined. */\r\nexport function rgbToHsv({ r, g, b, a }: RGBA, hue = 0): HSVA {\r\n const rr = r / 255\r\n const gg = g / 255\r\n const bb = b / 255\r\n const max = Math.max(rr, gg, bb)\r\n const min = Math.min(rr, gg, bb)\r\n const d = max - min\r\n let h = hue\r\n if (d > 0) {\r\n if (max === rr) h = 60 * (((gg - bb) / d) % 6)\r\n else if (max === gg) h = 60 * ((bb - rr) / d + 2)\r\n else h = 60 * ((rr - gg) / d + 4)\r\n if (h < 0) h += 360\r\n }\r\n return { h, s: max === 0 ? 0 : (d / max) * 100, v: max * 100, a }\r\n}\r\n\r\nexport function hsvToHsl({ h, s, v, a }: HSVA): HSLA {\r\n const sv = s / 100\r\n const vv = v / 100\r\n const l = vv * (1 - sv / 2)\r\n const sl = l === 0 || l === 1 ? 0 : (vv - l) / Math.min(l, 1 - l)\r\n return { h, s: sl * 100, l: l * 100, a }\r\n}\r\n\r\nexport function hslToHsv({ h, s, l, a }: HSLA): HSVA {\r\n const sl = s / 100\r\n const ll = l / 100\r\n const v = ll + sl * Math.min(ll, 1 - ll)\r\n const sv = v === 0 ? 0 : 2 * (1 - ll / v)\r\n return { h, s: sv * 100, v: v * 100, a }\r\n}\r\n\r\nexport function hsvToHex(hsva: HSVA): string {\r\n return toHex(hsvToRgb(hsva))\r\n}\r\n\r\n/** A hex string into HSV, keeping `hue` when the colour has none. Null when it doesn't parse. */\r\nexport function hexToHsv(hex: string, hue = 0): HSVA | null {\r\n const rgba = parseHex(hex)\r\n return rgba ? rgbToHsv(rgba, hue) : null\r\n}\r\n\r\n/** `rgb(r, g, b)` for inline styles. */\r\nexport function rgbString({ r, g, b }: RGBA): string {\r\n return `rgb(${Math.round(r)}, ${Math.round(g)}, ${Math.round(b)})`\r\n}\r\n\r\n/** The checkerboard behind anything transparent, as inline style. */\r\nexport const checkerboard: CSSProperties = {\r\n backgroundImage:\r\n \"linear-gradient(45deg, color-mix(in srgb, var(--muted-foreground) 22%, transparent) 25%, transparent 25%, transparent 75%, color-mix(in srgb, var(--muted-foreground) 22%, transparent) 75%), linear-gradient(45deg, color-mix(in srgb, var(--muted-foreground) 22%, transparent) 25%, transparent 25%, transparent 75%, color-mix(in srgb, var(--muted-foreground) 22%, transparent) 75%)\",\r\n backgroundSize: \"8px 8px\",\r\n backgroundPosition: \"0 0, 4px 4px\",\r\n}\r\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
function createContext(rootComponentName) {
|
|
4
|
+
const Context = React.createContext(null);
|
|
5
|
+
Context.displayName = `${rootComponentName}Context`;
|
|
6
|
+
function Provider({
|
|
7
|
+
children,
|
|
8
|
+
...value
|
|
9
|
+
}) {
|
|
10
|
+
const memo = React.useMemo(
|
|
11
|
+
() => value,
|
|
12
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
13
|
+
Object.values(value)
|
|
14
|
+
);
|
|
15
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value: memo, children });
|
|
16
|
+
}
|
|
17
|
+
function useContext(consumerName) {
|
|
18
|
+
const context = React.useContext(Context);
|
|
19
|
+
if (context === null) {
|
|
20
|
+
throw new Error(
|
|
21
|
+
`\`${consumerName}\` must be used within \`${rootComponentName}.Root\``
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
return context;
|
|
25
|
+
}
|
|
26
|
+
return [Provider, useContext];
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
createContext
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=create-context.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/create-context.tsx"],"sourcesContent":["import * as React from \"react\"\n\nexport function createContext<ContextValue>(rootComponentName: string) {\n const Context = React.createContext<ContextValue | null>(null)\n Context.displayName = `${rootComponentName}Context`\n\n function Provider({\n children,\n ...value\n }: ContextValue & { children: React.ReactNode }) {\n const memo = React.useMemo(\n () => value as ContextValue,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Object.values(value as Record<string, unknown>),\n )\n return <Context.Provider value={memo}>{children}</Context.Provider>\n }\n\n function useContext(consumerName: string): ContextValue {\n const context = React.useContext(Context)\n if (context === null) {\n throw new Error(\n `\\`${consumerName}\\` must be used within \\`${rootComponentName}.Root\\``,\n )\n }\n return context\n }\n\n return [Provider, useContext] as const\n}\n"],"mappings":"AAeW;AAfX,YAAY,WAAW;AAEhB,SAAS,cAA4B,mBAA2B;AACrE,QAAM,UAAU,MAAM,cAAmC,IAAI;AAC7D,UAAQ,cAAc,GAAG,iBAAiB;AAE1C,WAAS,SAAS;AAAA,IAChB;AAAA,IACA,GAAG;AAAA,EACL,GAAiD;AAC/C,UAAM,OAAO,MAAM;AAAA,MACjB,MAAM;AAAA;AAAA,MAEN,OAAO,OAAO,KAAgC;AAAA,IAChD;AACA,WAAO,oBAAC,QAAQ,UAAR,EAAiB,OAAO,MAAO,UAAS;AAAA,EAClD;AAEA,WAAS,WAAW,cAAoC;AACtD,UAAM,UAAU,MAAM,WAAW,OAAO;AACxC,QAAI,YAAY,MAAM;AACpB,YAAM,IAAI;AAAA,QACR,KAAK,YAAY,4BAA4B,iBAAiB;AAAA,MAChE;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAEA,SAAO,CAAC,UAAU,UAAU;AAC9B;","names":[]}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
function startOfDay(date) {
|
|
4
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
5
|
+
}
|
|
6
|
+
function addDays(date, days) {
|
|
7
|
+
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);
|
|
8
|
+
}
|
|
9
|
+
function addMonths(date, months) {
|
|
10
|
+
const target = new Date(date.getFullYear(), date.getMonth() + months, 1);
|
|
11
|
+
const last = new Date(target.getFullYear(), target.getMonth() + 1, 0).getDate();
|
|
12
|
+
return new Date(target.getFullYear(), target.getMonth(), Math.min(date.getDate(), last));
|
|
13
|
+
}
|
|
14
|
+
function addYears(date, years) {
|
|
15
|
+
return addMonths(date, years * 12);
|
|
16
|
+
}
|
|
17
|
+
function startOfMonth(date) {
|
|
18
|
+
return new Date(date.getFullYear(), date.getMonth(), 1);
|
|
19
|
+
}
|
|
20
|
+
function endOfMonth(date) {
|
|
21
|
+
return new Date(date.getFullYear(), date.getMonth() + 1, 0);
|
|
22
|
+
}
|
|
23
|
+
function startOfWeek(date, weekStartsOn = 1) {
|
|
24
|
+
const offset = (date.getDay() - weekStartsOn + 7) % 7;
|
|
25
|
+
return addDays(date, -offset);
|
|
26
|
+
}
|
|
27
|
+
function endOfWeek(date, weekStartsOn = 1) {
|
|
28
|
+
return addDays(startOfWeek(date, weekStartsOn), 6);
|
|
29
|
+
}
|
|
30
|
+
function startOfYear(date) {
|
|
31
|
+
return new Date(date.getFullYear(), 0, 1);
|
|
32
|
+
}
|
|
33
|
+
function isSameDay(a, b) {
|
|
34
|
+
return !!a && !!b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
35
|
+
}
|
|
36
|
+
function isSameMonth(a, b) {
|
|
37
|
+
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth();
|
|
38
|
+
}
|
|
39
|
+
function compareDay(a, b) {
|
|
40
|
+
return startOfDay(a).getTime() - startOfDay(b).getTime();
|
|
41
|
+
}
|
|
42
|
+
function isBetween(date, from, to) {
|
|
43
|
+
const [lo, hi] = compareDay(from, to) <= 0 ? [from, to] : [to, from];
|
|
44
|
+
return compareDay(date, lo) >= 0 && compareDay(date, hi) <= 0;
|
|
45
|
+
}
|
|
46
|
+
function clampDay(date, min, max) {
|
|
47
|
+
if (min && compareDay(date, min) < 0) return startOfDay(min);
|
|
48
|
+
if (max && compareDay(date, max) > 0) return startOfDay(max);
|
|
49
|
+
return date;
|
|
50
|
+
}
|
|
51
|
+
function monthGrid(month, weekStartsOn = 1) {
|
|
52
|
+
const first = startOfWeek(startOfMonth(month), weekStartsOn);
|
|
53
|
+
return Array.from({ length: 42 }, (_, i) => addDays(first, i));
|
|
54
|
+
}
|
|
55
|
+
function withTime(day, hours, minutes) {
|
|
56
|
+
return new Date(day.getFullYear(), day.getMonth(), day.getDate(), hours, minutes);
|
|
57
|
+
}
|
|
58
|
+
function parseTime(text) {
|
|
59
|
+
const match = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(text);
|
|
60
|
+
return match ? { hours: Number(match[1]), minutes: Number(match[2]) } : null;
|
|
61
|
+
}
|
|
62
|
+
function formatTime(date) {
|
|
63
|
+
if (!date) return "";
|
|
64
|
+
return `${String(date.getHours()).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}`;
|
|
65
|
+
}
|
|
66
|
+
const formatters = /* @__PURE__ */ new Map();
|
|
67
|
+
function getFormatter(locale, options) {
|
|
68
|
+
const key = `${locale}|${JSON.stringify(options)}`;
|
|
69
|
+
let formatter = formatters.get(key);
|
|
70
|
+
if (!formatter) {
|
|
71
|
+
formatter = new Intl.DateTimeFormat(locale, options);
|
|
72
|
+
formatters.set(key, formatter);
|
|
73
|
+
}
|
|
74
|
+
return formatter;
|
|
75
|
+
}
|
|
76
|
+
const SERVER_LOCALE = "en-US";
|
|
77
|
+
const noSubscription = () => () => {
|
|
78
|
+
};
|
|
79
|
+
function useHydrated() {
|
|
80
|
+
return React.useSyncExternalStore(
|
|
81
|
+
noSubscription,
|
|
82
|
+
() => true,
|
|
83
|
+
() => false
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function useDateLocale(locale) {
|
|
87
|
+
const hydrated = useHydrated();
|
|
88
|
+
if (locale) return locale;
|
|
89
|
+
if (!hydrated || typeof navigator === "undefined") return SERVER_LOCALE;
|
|
90
|
+
return navigator.language || SERVER_LOCALE;
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
SERVER_LOCALE,
|
|
94
|
+
addDays,
|
|
95
|
+
addMonths,
|
|
96
|
+
addYears,
|
|
97
|
+
clampDay,
|
|
98
|
+
compareDay,
|
|
99
|
+
endOfMonth,
|
|
100
|
+
endOfWeek,
|
|
101
|
+
formatTime,
|
|
102
|
+
getFormatter,
|
|
103
|
+
isBetween,
|
|
104
|
+
isSameDay,
|
|
105
|
+
isSameMonth,
|
|
106
|
+
monthGrid,
|
|
107
|
+
parseTime,
|
|
108
|
+
startOfDay,
|
|
109
|
+
startOfMonth,
|
|
110
|
+
startOfWeek,
|
|
111
|
+
startOfYear,
|
|
112
|
+
useDateLocale,
|
|
113
|
+
useHydrated,
|
|
114
|
+
withTime
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=date.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/date.ts"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\n/*\n * Calendar-day maths over plain local `Date`s. Every helper works on days at local midnight and\n * never mutates its input. No timezone conversion happens beyond what `Date` does locally, which is\n * what a date picker wants: the day the person sees is the day they get.\n */\n\n/** 0 = Sunday … 6 = Saturday. */\nexport type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6\n\nexport interface DateRange {\n from: Date | undefined\n to?: Date | undefined\n}\n\nexport function startOfDay(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate())\n}\n\nexport function addDays(date: Date, days: number): Date {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days)\n}\n\n/** Adds months, clamping to the last day when the target month is shorter (Jan 31 + 1 → Feb 28). */\nexport function addMonths(date: Date, months: number): Date {\n const target = new Date(date.getFullYear(), date.getMonth() + months, 1)\n const last = new Date(target.getFullYear(), target.getMonth() + 1, 0).getDate()\n return new Date(target.getFullYear(), target.getMonth(), Math.min(date.getDate(), last))\n}\n\nexport function addYears(date: Date, years: number): Date {\n return addMonths(date, years * 12)\n}\n\nexport function startOfMonth(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth(), 1)\n}\n\nexport function endOfMonth(date: Date): Date {\n return new Date(date.getFullYear(), date.getMonth() + 1, 0)\n}\n\nexport function startOfWeek(date: Date, weekStartsOn: WeekDay = 1): Date {\n const offset = (date.getDay() - weekStartsOn + 7) % 7\n return addDays(date, -offset)\n}\n\nexport function endOfWeek(date: Date, weekStartsOn: WeekDay = 1): Date {\n return addDays(startOfWeek(date, weekStartsOn), 6)\n}\n\nexport function startOfYear(date: Date): Date {\n return new Date(date.getFullYear(), 0, 1)\n}\n\nexport function isSameDay(a: Date | undefined, b: Date | undefined): boolean {\n return !!a && !!b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate()\n}\n\nexport function isSameMonth(a: Date, b: Date): boolean {\n return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth()\n}\n\n/** Negative, zero or positive as `a` is a day before, the same day as, or a day after `b`. */\nexport function compareDay(a: Date, b: Date): number {\n return startOfDay(a).getTime() - startOfDay(b).getTime()\n}\n\n/** Whether `date` falls within `from`–`to`, inclusive, in either order. */\nexport function isBetween(date: Date, from: Date, to: Date): boolean {\n const [lo, hi] = compareDay(from, to) <= 0 ? [from, to] : [to, from]\n return compareDay(date, lo) >= 0 && compareDay(date, hi) <= 0\n}\n\nexport function clampDay(date: Date, min?: Date, max?: Date): Date {\n if (min && compareDay(date, min) < 0) return startOfDay(min)\n if (max && compareDay(date, max) > 0) return startOfDay(max)\n return date\n}\n\n/** The six weeks (42 days) a month view shows, starting on `weekStartsOn`. */\nexport function monthGrid(month: Date, weekStartsOn: WeekDay = 1): Date[] {\n const first = startOfWeek(startOfMonth(month), weekStartsOn)\n return Array.from({ length: 42 }, (_, i) => addDays(first, i))\n}\n\n/** Combines a day with hours and minutes. */\nexport function withTime(day: Date, hours: number, minutes: number): Date {\n return new Date(day.getFullYear(), day.getMonth(), day.getDate(), hours, minutes)\n}\n\n/** Parses a full \"HH:MM\" (24-hour); anything partial or out of range is `null`. */\nexport function parseTime(text: string): { hours: number; minutes: number } | null {\n const match = /^([01]\\d|2[0-3]):([0-5]\\d)$/.exec(text)\n return match ? { hours: Number(match[1]), minutes: Number(match[2]) } : null\n}\n\nexport function formatTime(date: Date | undefined): string {\n if (!date) return \"\"\n return `${String(date.getHours()).padStart(2, \"0\")}:${String(date.getMinutes()).padStart(2, \"0\")}`\n}\n\n/* ─── Formatting ────────────────────────────────────────────────────────── */\n\nconst formatters = new Map<string, Intl.DateTimeFormat>()\n\n/** A cached Intl.DateTimeFormat per locale and option set. */\nexport function getFormatter(locale: string, options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n const key = `${locale}|${JSON.stringify(options)}`\n let formatter = formatters.get(key)\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(locale, options)\n formatters.set(key, formatter)\n }\n return formatter\n}\n\n/** The locale the server renders and hydration matches; the visitor's applies after that. */\nexport const SERVER_LOCALE = \"en-US\"\n\nconst noSubscription = () => () => {}\n\n/** False on the server and during hydration, true afterwards. */\nexport function useHydrated(): boolean {\n return React.useSyncExternalStore(\n noSubscription,\n () => true,\n () => false,\n )\n}\n\n/**\n * The locale to format in: a pinned one wins; otherwise `en-US` until hydration is done (so the\n * server HTML matches), then the visitor's.\n */\nexport function useDateLocale(locale?: string): string {\n const hydrated = useHydrated()\n if (locale) return locale\n if (!hydrated || typeof navigator === \"undefined\") return SERVER_LOCALE\n return navigator.language || SERVER_LOCALE\n}\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
const DensityContext = React.createContext("compact");
|
|
5
|
+
DensityContext.displayName = "DensityContext";
|
|
6
|
+
function DensityProvider({
|
|
7
|
+
density,
|
|
8
|
+
children
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsx(DensityContext.Provider, { value: density, children: /* @__PURE__ */ jsx("div", { "data-density": density, className: "contents", children }) });
|
|
11
|
+
}
|
|
12
|
+
function toDensity(density) {
|
|
13
|
+
return density === "touch" ? "comfortable" : density;
|
|
14
|
+
}
|
|
15
|
+
function useDensity(density) {
|
|
16
|
+
const context = React.useContext(DensityContext);
|
|
17
|
+
return density ?? toDensity(context);
|
|
18
|
+
}
|
|
19
|
+
function useTouch() {
|
|
20
|
+
return React.useContext(DensityContext) === "touch";
|
|
21
|
+
}
|
|
22
|
+
const DomainContext = React.createContext("application");
|
|
23
|
+
DomainContext.displayName = "DomainContext";
|
|
24
|
+
function DomainProvider({ domain, children }) {
|
|
25
|
+
return /* @__PURE__ */ jsx(DomainContext.Provider, { value: domain, children });
|
|
26
|
+
}
|
|
27
|
+
function useDomain() {
|
|
28
|
+
return React.useContext(DomainContext);
|
|
29
|
+
}
|
|
30
|
+
const ControlSizeContext = React.createContext(null);
|
|
31
|
+
ControlSizeContext.displayName = "ControlSizeContext";
|
|
32
|
+
function ControlSizeProvider({
|
|
33
|
+
size,
|
|
34
|
+
children
|
|
35
|
+
}) {
|
|
36
|
+
return /* @__PURE__ */ jsx(ControlSizeContext.Provider, { value: size, children });
|
|
37
|
+
}
|
|
38
|
+
function toControlSize(size) {
|
|
39
|
+
if (size === "xl") return "lg";
|
|
40
|
+
if (size === "xs") return "sm";
|
|
41
|
+
return size;
|
|
42
|
+
}
|
|
43
|
+
function useControlSizeContext() {
|
|
44
|
+
const size = React.useContext(ControlSizeContext);
|
|
45
|
+
return size ? toControlSize(size) : null;
|
|
46
|
+
}
|
|
47
|
+
function useControlSize(size, density) {
|
|
48
|
+
const contextSize = React.useContext(ControlSizeContext);
|
|
49
|
+
const domain = React.useContext(DomainContext);
|
|
50
|
+
if (size) return size;
|
|
51
|
+
if (density) return density === "compact" ? "sm" : "md";
|
|
52
|
+
if (contextSize) return toControlSize(contextSize);
|
|
53
|
+
return domain === "marketing" ? "md" : "sm";
|
|
54
|
+
}
|
|
55
|
+
function resolveButtonSize(size, density, contextSize, domain) {
|
|
56
|
+
if (size) return size;
|
|
57
|
+
if (density) return density === "compact" ? "sm" : "md";
|
|
58
|
+
if (contextSize) return contextSize;
|
|
59
|
+
return domain === "marketing" ? "md" : "sm";
|
|
60
|
+
}
|
|
61
|
+
function useButtonSize(size, density) {
|
|
62
|
+
const contextSize = React.useContext(ControlSizeContext);
|
|
63
|
+
const domain = React.useContext(DomainContext);
|
|
64
|
+
const touch = React.useContext(DensityContext) === "touch";
|
|
65
|
+
const resolved = resolveButtonSize(size, density, contextSize, domain);
|
|
66
|
+
return touch && resolved === "xs" ? "sm" : resolved;
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
ControlSizeProvider,
|
|
70
|
+
DensityProvider,
|
|
71
|
+
DomainProvider,
|
|
72
|
+
useButtonSize,
|
|
73
|
+
useControlSize,
|
|
74
|
+
useControlSizeContext,
|
|
75
|
+
useDensity,
|
|
76
|
+
useDomain,
|
|
77
|
+
useTouch
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=density.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/density.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nexport type Density = \"comfortable\" | \"compact\"\n\nexport type SurfaceDensity = Density | \"touch\"\n\nconst DensityContext = React.createContext<SurfaceDensity>(\"compact\")\nDensityContext.displayName = \"DensityContext\"\n\nexport function DensityProvider({\n density,\n children,\n}: {\n density: SurfaceDensity\n children: React.ReactNode\n}) {\n return (\n <DensityContext.Provider value={density}>\n <div data-density={density} className=\"contents\">\n {children}\n </div>\n </DensityContext.Provider>\n )\n}\n\nfunction toDensity(density: SurfaceDensity): Density {\n return density === \"touch\" ? \"comfortable\" : density\n}\n\nexport function useDensity(density?: Density): Density {\n const context = React.useContext(DensityContext)\n return density ?? toDensity(context)\n}\n\nexport function useTouch(): boolean {\n return React.useContext(DensityContext) === \"touch\"\n}\n\nexport type Domain = \"application\" | \"marketing\"\n\nconst DomainContext = React.createContext<Domain>(\"application\")\nDomainContext.displayName = \"DomainContext\"\n\nexport function DomainProvider({ domain, children }: { domain: Domain; children: React.ReactNode }) {\n return <DomainContext.Provider value={domain}>{children}</DomainContext.Provider>\n}\n\nexport function useDomain(): Domain {\n return React.useContext(DomainContext)\n}\n\nexport type ControlSize = \"sm\" | \"md\" | \"lg\"\n\nexport type ButtonSize = \"xs\" | ControlSize | \"xl\"\n\nconst ControlSizeContext = React.createContext<ButtonSize | null>(null)\nControlSizeContext.displayName = \"ControlSizeContext\"\n\nexport function ControlSizeProvider({\n size,\n children,\n}: {\n size: ButtonSize\n children: React.ReactNode\n}) {\n return <ControlSizeContext.Provider value={size}>{children}</ControlSizeContext.Provider>\n}\n\nfunction toControlSize(size: ButtonSize): ControlSize {\n if (size === \"xl\") return \"lg\"\n if (size === \"xs\") return \"sm\"\n return size\n}\n\nexport function useControlSizeContext(): ControlSize | null {\n const size = React.useContext(ControlSizeContext)\n return size ? toControlSize(size) : null\n}\n\nexport function useControlSize(size?: ControlSize, density?: Density): ControlSize {\n const contextSize = React.useContext(ControlSizeContext)\n const domain = React.useContext(DomainContext)\n if (size) return size\n if (density) return density === \"compact\" ? \"sm\" : \"md\"\n if (contextSize) return toControlSize(contextSize)\n return domain === \"marketing\" ? \"md\" : \"sm\"\n}\n\nfunction resolveButtonSize(\n size: ButtonSize | undefined,\n density: Density | undefined,\n contextSize: ButtonSize | null,\n domain: Domain,\n): ButtonSize {\n if (size) return size\n if (density) return density === \"compact\" ? \"sm\" : \"md\"\n if (contextSize) return contextSize\n return domain === \"marketing\" ? \"md\" : \"sm\"\n}\n\nexport function useButtonSize(size?: ButtonSize, density?: Density): ButtonSize {\n const contextSize = React.useContext(ControlSizeContext)\n const domain = React.useContext(DomainContext)\n const touch = React.useContext(DensityContext) === \"touch\"\n const resolved = resolveButtonSize(size, density, contextSize, domain)\n return touch && resolved === \"xs\" ? \"sm\" : resolved\n}\n"],"mappings":";AAoBM;AAlBN,YAAY,WAAW;AAMvB,MAAM,iBAAiB,MAAM,cAA8B,SAAS;AACpE,eAAe,cAAc;AAEtB,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AACF,GAGG;AACD,SACE,oBAAC,eAAe,UAAf,EAAwB,OAAO,SAC9B,8BAAC,SAAI,gBAAc,SAAS,WAAU,YACnC,UACH,GACF;AAEJ;AAEA,SAAS,UAAU,SAAkC;AACnD,SAAO,YAAY,UAAU,gBAAgB;AAC/C;AAEO,SAAS,WAAW,SAA4B;AACrD,QAAM,UAAU,MAAM,WAAW,cAAc;AAC/C,SAAO,WAAW,UAAU,OAAO;AACrC;AAEO,SAAS,WAAoB;AAClC,SAAO,MAAM,WAAW,cAAc,MAAM;AAC9C;AAIA,MAAM,gBAAgB,MAAM,cAAsB,aAAa;AAC/D,cAAc,cAAc;AAErB,SAAS,eAAe,EAAE,QAAQ,SAAS,GAAkD;AAClG,SAAO,oBAAC,cAAc,UAAd,EAAuB,OAAO,QAAS,UAAS;AAC1D;AAEO,SAAS,YAAoB;AAClC,SAAO,MAAM,WAAW,aAAa;AACvC;AAMA,MAAM,qBAAqB,MAAM,cAAiC,IAAI;AACtE,mBAAmB,cAAc;AAE1B,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AACF,GAGG;AACD,SAAO,oBAAC,mBAAmB,UAAnB,EAA4B,OAAO,MAAO,UAAS;AAC7D;AAEA,SAAS,cAAc,MAA+B;AACpD,MAAI,SAAS,KAAM,QAAO;AAC1B,MAAI,SAAS,KAAM,QAAO;AAC1B,SAAO;AACT;AAEO,SAAS,wBAA4C;AAC1D,QAAM,OAAO,MAAM,WAAW,kBAAkB;AAChD,SAAO,OAAO,cAAc,IAAI,IAAI;AACtC;AAEO,SAAS,eAAe,MAAoB,SAAgC;AACjF,QAAM,cAAc,MAAM,WAAW,kBAAkB;AACvD,QAAM,SAAS,MAAM,WAAW,aAAa;AAC7C,MAAI,KAAM,QAAO;AACjB,MAAI,QAAS,QAAO,YAAY,YAAY,OAAO;AACnD,MAAI,YAAa,QAAO,cAAc,WAAW;AACjD,SAAO,WAAW,cAAc,OAAO;AACzC;AAEA,SAAS,kBACP,MACA,SACA,aACA,QACY;AACZ,MAAI,KAAM,QAAO;AACjB,MAAI,QAAS,QAAO,YAAY,YAAY,OAAO;AACnD,MAAI,YAAa,QAAO;AACxB,SAAO,WAAW,cAAc,OAAO;AACzC;AAEO,SAAS,cAAc,MAAmB,SAA+B;AAC9E,QAAM,cAAc,MAAM,WAAW,kBAAkB;AACvD,QAAM,SAAS,MAAM,WAAW,aAAa;AAC7C,QAAM,QAAQ,MAAM,WAAW,cAAc,MAAM;AACnD,QAAM,WAAW,kBAAkB,MAAM,SAAS,aAAa,MAAM;AACrE,SAAO,SAAS,aAAa,OAAO,OAAO;AAC7C;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
const FieldContext = React.createContext(null);
|
|
4
|
+
FieldContext.displayName = "FieldContext";
|
|
5
|
+
const FieldContextProvider = FieldContext.Provider;
|
|
6
|
+
function useFieldContext() {
|
|
7
|
+
return React.useContext(FieldContext);
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
FieldContextProvider,
|
|
11
|
+
useFieldContext
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=field-context.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/field-context.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nexport interface FieldContextValue {\n id: string\n labelId: string\n labelledBy: string | undefined\n registerLabel: () => () => void\n describedBy: string | undefined\n hintId: string\n registerHint: () => () => void\n /** The id of a label's `info` text, which joins `describedBy` while it is rendered. */\n infoId: string\n registerInfo: () => () => void\n hasError: boolean\n disabled: boolean\n required: boolean\n}\n\nconst FieldContext = React.createContext<FieldContextValue | null>(null)\nFieldContext.displayName = \"FieldContext\"\n\nexport const FieldContextProvider = FieldContext.Provider\n\nexport function useFieldContext(): FieldContextValue | null {\n return React.useContext(FieldContext)\n}\n"],"mappings":";AAEA,YAAY,WAAW;AAkBvB,MAAM,eAAe,MAAM,cAAwC,IAAI;AACvE,aAAa,cAAc;AAEpB,MAAM,uBAAuB,aAAa;AAE1C,SAAS,kBAA4C;AAC1D,SAAO,MAAM,WAAW,YAAY;AACtC;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const COMBINING_MARKS = /\p{M}/gu;
|
|
2
|
+
function foldText(value) {
|
|
3
|
+
return value.normalize("NFD").replace(COMBINING_MARKS, "").toLowerCase();
|
|
4
|
+
}
|
|
5
|
+
const containsFilter = (query, textValue, keywords) => {
|
|
6
|
+
const words = foldText(query).split(/\s+/).filter(Boolean);
|
|
7
|
+
if (words.length === 0) return 1;
|
|
8
|
+
const text = foldText(textValue);
|
|
9
|
+
const extra = (keywords ?? []).map(foldText);
|
|
10
|
+
const found = words.every((word) => text.includes(word) || extra.some((keyword) => keyword.includes(word)));
|
|
11
|
+
if (!found) return 0;
|
|
12
|
+
return text.startsWith(words[0]) ? 2 : 1;
|
|
13
|
+
};
|
|
14
|
+
function textOf(node) {
|
|
15
|
+
if (node == null || typeof node === "boolean") return "";
|
|
16
|
+
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
17
|
+
if (Array.isArray(node)) return node.map(textOf).join("");
|
|
18
|
+
if (typeof node === "object" && "props" in node) {
|
|
19
|
+
return textOf(node.props.children);
|
|
20
|
+
}
|
|
21
|
+
return "";
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
containsFilter,
|
|
25
|
+
foldText,
|
|
26
|
+
textOf
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=filter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/filter.ts"],"sourcesContent":["/*\n * The search lists' filter (Combobox, Command): case- and accent-blind, each word of the query\n * matched on its own, against the row's text and its keywords. Returns a score: 0 hides the row,\n * 2 for a match at the start of the text, 1 for a match anywhere else.\n */\n\nconst COMBINING_MARKS = /\\p{M}/gu\n\n/** Lowercase, accents removed: \"Camión\" → \"camion\". */\nexport function foldText(value: string): string {\n return value.normalize(\"NFD\").replace(COMBINING_MARKS, \"\").toLowerCase()\n}\n\nexport type FilterFn = (query: string, textValue: string, keywords?: string[]) => number\n\nexport const containsFilter: FilterFn = (query, textValue, keywords) => {\n const words = foldText(query).split(/\\s+/).filter(Boolean)\n if (words.length === 0) return 1\n const text = foldText(textValue)\n const extra = (keywords ?? []).map(foldText)\n const found = words.every((word) => text.includes(word) || extra.some((keyword) => keyword.includes(word)))\n if (!found) return 0\n return text.startsWith(words[0]) ? 2 : 1\n}\n\n/** The plain text inside React children, for a row's default `textValue`. */\nexport function textOf(node: unknown): string {\n if (node == null || typeof node === \"boolean\") return \"\"\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n if (Array.isArray(node)) return node.map(textOf).join(\"\")\n if (typeof node === \"object\" && \"props\" in node) {\n return textOf((node as { props: { children?: unknown } }).props.children)\n }\n return \"\"\n}\n"],"mappings":"AAMA,MAAM,kBAAkB;AAGjB,SAAS,SAAS,OAAuB;AAC9C,SAAO,MAAM,UAAU,KAAK,EAAE,QAAQ,iBAAiB,EAAE,EAAE,YAAY;AACzE;AAIO,MAAM,iBAA2B,CAAC,OAAO,WAAW,aAAa;AACtE,QAAM,QAAQ,SAAS,KAAK,EAAE,MAAM,KAAK,EAAE,OAAO,OAAO;AACzD,MAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,QAAM,OAAO,SAAS,SAAS;AAC/B,QAAM,SAAS,YAAY,CAAC,GAAG,IAAI,QAAQ;AAC3C,QAAM,QAAQ,MAAM,MAAM,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK,MAAM,KAAK,CAAC,YAAY,QAAQ,SAAS,IAAI,CAAC,CAAC;AAC1G,MAAI,CAAC,MAAO,QAAO;AACnB,SAAO,KAAK,WAAW,MAAM,CAAC,CAAC,IAAI,IAAI;AACzC;AAGO,SAAS,OAAO,MAAuB;AAC5C,MAAI,QAAQ,QAAQ,OAAO,SAAS,UAAW,QAAO;AACtD,MAAI,OAAO,SAAS,YAAY,OAAO,SAAS,SAAU,QAAO,OAAO,IAAI;AAC5E,MAAI,MAAM,QAAQ,IAAI,EAAG,QAAO,KAAK,IAAI,MAAM,EAAE,KAAK,EAAE;AACxD,MAAI,OAAO,SAAS,YAAY,WAAW,MAAM;AAC/C,WAAO,OAAQ,KAA2C,MAAM,QAAQ;AAAA,EAC1E;AACA,SAAO;AACT;","names":[]}
|