@cube-dev/ui-kit 0.118.0 → 0.119.1
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 +24 -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 +3 -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
package/dist/tasty/debug.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debug.js","names":[],"sources":["../../src/tasty/debug.ts"],"sourcesContent":["/**\n * Debug utilities for inspecting tasty-generated CSS at runtime\n */\n\nimport { CHUNK_NAMES } from './chunks/definitions';\nimport { getCssTextForNode, injector } from './injector';\nimport { isDevEnv } from './utils/is-dev-env';\n\n// Type definitions for the new API\ntype CSSTarget =\n | 'all' // tasty CSS + tasty global CSS + raw CSS\n | 'global' // only tasty global CSS\n | 'active' // tasty CSS for classes currently in DOM\n | 'unused' // tasty CSS with refCount = 0 (still in cache but not actively used)\n | 'page' // ALL CSS on the page across stylesheets (not only tasty)\n | string // 't123' tasty class or a CSS selector\n | string[] // array of tasty classes like ['t1', 't2']\n | Element; // a DOM element\n\ninterface CssOptions {\n root?: Document | ShadowRoot;\n prettify?: boolean; // default: true\n log?: boolean; // default: false\n}\n\ninterface ChunkInfo {\n className: string;\n chunkName: string | null;\n}\n\ninterface InspectResult {\n element?: Element | null;\n classes: string[]; // tasty classes found on the element\n chunks: ChunkInfo[]; // chunk information per class (with chunking enabled)\n css: string; // full, prettified CSS affecting the element\n size: number; // characters in css\n rules: number; // number of rule blocks\n}\n\ninterface CacheMetrics {\n hits: number;\n misses: number;\n bulkCleanups: number;\n totalInsertions: number;\n totalUnused: number;\n stylesCleanedUp: number;\n cleanupHistory: Array<{\n timestamp: number;\n classesDeleted: number;\n cssSize: number;\n rulesDeleted: number;\n }>;\n startTime: number;\n\n // Calculated metrics\n unusedHits?: number; // calculated as current unused count\n}\n\ninterface CacheStatus {\n classes: {\n active: string[]; // classes with refCount > 0 and present in DOM\n unused: string[]; // classes with refCount = 0 but still in cache\n all: string[]; // union of both\n };\n metrics: CacheMetrics | null;\n}\n\ninterface Definitions {\n properties: string[]; // defined via @property\n keyframes: Array<{ name: string; refCount: number }>;\n}\n\ninterface SummaryOptions {\n root?: Document | ShadowRoot;\n log?: boolean;\n includePageCSS?:\n | false // do not include page-level CSS stats (default)\n | true // include sizes/counts only\n | 'all'; // include stats and return full page CSS string\n}\n\ninterface Summary {\n // Classes\n activeClasses: string[];\n unusedClasses: string[];\n totalStyledClasses: string[];\n\n // Tasty CSS sizes\n activeCSSSize: number;\n unusedCSSSize: number;\n globalCSSSize: number; // injectGlobal() CSS\n rawCSSSize: number; // injectRawCSS() / useRawCSS() CSS\n keyframesCSSSize: number; // @keyframes CSS\n propertyCSSSize: number; // @property CSS\n totalCSSSize: number; // all tasty CSS (active + unused + global + raw + keyframes + property)\n\n // Tasty CSS payloads\n activeCSS: string;\n unusedCSS: string;\n globalCSS: string; // injectGlobal() CSS\n rawCSS: string; // injectRawCSS() / useRawCSS() CSS\n keyframesCSS: string; // @keyframes CSS\n propertyCSS: string; // @property CSS\n allCSS: string; // all tasty CSS combined\n\n // Rule counts\n globalRuleCount: number;\n rawRuleCount: number;\n keyframesRuleCount: number;\n propertyRuleCount: number;\n\n // Page-level CSS (across all stylesheets, not only tasty) — shown when includePageCSS != false\n page?: {\n css?: string; // present only when includePageCSS === 'all'\n cssSize: number; // total characters\n ruleCount: number; // approximate rule count\n stylesheetCount: number; // stylesheets scanned (CORS-safe)\n skippedStylesheets: number; // stylesheets skipped due to cross-origin/CORS\n };\n\n // Metrics & definitions\n metrics: CacheMetrics | null;\n definedProperties: string[];\n definedKeyframes: Array<{ name: string; refCount: number }>;\n propertyCount: number;\n keyframeCount: number;\n\n // Cleanup summary\n cleanupSummary: {\n enabled: boolean;\n totalCleanups: number;\n totalClassesDeleted: number;\n totalCssDeleted: number;\n totalRulesDeleted: number;\n averageClassesPerCleanup: number;\n averageCssPerCleanup: number;\n averageRulesPerCleanup: number;\n lastCleanup?: {\n timestamp: number;\n date: string;\n classesDeleted: number;\n cssSize: number;\n rulesDeleted: number;\n };\n };\n\n // Chunk breakdown (style chunking optimization)\n chunkBreakdown: {\n byChunk: Record<\n string,\n { classes: string[]; cssSize: number; ruleCount: number }\n >;\n totalChunkTypes: number;\n };\n}\n\n/**\n * Pretty-print CSS with proper indentation and formatting\n */\nfunction prettifyCSS(css: string): string {\n if (!css || css.trim() === '') {\n return '';\n }\n\n // First, normalize whitespace but preserve structure\n let formatted = css.replace(/\\s+/g, ' ').trim();\n\n // Add newlines after opening braces\n formatted = formatted.replace(/\\s*\\{\\s*/g, ' {\\n');\n\n // Add newlines after semicolons (but not inside strings or functions)\n formatted = formatted.replace(/;(?![^\"']*[\"'][^\"']*$)(?![^()]*\\))/g, ';\\n');\n\n // Add newlines before closing braces\n formatted = formatted.replace(/\\s*\\}\\s*/g, '\\n}\\n');\n\n // Handle comma-separated selectors (only outside of property values)\n // This regex looks for commas that are:\n // 1. Not inside quotes\n // 2. Not inside parentheses (CSS functions)\n // 3. Not followed by a colon (not in a property value)\n formatted = formatted.replace(\n /,(?![^\"']*[\"'][^\"']*$)(?![^()]*\\))(?=.*:.*\\{|.*\\{)/g,\n ',\\n',\n );\n\n // Process line by line for proper indentation\n const lines = formatted.split('\\n');\n let indentLevel = 0;\n const indentSize = 2;\n\n const formattedLines = lines.map((line) => {\n const trimmed = line.trim();\n if (!trimmed) return '';\n\n // Handle closing braces - decrease indent first\n if (trimmed === '}') {\n indentLevel = Math.max(0, indentLevel - 1);\n return ' '.repeat(indentLevel * indentSize) + trimmed;\n }\n\n // Current line with proper indentation\n const indent = ' '.repeat(indentLevel * indentSize);\n let result = indent + trimmed;\n\n // Handle opening braces - increase indent for next line\n if (trimmed.endsWith('{')) {\n indentLevel++;\n }\n\n return result;\n });\n\n // Clean up the result and ensure proper spacing\n let result = formattedLines\n .filter((line) => line.trim()) // Remove empty lines\n .join('\\n')\n .replace(/\\n{3,}/g, '\\n\\n') // Max 2 consecutive newlines\n .trim();\n\n // Final cleanup: ensure single spaces in function calls\n result = result.replace(/,\\s+/g, ', ');\n\n return result;\n}\n\n// Helper functions\nfunction findAllTastyClasses(root: Document | ShadowRoot = document): string[] {\n const classes = new Set<string>();\n const elements = (root as Document).querySelectorAll?.('[class]') || [];\n\n elements.forEach((element) => {\n const classList = element.getAttribute('class');\n if (classList) {\n const tastyClasses = classList\n .split(/\\s+/)\n .filter((cls) => /^t\\d+$/.test(cls));\n tastyClasses.forEach((cls) => classes.add(cls));\n }\n });\n\n return Array.from(classes).sort((a, b) => {\n const aNum = parseInt(a.slice(1));\n const bNum = parseInt(b.slice(1));\n return aNum - bNum;\n });\n}\n\nfunction findAllStyledClasses(\n root: Document | ShadowRoot = document,\n): string[] {\n // Extract tasty classes from all CSS text by parsing selectors\n const allCSS = injector.instance.getCssText({ root });\n const classes = new Set<string>();\n\n // Simple regex to find .t{number} class selectors\n const classRegex = /\\.t(\\d+)/g;\n let match;\n while ((match = classRegex.exec(allCSS)) !== null) {\n classes.add(`t${match[1]}`);\n }\n\n return Array.from(classes).sort((a, b) => {\n const aNum = parseInt(a.slice(1));\n const bNum = parseInt(b.slice(1));\n return aNum - bNum;\n });\n}\n\nfunction extractCSSRules(\n css: string,\n): Array<{ selector: string; declarations: string }> {\n const rules: Array<{ selector: string; declarations: string }> = [];\n\n // Remove comments\n let cleanCSS = css.replace(/\\/\\*[\\s\\S]*?\\*\\//g, '');\n\n let i = 0;\n while (i < cleanCSS.length) {\n // Skip whitespace\n while (i < cleanCSS.length && /\\s/.test(cleanCSS[i])) {\n i++;\n }\n if (i >= cleanCSS.length) break;\n\n // Find selector start\n const selectorStart = i;\n let braceDepth = 0;\n let inString = false;\n let stringChar = '';\n\n // Find opening brace\n while (i < cleanCSS.length) {\n const char = cleanCSS[i];\n if (inString) {\n if (char === stringChar && cleanCSS[i - 1] !== '\\\\') {\n inString = false;\n }\n } else {\n if (char === '\"' || char === \"'\") {\n inString = true;\n stringChar = char;\n } else if (char === '{') {\n braceDepth++;\n if (braceDepth === 1) break;\n }\n }\n i++;\n }\n\n if (i >= cleanCSS.length) break;\n const selector = cleanCSS.substring(selectorStart, i).trim();\n i++; // Skip opening brace\n\n // Find matching closing brace\n const contentStart = i;\n braceDepth = 1;\n inString = false;\n\n while (i < cleanCSS.length && braceDepth > 0) {\n const char = cleanCSS[i];\n if (inString) {\n if (char === stringChar && cleanCSS[i - 1] !== '\\\\') {\n inString = false;\n }\n } else {\n if (char === '\"' || char === \"'\") {\n inString = true;\n stringChar = char;\n } else if (char === '{') {\n braceDepth++;\n } else if (char === '}') {\n braceDepth--;\n }\n }\n i++;\n }\n\n const content = cleanCSS.substring(contentStart, i - 1).trim();\n if (content && selector) {\n rules.push({ selector, declarations: content });\n }\n }\n\n return rules;\n}\n\nfunction getGlobalCSS(root: Document | ShadowRoot = document): string {\n const allCSS = injector.instance.getCssText({ root });\n const rules = extractCSSRules(allCSS);\n\n const globalRules = rules.filter((rule) => {\n const selectors = rule.selector.split(',').map((s) => s.trim());\n return !selectors.every((selector) => {\n const cleanSelector = selector.replace(/[.#:\\s>+~[\\]()]/g, ' ');\n const parts = cleanSelector.split(/\\s+/).filter(Boolean);\n return parts.length > 0 && parts.every((part) => /^t\\d+$/.test(part));\n });\n });\n\n const globalCSS = globalRules\n .map((rule) => `${rule.selector} { ${rule.declarations} }`)\n .join('\\n');\n return prettifyCSS(globalCSS);\n}\n\nfunction getPageCSS(options?: {\n root?: Document | ShadowRoot;\n includeCrossOrigin?: boolean;\n}): string {\n const root = options?.root || document;\n const includeCrossOrigin = options?.includeCrossOrigin ?? false;\n\n const cssChunks: string[] = [];\n\n try {\n if ('styleSheets' in root) {\n const styleSheets = Array.from((root as Document).styleSheets);\n\n for (const sheet of styleSheets) {\n try {\n if (sheet.cssRules) {\n const rules = Array.from(sheet.cssRules);\n cssChunks.push(rules.map((rule) => rule.cssText).join('\\n'));\n }\n } catch (e) {\n // Cross-origin sheet or other access error\n if (includeCrossOrigin) {\n cssChunks.push(\n `/* Cross-origin stylesheet: ${sheet.href || 'inline'} */`,\n );\n }\n }\n }\n }\n } catch (e) {\n // Fallback error handling\n }\n\n return cssChunks.join('\\n');\n}\n\nfunction getPageStats(options?: {\n root?: Document | ShadowRoot;\n includeCrossOrigin?: boolean;\n}): {\n cssSize: number;\n ruleCount: number;\n stylesheetCount: number;\n skippedStylesheets: number;\n} {\n const root = options?.root || document;\n const includeCrossOrigin = options?.includeCrossOrigin ?? false;\n\n let cssSize = 0;\n let ruleCount = 0;\n let stylesheetCount = 0;\n let skippedStylesheets = 0;\n\n try {\n if ('styleSheets' in root) {\n const styleSheets = Array.from((root as Document).styleSheets);\n stylesheetCount = styleSheets.length;\n\n for (const sheet of styleSheets) {\n try {\n if (sheet.cssRules) {\n const rules = Array.from(sheet.cssRules);\n ruleCount += rules.length;\n cssSize += rules.reduce(\n (sum, rule) => sum + rule.cssText.length,\n 0,\n );\n }\n } catch (e) {\n skippedStylesheets++;\n }\n }\n }\n } catch (e) {\n // Fallback error handling\n }\n\n return { cssSize, ruleCount, stylesheetCount, skippedStylesheets };\n}\n\n// ============================================================================\n// Chunk-aware helpers (for style chunking optimization)\n// ============================================================================\n\n/**\n * Extract chunk name from a cache key.\n *\n * Cache keys have the format: \"chunkName\\0key:value\\0key:value...\"\n * or \"[states:...]\\0chunkName\\0...\" for predefined states.\n *\n * @param cacheKey - The cache key to parse\n * @returns The chunk name, or null if not found\n */\nfunction extractChunkNameFromCacheKey(cacheKey: string): string | null {\n // Cache keys are separated by \\0 (null character)\n const parts = cacheKey.split('\\0');\n\n for (const part of parts) {\n // Skip predefined states prefix\n if (part.startsWith('[states:')) continue;\n // First non-states part that doesn't contain : is the chunk name\n if (!part.includes(':') && part.length > 0) {\n return part;\n }\n }\n return null;\n}\n\n/**\n * Get chunk info for a className by reverse-looking up its cache key.\n *\n * @param className - The tasty class name (e.g., \"t0\", \"t123\")\n * @param root - The document or shadow root to search in\n * @returns Object with chunk name and cache key, or nulls if not found\n */\nfunction getChunkForClassName(\n className: string,\n root: Document | ShadowRoot = document,\n): { chunkName: string | null; cacheKey: string | null } {\n const registry = (injector.instance as any)['sheetManager']?.getRegistry(\n root,\n );\n if (!registry) {\n return { chunkName: null, cacheKey: null };\n }\n\n // Reverse lookup: find the cache key for this className\n for (const [cacheKey, cn] of registry.cacheKeyToClassName) {\n if (cn === className) {\n return {\n chunkName: extractChunkNameFromCacheKey(cacheKey),\n cacheKey,\n };\n }\n }\n return { chunkName: null, cacheKey: null };\n}\n\n/**\n * Get chunk breakdown statistics for all styles.\n *\n * @param root - The document or shadow root to search in\n * @returns Object with breakdown by chunk type and totals\n */\nfunction getChunkBreakdown(root: Document | ShadowRoot = document): {\n byChunk: Record<\n string,\n { classes: string[]; cssSize: number; ruleCount: number }\n >;\n totalChunkTypes: number;\n} {\n const registry = (injector.instance as any)['sheetManager']?.getRegistry(\n root,\n );\n\n if (!registry) {\n return {\n byChunk: {},\n totalChunkTypes: 0,\n };\n }\n\n const byChunk: Record<\n string,\n { classes: string[]; cssSize: number; ruleCount: number }\n > = {};\n\n // Group classes by chunk\n for (const [cacheKey, className] of registry.cacheKeyToClassName) {\n const chunkName = extractChunkNameFromCacheKey(cacheKey) || 'unknown';\n\n if (!byChunk[chunkName]) {\n byChunk[chunkName] = { classes: [], cssSize: 0, ruleCount: 0 };\n }\n\n byChunk[chunkName].classes.push(className);\n\n // Get CSS for this class\n const css = injector.instance.getCssTextForClasses([className], { root });\n byChunk[chunkName].cssSize += css.length;\n byChunk[chunkName].ruleCount += (css.match(/\\{[^}]*\\}/g) || []).length;\n }\n\n // Sort classes within each chunk for consistency\n for (const entry of Object.values(byChunk)) {\n entry.classes.sort((a, b) => {\n const aNum = parseInt(a.slice(1));\n const bNum = parseInt(b.slice(1));\n return aNum - bNum;\n });\n }\n\n return {\n byChunk,\n totalChunkTypes: Object.keys(byChunk).length,\n };\n}\n\n/**\n * Concise tastyDebug API for inspecting styles at runtime\n */\nexport const tastyDebug = {\n // 1) One function to get CSS from anywhere\n css(target: CSSTarget, opts?: CssOptions): string {\n const { root = document, prettify = true, log = false } = opts || {};\n let css = '';\n\n if (typeof target === 'string') {\n if (target === 'all') {\n css = injector.instance.getCssText({ root });\n } else if (target === 'global') {\n css = getGlobalCSS(root);\n } else if (target === 'active') {\n const activeClasses = findAllTastyClasses(root);\n css = injector.instance.getCssTextForClasses(activeClasses, { root });\n } else if (target === 'unused') {\n // Get unused classes (refCount = 0) from the registry\n const registry = (injector.instance as any)[\n 'sheetManager'\n ]?.getRegistry(root);\n const unusedClasses: string[] = registry\n ? Array.from(\n registry.refCounts.entries() as IterableIterator<\n [string, number]\n >,\n )\n .filter(([, refCount]: [string, number]) => refCount === 0)\n .map(([className]: [string, number]) => className)\n : [];\n css = injector.instance.getCssTextForClasses(unusedClasses, { root });\n } else if (target === 'page') {\n css = getPageCSS({ root, includeCrossOrigin: true });\n } else if (/^t\\d+$/.test(target)) {\n // Single tasty class\n css = injector.instance.getCssTextForClasses([target], { root });\n } else {\n // CSS selector - find element and get its CSS\n const element = (root as Document).querySelector?.(target);\n if (element) {\n css = getCssTextForNode(element, { root });\n }\n }\n } else if (Array.isArray(target)) {\n // Array of tasty classes\n css = injector.instance.getCssTextForClasses(target, { root });\n } else if (target instanceof Element) {\n // DOM element\n css = getCssTextForNode(target, { root });\n }\n\n const result = prettify ? prettifyCSS(css) : css;\n\n if (log) {\n console.group(\n `🎨 CSS for ${Array.isArray(target) ? `[${target.join(', ')}]` : target}`,\n );\n console.log(result || '(empty)');\n console.groupEnd();\n }\n\n return result;\n },\n\n // 2) Element-level inspection\n inspect(\n target: string | Element,\n opts?: { root?: Document | ShadowRoot },\n ): InspectResult {\n const { root = document } = opts || {};\n const element =\n typeof target === 'string'\n ? (root as Document).querySelector?.(target)\n : target;\n\n if (!element) {\n return {\n element: null,\n classes: [],\n chunks: [],\n css: '',\n size: 0,\n rules: 0,\n };\n }\n\n const classList = element.getAttribute('class') || '';\n const tastyClasses = classList\n .split(/\\s+/)\n .filter((cls) => /^t\\d+$/.test(cls));\n\n // Get chunk info for each tasty class\n const chunks: ChunkInfo[] = tastyClasses.map((className) => ({\n className,\n chunkName: getChunkForClassName(className, root).chunkName,\n }));\n\n const css = getCssTextForNode(element, { root });\n const prettifiedCSS = prettifyCSS(css);\n const ruleCount = (css.match(/\\{[^}]*\\}/g) || []).length;\n\n return {\n element,\n classes: tastyClasses,\n chunks,\n css: prettifiedCSS,\n size: css.length,\n rules: ruleCount,\n };\n },\n\n // 3) Cache + metrics at a glance\n cache(opts?: {\n root?: Document | ShadowRoot;\n includeHistory?: boolean;\n }): CacheStatus {\n const { root = document } = opts || {};\n const activeClasses = findAllTastyClasses(root);\n const allClasses = findAllStyledClasses(root);\n // Get unused classes (refCount = 0) from the registry\n const registry = (injector.instance as any)['sheetManager']?.getRegistry(\n root,\n );\n const unusedClasses: string[] = registry\n ? Array.from(\n registry.refCounts.entries() as IterableIterator<[string, number]>,\n )\n .filter(([, refCount]: [string, number]) => refCount === 0)\n .map(([className]: [string, number]) => className)\n : [];\n\n return {\n classes: {\n active: activeClasses,\n unused: unusedClasses,\n all: [...activeClasses, ...unusedClasses],\n },\n metrics: injector.instance.getMetrics({ root }),\n };\n },\n\n // 4) Cleanup + metrics utilities\n cleanup(opts?: { root?: Document | ShadowRoot }): void {\n const { root } = opts || {};\n injector.instance.cleanup(root);\n },\n\n metrics(opts?: { root?: Document | ShadowRoot }): CacheMetrics | null {\n const { root } = opts || {};\n return injector.instance.getMetrics({ root });\n },\n\n resetMetrics(opts?: { root?: Document | ShadowRoot }): void {\n const { root } = opts || {};\n injector.instance.resetMetrics({ root });\n },\n\n // 5) Chunk breakdown (style chunking optimization)\n /**\n * Get breakdown of styles by chunk type.\n *\n * With style chunking enabled, styles are split into logical chunks\n * (appearance, font, dimension, container, etc.) for better caching\n * and CSS reuse.\n *\n * @param opts - Options including root document/shadow root\n * @returns Breakdown by chunk type with class counts and CSS sizes\n */\n chunks(opts?: { root?: Document | ShadowRoot; log?: boolean }): {\n byChunk: Record<\n string,\n { classes: string[]; cssSize: number; ruleCount: number }\n >;\n totalChunkTypes: number;\n totalClasses: number;\n } {\n const { root = document, log = false } = opts || {};\n const breakdown = getChunkBreakdown(root);\n\n const totalClasses = Object.values(breakdown.byChunk).reduce(\n (sum, entry) => sum + entry.classes.length,\n 0,\n );\n\n if (log) {\n console.group('🧩 Style Chunk Breakdown');\n\n // Define display order matching CHUNK_NAMES\n const displayOrder = [\n CHUNK_NAMES.COMBINED, // non-chunked styles (e.g., @starting-style)\n CHUNK_NAMES.APPEARANCE,\n CHUNK_NAMES.FONT,\n CHUNK_NAMES.DIMENSION,\n CHUNK_NAMES.DISPLAY,\n CHUNK_NAMES.LAYOUT,\n CHUNK_NAMES.POSITION,\n CHUNK_NAMES.MISC,\n CHUNK_NAMES.SUBCOMPONENTS,\n ];\n\n // Show chunks in order\n for (const chunkName of displayOrder) {\n const data = breakdown.byChunk[chunkName];\n if (data) {\n const sizeStr =\n data.cssSize > 1024\n ? `${(data.cssSize / 1024).toFixed(1)}KB`\n : `${data.cssSize}B`;\n console.log(\n ` • ${chunkName}: ${data.classes.length} classes, ${sizeStr}, ${data.ruleCount} rules`,\n );\n }\n }\n\n // Show any unknown chunks\n for (const [chunkName, data] of Object.entries(breakdown.byChunk)) {\n if (\n !displayOrder.includes(chunkName as (typeof displayOrder)[number])\n ) {\n const sizeStr =\n data.cssSize > 1024\n ? `${(data.cssSize / 1024).toFixed(1)}KB`\n : `${data.cssSize}B`;\n console.log(\n ` • ${chunkName}: ${data.classes.length} classes, ${sizeStr}, ${data.ruleCount} rules`,\n );\n }\n }\n\n console.log(\n `📊 Total: ${totalClasses} classes across ${breakdown.totalChunkTypes} chunk types`,\n );\n console.groupEnd();\n }\n\n return {\n ...breakdown,\n totalClasses,\n };\n },\n\n // 6) Get CSS for specific global types\n getGlobalTypeCSS(\n type: 'global' | 'raw' | 'keyframes' | 'property',\n opts?: { root?: Document | ShadowRoot },\n ): { css: string; ruleCount: number; size: number } {\n const { root = document } = opts || {};\n const registry = (injector.instance as any)['sheetManager']?.getRegistry(\n root,\n );\n\n if (!registry) {\n return { css: '', ruleCount: 0, size: 0 };\n }\n\n const cssChunks: string[] = [];\n let ruleCount = 0;\n\n if (type === 'keyframes') {\n // Handle keyframes separately - they're stored in keyframesCache\n for (const [, entry] of registry.keyframesCache) {\n const info = entry.info;\n const sheet = registry.sheets[info.sheetIndex];\n const styleSheet = sheet?.sheet?.sheet;\n\n if (styleSheet && info.ruleIndex < styleSheet.cssRules.length) {\n const rule = styleSheet.cssRules[info.ruleIndex] as\n | CSSRule\n | undefined;\n if (rule) {\n cssChunks.push(rule.cssText);\n ruleCount++;\n }\n } else if (info.cssText) {\n cssChunks.push(info.cssText);\n ruleCount++;\n }\n }\n } else {\n // Handle other global types stored in globalRules\n const prefix =\n type === 'global' ? 'global:' : type === 'raw' ? 'raw:' : 'property:';\n\n for (const [key, ruleInfo] of registry.globalRules) {\n if (key.startsWith(prefix)) {\n const sheet = registry.sheets[ruleInfo.sheetIndex];\n const styleSheet = sheet?.sheet?.sheet;\n if (styleSheet) {\n const start = Math.max(0, ruleInfo.ruleIndex);\n const end = Math.min(\n styleSheet.cssRules.length - 1,\n (ruleInfo.endRuleIndex as number) ?? ruleInfo.ruleIndex,\n );\n\n if (\n start >= 0 &&\n end >= start &&\n start < styleSheet.cssRules.length\n ) {\n for (let i = start; i <= end; i++) {\n const rule = styleSheet.cssRules[i] as CSSRule | undefined;\n if (rule) {\n cssChunks.push(rule.cssText);\n ruleCount++;\n }\n }\n }\n } else if (ruleInfo.cssText && ruleInfo.cssText.length) {\n // Fallback in environments without CSSOM access\n cssChunks.push(...ruleInfo.cssText);\n ruleCount += ruleInfo.cssText.length;\n }\n }\n }\n }\n\n const rawCSS = cssChunks.join('\\n');\n\n return {\n css: prettifyCSS(rawCSS),\n ruleCount,\n size: rawCSS.length, // Use raw CSS size for consistent calculations\n };\n },\n\n // 6) Defined @property and keyframes\n defs(opts?: { root?: Document | ShadowRoot }): Definitions {\n const { root = document } = opts || {};\n\n // Get properties from injector if available, otherwise scan CSS\n let properties: string[] = [];\n try {\n const registry = (injector.instance as any)['sheetManager']?.getRegistry(\n root,\n );\n if (registry?.injectedProperties) {\n properties = Array.from(\n (registry.injectedProperties as Map<string, string>).keys(),\n ).sort();\n }\n } catch {\n // Fallback: scan CSS for @property rules\n const allCSS = injector.instance.getCssText({ root });\n const propRegex = /@property\\s+(--[a-z0-9-]+)/gi;\n const propSet = new Set<string>();\n let match;\n while ((match = propRegex.exec(allCSS)) !== null) {\n propSet.add(match[1]);\n }\n properties = Array.from(propSet).sort();\n }\n\n // Get keyframes\n let keyframes: Array<{ name: string; refCount: number }> = [];\n try {\n const registry = (injector.instance as any)['sheetManager']?.getRegistry(\n root,\n );\n if (registry) {\n for (const entry of registry.keyframesCache.values()) {\n keyframes.push({\n name: entry.name,\n refCount: entry.refCount,\n });\n }\n keyframes.sort((a, b) => a.name.localeCompare(b.name));\n }\n } catch {\n // Fallback: scan CSS for @keyframes rules\n const allCSS = injector.instance.getCssText({ root });\n const keyframesRegex = /@keyframes\\s+([a-zA-Z0-9_-]+)/gi;\n const keyframesSet = new Set<string>();\n let match;\n while ((match = keyframesRegex.exec(allCSS)) !== null) {\n keyframesSet.add(match[1]);\n }\n keyframes = Array.from(keyframesSet)\n .sort()\n .map((name) => ({ name, refCount: 1 }));\n }\n\n return { properties, keyframes };\n },\n\n // 7) One-shot overview\n summary(opts?: SummaryOptions): Summary {\n const { root = document, log = false, includePageCSS = false } = opts || {};\n const cacheStatus = this.cache({ root });\n const definitions = this.defs({ root });\n const metrics = this.metrics({ root });\n\n const activeCSS = this.css('active', { root, prettify: false });\n const unusedCSS = this.css('unused', { root, prettify: false });\n const allCSS = this.css('all', { root, prettify: false });\n\n // Calculate global CSS by subtracting class-based CSS from total\n const classCSSSize = activeCSS.length + unusedCSS.length;\n const totalGlobalCSSSize = allCSS.length - classCSSSize;\n\n // Get CSS for each global type separately for display purposes\n const globalData = this.getGlobalTypeCSS('global', { root });\n const rawData = this.getGlobalTypeCSS('raw', { root });\n const keyframesData = this.getGlobalTypeCSS('keyframes', { root });\n const propertyData = this.getGlobalTypeCSS('property', { root });\n\n // Use the calculated sizes to avoid double-counting\n const globalTypesTotalSize =\n globalData.size + rawData.size + keyframesData.size + propertyData.size;\n\n // Build cleanup summary from metrics\n const cleanupSummary = {\n enabled: !!metrics,\n totalCleanups: metrics?.cleanupHistory?.length || 0,\n totalClassesDeleted:\n metrics?.cleanupHistory?.reduce(\n (sum, c) => sum + c.classesDeleted,\n 0,\n ) || 0,\n totalCssDeleted:\n metrics?.cleanupHistory?.reduce((sum, c) => sum + c.cssSize, 0) || 0,\n totalRulesDeleted:\n metrics?.cleanupHistory?.reduce((sum, c) => sum + c.rulesDeleted, 0) ||\n 0,\n averageClassesPerCleanup: 0,\n averageCssPerCleanup: 0,\n averageRulesPerCleanup: 0,\n lastCleanup: undefined as any,\n };\n\n if (cleanupSummary.totalCleanups > 0) {\n cleanupSummary.averageClassesPerCleanup =\n cleanupSummary.totalClassesDeleted / cleanupSummary.totalCleanups;\n cleanupSummary.averageCssPerCleanup =\n cleanupSummary.totalCssDeleted / cleanupSummary.totalCleanups;\n cleanupSummary.averageRulesPerCleanup =\n cleanupSummary.totalRulesDeleted / cleanupSummary.totalCleanups;\n\n const lastCleanup =\n metrics?.cleanupHistory?.[metrics.cleanupHistory.length - 1];\n if (lastCleanup) {\n cleanupSummary.lastCleanup = {\n ...lastCleanup,\n date: new Date(lastCleanup.timestamp).toISOString(),\n };\n }\n }\n\n let page: Summary['page'] | undefined;\n if (includePageCSS) {\n const pageStats = getPageStats({ root, includeCrossOrigin: true });\n page = {\n ...pageStats,\n css:\n includePageCSS === 'all'\n ? getPageCSS({ root, includeCrossOrigin: true })\n : undefined,\n };\n }\n\n // If individual extraction matches total, use individual sizes\n // Otherwise, proportionally scale the individual sizes to match the total\n const useIndividualSizes =\n Math.abs(globalTypesTotalSize - totalGlobalCSSSize) < 100;\n\n let adjustedGlobalSizes;\n if (useIndividualSizes) {\n adjustedGlobalSizes = {\n globalCSSSize: globalData.size,\n rawCSSSize: rawData.size,\n keyframesCSSSize: keyframesData.size,\n propertyCSSSize: propertyData.size,\n };\n } else {\n // Scale proportionally to match the actual total\n const scaleFactor = totalGlobalCSSSize / globalTypesTotalSize;\n adjustedGlobalSizes = {\n globalCSSSize: Math.round(globalData.size * scaleFactor),\n rawCSSSize: Math.round(rawData.size * scaleFactor),\n keyframesCSSSize: Math.round(keyframesData.size * scaleFactor),\n propertyCSSSize: Math.round(propertyData.size * scaleFactor),\n };\n }\n\n // Get chunk breakdown\n const chunkBreakdown = getChunkBreakdown(root);\n\n const summary: Summary = {\n activeClasses: cacheStatus.classes.active,\n unusedClasses: cacheStatus.classes.unused,\n totalStyledClasses: cacheStatus.classes.all,\n activeCSSSize: activeCSS.length,\n unusedCSSSize: unusedCSS.length,\n ...adjustedGlobalSizes,\n totalCSSSize: allCSS.length,\n activeCSS: prettifyCSS(activeCSS),\n unusedCSS: prettifyCSS(unusedCSS),\n globalCSS: globalData.css,\n rawCSS: rawData.css,\n keyframesCSS: keyframesData.css,\n propertyCSS: propertyData.css,\n allCSS: prettifyCSS(allCSS),\n globalRuleCount: globalData.ruleCount,\n rawRuleCount: rawData.ruleCount,\n keyframesRuleCount: keyframesData.ruleCount,\n propertyRuleCount: propertyData.ruleCount,\n page,\n metrics,\n definedProperties: definitions.properties,\n definedKeyframes: definitions.keyframes,\n propertyCount: definitions.properties.length,\n keyframeCount: definitions.keyframes.length,\n cleanupSummary,\n chunkBreakdown,\n };\n\n if (log) {\n console.group('🎨 Comprehensive Tasty Debug Summary');\n console.log(`📊 Style Cache Status:`);\n console.log(\n ` • Active classes (in DOM): ${summary.activeClasses.length}`,\n );\n console.log(\n ` • Unused classes (refCount = 0): ${summary.unusedClasses.length}`,\n );\n console.log(\n ` • Total styled classes: ${summary.totalStyledClasses.length}`,\n );\n console.log(`💾 CSS Size:`);\n console.log(` • Active CSS: ${summary.activeCSSSize} characters`);\n console.log(` • Unused CSS: ${summary.unusedCSSSize} characters`);\n console.log(\n ` • Global CSS (injectGlobal): ${summary.globalCSSSize} characters (${summary.globalRuleCount} rules)`,\n );\n console.log(\n ` • Raw CSS (injectRawCSS/useRawCSS): ${summary.rawCSSSize} characters (${summary.rawRuleCount} rules)`,\n );\n console.log(\n ` • Keyframes CSS: ${summary.keyframesCSSSize} characters (${summary.keyframesRuleCount} rules)`,\n );\n console.log(\n ` • Property CSS: ${summary.propertyCSSSize} characters (${summary.propertyRuleCount} rules)`,\n );\n\n // Show breakdown calculation\n const calculatedTotal =\n summary.activeCSSSize +\n summary.unusedCSSSize +\n summary.globalCSSSize +\n summary.rawCSSSize +\n summary.keyframesCSSSize +\n summary.propertyCSSSize;\n console.log(` • Calculated Total: ${calculatedTotal} characters`);\n console.log(` • Actual Total: ${summary.totalCSSSize} characters`);\n\n const difference = Math.abs(calculatedTotal - summary.totalCSSSize);\n if (difference > 100) {\n console.warn(\n ` ⚠️ Size mismatch: ${difference} characters difference`,\n );\n\n // Debug: show what might be missing\n console.group('🔍 Debugging size mismatch:');\n console.log(\n `Active + Unused = ${summary.activeCSSSize + summary.unusedCSSSize}`,\n );\n console.log(\n `All Global Types = ${summary.globalCSSSize + summary.rawCSSSize + summary.keyframesCSSSize + summary.propertyCSSSize}`,\n );\n console.log(\n `Class-based vs Total difference = ${summary.totalCSSSize - (summary.activeCSSSize + summary.unusedCSSSize)}`,\n );\n\n // Show scaling information\n console.log(`Raw global extraction total: ${globalTypesTotalSize}`);\n console.log(`Calculated global size: ${totalGlobalCSSSize}`);\n console.log(`Used individual sizes: ${useIndividualSizes}`);\n if (!useIndividualSizes) {\n console.log(\n `Scale factor applied: ${(totalGlobalCSSSize / globalTypesTotalSize).toFixed(3)}`,\n );\n }\n console.groupEnd();\n }\n\n if (page) {\n console.log(`📄 Page CSS:`);\n console.log(` • Total page CSS: ${page.cssSize} characters`);\n console.log(` • Total page rules: ${page.ruleCount}`);\n console.log(\n ` • Stylesheets: ${page.stylesheetCount} (${page.skippedStylesheets} skipped)`,\n );\n }\n\n console.log('🏷️ Properties & Keyframes:');\n console.log(` • Defined @property: ${summary.propertyCount}`);\n console.log(` • Defined @keyframes: ${summary.keyframeCount}`);\n\n if (metrics) {\n console.log(`⚡ Performance Metrics:`);\n console.log(` • Cache hits: ${metrics.hits}`);\n console.log(` • Cache misses: ${metrics.misses}`);\n console.log(` • Cached style reuses: ${metrics.unusedHits}`);\n const hitRate =\n metrics.hits + metrics.misses > 0\n ? (\n ((metrics.hits + (metrics.unusedHits || 0)) /\n (metrics.hits + metrics.misses)) *\n 100\n ).toFixed(1)\n : '0';\n console.log(` • Overall cache hit rate: ${hitRate}%`);\n }\n\n // Show chunk breakdown\n if (summary.chunkBreakdown.totalChunkTypes > 0) {\n console.log('🧩 Style Chunk Breakdown:');\n const displayOrder = [\n CHUNK_NAMES.COMBINED, // non-chunked styles (e.g., @starting-style)\n CHUNK_NAMES.APPEARANCE,\n CHUNK_NAMES.FONT,\n CHUNK_NAMES.DIMENSION,\n CHUNK_NAMES.DISPLAY,\n CHUNK_NAMES.LAYOUT,\n CHUNK_NAMES.POSITION,\n CHUNK_NAMES.MISC,\n CHUNK_NAMES.SUBCOMPONENTS,\n ];\n for (const chunkName of displayOrder) {\n const data = summary.chunkBreakdown.byChunk[chunkName];\n if (data) {\n const sizeStr =\n data.cssSize > 1024\n ? `${(data.cssSize / 1024).toFixed(1)}KB`\n : `${data.cssSize}B`;\n console.log(\n ` • ${chunkName}: ${data.classes.length} classes, ${sizeStr}, ${data.ruleCount} rules`,\n );\n }\n }\n }\n\n console.log('🔍 Details:');\n console.log(' • Active classes:', summary.activeClasses);\n console.log(' • Unused classes:', summary.unusedClasses);\n console.groupEnd();\n }\n\n return summary;\n },\n\n // 8) Page-level CSS helpers\n pageCSS(opts?: {\n root?: Document | ShadowRoot;\n prettify?: boolean;\n log?: boolean;\n includeCrossOrigin?: boolean;\n }): string {\n const {\n root = document,\n prettify = true,\n log = false,\n includeCrossOrigin = true,\n } = opts || {};\n const css = getPageCSS({ root, includeCrossOrigin });\n const result = prettify ? prettifyCSS(css) : css;\n\n if (log) {\n console.group('📄 Page CSS (All Stylesheets)');\n console.log(result || '(empty)');\n console.groupEnd();\n }\n\n return result;\n },\n\n pageStats(opts?: {\n root?: Document | ShadowRoot;\n includeCrossOrigin?: boolean;\n }): {\n cssSize: number;\n ruleCount: number;\n stylesheetCount: number;\n skippedStylesheets: number;\n } {\n const { root = document, includeCrossOrigin = true } = opts || {};\n return getPageStats({ root, includeCrossOrigin });\n },\n\n // 9) Install globally\n install(): void {\n if (\n typeof window !== 'undefined' &&\n (window as any).tastyDebug !== tastyDebug\n ) {\n (window as any).tastyDebug = tastyDebug;\n console.log(\n '🎨 tastyDebug installed on window. Run tastyDebug.help() for quick start guide.',\n );\n }\n },\n\n // 10) Beautiful console logging with collapsible CSS\n log(target: CSSTarget, opts?: CssOptions & { title?: string }): void {\n const { title, ...cssOpts } = opts || {};\n const css = tastyDebug.css(target, cssOpts);\n\n if (!css.trim()) {\n console.warn(`🎨 No CSS found for target: ${String(target)}`);\n return;\n }\n\n const targetStr = Array.isArray(target)\n ? target.join(', ')\n : String(target);\n const displayTitle = title || `CSS for \"${targetStr}\"`;\n\n // Get some stats about the CSS\n const lines = css.split('\\n').length;\n const size = new Blob([css]).size;\n const sizeStr = size > 1024 ? `${(size / 1024).toFixed(1)}KB` : `${size}B`;\n\n // Count CSS rules (blocks with opening braces)\n const ruleCount = (css.match(/\\{/g) || []).length;\n\n console.group(\n `🎨 ${displayTitle} (${ruleCount} rules, ${lines} lines, ${sizeStr})`,\n );\n\n // Detect sub-elements in CSS\n const subElementMatches = css.match(/\\[data-element=\"([^\"]+)\"\\]/g) || [];\n const subElements = [\n ...new Set(\n subElementMatches\n .map((match) => match.match(/\\[data-element=\"([^\"]+)\"\\]/)?.[1])\n .filter(Boolean),\n ),\n ];\n\n if (subElements.length > 0) {\n console.log(`🧩 Sub-elements found: ${subElements.join(', ')}`);\n\n // Show stats and CSS for each sub-element\n subElements.forEach((element) => {\n const elementSelector = `[data-element=\"${element}\"]`;\n const elementRegex = new RegExp(\n `[^}]*\\\\[data-element=\"${element.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}\"\\\\][^{]*\\\\{[^}]*\\\\}`,\n 'gm',\n );\n const elementCSS = (css.match(elementRegex) || []).join('\\n');\n\n if (elementCSS) {\n const elementRules = (elementCSS.match(/\\{/g) || []).length;\n const elementLines = elementCSS.split('\\n').length;\n const elementSize = new Blob([elementCSS]).size;\n const elementSizeStr =\n elementSize > 1024\n ? `${(elementSize / 1024).toFixed(1)}KB`\n : `${elementSize}B`;\n\n console.groupCollapsed(\n `🧩 ${element} (${elementRules} rules, ${elementLines} lines, ${elementSizeStr})`,\n );\n console.log(\n `%c${elementCSS}`,\n 'color: #666; font-family: monospace; font-size: 12px; white-space: pre;',\n );\n console.groupEnd();\n }\n });\n }\n\n // Full CSS in collapsible group (hidden by default)\n console.groupCollapsed('📄 Full CSS (click to expand)');\n console.log(\n `%c${css}`,\n 'color: #666; font-family: monospace; font-size: 12px; white-space: pre;',\n );\n console.groupEnd();\n\n console.groupEnd();\n },\n\n // 12) Show help and usage examples\n help(): void {\n console.group('🎨 tastyDebug - Quick Start Guide');\n console.log('💡 Essential commands:');\n console.log(\n ' • tastyDebug.summary({ log: true }) - comprehensive overview',\n );\n console.log(' • tastyDebug.chunks({ log: true }) - style chunk breakdown');\n console.log(' • tastyDebug.log(\"active\") - beautiful CSS display');\n console.log(' • tastyDebug.css(\"active\") - get active CSS');\n console.log(\n ' • tastyDebug.inspect(\".my-element\") - element inspection with chunk info',\n );\n console.log(' • tastyDebug.cache() - cache status');\n console.log(' • tastyDebug.defs() - defined properties & keyframes');\n console.log(' • tastyDebug.pageCSS({ log: true }) - all page CSS');\n console.log('');\n console.log('📖 Common targets for css()/log():');\n console.log(' • \"all\" - all tasty CSS + global CSS');\n console.log(' • \"active\" - CSS for classes in DOM');\n console.log(' • \"unused\" - CSS for classes with refCount = 0');\n console.log(' • \"global\" - only global CSS (injectGlobal)');\n console.log(' • \"page\" - ALL page CSS (including non-tasty)');\n console.log(' • \"t123\" - specific tasty class');\n console.log(' • [\".my-selector\"] - CSS selector');\n console.log('');\n console.log('🔧 Available options:');\n console.log(' • { log: true } - auto-log results to console');\n console.log(' • { title: \"Custom\" } - custom title for log()');\n console.log(' • { root: shadowRoot } - target Shadow DOM');\n console.log(' • { prettify: false } - skip CSS formatting');\n console.log('');\n console.log('🧩 Style Chunking:');\n console.log(\n ' Elements have multiple classes (one per chunk: appearance, font, dimension, etc.)',\n );\n console.log(\n ' • tastyDebug.chunks({ log: true }) - breakdown by chunk type',\n );\n console.log(\n ' • tastyDebug.inspect() - shows which chunk each class belongs to',\n );\n console.log(\n ' Chunk types: combined (non-chunked), appearance, font, dimension, container, scrollbar, position, misc, subcomponents',\n );\n console.groupEnd();\n },\n};\n\n/**\n * Auto-install in development\n */\nif (typeof window !== 'undefined' && isDevEnv()) {\n tastyDebug.install();\n}\n"],"mappings":";;;;;;;;;;;;AA+JA,SAAS,YAAY,KAAqB;AACxC,KAAI,CAAC,OAAO,IAAI,MAAM,KAAK,GACzB,QAAO;CAIT,IAAI,YAAY,IAAI,QAAQ,QAAQ,IAAI,CAAC,MAAM;AAG/C,aAAY,UAAU,QAAQ,aAAa,OAAO;AAGlD,aAAY,UAAU,QAAQ,uCAAuC,MAAM;AAG3E,aAAY,UAAU,QAAQ,aAAa,QAAQ;AAOnD,aAAY,UAAU,QACpB,uDACA,MACD;CAGD,MAAM,QAAQ,UAAU,MAAM,KAAK;CACnC,IAAI,cAAc;CAClB,MAAM,aAAa;CAyBnB,IAAI,SAvBmB,MAAM,KAAK,SAAS;EACzC,MAAM,UAAU,KAAK,MAAM;AAC3B,MAAI,CAAC,QAAS,QAAO;AAGrB,MAAI,YAAY,KAAK;AACnB,iBAAc,KAAK,IAAI,GAAG,cAAc,EAAE;AAC1C,UAAO,IAAI,OAAO,cAAc,WAAW,GAAG;;EAKhD,IAAI,SADW,IAAI,OAAO,cAAc,WAAW,GAC7B;AAGtB,MAAI,QAAQ,S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;AACrC,UAAQ,IACN,iEACD;AACD,UAAQ,IAAI,+DAA+D;AAC3E,UAAQ,IAAI,yDAAuD;AACnE,UAAQ,IAAI,kDAAgD;AAC5D,UAAQ,IACN,+EACD;AACD,UAAQ,IAAI,wCAAwC;AACpD,UAAQ,IAAI,yDAAyD;AACrE,UAAQ,IAAI,uDAAuD;AACnE,UAAQ,IAAI,GAAG;AACf,UAAQ,IAAI,qCAAqC;AACjD,UAAQ,IAAI,2CAAyC;AACrD,UAAQ,IAAI,0CAAwC;AACpD,UAAQ,IAAI,qDAAmD;AAC/D,UAAQ,IAAI,kDAAgD;AAC5D,UAAQ,IAAI,oDAAkD;AAC9D,UAAQ,IAAI,sCAAoC;AAChD,UAAQ,IAAI,wCAAsC;AAClD,UAAQ,IAAI,GAAG;AACf,UAAQ,IAAI,wBAAwB;AACpC,UAAQ,IAAI,kDAAkD;AAC9D,UAAQ,IAAI,qDAAmD;AAC/D,UAAQ,IAAI,+CAA+C;AAC3D,UAAQ,IAAI,gDAAgD;AAC5D,UAAQ,IAAI,GAAG;AACf,UAAQ,IAAI,qBAAqB;AACjC,UAAQ,IACN,sFACD;AACD,UAAQ,IACN,iEACD;AACD,UAAQ,IACN,qEACD;AACD,UAAQ,IACN,0HACD;AACD,UAAQ,UAAU;;CAErB;;;;AAKD,IAAI,OAAO,WAAW,eAAe,UAAU,CAC7C,YAAW,SAAS"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Styles } from "../styles/types.js";
|
|
3
|
-
|
|
4
|
-
//#region src/tasty/hooks/useGlobalStyles.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Hook to inject global styles for a given selector.
|
|
7
|
-
* Useful for styling elements by selector without generating classNames.
|
|
8
|
-
*
|
|
9
|
-
* @param selector - CSS selector to apply styles to (e.g., '.my-class', ':root', 'body')
|
|
10
|
-
* @param styles - Tasty styles object
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* function MyComponent() {
|
|
15
|
-
* useGlobalStyles('.card', {
|
|
16
|
-
* padding: '2x',
|
|
17
|
-
* radius: '1r',
|
|
18
|
-
* fill: '#white',
|
|
19
|
-
* });
|
|
20
|
-
*
|
|
21
|
-
* return <div className="card">Content</div>;
|
|
22
|
-
* }
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
declare function useGlobalStyles(selector: string, styles?: Styles): void;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { useGlobalStyles };
|
|
28
|
-
//# sourceMappingURL=useGlobalStyles.d.ts.map
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
|
|
2
|
-
import { renderStyles } from "../pipeline/index.js";
|
|
3
|
-
import { injectGlobal } from "../injector/index.js";
|
|
4
|
-
import { resolveRecipes } from "../utils/resolve-recipes.js";
|
|
5
|
-
import { useInsertionEffect, useMemo, useRef } from "react";
|
|
6
|
-
|
|
7
|
-
//#region src/tasty/hooks/useGlobalStyles.ts
|
|
8
|
-
/**
|
|
9
|
-
* Hook to inject global styles for a given selector.
|
|
10
|
-
* Useful for styling elements by selector without generating classNames.
|
|
11
|
-
*
|
|
12
|
-
* @param selector - CSS selector to apply styles to (e.g., '.my-class', ':root', 'body')
|
|
13
|
-
* @param styles - Tasty styles object
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```tsx
|
|
17
|
-
* function MyComponent() {
|
|
18
|
-
* useGlobalStyles('.card', {
|
|
19
|
-
* padding: '2x',
|
|
20
|
-
* radius: '1r',
|
|
21
|
-
* fill: '#white',
|
|
22
|
-
* });
|
|
23
|
-
*
|
|
24
|
-
* return <div className="card">Content</div>;
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
function useGlobalStyles(selector, styles) {
|
|
29
|
-
const disposeRef = useRef(null);
|
|
30
|
-
const resolvedStyles = useMemo(() => {
|
|
31
|
-
if (!styles) return styles;
|
|
32
|
-
return resolveRecipes(styles);
|
|
33
|
-
}, [styles]);
|
|
34
|
-
const styleResults = useMemo(() => {
|
|
35
|
-
if (!resolvedStyles) return [];
|
|
36
|
-
if (!selector) {
|
|
37
|
-
console.warn("[Tasty] useGlobalStyles: selector is required and cannot be empty. Styles will not be injected.");
|
|
38
|
-
return [];
|
|
39
|
-
}
|
|
40
|
-
return renderStyles(resolvedStyles, selector);
|
|
41
|
-
}, [resolvedStyles, selector]);
|
|
42
|
-
useInsertionEffect(() => {
|
|
43
|
-
disposeRef.current?.();
|
|
44
|
-
if (styleResults.length > 0) {
|
|
45
|
-
const { dispose } = injectGlobal(styleResults);
|
|
46
|
-
disposeRef.current = dispose;
|
|
47
|
-
} else disposeRef.current = null;
|
|
48
|
-
return () => {
|
|
49
|
-
disposeRef.current?.();
|
|
50
|
-
disposeRef.current = null;
|
|
51
|
-
};
|
|
52
|
-
}, [styleResults]);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
//#endregion
|
|
56
|
-
export { useGlobalStyles };
|
|
57
|
-
//# sourceMappingURL=useGlobalStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useGlobalStyles.js","names":[],"sources":["../../../src/tasty/hooks/useGlobalStyles.ts"],"sourcesContent":["import { useInsertionEffect, useMemo, useRef } from 'react';\n\nimport { injectGlobal } from '../injector';\nimport { renderStyles, StyleResult } from '../pipeline';\nimport { Styles } from '../styles/types';\nimport { resolveRecipes } from '../utils/resolve-recipes';\n\n/**\n * Hook to inject global styles for a given selector.\n * Useful for styling elements by selector without generating classNames.\n *\n * @param selector - CSS selector to apply styles to (e.g., '.my-class', ':root', 'body')\n * @param styles - Tasty styles object\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * useGlobalStyles('.card', {\n * padding: '2x',\n * radius: '1r',\n * fill: '#white',\n * });\n *\n * return <div className=\"card\">Content</div>;\n * }\n * ```\n */\nexport function useGlobalStyles(selector: string, styles?: Styles): void {\n const disposeRef = useRef<(() => void) | null>(null);\n\n // Resolve recipes before rendering (zero overhead if no recipes configured)\n const resolvedStyles = useMemo(() => {\n if (!styles) return styles;\n return resolveRecipes(styles);\n }, [styles]);\n\n // Render styles with the provided selector\n // Note: renderStyles overload with selector string returns StyleResult[] directly\n const styleResults = useMemo((): StyleResult[] => {\n if (!resolvedStyles) return [];\n\n // Validate selector - empty string would cause renderStyles to return RenderResult instead of StyleResult[]\n if (!selector) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n '[Tasty] useGlobalStyles: selector is required and cannot be empty. ' +\n 'Styles will not be injected.',\n );\n }\n return [];\n }\n\n const result = renderStyles(resolvedStyles, selector);\n // When a non-empty selector is provided, renderStyles returns StyleResult[]\n return result as StyleResult[];\n }, [resolvedStyles, selector]);\n\n // Inject as global styles\n useInsertionEffect(() => {\n disposeRef.current?.();\n\n if (styleResults.length > 0) {\n const { dispose } = injectGlobal(styleResults);\n disposeRef.current = dispose;\n } else {\n disposeRef.current = null;\n }\n\n return () => {\n disposeRef.current?.();\n disposeRef.current = null;\n };\n }, [styleResults]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAgB,gBAAgB,UAAkB,QAAuB;CACvE,MAAM,aAAa,OAA4B,KAAK;CAGpD,MAAM,iBAAiB,cAAc;AACnC,MAAI,CAAC,OAAQ,QAAO;AACpB,SAAO,eAAe,OAAO;IAC5B,CAAC,OAAO,CAAC;CAIZ,MAAM,eAAe,cAA6B;AAChD,MAAI,CAAC,eAAgB,QAAO,EAAE;AAG9B,MAAI,CAAC,UAAU;AAEX,WAAQ,KACN,kGAED;AAEH,UAAO,EAAE;;AAKX,SAFe,aAAa,gBAAgB,SAAS;IAGpD,CAAC,gBAAgB,SAAS,CAAC;AAG9B,0BAAyB;AACvB,aAAW,WAAW;AAEtB,MAAI,aAAa,SAAS,GAAG;GAC3B,MAAM,EAAE,YAAY,aAAa,aAAa;AAC9C,cAAW,UAAU;QAErB,YAAW,UAAU;AAGvB,eAAa;AACX,cAAW,WAAW;AACtB,cAAW,UAAU;;IAEtB,CAAC,aAAa,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { KeyframesSteps } from "../injector/types.js";
|
|
3
|
-
|
|
4
|
-
//#region src/tasty/hooks/useKeyframes.d.ts
|
|
5
|
-
type UseKeyframesOptions = {
|
|
6
|
-
name?: string;
|
|
7
|
-
root?: Document | ShadowRoot;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Hook to inject CSS @keyframes and return the generated animation name.
|
|
11
|
-
* Handles keyframes injection with proper cleanup on unmount or dependency changes.
|
|
12
|
-
*
|
|
13
|
-
* @example Basic usage - steps object is the dependency
|
|
14
|
-
* ```tsx
|
|
15
|
-
* function MyComponent() {
|
|
16
|
-
* const bounce = useKeyframes({
|
|
17
|
-
* '0%': { transform: 'scale(1)' },
|
|
18
|
-
* '50%': { transform: 'scale(1.1)' },
|
|
19
|
-
* '100%': { transform: 'scale(1)' },
|
|
20
|
-
* });
|
|
21
|
-
*
|
|
22
|
-
* return <div style={{ animation: `${bounce} 1s infinite` }}>Bouncing</div>;
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @example With custom name
|
|
27
|
-
* ```tsx
|
|
28
|
-
* function MyComponent() {
|
|
29
|
-
* const fadeIn = useKeyframes(
|
|
30
|
-
* { from: { opacity: 0 }, to: { opacity: 1 } },
|
|
31
|
-
* { name: 'fadeIn' }
|
|
32
|
-
* );
|
|
33
|
-
*
|
|
34
|
-
* return <div style={{ animation: `${fadeIn} 0.3s ease-out` }}>Fading in</div>;
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* @example Factory function with dependencies
|
|
39
|
-
* ```tsx
|
|
40
|
-
* function MyComponent({ scale }: { scale: number }) {
|
|
41
|
-
* const pulse = useKeyframes(
|
|
42
|
-
* () => ({
|
|
43
|
-
* '0%': { transform: 'scale(1)' },
|
|
44
|
-
* '100%': { transform: `scale(${scale})` },
|
|
45
|
-
* }),
|
|
46
|
-
* [scale]
|
|
47
|
-
* );
|
|
48
|
-
*
|
|
49
|
-
* return <div style={{ animation: `${pulse} 1s infinite` }}>Pulsing</div>;
|
|
50
|
-
* }
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
declare function useKeyframes(steps: KeyframesSteps, options?: UseKeyframesOptions): string;
|
|
54
|
-
declare function useKeyframes(factory: () => KeyframesSteps, deps: readonly unknown[], options?: UseKeyframesOptions): string;
|
|
55
|
-
//#endregion
|
|
56
|
-
export { useKeyframes };
|
|
57
|
-
//# sourceMappingURL=useKeyframes.d.ts.map
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
|
|
2
|
-
import { keyframes } from "../injector/index.js";
|
|
3
|
-
import { useInsertionEffect, useMemo, useRef } from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/tasty/hooks/useKeyframes.ts
|
|
6
|
-
function useKeyframes(stepsOrFactory, depsOrOptions, options) {
|
|
7
|
-
const isFactory = typeof stepsOrFactory === "function";
|
|
8
|
-
const deps = isFactory && Array.isArray(depsOrOptions) ? depsOrOptions : void 0;
|
|
9
|
-
const opts = isFactory ? options : depsOrOptions;
|
|
10
|
-
const stepsData = useMemo(() => {
|
|
11
|
-
const steps = isFactory ? stepsOrFactory() : stepsOrFactory;
|
|
12
|
-
if (!steps || Object.keys(steps).length === 0) return null;
|
|
13
|
-
return steps;
|
|
14
|
-
}, isFactory ? deps ?? [] : [stepsOrFactory]);
|
|
15
|
-
const renderResultRef = useRef(null);
|
|
16
|
-
const effectResultRef = useRef(null);
|
|
17
|
-
const name = useMemo(() => {
|
|
18
|
-
renderResultRef.current?.dispose();
|
|
19
|
-
renderResultRef.current = null;
|
|
20
|
-
if (!stepsData) return "";
|
|
21
|
-
const result = keyframes(stepsData, {
|
|
22
|
-
name: opts?.name,
|
|
23
|
-
root: opts?.root
|
|
24
|
-
});
|
|
25
|
-
renderResultRef.current = result;
|
|
26
|
-
return result.toString();
|
|
27
|
-
}, [
|
|
28
|
-
stepsData,
|
|
29
|
-
opts?.name,
|
|
30
|
-
opts?.root
|
|
31
|
-
]);
|
|
32
|
-
useInsertionEffect(() => {
|
|
33
|
-
effectResultRef.current?.dispose();
|
|
34
|
-
effectResultRef.current = null;
|
|
35
|
-
if (stepsData) effectResultRef.current = keyframes(stepsData, {
|
|
36
|
-
name: opts?.name,
|
|
37
|
-
root: opts?.root
|
|
38
|
-
});
|
|
39
|
-
return () => {
|
|
40
|
-
effectResultRef.current?.dispose();
|
|
41
|
-
effectResultRef.current = null;
|
|
42
|
-
renderResultRef.current?.dispose();
|
|
43
|
-
renderResultRef.current = null;
|
|
44
|
-
};
|
|
45
|
-
}, [
|
|
46
|
-
stepsData,
|
|
47
|
-
opts?.name,
|
|
48
|
-
opts?.root
|
|
49
|
-
]);
|
|
50
|
-
return name;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
//#endregion
|
|
54
|
-
export { useKeyframes };
|
|
55
|
-
//# sourceMappingURL=useKeyframes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyframes.js","names":[],"sources":["../../../src/tasty/hooks/useKeyframes.ts"],"sourcesContent":["import { useInsertionEffect, useMemo, useRef } from 'react';\n\nimport { keyframes } from '../injector';\nimport { KeyframesResult, KeyframesSteps } from '../injector/types';\n\ntype UseKeyframesOptions = {\n name?: string;\n root?: Document | ShadowRoot;\n};\n\n/**\n * Hook to inject CSS @keyframes and return the generated animation name.\n * Handles keyframes injection with proper cleanup on unmount or dependency changes.\n *\n * @example Basic usage - steps object is the dependency\n * ```tsx\n * function MyComponent() {\n * const bounce = useKeyframes({\n * '0%': { transform: 'scale(1)' },\n * '50%': { transform: 'scale(1.1)' },\n * '100%': { transform: 'scale(1)' },\n * });\n *\n * return <div style={{ animation: `${bounce} 1s infinite` }}>Bouncing</div>;\n * }\n * ```\n *\n * @example With custom name\n * ```tsx\n * function MyComponent() {\n * const fadeIn = useKeyframes(\n * { from: { opacity: 0 }, to: { opacity: 1 } },\n * { name: 'fadeIn' }\n * );\n *\n * return <div style={{ animation: `${fadeIn} 0.3s ease-out` }}>Fading in</div>;\n * }\n * ```\n *\n * @example Factory function with dependencies\n * ```tsx\n * function MyComponent({ scale }: { scale: number }) {\n * const pulse = useKeyframes(\n * () => ({\n * '0%': { transform: 'scale(1)' },\n * '100%': { transform: `scale(${scale})` },\n * }),\n * [scale]\n * );\n *\n * return <div style={{ animation: `${pulse} 1s infinite` }}>Pulsing</div>;\n * }\n * ```\n */\n\n// Overload 1: Static steps object\nexport function useKeyframes(\n steps: KeyframesSteps,\n options?: UseKeyframesOptions,\n): string;\n\n// Overload 2: Factory function with dependencies\nexport function useKeyframes(\n factory: () => KeyframesSteps,\n deps: readonly unknown[],\n options?: UseKeyframesOptions,\n): string;\n\n// Implementation\nexport function useKeyframes(\n stepsOrFactory: KeyframesSteps | (() => KeyframesSteps),\n depsOrOptions?: readonly unknown[] | UseKeyframesOptions,\n options?: UseKeyframesOptions,\n): string {\n // Detect which overload is being used\n const isFactory = typeof stepsOrFactory === 'function';\n\n // Parse arguments based on overload\n const deps =\n isFactory && Array.isArray(depsOrOptions) ? depsOrOptions : undefined;\n const opts = isFactory\n ? options\n : (depsOrOptions as UseKeyframesOptions | undefined);\n\n // Memoize the keyframes steps to get a stable reference\n const stepsData = useMemo(\n () => {\n const steps = isFactory\n ? (stepsOrFactory as () => KeyframesSteps)()\n : (stepsOrFactory as KeyframesSteps);\n\n if (!steps || Object.keys(steps).length === 0) {\n return null;\n }\n\n return steps;\n },\n\n isFactory ? deps ?? [] : [stepsOrFactory],\n );\n\n // Store keyframes results for cleanup - we need to track both the render-time\n // injection (for the name) and the effect-time injection (for Strict Mode safety)\n const renderResultRef = useRef<KeyframesResult | null>(null);\n const effectResultRef = useRef<KeyframesResult | null>(null);\n\n // Inject keyframes during render to ensure the animation name is available\n // immediately. The keyframes() function uses reference counting internally,\n // so multiple calls with the same content are deduplicated.\n const name = useMemo(() => {\n // Dispose previous render-time result if deps changed\n renderResultRef.current?.dispose();\n renderResultRef.current = null;\n\n if (!stepsData) {\n return '';\n }\n\n // Inject keyframes synchronously\n const result = keyframes(stepsData, {\n name: opts?.name,\n root: opts?.root,\n });\n\n renderResultRef.current = result;\n\n return result.toString();\n }, [stepsData, opts?.name, opts?.root]);\n\n // Handle injection and cleanup in useInsertionEffect to properly support\n // React 18+ Strict Mode double-invocation (mount → unmount → mount).\n // The effect setup re-injects the keyframes if cleanup was called, ensuring\n // the CSS exists after Strict Mode remounts.\n useInsertionEffect(() => {\n // Dispose previous effect-time result\n effectResultRef.current?.dispose();\n effectResultRef.current = null;\n\n // Re-inject keyframes. This ensures the CSS exists after Strict Mode cleanup.\n // The keyframes() function uses reference counting, so this is idempotent\n // if the CSS wasn't disposed.\n if (stepsData) {\n const result = keyframes(stepsData, {\n name: opts?.name,\n root: opts?.root,\n });\n effectResultRef.current = result;\n }\n\n // Cleanup on unmount or when dependencies change.\n // Dispose both the effect-time and render-time results to properly\n // decrement the reference count.\n return () => {\n effectResultRef.current?.dispose();\n effectResultRef.current = null;\n renderResultRef.current?.dispose();\n renderResultRef.current = null;\n };\n }, [stepsData, opts?.name, opts?.root]);\n\n return name;\n}\n"],"mappings":";;;;;AAqEA,SAAgB,aACd,gBACA,eACA,SACQ;CAER,MAAM,YAAY,OAAO,mBAAmB;CAG5C,MAAM,OACJ,aAAa,MAAM,QAAQ,cAAc,GAAG,gBAAgB;CAC9D,MAAM,OAAO,YACT,UACC;CAGL,MAAM,YAAY,cACV;EACJ,MAAM,QAAQ,YACT,gBAAyC,GACzC;AAEL,MAAI,CAAC,SAAS,OAAO,KAAK,MAAM,CAAC,WAAW,EAC1C,QAAO;AAGT,SAAO;IAGT,YAAY,QAAQ,EAAE,GAAG,CAAC,eAAe,CAC1C;CAID,MAAM,kBAAkB,OAA+B,KAAK;CAC5D,MAAM,kBAAkB,OAA+B,KAAK;CAK5D,MAAM,OAAO,cAAc;AAEzB,kBAAgB,SAAS,SAAS;AAClC,kBAAgB,UAAU;AAE1B,MAAI,CAAC,UACH,QAAO;EAIT,MAAM,SAAS,UAAU,WAAW;GAClC,MAAM,MAAM;GACZ,MAAM,MAAM;GACb,CAAC;AAEF,kBAAgB,UAAU;AAE1B,SAAO,OAAO,UAAU;IACvB;EAAC;EAAW,MAAM;EAAM,MAAM;EAAK,CAAC;AAMvC,0BAAyB;AAEvB,kBAAgB,SAAS,SAAS;AAClC,kBAAgB,UAAU;AAK1B,MAAI,UAKF,iBAAgB,UAJD,UAAU,WAAW;GAClC,MAAM,MAAM;GACZ,MAAM,MAAM;GACb,CAAC;AAOJ,eAAa;AACX,mBAAgB,SAAS,SAAS;AAClC,mBAAgB,UAAU;AAC1B,mBAAgB,SAAS,SAAS;AAClC,mBAAgB,UAAU;;IAE3B;EAAC;EAAW,MAAM;EAAM,MAAM;EAAK,CAAC;AAEvC,QAAO"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/tasty/hooks/useProperty.d.ts
|
|
3
|
-
interface UsePropertyOptions {
|
|
4
|
-
/**
|
|
5
|
-
* CSS syntax string for the property (e.g., '<color>', '<length>', '<angle>').
|
|
6
|
-
* For color tokens (#name), this is auto-set to '<color>' and cannot be overridden.
|
|
7
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax
|
|
8
|
-
*/
|
|
9
|
-
syntax?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Whether the property inherits from parent elements
|
|
12
|
-
* @default true
|
|
13
|
-
*/
|
|
14
|
-
inherits?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Initial value for the property.
|
|
17
|
-
* For color tokens (#name), this defaults to 'transparent' if not specified.
|
|
18
|
-
*/
|
|
19
|
-
initialValue?: string | number;
|
|
20
|
-
/**
|
|
21
|
-
* Shadow root or document to inject into
|
|
22
|
-
*/
|
|
23
|
-
root?: Document | ShadowRoot;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Hook to register a CSS @property custom property.
|
|
27
|
-
* This enables advanced features like animating custom properties.
|
|
28
|
-
*
|
|
29
|
-
* Note: @property rules are global and persistent once defined.
|
|
30
|
-
* The hook ensures the property is only registered once per root.
|
|
31
|
-
*
|
|
32
|
-
* Accepts tasty token syntax for the property name:
|
|
33
|
-
* - `$name` → defines `--name`
|
|
34
|
-
* - `#name` → defines `--name-color` (auto-sets syntax: '<color>', defaults initialValue: 'transparent')
|
|
35
|
-
* - `--name` → defines `--name` (legacy format)
|
|
36
|
-
*
|
|
37
|
-
* @param name - The property token ($name, #name) or CSS property name (--name)
|
|
38
|
-
* @param options - Property configuration
|
|
39
|
-
*
|
|
40
|
-
* @example Basic property with token syntax
|
|
41
|
-
* ```tsx
|
|
42
|
-
* function Spinner() {
|
|
43
|
-
* useProperty('$rotation', {
|
|
44
|
-
* syntax: '<angle>',
|
|
45
|
-
* inherits: false,
|
|
46
|
-
* initialValue: '0deg',
|
|
47
|
-
* });
|
|
48
|
-
*
|
|
49
|
-
* return <div className="spinner" />;
|
|
50
|
-
* }
|
|
51
|
-
* ```
|
|
52
|
-
*
|
|
53
|
-
* @example Color property with token syntax (auto-sets syntax)
|
|
54
|
-
* ```tsx
|
|
55
|
-
* function MyComponent() {
|
|
56
|
-
* useProperty('#theme', {
|
|
57
|
-
* initialValue: 'red', // syntax: '<color>' is auto-set
|
|
58
|
-
* });
|
|
59
|
-
*
|
|
60
|
-
* // Now --theme-color can be animated with CSS transitions
|
|
61
|
-
* return <div style={{ '--theme-color': 'blue' } as React.CSSProperties}>Colored</div>;
|
|
62
|
-
* }
|
|
63
|
-
* ```
|
|
64
|
-
*
|
|
65
|
-
* @example Legacy format (still supported)
|
|
66
|
-
* ```tsx
|
|
67
|
-
* function ResizableBox() {
|
|
68
|
-
* useProperty('--box-size', {
|
|
69
|
-
* syntax: '<length>',
|
|
70
|
-
* initialValue: '100px',
|
|
71
|
-
* });
|
|
72
|
-
*
|
|
73
|
-
* return <div style={{ width: 'var(--box-size)' }} />;
|
|
74
|
-
* }
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
declare function useProperty(name: string, options?: UsePropertyOptions): void;
|
|
78
|
-
//#endregion
|
|
79
|
-
export { UsePropertyOptions, useProperty };
|
|
80
|
-
//# sourceMappingURL=useProperty.d.ts.map
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
|
|
2
|
-
import { getGlobalInjector } from "../config.js";
|
|
3
|
-
import { useInsertionEffect, useMemo } from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/tasty/hooks/useProperty.ts
|
|
6
|
-
/**
|
|
7
|
-
* Hook to register a CSS @property custom property.
|
|
8
|
-
* This enables advanced features like animating custom properties.
|
|
9
|
-
*
|
|
10
|
-
* Note: @property rules are global and persistent once defined.
|
|
11
|
-
* The hook ensures the property is only registered once per root.
|
|
12
|
-
*
|
|
13
|
-
* Accepts tasty token syntax for the property name:
|
|
14
|
-
* - `$name` → defines `--name`
|
|
15
|
-
* - `#name` → defines `--name-color` (auto-sets syntax: '<color>', defaults initialValue: 'transparent')
|
|
16
|
-
* - `--name` → defines `--name` (legacy format)
|
|
17
|
-
*
|
|
18
|
-
* @param name - The property token ($name, #name) or CSS property name (--name)
|
|
19
|
-
* @param options - Property configuration
|
|
20
|
-
*
|
|
21
|
-
* @example Basic property with token syntax
|
|
22
|
-
* ```tsx
|
|
23
|
-
* function Spinner() {
|
|
24
|
-
* useProperty('$rotation', {
|
|
25
|
-
* syntax: '<angle>',
|
|
26
|
-
* inherits: false,
|
|
27
|
-
* initialValue: '0deg',
|
|
28
|
-
* });
|
|
29
|
-
*
|
|
30
|
-
* return <div className="spinner" />;
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* @example Color property with token syntax (auto-sets syntax)
|
|
35
|
-
* ```tsx
|
|
36
|
-
* function MyComponent() {
|
|
37
|
-
* useProperty('#theme', {
|
|
38
|
-
* initialValue: 'red', // syntax: '<color>' is auto-set
|
|
39
|
-
* });
|
|
40
|
-
*
|
|
41
|
-
* // Now --theme-color can be animated with CSS transitions
|
|
42
|
-
* return <div style={{ '--theme-color': 'blue' } as React.CSSProperties}>Colored</div>;
|
|
43
|
-
* }
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* @example Legacy format (still supported)
|
|
47
|
-
* ```tsx
|
|
48
|
-
* function ResizableBox() {
|
|
49
|
-
* useProperty('--box-size', {
|
|
50
|
-
* syntax: '<length>',
|
|
51
|
-
* initialValue: '100px',
|
|
52
|
-
* });
|
|
53
|
-
*
|
|
54
|
-
* return <div style={{ width: 'var(--box-size)' }} />;
|
|
55
|
-
* }
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
function useProperty(name, options) {
|
|
59
|
-
useInsertionEffect(() => {
|
|
60
|
-
if (!name) {
|
|
61
|
-
console.warn(`[Tasty] useProperty: property name is required`);
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
const injector = getGlobalInjector();
|
|
65
|
-
if (injector.isPropertyDefined(name, { root: options?.root })) return;
|
|
66
|
-
injector.property(name, {
|
|
67
|
-
syntax: options?.syntax,
|
|
68
|
-
inherits: options?.inherits,
|
|
69
|
-
initialValue: options?.initialValue,
|
|
70
|
-
root: options?.root
|
|
71
|
-
});
|
|
72
|
-
}, [
|
|
73
|
-
name,
|
|
74
|
-
useMemo(() => {
|
|
75
|
-
if (!options) return "";
|
|
76
|
-
return JSON.stringify({
|
|
77
|
-
syntax: options.syntax,
|
|
78
|
-
inherits: options.inherits,
|
|
79
|
-
initialValue: options.initialValue
|
|
80
|
-
});
|
|
81
|
-
}, [
|
|
82
|
-
options?.syntax,
|
|
83
|
-
options?.inherits,
|
|
84
|
-
options?.initialValue
|
|
85
|
-
]),
|
|
86
|
-
options?.root
|
|
87
|
-
]);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
//#endregion
|
|
91
|
-
export { useProperty };
|
|
92
|
-
//# sourceMappingURL=useProperty.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useProperty.js","names":[],"sources":["../../../src/tasty/hooks/useProperty.ts"],"sourcesContent":["import { useInsertionEffect, useMemo } from 'react';\n\nimport { getGlobalInjector } from '../config';\n\nexport interface UsePropertyOptions {\n /**\n * CSS syntax string for the property (e.g., '<color>', '<length>', '<angle>').\n * For color tokens (#name), this is auto-set to '<color>' and cannot be overridden.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax\n */\n syntax?: string;\n /**\n * Whether the property inherits from parent elements\n * @default true\n */\n inherits?: boolean;\n /**\n * Initial value for the property.\n * For color tokens (#name), this defaults to 'transparent' if not specified.\n */\n initialValue?: string | number;\n /**\n * Shadow root or document to inject into\n */\n root?: Document | ShadowRoot;\n}\n\n/**\n * Hook to register a CSS @property custom property.\n * This enables advanced features like animating custom properties.\n *\n * Note: @property rules are global and persistent once defined.\n * The hook ensures the property is only registered once per root.\n *\n * Accepts tasty token syntax for the property name:\n * - `$name` → defines `--name`\n * - `#name` → defines `--name-color` (auto-sets syntax: '<color>', defaults initialValue: 'transparent')\n * - `--name` → defines `--name` (legacy format)\n *\n * @param name - The property token ($name, #name) or CSS property name (--name)\n * @param options - Property configuration\n *\n * @example Basic property with token syntax\n * ```tsx\n * function Spinner() {\n * useProperty('$rotation', {\n * syntax: '<angle>',\n * inherits: false,\n * initialValue: '0deg',\n * });\n *\n * return <div className=\"spinner\" />;\n * }\n * ```\n *\n * @example Color property with token syntax (auto-sets syntax)\n * ```tsx\n * function MyComponent() {\n * useProperty('#theme', {\n * initialValue: 'red', // syntax: '<color>' is auto-set\n * });\n *\n * // Now --theme-color can be animated with CSS transitions\n * return <div style={{ '--theme-color': 'blue' } as React.CSSProperties}>Colored</div>;\n * }\n * ```\n *\n * @example Legacy format (still supported)\n * ```tsx\n * function ResizableBox() {\n * useProperty('--box-size', {\n * syntax: '<length>',\n * initialValue: '100px',\n * });\n *\n * return <div style={{ width: 'var(--box-size)' }} />;\n * }\n * ```\n */\nexport function useProperty(name: string, options?: UsePropertyOptions): void {\n // Memoize the options to create a stable dependency\n const optionsKey = useMemo(() => {\n if (!options) return '';\n return JSON.stringify({\n syntax: options.syntax,\n inherits: options.inherits,\n initialValue: options.initialValue,\n });\n }, [options?.syntax, options?.inherits, options?.initialValue]);\n\n useInsertionEffect(() => {\n if (!name) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`[Tasty] useProperty: property name is required`);\n }\n return;\n }\n\n const injector = getGlobalInjector();\n\n // Check if already defined (properties are persistent)\n // The injector handles token parsing internally\n if (injector.isPropertyDefined(name, { root: options?.root })) {\n return;\n }\n\n // Register the property\n // The injector handles $name, #name, --name parsing and auto-sets\n // syntax for color tokens\n injector.property(name, {\n syntax: options?.syntax,\n inherits: options?.inherits,\n initialValue: options?.initialValue,\n root: options?.root,\n });\n\n // No cleanup - @property rules are global and persistent\n // Re-registering is a no-op anyway due to the isPropertyDefined check\n }, [name, optionsKey, options?.root]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA,SAAgB,YAAY,MAAc,SAAoC;AAW5E,0BAAyB;AACvB,MAAI,CAAC,MAAM;AAEP,WAAQ,KAAK,iDAAiD;AAEhE;;EAGF,MAAM,WAAW,mBAAmB;AAIpC,MAAI,SAAS,kBAAkB,MAAM,EAAE,MAAM,SAAS,MAAM,CAAC,CAC3D;AAMF,WAAS,SAAS,MAAM;GACtB,QAAQ,SAAS;GACjB,UAAU,SAAS;GACnB,cAAc,SAAS;GACvB,MAAM,SAAS;GAChB,CAAC;IAID;EAAC;EArCe,cAAc;AAC/B,OAAI,CAAC,QAAS,QAAO;AACrB,UAAO,KAAK,UAAU;IACpB,QAAQ,QAAQ;IAChB,UAAU,QAAQ;IAClB,cAAc,QAAQ;IACvB,CAAC;KACD;GAAC,SAAS;GAAQ,SAAS;GAAU,SAAS;GAAa,CAAC;EA8BzC,SAAS;EAAK,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/tasty/hooks/useRawCSS.d.ts
|
|
3
|
-
type UseRawCSSOptions = {
|
|
4
|
-
root?: Document | ShadowRoot;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Hook to inject raw CSS text directly without parsing.
|
|
8
|
-
* This is a low-overhead alternative for injecting global CSS that doesn't need tasty processing.
|
|
9
|
-
*
|
|
10
|
-
* The CSS is inserted into a separate style element (data-tasty-raw) to avoid conflicts
|
|
11
|
-
* with tasty's chunked style sheets.
|
|
12
|
-
*
|
|
13
|
-
* @example Static CSS string
|
|
14
|
-
* ```tsx
|
|
15
|
-
* function GlobalStyles() {
|
|
16
|
-
* useRawCSS(`
|
|
17
|
-
* body {
|
|
18
|
-
* margin: 0;
|
|
19
|
-
* padding: 0;
|
|
20
|
-
* font-family: sans-serif;
|
|
21
|
-
* }
|
|
22
|
-
* `);
|
|
23
|
-
*
|
|
24
|
-
* return null;
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @example Factory function with dependencies (like useMemo)
|
|
29
|
-
* ```tsx
|
|
30
|
-
* function ThemeStyles({ theme }: { theme: 'light' | 'dark' }) {
|
|
31
|
-
* useRawCSS(() => `
|
|
32
|
-
* :root {
|
|
33
|
-
* --bg-color: ${theme === 'dark' ? '#1a1a1a' : '#ffffff'};
|
|
34
|
-
* --text-color: ${theme === 'dark' ? '#ffffff' : '#1a1a1a'};
|
|
35
|
-
* }
|
|
36
|
-
* `, [theme]);
|
|
37
|
-
*
|
|
38
|
-
* return null;
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* @example With options
|
|
43
|
-
* ```tsx
|
|
44
|
-
* function ShadowStyles({ shadowRoot }) {
|
|
45
|
-
* useRawCSS(() => `.scoped { color: red; }`, [], { root: shadowRoot });
|
|
46
|
-
* return null;
|
|
47
|
-
* }
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
declare function useRawCSS(css: string, options?: UseRawCSSOptions): void;
|
|
51
|
-
declare function useRawCSS(factory: () => string, deps: readonly unknown[], options?: UseRawCSSOptions): void;
|
|
52
|
-
//#endregion
|
|
53
|
-
export { useRawCSS };
|
|
54
|
-
//# sourceMappingURL=useRawCSS.d.ts.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.118.0 | Cube Dev Team */
|
|
2
|
-
import { injectRawCSS } from "../injector/index.js";
|
|
3
|
-
import { useInsertionEffect, useMemo, useRef } from "react";
|
|
4
|
-
|
|
5
|
-
//#region src/tasty/hooks/useRawCSS.ts
|
|
6
|
-
function useRawCSS(cssOrFactory, depsOrOptions, options) {
|
|
7
|
-
const isFactory = typeof cssOrFactory === "function";
|
|
8
|
-
const deps = isFactory && Array.isArray(depsOrOptions) ? depsOrOptions : void 0;
|
|
9
|
-
const opts = isFactory ? options : depsOrOptions;
|
|
10
|
-
const css = useMemo(() => isFactory ? cssOrFactory() : cssOrFactory, isFactory ? deps ?? [] : [cssOrFactory]);
|
|
11
|
-
const disposeRef = useRef(null);
|
|
12
|
-
useInsertionEffect(() => {
|
|
13
|
-
disposeRef.current?.();
|
|
14
|
-
if (!css.trim()) {
|
|
15
|
-
disposeRef.current = null;
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const { dispose } = injectRawCSS(css, opts);
|
|
19
|
-
disposeRef.current = dispose;
|
|
20
|
-
return () => {
|
|
21
|
-
disposeRef.current?.();
|
|
22
|
-
disposeRef.current = null;
|
|
23
|
-
};
|
|
24
|
-
}, [css, opts?.root]);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
export { useRawCSS };
|
|
29
|
-
//# sourceMappingURL=useRawCSS.js.map
|