@cube-dev/ui-kit 0.175.1 → 0.176.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +18 -0
- package/dist/_internal/hooks/use-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.js +1 -1
- package/dist/components/CollectionItem.js +1 -1
- package/dist/components/GlobalStyles.js +1 -1
- package/dist/components/GridProvider.js +1 -1
- package/dist/components/HiddenInput.js +1 -1
- package/dist/components/Root.js +1 -1
- package/dist/components/actions/Action/Action.js +1 -1
- package/dist/components/actions/Banner/Banner.js +1 -1
- package/dist/components/actions/Button/Button.js +1 -1
- package/dist/components/actions/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/actions/ButtonSplit/ButtonSplit.js +1 -1
- package/dist/components/actions/ButtonSplit/context.js +1 -1
- package/dist/components/actions/CommandMenu/CommandMenu.js +1 -1
- package/dist/components/actions/CommandMenu/styled.js +1 -1
- package/dist/components/actions/ItemAction/ItemAction.js +1 -1
- package/dist/components/actions/ItemActionContext.js +1 -1
- package/dist/components/actions/ItemButton/ItemButton.js +1 -1
- package/dist/components/actions/Link/Link.js +1 -1
- package/dist/components/actions/Menu/Menu.js +1 -1
- package/dist/components/actions/Menu/MenuItem.js +1 -1
- package/dist/components/actions/Menu/MenuSection.js +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 +1 -1
- package/dist/components/actions/index.js +1 -1
- package/dist/components/actions/use-action.js +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.js +1 -1
- package/dist/components/content/Alert/Alert.js +1 -1
- package/dist/components/content/Alert/use-alert.js +1 -1
- package/dist/components/content/Avatar/Avatar.js +1 -1
- package/dist/components/content/Badge/Badge.js +1 -1
- package/dist/components/content/Card/Card.js +1 -1
- package/dist/components/content/Content.js +1 -1
- package/dist/components/content/CopyPasteBlock/CopyPasteBlock.js +1 -1
- package/dist/components/content/CopySnippet/CopySnippet.js +1 -1
- package/dist/components/content/Disclosure/Disclosure.js +1 -1
- package/dist/components/content/Divider.js +1 -1
- package/dist/components/content/Footer.js +1 -1
- package/dist/components/content/Header.js +1 -1
- package/dist/components/content/HotKeys/HotKeys.js +1 -1
- package/dist/components/content/InfoBadge/InfoBadge.js +1 -1
- package/dist/components/content/InlineInput/InlineInput.js +1 -1
- package/dist/components/content/Item/Item.js +1 -1
- package/dist/components/content/ItemBadge/ItemBadge.js +1 -1
- package/dist/components/content/ItemCard/ItemCard.js +1 -1
- package/dist/components/content/Layout/GridLayout.js +1 -1
- package/dist/components/content/Layout/Layout.js +1 -1
- package/dist/components/content/Layout/LayoutBlock.js +1 -1
- package/dist/components/content/Layout/LayoutCenter.js +1 -1
- package/dist/components/content/Layout/LayoutContainer.js +1 -1
- package/dist/components/content/Layout/LayoutContent.js +1 -1
- package/dist/components/content/Layout/LayoutContext.js +1 -1
- package/dist/components/content/Layout/LayoutFlex.js +1 -1
- package/dist/components/content/Layout/LayoutFooter.js +1 -1
- package/dist/components/content/Layout/LayoutGrid.js +1 -1
- package/dist/components/content/Layout/LayoutHeader.js +1 -1
- package/dist/components/content/Layout/LayoutPane.js +1 -1
- package/dist/components/content/Layout/LayoutPanel.js +1 -1
- package/dist/components/content/Layout/LayoutPanelHeader.js +1 -1
- package/dist/components/content/Layout/LayoutToolbar.js +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.js +1 -1
- package/dist/components/content/Placeholder/Placeholder.js +1 -1
- package/dist/components/content/PrismCode/PrismCode.js +1 -1
- package/dist/components/content/PrismCode/prismSetup.js +1 -1
- package/dist/components/content/PrismDiffCode/PrismDiffCode.js +1 -1
- package/dist/components/content/Result/Result.js +1 -1
- package/dist/components/content/Skeleton/Skeleton.js +1 -1
- package/dist/components/content/Tag/Tag.js +1 -1
- package/dist/components/content/Text.js +1 -1
- package/dist/components/content/TextItem/TextItem.js +1 -1
- package/dist/components/content/Title.js +1 -1
- package/dist/components/content/Tree/Tree.js +1 -1
- package/dist/components/content/Tree/TreeNode.js +1 -1
- package/dist/components/content/Tree/styled.js +1 -1
- package/dist/components/content/Tree/tree-index.js +1 -1
- package/dist/components/content/Tree/use-checkbox-tree.js +1 -1
- package/dist/components/content/Tree/use-load-data.js +1 -1
- package/dist/components/content/highlightText.js +1 -1
- package/dist/components/content/use-auto-tooltip.js +1 -1
- package/dist/components/data/DataTable/DataTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTable.js +1 -1
- package/dist/components/data/ItemTable/ItemTableBulkBar.js +1 -1
- package/dist/components/data/ItemTable/ItemTableDragPreview.js +1 -1
- package/dist/components/data/ItemTable/ItemTableFooter.js +1 -1
- package/dist/components/data/ItemTable/ItemTableToolbar.js +1 -1
- package/dist/components/data/TableBase/ColumnResizer.js +1 -1
- package/dist/components/data/TableBase/RowCollection.js +1 -1
- package/dist/components/data/TableBase/TableHeaderCell.js +1 -1
- package/dist/components/data/TableBase/TableRow.js +1 -1
- package/dist/components/data/TableBase/TableView.js +1 -1
- package/dist/components/data/TableBase/column-menu.js +1 -1
- package/dist/components/data/TableBase/column-tint.js +1 -1
- package/dist/components/data/TableBase/row-menu.js +1 -1
- package/dist/components/data/TableBase/styled.js +1 -1
- package/dist/components/data/TableBase/table-tree.js +1 -1
- package/dist/components/data/TableBase/types.js +1 -1
- package/dist/components/data/TableBase/use-cell-selection.js +0 -0
- package/dist/components/data/TableBase/use-column-order.js +1 -1
- package/dist/components/data/TableBase/use-container-width.js +1 -1
- package/dist/components/data/TableBase/use-row-move-animation.js +1 -1
- package/dist/components/data/TableBase/use-scrollability.js +1 -1
- package/dist/components/data/TableBase/use-table-columns.js +1 -1
- package/dist/components/data/TableBase/use-table-search.js +1 -1
- package/dist/components/data/TableBase/use-table-selection.js +1 -1
- package/dist/components/data/TableBase/use-table-sort.js +1 -1
- package/dist/components/data/TableBase/use-table-sorts.js +1 -1
- package/dist/components/data/TableBase/use-table-storage.js +1 -1
- package/dist/components/data/TableBase/use-table-tree-state.js +1 -1
- package/dist/components/fields/Checkbox/Checkbox.js +1 -1
- package/dist/components/fields/Checkbox/CheckboxGroup.js +1 -1
- package/dist/components/fields/Checkbox/context.js +1 -1
- package/dist/components/fields/ColorInput/ColorInput.js +1 -1
- package/dist/components/fields/ColorPicker/ColorPicker.js +1 -1
- package/dist/components/fields/ColorSwatch/ColorSwatch.js +1 -1
- package/dist/components/fields/ColorSwatchGroup/ColorSwatchGroup.js +1 -1
- package/dist/components/fields/ComboBox/ComboBox.js +1 -1
- package/dist/components/fields/CommandTextArea/CommandTextArea.js +1 -1
- package/dist/components/fields/CommandTextArea/caretPosition.js +1 -1
- package/dist/components/fields/CommandTextArea/useCaretAnchor.js +1 -1
- package/dist/components/fields/DatePicker/DateInput.js +1 -1
- package/dist/components/fields/DatePicker/DateInputBase.js +1 -1
- package/dist/components/fields/DatePicker/DatePicker.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerButton.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerElement.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerInput.js +1 -1
- package/dist/components/fields/DatePicker/DatePickerSegment.js +1 -1
- package/dist/components/fields/DatePicker/DateRangePicker.js +1 -1
- package/dist/components/fields/DatePicker/DateRangeSeparatedPicker.js +1 -1
- package/dist/components/fields/DatePicker/MonthPicker.js +1 -1
- package/dist/components/fields/DatePicker/PeriodPicker.js +1 -1
- package/dist/components/fields/DatePicker/QuarterPicker.js +1 -1
- package/dist/components/fields/DatePicker/TimeInput.js +1 -1
- package/dist/components/fields/DatePicker/WeekPicker.js +1 -1
- package/dist/components/fields/DatePicker/YearPicker.js +1 -1
- package/dist/components/fields/DatePicker/parseDate.js +1 -1
- package/dist/components/fields/DatePicker/period.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.js +1 -1
- package/dist/components/fields/FilterListBox/FilterListBox.js +1 -1
- package/dist/components/fields/FilterPicker/FilterPicker.js +1 -1
- package/dist/components/fields/Input/Input.js +1 -1
- package/dist/components/fields/ListBox/DraggableListBox.js +1 -1
- package/dist/components/fields/ListBox/ListBox.js +1 -1
- package/dist/components/fields/ListBoxPopover/ListBoxPopover.js +1 -1
- package/dist/components/fields/ListBoxPopover/listNavigation.js +1 -1
- package/dist/components/fields/ListBoxPopover/useCompositeFocus.js +1 -1
- package/dist/components/fields/NumberInput/NumberInput.js +1 -1
- package/dist/components/fields/NumberInput/StepButton.js +1 -1
- package/dist/components/fields/PasswordInput/PasswordInput.js +1 -1
- package/dist/components/fields/Picker/Picker.js +1 -1
- package/dist/components/fields/RadioGroup/Radio.js +1 -1
- package/dist/components/fields/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/fields/RadioGroup/context.js +1 -1
- package/dist/components/fields/SearchComboBox/SearchComboBox.js +1 -1
- package/dist/components/fields/SearchInput/SearchInput.js +1 -1
- package/dist/components/fields/Select/Select.js +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/RangeSlider.js +1 -1
- package/dist/components/fields/Slider/Slider.js +1 -1
- package/dist/components/fields/Slider/SliderBase.js +1 -1
- package/dist/components/fields/Slider/SliderThumb.js +1 -1
- package/dist/components/fields/Slider/SliderTrack.js +1 -1
- package/dist/components/fields/Slider/elements.js +1 -1
- package/dist/components/fields/Slider/index.js +1 -1
- package/dist/components/fields/Switch/Switch.js +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.js +1 -1
- package/dist/components/fields/TextInput/useAutoSizeTextArea.js +1 -1
- package/dist/components/fields/TextInputMapper/TextInputMapper.js +1 -1
- package/dist/components/fields/color/ColorPanel.js +1 -1
- package/dist/components/fields/color/channels.js +1 -1
- package/dist/components/fields/color/color.js +1 -1
- package/dist/components/fields/color/context.js +1 -1
- package/dist/components/form/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/components/form/Form/Field.js +1 -1
- package/dist/components/form/Form/Form.js +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 +1 -1
- package/dist/components/form/Form/validation.js +1 -1
- package/dist/components/form/Label.js +1 -1
- package/dist/components/form/validation/ValidationIndicator.js +1 -1
- package/dist/components/form/validation/resolve-validation-props.js +1 -1
- package/dist/components/form/validation/use-validation-props.js +1 -1
- package/dist/components/form/wrapper.js +1 -1
- package/dist/components/helpers/DisplayTransition/DisplayTransition.js +1 -1
- package/dist/components/helpers/IconSwitch/IconSwitch.js +1 -1
- package/dist/components/layout/Board/Board.js +1 -1
- package/dist/components/layout/Board/BoardProvider.js +4 -4
- package/dist/components/layout/Board/BoardProvider.js.map +1 -1
- package/dist/components/layout/Board/BoardResponsive.js +1 -1
- package/dist/components/layout/Board/Widget.js +1 -1
- package/dist/components/layout/Board/WidgetHost.js +1 -1
- package/dist/components/layout/Board/board-context.d.ts +29 -2
- package/dist/components/layout/Board/board-context.js +30 -2
- package/dist/components/layout/Board/board-context.js.map +1 -1
- package/dist/components/layout/Board/board-store.js +1 -1
- package/dist/components/layout/Board/grid-core/calculate.js +1 -1
- package/dist/components/layout/Board/grid-core/collision-modes.js +1 -1
- package/dist/components/layout/Board/grid-core/collision.js +1 -1
- package/dist/components/layout/Board/grid-core/compactors.js +1 -1
- package/dist/components/layout/Board/grid-core/constraints.js +1 -1
- package/dist/components/layout/Board/grid-core/group-move.js +1 -1
- package/dist/components/layout/Board/grid-core/layout.js +1 -1
- package/dist/components/layout/Board/grid-core/placement.js +1 -1
- package/dist/components/layout/Board/grid-core/sort.js +1 -1
- package/dist/components/layout/Board/index.d.ts +1 -1
- package/dist/components/layout/Board/index.js +2 -1
- package/dist/components/layout/Board/index.js.map +1 -1
- package/dist/components/layout/Board/responsive-utils.js +1 -1
- package/dist/components/layout/Board/use-board-layout.js +1 -1
- package/dist/components/layout/Board/use-board-registry.js +1 -1
- package/dist/components/layout/Board/use-board-select-modifier-key.js +1 -1
- package/dist/components/layout/Board/use-board-selection.js +1 -1
- package/dist/components/layout/Flex.js +1 -1
- package/dist/components/layout/Flow.js +1 -1
- package/dist/components/layout/Grid.js +1 -1
- package/dist/components/layout/Panel.js +1 -1
- package/dist/components/layout/Prefix.js +1 -1
- package/dist/components/layout/ResizablePanel.js +1 -1
- package/dist/components/layout/Space.js +1 -1
- package/dist/components/layout/Suffix.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +1 -1
- package/dist/components/navigation/Pagination/use-pagination.js +1 -1
- package/dist/components/navigation/Tabs/DraggableTabList.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/TabPicker.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +1 -1
- package/dist/components/navigation/Tabs/TabsAction.js +1 -1
- package/dist/components/navigation/Tabs/TabsContext.js +1 -1
- package/dist/components/navigation/Tabs/popover-placement.js +1 -1
- package/dist/components/navigation/Tabs/styled.js +1 -1
- package/dist/components/navigation/Tabs/types.js +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/StatsCard/StatsCard.js +1 -1
- package/dist/components/other/Calendar/Calendar.js +1 -1
- package/dist/components/other/Calendar/CalendarCell.js +1 -1
- package/dist/components/other/Calendar/CalendarGrid.js +1 -1
- package/dist/components/other/Calendar/CalendarHeader.js +1 -1
- package/dist/components/other/Calendar/CalendarPanel.js +1 -1
- package/dist/components/other/Calendar/PeriodCalendar.js +1 -1
- package/dist/components/other/Calendar/PeriodGrid.js +1 -1
- package/dist/components/other/Calendar/RangeCalendar.js +1 -1
- package/dist/components/other/Calendar/styled.js +1 -1
- package/dist/components/other/CubeLogo/CubeLogo.js +1 -1
- package/dist/components/other/NoDataIcon/NoDataIcon.js +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/Dialog/Dialog.js +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.js +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.js +1 -1
- package/dist/components/overlays/Modal/OpenTransitionContext.js +1 -1
- package/dist/components/overlays/Modal/Overlay.js +1 -1
- package/dist/components/overlays/Modal/Popover.js +1 -1
- package/dist/components/overlays/Modal/Tray.js +1 -1
- package/dist/components/overlays/Modal/Underlay.js +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 +1 -1
- package/dist/components/overlays/Notifications/NotificationContext.js +1 -1
- package/dist/components/overlays/Notifications/NotificationItem.js +1 -1
- package/dist/components/overlays/Notifications/OverlayContainer.js +1 -1
- package/dist/components/overlays/Notifications/OverlayProvider.js +1 -1
- package/dist/components/overlays/Notifications/PersistentNotificationsList.js +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 +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 +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipProvider.js +1 -1
- package/dist/components/overlays/Tooltip/TooltipTrigger.js +1 -1
- package/dist/components/overlays/Tooltip/context.js +1 -1
- package/dist/components/portal/Portal.js +1 -1
- package/dist/components/portal/PortalProvider.js +1 -1
- package/dist/components/portal/usePortal.js +1 -1
- package/dist/components/shared/DraggableCollection.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 +1 -1
- package/dist/components/status/Spin/Cube.js +1 -1
- package/dist/components/status/Spin/InternalSpinner.js +1 -1
- package/dist/components/status/Spin/Spin.js +1 -1
- package/dist/components/status/Spin/SpinsContainer.js +1 -1
- package/dist/data/item-themes.js +1 -1
- package/dist/data/themes.js +1 -1
- package/dist/eslint-plugin/defaults.generated.js +1 -1
- package/dist/eslint-plugin/index.js +1 -1
- package/dist/eslint-plugin/rules/no-redundant-default-prop.js +1 -1
- package/dist/i18n/I18nProvider.js +1 -1
- package/dist/i18n/createFormatter.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/instance.js +1 -1
- package/dist/i18n/locales/de-DE/uikit.js +1 -1
- package/dist/i18n/locales/en-US/uikit.js +1 -1
- package/dist/i18n/locales/es-ES/uikit.js +1 -1
- package/dist/i18n/locales/es-MX/uikit.js +1 -1
- package/dist/i18n/locales/fr-FR/uikit.js +1 -1
- package/dist/i18n/locales/it-IT/uikit.js +1 -1
- package/dist/i18n/locales/ja-JP/uikit.js +1 -1
- package/dist/i18n/locales/nb-NO/uikit.js +1 -1
- package/dist/i18n/locales/pt-BR/uikit.js +1 -1
- package/dist/i18n/locales/pt-PT/uikit.js +1 -1
- package/dist/i18n/locales/sv-SE/uikit.js +1 -1
- package/dist/i18n/locales/vi-VN/uikit.js +1 -1
- package/dist/i18n/locales.js +1 -1
- package/dist/i18n/useFormatter.js +1 -1
- package/dist/i18n/useI18n.js +1 -1
- package/dist/icons/AdjustmentsHorizontalIcon.js +1 -1
- package/dist/icons/AdjustmentsIcon.js +1 -1
- package/dist/icons/AiIcon.js +1 -1
- package/dist/icons/AreaChartIcon.js +1 -1
- package/dist/icons/ArrowNarrowDownIcon.js +1 -1
- package/dist/icons/ArrowNarrowUpIcon.js +1 -1
- package/dist/icons/BackwardIcon.js +1 -1
- package/dist/icons/BarChartIcon.js +1 -1
- package/dist/icons/BellFilledIcon.js +1 -1
- package/dist/icons/BellIcon.js +1 -1
- package/dist/icons/BooleanIcon.js +1 -1
- package/dist/icons/CalendarEditIcon.js +1 -1
- package/dist/icons/CalendarIcon.js +1 -1
- package/dist/icons/CaretDownIcon.js +1 -1
- package/dist/icons/CaretUpIcon.js +1 -1
- package/dist/icons/ChartAreaStackedIcon.js +1 -1
- package/dist/icons/ChartAreaStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBarGroupedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarGroupedIcon.js +1 -1
- package/dist/icons/ChartBarHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarLineIcon.js +1 -1
- package/dist/icons/ChartBarStackedHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageHorizontalIcon.js +1 -1
- package/dist/icons/ChartBarStackedPercentageIcon.js +1 -1
- package/dist/icons/ChartBoxPlot2Icon.js +1 -1
- package/dist/icons/ChartBoxPlotIcon.js +1 -1
- package/dist/icons/ChartBubbleIcon.js +1 -1
- package/dist/icons/ChartDonut2Icon.js +1 -1
- package/dist/icons/ChartFunnelIcon.js +1 -1
- package/dist/icons/ChartHeatmapIcon.js +1 -1
- package/dist/icons/ChartKPIIcon.js +1 -1
- package/dist/icons/ChartPie2Icon.js +1 -1
- package/dist/icons/ChartScatterIcon.js +1 -1
- package/dist/icons/CheckCircleFilledIcon.js +1 -1
- package/dist/icons/CheckCircleIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CircleFilledIcon.js +1 -1
- package/dist/icons/ClearIcon.js +1 -1
- package/dist/icons/CloseCircleFilledIcon.js +1 -1
- package/dist/icons/CloseCircleIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/CodeIcon.js +1 -1
- package/dist/icons/ColumnTotalIcon.js +1 -1
- package/dist/icons/CopyIcon.js +1 -1
- package/dist/icons/CountIcon.js +1 -1
- package/dist/icons/CubeIcon.js +1 -1
- package/dist/icons/CubePauseIcon.js +1 -1
- package/dist/icons/CubePlayIcon.js +1 -1
- package/dist/icons/CurrencyDollarIcon.js +1 -1
- package/dist/icons/DangerIcon.js +1 -1
- package/dist/icons/DashboardIcon.js +1 -1
- package/dist/icons/DatabaseIcon.js +1 -1
- package/dist/icons/DecimalDecreaseIcon.js +1 -1
- package/dist/icons/DecimalIncreaseIcon.js +1 -1
- package/dist/icons/DirectionIcon.js +1 -1
- package/dist/icons/DonutIcon.js +1 -1
- package/dist/icons/DownIcon.js +1 -1
- package/dist/icons/EditIcon.js +1 -1
- package/dist/icons/ExclamationCircleFilledIcon.js +1 -1
- package/dist/icons/ExclamationCircleIcon.js +1 -1
- package/dist/icons/ExclamationIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeInvisibleIcon.js +1 -1
- package/dist/icons/FilterIcon.js +1 -1
- package/dist/icons/FolderFilledIcon.js +1 -1
- package/dist/icons/FolderIcon.js +1 -1
- package/dist/icons/FolderOpenFilledIcon.js +1 -1
- package/dist/icons/FolderOpenIcon.js +1 -1
- package/dist/icons/ForwardIcon.js +1 -1
- package/dist/icons/GripVerticalIcon.js +1 -1
- package/dist/icons/HierarchyIcon.js +1 -1
- package/dist/icons/HierarchyOpenIcon.js +1 -1
- package/dist/icons/Icon.js +1 -1
- package/dist/icons/InfoCircleIcon.js +1 -1
- package/dist/icons/InfoIcon.js +1 -1
- package/dist/icons/KeyIcon.js +1 -1
- package/dist/icons/LeftIcon.js +1 -1
- package/dist/icons/LineChartIcon.js +1 -1
- package/dist/icons/LoadingIcon.js +1 -1
- package/dist/icons/LockFilledIcon.js +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/MoreIcon.js +1 -1
- package/dist/icons/NotAllowedIcon.js +1 -1
- package/dist/icons/Number123Icon.js +1 -1
- package/dist/icons/NumberIcon.js +1 -1
- package/dist/icons/PauseCircleFilledIcon.js +1 -1
- package/dist/icons/PauseCircleIcon.js +1 -1
- package/dist/icons/PauseIcon.js +1 -1
- package/dist/icons/PercentageIcon.js +1 -1
- package/dist/icons/PieChartIcon.js +1 -1
- package/dist/icons/PipetteIcon.js +1 -1
- package/dist/icons/PlayCircleIcon.js +1 -1
- package/dist/icons/PlayIcon.js +1 -1
- package/dist/icons/PlusIcon.js +1 -1
- package/dist/icons/ProgressBarIcon.js +1 -1
- package/dist/icons/ReloadIcon.js +1 -1
- package/dist/icons/ReportIcon.js +1 -1
- package/dist/icons/ReturnIcon.js +1 -1
- package/dist/icons/RightIcon.js +1 -1
- package/dist/icons/RowTotalsIcon.js +1 -1
- package/dist/icons/SchemeIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/SemanticQueryIcon.js +1 -1
- package/dist/icons/SettingsIcon.js +1 -1
- package/dist/icons/ShieldFilledIcon.js +1 -1
- package/dist/icons/ShieldIcon.js +1 -1
- package/dist/icons/SlashIcon.js +1 -1
- package/dist/icons/SparklesIcon.js +1 -1
- package/dist/icons/SqlIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/StopIcon.js +1 -1
- package/dist/icons/StringIcon.js +1 -1
- package/dist/icons/SubtotalsIcon.js +1 -1
- package/dist/icons/SwitchIcon.js +1 -1
- package/dist/icons/TableIcon.js +1 -1
- package/dist/icons/ThumbsDownIcon.js +1 -1
- package/dist/icons/ThumbsUpIcon.js +1 -1
- package/dist/icons/ThunderboltCrossedIcon.js +1 -1
- package/dist/icons/ThunderboltFilledIcon.js +1 -1
- package/dist/icons/ThunderboltIcon.js +1 -1
- package/dist/icons/TimeIcon.js +1 -1
- package/dist/icons/TrashIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UpIcon.js +1 -1
- package/dist/icons/UserGroupIcon.js +1 -1
- package/dist/icons/UserIcon.js +1 -1
- package/dist/icons/UserLockIcon.js +1 -1
- package/dist/icons/ViewIcon.js +1 -1
- package/dist/icons/WarningFilledIcon.js +1 -1
- package/dist/icons/WarningIcon.js +1 -1
- package/dist/icons/wrap-icon.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/probe/canonicalize.js +1 -1
- package/dist/probe/css.js +1 -1
- package/dist/probe/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/providers/TrackingProvider.js +1 -1
- package/dist/providers/navigationAdapter.default.js +1 -1
- package/dist/tokens/all-tokens.js +1 -1
- package/dist/tokens/base.js +1 -1
- package/dist/tokens/color-seed.js +1 -1
- package/dist/tokens/color-theme.js +1 -1
- package/dist/tokens/colors.js +1 -1
- package/dist/tokens/layout.js +1 -1
- package/dist/tokens/lazy-styles.js +1 -1
- package/dist/tokens/palette-config.js +1 -1
- package/dist/tokens/palette.js +1 -1
- package/dist/tokens/resolve.js +1 -1
- package/dist/tokens/shadows.js +1 -1
- package/dist/tokens/sizes.js +1 -1
- package/dist/tokens/spacing.js +1 -1
- package/dist/tokens/typography.js +1 -1
- package/dist/utils/ResizeSensor.js +1 -1
- package/dist/utils/is-dev-env.js +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/disabledProps.js +1 -1
- package/dist/utils/react/forwardRefWithGenerics.js +1 -1
- package/dist/utils/react/index.js +1 -1
- 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.js +1 -1
- package/dist/utils/react/nullableValue.js +1 -1
- package/dist/utils/react/resolveIcon.js +1 -1
- package/dist/utils/react/sharedStore.js +1 -1
- package/dist/utils/react/useBufferedValue.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.js +1 -1
- package/dist/utils/react/usePopoverSync.js +1 -1
- package/dist/utils/react/useQaProps.js +1 -1
- package/dist/utils/react/useScheme.js +1 -1
- package/dist/utils/react/useViewportSize.js +1 -1
- package/dist/utils/react/wrapNodeIfPlain.js +1 -1
- package/dist/utils/selection.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/dist/utils/tree.js +1 -1
- package/dist/utils/warnings.js +1 -1
- package/dist/version.js +3 -3
- package/docs/components/layout/Board.md +10 -0
- package/docs/tasty/debug.md +13 -0
- package/docs/tasty/runtime-benchmarks.md +185 -12
- package/docs/tasty/ssr.md +151 -31
- package/package.json +2 -2
package/dist/utils/modules.js
CHANGED
package/dist/utils/promise.js
CHANGED
package/dist/utils/raf.js
CHANGED
package/dist/utils/random.js
CHANGED
package/dist/utils/range.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.176.0 | Cube Dev Team */
|
|
2
2
|
import { mergeProps } from "./mergeProps.js";
|
|
3
3
|
import { Children, cloneElement, createContext, useContext, useMemo } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.176.0 | Cube Dev Team */
|
|
2
2
|
import { chain } from "./chain.js";
|
|
3
3
|
import { getDisabledElementProps, omitActivationEventProps } from "./disabledProps.js";
|
|
4
4
|
import { forwardRefWithGenerics } from "./forwardRefWithGenerics.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.176.0 | Cube Dev Team */
|
|
2
2
|
//#region src/utils/react/nullableValue.ts
|
|
3
3
|
function castNullableStringValue(props) {
|
|
4
4
|
return castNullableField(props, ["value", "defaultValue"], "string", (v) => String(v));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.176.0 | Cube Dev Team */
|
|
2
2
|
import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/react/useEventBus.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.176.0 | Cube Dev Team */
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect$1 } from "./useLayoutEffect.js";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { useSSRSafeId } from "@react-aria/ssr";
|
package/dist/utils/selection.js
CHANGED
package/dist/utils/styles.js
CHANGED
package/dist/utils/tree.js
CHANGED
package/dist/utils/warnings.js
CHANGED
package/dist/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/** @license MIT | @cube-dev/ui-kit v0.
|
|
1
|
+
/** @license MIT | @cube-dev/ui-kit v0.176.0 | Cube Dev Team */
|
|
2
2
|
//#region src/version.ts
|
|
3
|
-
const VERSION = "0.
|
|
4
|
-
const TASTY_VERSION = "3.
|
|
3
|
+
const VERSION = "0.176.0";
|
|
4
|
+
const TASTY_VERSION = "3.7.0";
|
|
5
5
|
if (typeof window !== "undefined") {
|
|
6
6
|
const version = VERSION;
|
|
7
7
|
const tastyVersion = TASTY_VERSION;
|
|
@@ -377,6 +377,16 @@ A `Board.Widget` can host a `Tabs` where each tab renders its own `Board`, all u
|
|
|
377
377
|
|
|
378
378
|
When a `Tabs` sits inside a `Board`, tab switching becomes "spring-loaded" automatically: while you drag a widget, hovering a tab header for a moment opens that tab so you can drop into it (or move a widget between tabs). This needs no setup - `Tabs` detects the active Board drag and, for its duration, keeps panels mounted so the tab a widget is dragged out of (and the board owning the in-flight drag) is not unmounted mid-gesture. Spring-loading works with mouse and pen; touch drags capture the pointer, so they do not trigger it.
|
|
379
379
|
|
|
380
|
+
`Tabs` learns about the drag from a context this package owns, which a `Board` implementation living **outside** this package cannot reach — so both behaviours above would silently be missing there. Publish the drag state with `BoardDragActiveProvider` instead, wrapping the subtree your board renders at the same level as your drag registry:
|
|
381
|
+
|
|
382
|
+
```jsx
|
|
383
|
+
import { BoardDragActiveProvider } from '@cube-dev/ui-kit';
|
|
384
|
+
|
|
385
|
+
<BoardDragActiveProvider isActive={dragState != null}>{children}</BoardDragActiveProvider>;
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
You never need it alongside this package's `Board`, which provides it for you.
|
|
389
|
+
|
|
380
390
|
### Selection
|
|
381
391
|
|
|
382
392
|
Press a widget to select it, <kbd>Shift</kbd>-press to add or remove one, and drag from empty board space to lasso. Because the press both selects and arms the drag, grabbing a widget you have not selected simply makes it the selection and moves it; grabbing one that _is_ selected moves the whole block rigidly — keeping its shape, clamping against the grid edge as a unit rather than collapsing, and committing once. While the band is out, the widgets it covers show a dimmed version of the selected edge (`pre-selected`), and no text can be selected under it.
|
package/docs/tasty/debug.md
CHANGED
|
@@ -54,6 +54,19 @@ interface DebugOptions {
|
|
|
54
54
|
|
|
55
55
|
When `raw` is `false` (the default), results are logged to the console **and** returned. When `raw` is `true`, results are returned silently.
|
|
56
56
|
|
|
57
|
+
### Environments Without a DOM
|
|
58
|
+
|
|
59
|
+
`tastyDebug` reads the document, so on a server — SSR, a Node REPL, a test
|
|
60
|
+
runner in the `node` environment — there is nothing for it to read. Every
|
|
61
|
+
method returns its empty result (`''`, an empty `InspectResult`, a summary of
|
|
62
|
+
zeroes, `metrics: null`) instead of throwing, and explains itself once with a
|
|
63
|
+
console warning. `{ raw: true }` suppresses that warning along with the rest of
|
|
64
|
+
the logging.
|
|
65
|
+
|
|
66
|
+
To see the styles a server render produced, read the `ServerStyleCollector`
|
|
67
|
+
instead — `collector.getCSS()` and `collector.getRenderedClassNames()`. See
|
|
68
|
+
[SSR](./ssr.md).
|
|
69
|
+
|
|
57
70
|
---
|
|
58
71
|
|
|
59
72
|
## API Reference
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
# Runtime Benchmarks
|
|
2
2
|
|
|
3
3
|
Tasty keeps its performance claims in reproducible benchmarks rather than
|
|
4
|
-
combining unlike measurements into one score. The repository measures
|
|
4
|
+
combining unlike measurements into one score. The repository measures five
|
|
5
5
|
different costs:
|
|
6
6
|
|
|
7
7
|
1. Style parsing and generation in Node.
|
|
8
8
|
2. The React overhead of an empty `tasty({})` wrapper.
|
|
9
9
|
3. Cold browser generation and injection compared with equivalent CSS that is
|
|
10
10
|
already on the page.
|
|
11
|
+
4. The steady-state interaction path — mod flips and styled subtrees opening
|
|
12
|
+
and closing after the page has loaded.
|
|
13
|
+
5. Page-load cold start: network, module compilation, execution and first
|
|
14
|
+
paint, end to end in a throttled browser.
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
The first four are focused microbenchmarks, not page-level scores. The fifth is
|
|
17
|
+
a page-level measurement and is the only one that answers "what does a visitor
|
|
18
|
+
wait for". Run them several times on an otherwise idle machine and use a
|
|
19
|
+
production profile to decide whether any cost matters in an application.
|
|
15
20
|
|
|
16
21
|
## Reproducing the Results
|
|
17
22
|
|
|
@@ -19,17 +24,21 @@ to decide whether any cost matters in an application.
|
|
|
19
24
|
pnpm bench
|
|
20
25
|
pnpm bench:overhead
|
|
21
26
|
pnpm bench:injection
|
|
27
|
+
pnpm bench:interaction
|
|
28
|
+
pnpm bench:cold-start
|
|
22
29
|
```
|
|
23
30
|
|
|
24
|
-
`pnpm bench` runs the core pipeline benchmarks in Node. The
|
|
25
|
-
|
|
26
|
-
`pnpm test:setup` to download Chromium
|
|
31
|
+
`pnpm bench` runs the core pipeline benchmarks in Node. The rest use production
|
|
32
|
+
code paths in headless Chromium. The first checkout may require
|
|
33
|
+
`pnpm test:setup` to download Chromium, and `pnpm bench:cold-start` needs a
|
|
34
|
+
current `dist/` — run `pnpm build` first.
|
|
27
35
|
|
|
28
36
|
Run the Node and browser suites separately so they do not compete for CPU. The
|
|
29
|
-
browser timer has 0.1 ms resolution, so
|
|
37
|
+
browser timer has 0.1 ms resolution, so the browser benchmarks perform many
|
|
30
38
|
matched operations per sample and divide the absolute difference by the number
|
|
31
|
-
of elements or
|
|
32
|
-
the results
|
|
39
|
+
of elements, rules or interactions. Machine load, browser versions, and CPU
|
|
40
|
+
power will move the results — on a loaded machine the absolute columns drift
|
|
41
|
+
several percent while the raw/Tasty delta holds, so read the delta.
|
|
33
42
|
|
|
34
43
|
## Core Style Pipeline
|
|
35
44
|
|
|
@@ -159,10 +168,165 @@ together. Because the same resolution pattern is present in each workload's
|
|
|
159
168
|
control, the difference answers the narrower delivery question: how much extra
|
|
160
169
|
work did Tasty perform when the same CSS was not already there?
|
|
161
170
|
|
|
171
|
+
## Steady-State Interaction
|
|
172
|
+
|
|
173
|
+
The benchmarks above measure mounting and whole-tree updates. A running
|
|
174
|
+
application spends most of its time on neither. It flips mods — hovered,
|
|
175
|
+
pressed, selected, expanded — on elements whose styles never change, one
|
|
176
|
+
element at a time, and it mounts and unmounts small styled subtrees as menus
|
|
177
|
+
and dialogs open. Both paths go through the state-map and ref-counting
|
|
178
|
+
machinery rather than the parser, so a regression in them is invisible to every
|
|
179
|
+
other benchmark here.
|
|
180
|
+
|
|
181
|
+
[`tasty-interaction.bench.tsx`](../src/tasty-interaction.bench.tsx) pairs each
|
|
182
|
+
case with a raw-DOM equivalent driven by a hand-written stylesheet that
|
|
183
|
+
produces the same computed color and background in both states. The benchmark
|
|
184
|
+
fails if either arm resolves to anything else, so an arm that quietly rendered
|
|
185
|
+
unstyled elements cannot report a flattering number.
|
|
186
|
+
|
|
187
|
+
Each leaf owns its own `useState`, which is what keeps a single-element
|
|
188
|
+
interaction single: re-rendering the root to flip one row would time the whole
|
|
189
|
+
tree. One toggle is far below Chromium's 0.1 ms timer resolution, so a sample
|
|
190
|
+
flips a 100-element tree three times over — 300 commits — and the churn case
|
|
191
|
+
performs 20 open/close cycles. Divide the raw/Tasty difference by those counts.
|
|
192
|
+
|
|
193
|
+
Two things had to be sized deliberately, and both are the difference between a
|
|
194
|
+
readable number and noise:
|
|
195
|
+
|
|
196
|
+
- **The tree is small (100 elements), not large.** React locates a leaf's
|
|
197
|
+
pending update by walking the sibling list, so in a 1,000-element tree a
|
|
198
|
+
single-element update costs ~68 us of traversal — identical in both arms and
|
|
199
|
+
an order of magnitude above anything the styling layer contributes.
|
|
200
|
+
- **The sample resolves style once, not once per flip.** Forcing a recalc
|
|
201
|
+
between flips costs ~70 us in both arms, which buries the delta the same way.
|
|
202
|
+
The browser's side of an interaction is real, but it is the browser's;
|
|
203
|
+
resolution boundaries are what the injection benchmark above measures.
|
|
204
|
+
|
|
205
|
+
The contract check also reads the injected CSS **before** any toggle and fails
|
|
206
|
+
if the hovered rule is not already there. That a style map's states all ship in
|
|
207
|
+
one chunk on first render is the premise of this case; if the hovered rule
|
|
208
|
+
arrived lazily, the first sample would be timing injection.
|
|
209
|
+
|
|
210
|
+
On an Apple M1 Max with React 19.2.8 and Chromium 151, across several runs:
|
|
211
|
+
|
|
212
|
+
| Workload | Raw elements | Tasty mods | Extra per unit |
|
|
213
|
+
| ---------------------------------------------------- | -----------: | -----------: | -----------------------: |
|
|
214
|
+
| 300 single-element mod toggles in a 100-element tree | 2.1–2.5 ms | 2.7–3.1 ms | 1.6–2.1 us / interaction |
|
|
215
|
+
| 20 mount + unmount cycles of a 200-element subtree | 7.6–8.0 ms | 12.6–12.7 ms | 1.22–1.27 us / element |
|
|
216
|
+
|
|
217
|
+
The absolute columns move several percent with machine load; the delta between
|
|
218
|
+
the arms is the stable quantity, so read that rather than either column.
|
|
219
|
+
|
|
220
|
+
Two things are worth reading out of this.
|
|
221
|
+
|
|
222
|
+
A mod flip on an already-mounted element costs about 2 us. The CSS for both
|
|
223
|
+
states already exists — Tasty emits every state of a style map in one chunk on
|
|
224
|
+
first render — so both arms perform the same commit, and what is left is
|
|
225
|
+
Tasty's props and mod handling. That is the same order as the ~1 us empty
|
|
226
|
+
wrapper measured above, which is most of where it comes from.
|
|
227
|
+
|
|
228
|
+
Subtree churn is not about styling at all. Its ~1.25 us per element sits right
|
|
229
|
+
on the empty-wrapper mount cost, because the styles are already cached:
|
|
230
|
+
reopening a menu re-pays the React wrapper, not the style pipeline.
|
|
231
|
+
|
|
232
|
+
## Page-Load Cold Start
|
|
233
|
+
|
|
234
|
+
Every benchmark above deliberately excludes the network, module compilation and
|
|
235
|
+
the first render. [`scripts/cold-start`](../scripts/cold-start) measures exactly
|
|
236
|
+
those: what a visitor waits for between requesting a page and seeing styled
|
|
237
|
+
content, in a real Chromium under CDP network and CPU throttling.
|
|
238
|
+
|
|
239
|
+
Three pages render the same 50 styled components and are verified, before any
|
|
240
|
+
timing, to produce the same 50 elements at the same computed color:
|
|
241
|
+
|
|
242
|
+
- **baseline** — the components server-rendered: identical markup, identical
|
|
243
|
+
class names, a linked stylesheet, and no Tasty on the page. Every other
|
|
244
|
+
column is a delta against this one.
|
|
245
|
+
- **runtime** — Tasty generates the CSS in the browser, as a client-rendered
|
|
246
|
+
application does. The run asserts it really did (69 rules generated).
|
|
247
|
+
- **prewarm** — the same, after one throwaway `computeStyles()` against a
|
|
248
|
+
detached root before the first component renders.
|
|
249
|
+
|
|
250
|
+
Each cell is the median of 5 uncached loads in a fresh browser context. The run
|
|
251
|
+
ends at the first contentful paint, observed through a `PerformanceObserver`
|
|
252
|
+
rather than counted in animation frames — `requestAnimationFrame` fires before
|
|
253
|
+
paint, so a page that commits fast can reach its second frame with nothing
|
|
254
|
+
painted yet.
|
|
255
|
+
|
|
256
|
+
Two things about the payload decide whether this measures a deployment or a
|
|
257
|
+
straw man, so both are enforced rather than assumed:
|
|
258
|
+
|
|
259
|
+
- **Assets are served brotli-compressed**, the way a static host serves them.
|
|
260
|
+
The bundle is 52.0 KB on the wire and 186 KB decoded; putting the decoded
|
|
261
|
+
bytes on a 1.6 Mbps link would add ~700 ms and charge it to Tasty. The run
|
|
262
|
+
reads `encodedBodySize` back out of resource timing and fails if what
|
|
263
|
+
crossed the wire is not the compressed size the table reports.
|
|
264
|
+
- **The bundle is built from what the page imports** (`tasty`, `configure`,
|
|
265
|
+
`computeStyles`, `tastyDebug`), so it is tree-shaken as an application's
|
|
266
|
+
would be. Re-exporting the whole library adds ~4 KB brotli of code no page
|
|
267
|
+
here calls.
|
|
268
|
+
|
|
269
|
+
On an Apple M1 Max with React 19.2.8 and Chromium 151, first contentful paint:
|
|
270
|
+
|
|
271
|
+
| Link / CPU | baseline | runtime | prewarm | Tasty's cost |
|
|
272
|
+
| --------------------- | -------: | ------: | ------: | -----------: |
|
|
273
|
+
| No throttling, 1x | 40 ms | 52 ms | 52 ms | +12 ms |
|
|
274
|
+
| Fast 4G, 1x | 624 ms | 680 ms | 676 ms | +56 ms |
|
|
275
|
+
| Slow 4G, 1x | 2028 ms | 2304 ms | 2304 ms | +276 ms |
|
|
276
|
+
| No throttling, 4x CPU | 148 ms | 196 ms | 196 ms | +48 ms |
|
|
277
|
+
| Fast 4G, 4x CPU | 684 ms | 784 ms | 788 ms | +100 ms |
|
|
278
|
+
| Slow 4G, 4x CPU | 2096 ms | 2416 ms | 2408 ms | +320 ms |
|
|
279
|
+
|
|
280
|
+
That is one full run of the matrix; a second moved every cell by a few percent.
|
|
281
|
+
|
|
282
|
+
**The cost is the bundle, not the work.** On Slow 4G the extra transfer alone
|
|
283
|
+
accounts for 262 ms of the 276 ms FCP delta — nearly all of it. Everything
|
|
284
|
+
Tasty then *does* is small by comparison:
|
|
285
|
+
|
|
286
|
+
| Phase (Slow 4G, 1x) | baseline | runtime | prewarm |
|
|
287
|
+
| ----------------------- | -------: | ------: | ------: |
|
|
288
|
+
| js+css transfer | 1420 ms | 1682 ms | 1681 ms |
|
|
289
|
+
| module compile (shared) | 1.2 ms | 1.5 ms | 2.0 ms |
|
|
290
|
+
| tasty top-level execute | — | 1.2 ms | 0.9 ms |
|
|
291
|
+
| `configure()` | — | 0.6 ms | 0.5 ms |
|
|
292
|
+
| prewarm | — | — | 5.3 ms |
|
|
293
|
+
| render 1st component | 2.0 ms | 8.2 ms | 2.7 ms |
|
|
294
|
+
| render 49 more | 1.0 ms | 7.1 ms | 6.0 ms |
|
|
295
|
+
|
|
296
|
+
Importing Tasty costs about 1 ms of top-level execution; `configure()` costs
|
|
297
|
+
half of one. The rest of the CPU delta — about 13 ms for 50 components — is
|
|
298
|
+
generation and injection, which is the cost the injection benchmark isolates.
|
|
299
|
+
|
|
300
|
+
One asymmetry is worth naming: the control links a render-blocking stylesheet
|
|
301
|
+
and the runtime modes have none, so the control's first paint waits for CSS the
|
|
302
|
+
runtime modes never request. That is the real difference between the two
|
|
303
|
+
delivery models, not a thumb on the scale, but it means the FCP delta is not
|
|
304
|
+
purely "what Tasty costs to execute".
|
|
305
|
+
|
|
306
|
+
**Prewarming moves the wake-up, it does not remove it.** The first styled render
|
|
307
|
+
is ~5 ms more expensive than the ones after it, because that is when the
|
|
308
|
+
engine's deferred payload is actually compiled. A throwaway `computeStyles()`
|
|
309
|
+
against a detached root pays it early: `render 1st` drops from 8.2 ms to
|
|
310
|
+
2.7 ms. The prewarm itself costs 5.3 ms, so FCP does not move. It is worth
|
|
311
|
+
doing only when something else can overlap it, or when the first render is on a
|
|
312
|
+
latency-critical path and the page has idle time before it.
|
|
313
|
+
|
|
314
|
+
**Retained heap.** After a forced collection, the runtime page holds about
|
|
315
|
+
1,013 KB more than the control (2,632 KB vs 1,619 KB) for 50 components — the
|
|
316
|
+
parser caches, the chunk cache, the injector's registry and the generated CSS.
|
|
317
|
+
The control is not zero either; most of its 1.6 MB is React and the DOM.
|
|
318
|
+
|
|
319
|
+
CPU throttling changes which line moves. At 4x, module compilation of the
|
|
320
|
+
larger graph becomes visible (5.9 ms → 25 ms) where at 1x it is free: V8
|
|
321
|
+
pre-parses at import and compiles lazily, so a slower CPU pays for code the
|
|
322
|
+
faster one never fully compiled. Transfer numbers from the unthrottled cells
|
|
323
|
+
are not worth reading — with no emulated link, resource timings are scheduling
|
|
324
|
+
jitter.
|
|
325
|
+
|
|
162
326
|
## Reading the Results Together
|
|
163
327
|
|
|
164
|
-
Do not add
|
|
165
|
-
They describe different paths:
|
|
328
|
+
Do not add the microbenchmark numbers together to estimate an application
|
|
329
|
+
blindly. They describe different paths:
|
|
166
330
|
|
|
167
331
|
- A stable `tasty()` factory can skip the style pipeline on later renders, but
|
|
168
332
|
its React wrapper still participates in reconciliation.
|
|
@@ -170,9 +334,18 @@ They describe different paths:
|
|
|
170
334
|
rule.
|
|
171
335
|
- A genuinely new style pays generation and injection once, then becomes
|
|
172
336
|
reusable.
|
|
337
|
+
- A mod flip on an already-styled element pays neither; it is a class-name
|
|
338
|
+
change.
|
|
173
339
|
- Browser style resolution, layout, and paint depend on the actual document and
|
|
174
340
|
need application-level profiling.
|
|
175
341
|
|
|
342
|
+
The cold-start measurement is the one that puts the rest in proportion. On a
|
|
343
|
+
slow connection, nearly all of Tasty's page-load cost is transferring the
|
|
344
|
+
library — 262 ms of a 276 ms delta — while the generation and injection the
|
|
345
|
+
microbenchmarks obsess over is ~13 ms for 50 components. Bundle size is
|
|
346
|
+
therefore the lever with the largest effect on first paint, and the runtime
|
|
347
|
+
levers matter for what happens after it.
|
|
348
|
+
|
|
176
349
|
The practical optimization target is therefore repeated work: keep style input
|
|
177
350
|
stable when possible, reuse generated chunks, and generate CSS at build or
|
|
178
351
|
server time when runtime flexibility is unnecessary.
|