@accelint/design-toolkit 9.9.2 → 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 +2 -2
- 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/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 +51 -1
- 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 +2 -2
- 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/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/mute-button.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 +2 -2
- 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.d.ts +2 -2
- package/dist/components/notice/list.js +10 -1
- package/dist/components/notice/list.js.map +1 -1
- package/dist/components/notice/notice-icon.d.ts +2 -2
- 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/value-editor.d.ts +2 -2
- 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 +10 -2
- 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/context.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 +2 -2
- package/dist/components/table/index.js +2 -2
- package/dist/components/table/index.js.map +1 -1
- package/dist/components/table/row.d.ts +2 -2
- 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/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/portal.d.ts +2 -2
- package/dist/providers/theme-provider.d.ts +2 -2
- package/package.json +64 -6
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { selectors } from "../../store.js";
|
|
15
|
+
import { useGanttStore } from "../../context/store/index.js";
|
|
16
|
+
import { useGanttContext } from "../../context/index.js";
|
|
17
|
+
import { useTemporalDataContext } from "../../context/temporal-data/index.js";
|
|
18
|
+
import { deriveRenderedSlice } from "../../utils/layout.js";
|
|
19
|
+
import { deriveRenderedRegion, deriveRowIndexThresholds, deriveTemporalThresholds, deriveTotalDataRegion, examineThresholds, shouldExamineThresholds } from "../../utils/thresholds.js";
|
|
20
|
+
import { useEffect, useRef } from "react";
|
|
21
|
+
|
|
22
|
+
//#region src/components/gantt/hooks/use-total-data-region-thresholds/index.ts
|
|
23
|
+
function toThresholdKey(item) {
|
|
24
|
+
return `${item.axis}:${item.direction}:${item.value}`;
|
|
25
|
+
}
|
|
26
|
+
function createThresholdProjection() {
|
|
27
|
+
const state = /* @__PURE__ */ new Set();
|
|
28
|
+
function update(metThresholds) {
|
|
29
|
+
const keys = [];
|
|
30
|
+
const newlyEntered = [];
|
|
31
|
+
for (let i = 0; i < metThresholds.length; i++) {
|
|
32
|
+
const item = metThresholds[i];
|
|
33
|
+
if (!item) continue;
|
|
34
|
+
const key = toThresholdKey(item);
|
|
35
|
+
keys.push(key);
|
|
36
|
+
if (!state.has(key)) newlyEntered.push(item);
|
|
37
|
+
}
|
|
38
|
+
state.clear();
|
|
39
|
+
for (const key of keys) state.add(key);
|
|
40
|
+
return newlyEntered;
|
|
41
|
+
}
|
|
42
|
+
function reset() {
|
|
43
|
+
state.clear();
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
update,
|
|
47
|
+
reset
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A hook that notifies the Gantt component consumer when certain thresholds are
|
|
52
|
+
* reached in the total data region currently being virtualized.
|
|
53
|
+
*
|
|
54
|
+
* This allows the consumer to perform actions when the rendered region reaches
|
|
55
|
+
* certain thresholds (like fetching additional data to provide to the Gantt component).
|
|
56
|
+
*/
|
|
57
|
+
function useTotalDataRegionThresholds({ totalRowsCount, verticalScrollElement }) {
|
|
58
|
+
const projectionRef = useRef(null);
|
|
59
|
+
if (projectionRef.current === null) projectionRef.current = createThresholdProjection();
|
|
60
|
+
const roundedCurrentRowScrollPx = useGanttStore(selectors.roundedCurrentRowScrollPx);
|
|
61
|
+
const { totalBounds, renderedRegionBounds, threshold, onThresholdMet, timescale } = useTemporalDataContext();
|
|
62
|
+
const { rowHeightPx } = useGanttContext();
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!threshold || !onThresholdMet || !shouldExamineThresholds(totalRowsCount, verticalScrollElement, threshold)) {
|
|
65
|
+
projectionRef.current?.reset();
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const totalDataRegion = deriveTotalDataRegion(totalRowsCount, totalBounds);
|
|
69
|
+
const metThresholds = examineThresholds(deriveRenderedRegion(deriveRenderedSlice(roundedCurrentRowScrollPx, rowHeightPx, verticalScrollElement?.clientHeight ?? 0), renderedRegionBounds), deriveTemporalThresholds(threshold, totalDataRegion, timescale), deriveRowIndexThresholds(threshold, totalDataRegion));
|
|
70
|
+
const newlyMet = projectionRef.current?.update(metThresholds) ?? [];
|
|
71
|
+
if (newlyMet.length > 0) onThresholdMet(newlyMet);
|
|
72
|
+
}, [
|
|
73
|
+
totalRowsCount,
|
|
74
|
+
totalBounds,
|
|
75
|
+
renderedRegionBounds,
|
|
76
|
+
threshold,
|
|
77
|
+
onThresholdMet,
|
|
78
|
+
timescale,
|
|
79
|
+
roundedCurrentRowScrollPx,
|
|
80
|
+
verticalScrollElement,
|
|
81
|
+
rowHeightPx
|
|
82
|
+
]);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
export { useTotalDataRegionThresholds };
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["keys: string[]","newlyEntered: GanttMetThresholdData[]"],"sources":["../../../../../src/components/gantt/hooks/use-total-data-region-thresholds/index.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 { useEffect, useRef } from 'react';\nimport { useGanttStore } from '@/components/gantt/context/store';\nimport { useTemporalDataContext } from '@/components/gantt/context/temporal-data';\nimport { selectors } from '@/components/gantt/store';\nimport { deriveRenderedSlice } from '@/components/gantt/utils/layout';\nimport {\n deriveRenderedRegion,\n deriveRowIndexThresholds,\n deriveTemporalThresholds,\n deriveTotalDataRegion,\n examineThresholds,\n shouldExamineThresholds,\n} from '@/components/gantt/utils/thresholds';\nimport { useGanttContext } from '../../context';\nimport type { GanttMetThresholdData } from '@/components/gantt/types';\n\nfunction toThresholdKey(item: GanttMetThresholdData): string {\n return `${item.axis}:${item.direction}:${item.value}`;\n}\n\nfunction createThresholdProjection() {\n const state = new Set<string>();\n\n function update(\n metThresholds: GanttMetThresholdData[],\n ): GanttMetThresholdData[] {\n const keys: string[] = [];\n const newlyEntered: GanttMetThresholdData[] = [];\n\n for (let i = 0; i < metThresholds.length; i++) {\n const item = metThresholds[i];\n\n if (!item) {\n continue;\n }\n\n const key = toThresholdKey(item);\n keys.push(key);\n if (!state.has(key)) {\n newlyEntered.push(item);\n }\n }\n\n state.clear();\n for (const key of keys) {\n state.add(key);\n }\n\n return newlyEntered;\n }\n\n function reset() {\n state.clear();\n }\n\n return { update, reset };\n}\n\ntype UseTotalDataRegionThresholdsProps = {\n totalRowsCount: number;\n verticalScrollElement: HTMLDivElement | null;\n};\n\n/**\n * A hook that notifies the Gantt component consumer when certain thresholds are\n * reached in the total data region currently being virtualized.\n *\n * This allows the consumer to perform actions when the rendered region reaches\n * certain thresholds (like fetching additional data to provide to the Gantt component).\n */\nexport function useTotalDataRegionThresholds({\n totalRowsCount,\n verticalScrollElement,\n}: UseTotalDataRegionThresholdsProps) {\n const projectionRef = useRef<ReturnType<\n typeof createThresholdProjection\n > | null>(null);\n if (projectionRef.current === null) {\n projectionRef.current = createThresholdProjection();\n }\n\n const roundedCurrentRowScrollPx = useGanttStore(\n selectors.roundedCurrentRowScrollPx,\n );\n\n const {\n totalBounds,\n renderedRegionBounds,\n threshold,\n onThresholdMet,\n timescale,\n } = useTemporalDataContext();\n const { rowHeightPx } = useGanttContext();\n\n useEffect(() => {\n // Early return if threshold examination should not proceed\n if (\n // biome-ignore lint/complexity/useSimplifiedLogicExpression: <clear expression>\n !threshold ||\n !onThresholdMet ||\n !shouldExamineThresholds(totalRowsCount, verticalScrollElement, threshold)\n ) {\n projectionRef.current?.reset();\n return;\n }\n\n const totalDataRegion = deriveTotalDataRegion(totalRowsCount, totalBounds);\n\n const renderedSlice = deriveRenderedSlice(\n roundedCurrentRowScrollPx,\n rowHeightPx,\n verticalScrollElement?.clientHeight ?? 0,\n );\n\n const renderedRegion = deriveRenderedRegion(\n renderedSlice,\n renderedRegionBounds,\n );\n\n const temporalThresholds = deriveTemporalThresholds(\n threshold,\n totalDataRegion,\n timescale,\n );\n\n const rowIndexThresholds = deriveRowIndexThresholds(\n threshold,\n totalDataRegion,\n );\n\n const metThresholds = examineThresholds(\n renderedRegion,\n temporalThresholds,\n rowIndexThresholds,\n );\n\n const newlyMet = projectionRef.current?.update(metThresholds) ?? [];\n\n if (newlyMet.length > 0) {\n onThresholdMet(newlyMet);\n }\n }, [\n totalRowsCount,\n totalBounds,\n renderedRegionBounds,\n threshold,\n onThresholdMet,\n timescale,\n roundedCurrentRowScrollPx,\n verticalScrollElement,\n rowHeightPx,\n ]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,eAAe,MAAqC;AAC3D,QAAO,GAAG,KAAK,KAAK,GAAG,KAAK,UAAU,GAAG,KAAK;;AAGhD,SAAS,4BAA4B;CACnC,MAAM,wBAAQ,IAAI,KAAa;CAE/B,SAAS,OACP,eACyB;EACzB,MAAMA,OAAiB,EAAE;EACzB,MAAMC,eAAwC,EAAE;AAEhD,OAAK,IAAI,IAAI,GAAG,IAAI,cAAc,QAAQ,KAAK;GAC7C,MAAM,OAAO,cAAc;AAE3B,OAAI,CAAC,KACH;GAGF,MAAM,MAAM,eAAe,KAAK;AAChC,QAAK,KAAK,IAAI;AACd,OAAI,CAAC,MAAM,IAAI,IAAI,CACjB,cAAa,KAAK,KAAK;;AAI3B,QAAM,OAAO;AACb,OAAK,MAAM,OAAO,KAChB,OAAM,IAAI,IAAI;AAGhB,SAAO;;CAGT,SAAS,QAAQ;AACf,QAAM,OAAO;;AAGf,QAAO;EAAE;EAAQ;EAAO;;;;;;;;;AAe1B,SAAgB,6BAA6B,EAC3C,gBACA,yBACoC;CACpC,MAAM,gBAAgB,OAEZ,KAAK;AACf,KAAI,cAAc,YAAY,KAC5B,eAAc,UAAU,2BAA2B;CAGrD,MAAM,4BAA4B,cAChC,UAAU,0BACX;CAED,MAAM,EACJ,aACA,sBACA,WACA,gBACA,cACE,wBAAwB;CAC5B,MAAM,EAAE,gBAAgB,iBAAiB;AAEzC,iBAAgB;AAEd,MAEE,CAAC,aACD,CAAC,kBACD,CAAC,wBAAwB,gBAAgB,uBAAuB,UAAU,EAC1E;AACA,iBAAc,SAAS,OAAO;AAC9B;;EAGF,MAAM,kBAAkB,sBAAsB,gBAAgB,YAAY;EAwB1E,MAAM,gBAAgB,kBAhBC,qBAND,oBACpB,2BACA,aACA,uBAAuB,gBAAgB,EACxC,EAIC,qBACD,EAE0B,yBACzB,WACA,iBACA,UACD,EAE0B,yBACzB,WACA,gBACD,CAMA;EAED,MAAM,WAAW,cAAc,SAAS,OAAO,cAAc,IAAI,EAAE;AAEnE,MAAI,SAAS,SAAS,EACpB,gBAAe,SAAS;IAEzB;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { UIEvent } from "react";
|
|
14
|
+
|
|
15
|
+
//#region src/components/gantt/hooks/use-vertical-scroll-update/index.d.ts
|
|
16
|
+
type UseVerticalScrollUpdateValue = {
|
|
17
|
+
onScroll: (event: UIEvent<HTMLDivElement>) => void;
|
|
18
|
+
};
|
|
19
|
+
declare function useVerticalScrollUpdate(): UseVerticalScrollUpdateValue;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { useVerticalScrollUpdate };
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { selectors } from "../../store.js";
|
|
15
|
+
import { useGanttStore } from "../../context/store/index.js";
|
|
16
|
+
import { getVerticalScrolledPixels } from "../../utils/helpers.js";
|
|
17
|
+
import { useGanttContext } from "../../context/index.js";
|
|
18
|
+
import { useCallback } from "react";
|
|
19
|
+
|
|
20
|
+
//#region src/components/gantt/hooks/use-vertical-scroll-update/index.ts
|
|
21
|
+
function useVerticalScrollUpdate() {
|
|
22
|
+
const { ganttContentElement, ganttPanelElement } = useGanttContext();
|
|
23
|
+
const setCurrentRowScrollPx = useGanttStore(selectors.setCurrentRowScrollPx);
|
|
24
|
+
return { onScroll: useCallback((event) => {
|
|
25
|
+
const scrolledPixels = getVerticalScrolledPixels(event);
|
|
26
|
+
setCurrentRowScrollPx(scrolledPixels);
|
|
27
|
+
ganttPanelElement?.scrollTo({ top: scrolledPixels });
|
|
28
|
+
ganttContentElement?.scrollTo({ top: scrolledPixels });
|
|
29
|
+
}, [
|
|
30
|
+
setCurrentRowScrollPx,
|
|
31
|
+
ganttPanelElement,
|
|
32
|
+
ganttContentElement
|
|
33
|
+
]) };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { useVerticalScrollUpdate };
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/gantt/hooks/use-vertical-scroll-update/index.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 { useCallback, type UIEvent } from 'react';\nimport { useGanttContext } from '../../context';\nimport { useGanttStore } from '../../context/store';\nimport { selectors } from '../../store';\nimport { getVerticalScrolledPixels } from '../../utils/helpers';\n\ntype UseVerticalScrollUpdateValue = {\n onScroll: (event: UIEvent<HTMLDivElement>) => void;\n};\n\nexport function useVerticalScrollUpdate(): UseVerticalScrollUpdateValue {\n const { ganttContentElement, ganttPanelElement } = useGanttContext();\n const setCurrentRowScrollPx = useGanttStore(selectors.setCurrentRowScrollPx);\n\n const onScroll = useCallback(\n (event: UIEvent<HTMLDivElement>) => {\n const scrolledPixels = getVerticalScrolledPixels(event);\n\n setCurrentRowScrollPx(scrolledPixels);\n ganttPanelElement?.scrollTo({ top: scrolledPixels });\n ganttContentElement?.scrollTo({ top: scrolledPixels });\n },\n [setCurrentRowScrollPx, ganttPanelElement, ganttContentElement],\n );\n\n return { onScroll };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,0BAAwD;CACtE,MAAM,EAAE,qBAAqB,sBAAsB,iBAAiB;CACpE,MAAM,wBAAwB,cAAc,UAAU,sBAAsB;AAa5E,QAAO,EAAE,UAXQ,aACd,UAAmC;EAClC,MAAM,iBAAiB,0BAA0B,MAAM;AAEvD,wBAAsB,eAAe;AACrC,qBAAmB,SAAS,EAAE,KAAK,gBAAgB,CAAC;AACpD,uBAAqB,SAAS,EAAE,KAAK,gBAAgB,CAAC;IAExD;EAAC;EAAuB;EAAmB;EAAoB,CAChE,EAEkB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { GanttMetThresholdData as GanttMetThresholdData$1, GanttRowElementColorProp as GanttRowElementColorProp$1, GanttThreshold as GanttThreshold$1, GanttThresholdProps as GanttThresholdProps$1, GanttTimescale as GanttTimescale$1 } from "./types.js";
|
|
14
|
+
import { GanttProviderProps as GanttProviderProps$1 } from "./context/index.js";
|
|
15
|
+
|
|
16
|
+
//#region src/components/gantt/public-types.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* Public type exports for the Gantt component.
|
|
19
|
+
*
|
|
20
|
+
* NOTE: These types are for EXTERNAL consumption only.
|
|
21
|
+
* Internal gantt files should import directly from './types'.
|
|
22
|
+
*/
|
|
23
|
+
type GanttTimescale = GanttTimescale$1;
|
|
24
|
+
type GanttThreshold = GanttThreshold$1;
|
|
25
|
+
type GanttMetThresholdData = GanttMetThresholdData$1;
|
|
26
|
+
type GanttThresholdProps = GanttThresholdProps$1;
|
|
27
|
+
type GanttRowElementColorProp = GanttRowElementColorProp$1;
|
|
28
|
+
type GanttProviderProps = GanttProviderProps$1;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { GanttMetThresholdData, GanttProviderProps, GanttRowElementColorProp, GanttThreshold, GanttThresholdProps, GanttTimescale };
|
|
31
|
+
//# sourceMappingURL=public-types.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import * as zustand0 from "zustand";
|
|
14
|
+
|
|
15
|
+
//#region src/components/gantt/store.d.ts
|
|
16
|
+
type GanttState = {
|
|
17
|
+
currentPositionMs: number;
|
|
18
|
+
currentRowScrollPx: number;
|
|
19
|
+
virtualizedHeightPx: number;
|
|
20
|
+
};
|
|
21
|
+
type GanttActions = {
|
|
22
|
+
setCurrentPositionMs: (ms: number) => void;
|
|
23
|
+
setCurrentRowScrollPx: (px: number) => void;
|
|
24
|
+
setVirtualizedHeightPx: (px: number) => void;
|
|
25
|
+
};
|
|
26
|
+
declare const selectors: {
|
|
27
|
+
currentPositionMs: (state: GanttState) => number;
|
|
28
|
+
roundedCurrentPositionMs: (selectedTimeIntervalMs: number) => (state: GanttState) => number;
|
|
29
|
+
roundedCurrentRowScrollPx: (state: GanttState) => number;
|
|
30
|
+
virtualizedHeightPx: (state: GanttState) => number;
|
|
31
|
+
setCurrentPositionMs: (state: GanttState & GanttActions) => (ms: number) => void;
|
|
32
|
+
setCurrentRowScrollPx: (state: GanttState & GanttActions) => (px: number) => void;
|
|
33
|
+
};
|
|
34
|
+
type GanttStoreProps = {
|
|
35
|
+
startTimeMs: number;
|
|
36
|
+
};
|
|
37
|
+
declare const createGanttStore: ({
|
|
38
|
+
startTimeMs
|
|
39
|
+
}: GanttStoreProps) => Omit<zustand0.StoreApi<GanttState & GanttActions>, "subscribe"> & {
|
|
40
|
+
subscribe: {
|
|
41
|
+
(listener: (selectedState: GanttState & GanttActions, previousSelectedState: GanttState & GanttActions) => void): () => void;
|
|
42
|
+
<U>(selector: (state: GanttState & GanttActions) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
43
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
44
|
+
fireImmediately?: boolean;
|
|
45
|
+
} | undefined): () => void;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
type GanttStore = ReturnType<typeof createGanttStore>;
|
|
49
|
+
//#endregion
|
|
50
|
+
export { GanttActions, GanttState, GanttStore, GanttStoreProps, createGanttStore, selectors };
|
|
51
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { GANTT_ROW_HEIGHT_PX } from "./constants.js";
|
|
15
|
+
import { roundMsToInterval } from "./utils/dates.js";
|
|
16
|
+
import { createStore } from "zustand";
|
|
17
|
+
import { subscribeWithSelector } from "zustand/middleware";
|
|
18
|
+
|
|
19
|
+
//#region src/components/gantt/store.ts
|
|
20
|
+
const selectors = {
|
|
21
|
+
currentPositionMs: (state) => state.currentPositionMs,
|
|
22
|
+
roundedCurrentPositionMs: (selectedTimeIntervalMs) => (state) => {
|
|
23
|
+
return roundMsToInterval(state.currentPositionMs, selectedTimeIntervalMs);
|
|
24
|
+
},
|
|
25
|
+
roundedCurrentRowScrollPx: (state) => {
|
|
26
|
+
const scrollPxValue = state.currentRowScrollPx;
|
|
27
|
+
return Math.floor(scrollPxValue / GANTT_ROW_HEIGHT_PX) * GANTT_ROW_HEIGHT_PX;
|
|
28
|
+
},
|
|
29
|
+
virtualizedHeightPx: (state) => state.virtualizedHeightPx,
|
|
30
|
+
setCurrentPositionMs: (state) => state.setCurrentPositionMs,
|
|
31
|
+
setCurrentRowScrollPx: (state) => state.setCurrentRowScrollPx
|
|
32
|
+
};
|
|
33
|
+
const createGanttStore = ({ startTimeMs }) => {
|
|
34
|
+
return createStore()(subscribeWithSelector((set) => ({
|
|
35
|
+
currentPositionMs: startTimeMs,
|
|
36
|
+
currentRowScrollPx: 0,
|
|
37
|
+
virtualizedHeightPx: 0,
|
|
38
|
+
setCurrentPositionMs: (ms) => set({ currentPositionMs: ms }),
|
|
39
|
+
setCurrentRowScrollPx: (px) => set({ currentRowScrollPx: px }),
|
|
40
|
+
setVirtualizedHeightPx: (px) => set({ virtualizedHeightPx: px })
|
|
41
|
+
})));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
export { createGanttStore, selectors };
|
|
46
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","names":[],"sources":["../../../src/components/gantt/store.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 { createStore } from 'zustand';\nimport { subscribeWithSelector } from 'zustand/middleware';\nimport { GANTT_ROW_HEIGHT_PX } from './constants';\nimport { roundMsToInterval } from './utils/dates';\n\nexport type GanttState = {\n currentPositionMs: number;\n currentRowScrollPx: number;\n virtualizedHeightPx: number;\n};\n\nexport type GanttActions = {\n setCurrentPositionMs: (ms: number) => void;\n setCurrentRowScrollPx: (px: number) => void;\n setVirtualizedHeightPx: (px: number) => void;\n};\n\nexport const selectors = {\n currentPositionMs: (state: GanttState) => state.currentPositionMs,\n roundedCurrentPositionMs:\n (selectedTimeIntervalMs: number) => (state: GanttState) => {\n return roundMsToInterval(state.currentPositionMs, selectedTimeIntervalMs);\n },\n roundedCurrentRowScrollPx: (state: GanttState) => {\n const scrollPxValue = state.currentRowScrollPx;\n\n return (\n Math.floor(scrollPxValue / GANTT_ROW_HEIGHT_PX) * GANTT_ROW_HEIGHT_PX\n );\n },\n virtualizedHeightPx: (state: GanttState) => state.virtualizedHeightPx,\n setCurrentPositionMs: (state: GanttState & GanttActions) =>\n state.setCurrentPositionMs,\n setCurrentRowScrollPx: (state: GanttState & GanttActions) =>\n state.setCurrentRowScrollPx,\n};\n\nexport type GanttStoreProps = {\n startTimeMs: number;\n};\n\nexport const createGanttStore = ({ startTimeMs }: GanttStoreProps) => {\n return createStore<GanttState & GanttActions>()(\n subscribeWithSelector((set) => ({\n currentPositionMs: startTimeMs,\n currentRowScrollPx: 0,\n virtualizedHeightPx: 0,\n setCurrentPositionMs: (ms: number) => set({ currentPositionMs: ms }),\n setCurrentRowScrollPx: (px: number) => set({ currentRowScrollPx: px }),\n setVirtualizedHeightPx: (px: number) => set({ virtualizedHeightPx: px }),\n })),\n );\n};\n\nexport type GanttStore = ReturnType<typeof createGanttStore>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BA,MAAa,YAAY;CACvB,oBAAoB,UAAsB,MAAM;CAChD,2BACG,4BAAoC,UAAsB;AACzD,SAAO,kBAAkB,MAAM,mBAAmB,uBAAuB;;CAE7E,4BAA4B,UAAsB;EAChD,MAAM,gBAAgB,MAAM;AAE5B,SACE,KAAK,MAAM,gBAAgB,oBAAoB,GAAG;;CAGtD,sBAAsB,UAAsB,MAAM;CAClD,uBAAuB,UACrB,MAAM;CACR,wBAAwB,UACtB,MAAM;CACT;AAMD,MAAa,oBAAoB,EAAE,kBAAmC;AACpE,QAAO,aAAwC,CAC7C,uBAAuB,SAAS;EAC9B,mBAAmB;EACnB,oBAAoB;EACpB,qBAAqB;EACrB,uBAAuB,OAAe,IAAI,EAAE,mBAAmB,IAAI,CAAC;EACpE,wBAAwB,OAAe,IAAI,EAAE,oBAAoB,IAAI,CAAC;EACtE,yBAAyB,OAAe,IAAI,EAAE,qBAAqB,IAAI,CAAC;EACzE,EAAE,CACJ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@reference '@accelint/design-foundation/styles';
|
|
14
|
+
|
|
15
|
+
@layer components.l1 {
|
|
16
|
+
.container {
|
|
17
|
+
--padding-top: attr(data-padding-top px);
|
|
18
|
+
|
|
19
|
+
@apply relative flex h-full max-h-full w-full flex-col overflow-x-hidden overflow-y-auto;
|
|
20
|
+
padding-top: var(--padding-top);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.rows-container {
|
|
24
|
+
@apply flex-1 overflow-hidden;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.row-scroll-container {
|
|
28
|
+
@apply pr-px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//#region src/components/gantt/types.d.ts
|
|
2
|
+
/** Shorthand strings representing hour-based timeline interval durations. */
|
|
3
|
+
type GanttHoursTimescale = '1h' | '2h' | '6h' | '12h' | '24h';
|
|
4
|
+
/** Shorthand strings representing minute-based timeline interval durations. */
|
|
5
|
+
type GanttMinutesTimescale = '1m' | '5m' | '10m' | '30m';
|
|
6
|
+
/**
|
|
7
|
+
* Timeline interval duration controlling the spacing between tick marks.
|
|
8
|
+
* Determines the granularity of the timeline display.
|
|
9
|
+
*/
|
|
10
|
+
type GanttTimescale = GanttHoursTimescale | GanttMinutesTimescale;
|
|
11
|
+
type GanttTimelineChunkObject = {
|
|
12
|
+
/** Epoch milliseconds for this timeline chunk's position. */
|
|
13
|
+
timestampMs: number;
|
|
14
|
+
};
|
|
15
|
+
type GanttTimeBounds = {
|
|
16
|
+
/** Start of the time range in epoch milliseconds. */
|
|
17
|
+
startMs: number;
|
|
18
|
+
/** End of the time range in epoch milliseconds. */
|
|
19
|
+
endMs: number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Visual color variant for row elements (blocks, markers, spacers, brackets).
|
|
23
|
+
* Maps to design token color scales.
|
|
24
|
+
*/
|
|
25
|
+
type GanttRowElementColorProp = 'serious' | 'accent' | 'critical';
|
|
26
|
+
/**
|
|
27
|
+
* Configuration for threshold-based data loading notifications.
|
|
28
|
+
* When the rendered region approaches the edges of the total data region,
|
|
29
|
+
* the Gantt fires `onThresholdMet` so consumers can load additional data.
|
|
30
|
+
*/
|
|
31
|
+
type GanttThreshold = {
|
|
32
|
+
/** Number of timescale intervals from the timeline boundary that triggers a threshold event. */
|
|
33
|
+
timescaleMultipleDistance: number;
|
|
34
|
+
/** Number of rows from the visible row boundary that triggers a threshold event. */
|
|
35
|
+
rowIndexBoundaryDistance: number;
|
|
36
|
+
};
|
|
37
|
+
type GanttDerivedThresholdValue = {
|
|
38
|
+
/** Derived threshold boundary at the start of the axis. */
|
|
39
|
+
start: number;
|
|
40
|
+
/** Derived threshold boundary at the end of the axis. */
|
|
41
|
+
end: number;
|
|
42
|
+
};
|
|
43
|
+
/** Data describing a threshold that was met during rendering. */
|
|
44
|
+
type GanttMetThresholdData = {
|
|
45
|
+
/** Which axis the threshold was met on (time or rows). */
|
|
46
|
+
axis: 'horizontal' | 'vertical';
|
|
47
|
+
/** Whether the threshold was met at the beginning or end of the axis. */
|
|
48
|
+
direction: 'start' | 'end';
|
|
49
|
+
/** The timestamp (horizontal) or row index (vertical) at which the threshold was met. */
|
|
50
|
+
value: number;
|
|
51
|
+
};
|
|
52
|
+
type GanttRegion = {
|
|
53
|
+
startMs: number;
|
|
54
|
+
endMs: number;
|
|
55
|
+
startRowIndex: number;
|
|
56
|
+
endRowIndex: number;
|
|
57
|
+
};
|
|
58
|
+
/** Props for configuring threshold-based data loading on the Gantt component. */
|
|
59
|
+
type GanttThresholdProps = {
|
|
60
|
+
/** Threshold distances that define when edge-of-data notifications fire. */
|
|
61
|
+
threshold: GanttThreshold;
|
|
62
|
+
/** Callback invoked when the rendered region enters a threshold zone. */
|
|
63
|
+
onThresholdMet: (metThresholds: GanttMetThresholdData[]) => void;
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
export { GanttDerivedThresholdValue, GanttHoursTimescale, GanttMetThresholdData, GanttMinutesTimescale, GanttRegion, GanttRowElementColorProp, GanttThreshold, GanttThresholdProps, GanttTimeBounds, GanttTimelineChunkObject, GanttTimescale };
|
|
67
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { GanttTimescale } from "../types.js";
|
|
14
|
+
|
|
15
|
+
//#region src/components/gantt/utils/conversions.d.ts
|
|
16
|
+
declare function getMsPerPx(timescale: GanttTimescale): number;
|
|
17
|
+
/** @throws {RangeError} If endTimeMs < startTimeMs. */
|
|
18
|
+
declare function getTotalTimelineMs(startTimeMs: number, endTimeMs: number): number;
|
|
19
|
+
declare function getTotalTimelineWidth(totalTimelineMs: number, msPerPx: number): number;
|
|
20
|
+
declare function getMsRepresentedInViewableRegion(viewableRegionWidth: number, msPerPx: number): number;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { getMsPerPx, getMsRepresentedInViewableRegion, getTotalTimelineMs, getTotalTimelineWidth };
|
|
23
|
+
//# sourceMappingURL=conversions.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { TIMELINE_CHUNK_WIDTH_PX, TIMESCALE_MAPPING } from "../constants.js";
|
|
15
|
+
|
|
16
|
+
//#region src/components/gantt/utils/conversions.ts
|
|
17
|
+
function getMsPerPx(timescale) {
|
|
18
|
+
return TIMESCALE_MAPPING[timescale] / TIMELINE_CHUNK_WIDTH_PX;
|
|
19
|
+
}
|
|
20
|
+
/** @throws {RangeError} If endTimeMs < startTimeMs. */
|
|
21
|
+
function getTotalTimelineMs(startTimeMs, endTimeMs) {
|
|
22
|
+
if (endTimeMs < startTimeMs) throw new RangeError(`endTimeMs (${endTimeMs}) must be >= startTimeMs (${startTimeMs})`);
|
|
23
|
+
return endTimeMs - startTimeMs;
|
|
24
|
+
}
|
|
25
|
+
function getTotalTimelineWidth(totalTimelineMs, msPerPx) {
|
|
26
|
+
return totalTimelineMs / msPerPx;
|
|
27
|
+
}
|
|
28
|
+
function getMsRepresentedInViewableRegion(viewableRegionWidth, msPerPx) {
|
|
29
|
+
return viewableRegionWidth * msPerPx;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { getMsPerPx, getMsRepresentedInViewableRegion, getTotalTimelineMs, getTotalTimelineWidth };
|
|
34
|
+
//# sourceMappingURL=conversions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversions.js","names":[],"sources":["../../../../src/components/gantt/utils/conversions.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 { TIMELINE_CHUNK_WIDTH_PX, TIMESCALE_MAPPING } from '../constants';\nimport type { GanttTimescale } from '../types';\n\nexport function getMsPerPx(timescale: GanttTimescale) {\n return TIMESCALE_MAPPING[timescale] / TIMELINE_CHUNK_WIDTH_PX;\n}\n\n/** @throws {RangeError} If endTimeMs < startTimeMs. */\nexport function getTotalTimelineMs(startTimeMs: number, endTimeMs: number) {\n if (endTimeMs < startTimeMs) {\n throw new RangeError(\n `endTimeMs (${endTimeMs}) must be >= startTimeMs (${startTimeMs})`,\n );\n }\n\n return endTimeMs - startTimeMs;\n}\n\nexport function getTotalTimelineWidth(\n totalTimelineMs: number,\n msPerPx: number,\n) {\n return totalTimelineMs / msPerPx;\n}\n\nexport function getMsRepresentedInViewableRegion(\n viewableRegionWidth: number,\n msPerPx: number,\n) {\n return viewableRegionWidth * msPerPx;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,SAAgB,WAAW,WAA2B;AACpD,QAAO,kBAAkB,aAAa;;;AAIxC,SAAgB,mBAAmB,aAAqB,WAAmB;AACzE,KAAI,YAAY,YACd,OAAM,IAAI,WACR,cAAc,UAAU,4BAA4B,YAAY,GACjE;AAGH,QAAO,YAAY;;AAGrB,SAAgB,sBACd,iBACA,SACA;AACA,QAAO,kBAAkB;;AAG3B,SAAgB,iCACd,qBACA,SACA;AACA,QAAO,sBAAsB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/components/gantt/utils/dates.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Rounds a millisecond timestamp down to the nearest interval boundary.
|
|
4
|
+
* Uses pure integer arithmetic to avoid Date object allocations.
|
|
5
|
+
*
|
|
6
|
+
* @throws {RangeError} If selectedTimeIntervalMs does not match a known interval.
|
|
7
|
+
*/
|
|
8
|
+
declare function roundMsToInterval(timestampMs: number, selectedTimeIntervalMs: number): number;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { roundMsToInterval };
|
|
11
|
+
//# sourceMappingURL=dates.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import { HOURS_MAPPING, MINUTES_MAPPING, MS_PER_HOUR } from "../constants.js";
|
|
15
|
+
|
|
16
|
+
//#region src/components/gantt/utils/dates.ts
|
|
17
|
+
const MS_PER_SECOND = 1e3;
|
|
18
|
+
const MS_PER_DAY = MS_PER_HOUR * 24;
|
|
19
|
+
const hoursIntervals = Object.values(HOURS_MAPPING);
|
|
20
|
+
const minutesIntervals = Object.values(MINUTES_MAPPING);
|
|
21
|
+
/**
|
|
22
|
+
* Rounds a millisecond timestamp down to the nearest interval boundary.
|
|
23
|
+
* Uses pure integer arithmetic to avoid Date object allocations.
|
|
24
|
+
*
|
|
25
|
+
* @throws {RangeError} If selectedTimeIntervalMs does not match a known interval.
|
|
26
|
+
*/
|
|
27
|
+
function roundMsToInterval(timestampMs, selectedTimeIntervalMs) {
|
|
28
|
+
const secondAligned = timestampMs - (timestampMs % MS_PER_SECOND + MS_PER_SECOND) % MS_PER_SECOND;
|
|
29
|
+
if (minutesIntervals.includes(selectedTimeIntervalMs)) return secondAligned - (secondAligned % selectedTimeIntervalMs + selectedTimeIntervalMs) % selectedTimeIntervalMs;
|
|
30
|
+
if (hoursIntervals.includes(selectedTimeIntervalMs)) {
|
|
31
|
+
const msIntoDayRaw = secondAligned % MS_PER_DAY;
|
|
32
|
+
const msIntoDay = msIntoDayRaw < 0 ? msIntoDayRaw + MS_PER_DAY : msIntoDayRaw;
|
|
33
|
+
const hourAligned = msIntoDay - msIntoDay % selectedTimeIntervalMs;
|
|
34
|
+
return secondAligned - msIntoDay + hourAligned;
|
|
35
|
+
}
|
|
36
|
+
throw new RangeError(`Unrecognized time interval: ${selectedTimeIntervalMs}ms`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//#endregion
|
|
40
|
+
export { roundMsToInterval };
|
|
41
|
+
//# sourceMappingURL=dates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dates.js","names":[],"sources":["../../../../src/components/gantt/utils/dates.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 { HOURS_MAPPING, MINUTES_MAPPING, MS_PER_HOUR } from '../constants';\n\nconst MS_PER_SECOND = 1000;\nconst MS_PER_DAY = MS_PER_HOUR * 24;\n\nconst hoursIntervals = Object.values(HOURS_MAPPING);\nconst minutesIntervals = Object.values(MINUTES_MAPPING);\n\n/**\n * Rounds a millisecond timestamp down to the nearest interval boundary.\n * Uses pure integer arithmetic to avoid Date object allocations.\n *\n * @throws {RangeError} If selectedTimeIntervalMs does not match a known interval.\n */\nexport function roundMsToInterval(\n timestampMs: number,\n selectedTimeIntervalMs: number,\n): number {\n // Zero out sub-second precision (handle negative timestamps correctly)\n const msRemainder =\n ((timestampMs % MS_PER_SECOND) + MS_PER_SECOND) % MS_PER_SECOND;\n const secondAligned = timestampMs - msRemainder;\n\n if (minutesIntervals.includes(selectedTimeIntervalMs)) {\n const intervalRemainder =\n ((secondAligned % selectedTimeIntervalMs) + selectedTimeIntervalMs) %\n selectedTimeIntervalMs;\n return secondAligned - intervalRemainder;\n }\n\n if (hoursIntervals.includes(selectedTimeIntervalMs)) {\n // Hours interval — align to interval boundary within the day\n const msIntoDayRaw = secondAligned % MS_PER_DAY;\n const msIntoDay =\n msIntoDayRaw < 0 ? msIntoDayRaw + MS_PER_DAY : msIntoDayRaw;\n const hourAligned = msIntoDay - (msIntoDay % selectedTimeIntervalMs);\n return secondAligned - msIntoDay + hourAligned;\n }\n\n throw new RangeError(\n `Unrecognized time interval: ${selectedTimeIntervalMs}ms`,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,MAAM,gBAAgB;AACtB,MAAM,aAAa,cAAc;AAEjC,MAAM,iBAAiB,OAAO,OAAO,cAAc;AACnD,MAAM,mBAAmB,OAAO,OAAO,gBAAgB;;;;;;;AAQvD,SAAgB,kBACd,aACA,wBACQ;CAIR,MAAM,gBAAgB,eADlB,cAAc,gBAAiB,iBAAiB;AAGpD,KAAI,iBAAiB,SAAS,uBAAuB,CAInD,QAAO,iBAFH,gBAAgB,yBAA0B,0BAC5C;AAIJ,KAAI,eAAe,SAAS,uBAAuB,EAAE;EAEnD,MAAM,eAAe,gBAAgB;EACrC,MAAM,YACJ,eAAe,IAAI,eAAe,aAAa;EACjD,MAAM,cAAc,YAAa,YAAY;AAC7C,SAAO,gBAAgB,YAAY;;AAGrC,OAAM,IAAI,WACR,+BAA+B,uBAAuB,IACvD"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at https://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
//#region src/components/gantt/utils/formatting.ts
|
|
15
|
+
const formatter = new Intl.DateTimeFormat("en-US", {
|
|
16
|
+
minute: "2-digit",
|
|
17
|
+
hour: "2-digit",
|
|
18
|
+
day: "2-digit",
|
|
19
|
+
month: "short",
|
|
20
|
+
timeZone: "UTC",
|
|
21
|
+
hour12: false
|
|
22
|
+
});
|
|
23
|
+
const labelCache = /* @__PURE__ */ new Map();
|
|
24
|
+
function formatTimestampLabel(timestampMs) {
|
|
25
|
+
const cached = labelCache.get(timestampMs);
|
|
26
|
+
if (cached !== void 0) return cached;
|
|
27
|
+
const parts = formatter.formatToParts(timestampMs);
|
|
28
|
+
let minute = "";
|
|
29
|
+
let hour = "";
|
|
30
|
+
let day = "";
|
|
31
|
+
let month = "";
|
|
32
|
+
for (const part of parts) switch (part.type) {
|
|
33
|
+
case "minute":
|
|
34
|
+
minute = part.value;
|
|
35
|
+
break;
|
|
36
|
+
case "hour":
|
|
37
|
+
hour = part.value;
|
|
38
|
+
break;
|
|
39
|
+
case "day":
|
|
40
|
+
day = part.value;
|
|
41
|
+
break;
|
|
42
|
+
case "month":
|
|
43
|
+
month = part.value;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
const label = hour === "00" && minute === "00" ? `${day} ${month.toUpperCase()}` : `${hour}:${minute}`;
|
|
47
|
+
labelCache.set(timestampMs, label);
|
|
48
|
+
if (labelCache.size > 500) labelCache.clear();
|
|
49
|
+
return label;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { formatTimestampLabel };
|
|
54
|
+
//# sourceMappingURL=formatting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatting.js","names":[],"sources":["../../../../src/components/gantt/utils/formatting.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\n// TODO: Make locale and format options configurable via GanttProviderProps\nconst DEFAULT_LOCALE = 'en-US';\nconst options: Intl.DateTimeFormatOptions = {\n minute: '2-digit',\n hour: '2-digit',\n day: '2-digit',\n month: 'short',\n timeZone: 'UTC',\n hour12: false,\n};\n\nconst formatter = new Intl.DateTimeFormat(DEFAULT_LOCALE, options);\nconst labelCache = new Map<number, string>();\n\nexport function formatTimestampLabel(timestampMs: number): string {\n const cached = labelCache.get(timestampMs);\n\n if (cached !== undefined) {\n return cached;\n }\n\n const parts = formatter.formatToParts(timestampMs);\n let minute = '';\n let hour = '';\n let day = '';\n let month = '';\n\n for (const part of parts) {\n switch (part.type) {\n case 'minute':\n minute = part.value;\n break;\n case 'hour':\n hour = part.value;\n break;\n case 'day':\n day = part.value;\n break;\n case 'month':\n month = part.value;\n break;\n }\n }\n\n const label =\n hour === '00' && minute === '00'\n ? `${day} ${month.toUpperCase()}`\n : `${hour}:${minute}`;\n\n labelCache.set(timestampMs, label);\n\n if (labelCache.size > 500) {\n labelCache.clear();\n }\n\n return label;\n}\n"],"mappings":";;;;;;;;;;;;;;AAwBA,MAAM,YAAY,IAAI,KAAK,eAVJ,SACqB;CAC1C,QAAQ;CACR,MAAM;CACN,KAAK;CACL,OAAO;CACP,UAAU;CACV,QAAQ;CACT,CAEiE;AAClE,MAAM,6BAAa,IAAI,KAAqB;AAE5C,SAAgB,qBAAqB,aAA6B;CAChE,MAAM,SAAS,WAAW,IAAI,YAAY;AAE1C,KAAI,WAAW,OACb,QAAO;CAGT,MAAM,QAAQ,UAAU,cAAc,YAAY;CAClD,IAAI,SAAS;CACb,IAAI,OAAO;CACX,IAAI,MAAM;CACV,IAAI,QAAQ;AAEZ,MAAK,MAAM,QAAQ,MACjB,SAAQ,KAAK,MAAb;EACE,KAAK;AACH,YAAS,KAAK;AACd;EACF,KAAK;AACH,UAAO,KAAK;AACZ;EACF,KAAK;AACH,SAAM,KAAK;AACX;EACF,KAAK;AACH,WAAQ,KAAK;AACb;;CAIN,MAAM,QACJ,SAAS,QAAQ,WAAW,OACxB,GAAG,IAAI,GAAG,MAAM,aAAa,KAC7B,GAAG,KAAK,GAAG;AAEjB,YAAW,IAAI,aAAa,MAAM;AAElC,KAAI,WAAW,OAAO,IACpB,YAAW,OAAO;AAGpB,QAAO"}
|