@cube-dev/ui-kit 0.0.0-canary-9e84d51 → 0.0.0-canary-ef259f7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Action/Action.js +1 -1
- package/dist/components/ActiveZone/ActiveZone.js +1 -1
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/use-alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Banner/Banner.js +1 -1
- package/dist/components/Block/Block.js +1 -1
- package/dist/components/Button/AutoCollapseObserver.js +1 -1
- package/dist/components/Button/Button.js +6 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonSplit/ButtonSplit.js +8 -5
- package/dist/components/ButtonSplit/ButtonSplit.js.map +1 -1
- package/dist/components/ButtonSplit/ButtonSplitContext.js +1 -1
- package/dist/components/Calendar/Calendar.js +1 -1
- package/dist/components/Calendar/CalendarCell.js +1 -1
- package/dist/components/Calendar/CalendarGrid.js +1 -1
- package/dist/components/Calendar/CalendarHeader.js +1 -1
- package/dist/components/Calendar/CalendarPanel.js +1 -1
- package/dist/components/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/Calendar/PeriodGrid.js +1 -1
- package/dist/components/Calendar/RangeCalendar.js +1 -1
- package/dist/components/Calendar/styled.js +1 -1
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/Checkbox/CheckboxGroupContext.js +1 -1
- package/dist/components/CollectionItem/CollectionItem.js +1 -1
- package/dist/components/ColorInput/ColorInput.js +1 -1
- package/dist/components/ColorPanel/ColorPanel.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/ComboBox/ComboBox.js +1 -1
- package/dist/components/ComboBox/combo-box-options.js +1 -1
- package/dist/components/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/CommandMenu/styled.js +1 -1
- package/dist/components/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/CommandTextArea/caret-position.js +1 -1
- package/dist/components/CommandTextArea/use-caret-anchor.js +1 -1
- package/dist/components/Content/Content.js +1 -1
- package/dist/components/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/DataTable/DataTable.js +1 -1
- package/dist/components/DatePicker/CalendarPopover.js +1 -1
- package/dist/components/DatePicker/DateInput.js +1 -1
- package/dist/components/DatePicker/DateInputBase.js +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/DatePicker/MonthPicker.js +1 -1
- package/dist/components/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/DatePicker/TimeInput.js +1 -1
- package/dist/components/DatePicker/WeekPicker.js +1 -1
- package/dist/components/DatePicker/YearPicker.js +1 -1
- package/dist/components/DatePicker/parse-date.js +1 -1
- package/dist/components/DatePicker/period.js +1 -1
- package/dist/components/DatePicker/props.js +1 -1
- package/dist/components/DatePicker/utils.js +1 -1
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dialog/DialogContainer.js +1 -1
- package/dist/components/Dialog/DialogContext.js +1 -1
- package/dist/components/Dialog/DialogForm.js +1 -1
- package/dist/components/Dialog/DialogTrigger.js +1 -1
- package/dist/components/Dialog/ModernDialogForm.js +1 -1
- package/dist/components/Dialog/default-button-text.js +1 -1
- package/dist/components/Dialog/use-content-overflow.js +1 -1
- package/dist/components/Dialog/use-dialog-container.js +1 -1
- package/dist/components/Dialog/use-dialog-open-sync.js +1 -1
- package/dist/components/Dialog/use-dismiss-confirmation.js +1 -1
- package/dist/components/Dialog/use-retained-dialog-focus.js +1 -1
- package/dist/components/Disclosure/Disclosure.js +1 -1
- package/dist/components/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/DraggableCollection/DraggableCollection.js +1 -1
- package/dist/components/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/FieldWrapper/field-description.js +1 -1
- package/dist/components/FileInput/FileInput.js +1 -1
- package/dist/components/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/FilterListBox/styled.js +1 -1
- package/dist/components/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/FilterPicker/FilterTree.js +1 -1
- package/dist/components/Flex/Flex.js +1 -1
- package/dist/components/Flow/Flow.js +1 -1
- package/dist/components/Footer/Footer.js +1 -1
- package/dist/components/Form/Field.js +1 -1
- package/dist/components/Form/Form.js +1 -1
- package/dist/components/Form/FormContext.js +1 -1
- package/dist/components/Form/FormElement.js +1 -1
- package/dist/components/Form/ModernFormRoot.js +1 -1
- package/dist/components/Form/ResetButton.js +1 -1
- package/dist/components/Form/SubmitButton.js +1 -1
- package/dist/components/Form/SubmitError.js +1 -1
- package/dist/components/Form/backend.js +1 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Form/modern/ModernActions.js +1 -1
- package/dist/components/Form/modern/ModernControllerContext.js +1 -1
- package/dist/components/Form/modern/after-press.js +1 -1
- package/dist/components/Form/modern/controller.js +1 -1
- package/dist/components/Form/modern/field-binding.js +1 -1
- package/dist/components/Form/modern/field.js +1 -1
- package/dist/components/Form/modern/react.js +1 -1
- package/dist/components/Form/modern/store.js +1 -1
- package/dist/components/Form/modern/validation.js +1 -1
- package/dist/components/Form/modern/values.js +1 -1
- package/dist/components/Form/reset-unbound-controls.js +1 -1
- package/dist/components/Form/use-field/use-field-binding.js +1 -1
- package/dist/components/Form/use-field/use-field-props.js +1 -1
- package/dist/components/Form/use-field/use-field.js +1 -1
- package/dist/components/Form/use-form.js +1 -1
- package/dist/components/Form/validation.js +1 -1
- package/dist/components/GlobalStyles/GlobalStyles.js +1 -1
- package/dist/components/Grid/Grid.js +1 -1
- package/dist/components/GridProvider/GridProvider.js +1 -1
- package/dist/components/Header/Header.js +1 -1
- package/dist/components/HiddenInput/HiddenInput.js +1 -1
- package/dist/components/HotKeys/HotKeys.js +1 -1
- package/dist/components/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/InlineInput/InlineInput.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Item/Item.js +1 -1
- package/dist/components/Item/ItemWithNativeLinks.js +1 -1
- package/dist/components/ItemAction/ItemAction.js +1 -1
- package/dist/components/ItemAction/ItemCloseAction.js +1 -1
- package/dist/components/ItemActionsWrapper/ItemActionsWrapper.js +1 -1
- package/dist/components/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/ItemButton/ItemButton.js +6 -2
- package/dist/components/ItemButton/ItemButton.js.map +1 -1
- package/dist/components/ItemCard/ItemCard.js +1 -1
- package/dist/components/ItemTable/ItemTable.js +1 -1
- package/dist/components/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/ItemTable/item-table-sections.js +1 -1
- package/dist/components/ItemTable/use-item-table-column-widths.js +1 -1
- package/dist/components/ItemTable/use-item-table-drag-drop.js +1 -1
- package/dist/components/ItemTable/use-item-table-pagination.js +1 -1
- package/dist/components/ItemTable/use-item-table-selection.js +1 -1
- package/dist/components/ItemTable/use-item-table-sort.js +1 -1
- package/dist/components/ItemTable/use-item-table-tree-model.js +1 -1
- package/dist/components/Label/Label.js +1 -1
- package/dist/components/Layout/GridLayout.js +1 -1
- package/dist/components/Layout/Layout.js +1 -1
- package/dist/components/Layout/LayoutBlock.js +1 -1
- package/dist/components/Layout/LayoutCenter.js +1 -1
- package/dist/components/Layout/LayoutContainer.js +1 -1
- package/dist/components/Layout/LayoutContent.js +1 -1
- package/dist/components/Layout/LayoutContext.js +1 -1
- package/dist/components/Layout/LayoutFlex.js +1 -1
- package/dist/components/Layout/LayoutFooter.js +1 -1
- package/dist/components/Layout/LayoutGrid.js +1 -1
- package/dist/components/Layout/LayoutHeader.js +1 -1
- package/dist/components/Layout/LayoutPane.js +1 -1
- package/dist/components/Layout/LayoutPanel.js +1 -1
- package/dist/components/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/Layout/LayoutPanelTransition.js +1 -1
- package/dist/components/Layout/LayoutResizeHandle.js +1 -1
- package/dist/components/Layout/LayoutToolbar.js +1 -1
- package/dist/components/Layout/index.js +1 -1
- package/dist/components/Layout/use-tiny-scrollbar.js +1 -1
- package/dist/components/Layout/utils.js +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/ListBox/DraggableListBox.js +1 -1
- package/dist/components/ListBox/ListBox.js +1 -1
- package/dist/components/ListBox/empty-row.js +1 -1
- package/dist/components/ListBox/option-id.js +1 -1
- package/dist/components/ListBox/use-disabled-focus-reset.js +1 -1
- package/dist/components/ListBoxPopover/EmptyLabelStatus.js +1 -1
- package/dist/components/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/ListBoxPopover/list-navigation.js +1 -1
- package/dist/components/ListBoxPopover/use-composite-focus.js +1 -1
- package/dist/components/ListBoxPopover/use-delayed-loading.js +1 -1
- package/dist/components/LoadingAnimation/LoadingAnimation.js +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuCollectionItem.js +1 -1
- package/dist/components/Menu/MenuContext.js +1 -1
- package/dist/components/Menu/MenuItem.js +1 -1
- package/dist/components/Menu/MenuSection.js +1 -1
- package/dist/components/Menu/MenuTrigger.js +1 -1
- package/dist/components/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/Menu/styled.js +1 -1
- package/dist/components/Menu/touch-context-menu.js +1 -1
- package/dist/components/Menu/use-anchored-menu.js +1 -1
- package/dist/components/Menu/use-context-menu.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/ModalContainmentProvider.js +1 -1
- package/dist/components/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/Modal/Overlay.js +1 -1
- package/dist/components/Modal/Popover.js +1 -1
- package/dist/components/Modal/Tray.js +1 -1
- package/dist/components/Modal/Underlay.js +1 -1
- package/dist/components/NavTabs/NavTabs.js +1 -1
- package/dist/components/NoDataIcon/NoDataIcon.js +1 -1
- package/dist/components/Notifications/Notification.js +1 -1
- package/dist/components/Notifications/NotificationAction.js +1 -1
- package/dist/components/Notifications/NotificationCard.js +1 -1
- package/dist/components/Notifications/NotificationContext.js +1 -1
- package/dist/components/Notifications/NotificationItem.js +1 -1
- package/dist/components/Notifications/OverlayContainer.js +1 -1
- package/dist/components/Notifications/OverlayProvider.js +1 -1
- package/dist/components/Notifications/PersistentNotificationsList.js +1 -1
- package/dist/components/Notifications/dismissed-storage.js +1 -1
- package/dist/components/Notifications/format-relative-time.js +1 -1
- package/dist/components/Notifications/index.js +1 -1
- package/dist/components/Notifications/use-live-region.js +1 -1
- package/dist/components/Notifications/use-notification-state.js +1 -1
- package/dist/components/Notifications/use-notifications.js +1 -1
- package/dist/components/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/Notifications/use-persistent-state.js +1 -1
- package/dist/components/Notifications/use-toast-state.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/NumberInput/StepButton.js +1 -1
- package/dist/components/Pagination/Pagination.js +5 -2
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/use-pagination.js +1 -1
- package/dist/components/Panel/Panel.js +1 -1
- package/dist/components/Paragraph/Paragraph.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/Picker/Picker.js +1 -1
- package/dist/components/Placeholder/Placeholder.js +1 -1
- package/dist/components/Portal/Portal.js +1 -1
- package/dist/components/Portal/PortalProvider.js +1 -1
- package/dist/components/Portal/use-portal.js +1 -1
- package/dist/components/Prefix/Prefix.js +1 -1
- package/dist/components/PrismCode/PrismCode.js +1 -1
- package/dist/components/PrismCode/prism-setup.js +1 -1
- package/dist/components/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/RadioGroup/Radio.js +2 -2
- package/dist/components/RadioGroup/RadioContext.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/RadioGroup/joined-styles.js +27 -4
- package/dist/components/RadioGroup/joined-styles.js.map +1 -1
- package/dist/components/RenderCache/RenderCache.js +1 -1
- package/dist/components/ResizablePanel/ResizablePanel.js +1 -1
- package/dist/components/Result/Result.js +1 -1
- package/dist/components/Root/Root.js +1 -1
- package/dist/components/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/SearchInput/SearchInput.js +1 -1
- package/dist/components/Select/Select.js +6 -2
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/Slider/Gradation.js +1 -1
- package/dist/components/Slider/HueSlider.js +1 -1
- package/dist/components/Slider/RangeSlider.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/SliderBase.js +1 -1
- package/dist/components/Slider/SliderThumb.js +1 -1
- package/dist/components/Slider/SliderTrack.js +1 -1
- package/dist/components/Slider/elements.js +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/Space/Space.js +1 -1
- package/dist/components/Spin/Cube.js +1 -1
- package/dist/components/Spin/InternalSpinner.js +1 -1
- package/dist/components/Spin/Spin.js +1 -1
- package/dist/components/Spin/SpinsContainer.js +1 -1
- package/dist/components/StatsCard/StatsCard.js +1 -1
- package/dist/components/Suffix/Suffix.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/TableBase/ColumnResizer.js +1 -1
- package/dist/components/TableBase/RowCollection.js +1 -1
- package/dist/components/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/TableBase/TableRow.js +1 -1
- package/dist/components/TableBase/TableRowLink.js +1 -1
- package/dist/components/TableBase/TableView.js +1 -1
- package/dist/components/TableBase/TreeGridTable.js +1 -1
- package/dist/components/TableBase/column-header.js +1 -1
- package/dist/components/TableBase/column-menu.js +1 -1
- package/dist/components/TableBase/column-styles.js +1 -1
- package/dist/components/TableBase/column-tint.js +1 -1
- package/dist/components/TableBase/row-menu.js +1 -1
- package/dist/components/TableBase/styled.js +1 -1
- package/dist/components/TableBase/table-body-sections.js +1 -1
- package/dist/components/TableBase/table-tree.js +1 -1
- package/dist/components/TableBase/types.js +1 -1
- package/dist/components/TableBase/use-cell-selection.js +0 -0
- package/dist/components/TableBase/use-column-menu.js +1 -1
- package/dist/components/TableBase/use-column-order.js +1 -1
- package/dist/components/TableBase/use-column-window.js +1 -1
- package/dist/components/TableBase/use-container-width.js +1 -1
- package/dist/components/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/TableBase/use-scrollability.js +1 -1
- package/dist/components/TableBase/use-table-columns.js +1 -1
- package/dist/components/TableBase/use-table-search.js +1 -1
- package/dist/components/TableBase/use-table-selection.js +1 -1
- package/dist/components/TableBase/use-table-sort.js +1 -1
- package/dist/components/TableBase/use-table-sorts.js +1 -1
- package/dist/components/TableBase/use-table-storage.js +1 -1
- package/dist/components/TableBase/use-table-tooltip-refresh.js +1 -1
- package/dist/components/TableBase/use-table-tree-state.js +1 -1
- package/dist/components/Tabs/BoardDragActiveProvider.js +1 -1
- package/dist/components/Tabs/DraggableTabList.js +1 -1
- package/dist/components/Tabs/TabButton.js +1 -1
- package/dist/components/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/Tabs/TabPanel.js +1 -1
- package/dist/components/Tabs/TabPicker.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/TabsAction.js +1 -1
- package/dist/components/Tabs/TabsContext.js +1 -1
- package/dist/components/Tabs/popover-placement.js +1 -1
- package/dist/components/Tabs/scroll-tab-into-strip.js +1 -1
- package/dist/components/Tabs/segmented-styles.js +1 -1
- package/dist/components/Tabs/styled.js +1 -1
- package/dist/components/Tabs/types.js +1 -1
- package/dist/components/Tabs/use-tab-editing.js +1 -1
- package/dist/components/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagInput/TagInput.js +1 -1
- package/dist/components/TagInput/TagList.js +1 -1
- package/dist/components/TagInput/use-active-option.js +1 -1
- package/dist/components/TagInput/use-suffix-space.js +1 -1
- package/dist/components/TagInput/use-tag-error.js +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/TextArea/TextArea.js +1 -1
- package/dist/components/TextInput/TextInput.js +1 -1
- package/dist/components/TextInput/TextInputBase.js +1 -1
- package/dist/components/TextInput/displayed-validation.js +1 -1
- package/dist/components/TextInput/identifier-text-services.js +1 -1
- package/dist/components/TextInput/password-manager-ignore.js +1 -1
- package/dist/components/TextInput/use-auto-size-text-area.js +1 -1
- package/dist/components/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/TextItem/TextItem.js +1 -1
- package/dist/components/Title/Title.js +1 -1
- package/dist/components/Toast/AnnouncedToastItem.js +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/ToastItem.js +1 -1
- package/dist/components/Toast/use-progress-toast.js +1 -1
- package/dist/components/Toast/use-toast.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupContext.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroupItem.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/TooltipContext.js +1 -1
- package/dist/components/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/Tooltip/last-press.js +1 -1
- package/dist/components/Tooltip/split-trigger-props.js +1 -1
- package/dist/components/Tree/Tree.js +1 -1
- package/dist/components/Tree/TreeNode.js +1 -1
- package/dist/components/Tree/checked-keys.js +1 -1
- package/dist/components/Tree/row-id.js +1 -1
- package/dist/components/Tree/styled.js +1 -1
- package/dist/components/Tree/tree-index.js +1 -1
- package/dist/components/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/Tree/use-load-data.js +1 -1
- package/dist/components/TriggerActions/TriggerActions.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/ValidationIndicator/InvalidIcon.js +1 -1
- package/dist/components/ValidationIndicator/ValidIcon.js +1 -1
- package/dist/components/ValidationIndicator/ValidationIndicator.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/harness/colors-deps.js +2 -2
- package/dist/hooks/use-action.js +1 -1
- package/dist/hooks/use-auto-tooltip.js +1 -1
- package/dist/hooks/use-buffered-value.js +1 -1
- package/dist/hooks/use-combined-refs.js +1 -1
- package/dist/hooks/use-controlled-focus-visible.js +1 -1
- package/dist/hooks/use-debounced-value.js +1 -1
- package/dist/hooks/use-deprecation-warning.js +1 -1
- package/dist/hooks/use-event.js +1 -1
- package/dist/hooks/use-id.js +1 -1
- package/dist/hooks/use-is-darwin.js +1 -1
- package/dist/hooks/use-is-first-render.js +1 -1
- package/dist/hooks/use-key-symbols.js +1 -1
- package/dist/hooks/use-layout-effect.js +1 -1
- package/dist/hooks/use-local-storage.js +1 -1
- package/dist/hooks/use-merge-styles.js +1 -1
- package/dist/hooks/use-open-key.js +1 -1
- package/dist/hooks/use-overlay-escape-guard.js +1 -1
- package/dist/hooks/use-overlay-position.js +1 -1
- package/dist/hooks/use-popover-sync.js +1 -1
- package/dist/hooks/use-qa-props.js +1 -1
- package/dist/hooks/use-scheme.js +1 -1
- package/dist/hooks/use-sync-ref.js +1 -1
- package/dist/hooks/use-timer/Timer.js +1 -1
- package/dist/hooks/use-timer/use-timer.js +1 -1
- package/dist/hooks/use-validation-props.js +1 -1
- package/dist/hooks/use-viewport-size.js +1 -1
- package/dist/hooks/use-warn.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/add-uikit-locale.js +1 -1
- package/dist/i18n/create-formatter.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +1 -1
- package/dist/i18n/locales/en-US/uikit.js +1 -1
- package/dist/i18n/locales/es-ES/uikit.js +1 -1
- package/dist/i18n/locales/es-MX/uikit.js +1 -1
- package/dist/i18n/locales/fr-FR/uikit.js +1 -1
- package/dist/i18n/locales/it-IT/uikit.js +1 -1
- package/dist/i18n/locales/ja-JP/uikit.js +1 -1
- package/dist/i18n/locales/nb-NO/uikit.js +1 -1
- package/dist/i18n/locales/pt-BR/uikit.js +1 -1
- package/dist/i18n/locales/pt-PT/uikit.js +1 -1
- package/dist/i18n/locales/sv-SE/uikit.js +1 -1
- package/dist/i18n/locales/vi-VN/uikit.js +1 -1
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/namespace.js +1 -1
- package/dist/i18n/use-formatter.js +1 -1
- package/dist/i18n/use-i18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.js +1 -1
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/providers/ColorPopoverContext.js +1 -1
- package/dist/providers/EventBusProvider.js +1 -1
- package/dist/providers/ItemActionContext.js +1 -1
- package/dist/providers/Provider.js +1 -1
- package/dist/providers/SlotProvider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigation-adapter.default.js +1 -1
- package/dist/providers/navigation-url.js +1 -1
- package/dist/providers/use-navigation.js +1 -1
- package/dist/themes/item-themes.js +1 -1
- package/dist/themes/themes.js +1 -1
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/legacy-color.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.js +1 -1
- package/dist/tokens/shadows.js +9 -1
- package/dist/tokens/shadows.js.map +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/actions-run.js +1 -1
- package/dist/utils/chain.js +1 -1
- package/dist/utils/color/channels.js +1 -1
- package/dist/utils/color/color.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/component-base-props.js +1 -1
- package/dist/utils/disabled-behavior.js +1 -1
- package/dist/utils/disabled-props.js +1 -1
- package/dist/utils/dotize.js +1 -1
- package/dist/utils/field-chrome.js +1 -1
- package/dist/utils/field-layout.js +1 -1
- package/dist/utils/forward-ref-with-generics.js +1 -1
- package/dist/utils/highlight-text.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/interactions.js +1 -1
- package/dist/utils/is-dev-env.js +1 -1
- package/dist/utils/is-text-only.js +1 -1
- package/dist/utils/layout-scale.js +1 -1
- package/dist/utils/legacy-tooltip.js +1 -1
- package/dist/utils/map-props.js +1 -1
- package/dist/utils/merge-props.js +1 -1
- package/dist/utils/modules.js +1 -1
- package/dist/utils/nullable-value.js +1 -1
- package/dist/utils/option-origin-press.js +1 -1
- package/dist/utils/overlay-key-propagation.js +1 -1
- package/dist/utils/pick-base-customization-props.js +1 -1
- package/dist/utils/popover-width.js +1 -1
- package/dist/utils/programmatic-focus.js +1 -1
- package/dist/utils/promise.js +1 -1
- package/dist/utils/raf.js +1 -1
- package/dist/utils/random.js +1 -1
- package/dist/utils/range.js +1 -1
- package/dist/utils/resolve-icon.js +1 -1
- package/dist/utils/resolve-validation-props.js +1 -1
- package/dist/utils/search-text-services.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/shared-store.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/virtual-width.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/utils/wrap-node-if-plain.js +1 -1
- package/dist/utils/wrap-with-field.js +1 -1
- package/dist/version.js +2 -2
- package/docs/Usage.md +7 -6
- package/docs/components/Button.md +2 -2
- package/docs/components/ButtonSplit.md +3 -1
- package/docs/components/ItemButton.md +2 -2
- package/docs/components/RadioGroup.md +1 -1
- package/docs/components/Select.md +2 -2
- package/docs/components/ToggleGroup.md +1 -1
- package/package.json +1 -1
- package/tasty.config.generated.ts +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../utils/merge-props.js";
|
|
3
3
|
import { pickBaseCustomizationProps } from "../../utils/pick-base-customization-props.js";
|
|
4
4
|
import { useFocus as useFocus$1 } from "../../utils/interactions.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../hooks/use-layout-effect.js";
|
|
4
4
|
import { mergeProps as mergeProps$1 } from "../../utils/merge-props.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import React from "react";
|
|
3
3
|
//#region src/components/Tooltip/TooltipContext.ts
|
|
4
4
|
const TooltipContext = React.createContext({});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { Tooltip as _Tooltip } from "./Tooltip.js";
|
|
3
3
|
import { TooltipTrigger } from "./TooltipTrigger.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "../../hooks/use-layout-effect.js";
|
|
3
3
|
import { TooltipContext } from "./TooltipContext.js";
|
|
4
4
|
import { Tooltip as _Tooltip } from "./Tooltip.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
//#region src/components/Tooltip/last-press.ts
|
|
3
3
|
/**
|
|
4
4
|
* What the pointer that last pressed is still on, per document.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { mergeProps } from "../../utils/merge-props.js";
|
|
3
3
|
//#region src/components/Tooltip/split-trigger-props.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { extractStyles } from "../../utils/styles.js";
|
|
3
3
|
import { mergeRefs } from "../../hooks/use-combined-refs.js";
|
|
4
4
|
import { pickBaseCustomizationProps } from "../../utils/pick-base-customization-props.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../../utils/merge-props.js";
|
|
3
3
|
import { mergeRefs } from "../../hooks/use-combined-refs.js";
|
|
4
4
|
import { useEvent } from "../../hooks/use-event.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
//#region src/components/Tree/checked-keys.ts
|
|
3
3
|
/**
|
|
4
4
|
* Pure checkbox cascade for a tree: which keys are fully checked and which
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
//#region src/components/Tree/row-id.ts
|
|
3
3
|
/**
|
|
4
4
|
* The DOM id of the row with `key` in the tree whose id is `treeId`, for the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { Item as _Item } from "../Item/Item.js";
|
|
3
3
|
import { Action } from "../Action/Action.js";
|
|
4
4
|
import { mergeStyles, tasty } from "@tenphi/tasty";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
//#region src/components/Tree/tree-index.ts
|
|
3
3
|
/**
|
|
4
4
|
* A node's plain-text label: its `textValue`, else its `title` when that
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../hooks/use-event.js";
|
|
3
3
|
import { deriveCheckedSets, toggleCheckedKey } from "./checked-keys.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "../../hooks/use-event.js";
|
|
3
3
|
import { isDevEnvOrTest } from "../../utils/is-dev-env.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { ItemActionIcon } from "../ItemActionsWrapper/ItemActionsWrapper.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { Fragment, jsxs } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { Text as _Text } from "../Text/Text.js";
|
|
3
3
|
import { Paragraph } from "../Paragraph/Paragraph.js";
|
|
4
4
|
import { Title as _Title } from "../Title/Title.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { WarningIcon } from "../../icons/WarningIcon.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/ValidationIndicator/InvalidIcon.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { CheckIcon } from "../../icons/CheckIcon.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/ValidationIndicator/ValidIcon.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { LoadingIcon } from "../../icons/LoadingIcon.js";
|
|
3
3
|
import { hasValidationState } from "../../utils/resolve-validation-props.js";
|
|
4
4
|
import { InvalidIcon } from "./InvalidIcon.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { DEFAULTS } from "./defaults.generated.js";
|
|
3
3
|
import { createRule, noRedundantDefaultProp } from "./rules/no-redundant-default-prop.js";
|
|
4
4
|
//#region src/eslint-plugin/index.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { DEFAULTS } from "../defaults.generated.js";
|
|
3
3
|
//#region src/eslint-plugin/rules/no-redundant-default-prop.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
var e=Object.defineProperty,t=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},r=/* @__PURE__ */ n({APCA_HC_ENHANCEMENT:()=>15,APCA_MAX_LC:()=>106,APCA_PRESETS:()=>Dt,GLAZE_EXPORT_VERSION:()=>2,REF_EPS:()=>He,apcaContrast:()=>Gt,apcaLuminanceFromLinearRgb:()=>ue,assertAllPastel:()=>Fr,assertNativeFormat:()=>Y,contrastRatioFromLuminance:()=>ae,cuspLightness:()=>N,findToneForContrast:()=>en,findValueForMixContrast:()=>tn,formatHsl:()=>Se,formatOkhsl:()=>z,formatOkhst:()=>be,formatOklch:()=>Ce,formatRgb:()=>xe,formatSrgb:()=>Te,formatSrgbLinear:()=>we,fromTone:()=>qe,gamutClampedLuminance:()=>le,glaze:()=>$,hdrToLinearSrgb:()=>Ct,hdrToSrgb:()=>wt,hslToSrgb:()=>me,inferRoleFromName:()=>Hr,isColorTokenExport:()=>Yn,isPaletteExport:()=>Xn,isThemeExport:()=>Jn,normalizeRole:()=>Br,okhslToLinearSrgb:()=>F,okhslToOkhst:()=>Ye,okhslToOklab:()=>P,okhslToOklch:()=>De,okhslToSrgb:()=>ce,okhstToOkhsl:()=>Je,oklabToOkhsl:()=>fe,oppositeRole:()=>Wr,parseHex:()=>he,parseHexAlpha:()=>_e,relativeLuminanceFromLinearRgb:()=>ie,resolveApcaTarget:()=>Ot,resolveContrastForLevel:()=>zt,resolveContrastForMode:()=>Rt,resolveMinContrast:()=>Pt,roleToPolarity:()=>Ur,srgbToHex:()=>Ee,srgbToOkhsl:()=>pe,toTone:()=>U,toneFromY:()=>Ge,variantToOkhsl:()=>Xe,yFromTone:()=>Ke});const i=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],a=[[4.076741636075959,-3.307711539258062,.2309699031821041],[-1.2684379732850313,2.6097573492876878,-.3413193760026569],[-.004196076138675526,-.703418617935936,1.7076146940746113]],o=[[.4122214708,.5363325363,.0514459929],[.2119034982,.6806995451,.1073969566],[.0883024619,.2817188376,.6299787005]],s=[[.2104542553,.793617785,-.0040720468],[1.9779984951,-2.428592205,.4505937099],[.0259040371,.7827717662,-.808675766]],c=[[[-1.8817030993265873,-.8093650129914302],[1.19086277,1.76576728,.59662641,.75515197,.56771245]],[[1.8144407988010998,-1.194452667805235],[.73956515,-.45954404,.08285427,.1254107,.14503204]],[[.13110757611180954,1.813339709266608],[1.35733652,-.00915799,-1.1513021,-.50559606,.00692167]]],l=2*Math.PI,u=.206,d=.03,f=1.206/1.03,p=e=>(e%360+360)%360,m=e=>.5*(f*e-u+Math.sqrt((f*e-u)*(f*e-u)+4*d*f*e)),h=e=>(e**2+u*e)/(f*(e+d)),g=(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],_=(e,t)=>e[0]*t[0]+e[1]*t[1],v=(e,t)=>[g(e,t[0]),g(e,t[1]),g(e,t[2])],y=e=>[e[0]**3,e[1]**3,e[2]**3],b=e=>[Math.cbrt(e[0]),Math.cbrt(e[1]),Math.cbrt(e[2])],x=(e,t,n)=>Math.max(t,Math.min(n,e)),S=e=>v(y(v(e,i)),a),C=(e,t)=>{let n=c,r=a,o=[e,t],s=[0,e,t],l,u;_(n[0][0],o)>1?(l=n[0][1],u=r[0]):_(n[1][0],o)>1?(l=n[1][1],u=r[1]):(l=n[2][1],u=r[2]);let[d,f,p,m,h]=l,[g,v,y]=u,b=d+f*e+p*t+e*e*m+h*e*t,x=(e,t)=>e[1]*t[1]+e[2]*t[2],S=x(i[0],s),C=x(i[1],s),w=x(i[2],s),T=1+b*S,E=1+b*C,D=1+b*w,O=T**3,k=E**3,ee=D**3,te=3*S*T*T,A=3*C*E*E,ne=3*w*D*D,j=6*S*S*T,M=6*C*C*E,re=6*w*w*D,N=g*O+v*k+y*ee,P=g*te+v*A+y*ne,F=g*j+v*M+y*re;return b-=N*P/(P*P-.5*N*F),b},w=(e,t)=>{let n=C(e,t),r=S([1,n*e,n*t]),i=Math.cbrt(1/Math.max(Math.max(r[0],r[1]),Math.max(r[2],0)));return[i,i*n]},T=(e,t,n,r,o,s)=>{let c=a,l=[0,e,t],u=Number.MAX_VALUE,d,f=(e,t)=>e[1]*t[1]+e[2]*t[2],p=(e,t,n,r)=>e[0]*t+e[1]*n+e[2]*r;if((n-o)*s[1]-(s[0]-o)*r<=0){let e=r*s[0]+s[1]*(o-n);d=e===0?0:s[1]*o/e}else{let e=r*(s[0]-1)+s[1]*(o-n);d=e===0?0:s[1]*(o-1)/e;let t=n-o,a=r,m=f(i[0],l),h=f(i[1],l),g=f(i[2],l),_=o*(1-d)+d*n,v=d*r,y=_+v*m,b=_+v*h,x=_+v*g,S=y**3,C=b**3,w=x**3,T=3*(t+a*m)*y*y,E=3*(t+a*h)*b*b,D=3*(t+a*g)*x*x,O=6*(t+a*m)**2*y,k=6*(t+a*h)**2*b,ee=6*(t+a*g)**2*x,te=p(c[0],S,C,w)-1,A=p(c[0],T,E,D),ne=p(c[0],O,k,ee),j=A/(A*A-.5*te*ne),M=-te*j,re=p(c[1],S,C,w)-1,N=p(c[1],T,E,D),P=p(c[1],O,k,ee),F=N/(N*N-.5*re*P),ie=-re*F,ae=p(c[2],S,C,w)-1,I=p(c[2],T,E,D),L=p(c[2],O,k,ee),oe=I/(I*I-.5*ae*L),se=-ae*oe;M=j>=0?M:u,ie=F>=0?ie:u,se=oe>=0?se:u,d+=Math.min(M,Math.min(ie,se))}return d},E=e=>[e[1]/e[0],e[1]/(1-e[0])],D=(e,t)=>[.11516993+1/(7.4477897+4.1590124*t+e*(-2.19557347+1.75198401*t+e*(-2.13704948-10.02301043*t+e*(-4.24894561+5.38770819*t+4.69891013*e)))),.11239642+1/(1.6132032-.68124379*t+e*(.40370612+.90148123*t+e*(-.27087943+.6122399*t+e*(.00299215-.45399568*t-.14661872*e))))],O=(e,t,n,r)=>{let i=T(t,n,e,1,e,r),a=E(r),o=i/Math.min(e*a[0],(1-e)*a[1]),s=D(t,n),c=e*s[0],l=(1-e)*s[1],u=.9*o*Math.sqrt(Math.sqrt(1/(1/c**4+1/l**4)));return c=e*.4,l=(1-e)*.8,[Math.sqrt(1/(1/c**2+1/l**2)),u,i]},k=Math.cos(199.8*Math.PI/180),ee=Math.sin(199.8*Math.PI/180),te=Math.cos(267.4*Math.PI/180),A=Math.sin(267.4*Math.PI/180);let ne,j;function M(e){ne||=w(k,ee),j||=w(te,A);let t=T(k,ee,e,1,e,ne),n=T(te,A,e,1,e,j);return Math.min(t,n)}const re=/* @__PURE__ */ new Map;function N(e){let t=Math.round(p(e)*100)/100,n=re.get(t);if(n!==void 0)return n;let r=t/360,i=x(m(w(Math.cos(l*r),Math.sin(l*r))[0]),.001,.999);return re.set(t,i),i}function P(e,t,n,r=!1){let i=h(n),a=0,o=0,s=p(e)/360;if(i!==0&&i!==1&&t!==0){let e=Math.cos(l*s),n=Math.sin(l*s);if(r){let r=t*M(i);a=r*e,o=r*n}else{let[r,s,c]=O(i,e,n,w(e,n)),l=.8,u,d,f,p;t<l?(u=1.25*t,d=0,f=l*r,p=1-f/s):(u=5*(t-.8),d=s,f=.2*s**2*1.25**2/r,p=1-f/(c-s));let m=d+u*f/(1-p*u);a=m*e,o=m*n}}return[i,a,o]}function F(e,t,n,r=!1){return S(P(e,t,n,r))}function ie(e){return .2126*e[0]+.7152*e[1]+.0722*e[2]}function ae(e,t){let n=Math.max(e,t),r=Math.min(e,t);return(n+.05)/(r+.05)}const I=e=>{let t=e<0?-1:1,n=Math.abs(e);return n>.0031308?t*(1.055*n**(1/2.4)-.055):12.92*e},L=e=>{let t=e<0?-1:1,n=Math.abs(e);return n<=.04045?e/12.92:t*((n+.055)/1.055)**2.4};function oe(e){return[Math.max(0,Math.min(1,I(e[0]))),Math.max(0,Math.min(1,I(e[1]))),Math.max(0,Math.min(1,I(e[2])))]}function se(e,t,n){return[L(e[0]+(t[0]-e[0])*n),L(e[1]+(t[1]-e[1])*n),L(e[2]+(t[2]-e[2])*n)]}function ce(e,t,n,r=!1){let i=F(e,t,n,r);return[Math.max(0,Math.min(1,I(i[0]))),Math.max(0,Math.min(1,I(i[1]))),Math.max(0,Math.min(1,I(i[2])))]}function le(e){let t=L(Math.max(0,Math.min(1,I(e[0])))),n=L(Math.max(0,Math.min(1,I(e[1])))),r=L(Math.max(0,Math.min(1,I(e[2]))));return .2126*t+.7152*n+.0722*r}function ue(e){let t=Math.max(0,Math.min(1,I(e[0]))),n=Math.max(0,Math.min(1,I(e[1]))),r=Math.max(0,Math.min(1,I(e[2])));return .2126*t**2.4+.7152*n**2.4+.0722*r**2.4}const de=e=>v(b(v(e,o)),s),fe=(e,t=!1)=>{let n=e[0],r=e[1],i=e[2],a=Math.sqrt(r*r+i*i);if(a<1e-10||n>=.999999||n<=1e-6)return[0,0,m(n)];let o=r/a,s=i/a,c=180/Math.PI*Math.atan2(i,r);c=p(c);let l;if(t)l=a/M(n);else{let[e,t,r]=O(n,o,s,w(o,s)),i=.8;if(a<t){let n=i*e;l=a/(n+a*(1-n/t))/1.25}else{let n=t,o=.2*t**2*1.25**2/e,s=1-o/(r-t),c=a-n;l=i+c/(o+c*s)/5}}let u=m(n);return[c,x(l,0,1),x(u,0,1)]};function pe(e,t=!1){let n=de([L(e[0]),L(e[1]),L(e[2])]),r=fe(n,t);return Math.hypot(n[1],n[2])<1e-6&&(r[1]=0),r}function me(e,t,n){let r=(e%360+360)%360/360,i=x(t,0,1),a=x(n,0,1);if(i===0)return[a,a,a];let o=a<.5?a*(1+i):a+i-a*i,s=2*a-o,c=e=>{let t=e;return t<0&&(t+=1),t>1&&--t,t<1/6?s+(o-s)*6*t:t<1/2?o:t<2/3?s+(o-s)*(2/3-t)*6:s};return[c(r+1/3),c(r),c(r-1/3)]}function he(e){let t=_e(e);return!t||t.alpha!==void 0?null:t.rgb}const ge=/^[0-9a-f]+$/i;function _e(e){let t=e.startsWith(`#`)?e.slice(1):e;if(!ge.test(t))return null;let n=t.length===3||t.length===4?Array.from(t,e=>e+e).join(``):t;if(n.length!==6&&n.length!==8)return null;let r=e=>parseInt(n.slice(e,e+2),16)/255,i=[r(0),r(2),r(4)];return n.length===8?{rgb:i,alpha:r(6)}:{rgb:i}}function R(e,t){return parseFloat(e.toFixed(t)).toString()}const ve=/* @__PURE__ */ new Set;function ye(e,...t){t.some(e=>e>1.000001)&&(ve.has(e)||(ve.add(e),console.warn(`glaze: ${e}() got a value above 1 — it takes the 0-1 factors every Glaze producer returns (resolve(), variantToOkhsl, srgbToOkhsl), not 0-100 percentages. Divide by 100, or drop the "* 100" left over from the pre-2.0 signature.`)))}function z(e,t,n,r=!1){ye(`formatOkhsl`,t,n);let i=t;return r&&(i=fe(P(e,t,n,!0),!1)[1]),`okhsl(${R(e,2)} ${R(i*100,2)}% ${R(n*100,2)}%)`}function be(e,t,n,r=!1){ye(`formatOkhst`,t,n);let i=t;if(r){let r=.05,a=Math.log(1.05)-Math.log(r),o=Math.exp(n*a+Math.log(r))-r;i=fe(P(e,t,m(Math.cbrt(Math.max(0,o))),!0),!1)[1]}return`okhst(${R(e,2)} ${R(i*100,2)}% ${R(n*100,2)}%)`}function xe(e,t,n,r=!1){ye(`formatRgb`,t,n);let[i,a,o]=ce(e,t,n,r);return`rgb(${parseFloat((i*255).toFixed(2))} ${parseFloat((a*255).toFixed(2))} ${parseFloat((o*255).toFixed(2))})`}function Se(e,t,n,r=!1){ye(`formatHsl`,t,n);let[i,a,o]=ce(e,t,n,r),s=Math.max(i,a,o),c=Math.min(i,a,o),l=s-c,u=0,d=0,f=(s+c)/2;return l>0&&(d=f>.5?l/(2-s-c):l/(s+c),u=s===i?((a-o)/l+(a<o?6:0))*60:s===a?((o-i)/l+2)*60:((i-a)/l+4)*60),`hsl(${R(u,2)} ${R(d*100,2)}% ${R(f*100,2)}%)`}function Ce(e,t,n,r=!1){ye(`formatOklch`,t,n);let[i,a,o]=De(e,t,n,r);return`oklch(${R(i,4)} ${R(a,4)} ${R(o,2)})`}function we(e){return`color(srgb-linear ${R(e[0],4)} ${R(e[1],4)} ${R(e[2],4)})`}function Te(e){return`color(srgb ${R(e[0],4)} ${R(e[1],4)} ${R(e[2],4)})`}function Ee(e){let t=e=>Math.max(0,Math.min(255,Math.round(e*255))),n=t(e[0]),r=t(e[1]),i=t(e[2]);return`#${n.toString(16).padStart(2,`0`)}${r.toString(16).padStart(2,`0`)}${i.toString(16).padStart(2,`0`)}`}function De(e,t,n,r=!1){let[i,a,o]=P(e,t,n,r);return[i,Math.sqrt(a*a+o*o),p(180/Math.PI*Math.atan2(o,a))]}function Oe(e){return Array.isArray(e)?e[0]:e}function ke(e){return Array.isArray(e)?e[1]:e}function B(e,t,n){return Math.max(t,Math.min(n,e))}function Ae(e,t,n){return e+(t-e)*n}const je=/"\uE000([^"]*)\uE000"/g;function V(e){if(typeof e==`number`||e===void 0)return String(e);if(typeof e==`bigint`)return`${e}n`;try{let t=JSON.stringify(e);return t===void 0?String(e):t.includes(``)?t:JSON.stringify(e,(e,t)=>t===void 0||typeof t==`number`&&!Number.isFinite(t)?`${t}`:t)?.replace(je,`$1`)??String(e)}catch{return String(e)}}const Me=.5;function Ne(e){return B(e,0,100)/100}function H(e){let t=e.contrastLevel;if(typeof t==`number`&&Number.isFinite(t))return Ne(t)}function Pe(e){return H(e)===1}function Fe(e,t){return Array.isArray(e)?t<=0?e[0]:t>=1?e[1]:Ae(e[0],e[1],t):e}function Ie(e){return e===`max`||e===`min`}function Le(e){return typeof e==`number`?{value:e,relative:!1}:{value:parseFloat(e),relative:!0}}function Re(e){return e===`max`?{kind:`extreme`,value:100}:e===`min`?{kind:`extreme`,value:0}:typeof e==`number`?{kind:`absolute`,value:e}:{kind:`relative`,value:parseFloat(e)}}function ze(e,t){if(!Array.isArray(e))return Re(e);if(t<=0)return Re(e[0]);if(t>=1)return Re(e[1]);let n=Re(e[0]),r=Re(e[1]);return n.kind===r.kind&&n.kind!==`extreme`?{kind:n.kind,value:Ae(n.value,r.value,t)}:t<Me?n:r}function Be(e,t){if(t===void 0)return e;let n=Le(t);return n.relative?((e+n.value)%360+360)%360:(n.value%360+360)%360}function Ve(e){if(e===void 0)return!1;let t=Array.isArray(e)?e[0]:e;return typeof t==`number`||Ie(t)}const He=.05;function Ue(e){let t=h(e);return t*t*t}function We(e){return m(Math.cbrt(Math.max(0,e)))}function Ge(e,t=He){return(Math.log(e+t)-Math.log(t))/(Math.log(1+t)-Math.log(t))*100}function Ke(e,t=He){let n=Math.log(1+t)-Math.log(t);return Math.exp(e/100*n+Math.log(t))-t}function U(e,t=He){return Ge(Ue(e),t)}function qe(e,t=He){return We(Ke(e,t))}function Je(e){return{h:e.h,s:e.s,l:B(qe(e.t*100),0,1)}}function Ye(e){return{h:e.h,s:e.s,t:B(U(e.l)/100,0,1)}}function Xe(e){return{h:e.h,s:e.s,l:B(qe(e.t*100),0,1)}}function Ze(e,t=`tone window`){if(e===!1)return{lo:0,hi:100,eps:He};let n=e,r,i,a=He;if(Array.isArray(n)&&n.length===2)[r,i]=n;else if(typeof n==`object`&&n&&!Array.isArray(n))({lo:r,hi:i,eps:a}=n);else throw Error(`glaze: ${t} must be [lo, hi], { lo, hi, eps }, or false (got ${V(n)}).`);for(let[e,n]of[[`lo`,r],[`hi`,i]])if(typeof n!=`number`||!Number.isFinite(n))throw Error(`glaze: ${t} ${e} must be a finite number (got ${V(n)}).`);if(typeof a!=`number`||!Number.isFinite(a)||a<=0||a>1e6)throw Error(`glaze: ${t} eps must be a finite number above 0 and at most 1e6 (got ${V(a)}).`);let o=r,s=i;if(o>s)throw Error(`glaze: ${t} lo (${o}) is above hi (${s}). A window runs from its dark end to its light end: [lo, hi] with lo ≤ hi, e.g. [${s}, ${o}].`);return{lo:B(o,0,100),hi:B(s,0,100),eps:a}}function Qe(e,t,n){let r=Ze(t===`dark`?n.darkTone:n.lightTone);if(e)return{lo:0,hi:100,eps:r.eps};let i=H(n);return i===void 0||i<=0?r:i>=1?{lo:0,hi:100,eps:r.eps}:{lo:Ae(r.lo,0,i),hi:Ae(r.hi,100,i),eps:r.eps}}function $e(e,t){let n=U(t.lo/100,t.eps),r=U(t.hi/100,t.eps);return B(qe(n+e/100*(r-n),t.eps)*100,0,100)}function et(e,t,n,r,i){if(t===`static`)return B(e,0,100);let a=Qe(r,n?`dark`:`light`,i);return B(U($e(B(n&&t===`auto`?100-e:e,0,100),a)/100),0,100)}function tt(e,t,n){let r=Qe(t,`dark`,n);return B(U($e(100-e,r)/100),0,100)}function nt(e,t,n){let r=Qe(e,`dark`,t),i=Qe(e,`dark`,n);return r.lo===i.lo&&r.hi===i.hi&&r.eps===i.eps}function rt(e,t){let n=U(t.lo/100,t.eps),r=U(t.hi/100,t.eps);return r===n?e:(U(qe(e),t.eps)-n)/(r-n)*100}function it(e,t,n,r){if(t===`static`)return e;let i=rt(e,Qe(n,`dark`,r));return t===`auto`?100-i:i}function at(e,t,n){return t===`static`?e:e*(1-n.darkDesaturation)}function ot(e,t,n,r){if(t===`static`)return[0,1];let i=Qe(n,e?`dark`:`light`,r);return[B(U(i.lo/100)/100,0,1),B(U(i.hi/100)/100,0,1)]}function st(e){return e.type===`shadow`}function ct(e){return e.type===`glow`}function W(e){return st(e)||ct(e)}function lt(e){return e.type===`mix`}const ut={objectInfluence:.5,tint:0,reach:1,hueBleed:0};function dt(e,t){let n=n=>e?.[n]??t?.[n]??ut[n],r=e?.headroom??t?.headroom??0;return{objectInfluence:n(`objectInfluence`),tint:n(`tint`),reach:n(`reach`),hueBleed:n(`hueBleed`),headroom:B(r,0,2)}}function ft(e,t,n){let r=t-e;return r>180?r-=360:r<-180&&(r+=360),((e+r*n)%360+360)%360}const pt=1e-4,mt=(Math.sqrt(5)-1)/2;function ht(e,t,n,r){return n===void 0?1:Math.max(0,1+r*(e===`shadow`?1:-1)*(t-n)/100)}function gt(e,t,n,r,i){let a=B(i.reach,0,1),o=e===`shadow`?r*(1-a):r+(100-r)*a,s=B(i.hueBleed,0,1),c=B(qe(o),0,1),l=B(i.tint,0,1),u=n!==void 0&&n.s>pt&&s>0?n.h:void 0;return t.s<=pt?u===void 0?{h:t.h,s:0,l:c}:{h:u,s:l,l:c}:{h:u===void 0?t.h:ft(t.h,u,s),s:l,l:c}}function _t(e,t,n,r,i,a){let o=U(t.l),s=ht(e,o,n===void 0?void 0:U(n.l),i.objectInfluence),c=B(r,0,100)*s,l=gt(e,t,n,o,i),u=oe(F(t.h,t.s,t.l,t.pastel??a)),d=oe(F(l.h,l.s,l.l,a)),f=e=>Ge(ie(se(u,d,e))),p=f(0),m=e===`shadow`?1:-1,{alpha:h,reached:g}=vt(e,e=>m*(p-f(e)),c),_={...l,alpha:h,step:c,reached:g},v=i.headroom??0;if(e===`glow`&&v>0&&c>0){let e=bt(h,p,l,t,a),n=e===void 0?void 0:xt(e,p,c,v);n!==void 0&&(_.hdr=n)}return _}function vt(e,t,n){if(n<=0)return{alpha:0,reached:0};let r=1;if(t(1)<n){r=e===`shadow`?Tt(t):1;let i=t(r);if(i<n)return i>1e-9?{alpha:r,reached:i}:{alpha:0,reached:0}}let i=0;for(let e=0;e<40;e++){let e=(i+r)/2;t(e)<n?i=e:r=e}return{alpha:r,reached:t(r)}}function yt(e,t){if(!t)return{h:e.h,s:e.s,l:e.l};let[n,r,i]=fe(P(e.h,e.s,e.l,!0));return{h:n,s:r,l:i}}function bt(e,t,n,r,i){if(e===1)return yt(n,i);if(e===0&&t>=99.999999)return yt(r,r.pastel??i)}function xt(e,t,n,r){let i=t+n;if(!(i>100.000000001))return;let a=F(e.h,e.s,e.l),o=ie(a),s=Math.max(a[0],a[1],a[2]);if(!(o>0)||!(s>0))return;let c=Math.min(Ke(i)/o,2**r/s);if(c>1)return{...e,exposure:Math.log2(c),reached:Ge(o*c)-t}}function St(e){let{h:t,s:n,t:r}=Ye(e);return{h:t,s:n,t:r,exposure:e.exposure}}function Ct(e){let{h:t,s:n,l:r}=Je(e),[i,a,o]=F(t,n,r),s=2**e.exposure;return[i*s,a*s,o*s]}function wt(e){let[t,n,r]=Ct(e);return[I(t),I(n),I(r)]}function Tt(e){let t=0,n=1;for(let r=0;r<40;r++){let r=n-mt*(n-t),i=t+mt*(n-t);e(r)<e(i)?t=r:n=i}let r=(t+n)/2;return e(r)>e(1)?r:1}function Et(e,t){return e===`apca`?ue(t):le(t)}const Dt={preferred:90,body:75,content:60,large:45,"non-text":30,min:15};function Ot(e){return typeof e==`number`?Math.abs(e):Dt[e]}const kt={AA:4.5,AAA:7,"AA-large":3,"AAA-large":4.5},At={AA:`AAA`,"AA-large":`AAA-large`};function jt(e){return e.apca!==void 0}function Mt(e){return typeof e==`string`&&Object.hasOwn(kt,e)}function Nt(e){return typeof e==`string`&&Object.hasOwn(Dt,e)}function Pt(e){return typeof e==`number`?Math.max(1,e):kt[e]}function Ft(e,t,n){if(typeof e==`number`)return Pt(e);if(t&&!n){let t=At[e];if(t!==void 0)return Pt(t)}return Pt(e)}function It(e,t){return Array.isArray(e)?t?e[1]:e[0]:e}function Lt(e){return typeof e==`object`&&jt(e)?`apca`:`wcag`}function Rt(e,t,n,r){if(typeof e==`number`||typeof e==`string`)return{metric:`wcag`,target:Ft(e,t,!!r)};if(jt(e)){let i=Ot(It(e.apca,t)),a=Array.isArray(e.apca);return{metric:`apca`,target:t&&!r&&!a?Math.max(i,Math.min(i+15,106)):i,polarity:n??`fg`}}let i=Array.isArray(e.wcag);return{metric:`wcag`,target:Ft(It(e.wcag,t),t,!!r||i)}}function zt(e,t,n){if(!Number.isFinite(t))throw Error(`glaze: resolveContrastForLevel needs a finite level (got ${t}).`);let r=Array.isArray(e),i=Ne(t),a=Rt(Oe(e),!1,n,r);if(i<=0)return a;let o=Rt(ke(e),!0,n,r);if(i>=1)return o;if(a.metric!==o.metric)throw Error(`glaze: a "contrast" pair cannot switch metric between its normal (${a.metric}) and high-contrast (${o.metric}) entry — the two targets are on different scales. Use one metric for both entries.`);return{...a,target:Ae(a.target,o.target,i)}}const Bt={mainTRC:2.4,normBG:.56,normTXT:.57,revTXT:.62,revBG:.65},Vt=.022,Ht=1.14,Ut=.027;function Wt(e){let t=Math.max(0,e);return t>=Vt?t:t+(Vt-t)**1.414}function Gt(e,t){let n=Wt(e),r=Wt(t);if(Math.abs(r-n)<5e-4)return 0;let i;return r>n?(i=(r**+Bt.normBG-n**+Bt.normTXT)*Ht,i<.1?0:(i-Ut)*100):(i=(r**+Bt.revBG-n**+Bt.revTXT)*Ht,i>-.1?0:(i+Ut)*100)}const Kt=/* @__PURE__ */ new Map,qt=[],Jt=1e4;function Yt(e,t,n,r,i){let a=Math.round(r*Jt)/Jt,o=`${e}|${t}|${n}|${a}|${i}`,s=Kt.get(o);if(s!==void 0)return s;let c=Et(e,F(t,n,qe(a*100,He),i));if(Kt.size>=512){let e=qt.shift();Kt.delete(e)}return Kt.set(o,c),qt.push(o),c}function G(e,t,n,r){if(e===`wcag`)return ae(t,n);let i=r===`bg`?Gt(n,t):Gt(t,n);return Math.abs(i)}function Xt(e,t){return e>=t-1e-9*Math.max(1,Math.abs(t))}function Zt(e,t,n,r,i,a,o,s,c,l){let u=G(i,e(n),r,c);if(u<a)return{pos:n,contrast:u};let d=G(i,e(t),r,c);if(d>=a)return{pos:t,contrast:d};let f=t,p=n;l!==void 0&&(l-t)*(n-l)>0&&(G(i,e(l),r,c)>=a?p=l:f=l);for(let t=0;t<s&&!(Math.abs(p-f)<o);t++){let t=(f+p)/2;G(i,e(t),r,c)>=a?p=t:f=t}return{pos:p,contrast:G(i,e(p),r,c)}}function Qt(e,t,n){let r=n?(e+.05)/t-.05:t*(e+.05)-.05;return Math.max(0,Math.min(1,Ge(Math.max(0,Math.min(1,r)),He)/100))}function $t(e){let{lum:t,yBase:n,metric:r,target:i,searchTarget:a,lo:o,hi:s,searchAnchor:c,preferred:l,epsilon:u,resolution:d,maxIterations:f,flip:p,preferInitial:m,initialIsLower:h,polarity:g}=e,_=B(l,o,s),v=(e,c)=>{let l=Zt(t,_,e?o:s,n,r,a,u,f,g,c);return{...l,met:l.contrast>=i,lower:e}},y=v(h,c);if(!p||!(h?l<s:l>o))return y;let b={...v(!h),flipped:!0};return y.met&&b.met?m||Math.abs(y.pos-l)<=Math.abs(b.pos-l)+2*d?y:b:b.met&&!y.met?b:y}function en(e){let{hue:t,saturation:n,preferredTone:r,baseLinearRgb:i,contrast:a,toneRange:o=[0,1],epsilon:s=1e-4,maxIterations:c=18,pastel:l=!1}=e,{metric:u,target:d,polarity:f}=a,p=u===`wcag`?d*1.01:d+.5,m=Et(u,i),h=e=>Yt(u,t,n,e,l),g=G(u,h(r),m,f);if(g>=p)return{tone:r,contrast:g,met:!0,branch:`preferred`};let[_,v]=o,y=r>_,b=r<v,x;if(e.initialDirection!==void 0)x=e.initialDirection===`darker`;else if(y&&!b)x=!0;else if(!y&&b)x=!1;else if(!y&&!b)return{tone:r,contrast:g,met:g>=d,branch:`preferred`};else x=Xt(G(u,h(_),m,f),G(u,h(v),m,f));let S=$t({lum:h,yBase:m,metric:u,target:d,searchTarget:p,lo:_,hi:v,searchAnchor:u===`wcag`?Qt(m,d,x):void 0,preferred:r,epsilon:s,resolution:Math.max(s,1/Jt),maxIterations:c,flip:e.flip??!1,preferInitial:e.preferInitial??!1,initialIsLower:x,polarity:f});return(S.met?S.pos===r:g>=d)?{tone:r,contrast:g,met:!0,branch:`preferred`}:{tone:S.pos,contrast:S.contrast,met:S.met,branch:S.lower?`darker`:`lighter`,...S.flipped?{flipped:!0}:{}}}function tn(e){let{preferredValue:t,baseLinearRgb:n,contrast:r,luminanceAtValue:i,epsilon:a=1e-4,maxIterations:o=20}=e,{metric:s,target:c,polarity:l}=r,u=s===`wcag`?c*1.01:c+.5,d=Et(s,n),f=G(s,i(t),d,l);if(f>=u)return{value:t,contrast:f,met:!0};let p=t>0,m=t<1,h;if(p&&!m)h=!0;else if(!p&&m)h=!1;else if(!p&&!m)return{value:t,contrast:f,met:f>=c};else h=Xt(G(s,i(0),d,l),G(s,i(1),d,l));let g=$t({lum:i,yBase:d,metric:s,target:c,searchTarget:u,lo:0,hi:1,preferred:t,epsilon:a,resolution:a,maxIterations:o,flip:e.flip??!1,preferInitial:!1,initialIsLower:h,polarity:l});return!g.met&&f>=c?{value:t,contrast:f,met:!0}:{value:g.pos,contrast:g.contrast,met:g.met,...g.flipped?{flipped:!0}:{}}}const nn=/* @__PURE__ */ new Set;function rn(e,t){return e&&t?`darkContrast`:e?`dark`:t?`lightContrast`:`light`}function an(e){return e.metric===`apca`?`APCA Lc ${e.target.toFixed(1)}`:`WCAG ${e.target.toFixed(2)}`}function on(e){return nn.has(e)?!0:(nn.size>=256&&nn.clear(),nn.add(e),!1)}function sn(e,t){return!(t>=(e.metric===`apca`?e.target-1.5:e.target*.98))}function cn(e,t,n,r,i){return`${e}|${t}|${n}|${r.metric}|${r.target.toFixed(2)}|${i.toFixed(2)}`}function ln(e,t,n,r,i){if(!sn(r,i))return;let a=rn(t,n);on(cn(`unmet`,e,a,r,i))||console.warn(`glaze: color "${e}" cannot meet ${an(r)} in ${a} scheme (got ${i.toFixed(2)}). Try widening the tone window, lowering the contrast target, or picking a base color further from this color's tone.`)}function un(e,t,n,r,i,a=!1){if(!sn(r,i))return;let o=rn(t,n);on(cn(`unmet-mix`,e,o,r,i))||console.warn(`glaze: mix "${e}" cannot meet ${an(r)} against its base in ${o} scheme (got ${i.toFixed(2)}). `+(a?"Even the pure target falls short once the mix's pastel gamut caps its saturation; try `pastel: false` on the mix, lowering the contrast target, or mixing toward a color further from the base.":`Even the pure target falls short; try lowering the contrast target or mixing toward a color further from the base.`))}function dn(e,t,n,r,i,a){let o=r.metric===`apca`?Math.abs(r.polarity===`bg`?Gt(a,i):Gt(i,a)):ae(i,a);if(!sn(r,o))return;let s=rn(t,n);on(cn(`drift`,e,s,r,o))||console.warn(`glaze: color "${e}" drifts below ${an(r)} in ${s} scheme (measured ${o.toFixed(2)}). Chromatic luminance differs from the gray tone; nudge the tone or saturation if the floor matters.`)}function fn(e,t){return t<e-.05}function pn(e){return fn(e.step,e.hdr?.reached??e.reached)}function mn(e,t,n,r,i){if(!fn(r,i))return;let a=n?rn(n.isDark,n.isHighContrast):void 0;if(on(`lighting|${e}|${t??``}|${a??``}|${r.toFixed(2)}|${i.toFixed(2)}`))return;let o=t===void 0?`glaze.${e}()`:`${e} "${t}"`,s=a===void 0?``:` in ${a} scheme`,c=e===`shadow`?`black`:`white`;console.warn(`glaze: ${o} cannot reach a ${r.toFixed(1)}-tone step${s} (reached ${i.toFixed(1)} at full strength). Lower the intensity, move the surface away from ${c}, or raise a tuned-down \`reach\`.`)}function hn(e){let t=Number(e.toPrecision(3));return`${t} stop${t===1?``:`s`}`}function gn(e,t,n,r,i){if(!fn(n,r))return;let a=t?rn(t.isDark,t.isHighContrast):void 0;if(on(`hdr|${e??``}|${a??``}|${n.toFixed(2)}|${r.toFixed(2)}|${i}`))return;let o=e===void 0?`glaze.glow()`:`glow "${e}"`,s=a===void 0?``:` in ${a} scheme`,c=i>=2?"Lower the intensity; `headroom` is already at its 2-stop maximum.":"Lower the intensity or raise `headroom`.";console.warn(`glaze: ${o} cannot reach a ${n.toFixed(1)}-tone step${s} even with ${hn(i)} of headroom (reached ${r.toFixed(1)}). ${c}`)}function _n(e,t,n,r,i){r.hdr?gn(t,n,r.step,r.hdr.reached,i):mn(e,t,n,r.step,r.reached)}function vn(e){for(let t of e)t()}function yn(e,t){on(`headroom|${e}|${t}`)||console.warn(`glaze: ${e}.headroom ${t} is above the 2-stop maximum; using 2. Headroom counts stops (doublings of SDR white's luminance), not a ratio: 1 stop is 2× white, 2 stops 4×.`)}function bn(){return{lightTone:{lo:10,hi:100,eps:.05},darkTone:{lo:15,hi:95,eps:.05},darkDesaturation:.1,states:{dark:`@media(prefers-color-scheme: dark)`,highContrast:`@media(prefers-contrast: more)`,hdr:`@media(dynamic-range: high)`},modes:{dark:!0,highContrast:!1,hdr:!1},autoFlip:!0,pastel:!1,inferRole:!0,contrastLevel:`auto`}}function xn(e,t){return e===void 0?t:e}function Sn(e){if(e===void 0||e===`auto`)return`auto`;if(typeof e!=`number`||!Number.isFinite(e))throw Error(`glaze: contrastLevel must be a finite number 0–100 or 'auto' (got ${V(e)}).`);return Math.max(0,Math.min(100,e))}function Cn(e){if(typeof e!=`number`||!Number.isFinite(e))throw Error(`glaze: darkDesaturation must be a finite number 0–1 (got ${V(e)}).`);return Math.max(0,Math.min(1,e))}function wn(e,t){if(e===!1)return!1;let{lo:n,hi:r,eps:i}=Ze(e,t);return Array.isArray(e)?[n,r]:{lo:n,hi:r,eps:i}}function Tn(e,t,n){if(typeof e!=`number`||!Number.isFinite(e)||e<0)throw Error(`glaze: ${t}.headroom must be a finite number ≥ 0 — stops above SDR white (got ${V(e)}).`);if(e>2){let r=()=>yn(t,e);return n?n.push(r):r(),2}return e}function En(e,t,n,r){if(t===void 0)return;let i={...t};for(let e of[`objectInfluence`,`tint`,`reach`,`hueBleed`]){let t=i[e];if(t!==void 0&&(typeof t!=`number`||!Number.isFinite(t)))throw Error(`glaze: ${n}.${e} must be a finite number (got ${V(t)}).`)}let a=t?.headroom;if(a===void 0)return i;if(e===`shadow`)throw Error(`glaze: ${n}.headroom is not supported — a shadow darkens toward black, and nothing goes below black. Headroom is for glows (glowTuning or a glow's tuning).`);return i.headroom=Tn(a,n,r),i}function Dn(e){let t=e=>e===!1?!1:Array.isArray(e)?[e[0],e[1]]:{...e},n={...e,lightTone:t(e.lightTone),darkTone:t(e.darkTone),states:{...e.states},modes:{...e.modes}};return e.shadowTuning&&(n.shadowTuning={...e.shadowTuning}),e.glowTuning&&(n.glowTuning={...e.glowTuning}),n}function On(e){if(Array.isArray(e))return[...e];if(typeof e==`object`&&e){let{lo:t,hi:n,eps:r}=e;return{lo:t,hi:n,eps:r}}return e}function kn(e){return typeof e==`object`&&e?{...e}:e}const An=e=>e,jn={lightTone:On,darkTone:On,darkDesaturation:An,autoFlip:An,contrastLevel:An,pastel:An,inferRole:An,shadowTuning:kn,glowTuning:kn};function Mn(e){if(e===null)return;if(typeof e!=`object`)return e;let t=e,n={};for(let[e,r]of Object.entries(jn))e in t&&(n[e]=r(t[e]));return n}let K=bn(),Nn=0;function Pn(){return K}function Fn(){return Nn}function In(){return structuredClone(K)}function Ln(e){let t=[],n={lightTone:wn(e.lightTone===void 0?K.lightTone:e.lightTone,`lightTone`),darkTone:wn(e.darkTone===void 0?K.darkTone:e.darkTone,`darkTone`),darkDesaturation:Cn(xn(e.darkDesaturation,K.darkDesaturation)),states:{dark:e.states?.dark??K.states.dark,highContrast:e.states?.highContrast??K.states.highContrast,hdr:e.states?.hdr??K.states.hdr},modes:{dark:e.modes?.dark??K.modes.dark,highContrast:e.modes?.highContrast??K.modes.highContrast,hdr:e.modes?.hdr??K.modes.hdr},shadowTuning:En(`shadow`,e.shadowTuning??K.shadowTuning,`shadowTuning`),glowTuning:En(`glow`,e.glowTuning??K.glowTuning,`glowTuning`,t),autoFlip:e.autoFlip??K.autoFlip,pastel:!1,inferRole:e.inferRole??K.inferRole,contrastLevel:Sn(xn(e.contrastLevel,K.contrastLevel))};vn(t),Nn++,K=n}function Rn(){Nn++,K=bn()}function zn(e,t={}){let n=[],r={lightTone:wn(t.lightTone===void 0?e.lightTone:t.lightTone,`lightTone`),darkTone:wn(t.darkTone===void 0?e.darkTone:t.darkTone,`darkTone`),darkDesaturation:Cn(xn(t.darkDesaturation,e.darkDesaturation)),states:{...e.states},modes:{...e.modes},shadowTuning:En(`shadow`,t.shadowTuning??e.shadowTuning,`shadowTuning`),glowTuning:En(`glow`,t.glowTuning??e.glowTuning,`glowTuning`,n),autoFlip:t.autoFlip??e.autoFlip,pastel:t.pastel??!1,inferRole:t.inferRole??e.inferRole,contrastLevel:Sn(xn(t.contrastLevel,e.contrastLevel))};return vn(n),r}function Bn(e,t){let n=zn(Pn(),{...e,...Mn(t)}),r={lightTone:n.lightTone,darkTone:n.darkTone,darkDesaturation:n.darkDesaturation,autoFlip:n.autoFlip,pastel:n.pastel,inferRole:n.inferRole};n.shadowTuning!==void 0&&(r.shadowTuning=n.shadowTuning),n.glowTuning!==void 0&&(r.glowTuning=n.glowTuning);let i=t?.contrastLevel??e?.contrastLevel;return i!==void 0&&(r.contrastLevel=Sn(i)),structuredClone(r)}function Vn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Hn(e,t){if(e.version!==void 0){if(typeof e.version!=`number`||!Number.isInteger(e.version)||e.version<1)throw Error(`${t}: invalid "version" field — expected an integer >= 1 (got ${JSON.stringify(e.version)}).`);if(e.version>2)throw Error(`${t}: unsupported export version ${e.version} (this library supports version 2). Upgrade @tenphi/glaze to load this snapshot.`)}}function Un(e,t,n){if((e.version??n)!==1)return;let r=Vn(e.colors)?e.colors:{},i=Object.keys(r).filter(e=>Vn(r[e])&&r[e].type===`shadow`),a=Vn(e.config)&&e.config.shadowTuning!==void 0;if(i.length===0&&!a)return;let o=i.length>0?`shadow colors (${i.map(e=>JSON.stringify(e)).join(`, `)})`:`a "shadowTuning" config`;throw Error(`${t}: this snapshot is export version 1 (Glaze 1.1–2) and contains ${o}. Glaze 3 changed what shadow "intensity", "fg" and tuning mean, so it would restore with different shadows. Re-author them as described in "3.0 — shadows and glows" of the migration guide (https://glaze.tenphi.me/migration/#30--shadows-and-glows) and export again.`)}function Wn(e,t,n){if(e.kind!==void 0&&e.kind!==t)throw Error(`${n}: expected kind "${t}", got ${JSON.stringify(e.kind)}.`)}function Gn(e){return typeof e.hue==`number`&&typeof e.saturation==`number`&&!(`form`in e)&&!(`themes`in e)}function Kn(e){return e.form===`value`||e.form===`structured`}function qn(e){return Vn(e.themes)&&!(`form`in e)&&typeof e.hue!=`number`}function Jn(e){return Vn(e)?(e.kind===`theme`||e.kind===void 0)&&Gn(e):!1}function Yn(e){return Vn(e)?(e.kind===`color`||e.kind===void 0)&&Kn(e):!1}function Xn(e){return Vn(e)?(e.kind===`palette`||e.kind===void 0)&&qn(e):!1}const Zn=[`light`,`dark`];function Qn(e){return parseFloat(e.toFixed(2)).toString()}function $n(e,t){if(e&&t!==`oklch`)throw Error(`glaze: splitHue requires format 'oklch' (got '${t}'). Use format: 'oklch' or drop splitHue.`)}function er(e,t,n){return`--${e}${t}${n}`}function tr(e){return e.s<=1e-6}function nr(e,t){return t===`dark`?e.darkSeedHue??e.seedHue:e.seedHue}function rr(e,t,n,r,i){if(t===void 0||W(t)||lt(t)||tr(n))return{hueVar:``,inline:!0,declarations:[]};let a=t,o=`var(--${r.baseName}-hue)`,s=er(r.prefix,e,`-hue`),c=(a.mode??`auto`)===`static`;if(c&&nr(r,`dark`)!==r.seedHue)return{hueVar:`var(${s})`,inline:!1,declarations:[{prop:s,value:Qn(n.h)}]};let l=c?void 0:a.darkHue;if(a.hue===void 0&&l===void 0&&a.from===void 0)return{hueVar:o,inline:!1,declarations:[]};let u=i===`dark`?l??a.hue:a.hue;if(u===void 0)return a.from===void 0?{hueVar:`var(${s})`,inline:!1,declarations:[{prop:s,value:o}]}:{hueVar:`var(${s})`,inline:!1,declarations:[{prop:s,value:Qn(n.h)}]};let d=Le(u);if(d.relative){let e=d.value>=0?`+`:`-`,t=Qn(Math.abs(d.value)),n=`calc(var(--${r.baseName}-hue) ${e} ${t})`;return{hueVar:`var(${s})`,inline:!1,declarations:[{prop:s,value:n}]}}let f=(d.value%360+360)%360;return{hueVar:`var(${s})`,inline:!1,declarations:[{prop:s,value:Qn(f)}]}}function ir(e,t,n,r){if(tr(t))return{hueVar:``,inline:!0,declarations:[]};let i=r===`dark`?t.h:n.resolvedHue??t.h,a=er(n.prefix,e,`-hue`);return{hueVar:`var(${a})`,inline:!1,declarations:[{prop:a,value:Qn(i)}]}}function ar(e,t,n,r,i=`light`){return r.mode===`standalone`?ir(e,n,r,i):rr(e,t,n,r,i)}function or(e,t,n,r){let i=n.defs[e],a=ar(e,i,t.light,n);if(!a.inline)return r===`light`?a:ar(e,i,t.dark,n,r)}function sr(e,t,n){if(t.emitDeclarations===!1)return[];let r=/* @__PURE__ */ new Set,i=[],a=e=>{r.has(e.prop)||(r.add(e.prop),i.push(e))};t.mode===`theme`&&a({prop:`--${t.baseName}-hue`,value:Qn(nr(t,n))});for(let[r,i]of e){let e=or(r,i,t,n);for(let t of e?.declarations??[])a(t)}return i}function cr(e,t){let n=sr(e,t,`light`),r=sr(e,t,`dark`);return{light:n,dark:r.length===n.length&&r.every((e,t)=>e.prop===n[t].prop&&e.value===n[t].value)?[]:r}}function lr(e,t){let n=/* @__PURE__ */ new Map;for(let[r,i]of e)n.set(r,ar(r,t.defs[r],i.light,t));return n}function ur(e,t,n,r){let i=e.get(t);if(i===void 0){e.set(t,n);return}if(i.label===n.label)return;let a=i.value||n.value?r.valueFix:r.fix;throw Error(`glaze: splitHue would declare "${t}" twice: for ${i.label} and for ${n.label}. One would silently override the other. ${a}`)}function dr(e,t,n,r){if(t.emitDeclarations!==!1){if(t.mode===`theme`){let e={label:r.theme,value:!1};ur(n,`--${t.baseName}-hue`,e,r)}for(let[i,a]of e){let e={label:r.color(i),value:!1};for(let o of Zn){let s=or(i,a,t,o);for(let t of s?.declarations??[])ur(n,t.prop,e,r)}}}}function fr(e,t,n,r,i){for(let a of e.keys()){let e={label:i.value(a),value:!0};ur(r,er(t,a,n),e,i)}}const pr=/^(rgba?|hsla?|okhsl|okhst|oklch)\(\s*([^)]*)\s*\)$/i,mr=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)([a-z%]*)$/i,hr={"":1,deg:1,turn:360,rad:180/Math.PI,grad:.9};function gr(e,t,n){if(e.toLowerCase()===`none`)return 0;let r=mr.exec(e),i=r?n[r[2].toLowerCase()]:void 0,a=r?parseFloat(r[1])*(i??NaN):NaN;if(!Number.isFinite(a))throw Error(`glaze: invalid component "${e}" in "${t}".`);return a}function q(e,t,n){return gr(e,n,{"":1,"%":t/100})}function _r(e,t){return gr(e,t,hr)}const J=e=>Math.min(1,Math.max(0,e));function vr(e){let t=e.indexOf(`/`);if(t!==-1)return{components:e.slice(0,t).trim().split(/[\s,]+/).filter(Boolean),hadAlpha:e.slice(t+1).trim().length>0};let n=e.split(/[\s,]+/).filter(Boolean);return n.length===4?(n.pop(),{components:n,hadAlpha:!0}):{components:n,hadAlpha:!1}}const yr=/* @__PURE__ */ new Set;function br(e){yr.has(e)||(yr.size>=256&&yr.clear(),yr.add(e),console.warn(`glaze: alpha component dropped from "${e}"; use the color's \`opacity\` (or a transparent mix) for translucency.`))}function xr(e){if(e.startsWith(`#`)){let t=_e(e);if(!t)throw Error(`glaze: invalid hex color "${e}".`);t.alpha!==void 0&&br(e);let[n,r,i]=pe(t.rgb);return{h:n,s:r,l:i}}let t=e.match(pr);if(!t)throw Error(`glaze: unsupported color string "${e}".`);let n=t[1].toLowerCase(),{components:r,hadAlpha:i}=vr(t[2].trim());if(i&&br(e),r.length!==3)throw Error(`glaze: expected 3 components in "${e}".`);let[a,o,s]=r;switch(n){case`rgb`:case`rgba`:{let[t,n,r]=pe([J(q(a,255,e)/255),J(q(o,255,e)/255),J(q(s,255,e)/255)]);return{h:t,s:n,l:r}}case`hsl`:case`hsla`:{let[t,n,r]=pe(me(_r(a,e),J(q(o,1,e)),J(q(s,1,e))));return{h:t,s:n,l:r}}case`okhsl`:return{h:_r(a,e),s:J(q(o,1,e)),l:J(q(s,1,e))};case`okhst`:return Je({h:_r(a,e),s:J(q(o,1,e)),t:J(q(s,1,e))});case`oklch`:{let t=J(q(a,1,e)),n=Math.max(0,q(o,.4,e)),r=_r(s,e)*Math.PI/180,[i,c,l]=fe([t,n*Math.cos(r),n*Math.sin(r)]);return{h:i,s:c,l}}}throw Error(`glaze: unsupported color function "${n}".`)}function Sr(e){let{h:t,s:n,l:r}=e;if(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r))throw Error(`glaze.color: OkhslColor h/s/l must be finite numbers.`);if(Cr(`OkhslColor`,{s:n,l:r}),n>1.5||r>1.5)throw Error(`glaze.color: OkhslColor s/l must be in 0–1 range. Did you mean the structured form { hue, saturation, tone } (which uses 0–100)?`)}function Cr(e,t){for(let[n,r]of Object.entries(t))if(r<0)throw Error(`glaze.color: ${e} ${n} must be 0 or more (got ${r}).`)}function wr(e){for(let t of[`r`,`g`,`b`]){let n=e[t];if(!Number.isFinite(n)||n<0||n>255)throw Error(`glaze.color: RgbColor ${t} must be a finite number in 0–255 (got ${n}).`)}}function Tr(e){let{l:t,c:n,h:r}=e;if(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r))throw Error(`glaze.color: OklchColor l/c/h must be finite numbers.`);if(Cr(`OklchColor`,{l:t,c:n}),t>1.5||n>1.5)throw Error(`glaze.color: OklchColor l/c must be in 0–1 range (matching oklch() strings).`)}function Er(e,t,n){let r=n*Math.PI/180,[i,a,o]=fe([e,t*Math.cos(r),t*Math.sin(r)]);return{h:i,s:a,l:o}}function Dr(e){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t=e;return Or(e)?{r:t.r,g:t.g,b:t.b}:kr(e)?{l:t.l,c:t.c,h:t.h}:Ar(e)?{h:t.h,s:t.s,t:t.t}:{h:t.h,s:t.s,l:t.l}}function Or(e){return`r`in e&&`g`in e&&`b`in e}function kr(e){return`c`in e&&`l`in e&&`h`in e}function Ar(e){return`t`in e&&`h`in e&&`s`in e}function jr(e){let{h:t,s:n,t:r}=e;if(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r))throw Error(`glaze.color: OkhstColor h/s/t must be finite numbers.`);if(Cr(`OkhstColor`,{s:n,t:r}),n>1.5||r>1.5)throw Error(`glaze.color: OkhstColor s/t must be in 0–1 range. Did you mean the structured form { hue, saturation, tone } (which uses 0–100)?`)}function Mr(e){if(typeof e==`string`)return xr(e);if(Array.isArray(e))throw Error(`glaze.color: RGB tuple [r, g, b] is no longer supported — use { r, g, b } instead.`);if(Or(e)){wr(e);let[t,n,r]=pe([e.r/255,e.g/255,e.b/255]);return{h:t,s:n,l:r}}return kr(e)?(Tr(e),Er(J(e.l),e.c,e.h)):Ar(e)?(jr(e),Je({h:e.h,s:J(e.s),t:J(e.t)})):(Sr(e),{h:e.h,s:J(e.s),l:J(e.l)})}const Nr=/* @__PURE__ */ new Set([`okhsl`,`okhst`]);function Y(e,t){if(e!==void 0&&Nr.has(e))throw Error(`glaze: ${e} output is only supported by tasty() (not a native CSS color space). Use tasty({ format: '${e}' }) or pick a native format (oklch|hsl|rgb) for ${t}().`)}const Pr=[{field:`light`,modes:()=>!0},{field:`dark`,modes:e=>e.dark},{field:`lightContrast`,modes:e=>e.highContrast},{field:`darkContrast`,modes:e=>e.dark&&e.highContrast}];function Fr(e,t){let n=[];for(let[r,i]of e)for(let{field:e,modes:a}of Pr)if(a(t)&&i[e].pastel!==!0){n.includes(r)||n.push(r);break}if(n.length!==0)throw Error(`glaze: splitHue requires every color to be pastel (hue rotation is only clip-free when chroma is bounded by the hue-independent safe chroma). Non-pastel: ${n.join(`, `)}. Set pastel: true (per-theme, per-token, or per-color) or drop splitHue.`)}const Ir=/* @__PURE__ */ new Set([`surface`,`bg`,`background`,`fill`,`canvas`,`paper`,`layer`]),Lr=/* @__PURE__ */ new Set([`text`,`fg`,`foreground`,`content`,`ink`,`label`,`stroke`]),Rr=/* @__PURE__ */ new Set([`border`,`divider`,`outline`,`separator`,`hairline`,`rule`]),zr={surface:`surface`,bg:`surface`,background:`surface`,fill:`surface`,canvas:`surface`,paper:`surface`,layer:`surface`,text:`text`,fg:`text`,foreground:`text`,content:`text`,ink:`text`,label:`text`,stroke:`text`,border:`border`,divider:`border`,outline:`border`,separator:`border`,hairline:`border`,rule:`border`};function Br(e){if(e!==void 0)return zr[e]}function Vr(e){let t=e.split(/[^0-9a-zA-Z]+/).filter(Boolean),n=[];for(let e of t){let t=e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/\s+/).filter(Boolean);for(let e of t)n.push(e.toLowerCase())}return n}function Hr(e){let t=Vr(e),n;for(let e of t)Ir.has(e)?n=`surface`:Lr.has(e)?n=`text`:Rr.has(e)&&(n=`border`);return n}function Ur(e){return e===`surface`?`bg`:`fg`}function Wr(e){return e===`surface`?`text`:`surface`}function Gr(e){return e.tone===void 0?e.from!==void 0:Ve(e.tone)}function Kr(e){return e===void 0?!1:!Ve(Oe(e))||!Ve(ke(e))}const qr=e=>typeof e==`number`&&Number.isFinite(e)||Mt(e),Jr=e=>typeof e==`number`&&Number.isFinite(e)||Nt(e);function Yr(e,t){return Array.isArray(e)?e.length===2&&t(e[0])&&t(e[1]):t(e)}function Xr(e){if(qr(e))return!0;if(typeof e!=`object`||!e||Array.isArray(e))return!1;let{wcag:t,apca:n}=e;return t===void 0==(n===void 0)?!1:t===void 0?Yr(n,Jr):Yr(t,qr)}const Zr=/^[+-](?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,Qr=e=>typeof e==`number`&&Number.isFinite(e),$r=e=>typeof e==`string`&&Zr.test(e.trim())&&Number.isFinite(parseFloat(e)),ei=e=>Qr(e)||e===`max`||e===`min`||$r(e),ti=e=>Qr(e)||$r(e),ni=e=>Qr(e)&&e>=0&&e<=1;function ri(e,t,n,r){if(!(n===void 0||r(n)))throw Error(`glaze: color "${e}" has an invalid "${t}" ${V(n)}.`)}function ii(e,t){if(!(t===void 0||Yr(t,Xr)))throw Error(`glaze: color "${e}" has an invalid "contrast" ${V(t)}. Use a WCAG ratio or 'AA' / 'AAA' / 'AA-large' / 'AAA-large', { wcag: … }, { apca: … }, or a [normal, highContrast] pair of these.`)}function ai(e,t){if(t===void 0||!Array.isArray(t))return;let n=Lt(Oe(t)),r=Lt(ke(t));if(n!==r)throw Error(`glaze: color "${e}" has a "contrast" pair that switches metric (${n} → ${r}). A WCAG ratio and an APCA Lc are different scales; use one metric for both entries, e.g. { ${n}: [normal, highContrast] }.`)}function oi(e,t){let n=Object.hasOwn(e,t)?e[t]:void 0;return n!==void 0&&W(n)?n.type:void 0}function si(e,t){let n=new Set(Object.keys(e)),r=/* @__PURE__ */ new Set([...n,...t?t.keys():[]]),i=[];for(let[t,n]of Object.entries(e)){if(W(n)){let a=n.type;for(let i of[`bg`,`fg`]){let o=n[i];if(o===void 0){if(i===`fg`)continue;throw Error(`glaze: ${a} "${t}" is missing "bg".`)}if(!r.has(o))throw Error(`glaze: ${a} "${t}" references non-existent ${i} "${o}".`);let s=oi(e,o);if(s!==void 0)throw Error(`glaze: ${a} "${t}" ${i} "${o}" references a ${s} color.`)}ri(t,`intensity`,n.intensity,e=>Yr(e,Qr)),En(a,n.tuning,`${a} "${t}" tuning`,i);continue}if(lt(n)){if(!r.has(n.base))throw Error(`glaze: mix "${t}" references non-existent base "${n.base}".`);if(!r.has(n.target))throw Error(`glaze: mix "${t}" references non-existent target "${n.target}".`);for(let r of[`base`,`target`]){let i=n[r],a=oi(e,i);if(a!==void 0)throw Error(`glaze: mix "${t}" ${r} "${i}" references a ${a} color.`)}ri(t,`value`,n.value,e=>Yr(e,Qr)),ii(t,n.contrast),ai(t,n.contrast);continue}let a=n;if(ri(t,`tone`,a.tone,e=>Yr(e,ei)),ri(t,`hue`,a.hue,ti),ri(t,`darkHue`,a.darkHue,ti),ri(t,`saturation`,a.saturation,Qr),ri(t,`darkSaturation`,a.darkSaturation,Qr),ri(t,`opacity`,a.opacity,ni),ii(t,a.contrast),ai(t,a.contrast),a.from!==void 0)try{Mr(a.from)}catch(e){throw Error(`glaze: color "${t}" has an invalid "from" value. ${e instanceof Error?e.message:String(e)}`,{cause:e})}if(a.contrast!==void 0&&!a.base)throw Error(`glaze: color "${t}" has "contrast" without "base".`);if(Kr(a.tone)&&!a.base)throw Error(`glaze: color "${t}" has relative "tone" without "base".`);if(a.base&&!r.has(a.base))throw Error(`glaze: color "${t}" references non-existent base "${a.base}".`);let o=a.base&&oi(e,a.base);if(o)throw Error(`glaze: color "${t}" base "${a.base}" references a ${o} color.`);if(!Gr(a)&&a.base===void 0)throw Error(`glaze: color "${t}" must have either absolute "tone" (root), "from" (a literal color), or "base" (dependent).`);a.contrast!==void 0&&a.opacity!==void 0&&console.warn(`glaze: color "${t}" has both "contrast" and "opacity". Opacity makes perceived tone unpredictable.`)}let a=/* @__PURE__ */ new Set,o=/* @__PURE__ */ new Set;function s(t){if(!n.has(t))return;if(o.has(t))throw Error(`glaze: circular base reference detected involving "${t}".`);if(a.has(t))return;o.add(t);let r=e[t];if(W(r))s(r.bg),r.fg&&s(r.fg);else if(lt(r))s(r.base),s(r.target);else{let e=r;e.base&&s(e.base)}o.delete(t),a.add(t)}for(let e of n)s(e);vn(i)}function ci(e){let t=[],n=/* @__PURE__ */ new Set;function r(i){if(n.has(i))return;n.add(i);let a=e[i];if(a!==void 0){if(W(a))r(a.bg),a.fg&&r(a.fg);else if(lt(a))r(a.base),r(a.target);else{let e=a;e.base&&r(e.base)}t.push(i)}}for(let t of Object.keys(e))r(t);return t}const li=/* @__PURE__ */ new WeakSet;function ui(e){return li.add(e),e}function di(e){if(e===void 0||lt(e)||W(e))return;let t=e;if((t.mode??`auto`)===`auto`&&t.contrast===void 0&&t.tone===void 0&&t.from===void 0)return t.base}function X(e,t,n){return t&&n?e.darkContrast:t?e.dark:n?e.lightContrast:e.light}function fi(e){let t=Xe(e);return{h:t.h,s:t.s,l:t.l,alpha:e.alpha,pastel:e.pastel}}function pi(e){let t=Ye({h:e.h,s:e.s,l:e.l});return{h:t.h,s:t.s,t:t.t,alpha:e.alpha}}function mi(e,t,n,r){if(!e)return;let i=t[e];return i?Wr(hi(e,i,t,n,r)):`text`}function hi(e,t,n,r,i){let a=i.get(e);if(a)return a;let o;if(W(t))o=`surface`;else if(lt(t))o=Br(t.role)??(r?Hr(e):void 0)??mi(t.base,n,r,i)??`text`;else{let a=t;o=Br(a.role)??(r?Hr(e):void 0)??mi(a.base,n,r,i)??`text`}let s=o??`text`;return i.set(e,s),s}function gi(e,t,n){return hi(e,t,n.defs,n.config.inferRole,n.roles)}function _i(e,t,n,r){if(!t&&H(n)!==void 0)return zt(e,n.contrastLevel,r);let i=Array.isArray(e);return Rt(t?ke(e):Oe(e),t,r,i)}function vi(e,t,n){let r=H(n);return r===void 0||t?Re(t?ke(e):Oe(e)):ze(e,r)}function yi(e,t,n){let r=H(n);return r===void 0||t?t?ke(e):Oe(e):Fe(e,r)}function bi(e,t,n){if(!n)return e;let r=t+e;if(r>=0&&r<=100)return e;let i=t-e;return i>=0&&i<=100?-e:e}function xi(e,t,n,r,i){let a=et(e,t,!1,n,i),o=X(r,!1,n),s=X(r,!0,n),c=a-o.t*100;return B(s.t*100+(t===`auto`?-c:c),0,100)}function Si(e){if(e.from===void 0)return;let{h:t,s:n,l:r}=Mr(e.from);return{hue:t,saturation:n,tone:U(r)}}function Ci(e,t){return e.from===void 0?t:{...t,lightTone:!1}}function wi(e,t,n){return e.tone===void 0?B(Si(e).tone,0,100):B(vi(e.tone,t,n).value,0,100)}function Ti(e,t,n){let r=e.mode??`auto`,i=B(e.saturation??1,0,1),a=Si(e),o=a!==void 0&&e.hue===void 0?a.hue:void 0,s=a!==void 0&&e.saturation===void 0?a.saturation:void 0;if(!n||r===`static`)return{hue:o??Be(t.hue,e.hue),saturation:s??B(i*t.saturation/100,0,1)};let c=t.darkSaturation??t.saturation,l=B(e.darkSaturation??i,0,1),u=s!==void 0&&e.darkSaturation===void 0,d=u?s:l*c/100,f=u?!1:e.darkSaturation!==void 0||t.darkSaturation!==void 0;return{hue:o!==void 0&&e.darkHue===void 0?o:Be(t.darkHue??t.hue,e.darkHue??e.hue),saturation:B(f?d:at(d,r,t.config),0,1)}}function Ei(e,t){return Ze(t.lightTone).eps===.05?e||Pe(t):!1}function Di(e,t){return B(e+t,Math.min(0,e),Math.max(100,e))}function Oi(e,t,n){let r=t.anchors[+!!n],i=r.get(e);if(i)return i;if(di(t.defs[e])!==void 0){let i=[],a=e;for(let e=di(t.defs[a]);e!==void 0&&!r.has(a);e=di(t.defs[a]))i.push(a),a=e;let o=Oi(a,t,n);for(let e=i.length-1;e>=0;e--)o=ki(i[e],o,t,n),r.set(i[e],o);return o}let a=t.resolved.get(e),o=e=>({tone:it(X(a,!0,n).t*100,`auto`,n,e),lightSide:!1}),s,c=t.defs[e];if(c===void 0){let r=t.externalAnchors?.get(e)?.(n);s=r===void 0||!nt(n,r.config,t.config)?o(t.config):{tone:r.tone,lightSide:!1}}else if(lt(c)||W(c))s=o(t.config);else{let e=c,r=e.mode??`auto`,i=Ci(e,t.config),a=e.tone??Si(e)?.tone,l=a===void 0?void 0:vi(a,n,i);if(r!==`auto`&&!li.has(e)||e.contrast!==void 0)s=o(i);else if(l===void 0)s=Oi(e.base,t,n);else if(l.kind===`relative`){let r=Oi(e.base,t,n),i=X(t.resolved.get(e.base),!1,n).t*100,a=e.autoFlip??t.config.autoFlip;s={tone:Di(r.tone,bi(l.value,i,a)),lightSide:r.lightSide}}else s=l.kind===`extreme`&&e.base!==void 0?o(i):{tone:B(l.value,0,100),lightSide:!0}}return s=ki(e,s,t,n),r.set(e,s),s}function ki(e,t,n,r){return!t.lightSide||!Ei(r,n.config)?t:{tone:X(n.resolved.get(e),!1,r).t*100,lightSide:!0}}function Ai(e,t,n){let r=new Map(n.externalBases);for(let[e,t]of n.resolved)r.set(e,t);return Oi(e,{defs:n.defs,config:n.config,resolved:r,anchors:[/* @__PURE__ */ new Map,/* @__PURE__ */ new Map],externalAnchors:n.externalAnchors},t).tone}function ji(e,t){if(!(Math.abs(e-t)<1e-9))return e<t?`darker`:`lighter`}function Mi(e,t,n,r,i,a,o,s){let c=t.base,l=n.resolved.get(c);if(!l)throw Error(`glaze: base "${c}" not yet resolved for "${e}".`);let u=t.mode??`auto`,d=t.autoFlip??n.config.autoFlip,f=s,p=Ci(t,n.config),m=X(l,i,r),h=m.t*100,g,_=!1,v=Si(t),y=t.tone??(v===void 0?void 0:v.tone);if(y===void 0)g=h;else{let e=vi(y,r,p);if(e.kind===`relative`){if(i&&u===`auto`){let t=X(l,!1,r).t*100,i=bi(e.value,t,d),a=Oi(c,n,r).tone;g=tt(Di(a,i),r,p)}else g=B(h+bi(e.value,h,d),0,100)}else _=e.kind===`extreme`,g=_&&i&&u!==`static`?xi(e.value,u,r,l,p):et(e.value,u,i,r,p)}let b=t.contrast;if(b!==void 0){let t=_i(b,r,p,o),s=fi(m),c=F(s.h,s.s,s.l,m.pastel??n.config.pastel),l=_?[0,1]:ot(i,u,r,p),v=ji(g,h),y={hue:a.hue,saturation:a.saturation,preferredTone:B(g/100,l[0],l[1]),baseLinearRgb:c,toneRange:[0,1],flip:d,pastel:f},x=r?void 0:H(p),S=!1;x!==void 0&&x>0&&x<1&&(v=ji(en({...y,contrast:zt(b,x<Me?0:100,o),initialDirection:v}).tone*100,h)??v,S=!0);let C=en({...y,contrast:t,initialDirection:v,preferInitial:S});return C.met||(n.unmet.add(Ki(e,i,r)),ln(e,i,r,t,C.contrast)),C.tone*100}return B(g,0,100)}function Ni(e,t,n,r,i){if(W(t))return Pi(e,t,n,r,i);if(lt(t))return Hi(e,t,n,r,i);let a=t,o=a.mode??`auto`,s=Gr(a)&&!a.base,c=Ti(a,n,r),l=Ur(gi(e,t,n)),u=a.pastel??n.config.pastel,d=Ci(a,n.config),f=s?et(wi(a,i,d),o,r,i,d):Mi(e,a,n,i,r,c,l,u);return{h:c.hue,s:c.saturation,t:B(f/100,0,1),alpha:a.opacity??1,pastel:u}}function Pi(e,t,n,r,i){let a=fi(X(n.resolved.get(t.bg),r,i)),o=t.fg?fi(X(n.resolved.get(t.fg),r,i)):void 0,s=yi(t.intensity,i,n.config),c=dt(t.tuning,t.type===`shadow`?n.config.shadowTuning:n.config.glowTuning),l=t.pastel??n.config.pastel,u=_t(t.type,{...a,pastel:a.pastel??n.config.pastel},o,s,c,l);Fi(i,n.config)?_n(t.type,e,{isDark:r,isHighContrast:i},u,c.headroom):pn(u)&&n.lightingShortfalls.push({name:e,kind:t.type,isDark:r,isHighContrast:i,result:u,headroom:c.headroom});let d={...pi({h:u.h,s:u.s,l:u.l,alpha:u.alpha}),pastel:l};return u.hdr&&(d.hdr=St(u.hdr)),d}function Fi(e,t){if(e)return!1;let n=H(t);return n===void 0||n===0}function Ii(e){let t=(e,t)=>t?e?`darkContrast`:`lightContrast`:e?`dark`:`light`,n=/* @__PURE__ */ new Map;for(let r of e){let e=n.get(r.name)??/* @__PURE__ */ new Set;e.add(t(r.isDark,r.isHighContrast)),n.set(r.name,e)}for(let r of e){let e=t(!r.isDark,r.isHighContrast);n.get(r.name).has(e)&&_n(r.kind,r.name,{isDark:r.isDark,isHighContrast:r.isHighContrast},r.result,r.headroom)}}function Li(e,t){return F(e.h,e.s,e.l,t)}const Ri=1e-6;function zi(e,t,n){let r=e.s>Ri,i=t.s>Ri;return r&&i?ft(e.h,t.h,n):i?t.h:e.h}function Bi(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n,e[2]+(t[2]-e[2])*n]}function Vi(e,t){let[n,r,i]=pe(oe(e),t);return{h:n,s:r,l:i,alpha:1,pastel:t}}function Hi(e,t,n,r,i){let a=n.resolved.get(t.base),o=n.resolved.get(t.target),s=fi(X(a,r,i)),c=fi(X(o,r,i)),l=B(yi(t.value,i,n.config),0,100)/100,u=t.blend??`opaque`,d=t.space??`okhsl`,f=Ur(gi(e,t,n)),p=t.pastel??n.config.pastel,m=s.pastel??n.config.pastel,h=c.pastel??n.config.pastel,g=Li(s,m),_=Li(c,h),v=(e,t)=>{if(t===p||e.s<=Ri)return e;let n=B(e.l,1e-4,.9999),r=fe(P(e.h,e.s,n,t),p)[1];return{...e,s:r,pastel:p}},y,b;if(u===`transparent`){let e=v(c,h),t=oe(g),n=oe(Li(e,p));y=t=>({...e,alpha:B(t,0,1)}),b=e=>se(t,n,e)}else if(d===`srgb`){let e=e=>Bi(g,_,e);y=t=>Vi(e(t),p),b=p?t=>{let n=y(t);return n.s<1?e(t):Li(n,!0)}:e}else{let e=v(s,m),t=v(c,h);y=n=>({h:zi(e,t,n),s:B(e.s+(t.s-e.s)*n,0,1),l:B(e.l+(t.l-e.l)*n,0,1),alpha:1}),b=e=>Li(y(e),p)}if(t.contrast!==void 0){let a=_i(t.contrast,i,n.config,f),o=a.metric,s=tn({preferredValue:l,baseLinearRgb:g,contrast:a,luminanceAtValue:e=>Et(o,b(e)),flip:n.config.autoFlip});l=s.value,s.met||un(e,r,i,a,s.contrast,p&&!h&&G(o,Et(o,_),Et(o,g),a.polarity)>=a.target)}return{...pi(y(l)),pastel:p}}function Ui(e){if(!(W(e)||lt(e)))return e.mode??`auto`}function Wi(e,t,n,r,i,a){let o=/* @__PURE__ */ new Map;for(let s of e){let e=Ni(s,t[s],n,r,i);o.set(s,e);let c=n.resolved.get(s);c?n.resolved.set(s,{...c,[a]:e}):n.resolved.set(s,{name:s,light:e,dark:e,lightContrast:e,darkContrast:e,mode:Ui(t[s])})}return o}function Gi(e,t,n,r){for(let i of e){let e=t.resolved.get(i);t.resolved.set(i,{...e,[n]:r.get(i)})}}function Ki(e,t,n){return`${e}|${t?`dark`:`light`}|${n?`hc`:``}`}function qi(e,t,n,r,i){let a=/* @__PURE__ */ new Map;for(let o of e){let e=t[o];if(W(e)||lt(e))continue;let s=e;if(s.contrast===void 0||!s.base)continue;let c=n.get(o),l=n.get(s.base);if(!c||!l)continue;let u=Ur(hi(o,e,t,r.inferRole,a)),d=[{isDark:!1,isHighContrast:!1,field:`light`},{isDark:!1,isHighContrast:!0,field:`lightContrast`},{isDark:!0,isHighContrast:!1,field:`dark`},{isDark:!0,isHighContrast:!0,field:`darkContrast`}],f=Pe(r);for(let e of d){if(f&&e.isHighContrast||i.has(Ki(o,e.isDark,e.isHighContrast)))continue;let t=c[e.field];if(t.s<=1e-6)continue;let n=_i(s.contrast,e.isHighContrast,r,u),a=l[e.field],d=fi(t),p=fi(a),m=t.pastel??r.pastel,h=a.pastel??r.pastel,g=Et(n.metric,F(d.h,d.s,d.l,m)),_=Et(n.metric,F(p.h,p.s,p.l,h));dn(o,e.isDark,e.isHighContrast,n,g,_)}}}function Ji(e,t,n,r,i){si(t,r);let a=ci(t),o={...e,defs:t,resolved:/* @__PURE__ */ new Map,config:n,roles:/* @__PURE__ */ new Map,unmet:/* @__PURE__ */ new Set,anchors:[/* @__PURE__ */ new Map,/* @__PURE__ */ new Map],externalAnchors:i,lightingShortfalls:[]};if(r)for(let[e,t]of r)o.resolved.set(e,t);let s=Pe(n),c=Wi(a,t,o,!1,!1,`light`),l=c;s||(Gi(a,o,`lightContrast`,c),l=Wi(a,t,o,!1,!0,`lightContrast`)),Gi(a,o,`dark`,c),Gi(a,o,`darkContrast`,l);let u=Wi(a,t,o,!0,!1,`dark`),d=u;s||(Gi(a,o,`darkContrast`,u),d=Wi(a,t,o,!0,!0,`darkContrast`));let f=/* @__PURE__ */ new Map;for(let e of a)f.set(e,{name:e,light:c.get(e),dark:u.get(e),lightContrast:l.get(e),darkContrast:d.get(e),mode:Ui(t[e])});return Ii(o.lightingShortfalls),qi(a,t,f,n,o.unmet),f}const Yi=[`light`,`dark`,`lightContrast`,`darkContrast`];function Xi(e){return`${e}Hdr`}function Zi(e){let t=[`light`];return e.dark&&t.push(`dark`),e.highContrast&&t.push(`lightContrast`),e.dark&&e.highContrast&&t.push(`darkContrast`),t}function Qi(e,t){return t.some(t=>e[t].hdr!==void 0)}function $i(e){return{light:e.light.join(`
|
|
3
3
|
`),dark:e.dark.join(`
|
|
4
4
|
`),lightContrast:e.lightContrast.join(`
|
|
@@ -41,4 +41,4 @@ Your code should look like:
|
|
|
41
41
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
42
42
|
2. You might be breaking the Rules of Hooks
|
|
43
43
|
3. You might have more than one copy of React in the same app
|
|
44
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function k(){z.asyncTransitions--}function ee(e){var t=z.T,n={};n.types=t===null?null:t.types,n._updatedFibers=/* @__PURE__ */ new Set,z.T=n;try{var r=e(),i=z.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&(z.asyncTransitions++,r.then(k,k),r.then(c,ke))}catch(e){ke(e)}finally{t===null&&n._updatedFibers&&(e=n._updatedFibers.size,n._updatedFibers.clear(),10<e&&console.warn(`Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.`)),t!==null&&n.types!==null&&(t.types!==null&&t.types!==n.types&&console.error(`We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.`),t.types=n.types),z.T=t}}function te(e){var t=z.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else z.asyncTransitions===0&&console.error("addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."),ee(te.bind(null,e))}function A(e){if(Ae===null)try{var n=(`require`+Math.random()).slice(0,7);Ae=(t&&t[n]).call(t,`timers`).setImmediate}catch{Ae=function(e){!1===B&&(B=!0,typeof MessageChannel>`u`&&console.error(`This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.`));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}return Ae(e)}function ne(e){return 1<e.length&&typeof AggregateError==`function`?AggregateError(e):e[0]}function j(e,t){t!==je-1&&console.error(`You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. `),je=t}function M(e,t,n){var r=z.actQueue;if(r!==null){if(r.length!==0)try{re(r),A(function(){return M(e,t,n)});return}catch(e){z.thrownErrors.push(e)}else z.actQueue=null}0<z.thrownErrors.length?(r=ne(z.thrownErrors),z.thrownErrors.length=0,n(r)):t(e)}function re(e){if(!Me){Me=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do{z.didUsePromise=!1;var r=n(!1);if(r!==null){if(z.didUsePromise){e[t]=n,e.splice(0,t);return}n=r}else break}while(1)}e.length=0}catch(n){e.splice(0,t+1),z.thrownErrors.push(n)}finally{Me=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var N=Symbol.for(`react.transitional.element`),P=Symbol.for(`react.portal`),F=Symbol.for(`react.fragment`),ie=Symbol.for(`react.strict_mode`),ae=Symbol.for(`react.profiler`),I=Symbol.for(`react.consumer`),L=Symbol.for(`react.context`),oe=Symbol.for(`react.forward_ref`),se=Symbol.for(`react.suspense`),ce=Symbol.for(`react.suspense_list`),le=Symbol.for(`react.memo`),ue=Symbol.for(`react.lazy`),de=Symbol.for(`react.activity`),fe=Symbol.for(`react.view_transition`),pe=Symbol.iterator,me={},he={isMounted:function(){return!1},enqueueForceUpdate:function(e){i(e,`forceUpdate`)},enqueueReplaceState:function(e){i(e,`replaceState`)},enqueueSetState:function(e){i(e,`setState`)}},ge=Object.assign,_e={};Object.freeze(_e),a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};var R={isMounted:[`isMounted`,`Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.`],replaceState:[`replaceState`,`Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).`]};for(H in R)R.hasOwnProperty(H)&&n(H,R[H]);o.prototype=a.prototype,R=s.prototype=new o,R.constructor=s,ge(R,a.prototype),R.isPureReactComponent=!0;var ve=Array.isArray,ye=Symbol.for(`react.client.reference`),z={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},be=Object.prototype.hasOwnProperty,xe=console.createTask?console.createTask:function(){return null};R={react_stack_bottom_frame:function(e){return e()}};var Se,Ce,we={},Te=R.react_stack_bottom_frame.bind(R,m)(),Ee=xe(f(m)),De=!1,Oe=/\/+/g,ke=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},B=!1,Ae=null,je=0,V=!1,Me=!1,Ne=typeof queueMicrotask==`function`?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:A;R=Object.freeze({__proto__:null,c:function(e){return O().useMemoCache(e)}});var H={map:E,forEach:function(e,t,n){E(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return E(e,function(){t++}),t},toArray:function(e){return E(e,function(e){return e})||[]},only:function(e){if(!x(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=de,e.Children=H,e.Component=a,e.Fragment=F,e.Profiler=ae,e.PureComponent=s,e.StrictMode=ie,e.Suspense=se,e.ViewTransition=fe,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,e.__COMPILER_RUNTIME=R,e.act=function(e){var t=z.actQueue,n=je;je++;var r=z.actQueue=t===null?[]:t,i=!1;try{var a=e()}catch(e){z.thrownErrors.push(e)}if(0<z.thrownErrors.length)throw j(t,n),e=ne(z.thrownErrors),z.thrownErrors.length=0,e;if(typeof a==`object`&&a&&typeof a.then==`function`){var o=a;return Ne(function(){i||V||(V=!0,console.error(`You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);`))}),{then:function(e,a){i=!0,o.then(function(i){if(j(t,n),n===0){try{re(r),A(function(){return M(i,e,a)})}catch(e){z.thrownErrors.push(e)}if(0<z.thrownErrors.length){var o=ne(z.thrownErrors);z.thrownErrors.length=0,a(o)}}else e(i)},function(e){j(t,n),0<z.thrownErrors.length&&(e=ne(z.thrownErrors),z.thrownErrors.length=0),a(e)})}}}var s=a;if(j(t,n),n===0&&(re(r),r.length!==0&&Ne(function(){i||V||(V=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),z.actQueue=null),0<z.thrownErrors.length)throw e=ne(z.thrownErrors),z.thrownErrors.length=0,e;return{then:function(e,t){i=!0,n===0?(z.actQueue=r,A(function(){return M(s,e,t)})):e(s)}}},e.addTransitionType=te,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.captureOwnerStack=function(){var e=z.getCurrentStack;return e===null?null:e()},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=ge({},e.props),i=e.key,a=e._owner;if(t!=null){var o;a:{if(be.call(t,`ref`)&&(o=Object.getOwnPropertyDescriptor(t,`ref`).get)&&o.isReactWarning){o=!1;break a}o=t.ref!==void 0}for(s in o&&(a=p()),h(t)&&(u(t.key),i=``+t.key),t)!be.call(t,s)||s===`key`||s===`__self`||s===`__source`||s===`ref`&&t.ref===void 0||(r[s]=t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){o=Array(s);for(var c=0;c<s;c++)o[c]=arguments[c+2];r.children=o}for(r=v(e.type,i,r,a,e._debugStack,e._debugTask),i=2;i<arguments.length;i++)b(arguments[i]);return r},e.createContext=function(e){return e={$$typeof:L,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:I,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},e.createElement=function(e,t,n){for(var r=2;r<arguments.length;r++)b(arguments[r]);var i;r={};var a=null;if(t!=null)for(i in Ce||!(`__self`in t)||`key`in t||(Ce=!0,console.warn(`Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform`)),h(t)&&(u(t.key),a=``+t.key),t)be.call(t,i)&&i!==`key`&&i!==`__self`&&i!==`__source`&&(r[i]=t[i]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];Object.freeze&&Object.freeze(s),r.children=s}if(e&&e.defaultProps)for(i in o=e.defaultProps,o)r[i]===void 0&&(r[i]=o[i]);return a&&g(r,typeof e==`function`?e.displayName||e.name||`Unknown`:e),(i=1e4>z.recentlyCreatedOwnerStacks++)?(s=Error.stackTraceLimit,Error.stackTraceLimit=10,o=Error(`react-stack-top-frame`),Error.stackTraceLimit=s):o=Te,v(e,a,r,p(),o,i?xe(f(e)):Ee)},e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){e!=null&&e.$$typeof===le?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e==`function`?e.length!==0&&e.length!==2&&console.error(`forwardRef render functions accept exactly two parameters: props and ref. %s`,e.length===1?`Did you forget to use the ref parameter?`:`Any additional parameter will be undefined.`):console.error(`forwardRef requires a render function but was given %s.`,e===null?`null`:typeof e),e!=null&&e.defaultProps!=null&&console.error(`forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?`);var t={$$typeof:oe,render:e},n;return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,"name",{value:t}),e.displayName=t)}}),t},e.isValidElement=x,e.lazy=function(e){e={_status:-1,_result:e};var t={$$typeof:ue,_payload:e,_init:D},n={name:`lazy`,start:-1,end:-1,value:null,owner:null,debugStack:Error(`react-stack-top-frame`),debugTask:console.createTask?console.createTask(`lazy()`):null};return e._ioInfo=n,t._debugInfo=[{awaited:n}],t},e.memo=function(e,t){e??console.error(`memo: The first argument must be a component. Instead received: %s`,e===null?`null`:typeof e),t={$$typeof:le,type:e,compare:t===void 0?null:t};var n;return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,"name",{value:t}),e.displayName=t)}}),t},e.startTransition=ee,e.unstable_useCacheRefresh=function(){return O().useCacheRefresh()},e.use=function(e){return O().use(e)},e.useActionState=function(e,t,n){return O().useActionState(e,t,n)},e.useCallback=function(e,t){return O().useCallback(e,t)},e.useContext=function(e){var t=O();return e.$$typeof===I&&console.error(`Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?`),t.useContext(e)},e.useDebugValue=function(e,t){return O().useDebugValue(e,t)},e.useDeferredValue=function(e,t){return O().useDeferredValue(e,t)},e.useEffect=function(e,t){return e??console.warn(`React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?`),O().useEffect(e,t)},e.useEffectEvent=function(e){return O().useEffectEvent(e)},e.useId=function(){return O().useId()},e.useImperativeHandle=function(e,t,n){return O().useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return e??console.warn(`React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?`),O().useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return e??console.warn(`React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?`),O().useLayoutEffect(e,t)},e.useMemo=function(e,t){return O().useMemo(e,t)},e.useOptimistic=function(e,t){return O().useOptimistic(e,t)},e.useReducer=function(e,t,n){return O().useReducer(e,t,n)},e.useRef=function(e){return O().useRef(e)},e.useState=function(e){return O().useState(e)},e.useSyncExternalStore=function(e,t,n){return O().useSyncExternalStore(e,t,n)},e.useTransition=function(){return O().useTransition()},e.version=`19.3.0`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}));(/* @__PURE__ */ t(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?Vo():Ho()})))();const Uo=/* @__PURE__ */ new Map;function Wo(e){let t=Uo.get(e);if(t!==void 0)return t;let n=null;try{let{h:t,s:r,t:i}=$.color(e).resolve().light;n={hue:t,saturation:r*100,tone:i*100}}catch{console.warn(`[cube-ui-kit] could not parse palette colour ${JSON.stringify(e)}; keeping the numeric seed. Accepted: hex, rgb(), hsl(), okhsl(), okhst(), oklch() — CSS colour keywords are not supported.`)}return Uo.size>=256&&Uo.clear(),Uo.set(e,n),n}const Go={success:156.9,danger:23.1,warning:84.3,note:302.3};let Ko=!1;function qo(e){if(typeof e==`string`){let t=Wo(e);return t?{color:e,hue:t.hue,saturation:t.saturation,tone:t.tone}:{color:null,hue:void 0,saturation:void 0,tone:null}}return{color:null,hue:e?.hue,saturation:e?.saturation,tone:null}}function Jo(e){return typeof e==`string`?void 0:e?.saturation}function Yo(e){let t=e.themes??{},n=qo(e.accent),r=qo(e.base),i=Jo(e.accent),a=e.pastel??i===void 0,o=n.hue??280.3,s=r.hue??o;e.pastel===!0&&i!==void 0&&i!==100&&!Ko&&(Ko=!0,console.warn(`[cube-ui-kit] palette \`accent.saturation\` (${i}) is ignored because \`pastel\` is on — pastel pins it to 100. Drop \`pastel\`, or set it to \`false\`, to tune saturation yourself.`));let c=a?100:i??100;return{hue:o,baseHue:s,saturation:c,baseSaturation:Jo(e.base)??(r.color?Math.min(r.saturation,50,c):Math.min(n.saturation??c,c)*.12),surfaceMode:e.surfaceMode??`neutral`,accentColor:n.color,baseColor:r.color,accentTone:n.tone,accentSaturation:n.color===null?null:n.saturation,pastel:a,contrastLevel:e.contrastLevel??`auto`,themes:{success:Xo(`success`,t.success,c),danger:Xo(`danger`,t.danger,c),warning:Xo(`warning`,t.warning,c),note:Xo(`note`,t.note,c),code:{saturation:t.code?.saturation??80}}}}function Xo(e,t,n){let r=qo(t);return r.color===null?{hue:r.hue??Go[e],saturation:r.saturation??n,color:null,colorTone:null}:{hue:r.hue,saturation:r.saturation,color:r.color,colorTone:r.tone}}let Zo=Qo(Yo({}));function Qo(e){let t=e.themes;if(t){for(let e of Object.values(t))e&&typeof e==`object`&&Object.freeze(e);Object.freeze(t)}let n=e;return typeof n.accent==`object`&&Object.freeze(n.accent),typeof n.base==`object`&&Object.freeze(n.base),Object.freeze(e)}function $o(){return Zo}function es(){return 0}const ts=.12;function ns(e){return e.surfaceMode===`tinted`?98:100}function rs(e){let t=ns(e);return[t-2,t-4]}function is(e){return e.saturation>0?e.baseSaturation/(ts*e.saturation):0}const as={apca:[25,25]},os={apca:[60,85]},ss={apca:[75,92]},cs={surface2:`-3`,surface3:`-6`,hover:`-9`},ls=/* @__PURE__ */ new Map;function us(e){let{h:t,s:n,l:r}=Xe(e),i=e=>e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055,a=e=>{let[t,n,r]=e.map(e=>Math.max(0,Math.min(1,i(e))));return .2126*t**2.4+.7152*n**2.4+.0722*r**2.4};return Math.abs(Gt(a([1,1,1]),a(F(t,n,r,!1))))}function ds(e,t,n){return Math.min(n,fs(e,t))}function fs(e,t){let n=`${e}|${t}|${es()}`,r=ls.get(n);if(r!==void 0)return r;let i=n=>{let r=$.color({from:{h:e,s:t/100,t:n/100},mode:`fixed`}).resolve();return Math.min(us(r.light),us(r.dark),us(r.lightContrast),us(r.darkContrast))},a=100;if(i(100)<48){let e=0,t=100;for(let n=0;n<24;n++){let n=(e+t)/2;i(n)>=48?e=n:t=n}a=e}return ls.size>=256&&ls.clear(),ls.set(n,a),a}function ps(e,t,n){let r=ds(e,t,n);return{color:{h:e,s:t/100,t:r/100},tone:r}}const ms={"accent-selected-fill":{type:`mix`,base:`surface`,target:`accent-surface`,value:9,space:`srgb`}},hs={"code-comment":{base:`surface`,hue:280,saturation:.1,tone:`-50`,contrast:[`AA`,`AAA`]},"code-punctuation":{base:`surface`,hue:348,saturation:.4,tone:`-50`,contrast:[`AA`,`AAA`]},"code-keyword":{base:`surface`,hue:348,saturation:1,tone:`-54`,contrast:[`AA`,`AAA`]},"code-string":{base:`surface`,hue:280.3,saturation:1,tone:`-50`,contrast:[`AA`,`AAA`]},"code-number":{base:`surface`,hue:156,saturation:.9,tone:`-50`,contrast:[`AA`,`AAA`]},"code-function":{base:`surface`,hue:348,saturation:1,tone:`-54`,contrast:[`AA`,`AAA`]},"code-attribute":{base:`surface`,hue:200,saturation:1,tone:`-50`,contrast:[`AA`,`AAA`]}};function gs(e,t){let n=e.themes.code.saturation,r=$(e.hue,n,t),i=e.baseSaturation/n;return i>1&&(console.warn(`[cube-ui-kit] themes.code.saturation (${n}) is too low for baseSaturation ${e.baseSaturation}: the mirrored code surface would need a factor of ${i.toFixed(3)}. Clamped to 1; raise the code saturation to keep syntax contrast accurate.`),i=1),r.colors({surface:{tone:ns(e),saturation:i},...hs}),r}function _s(e){let t={};for(let n of Object.keys(e))(n.startsWith(`code-`)||n.startsWith(`#code-`))&&(t[n]=e[n]);return t}$.configure({states:{dark:`@dark`,highContrast:`@hc`},modes:{dark:!0,highContrast:!0},darkTone:[14,95],darkDesaturation:0});const vs=`-hairline`;function ys(e,t){let[n,r]=t.tone,i=Number(n)*1.25,a=i<0?`-${-i}`:`+${i}`;return{[e]:t,[`${e}${vs}`]:{...t,tone:[a,r]}}}function bs(e){let{dark:t}=$.getConfig().states,n={};for(let[r,i]of Object.entries(e)){if(r.endsWith(vs))continue;let a=e[`${r}${vs}`];if(!a||typeof a!=`object`||typeof i!=`object`){n[r]=i;continue}let{"":o,[t]:s}=a;n[r]={...i,[Ro]:o,...s?{[`${Ro} & ${t}`]:s}:{}}}return n}const xs={...ys(`border`,{base:`surface`,tone:[`-10`,`-30`],saturation:.3}),"surface-text":{base:`surface`,tone:`-100`,saturation:.25,contrast:[`AA`,`AAA`]},"surface-text-soft":{base:`surface`,tone:`-74`,saturation:.25,contrast:[`AA`,`AAA`]},"surface-text-soft-2":{base:`surface`,tone:`-54`,saturation:.25,contrast:[`AA`,`AAA`]}},Ss={"alert-surface":{base:`surface`,tone:`-2`,saturation:.6,darkSaturation:.4},...ys(`alert-border`,{base:`alert-surface`,tone:[`-12`,`-30`],saturation:.6,darkSaturation:.6})};function Cs(e){return{surface:{tone:rs(e),saturation:.2},...xs}}function ws(e){return e==null?{"accent-surface-text":{tone:100,mode:`fixed`},"accent-surface":{base:`accent-surface-text`,tone:`-49`,contrast:[`AA`,`AAA`],mode:`fixed`},"accent-surface-2":{base:`accent-surface-text`,tone:`-52`,contrast:[`AA`,`AAA`],mode:`fixed`},"accent-surface-3":{base:`accent-surface-text`,tone:`-55`,contrast:[`AA`,`AAA`],mode:`fixed`},"accent-surface-hover":{base:`accent-surface-text`,tone:`-58`,contrast:[`AA`,`AAA`],mode:`fixed`},"accent-surface-border":{base:`accent-surface`,tone:`+13`,mode:`fixed`}}:{"accent-surface-text":{tone:100,mode:`fixed`},"accent-surface":{from:e.color,base:`surface`,contrast:as,mode:`fixed`},"accent-surface-2":{base:`accent-surface`,tone:cs.surface2,mode:`fixed`},"accent-surface-3":{base:`accent-surface`,tone:cs.surface3,mode:`fixed`},"accent-surface-hover":{base:`accent-surface`,tone:cs.hover,mode:`fixed`},"accent-surface-border":{base:`accent-surface`,tone:`+13`,mode:`fixed`}}}function Ts(e){return e==null?{...ms,"accent-text":{base:`accent-selected-fill`,tone:`-49`,saturation:1,contrast:[6,11]},"accent-text-soft":{base:`accent-selected-fill`,tone:`-49`,saturation:1,contrast:[5,`AAA`]},"accent-icon":{base:`surface`,tone:`-38`,saturation:.9375}}:{...ms,"accent-text":{from:e.color,base:`accent-selected-fill`,tone:Math.max(0,e.tone-6),contrast:ss},"accent-text-soft":{from:e.color,base:`accent-selected-fill`,contrast:os},"accent-icon":{from:e.color,base:`surface`,contrast:os}}}function Es(e){return{...ws(e),...Ts(e)}}function Ds(e,t={}){let{hue:n,baseHue:r,saturation:i,accentColor:a,accentTone:o,accentSaturation:s,pastel:c,themes:l,contrastLevel:u}=e,d=a!==null&&o!==null&&s!==null?ps(n,s,o):null,f=ns(e),p=is(e),m=e=>Math.min(1,e*p),h=t.isolateContrastLevel?{contrastLevel:u}:{},g={...h,...c?{pastel:!0}:null},_=Object.keys(g).length?g:void 0,v={...h,pastel:!1},y=$(n,i,_);y.colors({surface:{tone:f,saturation:m(ts),hue:r},"surface-2":{hue:r,base:`surface`,tone:[`-2`,`-4`],saturation:m(.1),inherit:!1},"surface-3":{hue:r,base:`surface`,tone:[`-4`,`-8`],saturation:m(.1),inherit:!1},"surface-4":{hue:r,base:`surface`,tone:[`-6`,`-12`],saturation:m(.1),inherit:!1},"surface-text":{hue:r,base:`surface`,tone:`-100`,saturation:m(.2),contrast:[`AA`,`AAA`]},"surface-text-soft":{hue:r,base:`surface`,tone:`-74`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},"surface-text-soft-2":{hue:r,base:`surface`,tone:`-54`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},"surface-2-text":{hue:r,base:`surface-2`,tone:`-96`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},"surface-2-text-soft":{hue:r,base:`surface-2`,tone:`-70`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},"surface-3-text":{hue:r,base:`surface-3`,tone:`-94`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},"surface-3-text-soft":{hue:r,base:`surface-3`,tone:`-68`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},...ys(`border`,{hue:r,base:`surface`,tone:[`-10`,`-30`],saturation:m(.175)}),placeholder:{hue:r,base:`surface`,tone:`-33`,saturation:m(.175),inherit:!1},focus:{base:`surface`,tone:`-29`,saturation:.8625,inherit:!1},disabled:{tone:80.8,saturation:.4,inherit:!1},"disabled-surface":{hue:r,base:`surface`,tone:`-3.5`,saturation:m(.2),inherit:!1},"disabled-surface-text":{base:`surface`,tone:`-23`,saturation:.3,inherit:!1},"surface-inverse":{hue:r,tone:12,saturation:m(.475),mode:`fixed`,inherit:!1},...Es(d),"accent-disabled-surface":{base:`surface`,tone:`-13`,saturation:.5,mode:`fixed`},"accent-disabled-surface-text":{base:`accent-disabled-surface`,tone:`max`,saturation:.4,mode:`fixed`},"accent-disabled-text":{base:`surface`,tone:`-23`,saturation:.6},"loading-face-1":{hue:r,base:`surface`,tone:`-2`,saturation:m(.2),contrast:[1.2,1.35],inherit:!1},"loading-face-2":{hue:r,base:`surface`,tone:`-2`,saturation:m(.2),contrast:[1.65,2.1],inherit:!1},"loading-face-3":{hue:r,base:`surface`,tone:`-2`,saturation:m(.2),contrast:[2.4,3.2],inherit:!1},"shadow-sm":{type:`shadow`,bg:`surface`,fg:`surface-text`,intensity:[3.95,4.4],tuning:{reach:.86,objectInfluence:0},inherit:!1},"shadow-md":{type:`shadow`,bg:`surface`,fg:`surface-text`,intensity:[6.97,7.73],tuning:{reach:.86,objectInfluence:.165},inherit:!1},"shadow-lg":{type:`shadow`,bg:`surface`,fg:`surface-text`,intensity:[9.39,10.37],tuning:{reach:.86,objectInfluence:.33},inherit:!1},overlay:{tone:10,opacity:.5,inherit:!1,hue:r}});let b=Cs(e),x=y.extend({colors:b}),S={...b,...Ss},C=e=>e.color!==null&&e.colorTone!==null?{...S,...Es(ps(e.hue,e.saturation,e.colorTone))}:d==null?S:{...S,...Es(null)},w=y.extend({hue:l.success.hue,saturation:l.success.saturation,colors:C(l.success)}),T=y.extend({hue:l.danger.hue,saturation:l.danger.saturation,colors:C(l.danger)}),E=y.extend({hue:l.warning.hue,saturation:l.warning.saturation,colors:C(l.warning)}),D=y.extend({hue:l.note.hue,saturation:l.note.saturation,colors:C(l.note)}),O=$(n,i,_);return O.colors({surface:{tone:12,saturation:.475,mode:`fixed`},...ws(d),"accent-text":{base:`accent-surface-text`,tone:`-58`,contrast:[`AA`,`AAA`],mode:`fixed`},"accent-disabled-surface":{base:`surface`,tone:`+4`,saturation:.5,mode:`fixed`},"accent-disabled-surface-text":{base:`accent-disabled-surface`,tone:`+18`,saturation:.4,mode:`fixed`}}),{palette:$.palette({default:y,primary:x,purple:x,success:w,danger:T,warning:E,note:D,special:O}),codeTheme:gs(e,v)}}const Os={default:``,primary:`primary-`,purple:`purple-`,success:`success-`,danger:`danger-`,warning:`warning-`,note:`note-`,special:`special-`};let ks=null,As=null,js=null,Ms=-1,Ns=!1;function Ps(e){(e!==`auto`||Ns)&&($.configure({contrastLevel:e}),Ns=e!==`auto`)}function Fs(){let e=es();if(js&&Ms===e)return;let t=$o();Ps(t.contrastLevel);let n=Ds(t);ks=n.palette,js=bs({...n.palette.tasty({prefix:Os,format:`oklch`}),..._s(n.codeTheme.tasty({format:`oklch`}))}),As=n.codeTheme,Ms=e}function Is(){return Fs(),js}function Ls(){return Fs(),ks}function Rs(){return Fs(),As}Bo(Is);function zs(){if(typeof window<`u`&&window.localStorage)try{let e=window.localStorage.getItem(`TASTY_DEBUG`);if(e!==null&&e.toLowerCase()===`true`)return!0}catch{}if(typeof process>`u`)return!1;let e=process.env.NODE_ENV;return e!==`test`&&e!==`production`}function Bs(e){let t=e.charCodeAt(0);return t===38||t===46||t>=65&&t<=90}const Vs=zs(),Hs=`@inherit`;function Us(e){Vs&&console.warn(`[Tasty] @inherit used for state '${e}' that does not exist in the parent style map. Entry skipped.`)}function Ws(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Gs(e){return Ws(e)?e:e!=null&&e!==!1?{"":e}:null}function Ks(e,t){let n=!(``in t),r=Gs(e);if(!r){let e={};for(let n of Object.keys(t)){let r=t[n];r!==null&&r!==Hs&&(e[n]=r)}return e}return n?qs(r,t):Js(r,t)}function qs(e,t){let n={},r=Object.keys(t),i=new Set(r);for(let r of Object.keys(e)){if(!i.has(r)){n[r]=e[r];continue}let a=t[r];a!==null&&a!==Hs&&(n[r]=a)}for(let i of r){let r=t[i];r===Hs?i in e?n[i]=e[i]:Us(i):r!==null&&!(i in e)&&(n[i]=r)}return n}function Js(e,t){let n={};for(let r of Object.keys(t)){let i=t[r];i===Hs?r in e?n[r]=e[r]:Us(r):i!==null&&(n[r]=i)}return n}function Ys(e,t){let n=e,r=t,i={...n,...r};for(let e of Object.keys(r)){let t=r[e];t===void 0?n&&e in n&&(i[e]=n[e]):t===null?delete i[e]:Ws(t)&&(i[e]=Ks(n?n[e]:void 0,t))}return i}function Xs(...e){let t=e[0]?{...e[0]}:{},n=1;for(;n in e;){let r=Object.keys(t).filter(e=>Bs(e)&&t[e]),i=e[n];if(i){let e={...t,...i},n=Object.keys(i).filter(Bs),a=/* @__PURE__ */ new Set([...r,...n]);for(let n of a){let r=i?.[n];r===!1||r===null?delete e[n]:r===void 0?e[n]=t[n]:r&&(e[n]=Ys(t[n],r))}for(let n of Object.keys(i)){if(Bs(n))continue;let r=i[n];r===void 0?n in t?e[n]=t[n]:delete e[n]:r===null?delete e[n]:Ws(r)&&(e[n]=Ks(t[n],r))}t=e}n++}return t}const Zs={"$item-shadow":`0 1px .375x #shadow-sm`,"$card-shadow":`0 .5x 2x #shadow-md`,$shadow:`0 .5x 2x #shadow-md`,"$dialog-shadow":`0 1x 4x #shadow-lg`},Qs={"#text":`#surface-text-soft`,"#dark":`#surface-text`,"#dark-01":`#surface-text`,"#dark-02":`#surface-text-soft`,"#dark-03":`#surface-text-soft-2`,"#dark-04":`#placeholder`,"#dark-05":`#border`,"#fixed-dark":`#special-surface`,"#fixed-primary-text":`#special-accent-text`,"#minor":`#surface-text-soft.65`,"#shadow":`#shadow-md`,"#light":`#surface-3`,"#dark-bg":`#surface-2`,"#clear":`transparent`,"#pink":`okhsl(5 100% 67%)`,"#primary":`#primary-accent-surface`,"#primary-text":`#primary-accent-text`,"#primary-text-soft":`#primary-accent-text-soft`,"#primary-bg":`#primary-surface`,"#primary-icon":`#primary-accent-icon`,"#primary-hover":`#primary-accent-surface-hover`,"#primary-desaturated":`#primary-accent-surface-2`,"#primary-disabled":`#disabled`,"#purple":`#purple-accent-surface`,"#purple-text":`#purple-accent-text`,"#purple-text-soft":`#purple-accent-text-soft`,"#purple-bg":`#purple-surface`,"#purple-icon":`#purple-accent-icon`,"#purple-hover":`#purple-accent-surface-hover`,"#purple-disabled":`#disabled`,"#purple-01":`#purple-accent-surface`,"#purple-02":`#purple-accent-surface-2`,"#purple-03":`#purple-accent-surface-3`,"#purple-04":`#purple-surface`,"#danger":`#danger-accent-surface`,"#danger-text":`#danger-accent-text`,"#danger-text-soft":`#danger-accent-text-soft`,"#danger-bg":`#danger-surface`,"#danger-icon":`#danger-accent-icon`,"#danger-hover":`#danger-accent-surface-hover`,"#danger-desaturated":`#danger-accent-surface-2`,"#danger-disabled":`#disabled`,"#success":`#success-accent-surface`,"#success-text":`#success-accent-text`,"#success-text-soft":`#success-accent-text-soft`,"#success-bg":`#success-surface`,"#success-icon":`#success-accent-icon`,"#success-hover":`#success-accent-surface-hover`,"#success-desaturated":`#success-accent-surface-2`,"#success-disabled":`#disabled`,"#warning":`#warning-accent-surface`,"#warning-text":`#warning-accent-text`,"#warning-text-soft":`#warning-accent-text-soft`,"#warning-bg":`#warning-surface`,"#warning-icon":`#warning-accent-icon`,"#warning-hover":`#warning-accent-surface-hover`,"#warning-desaturated":`#warning-accent-surface-2`,"#warning-disabled":`#disabled`,"#note":`#note-accent-surface`,"#note-text":`#note-accent-text`,"#note-text-soft":`#note-accent-text-soft`,"#note-bg":`#note-surface`,"#note-icon":`#note-accent-icon`,"#note-hover":`#note-accent-surface-hover`,"#note-desaturated":`#note-accent-surface-2`,"#note-disabled":`#disabled`},$s={"#current-fill":`#surface`};let ec=null,tc=-1;function nc(){let e=es();return(!ec||tc!==e)&&(ec={...Is(),...Qs,...$s},tc=e),ec}Bo(nc),Xs(Zs,{"#scrollbar-thumb":zo[`#scrollbar-thumb`],"#scrollbar-outline":zo[`#scrollbar-outline`],"#scrollbar-bg":zo[`#scrollbar-bg`],"#scrollbar-corner":zo[`#scrollbar-corner`]});export{Rs as getCodeTheme,nc as getColorTokens,Ls as getPalette,Is as getPaletteTokens,r as glaze,_o as measure};
|
|
44
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function k(){z.asyncTransitions--}function ee(e){var t=z.T,n={};n.types=t===null?null:t.types,n._updatedFibers=/* @__PURE__ */ new Set,z.T=n;try{var r=e(),i=z.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&(z.asyncTransitions++,r.then(k,k),r.then(c,ke))}catch(e){ke(e)}finally{t===null&&n._updatedFibers&&(e=n._updatedFibers.size,n._updatedFibers.clear(),10<e&&console.warn(`Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.`)),t!==null&&n.types!==null&&(t.types!==null&&t.types!==n.types&&console.error(`We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.`),t.types=n.types),z.T=t}}function te(e){var t=z.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else z.asyncTransitions===0&&console.error("addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."),ee(te.bind(null,e))}function A(e){if(Ae===null)try{var n=(`require`+Math.random()).slice(0,7);Ae=(t&&t[n]).call(t,`timers`).setImmediate}catch{Ae=function(e){!1===B&&(B=!0,typeof MessageChannel>`u`&&console.error(`This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.`));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}return Ae(e)}function ne(e){return 1<e.length&&typeof AggregateError==`function`?AggregateError(e):e[0]}function j(e,t){t!==je-1&&console.error(`You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. `),je=t}function M(e,t,n){var r=z.actQueue;if(r!==null){if(r.length!==0)try{re(r),A(function(){return M(e,t,n)});return}catch(e){z.thrownErrors.push(e)}else z.actQueue=null}0<z.thrownErrors.length?(r=ne(z.thrownErrors),z.thrownErrors.length=0,n(r)):t(e)}function re(e){if(!Me){Me=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do{z.didUsePromise=!1;var r=n(!1);if(r!==null){if(z.didUsePromise){e[t]=n,e.splice(0,t);return}n=r}else break}while(1)}e.length=0}catch(n){e.splice(0,t+1),z.thrownErrors.push(n)}finally{Me=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var N=Symbol.for(`react.transitional.element`),P=Symbol.for(`react.portal`),F=Symbol.for(`react.fragment`),ie=Symbol.for(`react.strict_mode`),ae=Symbol.for(`react.profiler`),I=Symbol.for(`react.consumer`),L=Symbol.for(`react.context`),oe=Symbol.for(`react.forward_ref`),se=Symbol.for(`react.suspense`),ce=Symbol.for(`react.suspense_list`),le=Symbol.for(`react.memo`),ue=Symbol.for(`react.lazy`),de=Symbol.for(`react.activity`),fe=Symbol.for(`react.view_transition`),pe=Symbol.iterator,me={},he={isMounted:function(){return!1},enqueueForceUpdate:function(e){i(e,`forceUpdate`)},enqueueReplaceState:function(e){i(e,`replaceState`)},enqueueSetState:function(e){i(e,`setState`)}},ge=Object.assign,_e={};Object.freeze(_e),a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};var R={isMounted:[`isMounted`,`Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.`],replaceState:[`replaceState`,`Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).`]};for(H in R)R.hasOwnProperty(H)&&n(H,R[H]);o.prototype=a.prototype,R=s.prototype=new o,R.constructor=s,ge(R,a.prototype),R.isPureReactComponent=!0;var ve=Array.isArray,ye=Symbol.for(`react.client.reference`),z={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},be=Object.prototype.hasOwnProperty,xe=console.createTask?console.createTask:function(){return null};R={react_stack_bottom_frame:function(e){return e()}};var Se,Ce,we={},Te=R.react_stack_bottom_frame.bind(R,m)(),Ee=xe(f(m)),De=!1,Oe=/\/+/g,ke=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},B=!1,Ae=null,je=0,V=!1,Me=!1,Ne=typeof queueMicrotask==`function`?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:A;R=Object.freeze({__proto__:null,c:function(e){return O().useMemoCache(e)}});var H={map:E,forEach:function(e,t,n){E(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return E(e,function(){t++}),t},toArray:function(e){return E(e,function(e){return e})||[]},only:function(e){if(!x(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=de,e.Children=H,e.Component=a,e.Fragment=F,e.Profiler=ae,e.PureComponent=s,e.StrictMode=ie,e.Suspense=se,e.ViewTransition=fe,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,e.__COMPILER_RUNTIME=R,e.act=function(e){var t=z.actQueue,n=je;je++;var r=z.actQueue=t===null?[]:t,i=!1;try{var a=e()}catch(e){z.thrownErrors.push(e)}if(0<z.thrownErrors.length)throw j(t,n),e=ne(z.thrownErrors),z.thrownErrors.length=0,e;if(typeof a==`object`&&a&&typeof a.then==`function`){var o=a;return Ne(function(){i||V||(V=!0,console.error(`You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);`))}),{then:function(e,a){i=!0,o.then(function(i){if(j(t,n),n===0){try{re(r),A(function(){return M(i,e,a)})}catch(e){z.thrownErrors.push(e)}if(0<z.thrownErrors.length){var o=ne(z.thrownErrors);z.thrownErrors.length=0,a(o)}}else e(i)},function(e){j(t,n),0<z.thrownErrors.length&&(e=ne(z.thrownErrors),z.thrownErrors.length=0),a(e)})}}}var s=a;if(j(t,n),n===0&&(re(r),r.length!==0&&Ne(function(){i||V||(V=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),z.actQueue=null),0<z.thrownErrors.length)throw e=ne(z.thrownErrors),z.thrownErrors.length=0,e;return{then:function(e,t){i=!0,n===0?(z.actQueue=r,A(function(){return M(s,e,t)})):e(s)}}},e.addTransitionType=te,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.captureOwnerStack=function(){var e=z.getCurrentStack;return e===null?null:e()},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=ge({},e.props),i=e.key,a=e._owner;if(t!=null){var o;a:{if(be.call(t,`ref`)&&(o=Object.getOwnPropertyDescriptor(t,`ref`).get)&&o.isReactWarning){o=!1;break a}o=t.ref!==void 0}for(s in o&&(a=p()),h(t)&&(u(t.key),i=``+t.key),t)!be.call(t,s)||s===`key`||s===`__self`||s===`__source`||s===`ref`&&t.ref===void 0||(r[s]=t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){o=Array(s);for(var c=0;c<s;c++)o[c]=arguments[c+2];r.children=o}for(r=v(e.type,i,r,a,e._debugStack,e._debugTask),i=2;i<arguments.length;i++)b(arguments[i]);return r},e.createContext=function(e){return e={$$typeof:L,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:I,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},e.createElement=function(e,t,n){for(var r=2;r<arguments.length;r++)b(arguments[r]);var i;r={};var a=null;if(t!=null)for(i in Ce||!(`__self`in t)||`key`in t||(Ce=!0,console.warn(`Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform`)),h(t)&&(u(t.key),a=``+t.key),t)be.call(t,i)&&i!==`key`&&i!==`__self`&&i!==`__source`&&(r[i]=t[i]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];Object.freeze&&Object.freeze(s),r.children=s}if(e&&e.defaultProps)for(i in o=e.defaultProps,o)r[i]===void 0&&(r[i]=o[i]);return a&&g(r,typeof e==`function`?e.displayName||e.name||`Unknown`:e),(i=1e4>z.recentlyCreatedOwnerStacks++)?(s=Error.stackTraceLimit,Error.stackTraceLimit=10,o=Error(`react-stack-top-frame`),Error.stackTraceLimit=s):o=Te,v(e,a,r,p(),o,i?xe(f(e)):Ee)},e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){e!=null&&e.$$typeof===le?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e==`function`?e.length!==0&&e.length!==2&&console.error(`forwardRef render functions accept exactly two parameters: props and ref. %s`,e.length===1?`Did you forget to use the ref parameter?`:`Any additional parameter will be undefined.`):console.error(`forwardRef requires a render function but was given %s.`,e===null?`null`:typeof e),e!=null&&e.defaultProps!=null&&console.error(`forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?`);var t={$$typeof:oe,render:e},n;return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,"name",{value:t}),e.displayName=t)}}),t},e.isValidElement=x,e.lazy=function(e){e={_status:-1,_result:e};var t={$$typeof:ue,_payload:e,_init:D},n={name:`lazy`,start:-1,end:-1,value:null,owner:null,debugStack:Error(`react-stack-top-frame`),debugTask:console.createTask?console.createTask(`lazy()`):null};return e._ioInfo=n,t._debugInfo=[{awaited:n}],t},e.memo=function(e,t){e??console.error(`memo: The first argument must be a component. Instead received: %s`,e===null?`null`:typeof e),t={$$typeof:le,type:e,compare:t===void 0?null:t};var n;return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,"name",{value:t}),e.displayName=t)}}),t},e.startTransition=ee,e.unstable_useCacheRefresh=function(){return O().useCacheRefresh()},e.use=function(e){return O().use(e)},e.useActionState=function(e,t,n){return O().useActionState(e,t,n)},e.useCallback=function(e,t){return O().useCallback(e,t)},e.useContext=function(e){var t=O();return e.$$typeof===I&&console.error(`Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?`),t.useContext(e)},e.useDebugValue=function(e,t){return O().useDebugValue(e,t)},e.useDeferredValue=function(e,t){return O().useDeferredValue(e,t)},e.useEffect=function(e,t){return e??console.warn(`React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?`),O().useEffect(e,t)},e.useEffectEvent=function(e){return O().useEffectEvent(e)},e.useId=function(){return O().useId()},e.useImperativeHandle=function(e,t,n){return O().useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return e??console.warn(`React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?`),O().useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return e??console.warn(`React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?`),O().useLayoutEffect(e,t)},e.useMemo=function(e,t){return O().useMemo(e,t)},e.useOptimistic=function(e,t){return O().useOptimistic(e,t)},e.useReducer=function(e,t,n){return O().useReducer(e,t,n)},e.useRef=function(e){return O().useRef(e)},e.useState=function(e){return O().useState(e)},e.useSyncExternalStore=function(e,t,n){return O().useSyncExternalStore(e,t,n)},e.useTransition=function(){return O().useTransition()},e.version=`19.3.0`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()}));(/* @__PURE__ */ t(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?Vo():Ho()})))();const Uo=/* @__PURE__ */ new Map;function Wo(e){let t=Uo.get(e);if(t!==void 0)return t;let n=null;try{let{h:t,s:r,t:i}=$.color(e).resolve().light;n={hue:t,saturation:r*100,tone:i*100}}catch{console.warn(`[cube-ui-kit] could not parse palette colour ${JSON.stringify(e)}; keeping the numeric seed. Accepted: hex, rgb(), hsl(), okhsl(), okhst(), oklch() — CSS colour keywords are not supported.`)}return Uo.size>=256&&Uo.clear(),Uo.set(e,n),n}const Go={success:156.9,danger:23.1,warning:84.3,note:302.3};let Ko=!1;function qo(e){if(typeof e==`string`){let t=Wo(e);return t?{color:e,hue:t.hue,saturation:t.saturation,tone:t.tone}:{color:null,hue:void 0,saturation:void 0,tone:null}}return{color:null,hue:e?.hue,saturation:e?.saturation,tone:null}}function Jo(e){return typeof e==`string`?void 0:e?.saturation}function Yo(e){let t=e.themes??{},n=qo(e.accent),r=qo(e.base),i=Jo(e.accent),a=e.pastel??i===void 0,o=n.hue??280.3,s=r.hue??o;e.pastel===!0&&i!==void 0&&i!==100&&!Ko&&(Ko=!0,console.warn(`[cube-ui-kit] palette \`accent.saturation\` (${i}) is ignored because \`pastel\` is on — pastel pins it to 100. Drop \`pastel\`, or set it to \`false\`, to tune saturation yourself.`));let c=a?100:i??100;return{hue:o,baseHue:s,saturation:c,baseSaturation:Jo(e.base)??(r.color?Math.min(r.saturation,50,c):Math.min(n.saturation??c,c)*.12),surfaceMode:e.surfaceMode??`neutral`,accentColor:n.color,baseColor:r.color,accentTone:n.tone,accentSaturation:n.color===null?null:n.saturation,pastel:a,contrastLevel:e.contrastLevel??`auto`,themes:{success:Xo(`success`,t.success,c),danger:Xo(`danger`,t.danger,c),warning:Xo(`warning`,t.warning,c),note:Xo(`note`,t.note,c),code:{saturation:t.code?.saturation??80}}}}function Xo(e,t,n){let r=qo(t);return r.color===null?{hue:r.hue??Go[e],saturation:r.saturation??n,color:null,colorTone:null}:{hue:r.hue,saturation:r.saturation,color:r.color,colorTone:r.tone}}let Zo=Qo(Yo({}));function Qo(e){let t=e.themes;if(t){for(let e of Object.values(t))e&&typeof e==`object`&&Object.freeze(e);Object.freeze(t)}let n=e;return typeof n.accent==`object`&&Object.freeze(n.accent),typeof n.base==`object`&&Object.freeze(n.base),Object.freeze(e)}function $o(){return Zo}function es(){return 0}const ts=.12;function ns(e){return e.surfaceMode===`tinted`?98:100}function rs(e){let t=ns(e);return[t-2,t-4]}function is(e){return e.saturation>0?e.baseSaturation/(ts*e.saturation):0}const as={apca:[25,25]},os={apca:[60,85]},ss={apca:[75,92]},cs={surface2:`-3`,surface3:`-6`,hover:`-9`},ls=/* @__PURE__ */ new Map;function us(e){let{h:t,s:n,l:r}=Xe(e),i=e=>e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055,a=e=>{let[t,n,r]=e.map(e=>Math.max(0,Math.min(1,i(e))));return .2126*t**2.4+.7152*n**2.4+.0722*r**2.4};return Math.abs(Gt(a([1,1,1]),a(F(t,n,r,!1))))}function ds(e,t,n){return Math.min(n,fs(e,t))}function fs(e,t){let n=`${e}|${t}|${es()}`,r=ls.get(n);if(r!==void 0)return r;let i=n=>{let r=$.color({from:{h:e,s:t/100,t:n/100},mode:`fixed`}).resolve();return Math.min(us(r.light),us(r.dark),us(r.lightContrast),us(r.darkContrast))},a=100;if(i(100)<48){let e=0,t=100;for(let n=0;n<24;n++){let n=(e+t)/2;i(n)>=48?e=n:t=n}a=e}return ls.size>=256&&ls.clear(),ls.set(n,a),a}function ps(e,t,n){let r=ds(e,t,n);return{color:{h:e,s:t/100,t:r/100},tone:r}}const ms={"accent-selected-fill":{type:`mix`,base:`surface`,target:`accent-surface`,value:9,space:`srgb`}},hs={"code-comment":{base:`surface`,hue:280,saturation:.1,tone:`-50`,contrast:[`AA`,`AAA`]},"code-punctuation":{base:`surface`,hue:348,saturation:.4,tone:`-50`,contrast:[`AA`,`AAA`]},"code-keyword":{base:`surface`,hue:348,saturation:1,tone:`-54`,contrast:[`AA`,`AAA`]},"code-string":{base:`surface`,hue:280.3,saturation:1,tone:`-50`,contrast:[`AA`,`AAA`]},"code-number":{base:`surface`,hue:156,saturation:.9,tone:`-50`,contrast:[`AA`,`AAA`]},"code-function":{base:`surface`,hue:348,saturation:1,tone:`-54`,contrast:[`AA`,`AAA`]},"code-attribute":{base:`surface`,hue:200,saturation:1,tone:`-50`,contrast:[`AA`,`AAA`]}};function gs(e,t){let n=e.themes.code.saturation,r=$(e.hue,n,t),i=e.baseSaturation/n;return i>1&&(console.warn(`[cube-ui-kit] themes.code.saturation (${n}) is too low for baseSaturation ${e.baseSaturation}: the mirrored code surface would need a factor of ${i.toFixed(3)}. Clamped to 1; raise the code saturation to keep syntax contrast accurate.`),i=1),r.colors({surface:{tone:ns(e),saturation:i},...hs}),r}function _s(e){let t={};for(let n of Object.keys(e))(n.startsWith(`code-`)||n.startsWith(`#code-`))&&(t[n]=e[n]);return t}$.configure({states:{dark:`@dark`,highContrast:`@hc`},modes:{dark:!0,highContrast:!0},darkTone:[14,95],darkDesaturation:0});const vs=`-hairline`;function ys(e,t){let[n,r]=t.tone,i=Number(n)*1.25,a=i<0?`-${-i}`:`+${i}`;return{[e]:t,[`${e}${vs}`]:{...t,tone:[a,r]}}}function bs(e){let{dark:t}=$.getConfig().states,n={};for(let[r,i]of Object.entries(e)){if(r.endsWith(vs))continue;let a=e[`${r}${vs}`];if(!a||typeof a!=`object`||typeof i!=`object`){n[r]=i;continue}let{"":o,[t]:s}=a;n[r]={...i,[Ro]:o,...s?{[`${Ro} & ${t}`]:s}:{}}}return n}const xs={...ys(`border`,{base:`surface`,tone:[`-10`,`-30`],saturation:.3}),"surface-text":{base:`surface`,tone:`-100`,saturation:.25,contrast:[`AA`,`AAA`]},"surface-text-soft":{base:`surface`,tone:`-74`,saturation:.25,contrast:[`AA`,`AAA`]},"surface-text-soft-2":{base:`surface`,tone:`-54`,saturation:.25,contrast:[`AA`,`AAA`]}},Ss={"alert-surface":{base:`surface`,tone:`-2`,saturation:.6,darkSaturation:.4},...ys(`alert-border`,{base:`alert-surface`,tone:[`-12`,`-30`],saturation:.6,darkSaturation:.6})};function Cs(e){return{surface:{tone:rs(e),saturation:.2},...xs}}function ws(e){return e==null?{"accent-surface-text":{tone:100,mode:`fixed`},"accent-surface":{base:`accent-surface-text`,tone:`-49`,contrast:[`AA`,`AAA`],mode:`fixed`},"accent-surface-2":{base:`accent-surface-text`,tone:`-52`,contrast:[`AA`,`AAA`],mode:`fixed`},"accent-surface-3":{base:`accent-surface-text`,tone:`-55`,contrast:[`AA`,`AAA`],mode:`fixed`},"accent-surface-hover":{base:`accent-surface-text`,tone:`-58`,contrast:[`AA`,`AAA`],mode:`fixed`},"accent-surface-border":{base:`accent-surface`,tone:`+13`,mode:`fixed`}}:{"accent-surface-text":{tone:100,mode:`fixed`},"accent-surface":{from:e.color,base:`surface`,contrast:as,mode:`fixed`},"accent-surface-2":{base:`accent-surface`,tone:cs.surface2,mode:`fixed`},"accent-surface-3":{base:`accent-surface`,tone:cs.surface3,mode:`fixed`},"accent-surface-hover":{base:`accent-surface`,tone:cs.hover,mode:`fixed`},"accent-surface-border":{base:`accent-surface`,tone:`+13`,mode:`fixed`}}}function Ts(e){return e==null?{...ms,"accent-text":{base:`accent-selected-fill`,tone:`-49`,saturation:1,contrast:[6,11]},"accent-text-soft":{base:`accent-selected-fill`,tone:`-49`,saturation:1,contrast:[5,`AAA`]},"accent-icon":{base:`surface`,tone:`-38`,saturation:.9375}}:{...ms,"accent-text":{from:e.color,base:`accent-selected-fill`,tone:Math.max(0,e.tone-6),contrast:ss},"accent-text-soft":{from:e.color,base:`accent-selected-fill`,contrast:os},"accent-icon":{from:e.color,base:`surface`,contrast:os}}}function Es(e){return{...ws(e),...Ts(e)}}function Ds(e,t={}){let{hue:n,baseHue:r,saturation:i,accentColor:a,accentTone:o,accentSaturation:s,pastel:c,themes:l,contrastLevel:u}=e,d=a!==null&&o!==null&&s!==null?ps(n,s,o):null,f=ns(e),p=is(e),m=e=>Math.min(1,e*p),h=t.isolateContrastLevel?{contrastLevel:u}:{},g={...h,...c?{pastel:!0}:null},_=Object.keys(g).length?g:void 0,v={...h,pastel:!1},y=$(n,i,_);y.colors({surface:{tone:f,saturation:m(ts),hue:r},"surface-2":{hue:r,base:`surface`,tone:[`-2`,`-4`],saturation:m(.1),inherit:!1},"surface-3":{hue:r,base:`surface`,tone:[`-4`,`-8`],saturation:m(.1),inherit:!1},"surface-4":{hue:r,base:`surface`,tone:[`-6`,`-12`],saturation:m(.1),inherit:!1},"surface-text":{hue:r,base:`surface`,tone:`-100`,saturation:m(.2),contrast:[`AA`,`AAA`]},"surface-text-soft":{hue:r,base:`surface`,tone:`-74`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},"surface-text-soft-2":{hue:r,base:`surface`,tone:`-54`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},"surface-2-text":{hue:r,base:`surface-2`,tone:`-96`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},"surface-2-text-soft":{hue:r,base:`surface-2`,tone:`-70`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},"surface-3-text":{hue:r,base:`surface-3`,tone:`-94`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},"surface-3-text-soft":{hue:r,base:`surface-3`,tone:`-68`,saturation:m(.2),contrast:[`AA`,`AAA`],inherit:!1},...ys(`border`,{hue:r,base:`surface`,tone:[`-10`,`-30`],saturation:m(.175)}),placeholder:{hue:r,base:`surface`,tone:`-33`,saturation:m(.175),inherit:!1},focus:{base:`surface`,tone:`-29`,saturation:.8625,inherit:!1},disabled:{tone:80.8,saturation:.4,inherit:!1},"disabled-surface":{hue:r,base:`surface`,tone:`-3.5`,saturation:m(.2),inherit:!1},"disabled-surface-text":{base:`surface`,tone:`-23`,saturation:.3,inherit:!1},"surface-inverse":{hue:r,tone:12,saturation:m(.475),mode:`fixed`,inherit:!1},...Es(d),"accent-disabled-surface":{base:`surface`,tone:`-13`,saturation:.5,mode:`fixed`},"accent-disabled-surface-text":{base:`accent-disabled-surface`,tone:`max`,saturation:.4,mode:`fixed`},"accent-disabled-text":{base:`surface`,tone:`-23`,saturation:.6},"loading-face-1":{hue:r,base:`surface`,tone:`-2`,saturation:m(.2),contrast:[1.2,1.35],inherit:!1},"loading-face-2":{hue:r,base:`surface`,tone:`-2`,saturation:m(.2),contrast:[1.65,2.1],inherit:!1},"loading-face-3":{hue:r,base:`surface`,tone:`-2`,saturation:m(.2),contrast:[2.4,3.2],inherit:!1},"shadow-sm":{type:`shadow`,bg:`surface`,fg:`surface-text`,intensity:[3.95,4.4],tuning:{reach:.86,objectInfluence:0},inherit:!1},"shadow-md":{type:`shadow`,bg:`surface`,fg:`surface-text`,intensity:[6.97,7.73],tuning:{reach:.86,objectInfluence:.165},inherit:!1},"shadow-lg":{type:`shadow`,bg:`surface`,fg:`surface-text`,intensity:[9.39,10.37],tuning:{reach:.86,objectInfluence:.33},inherit:!1},overlay:{tone:10,opacity:.5,inherit:!1,hue:r}});let b=Cs(e),x=y.extend({colors:b}),S={...b,...Ss},C=e=>e.color!==null&&e.colorTone!==null?{...S,...Es(ps(e.hue,e.saturation,e.colorTone))}:d==null?S:{...S,...Es(null)},w=y.extend({hue:l.success.hue,saturation:l.success.saturation,colors:C(l.success)}),T=y.extend({hue:l.danger.hue,saturation:l.danger.saturation,colors:C(l.danger)}),E=y.extend({hue:l.warning.hue,saturation:l.warning.saturation,colors:C(l.warning)}),D=y.extend({hue:l.note.hue,saturation:l.note.saturation,colors:C(l.note)}),O=$(n,i,_);return O.colors({surface:{tone:12,saturation:.475,mode:`fixed`},...ws(d),"accent-text":{base:`accent-surface-text`,tone:`-58`,contrast:[`AA`,`AAA`],mode:`fixed`},"accent-disabled-surface":{base:`surface`,tone:`+4`,saturation:.5,mode:`fixed`},"accent-disabled-surface-text":{base:`accent-disabled-surface`,tone:`+18`,saturation:.4,mode:`fixed`}}),{palette:$.palette({default:y,primary:x,purple:x,success:w,danger:T,warning:E,note:D,special:O}),codeTheme:gs(e,v)}}const Os={default:``,primary:`primary-`,purple:`purple-`,success:`success-`,danger:`danger-`,warning:`warning-`,note:`note-`,special:`special-`};let ks=null,As=null,js=null,Ms=-1,Ns=!1;function Ps(e){(e!==`auto`||Ns)&&($.configure({contrastLevel:e}),Ns=e!==`auto`)}function Fs(){let e=es();if(js&&Ms===e)return;let t=$o();Ps(t.contrastLevel);let n=Ds(t);ks=n.palette,js=bs({...n.palette.tasty({prefix:Os,format:`oklch`}),..._s(n.codeTheme.tasty({format:`oklch`}))}),As=n.codeTheme,Ms=e}function Is(){return Fs(),js}function Ls(){return Fs(),ks}function Rs(){return Fs(),As}Bo(Is);function zs(){if(typeof window<`u`&&window.localStorage)try{let e=window.localStorage.getItem(`TASTY_DEBUG`);if(e!==null&&e.toLowerCase()===`true`)return!0}catch{}if(typeof process>`u`)return!1;let e=process.env.NODE_ENV;return e!==`test`&&e!==`production`}function Bs(e){let t=e.charCodeAt(0);return t===38||t===46||t>=65&&t<=90}const Vs=zs(),Hs=`@inherit`;function Us(e){Vs&&console.warn(`[Tasty] @inherit used for state '${e}' that does not exist in the parent style map. Entry skipped.`)}function Ws(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Gs(e){return Ws(e)?e:e!=null&&e!==!1?{"":e}:null}function Ks(e,t){let n=!(``in t),r=Gs(e);if(!r){let e={};for(let n of Object.keys(t)){let r=t[n];r!==null&&r!==Hs&&(e[n]=r)}return e}return n?qs(r,t):Js(r,t)}function qs(e,t){let n={},r=Object.keys(t),i=new Set(r);for(let r of Object.keys(e)){if(!i.has(r)){n[r]=e[r];continue}let a=t[r];a!==null&&a!==Hs&&(n[r]=a)}for(let i of r){let r=t[i];r===Hs?i in e?n[i]=e[i]:Us(i):r!==null&&!(i in e)&&(n[i]=r)}return n}function Js(e,t){let n={};for(let r of Object.keys(t)){let i=t[r];i===Hs?r in e?n[r]=e[r]:Us(r):i!==null&&(n[r]=i)}return n}function Ys(e,t){let n=e,r=t,i={...n,...r};for(let e of Object.keys(r)){let t=r[e];t===void 0?n&&e in n&&(i[e]=n[e]):t===null?delete i[e]:Ws(t)&&(i[e]=Ks(n?n[e]:void 0,t))}return i}function Xs(...e){let t=e[0]?{...e[0]}:{},n=1;for(;n in e;){let r=Object.keys(t).filter(e=>Bs(e)&&t[e]),i=e[n];if(i){let e={...t,...i},n=Object.keys(i).filter(Bs),a=/* @__PURE__ */ new Set([...r,...n]);for(let n of a){let r=i?.[n];r===!1||r===null?delete e[n]:r===void 0?e[n]=t[n]:r&&(e[n]=Ys(t[n],r))}for(let n of Object.keys(i)){if(Bs(n))continue;let r=i[n];r===void 0?n in t?e[n]=t[n]:delete e[n]:r===null?delete e[n]:Ws(r)&&(e[n]=Ks(t[n],r))}t=e}n++}return t}const Zs={"$item-shadow":`0 1px .375x #shadow-sm`,"$button-shadow":`0 1px 2px -.5px #shadow-sm`,"$card-shadow":`0 .5x 2x #shadow-md`,$shadow:`0 .5x 2x #shadow-md`,"$dialog-shadow":`0 1x 4x #shadow-lg`},Qs={"#text":`#surface-text-soft`,"#dark":`#surface-text`,"#dark-01":`#surface-text`,"#dark-02":`#surface-text-soft`,"#dark-03":`#surface-text-soft-2`,"#dark-04":`#placeholder`,"#dark-05":`#border`,"#fixed-dark":`#special-surface`,"#fixed-primary-text":`#special-accent-text`,"#minor":`#surface-text-soft.65`,"#shadow":`#shadow-md`,"#light":`#surface-3`,"#dark-bg":`#surface-2`,"#clear":`transparent`,"#pink":`okhsl(5 100% 67%)`,"#primary":`#primary-accent-surface`,"#primary-text":`#primary-accent-text`,"#primary-text-soft":`#primary-accent-text-soft`,"#primary-bg":`#primary-surface`,"#primary-icon":`#primary-accent-icon`,"#primary-hover":`#primary-accent-surface-hover`,"#primary-desaturated":`#primary-accent-surface-2`,"#primary-disabled":`#disabled`,"#purple":`#purple-accent-surface`,"#purple-text":`#purple-accent-text`,"#purple-text-soft":`#purple-accent-text-soft`,"#purple-bg":`#purple-surface`,"#purple-icon":`#purple-accent-icon`,"#purple-hover":`#purple-accent-surface-hover`,"#purple-disabled":`#disabled`,"#purple-01":`#purple-accent-surface`,"#purple-02":`#purple-accent-surface-2`,"#purple-03":`#purple-accent-surface-3`,"#purple-04":`#purple-surface`,"#danger":`#danger-accent-surface`,"#danger-text":`#danger-accent-text`,"#danger-text-soft":`#danger-accent-text-soft`,"#danger-bg":`#danger-surface`,"#danger-icon":`#danger-accent-icon`,"#danger-hover":`#danger-accent-surface-hover`,"#danger-desaturated":`#danger-accent-surface-2`,"#danger-disabled":`#disabled`,"#success":`#success-accent-surface`,"#success-text":`#success-accent-text`,"#success-text-soft":`#success-accent-text-soft`,"#success-bg":`#success-surface`,"#success-icon":`#success-accent-icon`,"#success-hover":`#success-accent-surface-hover`,"#success-desaturated":`#success-accent-surface-2`,"#success-disabled":`#disabled`,"#warning":`#warning-accent-surface`,"#warning-text":`#warning-accent-text`,"#warning-text-soft":`#warning-accent-text-soft`,"#warning-bg":`#warning-surface`,"#warning-icon":`#warning-accent-icon`,"#warning-hover":`#warning-accent-surface-hover`,"#warning-desaturated":`#warning-accent-surface-2`,"#warning-disabled":`#disabled`,"#note":`#note-accent-surface`,"#note-text":`#note-accent-text`,"#note-text-soft":`#note-accent-text-soft`,"#note-bg":`#note-surface`,"#note-icon":`#note-accent-icon`,"#note-hover":`#note-accent-surface-hover`,"#note-desaturated":`#note-accent-surface-2`,"#note-disabled":`#disabled`},$s={"#current-fill":`#surface`};let ec=null,tc=-1;function nc(){let e=es();return(!ec||tc!==e)&&(ec={...Is(),...Qs,...$s},tc=e),ec}Bo(nc),Xs(Zs,{"#scrollbar-thumb":zo[`#scrollbar-thumb`],"#scrollbar-outline":zo[`#scrollbar-outline`],"#scrollbar-bg":zo[`#scrollbar-bg`],"#scrollbar-corner":zo[`#scrollbar-corner`]});export{Rs as getCodeTheme,nc as getColorTokens,Ls as getPalette,Is as getPaletteTokens,r as glaze,_o as measure};
|
package/dist/hooks/use-action.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { mergeProps as mergeProps$1 } from "../utils/merge-props.js";
|
|
3
3
|
import { useEvent } from "./use-event.js";
|
|
4
4
|
import { useFocus as useFocus$1 } from "../utils/interactions.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "./use-layout-effect.js";
|
|
3
3
|
import { isLastPressIn, trackPresses } from "../components/Tooltip/last-press.js";
|
|
4
4
|
import { useTooltipTriggerBinding } from "../components/Tooltip/TooltipTrigger.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "./use-layout-effect.js";
|
|
3
3
|
import { useCallback, useRef, useState } from "react";
|
|
4
4
|
//#region src/hooks/use-buffered-value.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
4
|
//#region src/hooks/use-combined-refs.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { createSharedStore } from "../utils/shared-store.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useEffect } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
//#region src/hooks/use-debounced-value.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { deprecationWarning } from "../utils/warnings.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import React, { useEffect } from "react";
|
package/dist/hooks/use-event.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { useSyncRef } from "./use-sync-ref.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
//#region src/hooks/use-event.ts
|
package/dist/hooks/use-id.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "./use-layout-effect.js";
|
|
3
3
|
import "react/compiler-runtime";
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
//#region src/hooks/use-is-darwin.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { useIsDarwin } from "./use-is-darwin.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
//#region src/hooks/use-key-symbols.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
//#region src/hooks/use-layout-effect.tsx
|
|
4
4
|
const useLayoutEffect$1 = typeof window !== "undefined" ? React$1.useLayoutEffect : React$1.useEffect;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "./use-event.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { useSyncExternalStore } from "react";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { mergeStyles } from "@tenphi/tasty";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
4
|
//#region src/hooks/use-merge-styles.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
//#region src/hooks/use-open-key.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { useEvent } from "./use-event.js";
|
|
3
3
|
import { isComposingKey } from "../utils/overlay-key-propagation.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-ef259f7 | Cube Dev Team */
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { useEffect, useEffectEvent, useRef } from "react";
|
|
4
4
|
import { useOverlayPosition } from "react-aria";
|