@cube-dev/ui-kit 0.118.0 → 0.119.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +18 -0
- package/dist/_internal/hooks/use-chained-callback.js +1 -1
- package/dist/_internal/hooks/use-debounced-value.js +1 -1
- package/dist/_internal/hooks/use-deprecation-warning.js +1 -1
- package/dist/_internal/hooks/use-event.js +1 -1
- package/dist/_internal/hooks/use-is-first-render.js +1 -1
- package/dist/_internal/hooks/use-sync-ref.js +1 -1
- package/dist/_internal/hooks/use-timer/timer.js +1 -1
- package/dist/_internal/hooks/use-timer/use-timer.js +1 -1
- package/dist/_internal/hooks/use-warn.js +1 -1
- package/dist/components/Block.d.ts +1 -2
- package/dist/components/Block.js +2 -5
- package/dist/components/Block.js.map +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +2 -3
- package/dist/components/GlobalStyles.js.map +1 -1
- package/dist/components/GridProvider.d.ts +1 -2
- package/dist/components/GridProvider.js +2 -3
- package/dist/components/GridProvider.js.map +1 -1
- package/dist/components/HiddenInput.js +2 -2
- package/dist/components/HiddenInput.js.map +1 -1
- package/dist/components/Root.d.ts +1 -2
- package/dist/components/Root.js +2 -6
- package/dist/components/Root.js.map +1 -1
- package/dist/components/actions/Action/Action.d.ts +1 -2
- package/dist/components/actions/Action/Action.js +2 -4
- package/dist/components/actions/Action/Action.js.map +1 -1
- package/dist/components/actions/Banner/Banner.js +2 -2
- package/dist/components/actions/Banner/Banner.js.map +1 -1
- package/dist/components/actions/Button/Button.d.ts +3 -1769
- package/dist/components/actions/Button/Button.js +2 -4
- package/dist/components/actions/Button/Button.js.map +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +2 -2
- package/dist/components/actions/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.d.ts +1 -3
- package/dist/components/actions/CommandMenu/CommandMenu.js +2 -4
- package/dist/components/actions/CommandMenu/CommandMenu.js.map +1 -1
- package/dist/components/actions/CommandMenu/styled.js +3 -3
- package/dist/components/actions/CommandMenu/styled.js.map +1 -1
- package/dist/components/actions/ItemAction/ItemAction.d.ts +1 -3
- package/dist/components/actions/ItemAction/ItemAction.js +2 -2
- package/dist/components/actions/ItemAction/ItemAction.js.map +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.d.ts +1 -2
- package/dist/components/actions/ItemButton/ItemButton.js +2 -2
- package/dist/components/actions/ItemButton/ItemButton.js.map +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.d.ts +1 -3
- package/dist/components/actions/Menu/Menu.js +2 -4
- package/dist/components/actions/Menu/Menu.js.map +1 -1
- package/dist/components/actions/Menu/MenuItem.d.ts +1 -2
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js.map +1 -1
- package/dist/components/actions/Menu/MenuSection.d.ts +1 -2
- package/dist/components/actions/Menu/MenuSection.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js.map +1 -1
- package/dist/components/actions/Menu/MenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubMenuTrigger.js +1 -1
- package/dist/components/actions/Menu/SubmenuTriggerContext.js +1 -1
- package/dist/components/actions/Menu/context.js +1 -1
- package/dist/components/actions/Menu/styled.js +2 -2
- package/dist/components/actions/Menu/styled.js.map +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.d.ts +1 -2
- package/dist/components/actions/use-action.js +2 -2
- package/dist/components/actions/use-action.js.map +1 -1
- package/dist/components/actions/use-anchored-menu.js +1 -1
- package/dist/components/actions/use-context-menu.js +1 -1
- package/dist/components/content/ActiveZone/ActiveZone.d.ts +1 -2
- package/dist/components/content/ActiveZone/ActiveZone.js +2 -5
- package/dist/components/content/ActiveZone/ActiveZone.js.map +1 -1
- package/dist/components/content/Alert/Alert.js +2 -2
- package/dist/components/content/Alert/Alert.js.map +1 -1
- package/dist/components/content/Alert/types.d.ts +1 -2
- package/dist/components/content/Alert/use-alert.js +2 -4
- package/dist/components/content/Alert/use-alert.js.map +1 -1
- package/dist/components/content/Avatar/Avatar.d.ts +1 -3
- package/dist/components/content/Avatar/Avatar.js +2 -5
- package/dist/components/content/Avatar/Avatar.js.map +1 -1
- package/dist/components/content/Badge/Badge.js +2 -2
- package/dist/components/content/Badge/Badge.js.map +1 -1
- package/dist/components/content/Card/Card.d.ts +1 -2
- package/dist/components/content/Card/Card.js +2 -5
- package/dist/components/content/Card/Card.js.map +1 -1
- package/dist/components/content/Content.d.ts +1 -2
- package/dist/components/content/Content.js +2 -5
- package/dist/components/content/Content.js.map +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.d.ts +1 -3
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +2 -4
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js.map +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +2 -2
- package/dist/components/content/CopySnippet/CopySnippet.js.map +1 -1
- package/dist/components/content/Disclosure/Disclosure.d.ts +1 -3
- package/dist/components/content/Disclosure/Disclosure.js +2 -4
- package/dist/components/content/Disclosure/Disclosure.js.map +1 -1
- package/dist/components/content/Divider.d.ts +1 -2
- package/dist/components/content/Divider.js +2 -4
- package/dist/components/content/Divider.js.map +1 -1
- package/dist/components/content/Footer.d.ts +1 -2
- package/dist/components/content/Footer.js +2 -5
- package/dist/components/content/Footer.js.map +1 -1
- package/dist/components/content/Header.d.ts +1 -2
- package/dist/components/content/Header.js +2 -5
- package/dist/components/content/Header.js.map +1 -1
- package/dist/components/content/HotKeys/HotKeys.d.ts +1 -2
- package/dist/components/content/HotKeys/HotKeys.js +2 -5
- package/dist/components/content/HotKeys/HotKeys.js.map +1 -1
- package/dist/components/content/Item/Item.d.ts +1 -3
- package/dist/components/content/Item/Item.js +2 -3
- package/dist/components/content/Item/Item.js.map +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.d.ts +1 -2
- package/dist/components/content/ItemBadge/ItemBadge.js +2 -2
- package/dist/components/content/ItemBadge/ItemBadge.js.map +1 -1
- package/dist/components/content/Layout/GridLayout.d.ts +1 -2
- package/dist/components/content/Layout/GridLayout.js +2 -2
- package/dist/components/content/Layout/GridLayout.js.map +1 -1
- package/dist/components/content/Layout/Layout.d.ts +1 -3
- package/dist/components/content/Layout/Layout.js +3 -7
- package/dist/components/content/Layout/Layout.js.map +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +2 -2
- package/dist/components/content/Layout/LayoutBlock.js.map +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +2 -2
- package/dist/components/content/Layout/LayoutCenter.js.map +1 -1
- package/dist/components/content/Layout/LayoutContainer.d.ts +1 -3
- package/dist/components/content/Layout/LayoutContainer.js +2 -6
- package/dist/components/content/Layout/LayoutContainer.js.map +1 -1
- package/dist/components/content/Layout/LayoutContent.d.ts +1 -2
- package/dist/components/content/Layout/LayoutContent.js +2 -6
- package/dist/components/content/Layout/LayoutContent.js.map +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +2 -2
- package/dist/components/content/Layout/LayoutFlex.js.map +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +2 -2
- package/dist/components/content/Layout/LayoutFooter.js.map +1 -1
- package/dist/components/content/Layout/LayoutGrid.d.ts +1 -2
- package/dist/components/content/Layout/LayoutGrid.js +2 -2
- package/dist/components/content/Layout/LayoutGrid.js.map +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +2 -2
- package/dist/components/content/Layout/LayoutHeader.js.map +1 -1
- package/dist/components/content/Layout/LayoutPane.d.ts +1 -3
- package/dist/components/content/Layout/LayoutPane.js +2 -6
- package/dist/components/content/Layout/LayoutPane.js.map +1 -1
- package/dist/components/content/Layout/LayoutPanel.d.ts +1 -3
- package/dist/components/content/Layout/LayoutPanel.js +2 -6
- package/dist/components/content/Layout/LayoutPanel.js.map +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.d.ts +1 -2
- package/dist/components/content/Layout/LayoutPanelHeader.js +2 -4
- package/dist/components/content/Layout/LayoutPanelHeader.js.map +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +2 -2
- package/dist/components/content/Layout/LayoutToolbar.js.map +1 -1
- package/dist/components/content/Layout/hooks/useTinyScrollbar.js +1 -1
- package/dist/components/content/Layout/index.js +1 -1
- package/dist/components/content/Layout/utils.js +1 -1
- package/dist/components/content/Paragraph.d.ts +1 -2
- package/dist/components/content/Paragraph.js +2 -3
- package/dist/components/content/Paragraph.js.map +1 -1
- package/dist/components/content/Placeholder/Placeholder.d.ts +1 -3
- package/dist/components/content/Placeholder/Placeholder.js +2 -6
- package/dist/components/content/Placeholder/Placeholder.js.map +1 -1
- package/dist/components/content/PrismCode/PrismCode.d.ts +1 -3
- package/dist/components/content/PrismCode/PrismCode.js +2 -3
- package/dist/components/content/PrismCode/PrismCode.js.map +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.d.ts +1 -3
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js.map +1 -1
- package/dist/components/content/Result/Result.d.ts +1 -2
- package/dist/components/content/Result/Result.js +2 -5
- package/dist/components/content/Result/Result.js.map +1 -1
- package/dist/components/content/Skeleton/Skeleton.d.ts +1 -2
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/content/Tag/Tag.d.ts +1 -2
- package/dist/components/content/Tag/Tag.js +2 -2
- package/dist/components/content/Tag/Tag.js.map +1 -1
- package/dist/components/content/Text.d.ts +128 -159
- package/dist/components/content/Text.js +2 -5
- package/dist/components/content/Text.js.map +1 -1
- package/dist/components/content/TextItem/TextItem.d.ts +1 -2
- package/dist/components/content/TextItem/TextItem.js +2 -5
- package/dist/components/content/TextItem/TextItem.js.map +1 -1
- package/dist/components/content/Title.d.ts +1 -2
- package/dist/components/content/Title.js +2 -5
- package/dist/components/content/Title.js.map +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/highlightText.js.map +1 -1
- package/dist/components/content/use-auto-tooltip.d.ts +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/content/use-auto-tooltip.js.map +1 -1
- package/dist/components/fields/Checkbox/Checkbox.d.ts +1 -3
- package/dist/components/fields/Checkbox/Checkbox.js +2 -5
- package/dist/components/fields/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.d.ts +1 -3
- package/dist/components/fields/Checkbox/CheckboxGroup.js +2 -4
- package/dist/components/fields/Checkbox/CheckboxGroup.js.map +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.d.ts +1 -3
- package/dist/components/fields/ComboBox/ComboBox.js +2 -4
- package/dist/components/fields/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/fields/DatePicker/DateInput.d.ts +1 -3
- package/dist/components/fields/DatePicker/DateInput.js +2 -3
- package/dist/components/fields/DatePicker/DateInput.js.map +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +2 -4
- package/dist/components/fields/DatePicker/DateInputBase.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePicker.d.ts +1 -3
- package/dist/components/fields/DatePicker/DatePicker.js +2 -3
- package/dist/components/fields/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +2 -2
- package/dist/components/fields/DatePicker/DatePickerButton.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +2 -2
- package/dist/components/fields/DatePicker/DatePickerElement.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +2 -2
- package/dist/components/fields/DatePicker/DatePickerInput.js.map +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +2 -2
- package/dist/components/fields/DatePicker/DatePickerSegment.js.map +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.d.ts +1 -3
- package/dist/components/fields/DatePicker/DateRangePicker.js +2 -4
- package/dist/components/fields/DatePicker/DateRangePicker.js.map +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.d.ts +1 -3
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +2 -4
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js.map +1 -1
- package/dist/components/fields/DatePicker/TimeInput.d.ts +1 -3
- package/dist/components/fields/DatePicker/TimeInput.js +2 -3
- package/dist/components/fields/DatePicker/TimeInput.js.map +1 -1
- package/dist/components/fields/DatePicker/intl.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/props.js +1 -1
- package/dist/components/fields/DatePicker/utils.js +1 -1
- package/dist/components/fields/FileInput/FileInput.d.ts +1 -3
- package/dist/components/fields/FileInput/FileInput.js +2 -4
- package/dist/components/fields/FileInput/FileInput.js.map +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.d.ts +1 -2
- package/dist/components/fields/FilterListBox/FilterListBox.js +5 -7
- package/dist/components/fields/FilterListBox/FilterListBox.js.map +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.d.ts +1 -3
- package/dist/components/fields/FilterPicker/FilterPicker.js +2 -5
- package/dist/components/fields/FilterPicker/FilterPicker.js.map +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/ListBox.d.ts +1 -3
- package/dist/components/fields/ListBox/ListBox.js +2 -5
- package/dist/components/fields/ListBox/ListBox.js.map +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +2 -2
- package/dist/components/fields/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +2 -2
- package/dist/components/fields/NumberInput/StepButton.js.map +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.d.ts +1 -3
- package/dist/components/fields/Picker/Picker.js +2 -5
- package/dist/components/fields/Picker/Picker.js.map +1 -1
- package/dist/components/fields/RadioGroup/Radio.d.ts +1 -2
- package/dist/components/fields/RadioGroup/Radio.js +2 -5
- package/dist/components/fields/RadioGroup/Radio.js.map +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.d.ts +1 -3
- package/dist/components/fields/RadioGroup/RadioGroup.js +2 -4
- package/dist/components/fields/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.d.ts +834 -836
- package/dist/components/fields/Select/Select.js +2 -4
- package/dist/components/fields/Select/Select.js.map +1 -1
- package/dist/components/fields/Slider/Gradation.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js +1 -1
- package/dist/components/fields/Slider/HueSlider.js.map +1 -1
- package/dist/components/fields/Slider/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.d.ts +1 -3
- package/dist/components/fields/Slider/Slider.js +2 -3
- package/dist/components/fields/Slider/Slider.js.map +1 -1
- package/dist/components/fields/Slider/SliderBase.js +2 -4
- package/dist/components/fields/Slider/SliderBase.js.map +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js.map +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js.map +1 -1
- package/dist/components/fields/Slider/elements.js +2 -2
- package/dist/components/fields/Slider/elements.js.map +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Slider/types.d.ts +1 -3
- package/dist/components/fields/Switch/Switch.d.ts +1 -3
- package/dist/components/fields/Switch/Switch.js +2 -4
- package/dist/components/fields/Switch/Switch.js.map +1 -1
- package/dist/components/fields/TextArea/TextArea.js +1 -1
- package/dist/components/fields/TextInput/TextInput.js +1 -1
- package/dist/components/fields/TextInput/TextInputBase.d.ts +1 -3
- package/dist/components/fields/TextInput/TextInputBase.js +3 -5
- package/dist/components/fields/TextInput/TextInputBase.js.map +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +2 -2
- package/dist/components/form/FieldWrapper/FieldWrapper.js.map +1 -1
- package/dist/components/form/FieldWrapper/extract-field-wrapper-props.js +1 -1
- package/dist/components/form/FieldWrapper/types.d.ts +1 -3
- package/dist/components/form/Form/Field.d.ts +1 -2
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Field.js.map +1 -1
- package/dist/components/form/Form/Form.d.ts +1 -3
- package/dist/components/form/Form/Form.js +2 -5
- package/dist/components/form/Form/Form.js.map +1 -1
- package/dist/components/form/Form/ResetButton/ResetButton.js +1 -1
- package/dist/components/form/Form/SubmitButton/SubmitButton.js +1 -1
- package/dist/components/form/Form/SubmitError.js +1 -1
- package/dist/components/form/Form/index.js +1 -1
- package/dist/components/form/Form/use-field/use-field-props.js +1 -1
- package/dist/components/form/Form/use-field/use-field.js +1 -1
- package/dist/components/form/Form/use-form.js +2 -2
- package/dist/components/form/Form/use-form.js.map +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.d.ts +1 -3
- package/dist/components/form/Label.js +2 -5
- package/dist/components/form/Label.js.map +1 -1
- package/dist/components/form/wrapper.d.ts +1 -2
- package/dist/components/form/wrapper.js +1 -1
- package/dist/components/form/wrapper.js.map +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +2 -2
- package/dist/components/helpers/IconSwitch/IconSwitch.js.map +1 -1
- package/dist/components/layout/Flex.d.ts +1 -2
- package/dist/components/layout/Flex.js +2 -5
- package/dist/components/layout/Flex.js.map +1 -1
- package/dist/components/layout/Flow.d.ts +1 -2
- package/dist/components/layout/Flow.js +2 -5
- package/dist/components/layout/Flow.js.map +1 -1
- package/dist/components/layout/Grid.d.ts +1 -2
- package/dist/components/layout/Grid.js +2 -5
- package/dist/components/layout/Grid.js.map +1 -1
- package/dist/components/layout/Panel.d.ts +1 -3
- package/dist/components/layout/Panel.js +2 -3
- package/dist/components/layout/Panel.js.map +1 -1
- package/dist/components/layout/Prefix.d.ts +1 -2
- package/dist/components/layout/Prefix.js +2 -5
- package/dist/components/layout/Prefix.js.map +1 -1
- package/dist/components/layout/ResizablePanel.d.ts +1 -2
- package/dist/components/layout/ResizablePanel.js +2 -2
- package/dist/components/layout/ResizablePanel.js.map +1 -1
- package/dist/components/layout/Space.d.ts +1 -2
- package/dist/components/layout/Space.js +2 -5
- package/dist/components/layout/Space.js.map +1 -1
- package/dist/components/layout/Suffix.d.ts +1 -2
- package/dist/components/layout/Suffix.js +2 -5
- package/dist/components/layout/Suffix.js.map +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.js +1 -1
- package/dist/components/navigation/Tabs/EditableTitle.js +1 -1
- package/dist/components/navigation/Tabs/TabButton.js +1 -1
- package/dist/components/navigation/Tabs/TabDropIndicator.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js +1 -1
- package/dist/components/navigation/Tabs/TabPanel.js.map +1 -1
- package/dist/components/navigation/Tabs/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +2 -4
- package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +2 -2
- package/dist/components/navigation/Tabs/TabsAction.js.map +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +2 -2
- package/dist/components/navigation/Tabs/styled.js.map +1 -1
- package/dist/components/navigation/Tabs/types.d.ts +1 -3
- package/dist/components/navigation/Tabs/types.js +1 -1
- package/dist/components/navigation/Tabs/types.js.map +1 -1
- package/dist/components/navigation/Tabs/use-tab-editing.js +1 -1
- package/dist/components/navigation/Tabs/use-tab-indicator.js +1 -1
- package/dist/components/organisms/FileTabs/FileTabs.d.ts +1 -2
- package/dist/components/organisms/FileTabs/FileTabs.js +2 -2
- package/dist/components/organisms/FileTabs/FileTabs.js.map +1 -1
- package/dist/components/organisms/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +2 -2
- package/dist/components/other/Calendar/Calendar.js.map +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +2 -2
- package/dist/components/other/Calendar/CalendarCell.js.map +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +2 -2
- package/dist/components/other/Calendar/CalendarGrid.js.map +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +2 -2
- package/dist/components/other/Calendar/RangeCalendar.js.map +1 -1
- package/dist/components/other/CloudLogo/CloudLogo.js +2 -2
- package/dist/components/other/CloudLogo/CloudLogo.js.map +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogApiProvider.js +1 -1
- package/dist/components/overlays/AlertDialog/AlertDialogZone.js +1 -1
- package/dist/components/overlays/AlertDialog/types.d.ts +1 -1
- package/dist/components/overlays/Dialog/Dialog.d.ts +1 -3
- package/dist/components/overlays/Dialog/Dialog.js +2 -4
- package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogContainer.js +1 -1
- package/dist/components/overlays/Dialog/DialogForm.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.d.ts +1 -2
- package/dist/components/overlays/Dialog/DialogTrigger.js +1 -1
- package/dist/components/overlays/Dialog/DialogTrigger.js.map +1 -1
- package/dist/components/overlays/Dialog/context.js +1 -1
- package/dist/components/overlays/Dialog/use-dialog-container.js +1 -1
- package/dist/components/overlays/Modal/Modal.d.ts +3 -2
- package/dist/components/overlays/Modal/Modal.js +2 -2
- package/dist/components/overlays/Modal/Modal.js.map +1 -1
- package/dist/components/overlays/Modal/OpenTransition.js +1 -1
- package/dist/components/overlays/Modal/Overlay.d.ts +1 -0
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js.map +1 -1
- package/dist/components/overlays/Modal/Popover.d.ts +1 -1
- package/dist/components/overlays/Modal/Popover.js +2 -2
- package/dist/components/overlays/Modal/Popover.js.map +1 -1
- package/dist/components/overlays/Modal/Tray.d.ts +1 -1
- package/dist/components/overlays/Modal/Tray.js +2 -2
- package/dist/components/overlays/Modal/Tray.js.map +1 -1
- package/dist/components/overlays/Modal/Underlay.js +2 -2
- package/dist/components/overlays/Modal/Underlay.js.map +1 -1
- package/dist/components/overlays/Notifications/Notification.js +1 -1
- package/dist/components/overlays/Notifications/NotificationAction.js +1 -1
- package/dist/components/overlays/Notifications/NotificationCard.js +2 -2
- package/dist/components/overlays/Notifications/NotificationCard.js.map +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.d.ts +2 -0
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +2 -2
- package/dist/components/overlays/Notifications/NotificationItem.js.map +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +2 -2
- package/dist/components/overlays/Notifications/OverlayContainer.js.map +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +2 -2
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js.map +1 -1
- package/dist/components/overlays/Notifications/dismissed-storage.js +1 -1
- package/dist/components/overlays/Notifications/format-relative-time.js +1 -1
- package/dist/components/overlays/Notifications/index.js +1 -1
- package/dist/components/overlays/Notifications/use-notification-state.js +1 -1
- package/dist/components/overlays/Notifications/use-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-overlay-timers.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-notifications.js +1 -1
- package/dist/components/overlays/Notifications/use-persistent-state.js +1 -1
- package/dist/components/overlays/Notifications/use-toast-state.js +1 -1
- package/dist/components/overlays/Toast/ToastItem.js +2 -2
- package/dist/components/overlays/Toast/ToastItem.js.map +1 -1
- package/dist/components/overlays/Toast/index.js +1 -1
- package/dist/components/overlays/Toast/useProgressToast.js +1 -1
- package/dist/components/overlays/Toast/useToast.js +2 -2
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +1 -3
- package/dist/components/overlays/Tooltip/Tooltip.js +2 -4
- package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.d.ts +1 -2
- package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js.map +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/overlays/Tooltip/context.js.map +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/portal/PortalProvider.d.ts +2 -0
- package/dist/components/portal/PortalProvider.js +1 -1
- package/dist/components/portal/index.d.ts +1 -0
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/InvalidIcon.js +1 -1
- package/dist/components/shared/ValidIcon.js +1 -1
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js +2 -2
- package/dist/components/status/LoadingAnimation/LoadingAnimation.js.map +1 -1
- package/dist/components/status/Spin/Cube.js +2 -2
- package/dist/components/status/Spin/Cube.js.map +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +2 -2
- package/dist/components/status/Spin/InternalSpinner.js.map +1 -1
- package/dist/components/status/Spin/Spin.js +2 -2
- package/dist/components/status/Spin/Spin.js.map +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +2 -2
- package/dist/components/status/Spin/SpinsContainer.js.map +1 -1
- package/dist/components/status/Spin/types.d.ts +1 -2
- package/dist/data/item-themes.d.ts +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/item-themes.js.map +1 -1
- package/dist/data/themes.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/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 +2 -2
- package/dist/icons/DirectionIcon.js.map +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/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.d.ts +1 -3
- package/dist/icons/Icon.js +2 -3
- package/dist/icons/Icon.js.map +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/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.d.ts +4 -35
- package/dist/index.js +5 -31
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts +1 -2
- package/dist/provider.js +1 -1
- package/dist/provider.js.map +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/shared/form.d.ts +1 -3
- package/dist/tokens/base.d.ts +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/base.js.map +1 -1
- package/dist/tokens/colors.d.ts +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/colors.js.map +1 -1
- package/dist/tokens/index.d.ts +1 -2
- package/dist/tokens/index.js +2 -3
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/layout.d.ts +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/layout.js.map +1 -1
- package/dist/tokens/shadows.d.ts +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/shadows.js.map +1 -1
- package/dist/tokens/sizes.d.ts +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/sizes.js.map +1 -1
- package/dist/tokens/spacing.d.ts +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/spacing.js.map +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/is-dev-env.js +5 -10
- package/dist/utils/is-dev-env.js.map +1 -1
- package/dist/utils/modules.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/react/RenderCache.js +1 -1
- package/dist/utils/react/Slots.js +1 -1
- package/dist/utils/react/chain.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.d.ts +3 -3
- package/dist/utils/react/index.js +20 -0
- package/dist/utils/react/interactions.js +1 -1
- package/dist/utils/react/isTextOnly.js +1 -1
- package/dist/utils/react/mapProps.js +1 -1
- package/dist/utils/react/mergeProps.d.ts +1 -2
- package/dist/utils/react/mergeProps.js +2 -2
- package/dist/utils/react/mergeProps.js.map +1 -1
- package/dist/utils/react/nullableValue.d.ts +1 -2
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/nullableValue.js.map +1 -1
- package/dist/utils/react/resolveIcon.d.ts +1 -2
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/resolveIcon.js.map +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useCombinedRefs.js +1 -1
- package/dist/utils/react/useControlledFocusVisible.js +1 -1
- package/dist/utils/react/useEventBus.js +1 -1
- package/dist/utils/react/useId.js +1 -1
- package/dist/utils/react/useIsDarwin.js +1 -1
- package/dist/utils/react/useKeySymbols.js +1 -1
- package/dist/utils/react/useLayoutEffect.js +1 -1
- package/dist/utils/react/useLocalStorage.js +1 -1
- package/dist/utils/react/useMergeStyles.d.ts +1 -2
- package/dist/utils/react/useMergeStyles.js +2 -2
- package/dist/utils/react/useMergeStyles.js.map +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +2 -2
- package/package.json +4 -21
- package/dist/_virtual/_rolldown/runtime.js +0 -8
- package/dist/chunks/cacheKey.js +0 -71
- package/dist/chunks/cacheKey.js.map +0 -1
- package/dist/chunks/definitions.js +0 -261
- package/dist/chunks/definitions.js.map +0 -1
- package/dist/chunks/renderChunk.js +0 -68
- package/dist/chunks/renderChunk.js.map +0 -1
- package/dist/config.js +0 -232
- package/dist/config.js.map +0 -1
- package/dist/css-writer.d.ts +0 -46
- package/dist/css-writer.js +0 -75
- package/dist/css-writer.js.map +0 -1
- package/dist/extractor.d.ts +0 -25
- package/dist/extractor.js +0 -151
- package/dist/extractor.js.map +0 -1
- package/dist/injector/injector.js +0 -401
- package/dist/injector/injector.js.map +0 -1
- package/dist/injector/sheet-manager.js +0 -715
- package/dist/injector/sheet-manager.js.map +0 -1
- package/dist/injector/types.d.ts +0 -19
- package/dist/keyframes/index.js +0 -157
- package/dist/keyframes/index.js.map +0 -1
- package/dist/parser/classify.js +0 -320
- package/dist/parser/classify.js.map +0 -1
- package/dist/parser/const.js +0 -34
- package/dist/parser/const.js.map +0 -1
- package/dist/parser/lru.js +0 -110
- package/dist/parser/lru.js.map +0 -1
- package/dist/parser/parser.js +0 -117
- package/dist/parser/parser.js.map +0 -1
- package/dist/parser/tokenizer.js +0 -70
- package/dist/parser/tokenizer.js.map +0 -1
- package/dist/parser/types.d.ts +0 -38
- package/dist/parser/types.js +0 -47
- package/dist/parser/types.js.map +0 -1
- package/dist/pipeline/conditions.js +0 -378
- package/dist/pipeline/conditions.js.map +0 -1
- package/dist/pipeline/exclusive.js +0 -232
- package/dist/pipeline/exclusive.js.map +0 -1
- package/dist/pipeline/index.js +0 -633
- package/dist/pipeline/index.js.map +0 -1
- package/dist/pipeline/materialize.js +0 -822
- package/dist/pipeline/materialize.js.map +0 -1
- package/dist/pipeline/parseStateKey.js +0 -422
- package/dist/pipeline/parseStateKey.js.map +0 -1
- package/dist/pipeline/simplify.js +0 -558
- package/dist/pipeline/simplify.js.map +0 -1
- package/dist/plugins/okhsl-plugin.js +0 -346
- package/dist/plugins/okhsl-plugin.js.map +0 -1
- package/dist/plugins/types.d.ts +0 -52
- package/dist/properties/index.js +0 -142
- package/dist/properties/index.js.map +0 -1
- package/dist/states/index.js +0 -162
- package/dist/states/index.js.map +0 -1
- package/dist/styles/align.js +0 -15
- package/dist/styles/align.js.map +0 -1
- package/dist/styles/border.js +0 -115
- package/dist/styles/border.js.map +0 -1
- package/dist/styles/color.js +0 -24
- package/dist/styles/color.js.map +0 -1
- package/dist/styles/createStyle.js +0 -78
- package/dist/styles/createStyle.js.map +0 -1
- package/dist/styles/dimension.js +0 -100
- package/dist/styles/dimension.js.map +0 -1
- package/dist/styles/display.js +0 -68
- package/dist/styles/display.js.map +0 -1
- package/dist/styles/fade.js +0 -58
- package/dist/styles/fade.js.map +0 -1
- package/dist/styles/fill.js +0 -52
- package/dist/styles/fill.js.map +0 -1
- package/dist/styles/flow.js +0 -13
- package/dist/styles/flow.js.map +0 -1
- package/dist/styles/gap.js +0 -37
- package/dist/styles/gap.js.map +0 -1
- package/dist/styles/height.js +0 -21
- package/dist/styles/height.js.map +0 -1
- package/dist/styles/index.js +0 -10
- package/dist/styles/index.js.map +0 -1
- package/dist/styles/inset.js +0 -143
- package/dist/styles/inset.js.map +0 -1
- package/dist/styles/justify.js +0 -15
- package/dist/styles/justify.js.map +0 -1
- package/dist/styles/margin.js +0 -97
- package/dist/styles/margin.js.map +0 -1
- package/dist/styles/outline.js +0 -66
- package/dist/styles/outline.js.map +0 -1
- package/dist/styles/padding.js +0 -97
- package/dist/styles/padding.js.map +0 -1
- package/dist/styles/predefined.js +0 -233
- package/dist/styles/predefined.js.map +0 -1
- package/dist/styles/preset.js +0 -126
- package/dist/styles/preset.js.map +0 -1
- package/dist/styles/radius.js +0 -52
- package/dist/styles/radius.js.map +0 -1
- package/dist/styles/scrollbar.js +0 -109
- package/dist/styles/scrollbar.js.map +0 -1
- package/dist/styles/shadow.js +0 -28
- package/dist/styles/shadow.js.map +0 -1
- package/dist/styles/styledScrollbar.js +0 -39
- package/dist/styles/styledScrollbar.js.map +0 -1
- package/dist/styles/transition.js +0 -139
- package/dist/styles/transition.js.map +0 -1
- package/dist/styles/types.d.ts +0 -495
- package/dist/styles/width.js +0 -21
- package/dist/styles/width.js.map +0 -1
- package/dist/tasty/chunks/cacheKey.js +0 -71
- package/dist/tasty/chunks/cacheKey.js.map +0 -1
- package/dist/tasty/chunks/definitions.d.ts +0 -38
- package/dist/tasty/chunks/definitions.js +0 -261
- package/dist/tasty/chunks/definitions.js.map +0 -1
- package/dist/tasty/chunks/renderChunk.js +0 -68
- package/dist/tasty/chunks/renderChunk.js.map +0 -1
- package/dist/tasty/config.d.ts +0 -283
- package/dist/tasty/config.js +0 -401
- package/dist/tasty/config.js.map +0 -1
- package/dist/tasty/debug.d.ts +0 -200
- package/dist/tasty/debug.js +0 -734
- package/dist/tasty/debug.js.map +0 -1
- package/dist/tasty/hooks/useGlobalStyles.d.ts +0 -28
- package/dist/tasty/hooks/useGlobalStyles.js +0 -57
- package/dist/tasty/hooks/useGlobalStyles.js.map +0 -1
- package/dist/tasty/hooks/useKeyframes.d.ts +0 -57
- package/dist/tasty/hooks/useKeyframes.js +0 -55
- package/dist/tasty/hooks/useKeyframes.js.map +0 -1
- package/dist/tasty/hooks/useProperty.d.ts +0 -80
- package/dist/tasty/hooks/useProperty.js +0 -92
- package/dist/tasty/hooks/useProperty.js.map +0 -1
- package/dist/tasty/hooks/useRawCSS.d.ts +0 -54
- package/dist/tasty/hooks/useRawCSS.js +0 -29
- package/dist/tasty/hooks/useRawCSS.js.map +0 -1
- package/dist/tasty/hooks/useStyles.d.ts +0 -41
- package/dist/tasty/hooks/useStyles.js +0 -170
- package/dist/tasty/hooks/useStyles.js.map +0 -1
- package/dist/tasty/index.d.ts +0 -35
- package/dist/tasty/injector/index.d.ts +0 -158
- package/dist/tasty/injector/index.js +0 -155
- package/dist/tasty/injector/index.js.map +0 -1
- package/dist/tasty/injector/injector.d.ts +0 -137
- package/dist/tasty/injector/injector.js +0 -401
- package/dist/tasty/injector/injector.js.map +0 -1
- package/dist/tasty/injector/sheet-manager.d.ts +0 -128
- package/dist/tasty/injector/sheet-manager.js +0 -715
- package/dist/tasty/injector/sheet-manager.js.map +0 -1
- package/dist/tasty/injector/types.d.ts +0 -136
- package/dist/tasty/keyframes/index.js +0 -207
- package/dist/tasty/keyframes/index.js.map +0 -1
- package/dist/tasty/parser/classify.js +0 -320
- package/dist/tasty/parser/classify.js.map +0 -1
- package/dist/tasty/parser/const.js +0 -34
- package/dist/tasty/parser/const.js.map +0 -1
- package/dist/tasty/parser/lru.js +0 -110
- package/dist/tasty/parser/lru.js.map +0 -1
- package/dist/tasty/parser/parser.d.ts +0 -26
- package/dist/tasty/parser/parser.js +0 -117
- package/dist/tasty/parser/parser.js.map +0 -1
- package/dist/tasty/parser/tokenizer.js +0 -70
- package/dist/tasty/parser/tokenizer.js.map +0 -1
- package/dist/tasty/parser/types.d.ts +0 -47
- package/dist/tasty/parser/types.js +0 -47
- package/dist/tasty/parser/types.js.map +0 -1
- package/dist/tasty/pipeline/conditions.js +0 -378
- package/dist/tasty/pipeline/conditions.js.map +0 -1
- package/dist/tasty/pipeline/exclusive.js +0 -232
- package/dist/tasty/pipeline/exclusive.js.map +0 -1
- package/dist/tasty/pipeline/index.d.ts +0 -52
- package/dist/tasty/pipeline/index.js +0 -639
- package/dist/tasty/pipeline/index.js.map +0 -1
- package/dist/tasty/pipeline/materialize.js +0 -822
- package/dist/tasty/pipeline/materialize.js.map +0 -1
- package/dist/tasty/pipeline/parseStateKey.js +0 -422
- package/dist/tasty/pipeline/parseStateKey.js.map +0 -1
- package/dist/tasty/pipeline/simplify.js +0 -558
- package/dist/tasty/pipeline/simplify.js.map +0 -1
- package/dist/tasty/plugins/okhsl-plugin.d.ts +0 -36
- package/dist/tasty/plugins/okhsl-plugin.js +0 -372
- package/dist/tasty/plugins/okhsl-plugin.js.map +0 -1
- package/dist/tasty/plugins/types.d.ts +0 -72
- package/dist/tasty/properties/index.js +0 -159
- package/dist/tasty/properties/index.js.map +0 -1
- package/dist/tasty/states/index.d.ts +0 -44
- package/dist/tasty/states/index.js +0 -390
- package/dist/tasty/states/index.js.map +0 -1
- package/dist/tasty/static/index.d.ts +0 -6
- package/dist/tasty/static/index.js +0 -6
- package/dist/tasty/static/tastyStatic.d.ts +0 -47
- package/dist/tasty/static/tastyStatic.js +0 -32
- package/dist/tasty/static/tastyStatic.js.map +0 -1
- package/dist/tasty/static/types.d.ts +0 -50
- package/dist/tasty/static/types.js +0 -25
- package/dist/tasty/static/types.js.map +0 -1
- package/dist/tasty/styles/align.d.ts +0 -16
- package/dist/tasty/styles/align.js +0 -15
- package/dist/tasty/styles/align.js.map +0 -1
- package/dist/tasty/styles/border.d.ts +0 -26
- package/dist/tasty/styles/border.js +0 -115
- package/dist/tasty/styles/border.js.map +0 -1
- package/dist/tasty/styles/color.d.ts +0 -15
- package/dist/tasty/styles/color.js +0 -24
- package/dist/tasty/styles/color.js.map +0 -1
- package/dist/tasty/styles/createStyle.js +0 -78
- package/dist/tasty/styles/createStyle.js.map +0 -1
- package/dist/tasty/styles/dimension.js +0 -100
- package/dist/tasty/styles/dimension.js.map +0 -1
- package/dist/tasty/styles/display.d.ts +0 -38
- package/dist/tasty/styles/display.js +0 -68
- package/dist/tasty/styles/display.js.map +0 -1
- package/dist/tasty/styles/fade.d.ts +0 -16
- package/dist/tasty/styles/fade.js +0 -58
- package/dist/tasty/styles/fade.js.map +0 -1
- package/dist/tasty/styles/fill.d.ts +0 -45
- package/dist/tasty/styles/fill.js +0 -52
- package/dist/tasty/styles/fill.js.map +0 -1
- package/dist/tasty/styles/flow.d.ts +0 -17
- package/dist/tasty/styles/flow.js +0 -13
- package/dist/tasty/styles/flow.js.map +0 -1
- package/dist/tasty/styles/gap.d.ts +0 -32
- package/dist/tasty/styles/gap.js +0 -37
- package/dist/tasty/styles/gap.js.map +0 -1
- package/dist/tasty/styles/height.d.ts +0 -18
- package/dist/tasty/styles/height.js +0 -21
- package/dist/tasty/styles/height.js.map +0 -1
- package/dist/tasty/styles/index.d.ts +0 -3
- package/dist/tasty/styles/index.js +0 -10
- package/dist/tasty/styles/index.js.map +0 -1
- package/dist/tasty/styles/inset.d.ts +0 -51
- package/dist/tasty/styles/inset.js +0 -143
- package/dist/tasty/styles/inset.js.map +0 -1
- package/dist/tasty/styles/justify.d.ts +0 -16
- package/dist/tasty/styles/justify.js +0 -15
- package/dist/tasty/styles/justify.js.map +0 -1
- package/dist/tasty/styles/list.d.ts +0 -17
- package/dist/tasty/styles/list.js +0 -99
- package/dist/tasty/styles/list.js.map +0 -1
- package/dist/tasty/styles/margin.d.ts +0 -29
- package/dist/tasty/styles/margin.js +0 -97
- package/dist/tasty/styles/margin.js.map +0 -1
- package/dist/tasty/styles/outline.d.ts +0 -30
- package/dist/tasty/styles/outline.js +0 -66
- package/dist/tasty/styles/outline.js.map +0 -1
- package/dist/tasty/styles/padding.d.ts +0 -29
- package/dist/tasty/styles/padding.js +0 -97
- package/dist/tasty/styles/padding.js.map +0 -1
- package/dist/tasty/styles/predefined.d.ts +0 -74
- package/dist/tasty/styles/predefined.js +0 -242
- package/dist/tasty/styles/predefined.js.map +0 -1
- package/dist/tasty/styles/preset.d.ts +0 -48
- package/dist/tasty/styles/preset.js +0 -126
- package/dist/tasty/styles/preset.js.map +0 -1
- package/dist/tasty/styles/radius.d.ts +0 -15
- package/dist/tasty/styles/radius.js +0 -52
- package/dist/tasty/styles/radius.js.map +0 -1
- package/dist/tasty/styles/scrollbar.d.ts +0 -22
- package/dist/tasty/styles/scrollbar.js +0 -109
- package/dist/tasty/styles/scrollbar.js.map +0 -1
- package/dist/tasty/styles/shadow.d.ts +0 -15
- package/dist/tasty/styles/shadow.js +0 -28
- package/dist/tasty/styles/shadow.js.map +0 -1
- package/dist/tasty/styles/styledScrollbar.d.ts +0 -48
- package/dist/tasty/styles/styledScrollbar.js +0 -39
- package/dist/tasty/styles/styledScrollbar.js.map +0 -1
- package/dist/tasty/styles/transition.d.ts +0 -15
- package/dist/tasty/styles/transition.js +0 -139
- package/dist/tasty/styles/transition.js.map +0 -1
- package/dist/tasty/styles/types.d.ts +0 -499
- package/dist/tasty/styles/width.d.ts +0 -18
- package/dist/tasty/styles/width.js +0 -21
- package/dist/tasty/styles/width.js.map +0 -1
- package/dist/tasty/tasty.d.ts +0 -936
- package/dist/tasty/tasty.js +0 -191
- package/dist/tasty/tasty.js.map +0 -1
- package/dist/tasty/types.d.ts +0 -192
- package/dist/tasty/utils/cache-wrapper.js +0 -25
- package/dist/tasty/utils/cache-wrapper.js.map +0 -1
- package/dist/tasty/utils/case-converter.js +0 -9
- package/dist/tasty/utils/case-converter.js.map +0 -1
- package/dist/tasty/utils/colors.d.ts +0 -6
- package/dist/tasty/utils/colors.js +0 -10
- package/dist/tasty/utils/colors.js.map +0 -1
- package/dist/tasty/utils/dotize.d.ts +0 -27
- package/dist/tasty/utils/dotize.js +0 -123
- package/dist/tasty/utils/dotize.js.map +0 -1
- package/dist/tasty/utils/filter-base-props.d.ts +0 -16
- package/dist/tasty/utils/filter-base-props.js +0 -46
- package/dist/tasty/utils/filter-base-props.js.map +0 -1
- package/dist/tasty/utils/get-display-name.d.ts +0 -8
- package/dist/tasty/utils/get-display-name.js +0 -11
- package/dist/tasty/utils/get-display-name.js.map +0 -1
- package/dist/tasty/utils/hsl-to-rgb.js +0 -39
- package/dist/tasty/utils/hsl-to-rgb.js.map +0 -1
- package/dist/tasty/utils/is-dev-env.js +0 -20
- package/dist/tasty/utils/is-dev-env.js.map +0 -1
- package/dist/tasty/utils/merge-styles.d.ts +0 -8
- package/dist/tasty/utils/merge-styles.js +0 -147
- package/dist/tasty/utils/merge-styles.js.map +0 -1
- package/dist/tasty/utils/mod-attrs.d.ts +0 -9
- package/dist/tasty/utils/mod-attrs.js +0 -22
- package/dist/tasty/utils/mod-attrs.js.map +0 -1
- package/dist/tasty/utils/okhsl-to-rgb.js +0 -297
- package/dist/tasty/utils/okhsl-to-rgb.js.map +0 -1
- package/dist/tasty/utils/process-tokens.d.ts +0 -32
- package/dist/tasty/utils/process-tokens.js +0 -172
- package/dist/tasty/utils/process-tokens.js.map +0 -1
- package/dist/tasty/utils/resolve-recipes.d.ts +0 -18
- package/dist/tasty/utils/resolve-recipes.js +0 -144
- package/dist/tasty/utils/resolve-recipes.js.map +0 -1
- package/dist/tasty/utils/string.js +0 -9
- package/dist/tasty/utils/string.js.map +0 -1
- package/dist/tasty/utils/styles.d.ts +0 -204
- package/dist/tasty/utils/styles.js +0 -577
- package/dist/tasty/utils/styles.js.map +0 -1
- package/dist/tasty/utils/typography.d.ts +0 -37
- package/dist/tasty/utils/typography.js +0 -54
- package/dist/tasty/utils/typography.js.map +0 -1
- package/dist/tasty/utils/warnings.d.ts +0 -17
- package/dist/tasty/utils/warnings.js +0 -17
- package/dist/tasty/utils/warnings.js.map +0 -1
- package/dist/tasty/zero/babel.d.ts +0 -111
- package/dist/tasty/zero/babel.js +0 -283
- package/dist/tasty/zero/babel.js.map +0 -1
- package/dist/tasty/zero/index.d.ts +0 -4
- package/dist/tasty/zero/index.js +0 -5
- package/dist/tasty/zero/next.d.ts +0 -61
- package/dist/tasty/zero/next.js +0 -79
- package/dist/tasty/zero/next.js.map +0 -1
- package/dist/tasty.config.ts +0 -311
- package/dist/tokens/typography.d.ts +0 -35
- package/dist/tokens/typography.js +0 -238
- package/dist/tokens/typography.js.map +0 -1
- package/dist/utils/cache-wrapper.js +0 -25
- package/dist/utils/cache-wrapper.js.map +0 -1
- package/dist/utils/case-converter.js +0 -9
- package/dist/utils/case-converter.js.map +0 -1
- package/dist/utils/hsl-to-rgb.js +0 -39
- package/dist/utils/hsl-to-rgb.js.map +0 -1
- package/dist/utils/merge-styles.js +0 -147
- package/dist/utils/merge-styles.js.map +0 -1
- package/dist/utils/okhsl-to-rgb.js +0 -297
- package/dist/utils/okhsl-to-rgb.js.map +0 -1
- package/dist/utils/process-tokens.js +0 -29
- package/dist/utils/process-tokens.js.map +0 -1
- package/dist/utils/resolve-recipes.js +0 -144
- package/dist/utils/resolve-recipes.js.map +0 -1
- package/dist/utils/string.js +0 -9
- package/dist/utils/string.js.map +0 -1
- package/dist/utils/styles.d.ts +0 -23
- package/dist/utils/styles.js +0 -338
- package/dist/utils/styles.js.map +0 -1
|
@@ -1,639 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
|
|
2
|
-
import { Lru } from "../parser/lru.js";
|
|
3
|
-
import { stringifyStyles } from "../utils/styles.js";
|
|
4
|
-
import { createStyle } from "../styles/createStyle.js";
|
|
5
|
-
import { STYLE_HANDLER_MAP } from "../styles/index.js";
|
|
6
|
-
import { createStateParserContext, extractLocalPredefinedStates } from "../states/index.js";
|
|
7
|
-
import { and, falseCondition, not, or, trueCondition } from "./conditions.js";
|
|
8
|
-
import { simplifyCondition } from "./simplify.js";
|
|
9
|
-
import { buildExclusiveConditions, expandExclusiveOrs, expandOrConditions, isValueMapping, parseStyleEntries } from "./exclusive.js";
|
|
10
|
-
import { buildAtRulesFromVariant, conditionToCSS, modifierToCSS, pseudoToCSS, rootConditionsToCSS } from "./materialize.js";
|
|
11
|
-
import { parseStateKey } from "./parseStateKey.js";
|
|
12
|
-
|
|
13
|
-
//#region src/tasty/pipeline/index.ts
|
|
14
|
-
/**
|
|
15
|
-
* Tasty Style Rendering Pipeline
|
|
16
|
-
*
|
|
17
|
-
* This is the main entrypoint for the new pipeline implementation.
|
|
18
|
-
* It implements the complete flow from style objects to CSS rules.
|
|
19
|
-
*
|
|
20
|
-
* Pipeline stages:
|
|
21
|
-
* 1. PARSE CONDITIONS - Parse state keys into ConditionNode trees
|
|
22
|
-
* 2. BUILD EXCLUSIVE CONDITIONS - AND with negation of higher-priority conditions
|
|
23
|
-
* 3. SIMPLIFY CONDITIONS - Apply boolean algebra, detect contradictions
|
|
24
|
-
* 4. GROUP BY HANDLER - Collect styles per handler, compute combinations
|
|
25
|
-
* 5. COMPUTE CSS VALUES - Call handlers to get CSS declarations
|
|
26
|
-
* 6. MERGE BY VALUE - Merge rules with identical CSS output
|
|
27
|
-
* 7. MATERIALIZE CSS - Convert conditions to CSS selectors + at-rules
|
|
28
|
-
*/
|
|
29
|
-
const pipelineCache = new Lru(5e3);
|
|
30
|
-
/**
|
|
31
|
-
* Clear the pipeline cache (for testing)
|
|
32
|
-
*/
|
|
33
|
-
function clearPipelineCache() {
|
|
34
|
-
pipelineCache.clear();
|
|
35
|
-
}
|
|
36
|
-
function runPipeline(styles, parserContext) {
|
|
37
|
-
const allRules = [];
|
|
38
|
-
processStyles(styles, "", parserContext, allRules);
|
|
39
|
-
const seen = /* @__PURE__ */ new Set();
|
|
40
|
-
return allRules.filter((rule) => {
|
|
41
|
-
const key = `${rule.selector}|${rule.declarations}|${JSON.stringify(rule.atRules || [])}|${rule.rootPrefix || ""}`;
|
|
42
|
-
if (seen.has(key)) return false;
|
|
43
|
-
seen.add(key);
|
|
44
|
-
return true;
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Process styles at a given nesting level
|
|
49
|
-
*/
|
|
50
|
-
function processStyles(styles, selectorSuffix, parserContext, allRules) {
|
|
51
|
-
const keys = Object.keys(styles);
|
|
52
|
-
const selectorKeys = keys.filter((key) => isSelector(key));
|
|
53
|
-
const styleKeys = keys.filter((key) => !isSelector(key) && !key.startsWith("@"));
|
|
54
|
-
for (const key of selectorKeys) {
|
|
55
|
-
const nestedStyles = styles[key];
|
|
56
|
-
if (!nestedStyles || typeof nestedStyles !== "object") continue;
|
|
57
|
-
const suffixes = getAllSelectors(key, nestedStyles);
|
|
58
|
-
if (!suffixes) continue;
|
|
59
|
-
const { $: _omit, ...cleanedStyles } = nestedStyles;
|
|
60
|
-
const subLocalStates = extractLocalPredefinedStates(cleanedStyles);
|
|
61
|
-
const hasSubStates = Object.keys(subLocalStates).length > 0;
|
|
62
|
-
const subContext = {
|
|
63
|
-
...parserContext,
|
|
64
|
-
isSubElement: true,
|
|
65
|
-
localPredefinedStates: hasSubStates ? {
|
|
66
|
-
...parserContext.localPredefinedStates,
|
|
67
|
-
...subLocalStates
|
|
68
|
-
} : parserContext.localPredefinedStates
|
|
69
|
-
};
|
|
70
|
-
for (const suffix of suffixes) processStyles(cleanedStyles, selectorSuffix + suffix, subContext, allRules);
|
|
71
|
-
}
|
|
72
|
-
const handlerQueue = buildHandlerQueue(styleKeys, styles);
|
|
73
|
-
for (const { handler, styleMap } of handlerQueue) {
|
|
74
|
-
const lookupStyles = handler.__lookupStyles;
|
|
75
|
-
const exclusiveByStyle = /* @__PURE__ */ new Map();
|
|
76
|
-
for (const styleName of lookupStyles) {
|
|
77
|
-
const value = styleMap[styleName];
|
|
78
|
-
if (value === void 0) continue;
|
|
79
|
-
if (isValueMapping(value)) {
|
|
80
|
-
const fullyExpanded = expandExclusiveOrs(buildExclusiveConditions(expandOrConditions(parseStyleEntries(styleName, value, (stateKey) => parseStateKey(stateKey, { context: parserContext })))));
|
|
81
|
-
exclusiveByStyle.set(styleName, fullyExpanded);
|
|
82
|
-
} else exclusiveByStyle.set(styleName, [{
|
|
83
|
-
styleKey: styleName,
|
|
84
|
-
stateKey: "",
|
|
85
|
-
value,
|
|
86
|
-
condition: trueCondition(),
|
|
87
|
-
priority: 0,
|
|
88
|
-
exclusiveCondition: trueCondition()
|
|
89
|
-
}]);
|
|
90
|
-
}
|
|
91
|
-
const stateSnapshots = computeStateCombinations(exclusiveByStyle, lookupStyles);
|
|
92
|
-
const computedRules = [];
|
|
93
|
-
for (const snapshot of stateSnapshots) {
|
|
94
|
-
const result = handler(snapshot.values);
|
|
95
|
-
if (!result) continue;
|
|
96
|
-
const results = Array.isArray(result) ? result : [result];
|
|
97
|
-
for (const r of results) {
|
|
98
|
-
if (!r || typeof r !== "object") continue;
|
|
99
|
-
const { $, ...styleProps } = r;
|
|
100
|
-
const declarations = {};
|
|
101
|
-
for (const [prop, val] of Object.entries(styleProps)) if (val != null && val !== "") declarations[prop] = String(val);
|
|
102
|
-
if (Object.keys(declarations).length === 0) continue;
|
|
103
|
-
const suffixes = $ ? (Array.isArray($) ? $ : [$]).map((s) => selectorSuffix + normalizeSelectorSuffix(String(s))) : [selectorSuffix];
|
|
104
|
-
for (const suffix of suffixes) computedRules.push({
|
|
105
|
-
condition: snapshot.condition,
|
|
106
|
-
declarations,
|
|
107
|
-
selectorSuffix: suffix
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
const mergedRules = mergeByValue(computedRules);
|
|
112
|
-
for (const rule of mergedRules) {
|
|
113
|
-
const cssRules = materializeComputedRule(rule);
|
|
114
|
-
allRules.push(...cssRules);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Check if a key is a CSS selector
|
|
120
|
-
*/
|
|
121
|
-
function isSelector(key) {
|
|
122
|
-
return key.startsWith("&") || key.startsWith(".") || /^[A-Z]/.test(key);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Get all selector suffixes for a sub-element key.
|
|
126
|
-
*
|
|
127
|
-
* Handles three types of selector keys:
|
|
128
|
-
* - `&` prefix: Raw selector suffix (e.g., `&:hover` → `:hover`)
|
|
129
|
-
* - `.` prefix: Class selector (e.g., `.active` → ` .active`)
|
|
130
|
-
* - Uppercase: Sub-element with optional `$` affix pattern
|
|
131
|
-
*
|
|
132
|
-
* @param key - The sub-element key (e.g., 'Label', '&:hover', '.active')
|
|
133
|
-
* @param styles - The styles object, may contain `$` property for selector affix
|
|
134
|
-
* @returns Array of selector suffixes, or null if invalid (with console warning)
|
|
135
|
-
*
|
|
136
|
-
* @example
|
|
137
|
-
* getAllSelectors('Label', {})
|
|
138
|
-
* // → [' [data-element="Label"]']
|
|
139
|
-
*
|
|
140
|
-
* getAllSelectors('Cell', { $: '>, >Body>' })
|
|
141
|
-
* // → ['> [data-element="Cell"]', ' [data-element="Body"] > [data-element="Cell"]']
|
|
142
|
-
*/
|
|
143
|
-
function getAllSelectors(key, styles) {
|
|
144
|
-
if (key.startsWith("&")) return [key.slice(1)];
|
|
145
|
-
if (key.startsWith(".")) return [` ${key}`];
|
|
146
|
-
if (/^[A-Z]/.test(key)) {
|
|
147
|
-
const affix = styles?.$;
|
|
148
|
-
if (affix !== void 0) {
|
|
149
|
-
const result = processAffix(String(affix), key);
|
|
150
|
-
if (!result.valid) {
|
|
151
|
-
console.warn(`[Tasty] ${result.reason}`);
|
|
152
|
-
return null;
|
|
153
|
-
}
|
|
154
|
-
return result.selectors;
|
|
155
|
-
}
|
|
156
|
-
return [` [data-element="${key}"]`];
|
|
157
|
-
}
|
|
158
|
-
return null;
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Process selector affix pattern and return selector(s)
|
|
162
|
-
*
|
|
163
|
-
* Supports:
|
|
164
|
-
* - Direct child: '>'
|
|
165
|
-
* - Chained elements: '>Body>Row>'
|
|
166
|
-
* - HTML tags: 'a', '>ul>li', 'button:hover'
|
|
167
|
-
* - Pseudo-elements on root: '::before'
|
|
168
|
-
* - Pseudo on sub-element: '@::before', '>@:hover'
|
|
169
|
-
* - Classes: '.active', '>@.active'
|
|
170
|
-
* - Multiple selectors: '>, >Body>'
|
|
171
|
-
* - Sibling combinators (after element): '>Item+', '>Item~'
|
|
172
|
-
*/
|
|
173
|
-
function processAffix(affix, key) {
|
|
174
|
-
const trimmed = affix.trim();
|
|
175
|
-
if (!trimmed) return {
|
|
176
|
-
valid: true,
|
|
177
|
-
selectors: [` [data-element="${key}"]`]
|
|
178
|
-
};
|
|
179
|
-
const patterns = trimmed.split(",").map((p) => p.trim());
|
|
180
|
-
const selectors = [];
|
|
181
|
-
for (const pattern of patterns) {
|
|
182
|
-
const validation = validatePattern(pattern);
|
|
183
|
-
if (!validation.valid) return validation;
|
|
184
|
-
const selector = processSinglePattern(pattern, key);
|
|
185
|
-
selectors.push(selector);
|
|
186
|
-
}
|
|
187
|
-
return {
|
|
188
|
-
valid: true,
|
|
189
|
-
selectors
|
|
190
|
-
};
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Recognized token patterns for selector affix validation.
|
|
194
|
-
*
|
|
195
|
-
* These patterns are used to tokenize and validate `$` affix strings.
|
|
196
|
-
* Order matters: more specific patterns must come first to avoid
|
|
197
|
-
* partial matches (e.g., `::before` must match before `:` alone).
|
|
198
|
-
*
|
|
199
|
-
* Unrecognized tokens (like `#id`, `*`, or numbers) will cause validation to fail.
|
|
200
|
-
*/
|
|
201
|
-
const VALID_TOKEN_PATTERNS = [
|
|
202
|
-
/^[>+~]/,
|
|
203
|
-
/^[A-Z][a-zA-Z0-9]*/,
|
|
204
|
-
/^@/,
|
|
205
|
-
/^::?[a-z][a-z0-9-]*(?:\([^)]*\))?/,
|
|
206
|
-
/^\.[a-zA-Z_-][a-zA-Z0-9_-]*/,
|
|
207
|
-
/^\[[^\]]+\]/,
|
|
208
|
-
/^[a-z][a-z0-9-]*/,
|
|
209
|
-
/^\s+/,
|
|
210
|
-
/^&/
|
|
211
|
-
];
|
|
212
|
-
/**
|
|
213
|
-
* Scan a pattern for unrecognized tokens.
|
|
214
|
-
*
|
|
215
|
-
* Iterates through the pattern, consuming recognized tokens until
|
|
216
|
-
* either the pattern is fully consumed (valid) or an unrecognized
|
|
217
|
-
* character sequence is found (invalid).
|
|
218
|
-
*
|
|
219
|
-
* @param pattern - The selector pattern to validate
|
|
220
|
-
* @returns The first unrecognized token found, or null if all tokens are valid
|
|
221
|
-
*
|
|
222
|
-
* @example
|
|
223
|
-
* findUnrecognizedTokens('>Body>Row>') // → null (valid)
|
|
224
|
-
* findUnrecognizedTokens('123') // → '123' (invalid)
|
|
225
|
-
* findUnrecognizedTokens('#myId') // → '#' (invalid)
|
|
226
|
-
*/
|
|
227
|
-
function findUnrecognizedTokens(pattern) {
|
|
228
|
-
let remaining = pattern;
|
|
229
|
-
while (remaining.length > 0) {
|
|
230
|
-
let matched = false;
|
|
231
|
-
for (const regex of VALID_TOKEN_PATTERNS) {
|
|
232
|
-
const match = remaining.match(regex);
|
|
233
|
-
if (match) {
|
|
234
|
-
remaining = remaining.slice(match[0].length);
|
|
235
|
-
matched = true;
|
|
236
|
-
break;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
if (!matched) {
|
|
240
|
-
const unrecognized = remaining.match(/^[^\s>+~@.:[\]A-Z]+/);
|
|
241
|
-
return unrecognized ? unrecognized[0] : remaining[0];
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
return null;
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Validate a selector pattern for structural correctness.
|
|
248
|
-
*
|
|
249
|
-
* Checks for:
|
|
250
|
-
* 1. Out-of-scope selectors: Patterns starting with `+` or `~` target siblings
|
|
251
|
-
* of the root element, which is outside the component's DOM scope.
|
|
252
|
-
* 2. Consecutive combinators: Patterns like `>>` or `>+` are malformed CSS.
|
|
253
|
-
* 3. Unrecognized tokens: Characters/sequences not matching valid CSS selectors.
|
|
254
|
-
*
|
|
255
|
-
* @param pattern - A single selector pattern (already split by comma)
|
|
256
|
-
* @returns AffixResult indicating validity and error reason if invalid
|
|
257
|
-
*
|
|
258
|
-
* @example
|
|
259
|
-
* validatePattern('>Body>Row>') // → { valid: true, selectors: [] }
|
|
260
|
-
* validatePattern('+') // → { valid: false, reason: '...outside root scope...' }
|
|
261
|
-
* validatePattern('>>') // → { valid: false, reason: '...consecutive combinators...' }
|
|
262
|
-
*/
|
|
263
|
-
function validatePattern(pattern) {
|
|
264
|
-
const trimmed = pattern.trim();
|
|
265
|
-
if (/^[+~]/.test(trimmed)) return {
|
|
266
|
-
valid: false,
|
|
267
|
-
reason: `Selector affix "${pattern}" targets elements outside the root scope. Sibling selectors (+, ~) must be preceded by an element inside the root. Use ">Element+" or ">Element~" instead.`
|
|
268
|
-
};
|
|
269
|
-
if (/[>+~]{2,}/.test(trimmed.replace(/\s+/g, ""))) return {
|
|
270
|
-
valid: false,
|
|
271
|
-
reason: `Selector affix "${pattern}" contains consecutive combinators.`
|
|
272
|
-
};
|
|
273
|
-
const unrecognized = findUnrecognizedTokens(trimmed);
|
|
274
|
-
if (unrecognized) return {
|
|
275
|
-
valid: false,
|
|
276
|
-
reason: `Selector affix "${pattern}" contains unrecognized token "${unrecognized}". Valid tokens: combinators (>, +, ~), element names (Uppercase), @ placeholder, pseudo (:hover, ::before), class (.name), attribute ([attr]).`
|
|
277
|
-
};
|
|
278
|
-
return {
|
|
279
|
-
valid: true,
|
|
280
|
-
selectors: []
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Process a single selector pattern into a CSS selector suffix.
|
|
285
|
-
*
|
|
286
|
-
* This is the main transformation function that converts a `$` affix pattern
|
|
287
|
-
* into a valid CSS selector suffix. It handles:
|
|
288
|
-
*
|
|
289
|
-
* 1. `@` placeholder replacement with `[data-element="key"]`
|
|
290
|
-
* 2. Key injection based on pattern ending (see `shouldInjectKey`)
|
|
291
|
-
* 3. Proper spacing for descendant vs direct child selectors
|
|
292
|
-
*
|
|
293
|
-
* @param pattern - A single validated selector pattern
|
|
294
|
-
* @param key - The sub-element key to inject (e.g., 'Label', 'Cell')
|
|
295
|
-
* @returns CSS selector suffix ready to append to the root selector
|
|
296
|
-
*
|
|
297
|
-
* @example
|
|
298
|
-
* processSinglePattern('>', 'Row')
|
|
299
|
-
* // → '> [data-element="Row"]'
|
|
300
|
-
*
|
|
301
|
-
* processSinglePattern('>Body>Row>', 'Cell')
|
|
302
|
-
* // → '> [data-element="Body"] > [data-element="Row"] > [data-element="Cell"]'
|
|
303
|
-
*
|
|
304
|
-
* processSinglePattern('::before', 'Before')
|
|
305
|
-
* // → '::before' (no key injection for pseudo on root)
|
|
306
|
-
*
|
|
307
|
-
* processSinglePattern('>@:hover', 'Item')
|
|
308
|
-
* // → '> [data-element="Item"]:hover'
|
|
309
|
-
*/
|
|
310
|
-
function processSinglePattern(pattern, key) {
|
|
311
|
-
let normalized = pattern.replace(/^&/, "").trim();
|
|
312
|
-
if (!normalized) return ` [data-element="${key}"]`;
|
|
313
|
-
const startsWithPseudo = /^::?[a-z]/.test(normalized);
|
|
314
|
-
let result = transformPattern(normalized);
|
|
315
|
-
if (result.includes("@")) {
|
|
316
|
-
result = result.replace(/@ (?=[.:])/g, "@");
|
|
317
|
-
result = result.replace(/@/g, `[data-element="${key}"]`);
|
|
318
|
-
if (!startsWithPseudo && !result.startsWith(" ")) result = " " + result;
|
|
319
|
-
return result;
|
|
320
|
-
}
|
|
321
|
-
if (shouldInjectKey(normalized)) result = result + ` [data-element="${key}"]`;
|
|
322
|
-
if (!startsWithPseudo && !result.startsWith(" ")) result = " " + result;
|
|
323
|
-
return result;
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Transform a selector pattern by converting element names and normalizing spacing.
|
|
327
|
-
*
|
|
328
|
-
* This is a character-by-character tokenizer that:
|
|
329
|
-
* - Converts uppercase names to `[data-element="Name"]` selectors
|
|
330
|
-
* - Adds proper spacing around combinators (>, +, ~)
|
|
331
|
-
* - Preserves lowercase tags, classes, pseudos, and attributes as-is
|
|
332
|
-
* - Keeps @ placeholder for later replacement
|
|
333
|
-
*
|
|
334
|
-
* The tokenizer handles these token types in order:
|
|
335
|
-
* 1. Whitespace (skipped)
|
|
336
|
-
* 2. Combinators: >, +, ~ (add surrounding spaces)
|
|
337
|
-
* 3. Uppercase names: Body, Row (convert to [data-element="..."])
|
|
338
|
-
* 4. @ placeholder (keep for later replacement)
|
|
339
|
-
* 5. Pseudo: :hover, ::before (attach to previous token)
|
|
340
|
-
* 6. Tags: a, div, button (keep as-is with spacing)
|
|
341
|
-
* 7. Classes: .active (attach to previous element/tag/placeholder)
|
|
342
|
-
* 8. Attributes: [type="text"] (keep as-is)
|
|
343
|
-
*
|
|
344
|
-
* @param pattern - The raw selector pattern to transform
|
|
345
|
-
* @returns Transformed pattern with proper CSS selector syntax
|
|
346
|
-
*
|
|
347
|
-
* @example
|
|
348
|
-
* transformPattern('>Body>Row>')
|
|
349
|
-
* // → '> [data-element="Body"] > [data-element="Row"] >'
|
|
350
|
-
*
|
|
351
|
-
* transformPattern('button.primary:hover')
|
|
352
|
-
* // → 'button.primary:hover'
|
|
353
|
-
*/
|
|
354
|
-
function transformPattern(pattern) {
|
|
355
|
-
let result = "";
|
|
356
|
-
let i = 0;
|
|
357
|
-
while (i < pattern.length) {
|
|
358
|
-
const char = pattern[i];
|
|
359
|
-
if (/\s/.test(char)) {
|
|
360
|
-
i++;
|
|
361
|
-
continue;
|
|
362
|
-
}
|
|
363
|
-
if (/[>+~]/.test(char)) {
|
|
364
|
-
if (result && !result.endsWith(" ")) result += " ";
|
|
365
|
-
result += char;
|
|
366
|
-
i++;
|
|
367
|
-
continue;
|
|
368
|
-
}
|
|
369
|
-
if (/[A-Z]/.test(char)) {
|
|
370
|
-
let name = "";
|
|
371
|
-
while (i < pattern.length && /[a-zA-Z0-9]/.test(pattern[i])) {
|
|
372
|
-
name += pattern[i];
|
|
373
|
-
i++;
|
|
374
|
-
}
|
|
375
|
-
if (result && !result.endsWith(" ")) result += " ";
|
|
376
|
-
result += `[data-element="${name}"]`;
|
|
377
|
-
continue;
|
|
378
|
-
}
|
|
379
|
-
if (char === "@") {
|
|
380
|
-
if (result && !result.endsWith(" ")) result += " ";
|
|
381
|
-
result += "@";
|
|
382
|
-
i++;
|
|
383
|
-
continue;
|
|
384
|
-
}
|
|
385
|
-
if (char === ":") {
|
|
386
|
-
let pseudo = "";
|
|
387
|
-
while (i < pattern.length && !/[\s>+~,@]/.test(pattern[i]) && !/[A-Z]/.test(pattern[i])) {
|
|
388
|
-
pseudo += pattern[i];
|
|
389
|
-
i++;
|
|
390
|
-
}
|
|
391
|
-
result += pseudo;
|
|
392
|
-
continue;
|
|
393
|
-
}
|
|
394
|
-
if (/[a-z]/.test(char)) {
|
|
395
|
-
let tag = "";
|
|
396
|
-
while (i < pattern.length && /[a-z0-9-]/.test(pattern[i])) {
|
|
397
|
-
tag += pattern[i];
|
|
398
|
-
i++;
|
|
399
|
-
}
|
|
400
|
-
if (result && !result.endsWith(" ")) result += " ";
|
|
401
|
-
result += tag;
|
|
402
|
-
continue;
|
|
403
|
-
}
|
|
404
|
-
if (char === ".") {
|
|
405
|
-
const lastNonSpace = result.replace(/\s+$/, "").slice(-1);
|
|
406
|
-
const attachToLast = lastNonSpace === "]" || lastNonSpace === "@" || /[a-zA-Z0-9-]/.test(lastNonSpace);
|
|
407
|
-
if (result && !attachToLast && !result.endsWith(" ")) result += " ";
|
|
408
|
-
let cls = ".";
|
|
409
|
-
i++;
|
|
410
|
-
while (i < pattern.length && /[a-zA-Z0-9_-]/.test(pattern[i])) {
|
|
411
|
-
cls += pattern[i];
|
|
412
|
-
i++;
|
|
413
|
-
}
|
|
414
|
-
result += cls;
|
|
415
|
-
continue;
|
|
416
|
-
}
|
|
417
|
-
if (char === "[") {
|
|
418
|
-
const lastNonSpace = result.replace(/\s+$/, "").slice(-1);
|
|
419
|
-
const attachToLast = lastNonSpace === "]" || lastNonSpace === "@" || /[a-zA-Z0-9-]/.test(lastNonSpace);
|
|
420
|
-
if (result && !attachToLast && !result.endsWith(" ")) result += " ";
|
|
421
|
-
let attr = "";
|
|
422
|
-
let depth = 0;
|
|
423
|
-
while (i < pattern.length) {
|
|
424
|
-
attr += pattern[i];
|
|
425
|
-
if (pattern[i] === "[") depth++;
|
|
426
|
-
if (pattern[i] === "]") depth--;
|
|
427
|
-
i++;
|
|
428
|
-
if (depth === 0) break;
|
|
429
|
-
}
|
|
430
|
-
result += attr;
|
|
431
|
-
continue;
|
|
432
|
-
}
|
|
433
|
-
result += char;
|
|
434
|
-
i++;
|
|
435
|
-
}
|
|
436
|
-
return result;
|
|
437
|
-
}
|
|
438
|
-
/**
|
|
439
|
-
* Determine if the sub-element key should be auto-injected based on pattern ending.
|
|
440
|
-
*
|
|
441
|
-
* Key injection rules (when no @ placeholder is present):
|
|
442
|
-
*
|
|
443
|
-
* | Pattern Ending | Inject Key? | Example | Result |
|
|
444
|
-
* |----------------|-------------|---------|--------|
|
|
445
|
-
* | Combinator (>, +, ~) | Yes | `'>Body>'` | `> [data-element="Body"] > [el]` |
|
|
446
|
-
* | Uppercase element | Yes | `'>Body>Row'` | `> [el1] > [el2] [key]` |
|
|
447
|
-
* | Lowercase tag | Yes | `'>ul>li'` | `> ul > li [key]` |
|
|
448
|
-
* | Pseudo (:hover, ::before) | No | `'::before'` | `::before` |
|
|
449
|
-
* | Class (.active) | No | `'.active'` | `.active` |
|
|
450
|
-
* | Attribute ([type]) | No | `'[type="text"]'` | `[type="text"]` |
|
|
451
|
-
*
|
|
452
|
-
* @param pattern - The normalized pattern (after stripping &)
|
|
453
|
-
* @returns true if key should be injected, false otherwise
|
|
454
|
-
*
|
|
455
|
-
* @example
|
|
456
|
-
* shouldInjectKey('>') // → true (trailing combinator)
|
|
457
|
-
* shouldInjectKey('>Body>Row') // → true (ends with element)
|
|
458
|
-
* shouldInjectKey('>ul>li') // → true (ends with tag)
|
|
459
|
-
* shouldInjectKey('::before') // → false (ends with pseudo)
|
|
460
|
-
* shouldInjectKey('.active') // → false (ends with class)
|
|
461
|
-
* shouldInjectKey('a:hover') // → false (ends with pseudo)
|
|
462
|
-
* shouldInjectKey('button.primary') // → false (ends with class)
|
|
463
|
-
*/
|
|
464
|
-
function shouldInjectKey(pattern) {
|
|
465
|
-
const trimmed = pattern.trim();
|
|
466
|
-
if (/[>+~]$/.test(trimmed)) return true;
|
|
467
|
-
if (/(?:^|[\s>+~\]:])[A-Z][a-zA-Z0-9]*$/.test(trimmed)) return true;
|
|
468
|
-
if (/(?<![:.])(?:^|[\s>+~])[a-z][a-z0-9-]*$/.test(trimmed)) return true;
|
|
469
|
-
return false;
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* Normalize selector suffix from $ property
|
|
473
|
-
*/
|
|
474
|
-
function normalizeSelectorSuffix(suffix) {
|
|
475
|
-
if (!suffix) return "";
|
|
476
|
-
return suffix.startsWith("&") ? suffix.slice(1) : suffix;
|
|
477
|
-
}
|
|
478
|
-
/**
|
|
479
|
-
* Build handler queue from style keys
|
|
480
|
-
*/
|
|
481
|
-
function buildHandlerQueue(styleKeys, styles) {
|
|
482
|
-
const queue = [];
|
|
483
|
-
const seenHandlers = /* @__PURE__ */ new Set();
|
|
484
|
-
for (const styleName of styleKeys) {
|
|
485
|
-
let handlers = STYLE_HANDLER_MAP[styleName];
|
|
486
|
-
if (!handlers) handlers = STYLE_HANDLER_MAP[styleName] = [createStyle(styleName)];
|
|
487
|
-
for (const handler of handlers) {
|
|
488
|
-
if (seenHandlers.has(handler)) continue;
|
|
489
|
-
seenHandlers.add(handler);
|
|
490
|
-
const lookupStyles = handler.__lookupStyles;
|
|
491
|
-
const styleMap = {};
|
|
492
|
-
for (const name of lookupStyles) if (styles[name] !== void 0) styleMap[name] = styles[name];
|
|
493
|
-
queue.push({
|
|
494
|
-
handler,
|
|
495
|
-
styleMap
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
return queue;
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* Compute all valid state combinations for a handler's lookup styles
|
|
503
|
-
*/
|
|
504
|
-
function computeStateCombinations(exclusiveByStyle, lookupStyles) {
|
|
505
|
-
const combinations = cartesianProduct(lookupStyles.map((style) => exclusiveByStyle.get(style) || []));
|
|
506
|
-
const snapshots = [];
|
|
507
|
-
for (const combo of combinations) {
|
|
508
|
-
const simplified = simplifyCondition(and(...combo.map((e) => e.exclusiveCondition)));
|
|
509
|
-
if (simplified.kind === "false") continue;
|
|
510
|
-
const values = {};
|
|
511
|
-
for (const entry of combo) values[entry.styleKey] = entry.value;
|
|
512
|
-
snapshots.push({
|
|
513
|
-
condition: simplified,
|
|
514
|
-
values
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
return snapshots;
|
|
518
|
-
}
|
|
519
|
-
/**
|
|
520
|
-
* Cartesian product of arrays
|
|
521
|
-
*/
|
|
522
|
-
function cartesianProduct(arrays) {
|
|
523
|
-
if (arrays.length === 0) return [[]];
|
|
524
|
-
const nonEmpty = arrays.filter((a) => a.length > 0);
|
|
525
|
-
if (nonEmpty.length === 0) return [[]];
|
|
526
|
-
return nonEmpty.reduce((acc, arr) => acc.flatMap((combo) => arr.map((item) => [...combo, item])), [[]]);
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
* Merge rules with identical CSS output
|
|
530
|
-
*/
|
|
531
|
-
function mergeByValue(rules) {
|
|
532
|
-
const groups = /* @__PURE__ */ new Map();
|
|
533
|
-
for (const rule of rules) {
|
|
534
|
-
const key = `${rule.selectorSuffix}|${JSON.stringify(rule.declarations)}`;
|
|
535
|
-
if (!groups.has(key)) groups.set(key, []);
|
|
536
|
-
groups.get(key).push(rule);
|
|
537
|
-
}
|
|
538
|
-
const merged = [];
|
|
539
|
-
for (const [, groupRules] of groups) if (groupRules.length === 1) merged.push(groupRules[0]);
|
|
540
|
-
else {
|
|
541
|
-
const mergedCondition = simplifyCondition(or(...groupRules.map((r) => r.condition)));
|
|
542
|
-
merged.push({
|
|
543
|
-
condition: mergedCondition,
|
|
544
|
-
declarations: groupRules[0].declarations,
|
|
545
|
-
selectorSuffix: groupRules[0].selectorSuffix
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
return merged;
|
|
549
|
-
}
|
|
550
|
-
/**
|
|
551
|
-
* Build selector fragment from a variant (without className prefix)
|
|
552
|
-
*/
|
|
553
|
-
function buildSelectorFromVariant(variant, selectorSuffix) {
|
|
554
|
-
let selector = "";
|
|
555
|
-
for (const mod of variant.modifierConditions) selector += modifierToCSS(mod);
|
|
556
|
-
for (const pseudo of variant.pseudoConditions) selector += pseudoToCSS(pseudo);
|
|
557
|
-
selector += selectorSuffix;
|
|
558
|
-
for (const own of variant.ownConditions) if ("attribute" in own) selector += modifierToCSS(own);
|
|
559
|
-
else selector += pseudoToCSS(own);
|
|
560
|
-
return selector;
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
* Materialize a computed rule to final CSS format
|
|
564
|
-
*
|
|
565
|
-
* Returns an array because OR conditions may generate multiple CSS rules
|
|
566
|
-
* (when different branches have different at-rules)
|
|
567
|
-
*/
|
|
568
|
-
function materializeComputedRule(rule) {
|
|
569
|
-
const components = conditionToCSS(rule.condition);
|
|
570
|
-
if (components.isImpossible || components.variants.length === 0) return [];
|
|
571
|
-
const declarations = Object.entries(rule.declarations).map(([prop, value]) => `${prop}: ${value};`).join(" ");
|
|
572
|
-
const getRootPrefixKey = (variant) => {
|
|
573
|
-
return variant.rootConditions.map((r) => r.negated ? `!${r.selector}` : r.selector).sort().join("|");
|
|
574
|
-
};
|
|
575
|
-
const byAtRules = /* @__PURE__ */ new Map();
|
|
576
|
-
for (const variant of components.variants) {
|
|
577
|
-
const atRules = buildAtRulesFromVariant(variant);
|
|
578
|
-
const key = atRules.sort().join("|||") + "###" + getRootPrefixKey(variant);
|
|
579
|
-
const group = byAtRules.get(key);
|
|
580
|
-
if (group) group.variants.push(variant);
|
|
581
|
-
else byAtRules.set(key, {
|
|
582
|
-
variants: [variant],
|
|
583
|
-
atRules,
|
|
584
|
-
rootPrefix: rootConditionsToCSS(variant.rootConditions)
|
|
585
|
-
});
|
|
586
|
-
}
|
|
587
|
-
const rules = [];
|
|
588
|
-
for (const [, group] of byAtRules) {
|
|
589
|
-
const selectorFragments = group.variants.map((v) => buildSelectorFromVariant(v, rule.selectorSuffix));
|
|
590
|
-
const cssRule = {
|
|
591
|
-
selector: selectorFragments.length === 1 ? selectorFragments[0] : selectorFragments,
|
|
592
|
-
declarations
|
|
593
|
-
};
|
|
594
|
-
if (group.atRules.length > 0) cssRule.atRules = group.atRules;
|
|
595
|
-
if (group.rootPrefix) cssRule.rootPrefix = group.rootPrefix;
|
|
596
|
-
rules.push(cssRule);
|
|
597
|
-
}
|
|
598
|
-
return rules;
|
|
599
|
-
}
|
|
600
|
-
function renderStyles(styles, classNameOrSelector, options) {
|
|
601
|
-
const directSelector = !!classNameOrSelector;
|
|
602
|
-
if (!styles) return directSelector ? [] : { rules: [] };
|
|
603
|
-
const cacheKey = stringifyStyles(styles);
|
|
604
|
-
let rules = pipelineCache.get(cacheKey);
|
|
605
|
-
if (!rules) {
|
|
606
|
-
rules = runPipeline(styles, createStateParserContext(styles));
|
|
607
|
-
pipelineCache.set(cacheKey, rules);
|
|
608
|
-
}
|
|
609
|
-
if (directSelector) {
|
|
610
|
-
const shouldDouble = options?.doubleSelector ?? false;
|
|
611
|
-
return rules.map((rule) => {
|
|
612
|
-
const result = {
|
|
613
|
-
selector: (Array.isArray(rule.selector) ? rule.selector : rule.selector ? [rule.selector] : [""]).map((part) => {
|
|
614
|
-
let sel = part ? `${classNameOrSelector}${part}` : classNameOrSelector;
|
|
615
|
-
if (shouldDouble && sel.startsWith(".")) {
|
|
616
|
-
const classMatch = sel.match(/^\.[a-zA-Z_-][a-zA-Z0-9_-]*/);
|
|
617
|
-
if (classMatch) sel = classMatch[0] + sel;
|
|
618
|
-
}
|
|
619
|
-
if (rule.rootPrefix) sel = `${rule.rootPrefix} ${sel}`;
|
|
620
|
-
return sel;
|
|
621
|
-
}).join(", "),
|
|
622
|
-
declarations: rule.declarations
|
|
623
|
-
};
|
|
624
|
-
if (rule.atRules && rule.atRules.length > 0) result.atRules = rule.atRules;
|
|
625
|
-
return result;
|
|
626
|
-
});
|
|
627
|
-
}
|
|
628
|
-
return { rules: rules.map((r) => ({
|
|
629
|
-
selector: Array.isArray(r.selector) ? r.selector.join("|||") : r.selector,
|
|
630
|
-
declarations: r.declarations,
|
|
631
|
-
atRules: r.atRules,
|
|
632
|
-
needsClassName: true,
|
|
633
|
-
rootPrefix: r.rootPrefix
|
|
634
|
-
})) };
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
//#endregion
|
|
638
|
-
export { clearPipelineCache, isSelector, renderStyles };
|
|
639
|
-
//# sourceMappingURL=index.js.map
|