@ecoma-io/loom 0.4.0 → 0.5.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/README.md +11 -9
- package/dist/a11y.js +2 -2
- package/dist/index.js +36 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/CalendarDate.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/conversion.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/conversion.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/manipulation.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/manipulation.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/queries.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/queries.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/string.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/string.js.map +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/utils.js +1 -1
- package/dist/node_modules/.pnpm/{@internationalized_date@3.12.3 → @internationalized_date@3.12.4}/node_modules/@internationalized/date/dist/private/utils.js.map +1 -1
- package/dist/packages/blocks/empty-state/src/EmptyState.js.map +1 -1
- package/dist/packages/blocks/empty-state/src/EmptyState.vue.d.ts.map +1 -1
- package/dist/packages/blocks/empty-state/src/EmptyState.vue_vue_type_script_setup_true_lang.js +5 -6
- package/dist/packages/blocks/empty-state/src/EmptyState.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/blocks/error-summary/src/ErrorSummary.js +7 -0
- package/dist/packages/blocks/error-summary/src/ErrorSummary.js.map +1 -0
- package/dist/packages/blocks/error-summary/src/ErrorSummary.vue.d.ts +31 -0
- package/dist/packages/blocks/error-summary/src/ErrorSummary.vue_vue_type_script_setup_true_lang.js +90 -0
- package/dist/packages/blocks/error-summary/src/ErrorSummary.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/blocks/error-summary/src/index.d.ts +4 -0
- package/dist/packages/blocks/error-summary/src/index.js +3 -0
- package/dist/packages/composition/scroll-reel/src/ScrollReel.js.map +1 -1
- package/dist/packages/composition/scroll-reel/src/ScrollReel.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/packages/composition/scroll-reel/src/ScrollReel.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/composition/sidebar/src/Sidebar.js.map +1 -1
- package/dist/packages/composition/sidebar/src/Sidebar.vue.d.ts +4 -0
- package/dist/packages/composition/sidebar/src/Sidebar.vue.d.ts.map +1 -1
- package/dist/packages/composition/sidebar/src/Sidebar.vue_vue_type_script_setup_true_lang.js +13 -4
- package/dist/packages/composition/sidebar/src/Sidebar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/composition/split/src/Split.js.map +1 -1
- package/dist/packages/composition/split/src/Split.vue.d.ts +11 -12
- package/dist/packages/composition/split/src/Split.vue.d.ts.map +1 -1
- package/dist/packages/composition/split/src/Split.vue_vue_type_script_setup_true_lang.js +15 -5
- package/dist/packages/composition/split/src/Split.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/core/src/a11y-scope.d.ts +71 -5
- package/dist/packages/core/src/a11y-scope.d.ts.map +1 -1
- package/dist/packages/core/src/a11y-scope.js +126 -6
- package/dist/packages/core/src/a11y-scope.js.map +1 -1
- package/dist/packages/core/src/index.d.ts +1 -1
- package/dist/packages/core/src/index.d.ts.map +1 -1
- package/dist/packages/core/src/index.js +2 -2
- package/dist/packages/labels/src/component-shapes.d.ts +163 -1
- package/dist/packages/labels/src/component-shapes.d.ts.map +1 -1
- package/dist/packages/labels/src/date-labels.d.ts +82 -5
- package/dist/packages/labels/src/date-labels.d.ts.map +1 -1
- package/dist/packages/labels/src/date-labels.js +54 -7
- package/dist/packages/labels/src/date-labels.js.map +1 -1
- package/dist/packages/labels/src/field-context.d.ts +2 -2
- package/dist/packages/labels/src/field-context.js.map +1 -1
- package/dist/packages/labels/src/index.d.ts +3 -3
- package/dist/packages/labels/src/index.d.ts.map +1 -1
- package/dist/packages/labels/src/index.js +2 -2
- package/dist/packages/labels/src/label-registry.d.ts +9 -1
- package/dist/packages/labels/src/label-registry.d.ts.map +1 -1
- package/dist/packages/layouts/dashboard/src/Dashboard.js.map +1 -1
- package/dist/packages/layouts/dashboard/src/Dashboard.vue.d.ts +4 -4
- package/dist/packages/layouts/dashboard/src/Dashboard.vue.d.ts.map +1 -1
- package/dist/packages/layouts/dashboard/src/Dashboard.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/layouts/settings/src/Settings.js.map +1 -1
- package/dist/packages/layouts/settings/src/Settings.vue.d.ts +3 -3
- package/dist/packages/layouts/settings/src/Settings.vue.d.ts.map +1 -1
- package/dist/packages/layouts/settings/src/Settings.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/layouts/split-layout/src/SplitLayout.js.map +1 -1
- package/dist/packages/layouts/split-layout/src/SplitLayout.vue.d.ts +4 -6
- package/dist/packages/layouts/split-layout/src/SplitLayout.vue.d.ts.map +1 -1
- package/dist/packages/layouts/split-layout/src/SplitLayout.vue_vue_type_script_setup_true_lang.js +20 -5
- package/dist/packages/layouts/split-layout/src/SplitLayout.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/layouts/split-layout/src/index.d.ts +1 -1
- package/dist/packages/layouts/split-layout/src/index.d.ts.map +1 -1
- package/dist/packages/loom/src/a11y.d.ts +1 -1
- package/dist/packages/loom/src/index.d.ts +27 -1
- package/dist/packages/primitives/alert/src/Alert.js.map +1 -1
- package/dist/packages/primitives/alert/src/Alert.vue.d.ts +18 -0
- package/dist/packages/primitives/alert/src/Alert.vue_vue_type_script_setup_true_lang.js +10 -7
- package/dist/packages/primitives/alert/src/Alert.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/avatar/src/Avatar.js.map +1 -1
- package/dist/packages/primitives/avatar/src/Avatar.vue.d.ts +2 -2
- package/dist/packages/primitives/avatar/src/Avatar.vue.d.ts.map +1 -1
- package/dist/packages/primitives/avatar/src/Avatar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/avatar/src/Avatar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/calendar/src/Calendar.js +7 -0
- package/dist/packages/primitives/calendar/src/Calendar.js.map +1 -0
- package/dist/packages/primitives/calendar/src/Calendar.vue.d.ts +95 -0
- package/dist/packages/primitives/calendar/src/Calendar.vue_vue_type_script_setup_true_lang.js +204 -0
- package/dist/packages/primitives/calendar/src/Calendar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/calendar/src/index.d.ts +3 -0
- package/dist/packages/primitives/calendar/src/index.js +3 -0
- package/dist/packages/primitives/combobox/src/Combobox.vue.d.ts +1 -1
- package/dist/packages/primitives/command/src/Command.js +7 -0
- package/dist/packages/primitives/command/src/Command.js.map +1 -0
- package/dist/packages/primitives/command/src/Command.vue.d.ts +77 -0
- package/dist/packages/primitives/command/src/Command.vue_vue_type_script_setup_true_lang.js +333 -0
- package/dist/packages/primitives/command/src/Command.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/command/src/index.d.ts +4 -0
- package/dist/packages/primitives/command/src/index.js +3 -0
- package/dist/packages/primitives/copy-button/src/CopyButton.js +7 -0
- package/dist/packages/primitives/copy-button/src/CopyButton.js.map +1 -0
- package/dist/packages/primitives/copy-button/src/CopyButton.vue.d.ts +64 -0
- package/dist/packages/primitives/copy-button/src/CopyButton.vue_vue_type_script_setup_true_lang.js +113 -0
- package/dist/packages/primitives/copy-button/src/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/copy-button/src/index.d.ts +4 -0
- package/dist/packages/primitives/copy-button/src/index.js +3 -0
- package/dist/packages/primitives/data-grid/src/DataGrid.js +7 -0
- package/dist/packages/primitives/data-grid/src/DataGrid.js.map +1 -0
- package/dist/packages/primitives/data-grid/src/DataGrid.vue.d.ts +128 -0
- package/dist/packages/primitives/data-grid/src/DataGrid.vue_vue_type_script_setup_true_lang.js +347 -0
- package/dist/packages/primitives/data-grid/src/DataGrid.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/data-grid/src/index.d.ts +4 -0
- package/dist/packages/primitives/data-grid/src/index.js +3 -0
- package/dist/packages/primitives/date-picker/src/DatePicker.js.map +1 -1
- package/dist/packages/primitives/date-picker/src/DatePicker.vue_vue_type_script_setup_true_lang.js +13 -13
- package/dist/packages/primitives/date-picker/src/DatePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/date-range-picker/src/DateRangePicker.js.map +1 -1
- package/dist/packages/primitives/date-range-picker/src/DateRangePicker.vue_vue_type_script_setup_true_lang.js +21 -18
- package/dist/packages/primitives/date-range-picker/src/DateRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/date-time-picker/src/DateTimePicker.js.map +1 -1
- package/dist/packages/primitives/date-time-picker/src/DateTimePicker.vue_vue_type_script_setup_true_lang.js +17 -16
- package/dist/packages/primitives/date-time-picker/src/DateTimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.js.map +1 -1
- package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +17 -16
- package/dist/packages/primitives/date-time-range-picker/src/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/dialog/src/Dialog.js.map +1 -1
- package/dist/packages/primitives/dialog/src/Dialog.vue.d.ts +15 -7
- package/dist/packages/primitives/dialog/src/Dialog.vue_vue_type_script_setup_true_lang.js +5 -3
- package/dist/packages/primitives/dialog/src/Dialog.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/drawer/src/Drawer.js.map +1 -1
- package/dist/packages/primitives/drawer/src/Drawer.vue.d.ts +10 -2
- package/dist/packages/primitives/drawer/src/Drawer.vue_vue_type_script_setup_true_lang.js +11 -3
- package/dist/packages/primitives/drawer/src/Drawer.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/hover-card/src/index.d.ts.map +1 -1
- package/dist/packages/primitives/live-region/src/LiveRegion.js +7 -0
- package/dist/packages/primitives/live-region/src/LiveRegion.js.map +1 -0
- package/dist/packages/primitives/live-region/src/LiveRegion.vue.d.ts +36 -0
- package/dist/packages/primitives/live-region/src/LiveRegion.vue.d.ts.map +1 -0
- package/dist/packages/primitives/live-region/src/LiveRegion.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/packages/primitives/live-region/src/LiveRegion.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/live-region/src/context.d.ts +40 -0
- package/dist/packages/primitives/live-region/src/context.d.ts.map +1 -0
- package/dist/packages/primitives/live-region/src/context.js +85 -0
- package/dist/packages/primitives/live-region/src/context.js.map +1 -0
- package/dist/packages/primitives/live-region/src/index.d.ts +4 -0
- package/dist/packages/primitives/live-region/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/live-region/src/index.js +3 -0
- package/dist/packages/primitives/live-region/src/useAnnounce.d.ts +17 -0
- package/dist/packages/primitives/live-region/src/useAnnounce.d.ts.map +1 -0
- package/dist/packages/primitives/live-region/src/useAnnounce.js +25 -0
- package/dist/packages/primitives/live-region/src/useAnnounce.js.map +1 -0
- package/dist/packages/primitives/menubar/src/Menubar.js.map +1 -1
- package/dist/packages/primitives/menubar/src/Menubar.vue.d.ts.map +1 -1
- package/dist/packages/primitives/menubar/src/Menubar.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/packages/primitives/menubar/src/Menubar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/meter/src/Meter.js +7 -0
- package/dist/packages/primitives/meter/src/Meter.js.map +1 -0
- package/dist/packages/primitives/meter/src/Meter.vue.d.ts +87 -0
- package/dist/packages/primitives/meter/src/Meter.vue_vue_type_script_setup_true_lang.js +236 -0
- package/dist/packages/primitives/meter/src/Meter.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/meter/src/index.d.ts +4 -0
- package/dist/packages/primitives/meter/src/index.js +3 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.js +7 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.js.map +1 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue.d.ts +69 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue.d.ts.map +1 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue_vue_type_script_setup_true_lang.js +118 -0
- package/dist/packages/primitives/navigation-menu/src/NavigationMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/navigation-menu/src/index.d.ts +3 -0
- package/dist/packages/primitives/navigation-menu/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/navigation-menu/src/index.js +2 -0
- package/dist/packages/primitives/segmented-control/src/SegmentedControl.js.map +1 -1
- package/dist/packages/primitives/segmented-control/src/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/packages/primitives/segmented-control/src/SegmentedControl.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/segmented-control/src/SegmentedControl.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/skip-link/src/SkipLink.js +7 -0
- package/dist/packages/primitives/skip-link/src/SkipLink.js.map +1 -0
- package/dist/packages/primitives/skip-link/src/SkipLink.vue.d.ts +62 -0
- package/dist/packages/primitives/skip-link/src/SkipLink.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/packages/primitives/skip-link/src/SkipLink.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/skip-link/src/index.d.ts +3 -0
- package/dist/packages/primitives/skip-link/src/index.js +3 -0
- package/dist/packages/primitives/stepper/src/Stepper.js.map +1 -1
- package/dist/packages/primitives/stepper/src/Stepper.vue_vue_type_script_setup_true_lang.js +7 -5
- package/dist/packages/primitives/stepper/src/Stepper.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/switch/src/Switch.js.map +1 -1
- package/dist/packages/primitives/switch/src/Switch.vue.d.ts.map +1 -1
- package/dist/packages/primitives/switch/src/Switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/packages/primitives/switch/src/Switch.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/table/src/index.d.ts +1 -1
- package/dist/packages/primitives/table/src/index.js +2 -2
- package/dist/packages/primitives/time-picker/src/TimePicker.js.map +1 -1
- package/dist/packages/primitives/time-picker/src/TimePicker.vue_vue_type_script_setup_true_lang.js +10 -8
- package/dist/packages/primitives/time-picker/src/TimePicker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/toast/src/ToastItem.js.map +1 -1
- package/dist/packages/primitives/toast/src/ToastItem.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/packages/primitives/toast/src/ToastItem.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.js +7 -0
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.js.map +1 -0
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue.d.ts +53 -0
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue.d.ts.map +1 -0
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue_vue_type_script_setup_true_lang.js +111 -0
- package/dist/packages/primitives/toggle-group/src/ToggleGroup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/toggle-group/src/index.d.ts +3 -0
- package/dist/packages/primitives/toggle-group/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/toggle-group/src/index.js +2 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.js +7 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.js.map +1 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.vue.d.ts +31 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.vue.d.ts.map +1 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.vue_vue_type_script_setup_true_lang.js +149 -0
- package/dist/packages/primitives/toolbar/src/Toolbar.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.js +7 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.js.map +1 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue.d.ts +24 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue.d.ts.map +1 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/packages/primitives/toolbar/src/ToolbarSeparator.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/toolbar/src/index.d.ts +4 -0
- package/dist/packages/primitives/toolbar/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/toolbar/src/index.js +3 -0
- package/dist/packages/primitives/tree-view/src/TreeView.js +7 -0
- package/dist/packages/primitives/tree-view/src/TreeView.js.map +1 -0
- package/dist/packages/primitives/tree-view/src/TreeView.vue.d.ts +99 -0
- package/dist/packages/primitives/tree-view/src/TreeView.vue_vue_type_script_setup_true_lang.js +310 -0
- package/dist/packages/primitives/tree-view/src/TreeView.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.js +7 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.js.map +1 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.vue.d.ts +15 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.vue.d.ts.map +1 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/packages/primitives/tree-view/src/TreeViewNode.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/tree-view/src/context.d.ts +39 -0
- package/dist/packages/primitives/tree-view/src/context.d.ts.map +1 -0
- package/dist/packages/primitives/tree-view/src/context.js +6 -0
- package/dist/packages/primitives/tree-view/src/context.js.map +1 -0
- package/dist/packages/primitives/tree-view/src/index.d.ts +4 -0
- package/dist/packages/primitives/tree-view/src/index.js +3 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.js +7 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.js.map +1 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue.d.ts +21 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue.d.ts.map +1 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/packages/primitives/visually-hidden/src/VisuallyHidden.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/packages/primitives/visually-hidden/src/index.d.ts +3 -0
- package/dist/packages/primitives/visually-hidden/src/index.d.ts.map +1 -0
- package/dist/packages/primitives/visually-hidden/src/index.js +2 -0
- package/package.json +29 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/queries.mjs"],"sourcesContent":["import {fromAbsolute as $d07e34cce18680fd$export$1b96692a1ba042ac, toAbsolute as $d07e34cce18680fd$export$5107c82f94518f5c, toCalendar as $d07e34cce18680fd$export$b4a036af3fc0b032, toCalendarDate as $d07e34cce18680fd$export$93522d1a439f3617} from \"./conversion.mjs\";\nimport {weekStartData as $d2ca8165c9aa885a$export$7a5acbd77d414bd9} from \"./weekStartData.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $ad063034c8620db8$export$ea39ec197993aef0(a, b) {\n b = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(b, a.calendar);\n return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;\n}\nfunction $ad063034c8620db8$export$a18c89cbd24170ff(a, b) {\n b = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(b, a.calendar);\n // In the Japanese calendar, months can span multiple eras/years, so only compare the first of the month.\n a = $ad063034c8620db8$export$a5a3b454ada2268e(a);\n b = $ad063034c8620db8$export$a5a3b454ada2268e(b);\n return a.era === b.era && a.year === b.year && a.month === b.month;\n}\nfunction $ad063034c8620db8$export$5841f9eb9773f25f(a, b) {\n b = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(b, a.calendar);\n a = $ad063034c8620db8$export$f91e89d3d0406102(a);\n b = $ad063034c8620db8$export$f91e89d3d0406102(b);\n return a.era === b.era && a.year === b.year;\n}\nfunction $ad063034c8620db8$export$91b62ebf2ba703ee(a, b) {\n return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$ea39ec197993aef0(a, b);\n}\nfunction $ad063034c8620db8$export$5a8da0c44a3afdf2(a, b) {\n return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$a18c89cbd24170ff(a, b);\n}\nfunction $ad063034c8620db8$export$ea840f5a6dda8147(a, b) {\n return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$5841f9eb9773f25f(a, b);\n}\nfunction $ad063034c8620db8$export$dbc69fd56b53d5e(a, b) {\n return a.isEqual?.(b) ?? b.isEqual?.(a) ?? a.identifier === b.identifier;\n}\nfunction $ad063034c8620db8$export$629b0a497aa65267(date, timeZone) {\n return $ad063034c8620db8$export$ea39ec197993aef0(date, $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone));\n}\nconst $ad063034c8620db8$var$DAY_MAP = {\n sun: 0,\n mon: 1,\n tue: 2,\n wed: 3,\n thu: 4,\n fri: 5,\n sat: 6\n};\nfunction $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, firstDayOfWeek) {\n let julian = date.calendar.toJulianDay(date);\n // If julian is negative, then julian % 7 will be negative, so we adjust\n // accordingly. Julian day 0 is Monday.\n let weekStart = firstDayOfWeek ? $ad063034c8620db8$var$DAY_MAP[firstDayOfWeek] : $ad063034c8620db8$var$getWeekStart(locale);\n let dayOfWeek = Math.ceil(julian + 1 - weekStart) % 7;\n if (dayOfWeek < 0) dayOfWeek += 7;\n return dayOfWeek;\n}\nfunction $ad063034c8620db8$export$461939dd4422153(timeZone) {\n return (0, $d07e34cce18680fd$export$1b96692a1ba042ac)(Date.now(), timeZone);\n}\nfunction $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone) {\n return (0, $d07e34cce18680fd$export$93522d1a439f3617)($ad063034c8620db8$export$461939dd4422153(timeZone));\n}\nfunction $ad063034c8620db8$export$68781ddf31c0090f(a, b) {\n return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);\n}\nfunction $ad063034c8620db8$export$c19a80a9721b80f6(a, b) {\n return $ad063034c8620db8$var$timeToMs(a) - $ad063034c8620db8$var$timeToMs(b);\n}\nfunction $ad063034c8620db8$var$timeToMs(a) {\n return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;\n}\nfunction $ad063034c8620db8$export$126c91c941de7e(a, timeZone) {\n let ms = (0, $d07e34cce18680fd$export$5107c82f94518f5c)(a, timeZone);\n let tomorrow = a.add({\n days: 1\n });\n let tomorrowMs = (0, $d07e34cce18680fd$export$5107c82f94518f5c)(tomorrow, timeZone);\n return (tomorrowMs - ms) / 3600000;\n}\nlet $ad063034c8620db8$var$localTimeZone = null;\nlet $ad063034c8620db8$var$localTimeZoneOverride = false;\nfunction $ad063034c8620db8$export$aa8b41735afcabd2() {\n if ($ad063034c8620db8$var$localTimeZone == null) $ad063034c8620db8$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;\n return $ad063034c8620db8$var$localTimeZone;\n}\nfunction $ad063034c8620db8$export$61a9d83ceb59a3dd(timeZone) {\n $ad063034c8620db8$var$localTimeZoneOverride = true;\n $ad063034c8620db8$var$localTimeZone = timeZone;\n}\nfunction $ad063034c8620db8$export$55753838ffe79333() {\n $ad063034c8620db8$var$localTimeZoneOverride = false;\n $ad063034c8620db8$var$localTimeZone = null;\n}\nfunction $ad063034c8620db8$export$6ab69b273755230b() {\n return $ad063034c8620db8$var$localTimeZoneOverride;\n}\nfunction $ad063034c8620db8$export$a5a3b454ada2268e(date) {\n // Use `subtract` instead of `set` so we don't get constrained in an era.\n return date.subtract({\n days: date.day - 1\n });\n}\nfunction $ad063034c8620db8$export$a2258d9c4118825c(date) {\n return date.add({\n days: date.calendar.getDaysInMonth(date) - date.day\n });\n}\nfunction $ad063034c8620db8$export$f91e89d3d0406102(date) {\n return $ad063034c8620db8$export$a5a3b454ada2268e(date.subtract({\n months: date.month - 1\n }));\n}\nfunction $ad063034c8620db8$export$8b7aa55c66d5569e(date) {\n return $ad063034c8620db8$export$a2258d9c4118825c(date.add({\n months: date.calendar.getMonthsInYear(date) - date.month\n }));\n}\nfunction $ad063034c8620db8$export$5412ac11713b72ad(date) {\n if (date.calendar.getMinimumMonthInYear) return date.calendar.getMinimumMonthInYear(date);\n return 1;\n}\nfunction $ad063034c8620db8$export$b2f4953d301981d5(date) {\n if (date.calendar.getMinimumDayInMonth) return date.calendar.getMinimumDayInMonth(date);\n return 1;\n}\nfunction $ad063034c8620db8$export$42c81a444fbfb5d4(date, locale, firstDayOfWeek) {\n let dayOfWeek = $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, firstDayOfWeek);\n return date.subtract({\n days: dayOfWeek\n });\n}\nfunction $ad063034c8620db8$export$ef8b6d9133084f4e(date, locale, firstDayOfWeek) {\n return $ad063034c8620db8$export$42c81a444fbfb5d4(date, locale, firstDayOfWeek).add({\n days: 6\n });\n}\nconst $ad063034c8620db8$var$cachedRegions = new Map();\nconst $ad063034c8620db8$var$cachedWeekInfo = new Map();\nfunction $ad063034c8620db8$var$getRegion(locale) {\n // If the Intl.Locale API is available, use it to get the region for the locale.\n // @ts-ignore\n if (Intl.Locale) {\n // Constructing an Intl.Locale is expensive, so cache the result.\n let region = $ad063034c8620db8$var$cachedRegions.get(locale);\n if (!region) {\n // @ts-ignore\n region = new Intl.Locale(locale).maximize().region;\n if (region) $ad063034c8620db8$var$cachedRegions.set(locale, region);\n }\n return region;\n }\n // If not, just try splitting the string.\n // If the second part of the locale string is 'u',\n // then this is a unicode extension, so ignore it.\n // Otherwise, it should be the region.\n let part = locale.split('-')[1];\n return part === 'u' ? undefined : part;\n}\nfunction $ad063034c8620db8$var$getWeekStart(locale) {\n // TODO: use Intl.Locale for this once browsers support the weekInfo property\n // https://github.com/tc39/proposal-intl-locale-info\n let weekInfo = $ad063034c8620db8$var$cachedWeekInfo.get(locale);\n if (!weekInfo) {\n if (Intl.Locale) {\n // @ts-ignore\n let localeInst = new Intl.Locale(locale);\n if ('getWeekInfo' in localeInst) {\n // @ts-expect-error\n weekInfo = localeInst.getWeekInfo();\n if (weekInfo) {\n $ad063034c8620db8$var$cachedWeekInfo.set(locale, weekInfo);\n return weekInfo.firstDay;\n }\n }\n }\n let region = $ad063034c8620db8$var$getRegion(locale);\n if (locale.includes('-fw-')) {\n // pull the value for the attribute fw from strings such as en-US-u-ca-iso8601-fw-tue or en-US-u-ca-iso8601-fw-mon-nu-thai\n // where the fw attribute could be followed by another unicode locale extension or not\n let day = locale.split('-fw-')[1].split('-')[0];\n if (day === 'mon') weekInfo = {\n firstDay: 1\n };\n else if (day === 'tue') weekInfo = {\n firstDay: 2\n };\n else if (day === 'wed') weekInfo = {\n firstDay: 3\n };\n else if (day === 'thu') weekInfo = {\n firstDay: 4\n };\n else if (day === 'fri') weekInfo = {\n firstDay: 5\n };\n else if (day === 'sat') weekInfo = {\n firstDay: 6\n };\n else weekInfo = {\n firstDay: 0\n };\n } else if (locale.includes('-ca-iso8601')) weekInfo = {\n firstDay: 1\n };\n else weekInfo = {\n firstDay: region ? (0, $d2ca8165c9aa885a$export$7a5acbd77d414bd9)[region] || 0 : 0\n };\n $ad063034c8620db8$var$cachedWeekInfo.set(locale, weekInfo);\n }\n return weekInfo.firstDay;\n}\nfunction $ad063034c8620db8$export$ccc1b2479e7dd654(date, locale, firstDayOfWeek) {\n let days = date.calendar.getDaysInMonth(date);\n return Math.ceil(($ad063034c8620db8$export$2061056d06d7cdf7($ad063034c8620db8$export$a5a3b454ada2268e(date), locale, firstDayOfWeek) + days) / 7);\n}\nfunction $ad063034c8620db8$export$5c333a116e949cdd(a, b) {\n if (a && b) return a.compare(b) <= 0 ? a : b;\n return a || b;\n}\nfunction $ad063034c8620db8$export$a75f2bff57811055(a, b) {\n if (a && b) return a.compare(b) >= 0 ? a : b;\n return a || b;\n}\nconst $ad063034c8620db8$var$WEEKEND_DATA = {\n AF: [\n 4,\n 5\n ],\n AE: [\n 5,\n 6\n ],\n BH: [\n 5,\n 6\n ],\n DZ: [\n 5,\n 6\n ],\n EG: [\n 5,\n 6\n ],\n IL: [\n 5,\n 6\n ],\n IQ: [\n 5,\n 6\n ],\n IR: [\n 5,\n 5\n ],\n JO: [\n 5,\n 6\n ],\n KW: [\n 5,\n 6\n ],\n LY: [\n 5,\n 6\n ],\n OM: [\n 5,\n 6\n ],\n QA: [\n 5,\n 6\n ],\n SA: [\n 5,\n 6\n ],\n SD: [\n 5,\n 6\n ],\n SY: [\n 5,\n 6\n ],\n YE: [\n 5,\n 6\n ]\n};\nfunction $ad063034c8620db8$export$618d60ea299da42(date, locale) {\n let julian = date.calendar.toJulianDay(date);\n // If julian is negative, then julian % 7 will be negative, so we adjust\n // accordingly. Julian day 0 is Monday.\n let dayOfWeek = Math.ceil(julian + 1) % 7;\n if (dayOfWeek < 0) dayOfWeek += 7;\n let region = $ad063034c8620db8$var$getRegion(locale);\n // Use Intl.Locale for this once weekInfo is supported.\n // https://github.com/tc39/proposal-intl-locale-info\n let [start, end] = $ad063034c8620db8$var$WEEKEND_DATA[region] || [\n 6,\n 0\n ];\n return dayOfWeek === start || dayOfWeek === end;\n}\nfunction $ad063034c8620db8$export$ee9d87258e1d19ed(date, locale) {\n return !$ad063034c8620db8$export$618d60ea299da42(date, locale);\n}\n\n\nexport {$ad063034c8620db8$export$ea39ec197993aef0 as isSameDay, $ad063034c8620db8$export$a18c89cbd24170ff as isSameMonth, $ad063034c8620db8$export$a5a3b454ada2268e as startOfMonth, $ad063034c8620db8$export$5841f9eb9773f25f as isSameYear, $ad063034c8620db8$export$f91e89d3d0406102 as startOfYear, $ad063034c8620db8$export$91b62ebf2ba703ee as isEqualDay, $ad063034c8620db8$export$dbc69fd56b53d5e as isEqualCalendar, $ad063034c8620db8$export$5a8da0c44a3afdf2 as isEqualMonth, $ad063034c8620db8$export$ea840f5a6dda8147 as isEqualYear, $ad063034c8620db8$export$629b0a497aa65267 as isToday, $ad063034c8620db8$export$d0bdf45af03a6ea3 as today, $ad063034c8620db8$export$2061056d06d7cdf7 as getDayOfWeek, $ad063034c8620db8$export$461939dd4422153 as now, $ad063034c8620db8$export$68781ddf31c0090f as compareDate, $ad063034c8620db8$export$c19a80a9721b80f6 as compareTime, $ad063034c8620db8$export$126c91c941de7e as getHoursInDay, $ad063034c8620db8$export$aa8b41735afcabd2 as getLocalTimeZone, $ad063034c8620db8$export$61a9d83ceb59a3dd as setLocalTimeZone, $ad063034c8620db8$export$55753838ffe79333 as resetLocalTimeZone, $ad063034c8620db8$export$6ab69b273755230b as isLocalTimeZoneOverridden, $ad063034c8620db8$export$a2258d9c4118825c as endOfMonth, $ad063034c8620db8$export$8b7aa55c66d5569e as endOfYear, $ad063034c8620db8$export$5412ac11713b72ad as getMinimumMonthInYear, $ad063034c8620db8$export$b2f4953d301981d5 as getMinimumDayInMonth, $ad063034c8620db8$export$42c81a444fbfb5d4 as startOfWeek, $ad063034c8620db8$export$ef8b6d9133084f4e as endOfWeek, $ad063034c8620db8$export$ccc1b2479e7dd654 as getWeeksInMonth, $ad063034c8620db8$export$5c333a116e949cdd as minDate, $ad063034c8620db8$export$a75f2bff57811055 as maxDate, $ad063034c8620db8$export$618d60ea299da42 as isWeekend, $ad063034c8620db8$export$ee9d87258e1d19ed as isWeekday};\n//# sourceMappingURL=queries.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;AAeA,SAAS,0CAA0C,GAAG,GAAG;CACrD,IAAQ,0CAA2C,GAAG,EAAE,QAAQ;CAChE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE;AACtF;AAuBA,SAAS,yCAAyC,GAAG,GAAG;CACpD,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,eAAe,EAAE;AAClE;AACA,SAAS,0CAA0C,MAAM,UAAU;CAC/D,OAAO,0CAA0C,MAAM,0CAA0C,QAAQ,CAAC;AAC9G;AAmBA,SAAS,yCAAyC,UAAU;CACxD,OAAW,0CAA2C,KAAK,IAAI,GAAG,QAAQ;AAC9E;AACA,SAAS,0CAA0C,UAAU;CACzD,OAAW,0CAA2C,yCAAyC,QAAQ,CAAC;AAC5G;AACA,SAAS,0CAA0C,GAAG,GAAG;CACrD,OAAO,EAAE,SAAS,YAAY,CAAC,IAAI,EAAE,SAAS,YAAY,CAAC;AAC/D;AACA,SAAS,0CAA0C,GAAG,GAAG;CACrD,OAAO,+BAA+B,CAAC,IAAI,+BAA+B,CAAC;AAC/E;AACA,SAAS,+BAA+B,GAAG;CACvC,OAAO,EAAE,OAAO,OAAU,EAAE,SAAS,MAAQ,EAAE,SAAS,MAAO,EAAE;AACrE;AASA,IAAI,sCAAsC;AAC1C,IAAI,8CAA8C;AAClD,SAAS,4CAA4C;CACjD,IAAI,uCAAuC,MAAM,sCAAsC,IAAI,KAAK,eAAe,CAAC,CAAC,gBAAgB,CAAC,CAAC;CACnI,OAAO;AACX;AASA,SAAS,4CAA4C;CACjD,OAAO;AACX"}
|
|
1
|
+
{"version":3,"file":"queries.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/@internationalized+date@3.12.4/node_modules/@internationalized/date/dist/private/queries.mjs"],"sourcesContent":["import {fromAbsolute as $d07e34cce18680fd$export$1b96692a1ba042ac, toAbsolute as $d07e34cce18680fd$export$5107c82f94518f5c, toCalendar as $d07e34cce18680fd$export$b4a036af3fc0b032, toCalendarDate as $d07e34cce18680fd$export$93522d1a439f3617} from \"./conversion.mjs\";\nimport {weekStartData as $d2ca8165c9aa885a$export$7a5acbd77d414bd9} from \"./weekStartData.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $ad063034c8620db8$export$ea39ec197993aef0(a, b) {\n b = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(b, a.calendar);\n return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;\n}\nfunction $ad063034c8620db8$export$a18c89cbd24170ff(a, b) {\n b = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(b, a.calendar);\n // In the Japanese calendar, months can span multiple eras/years, so only compare the first of the month.\n a = $ad063034c8620db8$export$a5a3b454ada2268e(a);\n b = $ad063034c8620db8$export$a5a3b454ada2268e(b);\n return a.era === b.era && a.year === b.year && a.month === b.month;\n}\nfunction $ad063034c8620db8$export$5841f9eb9773f25f(a, b) {\n b = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(b, a.calendar);\n a = $ad063034c8620db8$export$f91e89d3d0406102(a);\n b = $ad063034c8620db8$export$f91e89d3d0406102(b);\n return a.era === b.era && a.year === b.year;\n}\nfunction $ad063034c8620db8$export$91b62ebf2ba703ee(a, b) {\n return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$ea39ec197993aef0(a, b);\n}\nfunction $ad063034c8620db8$export$5a8da0c44a3afdf2(a, b) {\n return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$a18c89cbd24170ff(a, b);\n}\nfunction $ad063034c8620db8$export$ea840f5a6dda8147(a, b) {\n return $ad063034c8620db8$export$dbc69fd56b53d5e(a.calendar, b.calendar) && $ad063034c8620db8$export$5841f9eb9773f25f(a, b);\n}\nfunction $ad063034c8620db8$export$dbc69fd56b53d5e(a, b) {\n return a.isEqual?.(b) ?? b.isEqual?.(a) ?? a.identifier === b.identifier;\n}\nfunction $ad063034c8620db8$export$629b0a497aa65267(date, timeZone) {\n return $ad063034c8620db8$export$ea39ec197993aef0(date, $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone));\n}\nconst $ad063034c8620db8$var$DAY_MAP = {\n sun: 0,\n mon: 1,\n tue: 2,\n wed: 3,\n thu: 4,\n fri: 5,\n sat: 6\n};\nfunction $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, firstDayOfWeek) {\n let julian = date.calendar.toJulianDay(date);\n // If julian is negative, then julian % 7 will be negative, so we adjust\n // accordingly. Julian day 0 is Monday.\n let weekStart = firstDayOfWeek ? $ad063034c8620db8$var$DAY_MAP[firstDayOfWeek] : $ad063034c8620db8$var$getWeekStart(locale);\n let dayOfWeek = Math.ceil(julian + 1 - weekStart) % 7;\n if (dayOfWeek < 0) dayOfWeek += 7;\n return dayOfWeek;\n}\nfunction $ad063034c8620db8$export$461939dd4422153(timeZone) {\n return (0, $d07e34cce18680fd$export$1b96692a1ba042ac)(Date.now(), timeZone);\n}\nfunction $ad063034c8620db8$export$d0bdf45af03a6ea3(timeZone) {\n return (0, $d07e34cce18680fd$export$93522d1a439f3617)($ad063034c8620db8$export$461939dd4422153(timeZone));\n}\nfunction $ad063034c8620db8$export$68781ddf31c0090f(a, b) {\n return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);\n}\nfunction $ad063034c8620db8$export$c19a80a9721b80f6(a, b) {\n return $ad063034c8620db8$var$timeToMs(a) - $ad063034c8620db8$var$timeToMs(b);\n}\nfunction $ad063034c8620db8$var$timeToMs(a) {\n return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;\n}\nfunction $ad063034c8620db8$export$126c91c941de7e(a, timeZone) {\n let ms = (0, $d07e34cce18680fd$export$5107c82f94518f5c)(a, timeZone);\n let tomorrow = a.add({\n days: 1\n });\n let tomorrowMs = (0, $d07e34cce18680fd$export$5107c82f94518f5c)(tomorrow, timeZone);\n return (tomorrowMs - ms) / 3600000;\n}\nlet $ad063034c8620db8$var$localTimeZone = null;\nlet $ad063034c8620db8$var$localTimeZoneOverride = false;\nfunction $ad063034c8620db8$export$aa8b41735afcabd2() {\n if ($ad063034c8620db8$var$localTimeZone == null) $ad063034c8620db8$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;\n return $ad063034c8620db8$var$localTimeZone;\n}\nfunction $ad063034c8620db8$export$61a9d83ceb59a3dd(timeZone) {\n $ad063034c8620db8$var$localTimeZoneOverride = true;\n $ad063034c8620db8$var$localTimeZone = timeZone;\n}\nfunction $ad063034c8620db8$export$55753838ffe79333() {\n $ad063034c8620db8$var$localTimeZoneOverride = false;\n $ad063034c8620db8$var$localTimeZone = null;\n}\nfunction $ad063034c8620db8$export$6ab69b273755230b() {\n return $ad063034c8620db8$var$localTimeZoneOverride;\n}\nfunction $ad063034c8620db8$export$a5a3b454ada2268e(date) {\n // Use `subtract` instead of `set` so we don't get constrained in an era.\n return date.subtract({\n days: date.day - 1\n });\n}\nfunction $ad063034c8620db8$export$a2258d9c4118825c(date) {\n return date.add({\n days: date.calendar.getDaysInMonth(date) - date.day\n });\n}\nfunction $ad063034c8620db8$export$f91e89d3d0406102(date) {\n return $ad063034c8620db8$export$a5a3b454ada2268e(date.subtract({\n months: date.month - 1\n }));\n}\nfunction $ad063034c8620db8$export$8b7aa55c66d5569e(date) {\n return $ad063034c8620db8$export$a2258d9c4118825c(date.add({\n months: date.calendar.getMonthsInYear(date) - date.month\n }));\n}\nfunction $ad063034c8620db8$export$5412ac11713b72ad(date) {\n if (date.calendar.getMinimumMonthInYear) return date.calendar.getMinimumMonthInYear(date);\n return 1;\n}\nfunction $ad063034c8620db8$export$b2f4953d301981d5(date) {\n if (date.calendar.getMinimumDayInMonth) return date.calendar.getMinimumDayInMonth(date);\n return 1;\n}\nfunction $ad063034c8620db8$export$42c81a444fbfb5d4(date, locale, firstDayOfWeek) {\n let dayOfWeek = $ad063034c8620db8$export$2061056d06d7cdf7(date, locale, firstDayOfWeek);\n return date.subtract({\n days: dayOfWeek\n });\n}\nfunction $ad063034c8620db8$export$ef8b6d9133084f4e(date, locale, firstDayOfWeek) {\n return $ad063034c8620db8$export$42c81a444fbfb5d4(date, locale, firstDayOfWeek).add({\n days: 6\n });\n}\nconst $ad063034c8620db8$var$cachedRegions = new Map();\nconst $ad063034c8620db8$var$cachedWeekInfo = new Map();\nfunction $ad063034c8620db8$var$getRegion(locale) {\n // If the Intl.Locale API is available, use it to get the region for the locale.\n // @ts-ignore\n if (Intl.Locale) {\n // Constructing an Intl.Locale is expensive, so cache the result.\n let region = $ad063034c8620db8$var$cachedRegions.get(locale);\n if (!region) {\n // @ts-ignore\n region = new Intl.Locale(locale).maximize().region;\n if (region) $ad063034c8620db8$var$cachedRegions.set(locale, region);\n }\n return region;\n }\n // If not, just try splitting the string.\n // If the second part of the locale string is 'u',\n // then this is a unicode extension, so ignore it.\n // Otherwise, it should be the region.\n let part = locale.split('-')[1];\n return part === 'u' ? undefined : part;\n}\nfunction $ad063034c8620db8$var$getWeekStart(locale) {\n // TODO: use Intl.Locale for this once browsers support the weekInfo property\n // https://github.com/tc39/proposal-intl-locale-info\n let weekInfo = $ad063034c8620db8$var$cachedWeekInfo.get(locale);\n if (!weekInfo) {\n if (Intl.Locale) {\n // @ts-ignore\n let localeInst = new Intl.Locale(locale);\n if ('getWeekInfo' in localeInst) {\n weekInfo = localeInst.getWeekInfo();\n if (weekInfo) {\n $ad063034c8620db8$var$cachedWeekInfo.set(locale, weekInfo);\n return weekInfo.firstDay;\n }\n }\n }\n let region = $ad063034c8620db8$var$getRegion(locale);\n if (locale.includes('-fw-')) {\n // pull the value for the attribute fw from strings such as en-US-u-ca-iso8601-fw-tue or en-US-u-ca-iso8601-fw-mon-nu-thai\n // where the fw attribute could be followed by another unicode locale extension or not\n let day = locale.split('-fw-')[1].split('-')[0];\n if (day === 'mon') weekInfo = {\n firstDay: 1\n };\n else if (day === 'tue') weekInfo = {\n firstDay: 2\n };\n else if (day === 'wed') weekInfo = {\n firstDay: 3\n };\n else if (day === 'thu') weekInfo = {\n firstDay: 4\n };\n else if (day === 'fri') weekInfo = {\n firstDay: 5\n };\n else if (day === 'sat') weekInfo = {\n firstDay: 6\n };\n else weekInfo = {\n firstDay: 0\n };\n } else if (locale.includes('-ca-iso8601')) weekInfo = {\n firstDay: 1\n };\n else weekInfo = {\n firstDay: region ? (0, $d2ca8165c9aa885a$export$7a5acbd77d414bd9)[region] || 0 : 0\n };\n $ad063034c8620db8$var$cachedWeekInfo.set(locale, weekInfo);\n }\n return weekInfo.firstDay;\n}\nfunction $ad063034c8620db8$export$ccc1b2479e7dd654(date, locale, firstDayOfWeek) {\n let days = date.calendar.getDaysInMonth(date);\n return Math.ceil(($ad063034c8620db8$export$2061056d06d7cdf7($ad063034c8620db8$export$a5a3b454ada2268e(date), locale, firstDayOfWeek) + days) / 7);\n}\nfunction $ad063034c8620db8$export$5c333a116e949cdd(a, b) {\n if (a && b) return a.compare(b) <= 0 ? a : b;\n return a || b;\n}\nfunction $ad063034c8620db8$export$a75f2bff57811055(a, b) {\n if (a && b) return a.compare(b) >= 0 ? a : b;\n return a || b;\n}\nconst $ad063034c8620db8$var$WEEKEND_DATA = {\n AF: [\n 4,\n 5\n ],\n AE: [\n 5,\n 6\n ],\n BH: [\n 5,\n 6\n ],\n DZ: [\n 5,\n 6\n ],\n EG: [\n 5,\n 6\n ],\n IL: [\n 5,\n 6\n ],\n IQ: [\n 5,\n 6\n ],\n IR: [\n 5,\n 5\n ],\n JO: [\n 5,\n 6\n ],\n KW: [\n 5,\n 6\n ],\n LY: [\n 5,\n 6\n ],\n OM: [\n 5,\n 6\n ],\n QA: [\n 5,\n 6\n ],\n SA: [\n 5,\n 6\n ],\n SD: [\n 5,\n 6\n ],\n SY: [\n 5,\n 6\n ],\n YE: [\n 5,\n 6\n ]\n};\nfunction $ad063034c8620db8$export$618d60ea299da42(date, locale) {\n let julian = date.calendar.toJulianDay(date);\n // If julian is negative, then julian % 7 will be negative, so we adjust\n // accordingly. Julian day 0 is Monday.\n let dayOfWeek = Math.ceil(julian + 1) % 7;\n if (dayOfWeek < 0) dayOfWeek += 7;\n let region = $ad063034c8620db8$var$getRegion(locale);\n // Use Intl.Locale for this once weekInfo is supported.\n // https://github.com/tc39/proposal-intl-locale-info\n let [start, end] = $ad063034c8620db8$var$WEEKEND_DATA[region] || [\n 6,\n 0\n ];\n return dayOfWeek === start || dayOfWeek === end;\n}\nfunction $ad063034c8620db8$export$ee9d87258e1d19ed(date, locale) {\n return !$ad063034c8620db8$export$618d60ea299da42(date, locale);\n}\n\n\nexport {$ad063034c8620db8$export$ea39ec197993aef0 as isSameDay, $ad063034c8620db8$export$a18c89cbd24170ff as isSameMonth, $ad063034c8620db8$export$a5a3b454ada2268e as startOfMonth, $ad063034c8620db8$export$5841f9eb9773f25f as isSameYear, $ad063034c8620db8$export$f91e89d3d0406102 as startOfYear, $ad063034c8620db8$export$91b62ebf2ba703ee as isEqualDay, $ad063034c8620db8$export$dbc69fd56b53d5e as isEqualCalendar, $ad063034c8620db8$export$5a8da0c44a3afdf2 as isEqualMonth, $ad063034c8620db8$export$ea840f5a6dda8147 as isEqualYear, $ad063034c8620db8$export$629b0a497aa65267 as isToday, $ad063034c8620db8$export$d0bdf45af03a6ea3 as today, $ad063034c8620db8$export$2061056d06d7cdf7 as getDayOfWeek, $ad063034c8620db8$export$461939dd4422153 as now, $ad063034c8620db8$export$68781ddf31c0090f as compareDate, $ad063034c8620db8$export$c19a80a9721b80f6 as compareTime, $ad063034c8620db8$export$126c91c941de7e as getHoursInDay, $ad063034c8620db8$export$aa8b41735afcabd2 as getLocalTimeZone, $ad063034c8620db8$export$61a9d83ceb59a3dd as setLocalTimeZone, $ad063034c8620db8$export$55753838ffe79333 as resetLocalTimeZone, $ad063034c8620db8$export$6ab69b273755230b as isLocalTimeZoneOverridden, $ad063034c8620db8$export$a2258d9c4118825c as endOfMonth, $ad063034c8620db8$export$8b7aa55c66d5569e as endOfYear, $ad063034c8620db8$export$5412ac11713b72ad as getMinimumMonthInYear, $ad063034c8620db8$export$b2f4953d301981d5 as getMinimumDayInMonth, $ad063034c8620db8$export$42c81a444fbfb5d4 as startOfWeek, $ad063034c8620db8$export$ef8b6d9133084f4e as endOfWeek, $ad063034c8620db8$export$ccc1b2479e7dd654 as getWeeksInMonth, $ad063034c8620db8$export$5c333a116e949cdd as minDate, $ad063034c8620db8$export$a75f2bff57811055 as maxDate, $ad063034c8620db8$export$618d60ea299da42 as isWeekend, $ad063034c8620db8$export$ee9d87258e1d19ed as isWeekday};\n//# sourceMappingURL=queries.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;AAeA,SAAS,0CAA0C,GAAG,GAAG;CACrD,IAAQ,0CAA2C,GAAG,EAAE,QAAQ;CAChE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE;AACtF;AAuBA,SAAS,yCAAyC,GAAG,GAAG;CACpD,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,eAAe,EAAE;AAClE;AACA,SAAS,0CAA0C,MAAM,UAAU;CAC/D,OAAO,0CAA0C,MAAM,0CAA0C,QAAQ,CAAC;AAC9G;AAmBA,SAAS,yCAAyC,UAAU;CACxD,OAAW,0CAA2C,KAAK,IAAI,GAAG,QAAQ;AAC9E;AACA,SAAS,0CAA0C,UAAU;CACzD,OAAW,0CAA2C,yCAAyC,QAAQ,CAAC;AAC5G;AACA,SAAS,0CAA0C,GAAG,GAAG;CACrD,OAAO,EAAE,SAAS,YAAY,CAAC,IAAI,EAAE,SAAS,YAAY,CAAC;AAC/D;AACA,SAAS,0CAA0C,GAAG,GAAG;CACrD,OAAO,+BAA+B,CAAC,IAAI,+BAA+B,CAAC;AAC/E;AACA,SAAS,+BAA+B,GAAG;CACvC,OAAO,EAAE,OAAO,OAAU,EAAE,SAAS,MAAQ,EAAE,SAAS,MAAO,EAAE;AACrE;AASA,IAAI,sCAAsC;AAC1C,IAAI,8CAA8C;AAClD,SAAS,4CAA4C;CACjD,IAAI,uCAAuC,MAAM,sCAAsC,IAAI,KAAK,eAAe,CAAC,CAAC,gBAAgB,CAAC,CAAC;CACnI,OAAO;AACX;AASA,SAAS,4CAA4C;CACjD,OAAO;AACX"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GregorianCalendar as $93635573935797de$export$80ee6245ec4f29ec } from "./calendars/GregorianCalendar.js";
|
|
2
2
|
import { toCalendar as $d07e34cce18680fd$export$b4a036af3fc0b032 } from "./conversion.js";
|
|
3
3
|
import { CalendarDate as $2aaf608024c21ca1$export$99faa760c7908e4f, CalendarDateTime as $2aaf608024c21ca1$export$ca871e8dbb80966f, Time as $2aaf608024c21ca1$export$680ea196effce5f } from "./CalendarDate.js";
|
|
4
|
-
//#region node_modules/.pnpm/@internationalized+date@3.12.
|
|
4
|
+
//#region node_modules/.pnpm/@internationalized+date@3.12.4/node_modules/@internationalized/date/dist/private/string.mjs
|
|
5
5
|
var $58246871e4652552$var$TIME_RE = /^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
|
|
6
6
|
var $58246871e4652552$var$DATE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/;
|
|
7
7
|
var $58246871e4652552$var$DATE_TIME_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/@internationalized+date@3.12.3/node_modules/@internationalized/date/dist/private/string.mjs"],"sourcesContent":["import {CalendarDate as $2aaf608024c21ca1$export$99faa760c7908e4f, CalendarDateTime as $2aaf608024c21ca1$export$ca871e8dbb80966f, Time as $2aaf608024c21ca1$export$680ea196effce5f, ZonedDateTime as $2aaf608024c21ca1$export$d3b7288e7994edea} from \"./CalendarDate.mjs\";\nimport {epochFromDate as $d07e34cce18680fd$export$bd4fb2bc8bb06fb, fromAbsolute as $d07e34cce18680fd$export$1b96692a1ba042ac, possibleAbsolutes as $d07e34cce18680fd$export$136f38efe7caf549, toAbsolute as $d07e34cce18680fd$export$5107c82f94518f5c, toCalendar as $d07e34cce18680fd$export$b4a036af3fc0b032, toCalendarDateTime as $d07e34cce18680fd$export$b21e0b124e224484, toTimeZone as $d07e34cce18680fd$export$538b00033cc11c75} from \"./conversion.mjs\";\nimport {getLocalTimeZone as $ad063034c8620db8$export$aa8b41735afcabd2} from \"./queries.mjs\";\nimport {GregorianCalendar as $93635573935797de$export$80ee6245ec4f29ec} from \"./calendars/GregorianCalendar.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nconst $58246871e4652552$var$TIME_RE = /^(\\d{2})(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?$/;\nconst $58246871e4652552$var$DATE_RE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})$/;\nconst $58246871e4652552$var$DATE_TIME_RE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?$/;\nconst $58246871e4652552$var$ZONED_DATE_TIME_RE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?(?:([+-]\\d{2})(?::?(\\d{2}))?(?::?(\\d{2}))?)?\\[(.*?)\\]$/;\nconst $58246871e4652552$var$ABSOLUTE_RE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?(?:(?:([+-]\\d{2})(?::?(\\d{2}))?)|Z)$/;\nconst $58246871e4652552$var$DATE_TIME_DURATION_RE = /^((?<negative>-)|\\+)?P((?<years>\\d*)Y)?((?<months>\\d*)M)?((?<weeks>\\d*)W)?((?<days>\\d*)D)?((?<time>T)((?<hours>\\d*[.,]?\\d{1,9})H)?((?<minutes>\\d*[.,]?\\d{1,9})M)?((?<seconds>\\d*[.,]?\\d{1,9})S)?)?$/;\nconst $58246871e4652552$var$requiredDurationTimeGroups = [\n 'hours',\n 'minutes',\n 'seconds'\n];\nconst $58246871e4652552$var$requiredDurationGroups = [\n 'years',\n 'months',\n 'weeks',\n 'days',\n ...$58246871e4652552$var$requiredDurationTimeGroups\n];\nfunction $58246871e4652552$export$c9698ec7f05a07e1(value) {\n let m = value.match($58246871e4652552$var$TIME_RE);\n if (!m) throw new Error('Invalid ISO 8601 time string: ' + value);\n return new (0, $2aaf608024c21ca1$export$680ea196effce5f)($58246871e4652552$var$parseNumber(m[1], 0, 23), m[2] ? $58246871e4652552$var$parseNumber(m[2], 0, 59) : 0, m[3] ? $58246871e4652552$var$parseNumber(m[3], 0, 59) : 0, m[4] ? $58246871e4652552$var$parseNumber(m[4], 0, Infinity) * 1000 : 0);\n}\nfunction $58246871e4652552$export$6b862160d295c8e(value) {\n let m = value.match($58246871e4652552$var$DATE_RE);\n if (!m) {\n if ($58246871e4652552$var$ABSOLUTE_RE.test(value)) throw new Error(`Invalid ISO 8601 date string: ${value}. Use parseAbsolute() instead.`);\n throw new Error('Invalid ISO 8601 date string: ' + value);\n }\n let date = new (0, $2aaf608024c21ca1$export$99faa760c7908e4f)($58246871e4652552$var$parseNumber(m[1], 0, 9999), $58246871e4652552$var$parseNumber(m[2], 1, 12), 1);\n date.day = $58246871e4652552$var$parseNumber(m[3], 1, date.calendar.getDaysInMonth(date));\n return date;\n}\nfunction $58246871e4652552$export$588937bcd60ade55(value) {\n let m = value.match($58246871e4652552$var$DATE_TIME_RE);\n if (!m) {\n if ($58246871e4652552$var$ABSOLUTE_RE.test(value)) throw new Error(`Invalid ISO 8601 date time string: ${value}. Use parseAbsolute() instead.`);\n throw new Error('Invalid ISO 8601 date time string: ' + value);\n }\n let year = $58246871e4652552$var$parseNumber(m[1], -9999, 9999);\n let era = year < 1 ? 'BC' : 'AD';\n let date = new (0, $2aaf608024c21ca1$export$ca871e8dbb80966f)(era, year < 1 ? -year + 1 : year, $58246871e4652552$var$parseNumber(m[2], 1, 12), 1, m[4] ? $58246871e4652552$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $58246871e4652552$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $58246871e4652552$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $58246871e4652552$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);\n date.day = $58246871e4652552$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));\n return date;\n}\nfunction $58246871e4652552$export$fd7893f06e92a6a4(value, disambiguation) {\n let m = value.match($58246871e4652552$var$ZONED_DATE_TIME_RE);\n if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value);\n let year = $58246871e4652552$var$parseNumber(m[1], -9999, 9999);\n let era = year < 1 ? 'BC' : 'AD';\n let date = new (0, $2aaf608024c21ca1$export$d3b7288e7994edea)(era, year < 1 ? -year + 1 : year, $58246871e4652552$var$parseNumber(m[2], 1, 12), 1, m[11], 0, m[4] ? $58246871e4652552$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $58246871e4652552$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $58246871e4652552$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $58246871e4652552$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);\n date.day = $58246871e4652552$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));\n let plainDateTime = (0, $d07e34cce18680fd$export$b21e0b124e224484)(date);\n let ms;\n if (m[8]) {\n let hourOffset = $58246871e4652552$var$parseNumber(m[8], -23, 23);\n date.offset = Math.sign(hourOffset) * (Math.abs(hourOffset) * 3600000 + $58246871e4652552$var$parseNumber(m[9] ?? '0', 0, 59) * 60000 + $58246871e4652552$var$parseNumber(m[10] ?? '0', 0, 59) * 1000);\n ms = (0, $d07e34cce18680fd$export$bd4fb2bc8bb06fb)(date) - date.offset;\n // Validate offset against parsed date.\n let absolutes = (0, $d07e34cce18680fd$export$136f38efe7caf549)(plainDateTime, date.timeZone);\n if (!absolutes.includes(ms)) throw new Error(`Offset ${$58246871e4652552$var$offsetToString(date.offset)} is invalid for ${$58246871e4652552$export$4223de14708adc63(date)} in ${date.timeZone}`);\n } else // Convert to absolute and back to fix invalid times due to DST.\n ms = (0, $d07e34cce18680fd$export$5107c82f94518f5c)((0, $d07e34cce18680fd$export$b21e0b124e224484)(plainDateTime), date.timeZone, disambiguation);\n return (0, $d07e34cce18680fd$export$1b96692a1ba042ac)(ms, date.timeZone);\n}\nfunction $58246871e4652552$export$5adfdab05168c219(value, timeZone) {\n let m = value.match($58246871e4652552$var$ABSOLUTE_RE);\n if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value);\n let year = $58246871e4652552$var$parseNumber(m[1], -9999, 9999);\n let era = year < 1 ? 'BC' : 'AD';\n let date = new (0, $2aaf608024c21ca1$export$d3b7288e7994edea)(era, year < 1 ? -year + 1 : year, $58246871e4652552$var$parseNumber(m[2], 1, 12), 1, timeZone, 0, m[4] ? $58246871e4652552$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $58246871e4652552$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $58246871e4652552$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $58246871e4652552$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);\n date.day = $58246871e4652552$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));\n if (m[8]) date.offset = $58246871e4652552$var$parseNumber(m[8], -23, 23) * 3600000 + $58246871e4652552$var$parseNumber(m[9] ?? '0', 0, 59) * 60000;\n return (0, $d07e34cce18680fd$export$538b00033cc11c75)(date, timeZone);\n}\nfunction $58246871e4652552$export$8e384432362ed0f0(value) {\n return $58246871e4652552$export$5adfdab05168c219(value, (0, $ad063034c8620db8$export$aa8b41735afcabd2)());\n}\nfunction $58246871e4652552$var$parseNumber(value, min, max) {\n let val = Number(value);\n if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);\n return val;\n}\nfunction $58246871e4652552$export$f59dee82248f5ad4(time) {\n return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;\n}\nfunction $58246871e4652552$export$60dfd74aa96791bd(date) {\n let gregorianDate = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(date, new (0, $93635573935797de$export$80ee6245ec4f29ec)());\n let year;\n if (gregorianDate.era === 'BC') year = gregorianDate.year === 1 ? '0000' : '-' + String(Math.abs(1 - gregorianDate.year)).padStart(6, '00');\n else year = String(gregorianDate.year).padStart(4, '0');\n return `${year}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`;\n}\nfunction $58246871e4652552$export$4223de14708adc63(date) {\n // @ts-ignore\n return `${$58246871e4652552$export$60dfd74aa96791bd(date)}T${$58246871e4652552$export$f59dee82248f5ad4(date)}`;\n}\nfunction $58246871e4652552$var$offsetToString(offset) {\n let sign = Math.sign(offset) < 0 ? '-' : '+';\n offset = Math.abs(offset);\n let offsetHours = Math.floor(offset / 3600000);\n let offsetMinutes = Math.floor(offset % 3600000 / 60000);\n let offsetSeconds = Math.floor(offset % 3600000 % 60000 / 1000);\n let stringOffset = `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMinutes).padStart(2, '0')}`;\n if (offsetSeconds !== 0) stringOffset += `:${String(offsetSeconds).padStart(2, '0')}`;\n return stringOffset;\n}\nfunction $58246871e4652552$export$bf79f1ebf4b18792(date) {\n return `${$58246871e4652552$export$4223de14708adc63(date)}${$58246871e4652552$var$offsetToString(date.offset)}[${date.timeZone}]`;\n}\nfunction $58246871e4652552$export$ecae829bb3747ea6(value) {\n const match = value.match($58246871e4652552$var$DATE_TIME_DURATION_RE);\n if (!match) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n const parseDurationGroup = (group, isNegative)=>{\n if (!group) return 0;\n try {\n const sign = isNegative ? -1 : 1;\n return sign * Number(group.replace(',', '.'));\n } catch {\n throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n }\n };\n const isNegative = !!match.groups?.negative;\n const hasRequiredGroups = $58246871e4652552$var$requiredDurationGroups.some((group)=>match.groups?.[group]);\n if (!hasRequiredGroups) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n const durationStringIncludesTime = match.groups?.time;\n if (durationStringIncludesTime) {\n const hasRequiredDurationTimeGroups = $58246871e4652552$var$requiredDurationTimeGroups.some((group)=>match.groups?.[group]);\n if (!hasRequiredDurationTimeGroups) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n }\n const duration = {\n years: parseDurationGroup(match.groups?.years, isNegative),\n months: parseDurationGroup(match.groups?.months, isNegative),\n weeks: parseDurationGroup(match.groups?.weeks, isNegative),\n days: parseDurationGroup(match.groups?.days, isNegative),\n hours: parseDurationGroup(match.groups?.hours, isNegative),\n minutes: parseDurationGroup(match.groups?.minutes, isNegative),\n seconds: parseDurationGroup(match.groups?.seconds, isNegative)\n };\n if (duration.hours !== undefined && duration.hours % 1 !== 0 && (duration.minutes || duration.seconds)) throw new Error(`Invalid ISO 8601 Duration string: ${value} - only the smallest unit can be fractional`);\n if (duration.minutes !== undefined && duration.minutes % 1 !== 0 && duration.seconds) throw new Error(`Invalid ISO 8601 Duration string: ${value} - only the smallest unit can be fractional`);\n return duration;\n}\n\n\nexport {$58246871e4652552$export$c9698ec7f05a07e1 as parseTime, $58246871e4652552$export$6b862160d295c8e as parseDate, $58246871e4652552$export$588937bcd60ade55 as parseDateTime, $58246871e4652552$export$fd7893f06e92a6a4 as parseZonedDateTime, $58246871e4652552$export$4223de14708adc63 as dateTimeToString, $58246871e4652552$export$5adfdab05168c219 as parseAbsolute, $58246871e4652552$export$8e384432362ed0f0 as parseAbsoluteToLocal, $58246871e4652552$export$f59dee82248f5ad4 as timeToString, $58246871e4652552$export$60dfd74aa96791bd as dateToString, $58246871e4652552$export$bf79f1ebf4b18792 as zonedDateTimeToString, $58246871e4652552$export$ecae829bb3747ea6 as parseDuration};\n//# sourceMappingURL=string.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;;;AAmBA,IAAM,gCAAgC;AACtC,IAAM,gCAAgC;AACtC,IAAM,qCAAqC;AAE3C,IAAM,oCAAoC;AAc1C,SAAS,0CAA0C,OAAO;CACtD,IAAI,IAAI,MAAM,MAAM,6BAA6B;CACjD,IAAI,CAAC,GAAG,MAAM,IAAI,MAAM,mCAAmC,KAAK;CAChE,OAAO,IAAQ,yCAA0C,kCAAkC,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,QAAQ,IAAI,MAAO,CAAC;AACzS;AACA,SAAS,yCAAyC,OAAO;CACrD,IAAI,IAAI,MAAM,MAAM,6BAA6B;CACjD,IAAI,CAAC,GAAG;EACJ,IAAI,kCAAkC,KAAK,KAAK,GAAG,MAAM,IAAI,MAAM,iCAAiC,MAAM,+BAA+B;EACzI,MAAM,IAAI,MAAM,mCAAmC,KAAK;CAC5D;CACA,IAAI,OAAO,IAAQ,0CAA2C,kCAAkC,EAAE,IAAI,GAAG,IAAI,GAAG,kCAAkC,EAAE,IAAI,GAAG,EAAE,GAAG,CAAC;CACjK,KAAK,MAAM,kCAAkC,EAAE,IAAI,GAAG,KAAK,SAAS,eAAe,IAAI,CAAC;CACxF,OAAO;AACX;AACA,SAAS,0CAA0C,OAAO;CACtD,IAAI,IAAI,MAAM,MAAM,kCAAkC;CACtD,IAAI,CAAC,GAAG;EACJ,IAAI,kCAAkC,KAAK,KAAK,GAAG,MAAM,IAAI,MAAM,sCAAsC,MAAM,+BAA+B;EAC9I,MAAM,IAAI,MAAM,wCAAwC,KAAK;CACjE;CACA,IAAI,OAAO,kCAAkC,EAAE,IAAI,OAAO,IAAI;CAE9D,IAAI,OAAO,IAAQ,0CADT,OAAO,IAAI,OAAO,MACuC,OAAO,IAAI,CAAC,OAAO,IAAI,MAAM,kCAAkC,EAAE,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,QAAQ,IAAI,MAAO,CAAC;CAC1Y,KAAK,MAAM,kCAAkC,EAAE,IAAI,GAAG,KAAK,SAAS,eAAe,IAAI,CAAC;CACxF,OAAO;AACX;AAkCA,SAAS,kCAAkC,OAAO,KAAK,KAAK;CACxD,IAAI,MAAM,OAAO,KAAK;CACtB,IAAI,MAAM,OAAO,MAAM,KAAK,MAAM,IAAI,WAAW,uBAAuB,IAAI,MAAM,IAAI,MAAM,KAAK;CACjG,OAAO;AACX;AACA,SAAS,0CAA0C,MAAM;CACrD,OAAO,GAAG,OAAO,KAAK,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,KAAK,MAAM,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,KAAK,MAAM,CAAC,CAAC,SAAS,GAAG,GAAG,IAAI,KAAK,cAAc,OAAO,KAAK,cAAc,GAAI,CAAC,CAAC,MAAM,CAAC,IAAI;AACjM;AACA,SAAS,0CAA0C,MAAM;CACrD,IAAI,gBAAoB,0CAA2C,MAAM,IAAQ,0CAA2C,CAAC;CAC7H,IAAI;CACJ,IAAI,cAAc,QAAQ,MAAM,OAAO,cAAc,SAAS,IAAI,SAAS,MAAM,OAAO,KAAK,IAAI,IAAI,cAAc,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI;MACrI,OAAO,OAAO,cAAc,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;CACtD,OAAO,GAAG,KAAK,GAAG,OAAO,cAAc,KAAK,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,cAAc,GAAG,CAAC,CAAC,SAAS,GAAG,GAAG;AAC/G;AACA,SAAS,0CAA0C,MAAM;CAErD,OAAO,GAAG,0CAA0C,IAAI,EAAE,GAAG,0CAA0C,IAAI;AAC/G;AACA,SAAS,qCAAqC,QAAQ;CAClD,IAAI,OAAO,KAAK,KAAK,MAAM,IAAI,IAAI,MAAM;CACzC,SAAS,KAAK,IAAI,MAAM;CACxB,IAAI,cAAc,KAAK,MAAM,SAAS,IAAO;CAC7C,IAAI,gBAAgB,KAAK,MAAM,SAAS,OAAU,GAAK;CACvD,IAAI,gBAAgB,KAAK,MAAM,SAAS,OAAU,MAAQ,GAAI;CAC9D,IAAI,eAAe,GAAG,OAAO,OAAO,WAAW,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,aAAa,CAAC,CAAC,SAAS,GAAG,GAAG;CAC1G,IAAI,kBAAkB,GAAG,gBAAgB,IAAI,OAAO,aAAa,CAAC,CAAC,SAAS,GAAG,GAAG;CAClF,OAAO;AACX;AACA,SAAS,0CAA0C,MAAM;CACrD,OAAO,GAAG,0CAA0C,IAAI,IAAI,qCAAqC,KAAK,MAAM,EAAE,GAAG,KAAK,SAAS;AACnI"}
|
|
1
|
+
{"version":3,"file":"string.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/@internationalized+date@3.12.4/node_modules/@internationalized/date/dist/private/string.mjs"],"sourcesContent":["import {CalendarDate as $2aaf608024c21ca1$export$99faa760c7908e4f, CalendarDateTime as $2aaf608024c21ca1$export$ca871e8dbb80966f, Time as $2aaf608024c21ca1$export$680ea196effce5f, ZonedDateTime as $2aaf608024c21ca1$export$d3b7288e7994edea} from \"./CalendarDate.mjs\";\nimport {epochFromDate as $d07e34cce18680fd$export$bd4fb2bc8bb06fb, fromAbsolute as $d07e34cce18680fd$export$1b96692a1ba042ac, possibleAbsolutes as $d07e34cce18680fd$export$136f38efe7caf549, toAbsolute as $d07e34cce18680fd$export$5107c82f94518f5c, toCalendar as $d07e34cce18680fd$export$b4a036af3fc0b032, toCalendarDateTime as $d07e34cce18680fd$export$b21e0b124e224484, toTimeZone as $d07e34cce18680fd$export$538b00033cc11c75} from \"./conversion.mjs\";\nimport {getLocalTimeZone as $ad063034c8620db8$export$aa8b41735afcabd2} from \"./queries.mjs\";\nimport {GregorianCalendar as $93635573935797de$export$80ee6245ec4f29ec} from \"./calendars/GregorianCalendar.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nconst $58246871e4652552$var$TIME_RE = /^(\\d{2})(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?$/;\nconst $58246871e4652552$var$DATE_RE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})$/;\nconst $58246871e4652552$var$DATE_TIME_RE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?$/;\nconst $58246871e4652552$var$ZONED_DATE_TIME_RE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?(?:([+-]\\d{2})(?::?(\\d{2}))?(?::?(\\d{2}))?)?\\[(.*?)\\]$/;\nconst $58246871e4652552$var$ABSOLUTE_RE = /^([+-]\\d{6}|\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?(?:(?:([+-]\\d{2})(?::?(\\d{2}))?)|Z)$/;\nconst $58246871e4652552$var$DATE_TIME_DURATION_RE = /^((?<negative>-)|\\+)?P((?<years>\\d*)Y)?((?<months>\\d*)M)?((?<weeks>\\d*)W)?((?<days>\\d*)D)?((?<time>T)((?<hours>\\d*[.,]?\\d{1,9})H)?((?<minutes>\\d*[.,]?\\d{1,9})M)?((?<seconds>\\d*[.,]?\\d{1,9})S)?)?$/;\nconst $58246871e4652552$var$requiredDurationTimeGroups = [\n 'hours',\n 'minutes',\n 'seconds'\n];\nconst $58246871e4652552$var$requiredDurationGroups = [\n 'years',\n 'months',\n 'weeks',\n 'days',\n ...$58246871e4652552$var$requiredDurationTimeGroups\n];\nfunction $58246871e4652552$export$c9698ec7f05a07e1(value) {\n let m = value.match($58246871e4652552$var$TIME_RE);\n if (!m) throw new Error('Invalid ISO 8601 time string: ' + value);\n return new (0, $2aaf608024c21ca1$export$680ea196effce5f)($58246871e4652552$var$parseNumber(m[1], 0, 23), m[2] ? $58246871e4652552$var$parseNumber(m[2], 0, 59) : 0, m[3] ? $58246871e4652552$var$parseNumber(m[3], 0, 59) : 0, m[4] ? $58246871e4652552$var$parseNumber(m[4], 0, Infinity) * 1000 : 0);\n}\nfunction $58246871e4652552$export$6b862160d295c8e(value) {\n let m = value.match($58246871e4652552$var$DATE_RE);\n if (!m) {\n if ($58246871e4652552$var$ABSOLUTE_RE.test(value)) throw new Error(`Invalid ISO 8601 date string: ${value}. Use parseAbsolute() instead.`);\n throw new Error('Invalid ISO 8601 date string: ' + value);\n }\n let date = new (0, $2aaf608024c21ca1$export$99faa760c7908e4f)($58246871e4652552$var$parseNumber(m[1], 0, 9999), $58246871e4652552$var$parseNumber(m[2], 1, 12), 1);\n date.day = $58246871e4652552$var$parseNumber(m[3], 1, date.calendar.getDaysInMonth(date));\n return date;\n}\nfunction $58246871e4652552$export$588937bcd60ade55(value) {\n let m = value.match($58246871e4652552$var$DATE_TIME_RE);\n if (!m) {\n if ($58246871e4652552$var$ABSOLUTE_RE.test(value)) throw new Error(`Invalid ISO 8601 date time string: ${value}. Use parseAbsolute() instead.`);\n throw new Error('Invalid ISO 8601 date time string: ' + value);\n }\n let year = $58246871e4652552$var$parseNumber(m[1], -9999, 9999);\n let era = year < 1 ? 'BC' : 'AD';\n let date = new (0, $2aaf608024c21ca1$export$ca871e8dbb80966f)(era, year < 1 ? -year + 1 : year, $58246871e4652552$var$parseNumber(m[2], 1, 12), 1, m[4] ? $58246871e4652552$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $58246871e4652552$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $58246871e4652552$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $58246871e4652552$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);\n date.day = $58246871e4652552$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));\n return date;\n}\nfunction $58246871e4652552$export$fd7893f06e92a6a4(value, disambiguation) {\n let m = value.match($58246871e4652552$var$ZONED_DATE_TIME_RE);\n if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value);\n let year = $58246871e4652552$var$parseNumber(m[1], -9999, 9999);\n let era = year < 1 ? 'BC' : 'AD';\n let date = new (0, $2aaf608024c21ca1$export$d3b7288e7994edea)(era, year < 1 ? -year + 1 : year, $58246871e4652552$var$parseNumber(m[2], 1, 12), 1, m[11], 0, m[4] ? $58246871e4652552$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $58246871e4652552$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $58246871e4652552$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $58246871e4652552$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);\n date.day = $58246871e4652552$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));\n let plainDateTime = (0, $d07e34cce18680fd$export$b21e0b124e224484)(date);\n let ms;\n if (m[8]) {\n let hourOffset = $58246871e4652552$var$parseNumber(m[8], -23, 23);\n date.offset = Math.sign(hourOffset) * (Math.abs(hourOffset) * 3600000 + $58246871e4652552$var$parseNumber(m[9] ?? '0', 0, 59) * 60000 + $58246871e4652552$var$parseNumber(m[10] ?? '0', 0, 59) * 1000);\n ms = (0, $d07e34cce18680fd$export$bd4fb2bc8bb06fb)(date) - date.offset;\n // Validate offset against parsed date.\n let absolutes = (0, $d07e34cce18680fd$export$136f38efe7caf549)(plainDateTime, date.timeZone);\n if (!absolutes.includes(ms)) throw new Error(`Offset ${$58246871e4652552$var$offsetToString(date.offset)} is invalid for ${$58246871e4652552$export$4223de14708adc63(date)} in ${date.timeZone}`);\n } else // Convert to absolute and back to fix invalid times due to DST.\n ms = (0, $d07e34cce18680fd$export$5107c82f94518f5c)((0, $d07e34cce18680fd$export$b21e0b124e224484)(plainDateTime), date.timeZone, disambiguation);\n return (0, $d07e34cce18680fd$export$1b96692a1ba042ac)(ms, date.timeZone);\n}\nfunction $58246871e4652552$export$5adfdab05168c219(value, timeZone) {\n let m = value.match($58246871e4652552$var$ABSOLUTE_RE);\n if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value);\n let year = $58246871e4652552$var$parseNumber(m[1], -9999, 9999);\n let era = year < 1 ? 'BC' : 'AD';\n let date = new (0, $2aaf608024c21ca1$export$d3b7288e7994edea)(era, year < 1 ? -year + 1 : year, $58246871e4652552$var$parseNumber(m[2], 1, 12), 1, timeZone, 0, m[4] ? $58246871e4652552$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $58246871e4652552$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $58246871e4652552$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $58246871e4652552$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);\n date.day = $58246871e4652552$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));\n if (m[8]) date.offset = $58246871e4652552$var$parseNumber(m[8], -23, 23) * 3600000 + $58246871e4652552$var$parseNumber(m[9] ?? '0', 0, 59) * 60000;\n return (0, $d07e34cce18680fd$export$538b00033cc11c75)(date, timeZone);\n}\nfunction $58246871e4652552$export$8e384432362ed0f0(value) {\n return $58246871e4652552$export$5adfdab05168c219(value, (0, $ad063034c8620db8$export$aa8b41735afcabd2)());\n}\nfunction $58246871e4652552$var$parseNumber(value, min, max) {\n let val = Number(value);\n if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);\n return val;\n}\nfunction $58246871e4652552$export$f59dee82248f5ad4(time) {\n return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;\n}\nfunction $58246871e4652552$export$60dfd74aa96791bd(date) {\n let gregorianDate = (0, $d07e34cce18680fd$export$b4a036af3fc0b032)(date, new (0, $93635573935797de$export$80ee6245ec4f29ec)());\n let year;\n if (gregorianDate.era === 'BC') year = gregorianDate.year === 1 ? '0000' : '-' + String(Math.abs(1 - gregorianDate.year)).padStart(6, '00');\n else year = String(gregorianDate.year).padStart(4, '0');\n return `${year}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`;\n}\nfunction $58246871e4652552$export$4223de14708adc63(date) {\n // @ts-ignore\n return `${$58246871e4652552$export$60dfd74aa96791bd(date)}T${$58246871e4652552$export$f59dee82248f5ad4(date)}`;\n}\nfunction $58246871e4652552$var$offsetToString(offset) {\n let sign = Math.sign(offset) < 0 ? '-' : '+';\n offset = Math.abs(offset);\n let offsetHours = Math.floor(offset / 3600000);\n let offsetMinutes = Math.floor(offset % 3600000 / 60000);\n let offsetSeconds = Math.floor(offset % 3600000 % 60000 / 1000);\n let stringOffset = `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMinutes).padStart(2, '0')}`;\n if (offsetSeconds !== 0) stringOffset += `:${String(offsetSeconds).padStart(2, '0')}`;\n return stringOffset;\n}\nfunction $58246871e4652552$export$bf79f1ebf4b18792(date) {\n return `${$58246871e4652552$export$4223de14708adc63(date)}${$58246871e4652552$var$offsetToString(date.offset)}[${date.timeZone}]`;\n}\nfunction $58246871e4652552$export$ecae829bb3747ea6(value) {\n const match = value.match($58246871e4652552$var$DATE_TIME_DURATION_RE);\n if (!match) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n const parseDurationGroup = (group, isNegative)=>{\n if (!group) return 0;\n try {\n const sign = isNegative ? -1 : 1;\n return sign * Number(group.replace(',', '.'));\n } catch {\n throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n }\n };\n const isNegative = !!match.groups?.negative;\n const hasRequiredGroups = $58246871e4652552$var$requiredDurationGroups.some((group)=>match.groups?.[group]);\n if (!hasRequiredGroups) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n const durationStringIncludesTime = match.groups?.time;\n if (durationStringIncludesTime) {\n const hasRequiredDurationTimeGroups = $58246871e4652552$var$requiredDurationTimeGroups.some((group)=>match.groups?.[group]);\n if (!hasRequiredDurationTimeGroups) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);\n }\n const duration = {\n years: parseDurationGroup(match.groups?.years, isNegative),\n months: parseDurationGroup(match.groups?.months, isNegative),\n weeks: parseDurationGroup(match.groups?.weeks, isNegative),\n days: parseDurationGroup(match.groups?.days, isNegative),\n hours: parseDurationGroup(match.groups?.hours, isNegative),\n minutes: parseDurationGroup(match.groups?.minutes, isNegative),\n seconds: parseDurationGroup(match.groups?.seconds, isNegative)\n };\n if (duration.hours !== undefined && duration.hours % 1 !== 0 && (duration.minutes || duration.seconds)) throw new Error(`Invalid ISO 8601 Duration string: ${value} - only the smallest unit can be fractional`);\n if (duration.minutes !== undefined && duration.minutes % 1 !== 0 && duration.seconds) throw new Error(`Invalid ISO 8601 Duration string: ${value} - only the smallest unit can be fractional`);\n return duration;\n}\n\n\nexport {$58246871e4652552$export$c9698ec7f05a07e1 as parseTime, $58246871e4652552$export$6b862160d295c8e as parseDate, $58246871e4652552$export$588937bcd60ade55 as parseDateTime, $58246871e4652552$export$fd7893f06e92a6a4 as parseZonedDateTime, $58246871e4652552$export$4223de14708adc63 as dateTimeToString, $58246871e4652552$export$5adfdab05168c219 as parseAbsolute, $58246871e4652552$export$8e384432362ed0f0 as parseAbsoluteToLocal, $58246871e4652552$export$f59dee82248f5ad4 as timeToString, $58246871e4652552$export$60dfd74aa96791bd as dateToString, $58246871e4652552$export$bf79f1ebf4b18792 as zonedDateTimeToString, $58246871e4652552$export$ecae829bb3747ea6 as parseDuration};\n//# sourceMappingURL=string.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";;;;AAmBA,IAAM,gCAAgC;AACtC,IAAM,gCAAgC;AACtC,IAAM,qCAAqC;AAE3C,IAAM,oCAAoC;AAc1C,SAAS,0CAA0C,OAAO;CACtD,IAAI,IAAI,MAAM,MAAM,6BAA6B;CACjD,IAAI,CAAC,GAAG,MAAM,IAAI,MAAM,mCAAmC,KAAK;CAChE,OAAO,IAAQ,yCAA0C,kCAAkC,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,QAAQ,IAAI,MAAO,CAAC;AACzS;AACA,SAAS,yCAAyC,OAAO;CACrD,IAAI,IAAI,MAAM,MAAM,6BAA6B;CACjD,IAAI,CAAC,GAAG;EACJ,IAAI,kCAAkC,KAAK,KAAK,GAAG,MAAM,IAAI,MAAM,iCAAiC,MAAM,+BAA+B;EACzI,MAAM,IAAI,MAAM,mCAAmC,KAAK;CAC5D;CACA,IAAI,OAAO,IAAQ,0CAA2C,kCAAkC,EAAE,IAAI,GAAG,IAAI,GAAG,kCAAkC,EAAE,IAAI,GAAG,EAAE,GAAG,CAAC;CACjK,KAAK,MAAM,kCAAkC,EAAE,IAAI,GAAG,KAAK,SAAS,eAAe,IAAI,CAAC;CACxF,OAAO;AACX;AACA,SAAS,0CAA0C,OAAO;CACtD,IAAI,IAAI,MAAM,MAAM,kCAAkC;CACtD,IAAI,CAAC,GAAG;EACJ,IAAI,kCAAkC,KAAK,KAAK,GAAG,MAAM,IAAI,MAAM,sCAAsC,MAAM,+BAA+B;EAC9I,MAAM,IAAI,MAAM,wCAAwC,KAAK;CACjE;CACA,IAAI,OAAO,kCAAkC,EAAE,IAAI,OAAO,IAAI;CAE9D,IAAI,OAAO,IAAQ,0CADT,OAAO,IAAI,OAAO,MACuC,OAAO,IAAI,CAAC,OAAO,IAAI,MAAM,kCAAkC,EAAE,IAAI,GAAG,EAAE,GAAG,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,EAAE,IAAI,GAAG,EAAE,KAAK,kCAAkC,EAAE,IAAI,GAAG,QAAQ,IAAI,MAAO,CAAC;CAC1Y,KAAK,MAAM,kCAAkC,EAAE,IAAI,GAAG,KAAK,SAAS,eAAe,IAAI,CAAC;CACxF,OAAO;AACX;AAkCA,SAAS,kCAAkC,OAAO,KAAK,KAAK;CACxD,IAAI,MAAM,OAAO,KAAK;CACtB,IAAI,MAAM,OAAO,MAAM,KAAK,MAAM,IAAI,WAAW,uBAAuB,IAAI,MAAM,IAAI,MAAM,KAAK;CACjG,OAAO;AACX;AACA,SAAS,0CAA0C,MAAM;CACrD,OAAO,GAAG,OAAO,KAAK,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,KAAK,MAAM,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,KAAK,MAAM,CAAC,CAAC,SAAS,GAAG,GAAG,IAAI,KAAK,cAAc,OAAO,KAAK,cAAc,GAAI,CAAC,CAAC,MAAM,CAAC,IAAI;AACjM;AACA,SAAS,0CAA0C,MAAM;CACrD,IAAI,gBAAoB,0CAA2C,MAAM,IAAQ,0CAA2C,CAAC;CAC7H,IAAI;CACJ,IAAI,cAAc,QAAQ,MAAM,OAAO,cAAc,SAAS,IAAI,SAAS,MAAM,OAAO,KAAK,IAAI,IAAI,cAAc,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI;MACrI,OAAO,OAAO,cAAc,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG;CACtD,OAAO,GAAG,KAAK,GAAG,OAAO,cAAc,KAAK,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,cAAc,GAAG,CAAC,CAAC,SAAS,GAAG,GAAG;AAC/G;AACA,SAAS,0CAA0C,MAAM;CAErD,OAAO,GAAG,0CAA0C,IAAI,EAAE,GAAG,0CAA0C,IAAI;AAC/G;AACA,SAAS,qCAAqC,QAAQ;CAClD,IAAI,OAAO,KAAK,KAAK,MAAM,IAAI,IAAI,MAAM;CACzC,SAAS,KAAK,IAAI,MAAM;CACxB,IAAI,cAAc,KAAK,MAAM,SAAS,IAAO;CAC7C,IAAI,gBAAgB,KAAK,MAAM,SAAS,OAAU,GAAK;CACvD,IAAI,gBAAgB,KAAK,MAAM,SAAS,OAAU,MAAQ,GAAI;CAC9D,IAAI,eAAe,GAAG,OAAO,OAAO,WAAW,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,aAAa,CAAC,CAAC,SAAS,GAAG,GAAG;CAC1G,IAAI,kBAAkB,GAAG,gBAAgB,IAAI,OAAO,aAAa,CAAC,CAAC,SAAS,GAAG,GAAG;CAClF,OAAO;AACX;AACA,SAAS,0CAA0C,MAAM;CACrD,OAAO,GAAG,0CAA0C,IAAI,IAAI,qCAAqC,KAAK,MAAM,EAAE,GAAG,KAAK,SAAS;AACnI"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/@internationalized+date@3.12.
|
|
1
|
+
//#region node_modules/.pnpm/@internationalized+date@3.12.4/node_modules/@internationalized/date/dist/private/utils.mjs
|
|
2
2
|
function $09ec6a572d60460f$export$842a2cf37af977e1(amount, numerator) {
|
|
3
3
|
return amount - numerator * Math.floor(amount / numerator);
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/@internationalized+date@3.12.
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/@internationalized+date@3.12.4/node_modules/@internationalized/date/dist/private/utils.mjs"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ function $09ec6a572d60460f$export$842a2cf37af977e1(amount, numerator) {\n return amount - numerator * Math.floor(amount / numerator);\n}\n\n\nexport {$09ec6a572d60460f$export$842a2cf37af977e1 as mod};\n//# sourceMappingURL=utils.mjs.map\n"],"x_google_ignoreList":[0],"mappings":";AAUI,SAAS,0CAA0C,QAAQ,WAAW;CACtE,OAAO,SAAS,YAAY,KAAK,MAAM,SAAS,SAAS;AAC7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.js","names":[],"sources":["../../../../../packages/blocks/empty-state/src/EmptyState.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * EmptyState — the shape of \"nothing here yet\": icon → title → optional\n * description → at most ONE call-to-action, centered in the empty region. An\n * empty region should explain itself and invite the next step — empty is a\n * welcome, never an error (a failed load renders `InlineError`; an empty\n * *result* renders this).\n *\n * The entrance is a staggered fade-rise film (icon, title, description,\n * action — 60ms apart): this is content appearing, not action feedback, so\n * it budgets like a panel rather than against the interaction-feedback\n * ceiling, all token-tier CSS. Purely presentational: the icon comes via the\n * `icon` slot (decorative, hidden from assistive tech), the CTA via the\n * `action` slot — the host owns behavior and wording, and no fallback copy\n * ships with the component.\n *\n * The icon sits in a hairline medallion — a `bg-subtle` disc with a `border`\n * ring — rather than floating bare. Two reasons: the glyph itself is sized\n * 20px, the emphasis step for an empty-state icon, and a 20px stroke drawing\n * alone in a large blank region has nothing to hold it, so it reads as a\n * stray mark; the medallion gives it a shape to anchor without adding a\n * shadow (a disc is a surface plus a hairline, never a float). `bg-subtle`\n * is chosen over `bg-card` so the disc stays visible on `bg-card` and\n * `bg-background` alike — this block is dropped into both.\n *\n * Type comes from the named scale (`text-title` / `text-small`), not\n * hand-picked `text-sm`/`text-xs` — the empty state is a titled moment, not\n * a caption.\n */\ndefineProps<{\n /** What is missing, stated plainly — always shown. */\n title: string;\n /** What to do about it. Omit rather than pad the region with filler copy. */\n description?: string;\n}>();\n</script>\n\n<template>\n <div class=\"flex flex-col items-center justify-center gap-1.5 px-6 py-10 text-center sm:py-14\">\n <div\n v-if=\"$slots.icon\"\n aria-hidden=\"true\"\n class=\"animate-fade-rise mb-3 grid h-12 w-12 place-items-center rounded-full border border-border bg-subtle text-muted-foreground [&_svg]:h-5 [&_svg]:w-5\"\n >\n <slot name=\"icon\" />\n </div>\n <p class=\"animate-fade-rise text-title text-foreground\"
|
|
1
|
+
{"version":3,"file":"EmptyState.js","names":[],"sources":["../../../../../packages/blocks/empty-state/src/EmptyState.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * EmptyState — the shape of \"nothing here yet\": icon → title → optional\n * description → at most ONE call-to-action, centered in the empty region. An\n * empty region should explain itself and invite the next step — empty is a\n * welcome, never an error (a failed load renders `InlineError`; an empty\n * *result* renders this).\n *\n * The entrance is a staggered fade-rise film (icon, title, description,\n * action — 60ms apart): this is content appearing, not action feedback, so\n * it budgets like a panel rather than against the interaction-feedback\n * ceiling, all token-tier CSS. Purely presentational: the icon comes via the\n * `icon` slot (decorative, hidden from assistive tech), the CTA via the\n * `action` slot — the host owns behavior and wording, and no fallback copy\n * ships with the component.\n *\n * The icon sits in a hairline medallion — a `bg-subtle` disc with a `border`\n * ring — rather than floating bare. Two reasons: the glyph itself is sized\n * 20px, the emphasis step for an empty-state icon, and a 20px stroke drawing\n * alone in a large blank region has nothing to hold it, so it reads as a\n * stray mark; the medallion gives it a shape to anchor without adding a\n * shadow (a disc is a surface plus a hairline, never a float). `bg-subtle`\n * is chosen over `bg-card` so the disc stays visible on `bg-card` and\n * `bg-background` alike — this block is dropped into both.\n *\n * Type comes from the named scale (`text-title` / `text-small`), not\n * hand-picked `text-sm`/`text-xs` — the empty state is a titled moment, not\n * a caption.\n */\ndefineProps<{\n /** What is missing, stated plainly — always shown. */\n title: string;\n /** What to do about it. Omit rather than pad the region with filler copy. */\n description?: string;\n}>();\n</script>\n\n<template>\n <div class=\"flex flex-col items-center justify-center gap-1.5 px-6 py-10 text-center sm:py-14\">\n <div\n v-if=\"$slots.icon\"\n aria-hidden=\"true\"\n class=\"animate-fade-rise mb-3 grid h-12 w-12 place-items-center rounded-full border border-border bg-subtle text-muted-foreground [&_svg]:h-5 [&_svg]:w-5\"\n >\n <slot name=\"icon\" />\n </div>\n <!-- One paragraph, not a short titled one before a longer one. The empty\n state is a single message, and a short, larger, bolder <p> sitting\n before a smaller one is exactly the fake-heading shape `p-as-heading`\n flags (WCAG 1.3.1; measured 2026-08-26 on this block's own demo).\n Block spans keep the stacked look and the stagger. -->\n <p>\n <span\n class=\"block animate-fade-rise text-title text-foreground\"\n :style=\"{ animationDelay: '60ms' }\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n class=\"mt-1.5 block animate-fade-rise max-w-sm text-balance text-small text-muted-foreground\"\n :style=\"{ animationDelay: '120ms' }\"\n >\n {{ description }}\n </span>\n </p>\n <div v-if=\"$slots.action\" class=\"animate-fade-rise mt-4\" :style=\"{ animationDelay: '180ms' }\">\n <slot name=\"action\" />\n </div>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.vue.d.ts","sourceRoot":"","sources":["../../../../../packages/blocks/empty-state/src/EmptyState.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmptyState.vue.d.ts","sourceRoot":"","sources":["../../../../../packages/blocks/empty-state/src/EmptyState.vue"],"names":[],"mappings":"AA0EA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,KAAK,WAAW,GAAG;IACjB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAqFF,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACzC;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK9C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
package/dist/packages/blocks/empty-state/src/EmptyState.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -7,16 +7,16 @@ var _hoisted_2 = {
|
|
|
7
7
|
class: "animate-fade-rise mb-3 grid h-12 w-12 place-items-center rounded-full border border-border bg-subtle text-muted-foreground [&_svg]:h-5 [&_svg]:w-5"
|
|
8
8
|
};
|
|
9
9
|
var _hoisted_3 = {
|
|
10
|
-
class: "animate-fade-rise text-title text-foreground",
|
|
10
|
+
class: "block animate-fade-rise text-title text-foreground",
|
|
11
11
|
style: { animationDelay: "60ms" }
|
|
12
12
|
};
|
|
13
13
|
var _hoisted_4 = {
|
|
14
|
-
key:
|
|
15
|
-
class: "animate-fade-rise max-w-sm text-balance text-small text-muted-foreground",
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "mt-1.5 block animate-fade-rise max-w-sm text-balance text-small text-muted-foreground",
|
|
16
16
|
style: { animationDelay: "120ms" }
|
|
17
17
|
};
|
|
18
18
|
var _hoisted_5 = {
|
|
19
|
-
key:
|
|
19
|
+
key: 1,
|
|
20
20
|
class: "animate-fade-rise mt-4",
|
|
21
21
|
style: { animationDelay: "180ms" }
|
|
22
22
|
};
|
|
@@ -58,8 +58,7 @@ var EmptyState_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
58
58
|
return (_ctx, _cache) => {
|
|
59
59
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
60
60
|
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("", true),
|
|
61
|
-
createElementVNode("p", _hoisted_3, toDisplayString(__props.title), 1),
|
|
62
|
-
__props.description ? (openBlock(), createElementBlock("p", _hoisted_4, toDisplayString(__props.description), 1)) : createCommentVNode("", true),
|
|
61
|
+
createElementVNode("p", null, [createElementVNode("span", _hoisted_3, toDisplayString(__props.title), 1), __props.description ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(__props.description), 1)) : createCommentVNode("", true)]),
|
|
63
62
|
_ctx.$slots.action ? (openBlock(), createElementBlock("div", _hoisted_5, [renderSlot(_ctx.$slots, "action")])) : createCommentVNode("", true)
|
|
64
63
|
]);
|
|
65
64
|
};
|
package/dist/packages/blocks/empty-state/src/EmptyState.vue_vue_type_script_setup_true_lang.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../packages/blocks/empty-state/src/EmptyState.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * EmptyState — the shape of \"nothing here yet\": icon → title → optional\n * description → at most ONE call-to-action, centered in the empty region. An\n * empty region should explain itself and invite the next step — empty is a\n * welcome, never an error (a failed load renders `InlineError`; an empty\n * *result* renders this).\n *\n * The entrance is a staggered fade-rise film (icon, title, description,\n * action — 60ms apart): this is content appearing, not action feedback, so\n * it budgets like a panel rather than against the interaction-feedback\n * ceiling, all token-tier CSS. Purely presentational: the icon comes via the\n * `icon` slot (decorative, hidden from assistive tech), the CTA via the\n * `action` slot — the host owns behavior and wording, and no fallback copy\n * ships with the component.\n *\n * The icon sits in a hairline medallion — a `bg-subtle` disc with a `border`\n * ring — rather than floating bare. Two reasons: the glyph itself is sized\n * 20px, the emphasis step for an empty-state icon, and a 20px stroke drawing\n * alone in a large blank region has nothing to hold it, so it reads as a\n * stray mark; the medallion gives it a shape to anchor without adding a\n * shadow (a disc is a surface plus a hairline, never a float). `bg-subtle`\n * is chosen over `bg-card` so the disc stays visible on `bg-card` and\n * `bg-background` alike — this block is dropped into both.\n *\n * Type comes from the named scale (`text-title` / `text-small`), not\n * hand-picked `text-sm`/`text-xs` — the empty state is a titled moment, not\n * a caption.\n */\ndefineProps<{\n /** What is missing, stated plainly — always shown. */\n title: string;\n /** What to do about it. Omit rather than pad the region with filler copy. */\n description?: string;\n}>();\n</script>\n\n<template>\n <div class=\"flex flex-col items-center justify-center gap-1.5 px-6 py-10 text-center sm:py-14\">\n <div\n v-if=\"$slots.icon\"\n aria-hidden=\"true\"\n class=\"animate-fade-rise mb-3 grid h-12 w-12 place-items-center rounded-full border border-border bg-subtle text-muted-foreground [&_svg]:h-5 [&_svg]:w-5\"\n >\n <slot name=\"icon\" />\n </div>\n <p class=\"animate-fade-rise text-title text-foreground\"
|
|
1
|
+
{"version":3,"file":"EmptyState.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../../../packages/blocks/empty-state/src/EmptyState.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * EmptyState — the shape of \"nothing here yet\": icon → title → optional\n * description → at most ONE call-to-action, centered in the empty region. An\n * empty region should explain itself and invite the next step — empty is a\n * welcome, never an error (a failed load renders `InlineError`; an empty\n * *result* renders this).\n *\n * The entrance is a staggered fade-rise film (icon, title, description,\n * action — 60ms apart): this is content appearing, not action feedback, so\n * it budgets like a panel rather than against the interaction-feedback\n * ceiling, all token-tier CSS. Purely presentational: the icon comes via the\n * `icon` slot (decorative, hidden from assistive tech), the CTA via the\n * `action` slot — the host owns behavior and wording, and no fallback copy\n * ships with the component.\n *\n * The icon sits in a hairline medallion — a `bg-subtle` disc with a `border`\n * ring — rather than floating bare. Two reasons: the glyph itself is sized\n * 20px, the emphasis step for an empty-state icon, and a 20px stroke drawing\n * alone in a large blank region has nothing to hold it, so it reads as a\n * stray mark; the medallion gives it a shape to anchor without adding a\n * shadow (a disc is a surface plus a hairline, never a float). `bg-subtle`\n * is chosen over `bg-card` so the disc stays visible on `bg-card` and\n * `bg-background` alike — this block is dropped into both.\n *\n * Type comes from the named scale (`text-title` / `text-small`), not\n * hand-picked `text-sm`/`text-xs` — the empty state is a titled moment, not\n * a caption.\n */\ndefineProps<{\n /** What is missing, stated plainly — always shown. */\n title: string;\n /** What to do about it. Omit rather than pad the region with filler copy. */\n description?: string;\n}>();\n</script>\n\n<template>\n <div class=\"flex flex-col items-center justify-center gap-1.5 px-6 py-10 text-center sm:py-14\">\n <div\n v-if=\"$slots.icon\"\n aria-hidden=\"true\"\n class=\"animate-fade-rise mb-3 grid h-12 w-12 place-items-center rounded-full border border-border bg-subtle text-muted-foreground [&_svg]:h-5 [&_svg]:w-5\"\n >\n <slot name=\"icon\" />\n </div>\n <!-- One paragraph, not a short titled one before a longer one. The empty\n state is a single message, and a short, larger, bolder <p> sitting\n before a smaller one is exactly the fake-heading shape `p-as-heading`\n flags (WCAG 1.3.1; measured 2026-08-26 on this block's own demo).\n Block spans keep the stacked look and the stagger. -->\n <p>\n <span\n class=\"block animate-fade-rise text-title text-foreground\"\n :style=\"{ animationDelay: '60ms' }\"\n >\n {{ title }}\n </span>\n <span\n v-if=\"description\"\n class=\"mt-1.5 block animate-fade-rise max-w-sm text-balance text-small text-muted-foreground\"\n :style=\"{ animationDelay: '120ms' }\"\n >\n {{ description }}\n </span>\n </p>\n <div v-if=\"$slots.action\" class=\"animate-fade-rise mt-4\" :style=\"{ animationDelay: '180ms' }\">\n <slot name=\"action\" />\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCE,OAAA,UAAA,GAAA,mBA+BM,OA/BN,YA+BM;IA7BIA,KAAAA,OAAO,QADf,UAAA,GAAA,mBAMM,OANN,YAMM,CADJ,WAAoB,KAAA,QAAA,MAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;IAOtB,mBAcI,KAAA,MAAA,CAbF,mBAKO,QALP,YAKO,gBADF,QAAA,KAAK,GAAA,CAAA,GAGF,QAAA,eADR,UAAA,GAAA,mBAMO,QANP,YAMO,gBADF,QAAA,WAAW,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA,CAAA,CAAA;IAGPA,KAAAA,OAAO,UAAlB,UAAA,GAAA,mBAEM,OAFN,YAEM,CADJ,WAAsB,KAAA,QAAA,QAAA,CAAA,CAAA,KAAA,mBAAA,IAAA,IAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import ErrorSummary_vue_vue_type_script_setup_true_lang_default, { ERROR_SUMMARY_LABELS } from "./ErrorSummary.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region packages/blocks/error-summary/src/ErrorSummary.vue
|
|
3
|
+
var ErrorSummary_default = ErrorSummary_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ERROR_SUMMARY_LABELS, ErrorSummary_default as default };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=ErrorSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorSummary.js","names":[],"sources":["../../../../../packages/blocks/error-summary/src/ErrorSummary.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { ErrorSummaryLabels, LabelOverrides } from \"@ecoma-io/loom-labels\";\n\n/** One invalid field the summary lists. */\nexport interface ErrorSummaryEntry {\n /** The id of the element the entry links to — the invalid field's control. Give it `tabindex=\"-1\"` (or be natively focusable) so focus can land. */\n id: string;\n /** The error text for that field. */\n message: string;\n /** The field's visible label, spoken ahead of the message in the link text. */\n fieldLabel?: string;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it.\n * `heading` takes the count rather than a finished sentence for the reason\n * `LabelOf` in `@ecoma-io/loom-labels` records: plurals are a language\n * decision, and Loom's English has no right to make it for anyone else.\n */\nexport const ERROR_SUMMARY_LABELS: ErrorSummaryLabels = {\n heading: ({ count }) =>\n `There is a problem (${String(count)} ${count === 1 ? \"error\" : \"errors\"})`,\n description: () => \"\",\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, ref, useId, watch } from \"vue\";\nimport { TriangleAlert } from \"@lucide/vue\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport { useLabels } from \"@ecoma-io/loom-labels\";\n\n/**\n * ErrorSummary — the GOV.UK error-summary pattern. On submit-failure, focus\n * moves to a summary listing every field error, each entry a link that moves\n * focus to the invalid field. The container takes `tabindex=\"-1\"` and is\n * focused programmatically whenever the errors first render or change while\n * the form stays invalid.\n *\n * The announcement happens once. `role=\"alert\"` exists only between the\n * summary's appearance and the focus this component immediately gives it —\n * a region that stayed alert would re-announce the whole list on every\n * later change, which is the failure the pattern exists to avoid. Where\n * InlineError annotates one field, this orients the reader across the whole\n * form.\n */\nconst props = defineProps<{\n /** Every invalid field, most important first. Give each `id` a focusable target. */\n errors: ErrorSummaryEntry[];\n /** Names for the summary's own copy — the heading takes the count, so a host owns its plural forms. */\n labels?: LabelOverrides<ErrorSummaryLabels> | undefined;\n}>();\n\nconst text = useLabels(\"errorSummary\", ERROR_SUMMARY_LABELS, () => props.labels);\n\nconst box = ref<HTMLElement | null>(null);\nconst headingId = useId();\nconst announcing = ref(false);\n// True while the form is known to be invalid: the announcement belongs to\n// the empty→invalid transition alone, not to any later change of detail.\nlet invalid = false;\n\nwatch(\n () => props.errors,\n async (errors) => {\n if (errors.length === 0) {\n invalid = false;\n return;\n }\n announcing.value = !invalid;\n invalid = true;\n await nextTick();\n box.value?.focus();\n },\n { deep: true, immediate: true },\n);\n\nfunction focusField(id: string): void {\n // The link's native jump is suppressed: focusing scrolls the field into\n // view, and a jump-to-anchor from a link moves no focus at all when the\n // target is a tabindex=\"-1\" field — which is the documented host contract.\n document.getElementById(id)?.focus();\n}\n</script>\n\n<template>\n <!-- Mounted only while invalid, like InlineError: `v-if`, never `v-show` —\n a summary that never leaves the DOM cannot announce its return. -->\n <div\n v-if=\"errors.length > 0\"\n ref=\"box\"\n tabindex=\"-1\"\n :role=\"announcing ? 'alert' : undefined\"\n :aria-labelledby=\"headingId\"\n :class=\"\n cn(\n 'rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-destructive-text',\n 'animate-fade-rise',\n 'focus:outline-2 focus:outline-offset-2 focus:outline-destructive',\n )\n \"\n @focus=\"announcing = false\"\n >\n <div class=\"flex items-start gap-2\">\n <TriangleAlert class=\"mt-0.5 h-4 w-4 shrink-0\" aria-hidden=\"true\" />\n <div class=\"min-w-0\">\n <h2 :id=\"headingId\" class=\"text-sm font-semibold\">\n {{ text.heading({ count: errors.length }) }}\n </h2>\n <p v-if=\"text.description({ count: errors.length }) !== ''\" class=\"mt-1 text-sm\">\n {{ text.description({ count: errors.length }) }}\n </p>\n <ul class=\"mt-2 list-disc space-y-1 pl-5\">\n <li v-for=\"error in errors\" :key=\"error.id\">\n <a\n :href=\"`#${error.id}`\"\n class=\"font-medium underline underline-offset-2\"\n @click.prevent=\"focusField(error.id)\"\n >{{ error.fieldLabel ? `${error.fieldLabel}: ${error.message}` : error.message }}</a\n >\n </li>\n </ul>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ErrorSummaryLabels, LabelOverrides } from "../../../labels/src/index";
|
|
2
|
+
/** One invalid field the summary lists. */
|
|
3
|
+
export interface ErrorSummaryEntry {
|
|
4
|
+
/** The id of the element the entry links to — the invalid field's control. Give it `tabindex="-1"` (or be natively focusable) so focus can land. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** The error text for that field. */
|
|
7
|
+
message: string;
|
|
8
|
+
/** The field's visible label, spoken ahead of the message in the link text. */
|
|
9
|
+
fieldLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Loom's English, co-located with the component so it tree-shakes with it.
|
|
13
|
+
* `heading` takes the count rather than a finished sentence for the reason
|
|
14
|
+
* `LabelOf` in `@ecoma-io/loom-labels` records: plurals are a language
|
|
15
|
+
* decision, and Loom's English has no right to make it for anyone else.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ERROR_SUMMARY_LABELS: ErrorSummaryLabels;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
declare const __VLS_export: import("vue").DefineComponent<{
|
|
21
|
+
/** Every invalid field, most important first. Give each `id` a focusable target. */
|
|
22
|
+
errors: ErrorSummaryEntry[];
|
|
23
|
+
/** Names for the summary's own copy — the heading takes the count, so a host owns its plural forms. */
|
|
24
|
+
labels?: LabelOverrides<ErrorSummaryLabels> | undefined;
|
|
25
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
26
|
+
/** Every invalid field, most important first. Give each `id` a focusable target. */
|
|
27
|
+
errors: ErrorSummaryEntry[];
|
|
28
|
+
/** Names for the summary's own copy — the heading takes the count, so a host owns its plural forms. */
|
|
29
|
+
labels?: LabelOverrides<ErrorSummaryLabels> | undefined;
|
|
30
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
//# sourceMappingURL=ErrorSummary.vue.d.ts.map
|
package/dist/packages/blocks/error-summary/src/ErrorSummary.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { cn } from "../../../core/src/cn.js";
|
|
2
|
+
import "../../../core/src/index.js";
|
|
3
|
+
import { useLabels } from "../../../labels/src/labels.js";
|
|
4
|
+
import "../../../labels/src/index.js";
|
|
5
|
+
import { Fragment, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, nextTick, normalizeClass, openBlock, ref, renderList, toDisplayString, unref, useId, watch, withModifiers } from "vue";
|
|
6
|
+
import { TriangleAlert } from "@lucide/vue";
|
|
7
|
+
//#region packages/blocks/error-summary/src/ErrorSummary.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var _hoisted_1 = ["role", "aria-labelledby"];
|
|
9
|
+
var _hoisted_2 = { class: "flex items-start gap-2" };
|
|
10
|
+
var _hoisted_3 = { class: "min-w-0" };
|
|
11
|
+
var _hoisted_4 = ["id"];
|
|
12
|
+
var _hoisted_5 = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "mt-1 text-sm"
|
|
15
|
+
};
|
|
16
|
+
var _hoisted_6 = { class: "mt-2 list-disc space-y-1 pl-5" };
|
|
17
|
+
var _hoisted_7 = ["href", "onClick"];
|
|
18
|
+
/**
|
|
19
|
+
* Loom's English, co-located with the component so it tree-shakes with it.
|
|
20
|
+
* `heading` takes the count rather than a finished sentence for the reason
|
|
21
|
+
* `LabelOf` in `@ecoma-io/loom-labels` records: plurals are a language
|
|
22
|
+
* decision, and Loom's English has no right to make it for anyone else.
|
|
23
|
+
*/
|
|
24
|
+
var ERROR_SUMMARY_LABELS = {
|
|
25
|
+
heading: ({ count }) => `There is a problem (${String(count)} ${count === 1 ? "error" : "errors"})`,
|
|
26
|
+
description: () => ""
|
|
27
|
+
};
|
|
28
|
+
var ErrorSummary_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
29
|
+
__name: "ErrorSummary",
|
|
30
|
+
props: {
|
|
31
|
+
errors: {},
|
|
32
|
+
labels: {}
|
|
33
|
+
},
|
|
34
|
+
setup(__props) {
|
|
35
|
+
const props = __props;
|
|
36
|
+
const text = useLabels("errorSummary", ERROR_SUMMARY_LABELS, () => props.labels);
|
|
37
|
+
const box = ref(null);
|
|
38
|
+
const headingId = useId();
|
|
39
|
+
const announcing = ref(false);
|
|
40
|
+
let invalid = false;
|
|
41
|
+
watch(() => props.errors, async (errors) => {
|
|
42
|
+
if (errors.length === 0) {
|
|
43
|
+
invalid = false;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
announcing.value = !invalid;
|
|
47
|
+
invalid = true;
|
|
48
|
+
await nextTick();
|
|
49
|
+
box.value?.focus();
|
|
50
|
+
}, {
|
|
51
|
+
deep: true,
|
|
52
|
+
immediate: true
|
|
53
|
+
});
|
|
54
|
+
function focusField(id) {
|
|
55
|
+
document.getElementById(id)?.focus();
|
|
56
|
+
}
|
|
57
|
+
return (_ctx, _cache) => {
|
|
58
|
+
return __props.errors.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
59
|
+
key: 0,
|
|
60
|
+
ref_key: "box",
|
|
61
|
+
ref: box,
|
|
62
|
+
tabindex: "-1",
|
|
63
|
+
role: announcing.value ? "alert" : void 0,
|
|
64
|
+
"aria-labelledby": unref(headingId),
|
|
65
|
+
class: normalizeClass(unref(cn)("rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-destructive-text", "animate-fade-rise", "focus:outline-2 focus:outline-offset-2 focus:outline-destructive")),
|
|
66
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => announcing.value = false)
|
|
67
|
+
}, [createElementVNode("div", _hoisted_2, [createVNode(unref(TriangleAlert), {
|
|
68
|
+
class: "mt-0.5 h-4 w-4 shrink-0",
|
|
69
|
+
"aria-hidden": "true"
|
|
70
|
+
}), createElementVNode("div", _hoisted_3, [
|
|
71
|
+
createElementVNode("h2", {
|
|
72
|
+
id: unref(headingId),
|
|
73
|
+
class: "text-sm font-semibold"
|
|
74
|
+
}, toDisplayString(unref(text).heading({ count: __props.errors.length })), 9, _hoisted_4),
|
|
75
|
+
unref(text).description({ count: __props.errors.length }) !== "" ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(unref(text).description({ count: __props.errors.length })), 1)) : createCommentVNode("", true),
|
|
76
|
+
createElementVNode("ul", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.errors, (error) => {
|
|
77
|
+
return openBlock(), createElementBlock("li", { key: error.id }, [createElementVNode("a", {
|
|
78
|
+
href: `#${error.id}`,
|
|
79
|
+
class: "font-medium underline underline-offset-2",
|
|
80
|
+
onClick: withModifiers(($event) => focusField(error.id), ["prevent"])
|
|
81
|
+
}, toDisplayString(error.fieldLabel ? `${error.fieldLabel}: ${error.message}` : error.message), 9, _hoisted_7)]);
|
|
82
|
+
}), 128))])
|
|
83
|
+
])])], 42, _hoisted_1)) : createCommentVNode("", true);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//#endregion
|
|
88
|
+
export { ERROR_SUMMARY_LABELS, ErrorSummary_vue_vue_type_script_setup_true_lang_default as default };
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=ErrorSummary.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorSummary.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../packages/blocks/error-summary/src/ErrorSummary.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { ErrorSummaryLabels, LabelOverrides } from \"@ecoma-io/loom-labels\";\n\n/** One invalid field the summary lists. */\nexport interface ErrorSummaryEntry {\n /** The id of the element the entry links to — the invalid field's control. Give it `tabindex=\"-1\"` (or be natively focusable) so focus can land. */\n id: string;\n /** The error text for that field. */\n message: string;\n /** The field's visible label, spoken ahead of the message in the link text. */\n fieldLabel?: string;\n}\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it.\n * `heading` takes the count rather than a finished sentence for the reason\n * `LabelOf` in `@ecoma-io/loom-labels` records: plurals are a language\n * decision, and Loom's English has no right to make it for anyone else.\n */\nexport const ERROR_SUMMARY_LABELS: ErrorSummaryLabels = {\n heading: ({ count }) =>\n `There is a problem (${String(count)} ${count === 1 ? \"error\" : \"errors\"})`,\n description: () => \"\",\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { nextTick, ref, useId, watch } from \"vue\";\nimport { TriangleAlert } from \"@lucide/vue\";\nimport { cn } from \"@ecoma-io/loom-core\";\nimport { useLabels } from \"@ecoma-io/loom-labels\";\n\n/**\n * ErrorSummary — the GOV.UK error-summary pattern. On submit-failure, focus\n * moves to a summary listing every field error, each entry a link that moves\n * focus to the invalid field. The container takes `tabindex=\"-1\"` and is\n * focused programmatically whenever the errors first render or change while\n * the form stays invalid.\n *\n * The announcement happens once. `role=\"alert\"` exists only between the\n * summary's appearance and the focus this component immediately gives it —\n * a region that stayed alert would re-announce the whole list on every\n * later change, which is the failure the pattern exists to avoid. Where\n * InlineError annotates one field, this orients the reader across the whole\n * form.\n */\nconst props = defineProps<{\n /** Every invalid field, most important first. Give each `id` a focusable target. */\n errors: ErrorSummaryEntry[];\n /** Names for the summary's own copy — the heading takes the count, so a host owns its plural forms. */\n labels?: LabelOverrides<ErrorSummaryLabels> | undefined;\n}>();\n\nconst text = useLabels(\"errorSummary\", ERROR_SUMMARY_LABELS, () => props.labels);\n\nconst box = ref<HTMLElement | null>(null);\nconst headingId = useId();\nconst announcing = ref(false);\n// True while the form is known to be invalid: the announcement belongs to\n// the empty→invalid transition alone, not to any later change of detail.\nlet invalid = false;\n\nwatch(\n () => props.errors,\n async (errors) => {\n if (errors.length === 0) {\n invalid = false;\n return;\n }\n announcing.value = !invalid;\n invalid = true;\n await nextTick();\n box.value?.focus();\n },\n { deep: true, immediate: true },\n);\n\nfunction focusField(id: string): void {\n // The link's native jump is suppressed: focusing scrolls the field into\n // view, and a jump-to-anchor from a link moves no focus at all when the\n // target is a tabindex=\"-1\" field — which is the documented host contract.\n document.getElementById(id)?.focus();\n}\n</script>\n\n<template>\n <!-- Mounted only while invalid, like InlineError: `v-if`, never `v-show` —\n a summary that never leaves the DOM cannot announce its return. -->\n <div\n v-if=\"errors.length > 0\"\n ref=\"box\"\n tabindex=\"-1\"\n :role=\"announcing ? 'alert' : undefined\"\n :aria-labelledby=\"headingId\"\n :class=\"\n cn(\n 'rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-destructive-text',\n 'animate-fade-rise',\n 'focus:outline-2 focus:outline-offset-2 focus:outline-destructive',\n )\n \"\n @focus=\"announcing = false\"\n >\n <div class=\"flex items-start gap-2\">\n <TriangleAlert class=\"mt-0.5 h-4 w-4 shrink-0\" aria-hidden=\"true\" />\n <div class=\"min-w-0\">\n <h2 :id=\"headingId\" class=\"text-sm font-semibold\">\n {{ text.heading({ count: errors.length }) }}\n </h2>\n <p v-if=\"text.description({ count: errors.length }) !== ''\" class=\"mt-1 text-sm\">\n {{ text.description({ count: errors.length }) }}\n </p>\n <ul class=\"mt-2 list-disc space-y-1 pl-5\">\n <li v-for=\"error in errors\" :key=\"error.id\">\n <a\n :href=\"`#${error.id}`\"\n class=\"font-medium underline underline-offset-2\"\n @click.prevent=\"focusField(error.id)\"\n >{{ error.fieldLabel ? `${error.fieldLabel}: ${error.message}` : error.message }}</a\n >\n </li>\n </ul>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAa,uBAA2C;CACtD,UAAU,EAAE,YACV,uBAAuB,OAAO,KAAK,EAAE,GAAG,UAAU,IAAI,UAAU,SAAS;CAC3E,mBAAmB;AACrB;;;;;;;;EAuBA,MAAM,QAAQ;EAOd,MAAM,OAAO,UAAU,gBAAgB,4BAA4B,MAAM,MAAM;EAE/E,MAAM,MAAM,IAAwB,IAAI;EACxC,MAAM,YAAY,MAAM;EACxB,MAAM,aAAa,IAAI,KAAK;EAG5B,IAAI,UAAU;EAEd,YACQ,MAAM,QACZ,OAAO,WAAW;GAChB,IAAI,OAAO,WAAW,GAAG;IACvB,UAAU;IACV;GACF;GACA,WAAW,QAAQ,CAAC;GACpB,UAAU;GACV,MAAM,SAAS;GACf,IAAI,OAAO,MAAM;EACnB,GACA;GAAE,MAAM;GAAM,WAAW;EAAK,CAChC;EAEA,SAAS,WAAW,IAAkB;GAIpC,SAAS,eAAe,EAAE,CAAC,EAAE,MAAM;EACrC;;GAOU,OAAA,QAAA,OAAO,SAAM,KADrB,UAAA,GAAA,mBAoCM,OAAA;;IAlCA,SAAA;IAAJ,KAAI;IACJ,UAAS;IACR,MAAM,WAAA,QAAU,UAAa,KAAA;IAC7B,mBAAiB,MAAA,SAAA;IACjB,OAAK,eAAS,MAAA,EAAA,CAAE,CAAA,6FAAA,qBAAA,kEAAA,CAAA;IAOhB,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,WAAA,QAAU;GAElB,GAAA,CAAA,mBAoBM,OApBN,YAoBM,CAnBJ,YAAoE,MAAA,aAAA,GAAA;IAArD,OAAM;IAA0B,eAAY;GAC3D,CAAA,GAAA,mBAiBM,OAjBN,YAiBM;IAhBJ,mBAEK,MAAA;KAFA,IAAI,MAAA,SAAA;KAAW,OAAM;IACrB,GAAA,gBAAA,MAAA,IAAA,CAAI,CAAC,QAAO,EAAA,OAAU,QAAA,OAAO,OAAM,CAAA,CAAA,GAAA,GAAA,UAAA;IAE/B,MAAA,IAAA,CAAI,CAAC,YAAW,EAAA,OAAU,QAAA,OAAO,OAAM,CAAA,MAAA,MAAhD,UAAA,GAAA,mBAEI,KAFJ,YAEI,gBADC,MAAA,IAAA,CAAI,CAAC,YAAW,EAAA,OAAU,QAAA,OAAO,OAAM,CAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,IAAA,IAAA;IAE5C,mBASK,MATL,YASK,EARH,UAAA,IAAA,GAAA,mBAOK,UAAA,MAAA,WAPe,QAAA,SAAT,UAAK;KAAhB,OAAA,UAAA,GAAA,mBAOK,MAAA,EAPwB,KAAK,MAAM,GAAA,GAAA,CACtC,mBAKC,KAAA;MAJE,MAAI,IAAM,MAAM;MACjB,OAAM;MACL,SAAK,eAAA,WAAU,WAAW,MAAM,EAAE,GAAA,CAAA,SAAA,CAAA;KAC/B,GAAA,gBAAA,MAAM,aAAU,GAAM,MAAM,WAAU,IAAK,MAAM,YAAY,MAAM,OAAO,GAAA,GAAA,UAAA,CAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollReel.js","names":[],"sources":["../../../../../packages/composition/scroll-reel/src/ScrollReel.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ScrollReel — horizontal scrolling strip with scroll-snap.\n *\n * A touch-friendly, keyboard-navigable horizontal scroll container with\n * optional scroll-snap alignment. Arrow keys scroll to the next or previous\n * snap point; the `Home` and `End` keys jump to the start or end of the\n * strip.\n *\n * A ScrollReel is a component, not `overflow-x-auto snap-x snap-mandatory`,\n * because keyboard accessibility for scroll-snap requires JavaScript (arrow\n * keys must find the next snap-aligned child and scroll it into view), and\n * the gap tightens one step below `sm` like Stack and DashboardGrid.\n */\nexport type ScrollReelSnap = \"start\" | \"center\" | \"end\" | \"none\";\n\nexport type ScrollReelGap = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it,\n * and exported so a host can build a partial vocabulary against the real\n * thing rather than a transcription of it. The type itself lives in the\n * labels registry (`ScrollReelLabels`) like every other slot's, so\n * `provideLoomLabels({ scrollReel: … })` reaches this component exactly as\n * it reaches every primitive — composition sits above labels in the layer\n * direction, and a host localising one reel should not have to learn a\n * second seam to do it.\n */\nexport const SCROLL_REEL_LABELS: ScrollReelLabels = {\n region: \"Scrollable content\",\n};\n\nconst snapClass: Record<ScrollReelSnap, string> = {\n start: \"snap-x snap-mandatory snap-start\",\n center: \"snap-x snap-mandatory snap-center\",\n end: \"snap-x snap-mandatory snap-end\",\n // `none` means no snap alignment — items scroll freely.\n none: \"\",\n} as const;\n\nconst gapClass: Record<ScrollReelGap, string> = {\n sm: \"gap-2 sm:gap-3\",\n md: \"gap-3 sm:gap-4\",\n lg: \"gap-4 sm:gap-6\",\n} as const;\n\nexport { snapClass, gapClass };\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { cn, smoothScrollBehavior } from \"@ecoma-io/loom-core\";\nimport { useLabels, type LabelOverrides, type ScrollReelLabels } from \"@ecoma-io/loom-labels\";\n\nconst props = withDefaults(\n defineProps<{\n /** Scroll-snap alignment. \"none\" disables snap entirely. */\n snap?: ScrollReelSnap;\n /** Gap between items — mirrors Stack's scale. Tightens one notch below `sm`. */\n gap?: ScrollReelGap;\n /**\n * Names for what the reel says out loud, as any subset of\n * `ScrollReelLabels` — the per-instance correction over\n * `SCROLL_REEL_LABELS`, in the same shape a primitive's `labels` prop\n * takes.\n */\n labels?: LabelOverrides<ScrollReelLabels>;\n }>(),\n { snap: \"start\", gap: \"md\" },\n);\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves (own prop, then the host vocabulary from `provideLoomLabels`, then\n// these English defaults), and a template reading the raw prop would be\n// reading the overrides rather than the answer.\nconst text = useLabels(\"scrollReel\", SCROLL_REEL_LABELS, () => props.labels);\n\nconst reel = ref<HTMLDivElement | null>(null);\n\n// The reduced-motion softening lives in core (`smoothScrollBehavior`): an\n// explicit `\"smooth\"` in a scrollTo dictionary overrides the stylesheet's\n// kill-switch, so the question has to be answered at the call site — and\n// Carousel asks it too, which is why the answer is shared rather than owned.\nconst scrollBehavior = smoothScrollBehavior;\n\n/**\n * Keyboard navigation for scroll-snap: arrow keys scroll to the next or\n * previous snap-aligned child. Without this, the browser's default arrow-key\n * behaviour scrolls by a fixed pixel amount that rarely aligns with snap\n * points, leaving the strip between two items.\n */\nfunction onKeydown(event: KeyboardEvent) {\n const el = reel.value;\n if (!el) return;\n\n const direction = event.key === \"ArrowRight\" ? 1 : event.key === \"ArrowLeft\" ? -1 : 0;\n if (direction === 0 && event.key !== \"Home\" && event.key !== \"End\") return;\n\n event.preventDefault();\n\n const behavior = scrollBehavior();\n if (event.key === \"Home\") {\n el.scrollTo({ left: 0, behavior });\n return;\n }\n if (event.key === \"End\") {\n el.scrollTo({ left: el.scrollWidth, behavior });\n return;\n }\n\n // Find the next snap-aligned child in the scroll direction.\n const children = [...el.children] as HTMLElement[];\n const scrollEdge = direction === 1 ? el.scrollLeft + el.clientWidth : el.scrollLeft;\n\n for (const child of direction === 1 ? children : children.reverse()) {\n const childEdge = direction === 1 ? child.offsetLeft : child.offsetLeft + child.offsetWidth;\n const isNext = direction === 1 ? childEdge > scrollEdge - 1 : childEdge < scrollEdge + 1;\n if (isNext) {\n child.scrollIntoView({ behavior, block: \"nearest\", inline: \"start\" });\n break;\n }\n }\n}\n</script>\n\n<template>\n <!-- `role=\"region\"` + `tabindex=\"0\"` + an accessible name make this a named,\n focusable landmark region. The keyboard handler is what makes the\n scroll-snap strip navigable by arrow keys — a genuine interaction on\n a genuinely interactive element. The rule does not account for\n non-interactive ARIA roles with an explicit tabindex. -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"reel\"\n class=\"overflow-x-auto\"\n :class=\"cn('flex flex-row', snapClass[snap], gapClass[gap])\"\n tabindex=\"0\"\n role=\"region\"\n :aria-label=\"text.region\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </div>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ScrollReel.js","names":[],"sources":["../../../../../packages/composition/scroll-reel/src/ScrollReel.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ScrollReel — horizontal scrolling strip with scroll-snap.\n *\n * A touch-friendly, keyboard-navigable horizontal scroll container with\n * optional scroll-snap alignment. Arrow keys scroll to the next or previous\n * snap point; the `Home` and `End` keys jump to the start or end of the\n * strip.\n *\n * A ScrollReel is a component, not `overflow-x-auto snap-x snap-mandatory`,\n * because keyboard accessibility for scroll-snap requires JavaScript (arrow\n * keys must find the next snap-aligned child and scroll it into view), and\n * the gap tightens one step below `sm` like Stack and DashboardGrid.\n */\nexport type ScrollReelSnap = \"start\" | \"center\" | \"end\" | \"none\";\n\nexport type ScrollReelGap = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it,\n * and exported so a host can build a partial vocabulary against the real\n * thing rather than a transcription of it. The type itself lives in the\n * labels registry (`ScrollReelLabels`) like every other slot's, so\n * `provideLoomLabels({ scrollReel: … })` reaches this component exactly as\n * it reaches every primitive — composition sits above labels in the layer\n * direction, and a host localising one reel should not have to learn a\n * second seam to do it.\n */\nexport const SCROLL_REEL_LABELS: ScrollReelLabels = {\n region: \"Scrollable content\",\n};\n\nconst snapClass: Record<ScrollReelSnap, string> = {\n start: \"snap-x snap-mandatory snap-start\",\n center: \"snap-x snap-mandatory snap-center\",\n end: \"snap-x snap-mandatory snap-end\",\n // `none` means no snap alignment — items scroll freely.\n none: \"\",\n} as const;\n\nconst gapClass: Record<ScrollReelGap, string> = {\n sm: \"gap-2 sm:gap-3\",\n md: \"gap-3 sm:gap-4\",\n lg: \"gap-4 sm:gap-6\",\n} as const;\n\nexport { snapClass, gapClass };\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { cn, smoothScrollBehavior } from \"@ecoma-io/loom-core\";\nimport { useLabels, type LabelOverrides, type ScrollReelLabels } from \"@ecoma-io/loom-labels\";\n\nconst props = withDefaults(\n defineProps<{\n /** Scroll-snap alignment. \"none\" disables snap entirely. */\n snap?: ScrollReelSnap;\n /** Gap between items — mirrors Stack's scale. Tightens one notch below `sm`. */\n gap?: ScrollReelGap;\n /**\n * Names for what the reel says out loud, as any subset of\n * `ScrollReelLabels` — the per-instance correction over\n * `SCROLL_REEL_LABELS`, in the same shape a primitive's `labels` prop\n * takes.\n */\n labels?: LabelOverrides<ScrollReelLabels>;\n }>(),\n { snap: \"start\", gap: \"md\" },\n);\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves (own prop, then the host vocabulary from `provideLoomLabels`, then\n// these English defaults), and a template reading the raw prop would be\n// reading the overrides rather than the answer.\nconst text = useLabels(\"scrollReel\", SCROLL_REEL_LABELS, () => props.labels);\n\nconst reel = ref<HTMLDivElement | null>(null);\n\n// The reduced-motion softening lives in core (`smoothScrollBehavior`): an\n// explicit `\"smooth\"` in a scrollTo dictionary overrides the stylesheet's\n// kill-switch, so the question has to be answered at the call site — and\n// Carousel asks it too, which is why the answer is shared rather than owned.\nconst scrollBehavior = smoothScrollBehavior;\n\n/**\n * Keyboard navigation for scroll-snap: arrow keys scroll to the next or\n * previous snap-aligned child. Without this, the browser's default arrow-key\n * behaviour scrolls by a fixed pixel amount that rarely aligns with snap\n * points, leaving the strip between two items.\n */\nfunction onKeydown(event: KeyboardEvent) {\n const el = reel.value;\n if (!el) return;\n\n // A keypress inside a nested editable (search field, combobox, contenteditable\n // chip) bubbles up to this listener: the arrows and Home/End are the caret's\n // keys there, not the reel's. Step aside so the text control keeps them —\n // the same boundary Toolbar draws at its own listener.\n if ((event.target as HTMLElement).closest(\"input, select, textarea, [contenteditable]\")) return;\n\n const direction = event.key === \"ArrowRight\" ? 1 : event.key === \"ArrowLeft\" ? -1 : 0;\n if (direction === 0 && event.key !== \"Home\" && event.key !== \"End\") return;\n\n event.preventDefault();\n\n const behavior = scrollBehavior();\n if (event.key === \"Home\") {\n el.scrollTo({ left: 0, behavior });\n return;\n }\n if (event.key === \"End\") {\n el.scrollTo({ left: el.scrollWidth, behavior });\n return;\n }\n\n // Find the next snap-aligned child in the scroll direction.\n const children = [...el.children] as HTMLElement[];\n const scrollEdge = direction === 1 ? el.scrollLeft + el.clientWidth : el.scrollLeft;\n\n for (const child of direction === 1 ? children : children.reverse()) {\n const childEdge = direction === 1 ? child.offsetLeft : child.offsetLeft + child.offsetWidth;\n const isNext = direction === 1 ? childEdge > scrollEdge - 1 : childEdge < scrollEdge + 1;\n if (isNext) {\n child.scrollIntoView({ behavior, block: \"nearest\", inline: \"start\" });\n break;\n }\n }\n}\n</script>\n\n<template>\n <!-- `role=\"region\"` + `tabindex=\"0\"` + an accessible name make this a named,\n focusable landmark region. The keyboard handler is what makes the\n scroll-snap strip navigable by arrow keys — a genuine interaction on\n a genuinely interactive element. The rule does not account for\n non-interactive ARIA roles with an explicit tabindex. -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"reel\"\n class=\"overflow-x-auto\"\n :class=\"cn('flex flex-row', snapClass[snap], gapClass[gap])\"\n tabindex=\"0\"\n role=\"region\"\n :aria-label=\"text.region\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </div>\n</template>\n"],"mappings":""}
|
package/dist/packages/composition/scroll-reel/src/ScrollReel.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -49,6 +49,7 @@ var ScrollReel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defin
|
|
|
49
49
|
function onKeydown(event) {
|
|
50
50
|
const el = reel.value;
|
|
51
51
|
if (!el) return;
|
|
52
|
+
if (event.target.closest("input, select, textarea, [contenteditable]")) return;
|
|
52
53
|
const direction = event.key === "ArrowRight" ? 1 : event.key === "ArrowLeft" ? -1 : 0;
|
|
53
54
|
if (direction === 0 && event.key !== "Home" && event.key !== "End") return;
|
|
54
55
|
event.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollReel.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../packages/composition/scroll-reel/src/ScrollReel.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ScrollReel — horizontal scrolling strip with scroll-snap.\n *\n * A touch-friendly, keyboard-navigable horizontal scroll container with\n * optional scroll-snap alignment. Arrow keys scroll to the next or previous\n * snap point; the `Home` and `End` keys jump to the start or end of the\n * strip.\n *\n * A ScrollReel is a component, not `overflow-x-auto snap-x snap-mandatory`,\n * because keyboard accessibility for scroll-snap requires JavaScript (arrow\n * keys must find the next snap-aligned child and scroll it into view), and\n * the gap tightens one step below `sm` like Stack and DashboardGrid.\n */\nexport type ScrollReelSnap = \"start\" | \"center\" | \"end\" | \"none\";\n\nexport type ScrollReelGap = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it,\n * and exported so a host can build a partial vocabulary against the real\n * thing rather than a transcription of it. The type itself lives in the\n * labels registry (`ScrollReelLabels`) like every other slot's, so\n * `provideLoomLabels({ scrollReel: … })` reaches this component exactly as\n * it reaches every primitive — composition sits above labels in the layer\n * direction, and a host localising one reel should not have to learn a\n * second seam to do it.\n */\nexport const SCROLL_REEL_LABELS: ScrollReelLabels = {\n region: \"Scrollable content\",\n};\n\nconst snapClass: Record<ScrollReelSnap, string> = {\n start: \"snap-x snap-mandatory snap-start\",\n center: \"snap-x snap-mandatory snap-center\",\n end: \"snap-x snap-mandatory snap-end\",\n // `none` means no snap alignment — items scroll freely.\n none: \"\",\n} as const;\n\nconst gapClass: Record<ScrollReelGap, string> = {\n sm: \"gap-2 sm:gap-3\",\n md: \"gap-3 sm:gap-4\",\n lg: \"gap-4 sm:gap-6\",\n} as const;\n\nexport { snapClass, gapClass };\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { cn, smoothScrollBehavior } from \"@ecoma-io/loom-core\";\nimport { useLabels, type LabelOverrides, type ScrollReelLabels } from \"@ecoma-io/loom-labels\";\n\nconst props = withDefaults(\n defineProps<{\n /** Scroll-snap alignment. \"none\" disables snap entirely. */\n snap?: ScrollReelSnap;\n /** Gap between items — mirrors Stack's scale. Tightens one notch below `sm`. */\n gap?: ScrollReelGap;\n /**\n * Names for what the reel says out loud, as any subset of\n * `ScrollReelLabels` — the per-instance correction over\n * `SCROLL_REEL_LABELS`, in the same shape a primitive's `labels` prop\n * takes.\n */\n labels?: LabelOverrides<ScrollReelLabels>;\n }>(),\n { snap: \"start\", gap: \"md\" },\n);\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves (own prop, then the host vocabulary from `provideLoomLabels`, then\n// these English defaults), and a template reading the raw prop would be\n// reading the overrides rather than the answer.\nconst text = useLabels(\"scrollReel\", SCROLL_REEL_LABELS, () => props.labels);\n\nconst reel = ref<HTMLDivElement | null>(null);\n\n// The reduced-motion softening lives in core (`smoothScrollBehavior`): an\n// explicit `\"smooth\"` in a scrollTo dictionary overrides the stylesheet's\n// kill-switch, so the question has to be answered at the call site — and\n// Carousel asks it too, which is why the answer is shared rather than owned.\nconst scrollBehavior = smoothScrollBehavior;\n\n/**\n * Keyboard navigation for scroll-snap: arrow keys scroll to the next or\n * previous snap-aligned child. Without this, the browser's default arrow-key\n * behaviour scrolls by a fixed pixel amount that rarely aligns with snap\n * points, leaving the strip between two items.\n */\nfunction onKeydown(event: KeyboardEvent) {\n const el = reel.value;\n if (!el) return;\n\n const direction = event.key === \"ArrowRight\" ? 1 : event.key === \"ArrowLeft\" ? -1 : 0;\n if (direction === 0 && event.key !== \"Home\" && event.key !== \"End\") return;\n\n event.preventDefault();\n\n const behavior = scrollBehavior();\n if (event.key === \"Home\") {\n el.scrollTo({ left: 0, behavior });\n return;\n }\n if (event.key === \"End\") {\n el.scrollTo({ left: el.scrollWidth, behavior });\n return;\n }\n\n // Find the next snap-aligned child in the scroll direction.\n const children = [...el.children] as HTMLElement[];\n const scrollEdge = direction === 1 ? el.scrollLeft + el.clientWidth : el.scrollLeft;\n\n for (const child of direction === 1 ? children : children.reverse()) {\n const childEdge = direction === 1 ? child.offsetLeft : child.offsetLeft + child.offsetWidth;\n const isNext = direction === 1 ? childEdge > scrollEdge - 1 : childEdge < scrollEdge + 1;\n if (isNext) {\n child.scrollIntoView({ behavior, block: \"nearest\", inline: \"start\" });\n break;\n }\n }\n}\n</script>\n\n<template>\n <!-- `role=\"region\"` + `tabindex=\"0\"` + an accessible name make this a named,\n focusable landmark region. The keyboard handler is what makes the\n scroll-snap strip navigable by arrow keys — a genuine interaction on\n a genuinely interactive element. The rule does not account for\n non-interactive ARIA roles with an explicit tabindex. -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"reel\"\n class=\"overflow-x-auto\"\n :class=\"cn('flex flex-row', snapClass[snap], gapClass[gap])\"\n tabindex=\"0\"\n role=\"region\"\n :aria-label=\"text.region\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4BA,IAAa,qBAAuC,EAClD,QAAQ,qBACV;AAEA,IAAM,YAA4C;CAChD,OAAO;CACP,QAAQ;CACR,KAAK;CAEL,MAAM;AACR;AAEA,IAAM,WAA0C;CAC9C,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;;;;;;;;;EAUA,MAAM,QAAQ;EAqBd,MAAM,OAAO,UAAU,cAAc,0BAA0B,MAAM,MAAM;EAE3E,MAAM,OAAO,IAA2B,IAAI;EAM5C,MAAM,iBAAiB;;;;;;;EAQvB,SAAS,UAAU,OAAsB;GACvC,MAAM,KAAK,KAAK;GAChB,IAAI,CAAC,IAAI;
|
|
1
|
+
{"version":3,"file":"ScrollReel.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../../../packages/composition/scroll-reel/src/ScrollReel.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * ScrollReel — horizontal scrolling strip with scroll-snap.\n *\n * A touch-friendly, keyboard-navigable horizontal scroll container with\n * optional scroll-snap alignment. Arrow keys scroll to the next or previous\n * snap point; the `Home` and `End` keys jump to the start or end of the\n * strip.\n *\n * A ScrollReel is a component, not `overflow-x-auto snap-x snap-mandatory`,\n * because keyboard accessibility for scroll-snap requires JavaScript (arrow\n * keys must find the next snap-aligned child and scroll it into view), and\n * the gap tightens one step below `sm` like Stack and DashboardGrid.\n */\nexport type ScrollReelSnap = \"start\" | \"center\" | \"end\" | \"none\";\n\nexport type ScrollReelGap = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Loom's English, co-located with the component so it tree-shakes with it,\n * and exported so a host can build a partial vocabulary against the real\n * thing rather than a transcription of it. The type itself lives in the\n * labels registry (`ScrollReelLabels`) like every other slot's, so\n * `provideLoomLabels({ scrollReel: … })` reaches this component exactly as\n * it reaches every primitive — composition sits above labels in the layer\n * direction, and a host localising one reel should not have to learn a\n * second seam to do it.\n */\nexport const SCROLL_REEL_LABELS: ScrollReelLabels = {\n region: \"Scrollable content\",\n};\n\nconst snapClass: Record<ScrollReelSnap, string> = {\n start: \"snap-x snap-mandatory snap-start\",\n center: \"snap-x snap-mandatory snap-center\",\n end: \"snap-x snap-mandatory snap-end\",\n // `none` means no snap alignment — items scroll freely.\n none: \"\",\n} as const;\n\nconst gapClass: Record<ScrollReelGap, string> = {\n sm: \"gap-2 sm:gap-3\",\n md: \"gap-3 sm:gap-4\",\n lg: \"gap-4 sm:gap-6\",\n} as const;\n\nexport { snapClass, gapClass };\n</script>\n\n<script setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport { cn, smoothScrollBehavior } from \"@ecoma-io/loom-core\";\nimport { useLabels, type LabelOverrides, type ScrollReelLabels } from \"@ecoma-io/loom-labels\";\n\nconst props = withDefaults(\n defineProps<{\n /** Scroll-snap alignment. \"none\" disables snap entirely. */\n snap?: ScrollReelSnap;\n /** Gap between items — mirrors Stack's scale. Tightens one notch below `sm`. */\n gap?: ScrollReelGap;\n /**\n * Names for what the reel says out loud, as any subset of\n * `ScrollReelLabels` — the per-instance correction over\n * `SCROLL_REEL_LABELS`, in the same shape a primitive's `labels` prop\n * takes.\n */\n labels?: LabelOverrides<ScrollReelLabels>;\n }>(),\n { snap: \"start\", gap: \"md\" },\n);\n\n// `text`, not `labels`: the prop of that name is one of the three sources this\n// resolves (own prop, then the host vocabulary from `provideLoomLabels`, then\n// these English defaults), and a template reading the raw prop would be\n// reading the overrides rather than the answer.\nconst text = useLabels(\"scrollReel\", SCROLL_REEL_LABELS, () => props.labels);\n\nconst reel = ref<HTMLDivElement | null>(null);\n\n// The reduced-motion softening lives in core (`smoothScrollBehavior`): an\n// explicit `\"smooth\"` in a scrollTo dictionary overrides the stylesheet's\n// kill-switch, so the question has to be answered at the call site — and\n// Carousel asks it too, which is why the answer is shared rather than owned.\nconst scrollBehavior = smoothScrollBehavior;\n\n/**\n * Keyboard navigation for scroll-snap: arrow keys scroll to the next or\n * previous snap-aligned child. Without this, the browser's default arrow-key\n * behaviour scrolls by a fixed pixel amount that rarely aligns with snap\n * points, leaving the strip between two items.\n */\nfunction onKeydown(event: KeyboardEvent) {\n const el = reel.value;\n if (!el) return;\n\n // A keypress inside a nested editable (search field, combobox, contenteditable\n // chip) bubbles up to this listener: the arrows and Home/End are the caret's\n // keys there, not the reel's. Step aside so the text control keeps them —\n // the same boundary Toolbar draws at its own listener.\n if ((event.target as HTMLElement).closest(\"input, select, textarea, [contenteditable]\")) return;\n\n const direction = event.key === \"ArrowRight\" ? 1 : event.key === \"ArrowLeft\" ? -1 : 0;\n if (direction === 0 && event.key !== \"Home\" && event.key !== \"End\") return;\n\n event.preventDefault();\n\n const behavior = scrollBehavior();\n if (event.key === \"Home\") {\n el.scrollTo({ left: 0, behavior });\n return;\n }\n if (event.key === \"End\") {\n el.scrollTo({ left: el.scrollWidth, behavior });\n return;\n }\n\n // Find the next snap-aligned child in the scroll direction.\n const children = [...el.children] as HTMLElement[];\n const scrollEdge = direction === 1 ? el.scrollLeft + el.clientWidth : el.scrollLeft;\n\n for (const child of direction === 1 ? children : children.reverse()) {\n const childEdge = direction === 1 ? child.offsetLeft : child.offsetLeft + child.offsetWidth;\n const isNext = direction === 1 ? childEdge > scrollEdge - 1 : childEdge < scrollEdge + 1;\n if (isNext) {\n child.scrollIntoView({ behavior, block: \"nearest\", inline: \"start\" });\n break;\n }\n }\n}\n</script>\n\n<template>\n <!-- `role=\"region\"` + `tabindex=\"0\"` + an accessible name make this a named,\n focusable landmark region. The keyboard handler is what makes the\n scroll-snap strip navigable by arrow keys — a genuine interaction on\n a genuinely interactive element. The rule does not account for\n non-interactive ARIA roles with an explicit tabindex. -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"reel\"\n class=\"overflow-x-auto\"\n :class=\"cn('flex flex-row', snapClass[snap], gapClass[gap])\"\n tabindex=\"0\"\n role=\"region\"\n :aria-label=\"text.region\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4BA,IAAa,qBAAuC,EAClD,QAAQ,qBACV;AAEA,IAAM,YAA4C;CAChD,OAAO;CACP,QAAQ;CACR,KAAK;CAEL,MAAM;AACR;AAEA,IAAM,WAA0C;CAC9C,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;;;;;;;;;EAUA,MAAM,QAAQ;EAqBd,MAAM,OAAO,UAAU,cAAc,0BAA0B,MAAM,MAAM;EAE3E,MAAM,OAAO,IAA2B,IAAI;EAM5C,MAAM,iBAAiB;;;;;;;EAQvB,SAAS,UAAU,OAAsB;GACvC,MAAM,KAAK,KAAK;GAChB,IAAI,CAAC,IAAI;GAMT,IAAK,MAAM,OAAuB,QAAQ,4CAA4C,GAAG;GAEzF,MAAM,YAAY,MAAM,QAAQ,eAAe,IAAI,MAAM,QAAQ,cAAc,KAAK;GACpF,IAAI,cAAc,KAAK,MAAM,QAAQ,UAAU,MAAM,QAAQ,OAAO;GAEpE,MAAM,eAAe;GAErB,MAAM,WAAW,eAAe;GAChC,IAAI,MAAM,QAAQ,QAAQ;IACxB,GAAG,SAAS;KAAE,MAAM;KAAG;IAAS,CAAC;IACjC;GACF;GACA,IAAI,MAAM,QAAQ,OAAO;IACvB,GAAG,SAAS;KAAE,MAAM,GAAG;KAAa;IAAS,CAAC;IAC9C;GACF;GAGA,MAAM,WAAW,CAAC,GAAG,GAAG,QAAQ;GAChC,MAAM,aAAa,cAAc,IAAI,GAAG,aAAa,GAAG,cAAc,GAAG;GAEzE,KAAK,MAAM,SAAS,cAAc,IAAI,WAAW,SAAS,QAAQ,GAAG;IACnE,MAAM,YAAY,cAAc,IAAI,MAAM,aAAa,MAAM,aAAa,MAAM;IAEhF,IADe,cAAc,IAAI,YAAY,aAAa,IAAI,YAAY,aAAa,GAC3E;KACV,MAAM,eAAe;MAAE;MAAU,OAAO;MAAW,QAAQ;KAAQ,CAAC;KACpE;IACF;GACF;EACF;;GAUE,OAAA,UAAA,GAAA,mBAUM,OAAA;IATA,SAAA;IAAJ,KAAI;IACJ,OAAK,eAAA,CAAC,mBACE,MAAA,EAAA,CAAE,CAAA,iBAAkB,UAAU,QAAA,OAAO,SAAS,QAAA,IAAG,CAAA,CAAA;IACzD,UAAS;IACT,MAAK;IACJ,cAAY,MAAA,IAAA,CAAI,CAAC;IACR;GAEV,GAAA,CAAA,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,IAAA,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.js","names":[],"sources":["../../../../../packages/composition/sidebar/src/Sidebar.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Sidebar — content + sidebar with intrinsic CSS collapse.\n *\n * The Every Layout \"Sidebar\" pattern: the sidebar gets a fixed `flex-basis`\n * and the content gets `flex-grow: 999`, so the layout wraps and both panels\n * go full-width the moment the content can't fit its `contentMin` percentage.\n * No media query, no JavaScript — the layout derives its own breakpoint from\n * the container's width.\n *\n * A Sidebar is a component because the `calc()` technique for intrinsic\n * sidebar width is non-obvious and easy to get wrong, and Loom wrapping it\n * prevents footguns. It differs from Split in that the content area is the\n * star — it grows to fill all available space — and the sidebar has a\n * preferred, not a minimum, width.\n */\nexport type SidebarSide = \"left\" | \"right\";\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"@ecoma-io/loom-core\";\n\nwithDefaults(\n defineProps<{\n /** Which side the sidebar sits on. Controls flex direction and stacking order. */\n side?: SidebarSide;\n /** Preferred width for the sidebar (e.g. \"16rem\"). The sidebar does not grow. */\n sideWidth?: string;\n /** Minimum percentage of the container the content demands before the layout wraps. Default: `\"50%\"`. */\n contentMin?: string;\n /** Whether to add a gap between the two panels. Default: `true`. */\n gap?: boolean;\n }>(),\n { side: \"left\", sideWidth: \"16rem\", contentMin: \"50%\", gap: true },\n);\n</script>\n\n<template>\n <!--\n `flex-wrap: wrap` is the intrinsic collapse mechanism. When the content\n can't fit its `contentMin`, it wraps to a new line and both panels take\n full width — the sidebar becomes a full-width section above or below the\n content, depending on `side`.\n\n The sidebar's `flex-basis` is its preferred width. The content's\n `flex-grow: 999` ensures it takes all remaining space when there is room,\n but its `flex-basis: 0` and `min-width: contentMin` trigger wrapping\n when there isn't.\n -->\n <div\n :class=\"
|
|
1
|
+
{"version":3,"file":"Sidebar.js","names":[],"sources":["../../../../../packages/composition/sidebar/src/Sidebar.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Sidebar — content + sidebar with intrinsic CSS collapse.\n *\n * The Every Layout \"Sidebar\" pattern: the sidebar gets a fixed `flex-basis`\n * and the content gets `flex-grow: 999`, so the layout wraps and both panels\n * go full-width the moment the content can't fit its `contentMin` percentage.\n * No media query, no JavaScript — the layout derives its own breakpoint from\n * the container's width.\n *\n * A Sidebar is a component because the `calc()` technique for intrinsic\n * sidebar width is non-obvious and easy to get wrong, and Loom wrapping it\n * prevents footguns. It differs from Split in that the content area is the\n * star — it grows to fill all available space — and the sidebar has a\n * preferred, not a minimum, width.\n */\nexport type SidebarSide = \"left\" | \"right\";\n</script>\n\n<script setup lang=\"ts\">\nimport { cn } from \"@ecoma-io/loom-core\";\n\nwithDefaults(\n defineProps<{\n /** Which side the sidebar sits on. Controls flex direction and stacking order. */\n side?: SidebarSide;\n /** Preferred width for the sidebar (e.g. \"16rem\"). The sidebar does not grow. */\n sideWidth?: string;\n /** Minimum percentage of the container the content demands before the layout wraps. Default: `\"50%\"`. */\n contentMin?: string;\n /** Whether to add a gap between the two panels. Default: `true`. */\n gap?: boolean;\n }>(),\n { side: \"left\", sideWidth: \"16rem\", contentMin: \"50%\", gap: true },\n);\n</script>\n\n<template>\n <!--\n `flex-wrap: wrap` is the intrinsic collapse mechanism. When the content\n can't fit its `contentMin`, it wraps to a new line and both panels take\n full width — the sidebar becomes a full-width section above or below the\n content, depending on `side`.\n\n The sidebar's `flex-basis` is its preferred width. The content's\n `flex-grow: 999` ensures it takes all remaining space when there is room,\n but its `flex-basis: 0` and `min-width: contentMin` trigger wrapping\n when there isn't.\n -->\n <div\n :class=\"cn('flex flex-row', gap ? 'gap-3 sm:gap-4' : undefined)\"\n :style=\"{ flexWrap: 'wrap' }\"\n >\n <!--\n Document order follows `side`, so the wrapped stack never contradicts\n the side-by-side row and screen-reader order matches the visual one:\n content first when `side=\"right\"`, sidebar first when `side=\"left\"`.\n flex-row (never reverse) plus this ordering is what makes the wrap\n produce content-above-sidebar for `side=\"right\"`.\n -->\n <template v-if=\"side === 'right'\">\n <!-- Content: fills all remaining space (flex-grow: 999), but its\n min-width: contentMin triggers wrapping when there isn't room. -->\n <div\n :style=\"{\n flexBasis: 0,\n flexGrow: 999,\n flexShrink: 1,\n minWidth: contentMin,\n }\"\n >\n <slot />\n </div>\n <!-- Sidebar: preferred width as flex-basis, does not grow. -->\n <div\n :style=\"{\n flexBasis: sideWidth,\n flexGrow: 0,\n flexShrink: 1,\n }\"\n >\n <slot name=\"side\" />\n </div>\n </template>\n <template v-else>\n <!-- Sidebar: preferred width as flex-basis, does not grow. -->\n <div\n :style=\"{\n flexBasis: sideWidth,\n flexGrow: 0,\n flexShrink: 1,\n }\"\n >\n <slot name=\"side\" />\n </div>\n <!-- Content: fills all remaining space (flex-grow: 999), but its\n min-width: contentMin triggers wrapping when there isn't room. -->\n <div\n :style=\"{\n flexBasis: 0,\n flexGrow: 999,\n flexShrink: 1,\n minWidth: contentMin,\n }\"\n >\n <slot />\n </div>\n </template>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -40,6 +40,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
40
40
|
sideWidth: string;
|
|
41
41
|
contentMin: string;
|
|
42
42
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
43
|
+
default?: (props: {}) => any;
|
|
44
|
+
} & {
|
|
45
|
+
side?: (props: {}) => any;
|
|
46
|
+
} & {
|
|
43
47
|
side?: (props: {}) => any;
|
|
44
48
|
} & {
|
|
45
49
|
default?: (props: {}) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../../packages/composition/sidebar/src/Sidebar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../../packages/composition/sidebar/src/Sidebar.vue"],"names":[],"mappings":"AAoHA;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;wBACtB,OAAO,YAAY;AAAxC,wBAAyC;AACzC,QAAA,MAAM,YAAY;IAEd,kFAAkF;WAC3E,WAAW;IAClB,iFAAiF;gBACrE,MAAM;IAClB,yGAAyG;iBAC5F,MAAM;IACnB,oEAAoE;UAC9D,OAAO;;IAPb,kFAAkF;WAC3E,WAAW;IAClB,iFAAiF;gBACrE,MAAM;IAClB,yGAAyG;iBAC5F,MAAM;IACnB,oEAAoE;UAC9D,OAAO;;SAAP,OAAO;UANN,WAAW;eAEN,MAAM;gBAEL,MAAM;;cA4ET,CAAC,KAAK,IAAgB,KAAK,GAAG;;WACjC,CAAC,KAAK,IAAgB,KAAK,GAAG;;WAC9B,CAAC,KAAK,IAAgB,KAAK,GAAG;;cAC3B,CAAC,KAAK,IAAgB,KAAK,GAAG;EAUxC,CAAC;AAWL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|