@accelint/design-toolkit 9.9.1 → 9.10.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/catalog-info.yaml +3 -3
- package/dist/components/accordion/group.d.ts +2 -2
- package/dist/components/accordion/header.d.ts +2 -2
- package/dist/components/accordion/index.d.ts +2 -2
- package/dist/components/accordion/panel.d.ts +2 -2
- package/dist/components/accordion/styles.module.css +19 -3
- package/dist/components/accordion/trigger.d.ts +2 -2
- package/dist/components/action-bar/index.d.ts +2 -2
- package/dist/components/audio/index.d.ts +2 -2
- package/dist/components/avatar/context.d.ts +4 -4
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/badge/context.d.ts +4 -4
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/breadcrumbs/index.d.ts +2 -2
- package/dist/components/breadcrumbs/item.d.ts +2 -2
- package/dist/components/button/context.d.ts +8 -8
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/link.d.ts +2 -2
- package/dist/components/button/styles.module.css +16 -0
- package/dist/components/button/toggle.d.ts +2 -2
- package/dist/components/carousel/context.d.ts +40 -0
- package/dist/components/carousel/context.js +55 -0
- package/dist/components/carousel/context.js.map +1 -0
- package/dist/components/carousel/gallery.d.ts +38 -0
- package/dist/components/carousel/gallery.js +84 -0
- package/dist/components/carousel/gallery.js.map +1 -0
- package/dist/components/carousel/index.d.ts +56 -0
- package/dist/components/carousel/index.js +66 -0
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/components/carousel/navigation.d.ts +51 -0
- package/dist/components/carousel/navigation.js +82 -0
- package/dist/components/carousel/navigation.js.map +1 -0
- package/dist/components/carousel/position.d.ts +33 -0
- package/dist/components/carousel/position.js +48 -0
- package/dist/components/carousel/position.js.map +1 -0
- package/dist/components/carousel/select.d.ts +38 -0
- package/dist/components/carousel/select.js +69 -0
- package/dist/components/carousel/select.js.map +1 -0
- package/dist/components/carousel/style.module.css +62 -0
- package/dist/components/carousel/types.d.ts +87 -0
- package/dist/components/carousel/types.js +12 -0
- package/dist/components/carousel/viewer.d.ts +40 -0
- package/dist/components/carousel/viewer.js +75 -0
- package/dist/components/carousel/viewer.js.map +1 -0
- package/dist/components/checkbox/context.d.ts +3 -3
- package/dist/components/checkbox/group.d.ts +2 -2
- package/dist/components/checkbox/group.js +1 -1
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/chip/context.d.ts +4 -4
- package/dist/components/chip/deletable.d.ts +2 -2
- package/dist/components/chip/index.d.ts +2 -2
- package/dist/components/chip/list.d.ts +4 -4
- package/dist/components/chip/selectable.d.ts +2 -2
- package/dist/components/classification-badge/context.d.ts +4 -4
- package/dist/components/classification-badge/index.d.ts +2 -2
- package/dist/components/classification-banner/context.d.ts +4 -4
- package/dist/components/classification-banner/index.d.ts +2 -2
- package/dist/components/clock/index.d.ts +2 -2
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/combobox-field/context.d.ts +4 -4
- package/dist/components/combobox-field/index.d.ts +2 -2
- package/dist/components/combobox-field/index.js +1 -1
- package/dist/components/combobox-field/styles.module.css +12 -0
- package/dist/components/coordinate-field/context.d.ts +6 -6
- package/dist/components/coordinate-field/index.d.ts +2 -2
- package/dist/components/coordinate-field/segment.d.ts +2 -2
- package/dist/components/date-field/index.d.ts +2 -2
- package/dist/components/deferred-collection/index.d.ts +2 -2
- package/dist/components/details-list/context.d.ts +4 -4
- package/dist/components/details-list/index.d.ts +2 -2
- package/dist/components/details-list/label.d.ts +2 -2
- package/dist/components/details-list/value.d.ts +2 -2
- package/dist/components/dialog/content.d.ts +2 -2
- package/dist/components/dialog/context.d.ts +2 -2
- package/dist/components/dialog/footer.d.ts +2 -2
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/dialog/styles.module.css +23 -0
- package/dist/components/dialog/title.d.ts +2 -2
- package/dist/components/divider/context.d.ts +4 -4
- package/dist/components/divider/index.d.ts +2 -2
- package/dist/components/drawer/back.d.ts +2 -2
- package/dist/components/drawer/close.d.ts +2 -2
- package/dist/components/drawer/content.d.ts +2 -2
- package/dist/components/drawer/context.d.ts +2 -2
- package/dist/components/drawer/footer.d.ts +2 -2
- package/dist/components/drawer/header-title.d.ts +2 -2
- package/dist/components/drawer/header.d.ts +2 -2
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/drawer/layout-main.d.ts +2 -2
- package/dist/components/drawer/layout.d.ts +2 -2
- package/dist/components/drawer/menu-item.d.ts +2 -2
- package/dist/components/drawer/menu.d.ts +2 -2
- package/dist/components/drawer/panel.d.ts +2 -2
- package/dist/components/drawer/styles.module.css +54 -2
- package/dist/components/drawer/trigger.d.ts +2 -2
- package/dist/components/drawer/view.d.ts +2 -2
- package/dist/components/flashcard/index.d.ts +9 -9
- package/dist/components/floating-card/context.d.ts +37 -5
- package/dist/components/floating-card/context.js +18 -3
- package/dist/components/floating-card/context.js.map +1 -1
- package/dist/components/floating-card/index.d.ts +53 -3
- package/dist/components/floating-card/index.js +41 -11
- package/dist/components/floating-card/index.js.map +1 -1
- package/dist/components/floating-card/provider.d.ts +94 -17
- package/dist/components/floating-card/provider.js +116 -20
- package/dist/components/floating-card/provider.js.map +1 -1
- package/dist/components/floating-card/styles.module.css +5 -0
- package/dist/components/gantt/components/base-elements/point.d.ts +28 -0
- package/dist/components/gantt/components/base-elements/point.js +44 -0
- package/dist/components/gantt/components/base-elements/point.js.map +1 -0
- package/dist/components/gantt/components/base-elements/range.d.ts +30 -0
- package/dist/components/gantt/components/base-elements/range.js +51 -0
- package/dist/components/gantt/components/base-elements/range.js.map +1 -0
- package/dist/components/gantt/components/base-elements/use-point-element-layout/index.d.ts +12 -0
- package/dist/components/gantt/components/base-elements/use-point-element-layout/index.js +42 -0
- package/dist/components/gantt/components/base-elements/use-point-element-layout/index.js.map +1 -0
- package/dist/components/gantt/components/base-elements/use-range-element-layout/index.d.ts +23 -0
- package/dist/components/gantt/components/base-elements/use-range-element-layout/index.js +50 -0
- package/dist/components/gantt/components/base-elements/use-range-element-layout/index.js.map +1 -0
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.d.ts +23 -0
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.js +40 -0
- package/dist/components/gantt/components/containers/external/gantt-content-container/index.js.map +1 -0
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.d.ts +23 -0
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.js +33 -0
- package/dist/components/gantt/components/containers/external/gantt-panel-container/index.js.map +1 -0
- package/dist/components/gantt/components/containers/external/styles.module.css +32 -0
- package/dist/components/gantt/components/containers/internal/index.d.ts +22 -0
- package/dist/components/gantt/components/containers/internal/index.js +35 -0
- package/dist/components/gantt/components/containers/internal/index.js.map +1 -0
- package/dist/components/gantt/components/containers/internal/layout-container/index.d.ts +22 -0
- package/dist/components/gantt/components/containers/internal/layout-container/index.js +27 -0
- package/dist/components/gantt/components/containers/internal/layout-container/index.js.map +1 -0
- package/dist/components/gantt/components/containers/internal/styles.module.css +35 -0
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.d.ts +22 -0
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.js +38 -0
- package/dist/components/gantt/components/containers/internal/virtualized-content-height-container/index.js.map +1 -0
- package/dist/components/gantt/components/content-row/block.d.ts +27 -0
- package/dist/components/gantt/components/content-row/block.js +39 -0
- package/dist/components/gantt/components/content-row/block.js.map +1 -0
- package/dist/components/gantt/components/content-row/bracket.d.ts +23 -0
- package/dist/components/gantt/components/content-row/bracket.js +48 -0
- package/dist/components/gantt/components/content-row/bracket.js.map +1 -0
- package/dist/components/gantt/components/content-row/icon-marker.d.ts +27 -0
- package/dist/components/gantt/components/content-row/icon-marker.js +41 -0
- package/dist/components/gantt/components/content-row/icon-marker.js.map +1 -0
- package/dist/components/gantt/components/content-row/index.d.ts +24 -0
- package/dist/components/gantt/components/content-row/index.js +32 -0
- package/dist/components/gantt/components/content-row/index.js.map +1 -0
- package/dist/components/gantt/components/content-row/marker.d.ts +21 -0
- package/dist/components/gantt/components/content-row/marker.js +35 -0
- package/dist/components/gantt/components/content-row/marker.js.map +1 -0
- package/dist/components/gantt/components/content-row/spacer.d.ts +23 -0
- package/dist/components/gantt/components/content-row/spacer.js +35 -0
- package/dist/components/gantt/components/content-row/spacer.js.map +1 -0
- package/dist/components/gantt/components/content-row/styles.module.css +198 -0
- package/dist/components/gantt/components/content-row/use-elapsed-percentage/index.d.ts +19 -0
- package/dist/components/gantt/components/content-row/use-elapsed-percentage/index.js +27 -0
- package/dist/components/gantt/components/content-row/use-elapsed-percentage/index.js.map +1 -0
- package/dist/components/gantt/components/content-row/use-is-elapsed/index.d.ts +10 -0
- package/dist/components/gantt/components/content-row/use-is-elapsed/index.js +24 -0
- package/dist/components/gantt/components/content-row/use-is-elapsed/index.js.map +1 -0
- package/dist/components/gantt/components/current-time/index.d.ts +28 -0
- package/dist/components/gantt/components/current-time/index.js +63 -0
- package/dist/components/gantt/components/current-time/index.js.map +1 -0
- package/dist/components/gantt/components/current-time/styles.module.css +42 -0
- package/dist/components/gantt/components/current-time/use-current-time-layout/index.d.ts +31 -0
- package/dist/components/gantt/components/current-time/use-current-time-layout/index.js +58 -0
- package/dist/components/gantt/components/current-time/use-current-time-layout/index.js.map +1 -0
- package/dist/components/gantt/components/header/index.d.ts +25 -0
- package/dist/components/gantt/components/header/index.js +41 -0
- package/dist/components/gantt/components/header/index.js.map +1 -0
- package/dist/components/gantt/components/header/styles.module.css +23 -0
- package/dist/components/gantt/components/panel-row/index.d.ts +24 -0
- package/dist/components/gantt/components/panel-row/index.js +33 -0
- package/dist/components/gantt/components/panel-row/index.js.map +1 -0
- package/dist/components/gantt/components/panel-row/styles.module.css +24 -0
- package/dist/components/gantt/components/rows-virtualizer/index.d.ts +25 -0
- package/dist/components/gantt/components/rows-virtualizer/index.js +67 -0
- package/dist/components/gantt/components/rows-virtualizer/index.js.map +1 -0
- package/dist/components/gantt/components/rows-virtualizer/styles.module.css +30 -0
- package/dist/components/gantt/components/rows-virtualizer/use-rendered-rows/index.d.ts +29 -0
- package/dist/components/gantt/components/rows-virtualizer/use-rendered-rows/index.js +57 -0
- package/dist/components/gantt/components/rows-virtualizer/use-rendered-rows/index.js.map +1 -0
- package/dist/components/gantt/components/rows-virtualizer/use-scroll-sync/index.d.ts +10 -0
- package/dist/components/gantt/components/rows-virtualizer/use-scroll-sync/index.js +58 -0
- package/dist/components/gantt/components/rows-virtualizer/use-scroll-sync/index.js.map +1 -0
- package/dist/components/gantt/components/styles.module.css +46 -0
- package/dist/components/gantt/components/timeline/index.d.ts +19 -0
- package/dist/components/gantt/components/timeline/index.js +45 -0
- package/dist/components/gantt/components/timeline/index.js.map +1 -0
- package/dist/components/gantt/components/timeline/use-timeline-transform/index.d.ts +29 -0
- package/dist/components/gantt/components/timeline/use-timeline-transform/index.js +33 -0
- package/dist/components/gantt/components/timeline/use-timeline-transform/index.js.map +1 -0
- package/dist/components/gantt/components/timeline-chunk/index.d.ts +25 -0
- package/dist/components/gantt/components/timeline-chunk/index.js +43 -0
- package/dist/components/gantt/components/timeline-chunk/index.js.map +1 -0
- package/dist/components/gantt/constants.d.ts +31 -0
- package/dist/components/gantt/constants.js +57 -0
- package/dist/components/gantt/constants.js.map +1 -0
- package/dist/components/gantt/context/index.d.ts +60 -0
- package/dist/components/gantt/context/index.js +78 -0
- package/dist/components/gantt/context/index.js.map +1 -0
- package/dist/components/gantt/context/store/index.d.ts +45 -0
- package/dist/components/gantt/context/store/index.js +42 -0
- package/dist/components/gantt/context/store/index.js.map +1 -0
- package/dist/components/gantt/context/temporal-data/index.d.ts +48 -0
- package/dist/components/gantt/context/temporal-data/index.js +80 -0
- package/dist/components/gantt/context/temporal-data/index.js.map +1 -0
- package/dist/components/gantt/gantt.d.ts +50 -0
- package/dist/components/gantt/gantt.js +51 -0
- package/dist/components/gantt/gantt.js.map +1 -0
- package/dist/components/gantt/hooks/use-horizontal-scroll-update/index.d.ts +22 -0
- package/dist/components/gantt/hooks/use-horizontal-scroll-update/index.js +36 -0
- package/dist/components/gantt/hooks/use-horizontal-scroll-update/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-layout-subscription/index.d.ts +26 -0
- package/dist/components/gantt/hooks/use-layout-subscription/index.js +45 -0
- package/dist/components/gantt/hooks/use-layout-subscription/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-resize-intersection-effect/index.d.ts +26 -0
- package/dist/components/gantt/hooks/use-resize-intersection-effect/index.js +50 -0
- package/dist/components/gantt/hooks/use-resize-intersection-effect/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-root-element-height/index.d.ts +5 -0
- package/dist/components/gantt/hooks/use-root-element-height/index.js +24 -0
- package/dist/components/gantt/hooks/use-root-element-height/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-scrollbar-height/index.d.ts +5 -0
- package/dist/components/gantt/hooks/use-scrollbar-height/index.js +40 -0
- package/dist/components/gantt/hooks/use-scrollbar-height/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-total-data-region-thresholds/index.d.ts +19 -0
- package/dist/components/gantt/hooks/use-total-data-region-thresholds/index.js +87 -0
- package/dist/components/gantt/hooks/use-total-data-region-thresholds/index.js.map +1 -0
- package/dist/components/gantt/hooks/use-vertical-scroll-update/index.d.ts +22 -0
- package/dist/components/gantt/hooks/use-vertical-scroll-update/index.js +38 -0
- package/dist/components/gantt/hooks/use-vertical-scroll-update/index.js.map +1 -0
- package/dist/components/gantt/public-types.d.ts +31 -0
- package/dist/components/gantt/public-types.js +12 -0
- package/dist/components/gantt/store.d.ts +51 -0
- package/dist/components/gantt/store.js +46 -0
- package/dist/components/gantt/store.js.map +1 -0
- package/dist/components/gantt/styles.module.css +30 -0
- package/dist/components/gantt/types.d.ts +67 -0
- package/dist/components/gantt/types.js +12 -0
- package/dist/components/gantt/utils/conversions.d.ts +23 -0
- package/dist/components/gantt/utils/conversions.js +34 -0
- package/dist/components/gantt/utils/conversions.js.map +1 -0
- package/dist/components/gantt/utils/dates.d.ts +11 -0
- package/dist/components/gantt/utils/dates.js +41 -0
- package/dist/components/gantt/utils/dates.js.map +1 -0
- package/dist/components/gantt/utils/formatting.d.ts +5 -0
- package/dist/components/gantt/utils/formatting.js +54 -0
- package/dist/components/gantt/utils/formatting.js.map +1 -0
- package/dist/components/gantt/utils/generation.d.ts +19 -0
- package/dist/components/gantt/utils/generation.js +37 -0
- package/dist/components/gantt/utils/generation.js.map +1 -0
- package/dist/components/gantt/utils/helpers.d.ts +26 -0
- package/dist/components/gantt/utils/helpers.js +55 -0
- package/dist/components/gantt/utils/helpers.js.map +1 -0
- package/dist/components/gantt/utils/layout.d.ts +32 -0
- package/dist/components/gantt/utils/layout.js +55 -0
- package/dist/components/gantt/utils/layout.js.map +1 -0
- package/dist/components/gantt/utils/thresholds.d.ts +52 -0
- package/dist/components/gantt/utils/thresholds.js +116 -0
- package/dist/components/gantt/utils/thresholds.js.map +1 -0
- package/dist/components/hero/context.d.ts +2 -2
- package/dist/components/hero/index.d.ts +2 -2
- package/dist/components/hero/subtitle.d.ts +3 -3
- package/dist/components/hero/title.d.ts +2 -2
- package/dist/components/hotkey/context.d.ts +4 -4
- package/dist/components/hotkey/index.d.ts +2 -2
- package/dist/components/hotkey/set.d.ts +2 -2
- package/dist/components/icon/context.d.ts +4 -4
- package/dist/components/icon/index.d.ts +2 -2
- package/dist/components/input/context.d.ts +2 -2
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/kanban/card-body.d.ts +2 -2
- package/dist/components/kanban/card-header-actions.d.ts +2 -2
- package/dist/components/kanban/card-header-title.d.ts +2 -2
- package/dist/components/kanban/card-header.d.ts +2 -2
- package/dist/components/kanban/card.d.ts +2 -2
- package/dist/components/kanban/column-actions.d.ts +2 -2
- package/dist/components/kanban/column-container.d.ts +2 -2
- package/dist/components/kanban/column-content.d.ts +2 -2
- package/dist/components/kanban/column-header-actions.d.ts +2 -2
- package/dist/components/kanban/column-header-drag-handle.d.ts +2 -2
- package/dist/components/kanban/column-header-title.d.ts +2 -2
- package/dist/components/kanban/column-header.d.ts +2 -2
- package/dist/components/kanban/column.d.ts +2 -2
- package/dist/components/kanban/context.d.ts +2 -2
- package/dist/components/kanban/header-actions.d.ts +2 -2
- package/dist/components/kanban/header-search.d.ts +2 -2
- package/dist/components/kanban/header-title.d.ts +2 -2
- package/dist/components/kanban/header.d.ts +2 -2
- package/dist/components/kanban/kanban.d.ts +4 -4
- package/dist/components/kanban/styles.module.css +5 -0
- package/dist/components/label/context.d.ts +4 -4
- package/dist/components/label/index.d.ts +2 -2
- package/dist/components/lines/index.d.ts +2 -2
- package/dist/components/link/context.d.ts +2 -2
- package/dist/components/link/index.d.ts +2 -2
- package/dist/components/list/context.d.ts +2 -2
- package/dist/components/list/index.d.ts +2 -2
- package/dist/components/list/item-content.d.ts +2 -2
- package/dist/components/list/item-description.d.ts +2 -2
- package/dist/components/list/item-title.d.ts +2 -2
- package/dist/components/list/item.d.ts +2 -2
- package/dist/components/media-controls/context.d.ts +4 -4
- package/dist/components/media-controls/fullscreen-button.d.ts +2 -2
- package/dist/components/media-controls/index.d.ts +2 -2
- package/dist/components/media-controls/play-button.d.ts +2 -2
- package/dist/components/media-controls/playback-rate.d.ts +2 -2
- package/dist/components/media-controls/seek-button.d.ts +2 -2
- package/dist/components/media-controls/time-display.d.ts +2 -2
- package/dist/components/media-controls/time-range.d.ts +2 -2
- package/dist/components/media-controls/volume-slider.d.ts +2 -2
- package/dist/components/menu/context.d.ts +2 -2
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/menu/item-description.d.ts +2 -2
- package/dist/components/menu/item-label.d.ts +2 -2
- package/dist/components/menu/item.d.ts +2 -2
- package/dist/components/menu/section.d.ts +2 -2
- package/dist/components/menu/separator.d.ts +2 -2
- package/dist/components/menu/styles.module.css +12 -0
- package/dist/components/menu/submenu.d.ts +3 -3
- package/dist/components/notice/index.d.ts +2 -2
- package/dist/components/notice/index.js +1 -0
- package/dist/components/notice/index.js.map +1 -1
- package/dist/components/notice/list.js +10 -1
- package/dist/components/notice/list.js.map +1 -1
- package/dist/components/notice/styles.module.css +27 -0
- package/dist/components/options/context.d.ts +2 -2
- package/dist/components/options/index.d.ts +2 -2
- package/dist/components/options/item-content.d.ts +2 -2
- package/dist/components/options/item-description.d.ts +2 -2
- package/dist/components/options/item-label.d.ts +2 -2
- package/dist/components/options/item.d.ts +2 -2
- package/dist/components/options/section.d.ts +2 -2
- package/dist/components/pagination/context.d.ts +2 -2
- package/dist/components/pagination/index.d.ts +2 -2
- package/dist/components/pagination/next.d.ts +2 -2
- package/dist/components/pagination/pages.d.ts +2 -2
- package/dist/components/pagination/prev.d.ts +2 -2
- package/dist/components/popover/content.d.ts +2 -2
- package/dist/components/popover/footer.d.ts +2 -2
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/styles.module.css +34 -0
- package/dist/components/popover/title.d.ts +2 -2
- package/dist/components/popover/trigger.d.ts +2 -2
- package/dist/components/query-builder/action-element.d.ts +2 -2
- package/dist/components/query-builder/actions.d.ts +4 -4
- package/dist/components/query-builder/combinator-selector.d.ts +2 -2
- package/dist/components/query-builder/index.d.ts +2 -2
- package/dist/components/query-builder/rule-group.d.ts +4 -4
- package/dist/components/query-builder/rule.d.ts +2 -2
- package/dist/components/query-builder/styles.module.css +4 -1
- package/dist/components/query-builder/value-editor.d.ts +2 -2
- package/dist/components/query-builder/value-editor.js +1 -1
- package/dist/components/query-builder/value-editor.js.map +1 -1
- package/dist/components/query-builder/value-selector.d.ts +2 -2
- package/dist/components/query-builder/value-selector.js +1 -1
- package/dist/components/radio/context.d.ts +3 -3
- package/dist/components/radio/group.d.ts +2 -2
- package/dist/components/radio/index.d.ts +2 -2
- package/dist/components/search-field/context.d.ts +4 -4
- package/dist/components/search-field/index.d.ts +2 -2
- package/dist/components/select-field/context.d.ts +4 -4
- package/dist/components/select-field/index.d.ts +2 -2
- package/dist/components/sidenav/avatar.d.ts +2 -2
- package/dist/components/sidenav/content.d.ts +2 -2
- package/dist/components/sidenav/context.d.ts +2 -2
- package/dist/components/sidenav/footer.d.ts +2 -2
- package/dist/components/sidenav/header.d.ts +2 -2
- package/dist/components/sidenav/index.d.ts +2 -2
- package/dist/components/sidenav/item.d.ts +2 -2
- package/dist/components/sidenav/link.d.ts +2 -2
- package/dist/components/sidenav/menu-item.d.ts +2 -2
- package/dist/components/sidenav/menu.d.ts +2 -2
- package/dist/components/sidenav/styles.module.css +30 -10
- package/dist/components/sidenav/trigger.d.ts +2 -2
- package/dist/components/skeleton/index.d.ts +2 -2
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/status-indicator/index.d.ts +2 -2
- package/dist/components/switch/context.d.ts +4 -4
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/switch/styles.module.css +8 -0
- package/dist/components/table/body.d.ts +2 -2
- package/dist/components/table/cell.d.ts +2 -2
- package/dist/components/table/header-cell.d.ts +2 -2
- package/dist/components/table/header.d.ts +2 -2
- package/dist/components/table/index.d.ts +6 -2
- package/dist/components/table/index.js +19 -6
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/table/row.d.ts +2 -2
- package/dist/components/table/types.d.ts +17 -0
- package/dist/components/tabs/context.d.ts +6 -6
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tabs/list.d.ts +2 -2
- package/dist/components/tabs/panel.d.ts +2 -2
- package/dist/components/tabs/tab.d.ts +2 -2
- package/dist/components/text-area-field/context.d.ts +4 -4
- package/dist/components/text-area-field/index.d.ts +2 -2
- package/dist/components/text-field/context.d.ts +4 -4
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/time-field/index.d.ts +2 -2
- package/dist/components/tooltip/context.d.ts +2 -2
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/styles.module.css +35 -0
- package/dist/components/tooltip/trigger.d.ts +2 -2
- package/dist/components/tree/context.d.ts +3 -3
- package/dist/components/tree/index.d.ts +2 -2
- package/dist/components/tree/index.js +20 -10
- package/dist/components/tree/index.js.map +1 -1
- package/dist/components/tree/item-actions.d.ts +2 -2
- package/dist/components/tree/item-content.d.ts +2 -2
- package/dist/components/tree/item-content.js +3 -2
- package/dist/components/tree/item-content.js.map +1 -1
- package/dist/components/tree/item-description.d.ts +2 -2
- package/dist/components/tree/item-label.d.ts +2 -2
- package/dist/components/tree/item-prefix-icon.d.ts +2 -2
- package/dist/components/tree/item.d.ts +2 -2
- package/dist/components/tree/lines.d.ts +2 -2
- package/dist/components/tree/types.d.ts +1 -0
- package/dist/components/video/index.d.ts +2 -2
- package/dist/components/view-stack/context.d.ts +2 -2
- package/dist/components/view-stack/index.d.ts +2 -2
- package/dist/components/view-stack/trigger.d.ts +2 -2
- package/dist/components/view-stack/view.d.ts +2 -2
- package/dist/hooks/use-tree/actions/cache.d.ts +20 -3
- package/dist/hooks/use-tree/actions/cache.js +110 -2
- package/dist/hooks/use-tree/actions/cache.js.map +1 -1
- package/dist/hooks/use-tree/actions/index.d.ts +2 -1
- package/dist/hooks/use-tree/actions/index.js +70 -11
- package/dist/hooks/use-tree/actions/index.js.map +1 -1
- package/dist/hooks/use-tree/state/index.d.ts +20 -1
- package/dist/hooks/use-tree/state/index.js +22 -2
- package/dist/hooks/use-tree/state/index.js.map +1 -1
- package/dist/hooks/use-tree/types.d.ts +14 -0
- package/dist/index.d.ts +24 -5
- package/dist/index.js +27 -10
- package/dist/providers/theme-provider.d.ts +2 -2
- package/package.json +68 -10
|
@@ -48,7 +48,7 @@ import Show from "@accelint/icons/show";
|
|
|
48
48
|
* @returns The rendered TreeItemContent component.
|
|
49
49
|
*/
|
|
50
50
|
function TreeItemContent({ children }) {
|
|
51
|
-
const { showVisibility, variant, visibleKeys, onVisibilityChange } = useContext(TreeContext);
|
|
51
|
+
const { showVisibility, variant, visibleKeys, indeterminateKeys, onVisibilityChange } = useContext(TreeContext);
|
|
52
52
|
const { isVisible, isViewable, ancestors } = useContext(TreeItemContext);
|
|
53
53
|
const size = variant === "cozy" ? "medium" : "small";
|
|
54
54
|
return /* @__PURE__ */ jsx(TreeItemContent$1, { children: (renderProps) => {
|
|
@@ -103,7 +103,8 @@ function TreeItemContent({ children }) {
|
|
|
103
103
|
shouldShowSelection && /* @__PURE__ */ jsx(Checkbox$1, {
|
|
104
104
|
slot: "selection",
|
|
105
105
|
isSelected,
|
|
106
|
-
isDisabled
|
|
106
|
+
isDisabled,
|
|
107
|
+
isIndeterminate: indeterminateKeys?.has(id)
|
|
107
108
|
}),
|
|
108
109
|
allowsDragging && /* @__PURE__ */ jsx(Button$1, {
|
|
109
110
|
slot: "drag",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-content.js","names":["AriaTreeItemContent","Button","Checkbox"],"sources":["../../../src/components/tree/item-content.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport ChevronDown from '@accelint/icons/chevron-down';\nimport ChevronUp from '@accelint/icons/chevron-up';\nimport DragVert from '@accelint/icons/drag-vert';\nimport Hide from '@accelint/icons/hide';\nimport Show from '@accelint/icons/show';\nimport { useContext } from 'react';\nimport { TreeItemContent as AriaTreeItemContent } from 'react-aria-components';\nimport { Button } from '../button';\nimport { Checkbox } from '../checkbox';\nimport { Icon } from '../icon';\nimport { IconProvider } from '../icon/context';\nimport { TreeContext, TreeItemContext } from './context';\nimport { TreeLines } from './lines';\nimport styles from './styles.module.css';\nimport type { Key } from '@react-types/shared';\nimport type { TreeItemContentProps } from './types';\n\n/**\n * TreeItemContent - Renders the display content of a tree node\n *\n * @example\n * ```tsx\n * <TreeItem id=\"node\" textValue=\"Node\">\n * <TreeItemContent>\n * <TreeItemPrefixIcon><Folder /></TreeItemPrefixIcon>\n * <TreeItemLabel>Folder Name</TreeItemLabel>\n * <TreeItemDescription>Contains 5 items</TreeItemDescription>\n * </TreeItemContent>\n * </TreeItem>\n * ```\n *\n * @param props - {@link TreeItemContentProps}\n * @param props.children - Content to render, or a render function receiving TreeItemContentRenderProps.\n * @returns The rendered TreeItemContent component.\n */\nexport function TreeItemContent({ children }: TreeItemContentProps) {\n const {
|
|
1
|
+
{"version":3,"file":"item-content.js","names":["AriaTreeItemContent","Button","Checkbox"],"sources":["../../../src/components/tree/item-content.tsx"],"sourcesContent":["/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { clsx } from '@accelint/design-foundation/lib/utils';\nimport ChevronDown from '@accelint/icons/chevron-down';\nimport ChevronUp from '@accelint/icons/chevron-up';\nimport DragVert from '@accelint/icons/drag-vert';\nimport Hide from '@accelint/icons/hide';\nimport Show from '@accelint/icons/show';\nimport { useContext } from 'react';\nimport { TreeItemContent as AriaTreeItemContent } from 'react-aria-components';\nimport { Button } from '../button';\nimport { Checkbox } from '../checkbox';\nimport { Icon } from '../icon';\nimport { IconProvider } from '../icon/context';\nimport { TreeContext, TreeItemContext } from './context';\nimport { TreeLines } from './lines';\nimport styles from './styles.module.css';\nimport type { Key } from '@react-types/shared';\nimport type { TreeItemContentProps } from './types';\n\n/**\n * TreeItemContent - Renders the display content of a tree node\n *\n * @example\n * ```tsx\n * <TreeItem id=\"node\" textValue=\"Node\">\n * <TreeItemContent>\n * <TreeItemPrefixIcon><Folder /></TreeItemPrefixIcon>\n * <TreeItemLabel>Folder Name</TreeItemLabel>\n * <TreeItemDescription>Contains 5 items</TreeItemDescription>\n * </TreeItemContent>\n * </TreeItem>\n * ```\n *\n * @param props - {@link TreeItemContentProps}\n * @param props.children - Content to render, or a render function receiving TreeItemContentRenderProps.\n * @returns The rendered TreeItemContent component.\n */\nexport function TreeItemContent({ children }: TreeItemContentProps) {\n const {\n showVisibility,\n variant,\n visibleKeys,\n indeterminateKeys,\n onVisibilityChange,\n } = useContext(TreeContext);\n const { isVisible, isViewable, ancestors } = useContext(TreeItemContext);\n const size = variant === 'cozy' ? 'medium' : 'small';\n\n return (\n <AriaTreeItemContent>\n {(renderProps) => {\n const {\n id,\n allowsDragging,\n hasChildItems,\n level,\n selectionBehavior,\n selectionMode,\n state,\n isDisabled,\n isExpanded,\n isSelected,\n } = renderProps;\n\n const item = state.collection.getItem(id);\n const isLastOfSet = !item?.nextKey;\n\n // Determine if ancestors are last of set (excludes current item)\n const ancestorLastOfSet = ancestors.slice(0, -1).map((ancestorKey) => {\n const ancestorItem = state.collection.getItem(ancestorKey);\n return !ancestorItem?.nextKey;\n });\n\n const shouldShowSelection =\n selectionBehavior === 'toggle' && selectionMode !== 'none';\n\n const handlePress = () => {\n const keys = new Set<Key>(visibleKeys);\n visibleKeys?.has(id) ? keys.delete(id) : keys.add(id);\n onVisibilityChange?.(keys);\n };\n\n return (\n <IconProvider size={size}>\n <div\n className={clsx('group', styles.content, styles[variant])}\n data-last-of-set={isLastOfSet}\n >\n {showVisibility && (\n <Button\n variant='icon'\n color='mono-bold'\n size={size}\n onPress={handlePress}\n isDisabled={isDisabled}\n className={styles.visibility}\n >\n <Icon>{isVisible ? <Show /> : <Hide />}</Icon>\n </Button>\n )}\n {level > 1 && (\n <TreeLines\n level={level}\n isLastOfSet={isLastOfSet}\n ancestorLastOfSet={ancestorLastOfSet}\n />\n )}\n {hasChildItems && (\n <Button\n slot='chevron'\n variant='icon'\n size={size}\n className={styles.expansion}\n >\n <Icon>{isExpanded ? <ChevronDown /> : <ChevronUp />}</Icon>\n </Button>\n )}\n <div className={clsx(styles.display, styles[variant])}>\n {typeof children === 'function'\n ? children({\n ...renderProps,\n variant,\n isVisible,\n isViewable: isViewable,\n defaultChildren: null,\n })\n : children}\n </div>\n {shouldShowSelection && (\n <Checkbox\n slot='selection'\n isSelected={isSelected}\n isDisabled={isDisabled}\n isIndeterminate={indeterminateKeys?.has(id)}\n />\n )}\n {allowsDragging && (\n <Button\n slot='drag'\n variant='icon'\n size={size}\n isDisabled={isDisabled}\n className={styles.drag}\n >\n <Icon>\n <DragVert />\n </Icon>\n </Button>\n )}\n </div>\n </IconProvider>\n );\n }}\n </AriaTreeItemContent>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,gBAAgB,EAAE,YAAkC;CAClE,MAAM,EACJ,gBACA,SACA,aACA,mBACA,uBACE,WAAW,YAAY;CAC3B,MAAM,EAAE,WAAW,YAAY,cAAc,WAAW,gBAAgB;CACxE,MAAM,OAAO,YAAY,SAAS,WAAW;AAE7C,QACE,oBAACA,gCACG,gBAAgB;EAChB,MAAM,EACJ,IACA,gBACA,eACA,OACA,mBACA,eACA,OACA,YACA,YACA,eACE;EAGJ,MAAM,cAAc,CADP,MAAM,WAAW,QAAQ,GAAG,EACd;EAG3B,MAAM,oBAAoB,UAAU,MAAM,GAAG,GAAG,CAAC,KAAK,gBAAgB;AAEpE,UAAO,CADc,MAAM,WAAW,QAAQ,YAAY,EACpC;IACtB;EAEF,MAAM,sBACJ,sBAAsB,YAAY,kBAAkB;EAEtD,MAAM,oBAAoB;GACxB,MAAM,OAAO,IAAI,IAAS,YAAY;AACtC,gBAAa,IAAI,GAAG,GAAG,KAAK,OAAO,GAAG,GAAG,KAAK,IAAI,GAAG;AACrD,wBAAqB,KAAK;;AAG5B,SACE,oBAAC;GAAmB;aAClB,qBAAC;IACC,WAAW,KAAK,SAAS,OAAO,SAAS,OAAO,SAAS;IACzD,oBAAkB;;KAEjB,kBACC,oBAACC;MACC,SAAQ;MACR,OAAM;MACA;MACN,SAAS;MACG;MACZ,WAAW,OAAO;gBAElB,oBAAC,kBAAM,YAAY,oBAAC,SAAO,GAAG,oBAAC,SAAO,GAAQ;OACvC;KAEV,QAAQ,KACP,oBAAC;MACQ;MACM;MACM;OACnB;KAEH,iBACC,oBAACA;MACC,MAAK;MACL,SAAQ;MACF;MACN,WAAW,OAAO;gBAElB,oBAAC,kBAAM,aAAa,oBAAC,gBAAc,GAAG,oBAAC,cAAY,GAAQ;OACpD;KAEX,oBAAC;MAAI,WAAW,KAAK,OAAO,SAAS,OAAO,SAAS;gBAClD,OAAO,aAAa,aACjB,SAAS;OACP,GAAG;OACH;OACA;OACY;OACZ,iBAAiB;OAClB,CAAC,GACF;OACA;KACL,uBACC,oBAACC;MACC,MAAK;MACO;MACA;MACZ,iBAAiB,mBAAmB,IAAI,GAAG;OAC3C;KAEH,kBACC,oBAACD;MACC,MAAK;MACL,SAAQ;MACF;MACM;MACZ,WAAW,OAAO;gBAElB,oBAAC,kBACC,oBAAC,aAAW,GACP;OACA;;KAEP;IACO;KAGC"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { TextProps } from "react-aria-components";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react_jsx_runtime187 from "react/jsx-runtime";
|
|
15
15
|
|
|
16
16
|
//#region src/components/tree/item-description.d.ts
|
|
17
17
|
/**
|
|
@@ -33,7 +33,7 @@ import * as react_jsx_runtime200 from "react/jsx-runtime";
|
|
|
33
33
|
declare function TreeItemDescription({
|
|
34
34
|
children,
|
|
35
35
|
className
|
|
36
|
-
}: TextProps):
|
|
36
|
+
}: TextProps): react_jsx_runtime187.JSX.Element | null;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { TreeItemDescription };
|
|
39
39
|
//# sourceMappingURL=item-description.d.ts.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { TextProps } from "react-aria-components";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react_jsx_runtime188 from "react/jsx-runtime";
|
|
15
15
|
|
|
16
16
|
//#region src/components/tree/item-label.d.ts
|
|
17
17
|
/**
|
|
@@ -33,7 +33,7 @@ import * as react_jsx_runtime197 from "react/jsx-runtime";
|
|
|
33
33
|
declare function TreeItemLabel({
|
|
34
34
|
children,
|
|
35
35
|
className
|
|
36
|
-
}: TextProps):
|
|
36
|
+
}: TextProps): react_jsx_runtime188.JSX.Element;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { TreeItemLabel };
|
|
39
39
|
//# sourceMappingURL=item-label.d.ts.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { IconProps } from "../icon/types.js";
|
|
14
|
-
import * as
|
|
14
|
+
import * as react_jsx_runtime189 from "react/jsx-runtime";
|
|
15
15
|
|
|
16
16
|
//#region src/components/tree/item-prefix-icon.d.ts
|
|
17
17
|
/**
|
|
@@ -33,7 +33,7 @@ import * as react_jsx_runtime195 from "react/jsx-runtime";
|
|
|
33
33
|
declare function TreeItemPrefixIcon({
|
|
34
34
|
children,
|
|
35
35
|
className
|
|
36
|
-
}: IconProps):
|
|
36
|
+
}: IconProps): react_jsx_runtime189.JSX.Element;
|
|
37
37
|
//#endregion
|
|
38
38
|
export { TreeItemPrefixIcon };
|
|
39
39
|
//# sourceMappingURL=item-prefix-icon.d.ts.map
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { TreeItemProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime190 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/tree/item.d.ts
|
|
18
18
|
|
|
@@ -44,7 +44,7 @@ declare function TreeItem({
|
|
|
44
44
|
className,
|
|
45
45
|
id,
|
|
46
46
|
...rest
|
|
47
|
-
}: TreeItemProps):
|
|
47
|
+
}: TreeItemProps): react_jsx_runtime190.JSX.Element;
|
|
48
48
|
//#endregion
|
|
49
49
|
export { TreeItem };
|
|
50
50
|
//# sourceMappingURL=item.d.ts.map
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import * as
|
|
13
|
+
import * as react44 from "react";
|
|
14
14
|
|
|
15
15
|
//#region src/components/tree/lines.d.ts
|
|
16
16
|
/**
|
|
@@ -22,7 +22,7 @@ import * as react52 from "react";
|
|
|
22
22
|
* @param props.ancestorLastOfSet - Array tracking which ancestors are last of set at each level.
|
|
23
23
|
* @returns An array of Line components representing the tree structure.
|
|
24
24
|
*/
|
|
25
|
-
declare const TreeLines:
|
|
25
|
+
declare const TreeLines: react44.NamedExoticComponent<{
|
|
26
26
|
level: number;
|
|
27
27
|
isLastOfSet: boolean;
|
|
28
28
|
ancestorLastOfSet: boolean[];
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { VideoProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime193 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/video/index.d.ts
|
|
18
18
|
|
|
@@ -91,7 +91,7 @@ declare function Video({
|
|
|
91
91
|
noMutedPref,
|
|
92
92
|
lang,
|
|
93
93
|
...rest
|
|
94
|
-
}: VideoProps):
|
|
94
|
+
}: VideoProps): react_jsx_runtime193.JSX.Element;
|
|
95
95
|
//#endregion
|
|
96
96
|
export { Video };
|
|
97
97
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
|
|
13
13
|
import { ViewStackContextValue } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react47 from "react";
|
|
16
16
|
import { UniqueId } from "@accelint/core";
|
|
17
17
|
|
|
18
18
|
//#region src/components/view-stack/context.d.ts
|
|
19
19
|
/** Context for sharing state across ViewStack components */
|
|
20
|
-
declare const ViewStackContext:
|
|
20
|
+
declare const ViewStackContext: react47.Context<ViewStackContextValue>;
|
|
21
21
|
/** Event handlers for ViewStack events */
|
|
22
22
|
declare const ViewStackEventHandlers: {
|
|
23
23
|
readonly back: (stack: UniqueId) => void;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { ViewStackProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime232 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/view-stack/index.d.ts
|
|
18
18
|
|
|
@@ -47,7 +47,7 @@ declare function ViewStack({
|
|
|
47
47
|
children,
|
|
48
48
|
defaultView,
|
|
49
49
|
onChange
|
|
50
|
-
}: ViewStackProps):
|
|
50
|
+
}: ViewStackProps): react_jsx_runtime232.JSX.Element;
|
|
51
51
|
//#endregion
|
|
52
52
|
export { ViewStack };
|
|
53
53
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { ViewStackTriggerProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime234 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/view-stack/trigger.d.ts
|
|
18
18
|
|
|
@@ -45,7 +45,7 @@ import * as react_jsx_runtime187 from "react/jsx-runtime";
|
|
|
45
45
|
declare function ViewStackTrigger({
|
|
46
46
|
children,
|
|
47
47
|
for: types
|
|
48
|
-
}: ViewStackTriggerProps):
|
|
48
|
+
}: ViewStackTriggerProps): react_jsx_runtime234.JSX.Element;
|
|
49
49
|
//#endregion
|
|
50
50
|
export { ViewStackTrigger };
|
|
51
51
|
//# sourceMappingURL=trigger.d.ts.map
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { ViewStackViewProps } from "./types.js";
|
|
14
14
|
import "client-only";
|
|
15
|
-
import * as
|
|
15
|
+
import * as react_jsx_runtime191 from "react/jsx-runtime";
|
|
16
16
|
|
|
17
17
|
//#region src/components/view-stack/view.d.ts
|
|
18
18
|
|
|
@@ -43,7 +43,7 @@ import * as react_jsx_runtime188 from "react/jsx-runtime";
|
|
|
43
43
|
declare function ViewStackView({
|
|
44
44
|
id,
|
|
45
45
|
children
|
|
46
|
-
}: ViewStackViewProps):
|
|
46
|
+
}: ViewStackViewProps): react_jsx_runtime191.JSX.Element | null;
|
|
47
47
|
//#endregion
|
|
48
48
|
export { ViewStackView };
|
|
49
49
|
//# sourceMappingURL=view.d.ts.map
|
|
@@ -71,12 +71,13 @@ declare class Cache<T> {
|
|
|
71
71
|
toTree(deriveVisible?: boolean): TreeNode<T>[];
|
|
72
72
|
/**
|
|
73
73
|
* CACHE FUNCTIONS
|
|
74
|
-
* These manage cache operations. No cache operations should ever be done
|
|
75
|
-
* outside this file.
|
|
74
|
+
* These are the public functions to manage cache operations. No cache operations should ever be done
|
|
75
|
+
* outside this file since it risks corruption of the data.
|
|
76
76
|
**/
|
|
77
77
|
getNode(key: Key): TreeNode<T>;
|
|
78
78
|
getAllKeys(): MapIterator<Key>;
|
|
79
79
|
getAllNodes(): MapIterator<CacheTreeNode<T>>;
|
|
80
|
+
getParentForPosition(target: Key | null, position: 'before' | 'after'): Key | null;
|
|
80
81
|
setNode(key: Key, node: TreeNode<T>): void;
|
|
81
82
|
setAllNodes({
|
|
82
83
|
parentKey,
|
|
@@ -88,7 +89,23 @@ declare class Cache<T> {
|
|
|
88
89
|
insertNode(parentKey: Key | null, node: TreeNode<T>, idx: number): void;
|
|
89
90
|
moveNodes(target: Key | null, nodes: Set<Key>, position: 'before' | 'after'): void;
|
|
90
91
|
moveNode(parentKey: Key | null, key: Key, idx: number): void;
|
|
92
|
+
/**
|
|
93
|
+
* Cascade selection down through descendants
|
|
94
|
+
*/
|
|
95
|
+
cascadeSelection(key: Key, selected: boolean): void;
|
|
96
|
+
/**
|
|
97
|
+
* Bubble up selection state through ancestors
|
|
98
|
+
*/
|
|
99
|
+
bubbleUpSelection(key: Key): void;
|
|
100
|
+
/**
|
|
101
|
+
* Compute selection state for a node based on its children
|
|
102
|
+
*/
|
|
103
|
+
private computeSelectionState;
|
|
104
|
+
/**
|
|
105
|
+
* Sync cascade state for parents after a move operation
|
|
106
|
+
*/
|
|
107
|
+
syncParentsAfterMove(oldParents: Set<Key>, newParent: Key | null): void;
|
|
91
108
|
}
|
|
92
109
|
//#endregion
|
|
93
|
-
export { Cache };
|
|
110
|
+
export { Cache, CacheTreeNode };
|
|
94
111
|
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -41,6 +41,7 @@ var Cache = class {
|
|
|
41
41
|
isSelected: false,
|
|
42
42
|
isVisible: false,
|
|
43
43
|
isVisibleComputed: false,
|
|
44
|
+
isIndeterminate: false,
|
|
44
45
|
...rest,
|
|
45
46
|
parentKey,
|
|
46
47
|
...children ? { children: children.map((child) => child.key) } : {}
|
|
@@ -56,6 +57,7 @@ var Cache = class {
|
|
|
56
57
|
return cache;
|
|
57
58
|
}
|
|
58
59
|
get(key) {
|
|
60
|
+
if (key == null) throw new Error(`Key is ${key} (null/undefined) - this is invalid`);
|
|
59
61
|
const node = this.cache.lookup.get(key);
|
|
60
62
|
if (node === void 0) throw new Error(`Key of ${key} does not exist in tree`);
|
|
61
63
|
return node;
|
|
@@ -183,8 +185,8 @@ var Cache = class {
|
|
|
183
185
|
}
|
|
184
186
|
/**
|
|
185
187
|
* CACHE FUNCTIONS
|
|
186
|
-
* These manage cache operations. No cache operations should ever be done
|
|
187
|
-
* outside this file.
|
|
188
|
+
* These are the public functions to manage cache operations. No cache operations should ever be done
|
|
189
|
+
* outside this file since it risks corruption of the data.
|
|
188
190
|
**/
|
|
189
191
|
getNode(key) {
|
|
190
192
|
const node = this.get(key);
|
|
@@ -199,6 +201,10 @@ var Cache = class {
|
|
|
199
201
|
getAllNodes() {
|
|
200
202
|
return this.cache.lookup.values();
|
|
201
203
|
}
|
|
204
|
+
getParentForPosition(target, position) {
|
|
205
|
+
const { parentKey } = this.parentOrSibling(target, position);
|
|
206
|
+
return parentKey;
|
|
207
|
+
}
|
|
202
208
|
setNode(key, node) {
|
|
203
209
|
this.set(key, {
|
|
204
210
|
...node,
|
|
@@ -231,6 +237,7 @@ var Cache = class {
|
|
|
231
237
|
isSelected: false,
|
|
232
238
|
isVisible: false,
|
|
233
239
|
isVisibleComputed: false,
|
|
240
|
+
isIndeterminate: false,
|
|
234
241
|
...rest,
|
|
235
242
|
parentKey,
|
|
236
243
|
...children ? { children: children.map((child) => child.key) } : {}
|
|
@@ -248,6 +255,107 @@ var Cache = class {
|
|
|
248
255
|
node.parentKey ? this.removeFromParent(node.parentKey, key) : this.removeFromRoot(key);
|
|
249
256
|
parentKey ? this.addToParent(parentKey, key, idx) : this.addToRoot(key, idx);
|
|
250
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* Cascade selection down through descendants
|
|
260
|
+
*/
|
|
261
|
+
cascadeSelection(key, selected) {
|
|
262
|
+
try {
|
|
263
|
+
const node = this.get(key);
|
|
264
|
+
if (!node.isDisabled) this.set(key, {
|
|
265
|
+
...node,
|
|
266
|
+
isSelected: selected,
|
|
267
|
+
isIndeterminate: false
|
|
268
|
+
});
|
|
269
|
+
if (node.children) {
|
|
270
|
+
for (const childKey of node.children) if (childKey != null) this.cascadeSelection(childKey, selected);
|
|
271
|
+
}
|
|
272
|
+
} catch {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Bubble up selection state through ancestors
|
|
278
|
+
*/
|
|
279
|
+
bubbleUpSelection(key) {
|
|
280
|
+
try {
|
|
281
|
+
let current = this.get(key);
|
|
282
|
+
while (current.parentKey) {
|
|
283
|
+
const parent = this.get(current.parentKey);
|
|
284
|
+
const newState = this.computeSelectionState(parent);
|
|
285
|
+
if (parent.isSelected === newState.isSelected && parent.isIndeterminate === newState.isIndeterminate) break;
|
|
286
|
+
this.set(parent.key, {
|
|
287
|
+
...parent,
|
|
288
|
+
isSelected: newState.isSelected,
|
|
289
|
+
isIndeterminate: newState.isIndeterminate
|
|
290
|
+
});
|
|
291
|
+
current = parent;
|
|
292
|
+
}
|
|
293
|
+
} catch {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Compute selection state for a node based on its children
|
|
299
|
+
*/
|
|
300
|
+
computeSelectionState(node) {
|
|
301
|
+
if (!node.children || node.children.length === 0) return {
|
|
302
|
+
isSelected: node.isSelected ?? false,
|
|
303
|
+
isIndeterminate: false
|
|
304
|
+
};
|
|
305
|
+
const selectableChildren = node.children.filter((k) => {
|
|
306
|
+
try {
|
|
307
|
+
return !this.get(k).isDisabled;
|
|
308
|
+
} catch {
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
}).map((k) => this.get(k));
|
|
312
|
+
if (selectableChildren.length === 0) return {
|
|
313
|
+
isSelected: node.isSelected ?? false,
|
|
314
|
+
isIndeterminate: false
|
|
315
|
+
};
|
|
316
|
+
const selectedCount = selectableChildren.filter((c) => c.isSelected).length;
|
|
317
|
+
if (selectableChildren.filter((c) => c.isIndeterminate).length > 0) return {
|
|
318
|
+
isSelected: false,
|
|
319
|
+
isIndeterminate: true
|
|
320
|
+
};
|
|
321
|
+
if (selectedCount === selectableChildren.length) return {
|
|
322
|
+
isSelected: true,
|
|
323
|
+
isIndeterminate: false
|
|
324
|
+
};
|
|
325
|
+
if (selectedCount === 0) return {
|
|
326
|
+
isSelected: false,
|
|
327
|
+
isIndeterminate: false
|
|
328
|
+
};
|
|
329
|
+
return {
|
|
330
|
+
isSelected: false,
|
|
331
|
+
isIndeterminate: true
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Sync cascade state for parents after a move operation
|
|
336
|
+
*/
|
|
337
|
+
syncParentsAfterMove(oldParents, newParent) {
|
|
338
|
+
for (const parentKey of oldParents) try {
|
|
339
|
+
const parent = this.get(parentKey);
|
|
340
|
+
const newState = this.computeSelectionState(parent);
|
|
341
|
+
this.set(parentKey, {
|
|
342
|
+
...parent,
|
|
343
|
+
isSelected: newState.isSelected,
|
|
344
|
+
isIndeterminate: newState.isIndeterminate
|
|
345
|
+
});
|
|
346
|
+
if (parent.parentKey) this.bubbleUpSelection(parentKey);
|
|
347
|
+
} catch {}
|
|
348
|
+
if (newParent) try {
|
|
349
|
+
const parent = this.get(newParent);
|
|
350
|
+
const newState = this.computeSelectionState(parent);
|
|
351
|
+
this.set(newParent, {
|
|
352
|
+
...parent,
|
|
353
|
+
isSelected: newState.isSelected,
|
|
354
|
+
isIndeterminate: newState.isIndeterminate
|
|
355
|
+
});
|
|
356
|
+
if (parent.parentKey) this.bubbleUpSelection(newParent);
|
|
357
|
+
} catch {}
|
|
358
|
+
}
|
|
251
359
|
};
|
|
252
360
|
|
|
253
361
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","names":["index: number","parentKey: Key | null","key"],"sources":["../../../../src/hooks/use-tree/actions/cache.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type { Key } from '@react-types/shared';\nimport type { TreeNode } from '../types';\n\ntype CacheTreeNode<T> = Omit<TreeNode<T>, 'children'> & {\n children?: Key[];\n};\n\n/**\n * This is a cache created only for performance reasons and is considered\n * to be only a temporary mirror of the data. The data is *always* correct\n * cache should be updated according to the data, only. If the data and\n * the cache do not match, the cache is invalidated and rebuilt.\n *\n * This will initialize once on load with data, then\n * updated with each tree operation.\n */\nexport class Cache<T> {\n protected cache: { lookup: Map<Key, CacheTreeNode<T>>; roots: Key[] } = {\n lookup: new Map(),\n roots: [],\n };\n\n constructor(nodes: TreeNode<T>[] = []) {\n this.rebuild(nodes);\n }\n\n /**\n * Recursively creates the cache object from tree data\n */\n rebuild(\n nodes: TreeNode<T>[],\n lookup: Map<Key, CacheTreeNode<T>> = new Map(),\n parentKey: Key | null = null,\n ) {\n nodes.forEach((node) => {\n const { children, ...rest } = node;\n\n lookup.set(node.key, {\n isDisabled: false,\n isExpanded: false,\n isSelected: false,\n isVisible: false,\n isVisibleComputed: false,\n ...rest,\n parentKey,\n ...(children ? { children: children.map((child) => child.key) } : {}),\n });\n\n if (node.children) {\n this.rebuild(node.children, lookup, node.key);\n }\n });\n\n const cache = { lookup, roots: nodes.map((node) => node.key) };\n\n if (!parentKey) {\n this.cache = cache;\n }\n\n this.deriveVisibility();\n return cache;\n }\n\n protected get(key: Key) {\n const node = this.cache.lookup.get(key);\n\n if (node === undefined) {\n throw new Error(`Key of ${key} does not exist in tree`);\n }\n\n return node;\n }\n\n protected set(key: Key, node: CacheTreeNode<T>) {\n this.cache.lookup.set(key, node);\n }\n\n protected delete(key: Key) {\n this.cache.lookup.delete(key);\n }\n\n protected addToParent(parentKey: Key, childKey: Key, idx: number) {\n const parent = this.get(parentKey);\n const child = this.get(childKey);\n const index = Math.max(0, idx);\n\n this.set(childKey, {\n ...child,\n parentKey,\n });\n\n const children = (parent.children ?? []).slice(0);\n\n children.splice(index, 0, childKey);\n\n this.set(parentKey, {\n ...parent,\n children,\n });\n }\n\n protected addToRoot(key: Key, idx: number) {\n const node = this.get(key);\n const index = Math.max(0, idx);\n\n this.set(key, {\n ...node,\n parentKey: null,\n });\n\n this.cache.roots.splice(index, 0, key);\n }\n\n protected removeFromParent(parentKey: Key, childKey: Key) {\n const parent = this.get(parentKey);\n const child = this.get(childKey);\n\n this.set(childKey, {\n ...child,\n parentKey: null,\n });\n\n this.cache.lookup.set(parentKey, {\n ...parent,\n children: parent.children?.filter((key) => key !== childKey),\n });\n }\n\n protected removeFromRoot(key: Key) {\n const node = this.get(key);\n const idx = this.cache.roots.indexOf(key);\n\n if (idx >= 0) {\n this.set(key, {\n ...node,\n parentKey: null,\n });\n\n this.cache.roots.splice(idx, 1);\n }\n }\n\n protected parentOrSibling(target: Key | null, position: 'before' | 'after') {\n let index: number;\n let parentKey: Key | null = null;\n\n if (target === null) {\n index = position === 'before' ? 0 : this.cache.roots.length;\n } else {\n const targetNode = this.get(target);\n\n if (targetNode.parentKey) {\n const parent = this.get(targetNode.parentKey);\n\n parentKey = parent.key;\n index = parent.children?.indexOf(target) ?? 0;\n } else {\n index = this.cache.roots.indexOf(target);\n }\n }\n\n return { parentKey, index };\n }\n\n protected traverse(key: Key) {\n const node = this.get(key);\n\n this.cache.lookup.set(key, {\n ...node,\n isVisibleComputed: this.calculateVisibility(key),\n });\n\n node.children?.map((child) => this.traverse(child));\n }\n\n protected calculateVisibility(key: Key) {\n let current = this.get(key);\n const ancestry = [current];\n\n while (current.parentKey) {\n const parent = this.get(current.parentKey);\n if (parent) {\n ancestry.push(parent);\n }\n current = parent;\n }\n\n return ancestry.every((n) => n.isVisible);\n }\n\n protected deriveVisibility() {\n return this.cache.roots.map((key) => this.traverse(key));\n }\n /**\n * Recursively builds a TreeNode from a key\n *\n * @param key\n */\n protected buildNode(key: Key): TreeNode<T> {\n const node = this.get(key);\n\n const children = (node.children ?? []).reduce(\n (acc: TreeNode<T>[], child) => {\n const childNode = this.cache.lookup.get(child);\n\n if (childNode && childNode.parentKey === key) {\n acc.push(this.buildNode(child));\n }\n\n return acc;\n },\n [],\n );\n\n return {\n ...node,\n children,\n };\n }\n\n /**\n * Builds a tree structure from cache\n *\n * TODO: optimization - rebuild only from change to root\n * Rebuild only from the changed node up the tree to avoid\n * rebuilding the entire tree\n *\n * @param deriveVisible boolean - if true, will recompute visibility for nodes based on ancestry\n */\n toTree(deriveVisible?: boolean): TreeNode<T>[] {\n if (deriveVisible) {\n this.deriveVisibility();\n }\n return this.cache.roots.map((key) => this.buildNode(key));\n }\n\n /**\n * CACHE FUNCTIONS\n * These manage cache operations. No cache operations should ever be done\n * outside this file.\n **/\n getNode(key: Key): TreeNode<T> {\n const node = this.get(key);\n\n return {\n ...node,\n children: node.children?.map((key) => this.buildNode(key)),\n };\n }\n\n getAllKeys() {\n return this.cache.lookup.keys();\n }\n\n getAllNodes() {\n return this.cache.lookup.values();\n }\n\n setNode(key: Key, node: TreeNode<T>) {\n this.set(key, {\n ...node,\n children: (node.children ?? []).map((child) => child.key),\n });\n }\n\n setAllNodes({ parentKey, children, ...rest }: Partial<TreeNode<T>>) {\n for (const node of this.cache.lookup.values()) {\n this.set(node.key, {\n ...node,\n ...rest,\n });\n }\n }\n\n deleteNode(key: Key) {\n const node = this.cache.lookup.get(key);\n\n if (!node) {\n return;\n }\n\n // remove children\n node.children?.map((key) => this.deleteNode(key));\n\n // remove node from previous parent or root\n node.parentKey\n ? this.removeFromParent(node.parentKey, key)\n : this.removeFromRoot(key);\n\n // remove the actual node\n this.delete(key);\n }\n\n addNodes(\n target: Key | null,\n nodes: TreeNode<T>[],\n position: 'before' | 'after',\n ) {\n const { parentKey, index } = this.parentOrSibling(target, position);\n const idx = index + (position === 'before' ? 0 : 1);\n\n nodes.map((node, i) => this.insertNode(parentKey, node, idx + i));\n }\n\n insertNode(parentKey: Key | null, node: TreeNode<T>, idx: number) {\n const { children, ...rest } = node;\n\n this.set(node.key, {\n isDisabled: false,\n isExpanded: false,\n isSelected: false,\n isVisible: false,\n isVisibleComputed: false,\n ...rest,\n parentKey,\n ...(children ? { children: children.map((child) => child.key) } : {}),\n });\n\n node.children?.map((child, i) => this.insertNode(node.key, child, i));\n\n parentKey === null\n ? this.addToRoot(node.key, idx)\n : this.addToParent(parentKey, node.key, idx);\n }\n\n moveNodes(target: Key | null, nodes: Set<Key>, position: 'before' | 'after') {\n const { parentKey, index } = this.parentOrSibling(target, position);\n const idx = index + (position === 'before' ? 0 : 1);\n\n Array.from(nodes).map((key, i) => this.moveNode(parentKey, key, idx + i));\n }\n\n moveNode(parentKey: Key | null, key: Key, idx: number) {\n const node = this.get(key);\n\n // remove from previous parent\n node.parentKey\n ? this.removeFromParent(node.parentKey, key)\n : this.removeFromRoot(key);\n\n // add as child to new parent or root at position\n parentKey\n ? this.addToParent(parentKey, key, idx)\n : this.addToRoot(key, idx);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,QAAb,MAAsB;CACpB,AAAU,QAA8D;EACtE,wBAAQ,IAAI,KAAK;EACjB,OAAO,EAAE;EACV;CAED,YAAY,QAAuB,EAAE,EAAE;AACrC,OAAK,QAAQ,MAAM;;;;;CAMrB,QACE,OACA,yBAAqC,IAAI,KAAK,EAC9C,YAAwB,MACxB;AACA,QAAM,SAAS,SAAS;GACtB,MAAM,EAAE,UAAU,GAAG,SAAS;AAE9B,UAAO,IAAI,KAAK,KAAK;IACnB,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,mBAAmB;IACnB,GAAG;IACH;IACA,GAAI,WAAW,EAAE,UAAU,SAAS,KAAK,UAAU,MAAM,IAAI,EAAE,GAAG,EAAE;IACrE,CAAC;AAEF,OAAI,KAAK,SACP,MAAK,QAAQ,KAAK,UAAU,QAAQ,KAAK,IAAI;IAE/C;EAEF,MAAM,QAAQ;GAAE;GAAQ,OAAO,MAAM,KAAK,SAAS,KAAK,IAAI;GAAE;AAE9D,MAAI,CAAC,UACH,MAAK,QAAQ;AAGf,OAAK,kBAAkB;AACvB,SAAO;;CAGT,AAAU,IAAI,KAAU;EACtB,MAAM,OAAO,KAAK,MAAM,OA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,KAAK,WAAW,WAAW,MAAM,MAAM,EAAE,CAAC;;CAGnE,WAAW,WAAuB,MAAmB,KAAa;EAChE,MAAM,EAAE,UAAU,GAAG,SAAS;AAE9B,OAAK,IAAI,KAAK,KAAK;GACjB,YAAY;GACZ,YAAY;GACZ,YAAY;GACZ,WAAW;GACX,mBAAmB;GACnB,GAAG;GACH;GACA,GAAI,WAAW,EAAE,UAAU,SAAS,KAAK,UAAU,MAAM,IAAI,EAAE,GAAG,EAAE;GACrE,CAAC;AAEF,OAAK,UAAU,KAAK,OAAO,MAAM,KAAK,WAAW,KAAK,KAAK,OAAO,EAAE,CAAC;AAErE,gBAAc,OACV,KAAK,UAAU,KAAK,KAAK,IAAI,GAC7B,KAAK,YAAY,WAAW,KAAK,KAAK,IAAI;;CAGhD,UAAU,QAAoB,OAAiB,UAA8B;EAC3E,MAAM,EAAE,WAAW,UAAU,KAAK,gBAAgB,QAAQ,SAAS;EACnE,MAAM,MAAM,SAAS,aAAa,WAAW,IAAI;AAEjD,QAAM,KAAK,MAAM,CAAC,KAAK,KAAK,MAAM,KAAK,SAAS,WAAW,KAAK,MAAM,EAAE,CAAC;;CAG3E,SAAS,WAAuB,KAAU,KAAa;EACrD,MAAM,OAAO,KAAK,IAAI,IAAI;AAG1B,OAAK,YACD,KAAK,iBAAiB,KAAK,WAAW,IAAI,GAC1C,KAAK,eAAe,IAAI;AAG5B,cACI,KAAK,YAAY,WAAW,KAAK,IAAI,GACrC,KAAK,UAAU,KAAK,IAAI"}
|
|
1
|
+
{"version":3,"file":"cache.js","names":["index: number","parentKey: Key | null","key"],"sources":["../../../../src/hooks/use-tree/actions/cache.ts"],"sourcesContent":["// __private-exports\n/*\n * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type { Key } from '@react-types/shared';\nimport type { TreeNode } from '../types';\n\nexport type CacheTreeNode<T> = Omit<TreeNode<T>, 'children'> & {\n children?: Key[];\n};\n\n/**\n * This is a cache created only for performance reasons and is considered\n * to be only a temporary mirror of the data. The data is *always* correct\n * cache should be updated according to the data, only. If the data and\n * the cache do not match, the cache is invalidated and rebuilt.\n *\n * This will initialize once on load with data, then\n * updated with each tree operation.\n */\nexport class Cache<T> {\n protected cache: { lookup: Map<Key, CacheTreeNode<T>>; roots: Key[] } = {\n lookup: new Map(),\n roots: [],\n };\n\n constructor(nodes: TreeNode<T>[] = []) {\n this.rebuild(nodes);\n }\n\n /**\n * Recursively creates the cache object from tree data\n */\n rebuild(\n nodes: TreeNode<T>[],\n lookup: Map<Key, CacheTreeNode<T>> = new Map(),\n parentKey: Key | null = null,\n ) {\n nodes.forEach((node) => {\n const { children, ...rest } = node;\n\n lookup.set(node.key, {\n isDisabled: false,\n isExpanded: false,\n isSelected: false,\n isVisible: false,\n isVisibleComputed: false,\n isIndeterminate: false,\n ...rest,\n parentKey,\n ...(children ? { children: children.map((child) => child.key) } : {}),\n });\n\n if (node.children) {\n this.rebuild(node.children, lookup, node.key);\n }\n });\n\n const cache = { lookup, roots: nodes.map((node) => node.key) };\n\n if (!parentKey) {\n this.cache = cache;\n }\n\n this.deriveVisibility();\n return cache;\n }\n\n protected get(key: Key) {\n if (key == null) {\n throw new Error(`Key is ${key} (null/undefined) - this is invalid`);\n }\n\n const node = this.cache.lookup.get(key);\n\n if (node === undefined) {\n throw new Error(`Key of ${key} does not exist in tree`);\n }\n\n return node;\n }\n\n protected set(key: Key, node: CacheTreeNode<T>) {\n this.cache.lookup.set(key, node);\n }\n\n protected delete(key: Key) {\n this.cache.lookup.delete(key);\n }\n\n protected addToParent(parentKey: Key, childKey: Key, idx: number) {\n const parent = this.get(parentKey);\n const child = this.get(childKey);\n const index = Math.max(0, idx);\n\n this.set(childKey, {\n ...child,\n parentKey,\n });\n\n const children = (parent.children ?? []).slice(0);\n\n children.splice(index, 0, childKey);\n\n this.set(parentKey, {\n ...parent,\n children,\n });\n }\n\n protected addToRoot(key: Key, idx: number) {\n const node = this.get(key);\n const index = Math.max(0, idx);\n\n this.set(key, {\n ...node,\n parentKey: null,\n });\n\n this.cache.roots.splice(index, 0, key);\n }\n\n protected removeFromParent(parentKey: Key, childKey: Key) {\n const parent = this.get(parentKey);\n const child = this.get(childKey);\n\n this.set(childKey, {\n ...child,\n parentKey: null,\n });\n\n this.cache.lookup.set(parentKey, {\n ...parent,\n children: parent.children?.filter((key) => key !== childKey),\n });\n }\n\n protected removeFromRoot(key: Key) {\n const node = this.get(key);\n const idx = this.cache.roots.indexOf(key);\n\n if (idx >= 0) {\n this.set(key, {\n ...node,\n parentKey: null,\n });\n\n this.cache.roots.splice(idx, 1);\n }\n }\n\n protected parentOrSibling(target: Key | null, position: 'before' | 'after') {\n let index: number;\n let parentKey: Key | null = null;\n\n if (target === null) {\n index = position === 'before' ? 0 : this.cache.roots.length;\n } else {\n const targetNode = this.get(target);\n\n if (targetNode.parentKey) {\n const parent = this.get(targetNode.parentKey);\n\n parentKey = parent.key;\n index = parent.children?.indexOf(target) ?? 0;\n } else {\n index = this.cache.roots.indexOf(target);\n }\n }\n\n return { parentKey, index };\n }\n\n protected traverse(key: Key) {\n const node = this.get(key);\n\n this.cache.lookup.set(key, {\n ...node,\n isVisibleComputed: this.calculateVisibility(key),\n });\n\n node.children?.map((child) => this.traverse(child));\n }\n\n protected calculateVisibility(key: Key) {\n let current = this.get(key);\n const ancestry = [current];\n\n while (current.parentKey) {\n const parent = this.get(current.parentKey);\n if (parent) {\n ancestry.push(parent);\n }\n current = parent;\n }\n\n return ancestry.every((n) => n.isVisible);\n }\n\n protected deriveVisibility() {\n return this.cache.roots.map((key) => this.traverse(key));\n }\n /**\n * Recursively builds a TreeNode from a key\n *\n * @param key\n */\n protected buildNode(key: Key): TreeNode<T> {\n const node = this.get(key);\n\n const children = (node.children ?? []).reduce(\n (acc: TreeNode<T>[], child) => {\n const childNode = this.cache.lookup.get(child);\n\n if (childNode && childNode.parentKey === key) {\n acc.push(this.buildNode(child));\n }\n\n return acc;\n },\n [],\n );\n\n return {\n ...node,\n children,\n };\n }\n\n /**\n * Builds a tree structure from cache\n *\n * TODO: optimization - rebuild only from change to root\n * Rebuild only from the changed node up the tree to avoid\n * rebuilding the entire tree\n *\n * @param deriveVisible boolean - if true, will recompute visibility for nodes based on ancestry\n */\n toTree(deriveVisible?: boolean): TreeNode<T>[] {\n if (deriveVisible) {\n this.deriveVisibility();\n }\n return this.cache.roots.map((key) => this.buildNode(key));\n }\n\n /**\n * CACHE FUNCTIONS\n * These are the public functions to manage cache operations. No cache operations should ever be done\n * outside this file since it risks corruption of the data.\n **/\n getNode(key: Key): TreeNode<T> {\n const node = this.get(key);\n\n return {\n ...node,\n children: node.children?.map((key) => this.buildNode(key)),\n };\n }\n\n getAllKeys() {\n return this.cache.lookup.keys();\n }\n\n getAllNodes() {\n return this.cache.lookup.values();\n }\n\n getParentForPosition(\n target: Key | null,\n position: 'before' | 'after',\n ): Key | null {\n const { parentKey } = this.parentOrSibling(target, position);\n return parentKey;\n }\n\n setNode(key: Key, node: TreeNode<T>) {\n this.set(key, {\n ...node,\n children: (node.children ?? []).map((child) => child.key),\n });\n }\n\n setAllNodes({ parentKey, children, ...rest }: Partial<TreeNode<T>>) {\n for (const node of this.cache.lookup.values()) {\n this.set(node.key, {\n ...node,\n ...rest,\n });\n }\n }\n\n deleteNode(key: Key) {\n const node = this.cache.lookup.get(key);\n\n if (!node) {\n return;\n }\n\n // remove children\n node.children?.map((key) => this.deleteNode(key));\n\n // remove node from previous parent or root\n node.parentKey\n ? this.removeFromParent(node.parentKey, key)\n : this.removeFromRoot(key);\n\n // remove the actual node\n this.delete(key);\n }\n\n addNodes(\n target: Key | null,\n nodes: TreeNode<T>[],\n position: 'before' | 'after',\n ) {\n const { parentKey, index } = this.parentOrSibling(target, position);\n const idx = index + (position === 'before' ? 0 : 1);\n\n nodes.map((node, i) => this.insertNode(parentKey, node, idx + i));\n }\n\n insertNode(parentKey: Key | null, node: TreeNode<T>, idx: number) {\n const { children, ...rest } = node;\n\n this.set(node.key, {\n isDisabled: false,\n isExpanded: false,\n isSelected: false,\n isVisible: false,\n isVisibleComputed: false,\n isIndeterminate: false,\n ...rest,\n parentKey,\n ...(children\n ? {\n children: children.map((child) => child.key),\n }\n : {}),\n });\n\n node.children?.map((child, i) => this.insertNode(node.key, child, i));\n\n parentKey === null\n ? this.addToRoot(node.key, idx)\n : this.addToParent(parentKey, node.key, idx);\n }\n\n moveNodes(target: Key | null, nodes: Set<Key>, position: 'before' | 'after') {\n const { parentKey, index } = this.parentOrSibling(target, position);\n const idx = index + (position === 'before' ? 0 : 1);\n\n Array.from(nodes).map((key, i) => this.moveNode(parentKey, key, idx + i));\n }\n\n moveNode(parentKey: Key | null, key: Key, idx: number) {\n const node = this.get(key);\n\n // remove from previous parent\n node.parentKey\n ? this.removeFromParent(node.parentKey, key)\n : this.removeFromRoot(key);\n\n // add as child to new parent or root at position\n parentKey\n ? this.addToParent(parentKey, key, idx)\n : this.addToRoot(key, idx);\n }\n\n /**\n * Cascade selection down through descendants\n */\n cascadeSelection(key: Key, selected: boolean): void {\n try {\n const node = this.get(key);\n\n // Update this node (skip if disabled)\n if (!node.isDisabled) {\n this.set(key, {\n ...node,\n isSelected: selected,\n isIndeterminate: false,\n });\n }\n\n // Recurse to children\n if (node.children) {\n for (const childKey of node.children) {\n if (childKey != null) {\n this.cascadeSelection(childKey, selected);\n }\n }\n }\n } catch {\n // Key doesn't exist, skip\n return;\n }\n }\n\n /**\n * Bubble up selection state through ancestors\n */\n bubbleUpSelection(key: Key): void {\n try {\n let current = this.get(key);\n\n while (current.parentKey) {\n const parent = this.get(current.parentKey);\n const newState = this.computeSelectionState(parent);\n\n // Early termination: if parent state unchanged, ancestors won't change\n if (\n parent.isSelected === newState.isSelected &&\n parent.isIndeterminate === newState.isIndeterminate\n ) {\n break;\n }\n\n this.set(parent.key, {\n ...parent,\n isSelected: newState.isSelected,\n isIndeterminate: newState.isIndeterminate,\n });\n\n current = parent;\n }\n } catch {\n // Key doesn't exist, skip\n return;\n }\n }\n\n /**\n * Compute selection state for a node based on its children\n */\n private computeSelectionState(node: CacheTreeNode<T>): {\n isSelected: boolean;\n isIndeterminate: boolean;\n } {\n // Leaf nodes: use their own state\n if (!node.children || node.children.length === 0) {\n return {\n isSelected: node.isSelected ?? false,\n isIndeterminate: false,\n };\n }\n\n // Get selectable children (exclude disabled)\n const selectableChildren = node.children\n .filter((k) => {\n try {\n const child = this.get(k);\n return !child.isDisabled;\n } catch {\n return false;\n }\n })\n .map((k) => this.get(k));\n\n // If all children disabled, treat as leaf\n if (selectableChildren.length === 0) {\n return {\n isSelected: node.isSelected ?? false,\n isIndeterminate: false,\n };\n }\n\n // Check if all/none/some selected\n const selectedCount = selectableChildren.filter((c) => c.isSelected).length;\n const indeterminateCount = selectableChildren.filter(\n (c) => c.isIndeterminate,\n ).length;\n\n // If any child is indeterminate, parent is indeterminate\n if (indeterminateCount > 0) {\n return {\n isSelected: false,\n isIndeterminate: true,\n };\n }\n\n // All children selected\n if (selectedCount === selectableChildren.length) {\n return {\n isSelected: true,\n isIndeterminate: false,\n };\n }\n\n // No children selected\n if (selectedCount === 0) {\n return {\n isSelected: false,\n isIndeterminate: false,\n };\n }\n\n // Some children selected (indeterminate)\n return {\n isSelected: false,\n isIndeterminate: true,\n };\n }\n\n /**\n * Sync cascade state for parents after a move operation\n */\n syncParentsAfterMove(oldParents: Set<Key>, newParent: Key | null): void {\n // Update old parents (lost children)\n for (const parentKey of oldParents) {\n try {\n const parent = this.get(parentKey);\n const newState = this.computeSelectionState(parent);\n\n this.set(parentKey, {\n ...parent,\n isSelected: newState.isSelected,\n isIndeterminate: newState.isIndeterminate,\n });\n\n // Bubble up to ancestors\n if (parent.parentKey) {\n this.bubbleUpSelection(parentKey);\n }\n } catch {\n // Parent doesn't exist, skip\n }\n }\n\n // Update new parent (gained children)\n if (newParent) {\n try {\n const parent = this.get(newParent);\n const newState = this.computeSelectionState(parent);\n\n this.set(newParent, {\n ...parent,\n isSelected: newState.isSelected,\n isIndeterminate: newState.isIndeterminate,\n });\n\n // Bubble up to ancestors\n if (parent.parentKey) {\n this.bubbleUpSelection(newParent);\n }\n } catch {\n // Parent doesn't exist, skip\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAa,QAAb,MAAsB;CACpB,AAAU,QAA8D;EACtE,wBAAQ,IAAI,KAAK;EACjB,OAAO,EAAE;EACV;CAED,YAAY,QAAuB,EAAE,EAAE;AACrC,OAAK,QAAQ,MAAM;;;;;CAMrB,QACE,OACA,yBAAqC,IAAI,KAAK,EAC9C,YAAwB,MACxB;AACA,QAAM,SAAS,SAAS;GACtB,MAAM,EAAE,UAAU,GAAG,SAAS;AAE9B,UAAO,IAAI,KAAK,KAAK;IACnB,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,mBAAmB;IACnB,iBAAiB;IACjB,GAAG;IACH;IACA,GAAI,WAAW,EAAE,UAAU,SAAS,KAAK,UAAU,MAAM,IAAI,EAAE,GAAG,EAAE;IACrE,CAAC;AAEF,OAAI,KAAK,SACP,MAAK,QAAQ,KAAK,UAAU,QAAQ,KAAK,IAAI;IAE/C;EAEF,MAAM,QAAQ;GAAE;GAAQ,OAAO,MAAM,KAAK,SAAS,KAAK,IAAI;GAAE;AAE9D,MAAI,CAAC,UACH,MAAK,QAAQ;AAGf,OAAK,kBAAkB;AACvB,SAAO;;CAGT,AAAU,IAAI,KAAU;AACtB,MAAI,OAAO,KACT,OAAM,IAAI,MAAM,UAAU,IAAI,qCAAqC;EAGrE,MAAM,OAAO,KAAK,MAAM,OAAO,IAAI,IAAI;AAE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