@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,822 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
|
|
2
|
-
import { Lru } from "../parser/lru.js";
|
|
3
|
-
|
|
4
|
-
//#region src/tasty/pipeline/materialize.ts
|
|
5
|
-
/**
|
|
6
|
-
* CSS Materialization
|
|
7
|
-
*
|
|
8
|
-
* Converts condition trees into CSS selectors and at-rules.
|
|
9
|
-
* This is the final stage that produces actual CSS output.
|
|
10
|
-
*/
|
|
11
|
-
const conditionCache = new Lru(3e3);
|
|
12
|
-
/**
|
|
13
|
-
* Convert a condition tree to CSS components
|
|
14
|
-
*/
|
|
15
|
-
function conditionToCSS(node) {
|
|
16
|
-
const key = getConditionKey(node);
|
|
17
|
-
const cached = conditionCache.get(key);
|
|
18
|
-
if (cached) return cached;
|
|
19
|
-
const result = conditionToCSSInner(node);
|
|
20
|
-
conditionCache.set(key, result);
|
|
21
|
-
return result;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Create an empty selector variant
|
|
25
|
-
*/
|
|
26
|
-
function emptyVariant() {
|
|
27
|
-
return {
|
|
28
|
-
modifierConditions: [],
|
|
29
|
-
pseudoConditions: [],
|
|
30
|
-
ownConditions: [],
|
|
31
|
-
mediaConditions: [],
|
|
32
|
-
containerConditions: [],
|
|
33
|
-
supportsConditions: [],
|
|
34
|
-
rootConditions: [],
|
|
35
|
-
startingStyle: false
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function conditionToCSSInner(node) {
|
|
39
|
-
if (node.kind === "true") return {
|
|
40
|
-
variants: [emptyVariant()],
|
|
41
|
-
isImpossible: false
|
|
42
|
-
};
|
|
43
|
-
if (node.kind === "false") return {
|
|
44
|
-
variants: [],
|
|
45
|
-
isImpossible: true
|
|
46
|
-
};
|
|
47
|
-
if (node.kind === "state") return stateToCSS(node);
|
|
48
|
-
if (node.kind === "compound") if (node.operator === "AND") return andToCSS(node.children);
|
|
49
|
-
else return orToCSS(node.children);
|
|
50
|
-
return {
|
|
51
|
-
variants: [emptyVariant()],
|
|
52
|
-
isImpossible: false
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Convert a state condition to CSS
|
|
57
|
-
*/
|
|
58
|
-
function stateToCSS(state) {
|
|
59
|
-
switch (state.type) {
|
|
60
|
-
case "media": return {
|
|
61
|
-
variants: mediaToParsed(state).map((mediaCond) => {
|
|
62
|
-
const v = emptyVariant();
|
|
63
|
-
v.mediaConditions.push(mediaCond);
|
|
64
|
-
return v;
|
|
65
|
-
}),
|
|
66
|
-
isImpossible: false
|
|
67
|
-
};
|
|
68
|
-
default: {
|
|
69
|
-
const variant = emptyVariant();
|
|
70
|
-
switch (state.type) {
|
|
71
|
-
case "modifier":
|
|
72
|
-
variant.modifierConditions.push(modifierToParsed(state));
|
|
73
|
-
break;
|
|
74
|
-
case "pseudo":
|
|
75
|
-
variant.pseudoConditions.push(pseudoToParsed(state));
|
|
76
|
-
break;
|
|
77
|
-
case "container":
|
|
78
|
-
variant.containerConditions.push(containerToParsed(state));
|
|
79
|
-
break;
|
|
80
|
-
case "supports":
|
|
81
|
-
variant.supportsConditions.push(supportsToParsed(state));
|
|
82
|
-
break;
|
|
83
|
-
case "root":
|
|
84
|
-
variant.rootConditions.push(rootToParsed(state));
|
|
85
|
-
break;
|
|
86
|
-
case "own":
|
|
87
|
-
variant.ownConditions.push(...ownToParsed(state));
|
|
88
|
-
break;
|
|
89
|
-
case "starting":
|
|
90
|
-
variant.startingStyle = !state.negated;
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
return {
|
|
94
|
-
variants: [variant],
|
|
95
|
-
isImpossible: false
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Convert modifier condition to parsed structure
|
|
102
|
-
*/
|
|
103
|
-
function modifierToParsed(state) {
|
|
104
|
-
return {
|
|
105
|
-
attribute: state.attribute,
|
|
106
|
-
value: state.value,
|
|
107
|
-
operator: state.operator,
|
|
108
|
-
negated: state.negated ?? false
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Convert parsed modifier to CSS selector string (for final output)
|
|
113
|
-
*/
|
|
114
|
-
function modifierToCSS(mod) {
|
|
115
|
-
let selector;
|
|
116
|
-
if (mod.value !== void 0) {
|
|
117
|
-
const op = mod.operator || "=";
|
|
118
|
-
selector = `[${mod.attribute}${op}"${mod.value}"]`;
|
|
119
|
-
} else selector = `[${mod.attribute}]`;
|
|
120
|
-
if (mod.negated) return `:not(${selector})`;
|
|
121
|
-
return selector;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Convert pseudo condition to parsed structure
|
|
125
|
-
*/
|
|
126
|
-
function pseudoToParsed(state) {
|
|
127
|
-
return {
|
|
128
|
-
pseudo: state.pseudo,
|
|
129
|
-
negated: state.negated ?? false
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Convert parsed pseudo to CSS selector string (for final output)
|
|
134
|
-
*/
|
|
135
|
-
function pseudoToCSS(pseudo) {
|
|
136
|
-
if (pseudo.negated) {
|
|
137
|
-
if (pseudo.pseudo.startsWith(":not(")) return pseudo.pseudo.slice(5, -1);
|
|
138
|
-
return `:not(${pseudo.pseudo})`;
|
|
139
|
-
}
|
|
140
|
-
return pseudo.pseudo;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Convert media condition to parsed structure(s)
|
|
144
|
-
* Returns an array because negated ranges produce OR branches (two separate conditions)
|
|
145
|
-
*/
|
|
146
|
-
function mediaToParsed(state) {
|
|
147
|
-
if (state.subtype === "type") {
|
|
148
|
-
const mediaType = state.mediaType || "all";
|
|
149
|
-
return [{
|
|
150
|
-
subtype: "type",
|
|
151
|
-
negated: state.negated ?? false,
|
|
152
|
-
condition: mediaType,
|
|
153
|
-
mediaType: state.mediaType
|
|
154
|
-
}];
|
|
155
|
-
} else if (state.subtype === "feature") {
|
|
156
|
-
let condition;
|
|
157
|
-
if (state.featureValue) condition = `(${state.feature}: ${state.featureValue})`;
|
|
158
|
-
else condition = `(${state.feature})`;
|
|
159
|
-
return [{
|
|
160
|
-
subtype: "feature",
|
|
161
|
-
negated: state.negated ?? false,
|
|
162
|
-
condition,
|
|
163
|
-
feature: state.feature,
|
|
164
|
-
featureValue: state.featureValue
|
|
165
|
-
}];
|
|
166
|
-
} else return dimensionToMediaParsed(state.dimension || "width", state.lowerBound, state.upperBound, state.negated ?? false);
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Convert dimension bounds to parsed media condition(s)
|
|
170
|
-
* Uses CSS Media Queries Level 4 `not (condition)` syntax for negation.
|
|
171
|
-
*/
|
|
172
|
-
function dimensionToMediaParsed(dimension, lowerBound, upperBound, negated) {
|
|
173
|
-
let condition;
|
|
174
|
-
if (lowerBound && upperBound) {
|
|
175
|
-
const lowerOp = lowerBound.inclusive ? "<=" : "<";
|
|
176
|
-
const upperOp = upperBound.inclusive ? "<=" : "<";
|
|
177
|
-
condition = `(${lowerBound.value} ${lowerOp} ${dimension} ${upperOp} ${upperBound.value})`;
|
|
178
|
-
} else if (upperBound) condition = `(${dimension} ${upperBound.inclusive ? "<=" : "<"} ${upperBound.value})`;
|
|
179
|
-
else if (lowerBound) condition = `(${dimension} ${lowerBound.inclusive ? ">=" : ">"} ${lowerBound.value})`;
|
|
180
|
-
else condition = `(${dimension})`;
|
|
181
|
-
return [{
|
|
182
|
-
subtype: "dimension",
|
|
183
|
-
negated: negated ?? false,
|
|
184
|
-
condition,
|
|
185
|
-
dimension,
|
|
186
|
-
lowerBound,
|
|
187
|
-
upperBound
|
|
188
|
-
}];
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Convert container condition to parsed structure
|
|
192
|
-
* This enables structured analysis for contradiction detection and condition combining
|
|
193
|
-
*/
|
|
194
|
-
function containerToParsed(state) {
|
|
195
|
-
let condition;
|
|
196
|
-
if (state.subtype === "style") if (state.propertyValue) condition = `style(--${state.property}: ${state.propertyValue})`;
|
|
197
|
-
else condition = `style(--${state.property})`;
|
|
198
|
-
else if (state.subtype === "raw") condition = state.rawCondition;
|
|
199
|
-
else condition = dimensionToContainerCondition(state.dimension || "width", state.lowerBound, state.upperBound);
|
|
200
|
-
return {
|
|
201
|
-
name: state.containerName,
|
|
202
|
-
condition,
|
|
203
|
-
negated: state.negated ?? false,
|
|
204
|
-
subtype: state.subtype,
|
|
205
|
-
property: state.property,
|
|
206
|
-
propertyValue: state.propertyValue
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Convert dimension bounds to container query condition (single string)
|
|
211
|
-
* Container queries support "not (condition)", so no need to invert manually
|
|
212
|
-
*/
|
|
213
|
-
function dimensionToContainerCondition(dimension, lowerBound, upperBound) {
|
|
214
|
-
if (lowerBound && upperBound) {
|
|
215
|
-
const lowerOp = lowerBound.inclusive ? "<=" : "<";
|
|
216
|
-
const upperOp = upperBound.inclusive ? "<=" : "<";
|
|
217
|
-
return `(${lowerBound.value} ${lowerOp} ${dimension} ${upperOp} ${upperBound.value})`;
|
|
218
|
-
} else if (upperBound) return `(${dimension} ${upperBound.inclusive ? "<=" : "<"} ${upperBound.value})`;
|
|
219
|
-
else if (lowerBound) return `(${dimension} ${lowerBound.inclusive ? ">=" : ">"} ${lowerBound.value})`;
|
|
220
|
-
return "(width)";
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Convert supports condition to parsed structure
|
|
224
|
-
*/
|
|
225
|
-
function supportsToParsed(state) {
|
|
226
|
-
return {
|
|
227
|
-
subtype: state.subtype,
|
|
228
|
-
condition: state.condition,
|
|
229
|
-
negated: state.negated ?? false
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Convert root condition to parsed structure
|
|
234
|
-
*/
|
|
235
|
-
function rootToParsed(state) {
|
|
236
|
-
return {
|
|
237
|
-
selector: state.selector,
|
|
238
|
-
negated: state.negated ?? false
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Convert parsed root conditions to CSS selector prefix (for final output)
|
|
243
|
-
*/
|
|
244
|
-
function rootConditionsToCSS(roots) {
|
|
245
|
-
if (roots.length === 0) return void 0;
|
|
246
|
-
let prefix = ":root";
|
|
247
|
-
for (const root of roots) if (root.negated) prefix += `:not(${root.selector})`;
|
|
248
|
-
else prefix += root.selector;
|
|
249
|
-
return prefix;
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Convert own condition to parsed structures for sub-element
|
|
253
|
-
*/
|
|
254
|
-
function ownToParsed(state) {
|
|
255
|
-
const innerCSS = conditionToCSS(state.innerCondition);
|
|
256
|
-
if (innerCSS.isImpossible || innerCSS.variants.length === 0) return [];
|
|
257
|
-
const allConditions = [];
|
|
258
|
-
for (const variant of innerCSS.variants) {
|
|
259
|
-
for (const mod of variant.modifierConditions) allConditions.push({
|
|
260
|
-
...mod,
|
|
261
|
-
negated: state.negated ? !mod.negated : mod.negated
|
|
262
|
-
});
|
|
263
|
-
for (const pseudo of variant.pseudoConditions) allConditions.push({
|
|
264
|
-
...pseudo,
|
|
265
|
-
negated: state.negated ? !pseudo.negated : pseudo.negated
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
return allConditions;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Get unique key for a modifier condition
|
|
272
|
-
*/
|
|
273
|
-
function getModifierKey(mod) {
|
|
274
|
-
const base = mod.value ? `${mod.attribute}${mod.operator || "="}${mod.value}` : mod.attribute;
|
|
275
|
-
return mod.negated ? `!${base}` : base;
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* Get unique key for a pseudo condition
|
|
279
|
-
*/
|
|
280
|
-
function getPseudoKey(pseudo) {
|
|
281
|
-
return pseudo.negated ? `!${pseudo.pseudo}` : pseudo.pseudo;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Get unique key for a root condition
|
|
285
|
-
*/
|
|
286
|
-
function getRootKey(root) {
|
|
287
|
-
return root.negated ? `!${root.selector}` : root.selector;
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Deduplicate modifier conditions
|
|
291
|
-
*/
|
|
292
|
-
function dedupeModifierConditions(conditions) {
|
|
293
|
-
const seen = /* @__PURE__ */ new Set();
|
|
294
|
-
const result = [];
|
|
295
|
-
for (const c of conditions) {
|
|
296
|
-
const key = getModifierKey(c);
|
|
297
|
-
if (!seen.has(key)) {
|
|
298
|
-
seen.add(key);
|
|
299
|
-
result.push(c);
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
return result;
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Deduplicate pseudo conditions
|
|
306
|
-
*/
|
|
307
|
-
function dedupePseudoConditions(conditions) {
|
|
308
|
-
const seen = /* @__PURE__ */ new Set();
|
|
309
|
-
const result = [];
|
|
310
|
-
for (const c of conditions) {
|
|
311
|
-
const key = getPseudoKey(c);
|
|
312
|
-
if (!seen.has(key)) {
|
|
313
|
-
seen.add(key);
|
|
314
|
-
result.push(c);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
return result;
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Deduplicate root conditions
|
|
321
|
-
*/
|
|
322
|
-
function dedupeRootConditions(conditions) {
|
|
323
|
-
const seen = /* @__PURE__ */ new Set();
|
|
324
|
-
const result = [];
|
|
325
|
-
for (const c of conditions) {
|
|
326
|
-
const key = getRootKey(c);
|
|
327
|
-
if (!seen.has(key)) {
|
|
328
|
-
seen.add(key);
|
|
329
|
-
result.push(c);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
return result;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Deduplicate own conditions (modifiers or pseudos)
|
|
336
|
-
*/
|
|
337
|
-
function dedupeOwnConditions(conditions) {
|
|
338
|
-
const seen = /* @__PURE__ */ new Set();
|
|
339
|
-
const result = [];
|
|
340
|
-
for (const c of conditions) {
|
|
341
|
-
const key = "attribute" in c ? `mod:${getModifierKey(c)}` : `pseudo:${getPseudoKey(c)}`;
|
|
342
|
-
if (!seen.has(key)) {
|
|
343
|
-
seen.add(key);
|
|
344
|
-
result.push(c);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
return result;
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Check for modifier contradiction: same attribute with opposite negation
|
|
351
|
-
*/
|
|
352
|
-
function hasModifierContradiction(conditions) {
|
|
353
|
-
const byKey = /* @__PURE__ */ new Map();
|
|
354
|
-
for (const mod of conditions) {
|
|
355
|
-
const baseKey = mod.value ? `${mod.attribute}${mod.operator || "="}${mod.value}` : mod.attribute;
|
|
356
|
-
const existing = byKey.get(baseKey);
|
|
357
|
-
if (existing !== void 0 && existing !== !mod.negated) return true;
|
|
358
|
-
byKey.set(baseKey, !mod.negated);
|
|
359
|
-
}
|
|
360
|
-
return false;
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* Check for pseudo contradiction: same pseudo with opposite negation
|
|
364
|
-
*/
|
|
365
|
-
function hasPseudoContradiction(conditions) {
|
|
366
|
-
const byKey = /* @__PURE__ */ new Map();
|
|
367
|
-
for (const pseudo of conditions) {
|
|
368
|
-
const existing = byKey.get(pseudo.pseudo);
|
|
369
|
-
if (existing !== void 0 && existing !== !pseudo.negated) return true;
|
|
370
|
-
byKey.set(pseudo.pseudo, !pseudo.negated);
|
|
371
|
-
}
|
|
372
|
-
return false;
|
|
373
|
-
}
|
|
374
|
-
/**
|
|
375
|
-
* Check for root condition contradiction: same selector with opposite negation
|
|
376
|
-
*/
|
|
377
|
-
function hasRootContradiction(conditions) {
|
|
378
|
-
const byKey = /* @__PURE__ */ new Map();
|
|
379
|
-
for (const root of conditions) {
|
|
380
|
-
const existing = byKey.get(root.selector);
|
|
381
|
-
if (existing !== void 0 && existing !== !root.negated) return true;
|
|
382
|
-
byKey.set(root.selector, !root.negated);
|
|
383
|
-
}
|
|
384
|
-
return false;
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* Check for own condition contradiction
|
|
388
|
-
*/
|
|
389
|
-
function hasOwnConditionContradiction(conditions) {
|
|
390
|
-
const modifiers = [];
|
|
391
|
-
const pseudos = [];
|
|
392
|
-
for (const c of conditions) if ("attribute" in c) modifiers.push(c);
|
|
393
|
-
else pseudos.push(c);
|
|
394
|
-
return hasModifierContradiction(modifiers) || hasPseudoContradiction(pseudos);
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* Merge two selector variants (AND operation)
|
|
398
|
-
* Deduplicates conditions and checks for contradictions
|
|
399
|
-
*/
|
|
400
|
-
function mergeVariants(a, b) {
|
|
401
|
-
const mergedMedia = dedupeMediaConditions([...a.mediaConditions, ...b.mediaConditions]);
|
|
402
|
-
if (hasMediaContradiction(mergedMedia)) return null;
|
|
403
|
-
const mergedRoots = dedupeRootConditions([...a.rootConditions, ...b.rootConditions]);
|
|
404
|
-
if (hasRootContradiction(mergedRoots)) return null;
|
|
405
|
-
const mergedModifiers = dedupeModifierConditions([...a.modifierConditions, ...b.modifierConditions]);
|
|
406
|
-
if (hasModifierContradiction(mergedModifiers)) return null;
|
|
407
|
-
const mergedPseudos = dedupePseudoConditions([...a.pseudoConditions, ...b.pseudoConditions]);
|
|
408
|
-
if (hasPseudoContradiction(mergedPseudos)) return null;
|
|
409
|
-
const mergedOwn = dedupeOwnConditions([...a.ownConditions, ...b.ownConditions]);
|
|
410
|
-
if (hasOwnConditionContradiction(mergedOwn)) return null;
|
|
411
|
-
const mergedContainers = dedupeContainerConditions([...a.containerConditions, ...b.containerConditions]);
|
|
412
|
-
if (hasContainerStyleContradiction(mergedContainers)) return null;
|
|
413
|
-
const mergedSupports = dedupeSupportsConditions([...a.supportsConditions, ...b.supportsConditions]);
|
|
414
|
-
if (hasSupportsContradiction(mergedSupports)) return null;
|
|
415
|
-
return {
|
|
416
|
-
modifierConditions: mergedModifiers,
|
|
417
|
-
pseudoConditions: mergedPseudos,
|
|
418
|
-
ownConditions: mergedOwn,
|
|
419
|
-
mediaConditions: mergedMedia,
|
|
420
|
-
containerConditions: mergedContainers,
|
|
421
|
-
supportsConditions: mergedSupports,
|
|
422
|
-
rootConditions: mergedRoots,
|
|
423
|
-
startingStyle: a.startingStyle || b.startingStyle
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* Deduplicate media conditions by their key (subtype + condition + negated)
|
|
428
|
-
*/
|
|
429
|
-
function dedupeMediaConditions(conditions) {
|
|
430
|
-
const seen = /* @__PURE__ */ new Set();
|
|
431
|
-
const result = [];
|
|
432
|
-
for (const c of conditions) {
|
|
433
|
-
const key = `${c.subtype}|${c.condition}|${c.negated}`;
|
|
434
|
-
if (!seen.has(key)) {
|
|
435
|
-
seen.add(key);
|
|
436
|
-
result.push(c);
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
return result;
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* Deduplicate container conditions by their key (name + condition + negated)
|
|
443
|
-
*/
|
|
444
|
-
function dedupeContainerConditions(conditions) {
|
|
445
|
-
const seen = /* @__PURE__ */ new Set();
|
|
446
|
-
const result = [];
|
|
447
|
-
for (const c of conditions) {
|
|
448
|
-
const key = `${c.name ?? ""}|${c.condition}|${c.negated}`;
|
|
449
|
-
if (!seen.has(key)) {
|
|
450
|
-
seen.add(key);
|
|
451
|
-
result.push(c);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
return result;
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* Deduplicate supports conditions by their key (subtype + condition + negated)
|
|
458
|
-
*/
|
|
459
|
-
function dedupeSupportsConditions(conditions) {
|
|
460
|
-
const seen = /* @__PURE__ */ new Set();
|
|
461
|
-
const result = [];
|
|
462
|
-
for (const c of conditions) {
|
|
463
|
-
const key = `${c.subtype}|${c.condition}|${c.negated}`;
|
|
464
|
-
if (!seen.has(key)) {
|
|
465
|
-
seen.add(key);
|
|
466
|
-
result.push(c);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
return result;
|
|
470
|
-
}
|
|
471
|
-
/**
|
|
472
|
-
* Check if supports conditions contain contradictions
|
|
473
|
-
* e.g., @supports(display: grid) AND NOT @supports(display: grid)
|
|
474
|
-
*/
|
|
475
|
-
function hasSupportsContradiction(conditions) {
|
|
476
|
-
const conditionMap = /* @__PURE__ */ new Map();
|
|
477
|
-
for (const cond of conditions) {
|
|
478
|
-
const key = `${cond.subtype}|${cond.condition}`;
|
|
479
|
-
const existing = conditionMap.get(key);
|
|
480
|
-
if (existing !== void 0 && existing !== !cond.negated) return true;
|
|
481
|
-
conditionMap.set(key, !cond.negated);
|
|
482
|
-
}
|
|
483
|
-
return false;
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* Check if a set of media conditions contains contradictions
|
|
487
|
-
* e.g., (prefers-color-scheme: light) AND NOT (prefers-color-scheme: light)
|
|
488
|
-
* or (width >= 900px) AND (width < 600px)
|
|
489
|
-
*
|
|
490
|
-
* Uses parsed media conditions for efficient analysis without regex parsing.
|
|
491
|
-
*/
|
|
492
|
-
function hasMediaContradiction(conditions) {
|
|
493
|
-
const featureConditions = /* @__PURE__ */ new Map();
|
|
494
|
-
const typeConditions = /* @__PURE__ */ new Map();
|
|
495
|
-
const dimensionConditions = /* @__PURE__ */ new Map();
|
|
496
|
-
const dimensionsByDim = /* @__PURE__ */ new Map();
|
|
497
|
-
for (const cond of conditions) if (cond.subtype === "type") {
|
|
498
|
-
const key = cond.mediaType || "all";
|
|
499
|
-
const existing = typeConditions.get(key);
|
|
500
|
-
if (existing !== void 0 && existing !== !cond.negated) return true;
|
|
501
|
-
typeConditions.set(key, !cond.negated);
|
|
502
|
-
} else if (cond.subtype === "feature") {
|
|
503
|
-
const key = cond.condition;
|
|
504
|
-
const existing = featureConditions.get(key);
|
|
505
|
-
if (existing !== void 0 && existing !== !cond.negated) return true;
|
|
506
|
-
featureConditions.set(key, !cond.negated);
|
|
507
|
-
} else if (cond.subtype === "dimension") {
|
|
508
|
-
const condKey = cond.condition;
|
|
509
|
-
const existing = dimensionConditions.get(condKey);
|
|
510
|
-
if (existing !== void 0 && existing !== !cond.negated) return true;
|
|
511
|
-
dimensionConditions.set(condKey, !cond.negated);
|
|
512
|
-
if (!cond.negated) {
|
|
513
|
-
const dim = cond.dimension || "width";
|
|
514
|
-
let bounds = dimensionsByDim.get(dim);
|
|
515
|
-
if (!bounds) {
|
|
516
|
-
bounds = {
|
|
517
|
-
lowerBound: null,
|
|
518
|
-
upperBound: null
|
|
519
|
-
};
|
|
520
|
-
dimensionsByDim.set(dim, bounds);
|
|
521
|
-
}
|
|
522
|
-
if (cond.lowerBound?.valueNumeric != null) {
|
|
523
|
-
const value = cond.lowerBound.valueNumeric;
|
|
524
|
-
if (bounds.lowerBound === null || value > bounds.lowerBound) bounds.lowerBound = value;
|
|
525
|
-
}
|
|
526
|
-
if (cond.upperBound?.valueNumeric != null) {
|
|
527
|
-
const value = cond.upperBound.valueNumeric;
|
|
528
|
-
if (bounds.upperBound === null || value < bounds.upperBound) bounds.upperBound = value;
|
|
529
|
-
}
|
|
530
|
-
if (bounds.lowerBound !== null && bounds.upperBound !== null && bounds.lowerBound >= bounds.upperBound) return true;
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
return false;
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* Check if container conditions contain contradictions in style queries
|
|
537
|
-
* e.g., style(--variant: danger) and style(--variant: success) together
|
|
538
|
-
* Same property with different values = always false
|
|
539
|
-
*
|
|
540
|
-
* Uses parsed container conditions for efficient analysis without regex parsing.
|
|
541
|
-
*/
|
|
542
|
-
function hasContainerStyleContradiction(conditions) {
|
|
543
|
-
const styleQueries = /* @__PURE__ */ new Map();
|
|
544
|
-
for (const cond of conditions) {
|
|
545
|
-
if (cond.subtype !== "style" || !cond.property) continue;
|
|
546
|
-
const property = cond.property;
|
|
547
|
-
const value = cond.propertyValue;
|
|
548
|
-
if (!styleQueries.has(property)) styleQueries.set(property, {
|
|
549
|
-
hasExistence: false,
|
|
550
|
-
values: /* @__PURE__ */ new Set(),
|
|
551
|
-
hasNegatedExistence: false
|
|
552
|
-
});
|
|
553
|
-
const entry = styleQueries.get(property);
|
|
554
|
-
if (cond.negated) {
|
|
555
|
-
if (value === void 0) entry.hasNegatedExistence = true;
|
|
556
|
-
} else if (value === void 0) entry.hasExistence = true;
|
|
557
|
-
else entry.values.add(value);
|
|
558
|
-
}
|
|
559
|
-
for (const [, entry] of styleQueries) {
|
|
560
|
-
if (entry.hasExistence && entry.hasNegatedExistence) return true;
|
|
561
|
-
if (entry.values.size > 1) return true;
|
|
562
|
-
if (entry.hasNegatedExistence && entry.values.size > 0) return true;
|
|
563
|
-
}
|
|
564
|
-
return false;
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* Get a unique key for a variant (for deduplication)
|
|
568
|
-
*/
|
|
569
|
-
function getVariantKey(v) {
|
|
570
|
-
const modifierKey = v.modifierConditions.map(getModifierKey).sort().join("|");
|
|
571
|
-
const pseudoKey = v.pseudoConditions.map(getPseudoKey).sort().join("|");
|
|
572
|
-
const ownKey = v.ownConditions.map((c) => "attribute" in c ? `mod:${getModifierKey(c)}` : `pseudo:${getPseudoKey(c)}`).sort().join("|");
|
|
573
|
-
const containerKey = v.containerConditions.map((c) => `${c.name ?? ""}:${c.negated ? "!" : ""}${c.condition}`).sort().join("|");
|
|
574
|
-
return [
|
|
575
|
-
modifierKey,
|
|
576
|
-
pseudoKey,
|
|
577
|
-
ownKey,
|
|
578
|
-
v.mediaConditions.map((c) => `${c.subtype}:${c.negated ? "!" : ""}${c.condition}`).sort().join("|"),
|
|
579
|
-
containerKey,
|
|
580
|
-
v.supportsConditions.map((c) => `${c.subtype}:${c.negated ? "!" : ""}${c.condition}`).sort().join("|"),
|
|
581
|
-
v.rootConditions.map(getRootKey).sort().join("|"),
|
|
582
|
-
v.startingStyle ? "1" : "0"
|
|
583
|
-
].join("###");
|
|
584
|
-
}
|
|
585
|
-
/**
|
|
586
|
-
* Check if variant A is a superset of variant B (A is more restrictive)
|
|
587
|
-
*
|
|
588
|
-
* If A has all of B's conditions plus more, then A is redundant
|
|
589
|
-
* because B already covers the same cases (and more).
|
|
590
|
-
*
|
|
591
|
-
* Example:
|
|
592
|
-
* A: :not([size=large]):not([size=medium]):not([size=small])
|
|
593
|
-
* B: :not([size=large])
|
|
594
|
-
* A is a superset of B, so A is redundant when B exists.
|
|
595
|
-
*/
|
|
596
|
-
function isVariantSuperset(a, b) {
|
|
597
|
-
if (a.startingStyle !== b.startingStyle) return false;
|
|
598
|
-
if (!isRootConditionsSuperset(a.rootConditions, b.rootConditions)) return false;
|
|
599
|
-
if (!isMediaConditionsSuperset(a.mediaConditions, b.mediaConditions)) return false;
|
|
600
|
-
if (!isContainerConditionsSuperset(a.containerConditions, b.containerConditions)) return false;
|
|
601
|
-
if (!isSupportsConditionsSuperset(a.supportsConditions, b.supportsConditions)) return false;
|
|
602
|
-
if (!isModifierConditionsSuperset(a.modifierConditions, b.modifierConditions)) return false;
|
|
603
|
-
if (!isPseudoConditionsSuperset(a.pseudoConditions, b.pseudoConditions)) return false;
|
|
604
|
-
if (!isOwnConditionsSuperset(a.ownConditions, b.ownConditions)) return false;
|
|
605
|
-
return a.mediaConditions.length + a.containerConditions.length + a.supportsConditions.length + a.modifierConditions.length + a.pseudoConditions.length + a.rootConditions.length + a.ownConditions.length > b.mediaConditions.length + b.containerConditions.length + b.supportsConditions.length + b.modifierConditions.length + b.pseudoConditions.length + b.rootConditions.length + b.ownConditions.length;
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* Check if media conditions A is a superset of B
|
|
609
|
-
*/
|
|
610
|
-
function isMediaConditionsSuperset(a, b) {
|
|
611
|
-
const aKeys = new Set(a.map((c) => `${c.subtype}|${c.condition}|${c.negated}`));
|
|
612
|
-
for (const c of b) {
|
|
613
|
-
const key = `${c.subtype}|${c.condition}|${c.negated}`;
|
|
614
|
-
if (!aKeys.has(key)) return false;
|
|
615
|
-
}
|
|
616
|
-
return true;
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* Check if container conditions A is a superset of B
|
|
620
|
-
*/
|
|
621
|
-
function isContainerConditionsSuperset(a, b) {
|
|
622
|
-
const aKeys = new Set(a.map((c) => `${c.name ?? ""}|${c.condition}|${c.negated}`));
|
|
623
|
-
for (const c of b) {
|
|
624
|
-
const key = `${c.name ?? ""}|${c.condition}|${c.negated}`;
|
|
625
|
-
if (!aKeys.has(key)) return false;
|
|
626
|
-
}
|
|
627
|
-
return true;
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* Check if supports conditions A is a superset of B
|
|
631
|
-
*/
|
|
632
|
-
function isSupportsConditionsSuperset(a, b) {
|
|
633
|
-
const aKeys = new Set(a.map((c) => `${c.subtype}|${c.condition}|${c.negated}`));
|
|
634
|
-
for (const c of b) {
|
|
635
|
-
const key = `${c.subtype}|${c.condition}|${c.negated}`;
|
|
636
|
-
if (!aKeys.has(key)) return false;
|
|
637
|
-
}
|
|
638
|
-
return true;
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* Check if modifier conditions A is a superset of B
|
|
642
|
-
*/
|
|
643
|
-
function isModifierConditionsSuperset(a, b) {
|
|
644
|
-
const aKeys = new Set(a.map(getModifierKey));
|
|
645
|
-
for (const c of b) if (!aKeys.has(getModifierKey(c))) return false;
|
|
646
|
-
return true;
|
|
647
|
-
}
|
|
648
|
-
/**
|
|
649
|
-
* Check if pseudo conditions A is a superset of B
|
|
650
|
-
*/
|
|
651
|
-
function isPseudoConditionsSuperset(a, b) {
|
|
652
|
-
const aKeys = new Set(a.map(getPseudoKey));
|
|
653
|
-
for (const c of b) if (!aKeys.has(getPseudoKey(c))) return false;
|
|
654
|
-
return true;
|
|
655
|
-
}
|
|
656
|
-
/**
|
|
657
|
-
* Check if root conditions A is a superset of B
|
|
658
|
-
*/
|
|
659
|
-
function isRootConditionsSuperset(a, b) {
|
|
660
|
-
const aKeys = new Set(a.map(getRootKey));
|
|
661
|
-
for (const c of b) if (!aKeys.has(getRootKey(c))) return false;
|
|
662
|
-
return true;
|
|
663
|
-
}
|
|
664
|
-
/**
|
|
665
|
-
* Check if own conditions A is a superset of B
|
|
666
|
-
*/
|
|
667
|
-
function isOwnConditionsSuperset(a, b) {
|
|
668
|
-
const aKeys = new Set(a.map((c) => "attribute" in c ? `mod:${getModifierKey(c)}` : `pseudo:${getPseudoKey(c)}`));
|
|
669
|
-
for (const c of b) {
|
|
670
|
-
const key = "attribute" in c ? `mod:${getModifierKey(c)}` : `pseudo:${getPseudoKey(c)}`;
|
|
671
|
-
if (!aKeys.has(key)) return false;
|
|
672
|
-
}
|
|
673
|
-
return true;
|
|
674
|
-
}
|
|
675
|
-
/**
|
|
676
|
-
* Deduplicate variants
|
|
677
|
-
*
|
|
678
|
-
* Removes:
|
|
679
|
-
* 1. Exact duplicates (same key)
|
|
680
|
-
* 2. Superset variants (more restrictive selectors that are redundant)
|
|
681
|
-
*/
|
|
682
|
-
function dedupeVariants(variants) {
|
|
683
|
-
const seen = /* @__PURE__ */ new Set();
|
|
684
|
-
let result = [];
|
|
685
|
-
for (const v of variants) {
|
|
686
|
-
const key = getVariantKey(v);
|
|
687
|
-
if (!seen.has(key)) {
|
|
688
|
-
seen.add(key);
|
|
689
|
-
result.push(v);
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
result.sort((a, b) => {
|
|
693
|
-
return a.modifierConditions.length + a.pseudoConditions.length + a.ownConditions.length + a.mediaConditions.length + a.containerConditions.length + a.supportsConditions.length + a.rootConditions.length - (b.modifierConditions.length + b.pseudoConditions.length + b.ownConditions.length + b.mediaConditions.length + b.containerConditions.length + b.supportsConditions.length + b.rootConditions.length);
|
|
694
|
-
});
|
|
695
|
-
const filtered = [];
|
|
696
|
-
for (const candidate of result) {
|
|
697
|
-
let isRedundant = false;
|
|
698
|
-
for (const kept of filtered) if (isVariantSuperset(candidate, kept)) {
|
|
699
|
-
isRedundant = true;
|
|
700
|
-
break;
|
|
701
|
-
}
|
|
702
|
-
if (!isRedundant) filtered.push(candidate);
|
|
703
|
-
}
|
|
704
|
-
return filtered;
|
|
705
|
-
}
|
|
706
|
-
/**
|
|
707
|
-
* Combine AND conditions into CSS
|
|
708
|
-
*
|
|
709
|
-
* AND of conditions means cartesian product of variants:
|
|
710
|
-
* (A1 | A2) & (B1 | B2) = A1&B1 | A1&B2 | A2&B1 | A2&B2
|
|
711
|
-
*
|
|
712
|
-
* Variants that result in contradictions (e.g., conflicting media rules)
|
|
713
|
-
* are filtered out.
|
|
714
|
-
*/
|
|
715
|
-
function andToCSS(children) {
|
|
716
|
-
let currentVariants = [emptyVariant()];
|
|
717
|
-
for (const child of children) {
|
|
718
|
-
const childCSS = conditionToCSSInner(child);
|
|
719
|
-
if (childCSS.isImpossible || childCSS.variants.length === 0) return {
|
|
720
|
-
variants: [],
|
|
721
|
-
isImpossible: true
|
|
722
|
-
};
|
|
723
|
-
const newVariants = [];
|
|
724
|
-
for (const current of currentVariants) for (const childVariant of childCSS.variants) {
|
|
725
|
-
const merged = mergeVariants(current, childVariant);
|
|
726
|
-
if (merged !== null) newVariants.push(merged);
|
|
727
|
-
}
|
|
728
|
-
if (newVariants.length === 0) return {
|
|
729
|
-
variants: [],
|
|
730
|
-
isImpossible: true
|
|
731
|
-
};
|
|
732
|
-
currentVariants = dedupeVariants(newVariants);
|
|
733
|
-
}
|
|
734
|
-
return {
|
|
735
|
-
variants: currentVariants,
|
|
736
|
-
isImpossible: false
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
/**
|
|
740
|
-
* Combine OR conditions into CSS
|
|
741
|
-
*
|
|
742
|
-
* OR in CSS means multiple selector variants (DNF).
|
|
743
|
-
* Each variant becomes a separate selector in the comma-separated list,
|
|
744
|
-
* or multiple CSS rules if they have different at-rules.
|
|
745
|
-
*
|
|
746
|
-
* Note: OR exclusivity is handled at the pipeline level (expandOrConditions),
|
|
747
|
-
* so here we just collect all variants. Any remaining ORs in the condition
|
|
748
|
-
* tree (e.g., from De Morgan expansion) are handled as simple alternatives.
|
|
749
|
-
*/
|
|
750
|
-
function orToCSS(children) {
|
|
751
|
-
const allVariants = [];
|
|
752
|
-
for (const child of children) {
|
|
753
|
-
const childCSS = conditionToCSSInner(child);
|
|
754
|
-
if (childCSS.isImpossible) continue;
|
|
755
|
-
allVariants.push(...childCSS.variants);
|
|
756
|
-
}
|
|
757
|
-
if (allVariants.length === 0) return {
|
|
758
|
-
variants: [],
|
|
759
|
-
isImpossible: true
|
|
760
|
-
};
|
|
761
|
-
return {
|
|
762
|
-
variants: dedupeVariants(allVariants),
|
|
763
|
-
isImpossible: false
|
|
764
|
-
};
|
|
765
|
-
}
|
|
766
|
-
/**
|
|
767
|
-
* Get a cache key for a condition
|
|
768
|
-
*/
|
|
769
|
-
function getConditionKey(node) {
|
|
770
|
-
if (node.kind === "true") return "TRUE";
|
|
771
|
-
if (node.kind === "false") return "FALSE";
|
|
772
|
-
if (node.kind === "state") return node.uniqueId;
|
|
773
|
-
if (node.kind === "compound") {
|
|
774
|
-
const childKeys = node.children.map(getConditionKey).sort();
|
|
775
|
-
return `${node.operator}(${childKeys.join(",")})`;
|
|
776
|
-
}
|
|
777
|
-
return "UNKNOWN";
|
|
778
|
-
}
|
|
779
|
-
/**
|
|
780
|
-
* Build at-rules array from a variant
|
|
781
|
-
*/
|
|
782
|
-
function buildAtRulesFromVariant(variant) {
|
|
783
|
-
const atRules = [];
|
|
784
|
-
if (variant.mediaConditions.length > 0) {
|
|
785
|
-
const conditionParts = variant.mediaConditions.map((c) => {
|
|
786
|
-
if (c.subtype === "type") return c.negated ? `not ${c.condition}` : c.condition;
|
|
787
|
-
else return c.negated ? `(not ${c.condition})` : c.condition;
|
|
788
|
-
});
|
|
789
|
-
atRules.push(`@media ${conditionParts.join(" and ")}`);
|
|
790
|
-
}
|
|
791
|
-
if (variant.containerConditions.length > 0) {
|
|
792
|
-
const byName = /* @__PURE__ */ new Map();
|
|
793
|
-
for (const cond of variant.containerConditions) {
|
|
794
|
-
const group = byName.get(cond.name) || [];
|
|
795
|
-
group.push(cond);
|
|
796
|
-
byName.set(cond.name, group);
|
|
797
|
-
}
|
|
798
|
-
for (const [name, conditions] of byName) {
|
|
799
|
-
const conditionParts = conditions.map((c) => c.negated ? `(not ${c.condition})` : c.condition);
|
|
800
|
-
const namePrefix = name ? `${name} ` : "";
|
|
801
|
-
atRules.push(`@container ${namePrefix}${conditionParts.join(" and ")}`);
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
if (variant.supportsConditions.length > 0) {
|
|
805
|
-
const conditionParts = variant.supportsConditions.map((c) => {
|
|
806
|
-
if (c.subtype === "selector") {
|
|
807
|
-
const selectorCond = `selector(${c.condition})`;
|
|
808
|
-
return c.negated ? `(not ${selectorCond})` : selectorCond;
|
|
809
|
-
} else {
|
|
810
|
-
const featureCond = `(${c.condition})`;
|
|
811
|
-
return c.negated ? `(not ${featureCond})` : featureCond;
|
|
812
|
-
}
|
|
813
|
-
});
|
|
814
|
-
atRules.push(`@supports ${conditionParts.join(" and ")}`);
|
|
815
|
-
}
|
|
816
|
-
if (variant.startingStyle) atRules.push("@starting-style");
|
|
817
|
-
return atRules;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
//#endregion
|
|
821
|
-
export { buildAtRulesFromVariant, conditionToCSS, modifierToCSS, pseudoToCSS, rootConditionsToCSS };
|
|
822
|
-
//# sourceMappingURL=materialize.js.map
|