@solid2-aria/stately 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +45 -2
- package/dist/LICENSES/Apache-2.0.txt +201 -0
- package/dist/LICENSES/react-spectrum-NOTICE.txt +242 -0
- package/dist/NOTICE.txt +636 -0
- package/dist/autocomplete/create-autocomplete-state.d.ts +46 -0
- package/dist/autocomplete/create-autocomplete-state.js +41 -0
- package/dist/autocomplete/create-autocomplete-state.js.map +1 -0
- package/dist/calendar/create-calendar-state.d.ts +62 -0
- package/dist/calendar/create-calendar-state.js +357 -0
- package/dist/calendar/create-calendar-state.js.map +1 -0
- package/dist/calendar/create-range-calendar-state.d.ts +63 -0
- package/dist/calendar/create-range-calendar-state.js +204 -0
- package/dist/calendar/create-range-calendar-state.js.map +1 -0
- package/dist/calendar/types.d.ts +222 -0
- package/dist/calendar/types.js +16 -0
- package/dist/calendar/utils.d.ts +27 -0
- package/dist/calendar/utils.js +81 -0
- package/dist/calendar/utils.js.map +1 -0
- package/dist/checkbox/create-checkbox-group-state.d.ts +60 -0
- package/dist/checkbox/create-checkbox-group-state.js +88 -0
- package/dist/checkbox/create-checkbox-group-state.js.map +1 -0
- package/dist/collections/collection-builder.d.ts +28 -0
- package/dist/collections/collection-builder.js +164 -0
- package/dist/collections/collection-builder.js.map +1 -0
- package/dist/collections/create-collection.d.ts +24 -0
- package/dist/collections/create-collection.js +35 -0
- package/dist/collections/create-collection.js.map +1 -0
- package/dist/collections/get-child-nodes.d.ts +25 -0
- package/dist/collections/get-child-nodes.js +67 -0
- package/dist/collections/get-child-nodes.js.map +1 -0
- package/dist/collections/get-item-count.d.ts +19 -0
- package/dist/collections/get-item-count.js +34 -0
- package/dist/collections/get-item-count.js.map +1 -0
- package/dist/collections/item.d.ts +29 -0
- package/dist/collections/item.js +68 -0
- package/dist/collections/item.js.map +1 -0
- package/dist/collections/section.d.ts +29 -0
- package/dist/collections/section.js +60 -0
- package/dist/collections/section.js.map +1 -0
- package/dist/collections/types.d.ts +46 -0
- package/dist/collections/types.js +29 -0
- package/dist/collections/types.js.map +1 -0
- package/dist/color/color/base-color.d.ts +40 -0
- package/dist/color/color/base-color.js +122 -0
- package/dist/color/color/base-color.js.map +1 -0
- package/dist/color/color/color-classes.d.ts +27 -0
- package/dist/color/color/color-classes.js +29 -0
- package/dist/color/color/color-classes.js.map +1 -0
- package/dist/color/color/color-constructors.d.ts +23 -0
- package/dist/color/color/color-constructors.js +16 -0
- package/dist/color/color/color.d.ts +3 -0
- package/dist/color/color/color.js +2 -0
- package/dist/color/color/hsb-color.d.ts +24 -0
- package/dist/color/color/hsb-color.js +183 -0
- package/dist/color/color/hsb-color.js.map +1 -0
- package/dist/color/color/hsl-color.d.ts +24 -0
- package/dist/color/color/hsl-color.js +184 -0
- package/dist/color/color/hsl-color.js.map +1 -0
- package/dist/color/color/normalize-hue.d.ts +18 -0
- package/dist/color/color/normalize-hue.js +24 -0
- package/dist/color/color/normalize-hue.js.map +1 -0
- package/dist/color/color/oklch.d.ts +19 -0
- package/dist/color/color/oklch.js +97 -0
- package/dist/color/color/oklch.js.map +1 -0
- package/dist/color/color/rgb-color.d.ts +24 -0
- package/dist/color/color/rgb-color.js +230 -0
- package/dist/color/color/rgb-color.js.map +1 -0
- package/dist/color/color.d.ts +25 -0
- package/dist/color/color.js +41 -0
- package/dist/color/color.js.map +1 -0
- package/dist/color/create-color-area-state.d.ts +105 -0
- package/dist/color/create-color-area-state.js +138 -0
- package/dist/color/create-color-area-state.js.map +1 -0
- package/dist/color/create-color-channel-field-state.d.ts +29 -0
- package/dist/color/create-color-channel-field-state.js +69 -0
- package/dist/color/create-color-channel-field-state.js.map +1 -0
- package/dist/color/create-color-field-state.d.ts +61 -0
- package/dist/color/create-color-field-state.js +113 -0
- package/dist/color/create-color-field-state.js.map +1 -0
- package/dist/color/create-color-picker-state.d.ts +16 -0
- package/dist/color/create-color-picker-state.js +26 -0
- package/dist/color/create-color-picker-state.js.map +1 -0
- package/dist/color/create-color-slider-state.d.ts +50 -0
- package/dist/color/create-color-slider-state.js +93 -0
- package/dist/color/create-color-slider-state.js.map +1 -0
- package/dist/color/create-color-wheel-state.d.ts +76 -0
- package/dist/color/create-color-wheel-state.js +130 -0
- package/dist/color/create-color-wheel-state.js.map +1 -0
- package/dist/color/create-color.d.ts +20 -0
- package/dist/color/create-color.js +33 -0
- package/dist/color/create-color.js.map +1 -0
- package/dist/color/types.d.ts +87 -0
- package/dist/color/types.js +5 -0
- package/dist/combobox/create-combo-box-state.d.ts +157 -0
- package/dist/combobox/create-combo-box-state.js +450 -0
- package/dist/combobox/create-combo-box-state.js.map +1 -0
- package/dist/data/create-async-list.d.ts +88 -0
- package/dist/data/create-async-list.js +276 -0
- package/dist/data/create-async-list.js.map +1 -0
- package/dist/data/create-list-data.d.ts +140 -0
- package/dist/data/create-list-data.js +250 -0
- package/dist/data/create-list-data.js.map +1 -0
- package/dist/data/create-tree-data.d.ts +134 -0
- package/dist/data/create-tree-data.js +364 -0
- package/dist/data/create-tree-data.js.map +1 -0
- package/dist/datepicker/create-date-field-state.d.ts +138 -0
- package/dist/datepicker/create-date-field-state.js +449 -0
- package/dist/datepicker/create-date-field-state.js.map +1 -0
- package/dist/datepicker/create-date-picker-state.d.ts +82 -0
- package/dist/datepicker/create-date-picker-state.js +191 -0
- package/dist/datepicker/create-date-picker-state.js.map +1 -0
- package/dist/datepicker/create-date-range-picker-state.d.ts +97 -0
- package/dist/datepicker/create-date-range-picker-state.js +305 -0
- package/dist/datepicker/create-date-range-picker-state.js.map +1 -0
- package/dist/datepicker/create-time-field-state.d.ts +34 -0
- package/dist/datepicker/create-time-field-state.js +128 -0
- package/dist/datepicker/create-time-field-state.js.map +1 -0
- package/dist/datepicker/incomplete-date.d.ts +71 -0
- package/dist/datepicker/incomplete-date.js +324 -0
- package/dist/datepicker/incomplete-date.js.map +1 -0
- package/dist/datepicker/placeholders.d.ts +18 -0
- package/dist/datepicker/placeholders.js +418 -0
- package/dist/datepicker/placeholders.js.map +1 -0
- package/dist/datepicker/types.d.ts +131 -0
- package/dist/datepicker/types.js +16 -0
- package/dist/datepicker/utils.d.ts +37 -0
- package/dist/datepicker/utils.js +168 -0
- package/dist/datepicker/utils.js.map +1 -0
- package/dist/disclosure/create-disclosure-group-state.d.ts +47 -0
- package/dist/disclosure/create-disclosure-group-state.js +62 -0
- package/dist/disclosure/create-disclosure-group-state.js.map +1 -0
- package/dist/disclosure/create-disclosure-state.d.ts +42 -0
- package/dist/disclosure/create-disclosure-state.js +49 -0
- package/dist/disclosure/create-disclosure-state.js.map +1 -0
- package/dist/dnd/create-draggable-collection-state.d.ts +63 -0
- package/dist/dnd/create-draggable-collection-state.js +136 -0
- package/dist/dnd/create-draggable-collection-state.js.map +1 -0
- package/dist/dnd/create-droppable-collection-state.d.ts +55 -0
- package/dist/dnd/create-droppable-collection-state.js +155 -0
- package/dist/dnd/create-droppable-collection-state.js.map +1 -0
- package/dist/flags/flags.d.ts +21 -0
- package/dist/flags/flags.js +34 -0
- package/dist/flags/flags.js.map +1 -0
- package/dist/form/create-form-validation-state.d.ts +37 -0
- package/dist/form/create-form-validation-state.js +152 -0
- package/dist/form/create-form-validation-state.js.map +1 -0
- package/dist/grid/create-grid-state.d.ts +38 -0
- package/dist/grid/create-grid-state.js +85 -0
- package/dist/grid/create-grid-state.js.map +1 -0
- package/dist/grid/grid-collection.d.ts +68 -0
- package/dist/grid/grid-collection.js +133 -0
- package/dist/grid/grid-collection.js.map +1 -0
- package/dist/index.d.ts +91 -0
- package/dist/index.js +86 -0
- package/dist/intl/color/ar-AE.js +44 -0
- package/dist/intl/color/ar-AE.js.map +1 -0
- package/dist/intl/color/bg-BG.js +44 -0
- package/dist/intl/color/bg-BG.js.map +1 -0
- package/dist/intl/color/cs-CZ.js +44 -0
- package/dist/intl/color/cs-CZ.js.map +1 -0
- package/dist/intl/color/da-DK.js +44 -0
- package/dist/intl/color/da-DK.js.map +1 -0
- package/dist/intl/color/de-DE.js +44 -0
- package/dist/intl/color/de-DE.js.map +1 -0
- package/dist/intl/color/el-GR.js +44 -0
- package/dist/intl/color/el-GR.js.map +1 -0
- package/dist/intl/color/en-US.js +44 -0
- package/dist/intl/color/en-US.js.map +1 -0
- package/dist/intl/color/es-ES.js +44 -0
- package/dist/intl/color/es-ES.js.map +1 -0
- package/dist/intl/color/et-EE.js +44 -0
- package/dist/intl/color/et-EE.js.map +1 -0
- package/dist/intl/color/fi-FI.js +44 -0
- package/dist/intl/color/fi-FI.js.map +1 -0
- package/dist/intl/color/fr-FR.js +44 -0
- package/dist/intl/color/fr-FR.js.map +1 -0
- package/dist/intl/color/he-IL.js +44 -0
- package/dist/intl/color/he-IL.js.map +1 -0
- package/dist/intl/color/hr-HR.js +44 -0
- package/dist/intl/color/hr-HR.js.map +1 -0
- package/dist/intl/color/hu-HU.js +44 -0
- package/dist/intl/color/hu-HU.js.map +1 -0
- package/dist/intl/color/index.js +75 -0
- package/dist/intl/color/index.js.map +1 -0
- package/dist/intl/color/it-IT.js +44 -0
- package/dist/intl/color/it-IT.js.map +1 -0
- package/dist/intl/color/ja-JP.js +44 -0
- package/dist/intl/color/ja-JP.js.map +1 -0
- package/dist/intl/color/ko-KR.js +44 -0
- package/dist/intl/color/ko-KR.js.map +1 -0
- package/dist/intl/color/lt-LT.js +44 -0
- package/dist/intl/color/lt-LT.js.map +1 -0
- package/dist/intl/color/lv-LV.js +44 -0
- package/dist/intl/color/lv-LV.js.map +1 -0
- package/dist/intl/color/nb-NO.js +44 -0
- package/dist/intl/color/nb-NO.js.map +1 -0
- package/dist/intl/color/nl-NL.js +44 -0
- package/dist/intl/color/nl-NL.js.map +1 -0
- package/dist/intl/color/pl-PL.js +44 -0
- package/dist/intl/color/pl-PL.js.map +1 -0
- package/dist/intl/color/pt-BR.js +44 -0
- package/dist/intl/color/pt-BR.js.map +1 -0
- package/dist/intl/color/pt-PT.js +44 -0
- package/dist/intl/color/pt-PT.js.map +1 -0
- package/dist/intl/color/ro-RO.js +44 -0
- package/dist/intl/color/ro-RO.js.map +1 -0
- package/dist/intl/color/ru-RU.js +44 -0
- package/dist/intl/color/ru-RU.js.map +1 -0
- package/dist/intl/color/sk-SK.js +44 -0
- package/dist/intl/color/sk-SK.js.map +1 -0
- package/dist/intl/color/sl-SI.js +44 -0
- package/dist/intl/color/sl-SI.js.map +1 -0
- package/dist/intl/color/sr-SP.js +44 -0
- package/dist/intl/color/sr-SP.js.map +1 -0
- package/dist/intl/color/sv-SE.js +44 -0
- package/dist/intl/color/sv-SE.js.map +1 -0
- package/dist/intl/color/tr-TR.js +44 -0
- package/dist/intl/color/tr-TR.js.map +1 -0
- package/dist/intl/color/uk-UA.js +44 -0
- package/dist/intl/color/uk-UA.js.map +1 -0
- package/dist/intl/color/zh-CN.js +44 -0
- package/dist/intl/color/zh-CN.js.map +1 -0
- package/dist/intl/color/zh-TW.js +44 -0
- package/dist/intl/color/zh-TW.js.map +1 -0
- package/dist/intl/datepicker/ar-AE.js +11 -0
- package/dist/intl/datepicker/ar-AE.js.map +1 -0
- package/dist/intl/datepicker/bg-BG.js +11 -0
- package/dist/intl/datepicker/bg-BG.js.map +1 -0
- package/dist/intl/datepicker/cs-CZ.js +11 -0
- package/dist/intl/datepicker/cs-CZ.js.map +1 -0
- package/dist/intl/datepicker/da-DK.js +11 -0
- package/dist/intl/datepicker/da-DK.js.map +1 -0
- package/dist/intl/datepicker/de-DE.js +11 -0
- package/dist/intl/datepicker/de-DE.js.map +1 -0
- package/dist/intl/datepicker/el-GR.js +11 -0
- package/dist/intl/datepicker/el-GR.js.map +1 -0
- package/dist/intl/datepicker/en-US.js +11 -0
- package/dist/intl/datepicker/en-US.js.map +1 -0
- package/dist/intl/datepicker/es-ES.js +11 -0
- package/dist/intl/datepicker/es-ES.js.map +1 -0
- package/dist/intl/datepicker/et-EE.js +11 -0
- package/dist/intl/datepicker/et-EE.js.map +1 -0
- package/dist/intl/datepicker/fi-FI.js +11 -0
- package/dist/intl/datepicker/fi-FI.js.map +1 -0
- package/dist/intl/datepicker/fr-FR.js +11 -0
- package/dist/intl/datepicker/fr-FR.js.map +1 -0
- package/dist/intl/datepicker/he-IL.js +11 -0
- package/dist/intl/datepicker/he-IL.js.map +1 -0
- package/dist/intl/datepicker/hr-HR.js +11 -0
- package/dist/intl/datepicker/hr-HR.js.map +1 -0
- package/dist/intl/datepicker/hu-HU.js +11 -0
- package/dist/intl/datepicker/hu-HU.js.map +1 -0
- package/dist/intl/datepicker/index.js +75 -0
- package/dist/intl/datepicker/index.js.map +1 -0
- package/dist/intl/datepicker/it-IT.js +11 -0
- package/dist/intl/datepicker/it-IT.js.map +1 -0
- package/dist/intl/datepicker/ja-JP.js +11 -0
- package/dist/intl/datepicker/ja-JP.js.map +1 -0
- package/dist/intl/datepicker/ko-KR.js +11 -0
- package/dist/intl/datepicker/ko-KR.js.map +1 -0
- package/dist/intl/datepicker/lt-LT.js +11 -0
- package/dist/intl/datepicker/lt-LT.js.map +1 -0
- package/dist/intl/datepicker/lv-LV.js +11 -0
- package/dist/intl/datepicker/lv-LV.js.map +1 -0
- package/dist/intl/datepicker/nb-NO.js +11 -0
- package/dist/intl/datepicker/nb-NO.js.map +1 -0
- package/dist/intl/datepicker/nl-NL.js +11 -0
- package/dist/intl/datepicker/nl-NL.js.map +1 -0
- package/dist/intl/datepicker/pl-PL.js +11 -0
- package/dist/intl/datepicker/pl-PL.js.map +1 -0
- package/dist/intl/datepicker/pt-BR.js +11 -0
- package/dist/intl/datepicker/pt-BR.js.map +1 -0
- package/dist/intl/datepicker/pt-PT.js +11 -0
- package/dist/intl/datepicker/pt-PT.js.map +1 -0
- package/dist/intl/datepicker/ro-RO.js +11 -0
- package/dist/intl/datepicker/ro-RO.js.map +1 -0
- package/dist/intl/datepicker/ru-RU.js +11 -0
- package/dist/intl/datepicker/ru-RU.js.map +1 -0
- package/dist/intl/datepicker/sk-SK.js +11 -0
- package/dist/intl/datepicker/sk-SK.js.map +1 -0
- package/dist/intl/datepicker/sl-SI.js +11 -0
- package/dist/intl/datepicker/sl-SI.js.map +1 -0
- package/dist/intl/datepicker/sr-SP.js +11 -0
- package/dist/intl/datepicker/sr-SP.js.map +1 -0
- package/dist/intl/datepicker/sv-SE.js +11 -0
- package/dist/intl/datepicker/sv-SE.js.map +1 -0
- package/dist/intl/datepicker/tr-TR.js +11 -0
- package/dist/intl/datepicker/tr-TR.js.map +1 -0
- package/dist/intl/datepicker/uk-UA.js +11 -0
- package/dist/intl/datepicker/uk-UA.js.map +1 -0
- package/dist/intl/datepicker/zh-CN.js +11 -0
- package/dist/intl/datepicker/zh-CN.js.map +1 -0
- package/dist/intl/datepicker/zh-TW.js +11 -0
- package/dist/intl/datepicker/zh-TW.js.map +1 -0
- package/dist/layout/grid-layout.d.ts +107 -0
- package/dist/layout/grid-layout.js +253 -0
- package/dist/layout/grid-layout.js.map +1 -0
- package/dist/layout/list-layout.d.ts +187 -0
- package/dist/layout/list-layout.js +488 -0
- package/dist/layout/list-layout.js.map +1 -0
- package/dist/layout/table-layout.d.ts +98 -0
- package/dist/layout/table-layout.js +476 -0
- package/dist/layout/table-layout.js.map +1 -0
- package/dist/layout/waterfall-layout.d.ts +85 -0
- package/dist/layout/waterfall-layout.js +225 -0
- package/dist/layout/waterfall-layout.js.map +1 -0
- package/dist/list/create-list-state.d.ts +48 -0
- package/dist/list/create-list-state.js +123 -0
- package/dist/list/create-list-state.js.map +1 -0
- package/dist/list/create-single-select-list-state.d.ts +38 -0
- package/dist/list/create-single-select-list-state.js +55 -0
- package/dist/list/create-single-select-list-state.js.map +1 -0
- package/dist/list/list-collection.d.ts +36 -0
- package/dist/list/list-collection.js +91 -0
- package/dist/list/list-collection.js.map +1 -0
- package/dist/menu/create-menu-trigger-state.d.ts +55 -0
- package/dist/menu/create-menu-trigger-state.js +58 -0
- package/dist/menu/create-menu-trigger-state.js.map +1 -0
- package/dist/menu/create-submenu-trigger-state.d.ts +47 -0
- package/dist/menu/create-submenu-trigger-state.js +59 -0
- package/dist/menu/create-submenu-trigger-state.js.map +1 -0
- package/dist/numberfield/create-number-field-state.d.ts +93 -0
- package/dist/numberfield/create-number-field-state.js +139 -0
- package/dist/numberfield/create-number-field-state.js.map +1 -0
- package/dist/overlays/create-overlay-trigger-state.d.ts +51 -0
- package/dist/overlays/create-overlay-trigger-state.js +56 -0
- package/dist/overlays/create-overlay-trigger-state.js.map +1 -0
- package/dist/radio/create-radio-group-state.d.ts +61 -0
- package/dist/radio/create-radio-group-state.js +71 -0
- package/dist/radio/create-radio-group-state.js.map +1 -0
- package/dist/searchfield/create-search-field-state.d.ts +35 -0
- package/dist/searchfield/create-search-field-state.js +34 -0
- package/dist/searchfield/create-search-field-state.js.map +1 -0
- package/dist/select/create-select-state.d.ts +116 -0
- package/dist/select/create-select-state.js +151 -0
- package/dist/select/create-select-state.js.map +1 -0
- package/dist/selection/create-multiple-selection-state.d.ts +39 -0
- package/dist/selection/create-multiple-selection-state.js +114 -0
- package/dist/selection/create-multiple-selection-state.js.map +1 -0
- package/dist/selection/selection-manager.d.ts +139 -0
- package/dist/selection/selection-manager.js +334 -0
- package/dist/selection/selection-manager.js.map +1 -0
- package/dist/selection/selection.d.ts +27 -0
- package/dist/selection/selection.js +38 -0
- package/dist/selection/selection.js.map +1 -0
- package/dist/selection/types.d.ts +116 -0
- package/dist/selection/types.js +16 -0
- package/dist/slider/create-slider-state.d.ts +182 -0
- package/dist/slider/create-slider-state.js +131 -0
- package/dist/slider/create-slider-state.js.map +1 -0
- package/dist/steplist/create-step-list-state.d.ts +40 -0
- package/dist/steplist/create-step-list-state.js +132 -0
- package/dist/steplist/create-step-list-state.js.map +1 -0
- package/dist/table/cell.d.ts +37 -0
- package/dist/table/cell.js +47 -0
- package/dist/table/cell.js.map +1 -0
- package/dist/table/collection-context.d.ts +4 -0
- package/dist/table/collection-context.js +8 -0
- package/dist/table/collection-context.js.map +1 -0
- package/dist/table/column.d.ts +66 -0
- package/dist/table/column.js +71 -0
- package/dist/table/column.js.map +1 -0
- package/dist/table/create-table-column-resize-state.d.ts +65 -0
- package/dist/table/create-table-column-resize-state.js +100 -0
- package/dist/table/create-table-column-resize-state.js.map +1 -0
- package/dist/table/create-table-state.d.ts +112 -0
- package/dist/table/create-table-state.js +122 -0
- package/dist/table/create-table-state.js.map +1 -0
- package/dist/table/create-tree-grid-state.d.ts +44 -0
- package/dist/table/create-tree-grid-state.js +145 -0
- package/dist/table/create-tree-grid-state.js.map +1 -0
- package/dist/table/row.d.ts +44 -0
- package/dist/table/row.js +91 -0
- package/dist/table/row.js.map +1 -0
- package/dist/table/table-body.d.ts +36 -0
- package/dist/table/table-body.js +57 -0
- package/dist/table/table-body.js.map +1 -0
- package/dist/table/table-collection.d.ts +62 -0
- package/dist/table/table-collection.js +274 -0
- package/dist/table/table-collection.js.map +1 -0
- package/dist/table/table-column-layout.d.ts +47 -0
- package/dist/table/table-column-layout.js +94 -0
- package/dist/table/table-column-layout.js.map +1 -0
- package/dist/table/table-header.d.ts +37 -0
- package/dist/table/table-header.js +52 -0
- package/dist/table/table-header.js.map +1 -0
- package/dist/table/table-utils.d.ts +60 -0
- package/dist/table/table-utils.js +203 -0
- package/dist/table/table-utils.js.map +1 -0
- package/dist/tabs/create-tab-list-state.d.ts +42 -0
- package/dist/tabs/create-tab-list-state.js +78 -0
- package/dist/tabs/create-tab-list-state.js.map +1 -0
- package/dist/toast/create-toast-state.d.ts +97 -0
- package/dist/toast/create-toast-state.js +166 -0
- package/dist/toast/create-toast-state.js.map +1 -0
- package/dist/toggle/create-toggle-group-state.d.ts +55 -0
- package/dist/toggle/create-toggle-group-state.js +62 -0
- package/dist/toggle/create-toggle-group-state.js.map +1 -0
- package/dist/toggle/create-toggle-state.d.ts +58 -0
- package/dist/toggle/create-toggle-state.js +43 -0
- package/dist/toggle/create-toggle-state.js.map +1 -0
- package/dist/tokenfield/create-token-field-state.d.ts +39 -0
- package/dist/tokenfield/create-token-field-state.js +44 -0
- package/dist/tokenfield/create-token-field-state.js.map +1 -0
- package/dist/tokenfield/token-field-value.d.ts +111 -0
- package/dist/tokenfield/token-field-value.js +327 -0
- package/dist/tokenfield/token-field-value.js.map +1 -0
- package/dist/tooltip/create-tooltip-trigger-state.d.ts +73 -0
- package/dist/tooltip/create-tooltip-trigger-state.js +136 -0
- package/dist/tooltip/create-tooltip-trigger-state.js.map +1 -0
- package/dist/tree/create-tree-state.d.ts +42 -0
- package/dist/tree/create-tree-state.js +75 -0
- package/dist/tree/create-tree-state.js.map +1 -0
- package/dist/tree/tree-collection.d.ts +36 -0
- package/dist/tree/tree-collection.js +84 -0
- package/dist/tree/tree-collection.js.map +1 -0
- package/dist/utils/create-controlled-signal.d.ts +23 -0
- package/dist/utils/create-controlled-signal.js +54 -0
- package/dist/utils/create-controlled-signal.js.map +1 -0
- package/dist/utils/get-item-key.d.ts +5 -0
- package/dist/utils/get-item-key.js +12 -0
- package/dist/utils/get-item-key.js.map +1 -0
- package/dist/utils/get-node-props.d.ts +23 -0
- package/dist/utils/get-node-props.js +38 -0
- package/dist/utils/get-node-props.js.map +1 -0
- package/dist/utils/has-content.d.ts +5 -0
- package/dist/utils/has-content.js +7 -0
- package/dist/utils/has-content.js.map +1 -0
- package/dist/utils/legacy-props.d.ts +10 -0
- package/dist/utils/legacy-props.js +17 -0
- package/dist/utils/legacy-props.js.map +1 -0
- package/dist/utils/number.d.ts +25 -0
- package/dist/utils/number.js +59 -0
- package/dist/utils/number.js.map +1 -0
- package/dist/utils/parse-calendar-identifier.d.ts +5 -0
- package/dist/utils/parse-calendar-identifier.js +31 -0
- package/dist/utils/parse-calendar-identifier.js.map +1 -0
- package/dist/utils/require-value.d.ts +4 -0
- package/dist/utils/require-value.js +10 -0
- package/dist/utils/require-value.js.map +1 -0
- package/dist/virtualizer/create-virtualizer-state.d.ts +44 -0
- package/dist/virtualizer/create-virtualizer-state.js +92 -0
- package/dist/virtualizer/create-virtualizer-state.js.map +1 -0
- package/dist/virtualizer/layout-info.d.ts +94 -0
- package/dist/virtualizer/layout-info.js +118 -0
- package/dist/virtualizer/layout-info.js.map +1 -0
- package/dist/virtualizer/layout.d.ts +91 -0
- package/dist/virtualizer/layout.js +71 -0
- package/dist/virtualizer/layout.js.map +1 -0
- package/dist/virtualizer/overscan-manager.d.ts +25 -0
- package/dist/virtualizer/overscan-manager.js +46 -0
- package/dist/virtualizer/overscan-manager.js.map +1 -0
- package/dist/virtualizer/point.d.ts +36 -0
- package/dist/virtualizer/point.js +48 -0
- package/dist/virtualizer/point.js.map +1 -0
- package/dist/virtualizer/rect.d.ts +103 -0
- package/dist/virtualizer/rect.js +156 -0
- package/dist/virtualizer/rect.js.map +1 -0
- package/dist/virtualizer/reusable-view.d.ts +51 -0
- package/dist/virtualizer/reusable-view.js +81 -0
- package/dist/virtualizer/reusable-view.js.map +1 -0
- package/dist/virtualizer/scroll-anchor.d.ts +98 -0
- package/dist/virtualizer/scroll-anchor.js +150 -0
- package/dist/virtualizer/scroll-anchor.js.map +1 -0
- package/dist/virtualizer/size.d.ts +34 -0
- package/dist/virtualizer/size.js +46 -0
- package/dist/virtualizer/size.js.map +1 -0
- package/dist/virtualizer/types.d.ts +47 -0
- package/dist/virtualizer/types.js +16 -0
- package/dist/virtualizer/utils.d.ts +19 -0
- package/dist/virtualizer/utils.js +27 -0
- package/dist/virtualizer/utils.js.map +1 -0
- package/dist/virtualizer/virtualizer.d.ts +99 -0
- package/dist/virtualizer/virtualizer.js +314 -0
- package/dist/virtualizer/virtualizer.js.map +1 -0
- package/package.json +174 -4
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. 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 http://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
|
+
* Derived from Adobe React Spectrum: packages/react-stately/src/virtualizer/Virtualizer.ts.
|
|
14
|
+
* Modified for Solid Aria: adapted imports, collection descriptors, and reactive state APIs for Solid 2.
|
|
15
|
+
* Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.
|
|
16
|
+
*/
|
|
17
|
+
import { requireValue } from "../utils/require-value.js";
|
|
18
|
+
import { Rect } from "./rect.js";
|
|
19
|
+
import { Size } from "./size.js";
|
|
20
|
+
import { OverscanManager } from "./overscan-manager.js";
|
|
21
|
+
import { RootView } from "./reusable-view.js";
|
|
22
|
+
import { ScrollAnchorTracker } from "./scroll-anchor.js";
|
|
23
|
+
import { isSetEqual } from "./utils.js";
|
|
24
|
+
// src/virtualizer/virtualizer.ts
|
|
25
|
+
/**
|
|
26
|
+
* The Virtualizer class renders a scrollable collection of data using customizable layouts.
|
|
27
|
+
* It supports very large collections by only rendering visible views to the DOM, reusing
|
|
28
|
+
* them as you scroll. Virtualizer can present any type of view, including non-item views
|
|
29
|
+
* such as section headers and footers.
|
|
30
|
+
*
|
|
31
|
+
* Virtualizer uses `Layout` objects to compute what views should be visible, and how
|
|
32
|
+
* to position and style them. This means that virtualizer can have its items arranged in
|
|
33
|
+
* a stack, a grid, a circle, or any other layout you can think of. The layout can be changed
|
|
34
|
+
* dynamically at runtime as well.
|
|
35
|
+
*
|
|
36
|
+
* Layouts produce information on what views should appear in the virtualizer, but do not create the
|
|
37
|
+
* views themselves directly. It is the responsibility of the `VirtualizerDelegate` object to render
|
|
38
|
+
* elements for each layout info. The virtualizer manages a set of `ReusableView` objects, which are
|
|
39
|
+
* reused as the user scrolls by swapping their content with cached elements returned by the
|
|
40
|
+
* delegate.
|
|
41
|
+
*/
|
|
42
|
+
var Virtualizer = class {
|
|
43
|
+
/**
|
|
44
|
+
* The virtualizer delegate. The delegate is used by the virtualizer
|
|
45
|
+
* to create and configure views.
|
|
46
|
+
*/
|
|
47
|
+
delegate;
|
|
48
|
+
/** The current content of the virtualizer. */
|
|
49
|
+
_collection;
|
|
50
|
+
get collection() {
|
|
51
|
+
return this._collection;
|
|
52
|
+
}
|
|
53
|
+
/** The layout object that determines the visible views. */
|
|
54
|
+
_layout;
|
|
55
|
+
get layout() {
|
|
56
|
+
return this._layout;
|
|
57
|
+
}
|
|
58
|
+
/** The size of the scrollable content. */
|
|
59
|
+
_contentSize;
|
|
60
|
+
get contentSize() {
|
|
61
|
+
return this._contentSize;
|
|
62
|
+
}
|
|
63
|
+
/** The currently visible rectangle. */
|
|
64
|
+
_visibleRect;
|
|
65
|
+
get visibleRect() {
|
|
66
|
+
return this._visibleRect;
|
|
67
|
+
}
|
|
68
|
+
/** The size of the virtualizer scroll view. */
|
|
69
|
+
_size;
|
|
70
|
+
get size() {
|
|
71
|
+
return this._size;
|
|
72
|
+
}
|
|
73
|
+
/** The set of persisted keys that are always present in the DOM, even if not currently in view. */
|
|
74
|
+
_persistedKeys;
|
|
75
|
+
get persistedKeys() {
|
|
76
|
+
return this._persistedKeys;
|
|
77
|
+
}
|
|
78
|
+
_visibleViews;
|
|
79
|
+
_renderedContent;
|
|
80
|
+
_rootView;
|
|
81
|
+
_isScrolling;
|
|
82
|
+
_invalidationContext;
|
|
83
|
+
_overscanManager;
|
|
84
|
+
_scrollAnchor;
|
|
85
|
+
constructor(options) {
|
|
86
|
+
this.delegate = options.delegate;
|
|
87
|
+
this._collection = options.collection;
|
|
88
|
+
this._layout = options.layout;
|
|
89
|
+
this._contentSize = new Size();
|
|
90
|
+
this._visibleRect = new Rect();
|
|
91
|
+
this._size = new Size();
|
|
92
|
+
this._persistedKeys = /* @__PURE__ */ new Set();
|
|
93
|
+
this._visibleViews = /* @__PURE__ */ new Map();
|
|
94
|
+
this._renderedContent = /* @__PURE__ */ new WeakMap();
|
|
95
|
+
this._rootView = new RootView(this);
|
|
96
|
+
this._isScrolling = false;
|
|
97
|
+
this._invalidationContext = {};
|
|
98
|
+
this._overscanManager = new OverscanManager();
|
|
99
|
+
this._scrollAnchor = new ScrollAnchorTracker();
|
|
100
|
+
}
|
|
101
|
+
/** Returns whether the given key, or an ancestor, is persisted. */
|
|
102
|
+
isPersistedKey(key) {
|
|
103
|
+
if (this.persistedKeys.has(key)) return true;
|
|
104
|
+
for (let k of this.persistedKeys) while (k !== null && k !== void 0) {
|
|
105
|
+
const layoutInfo = this.layout.getLayoutInfo(k);
|
|
106
|
+
if (!layoutInfo || layoutInfo.parentKey === null || layoutInfo.parentKey === void 0) break;
|
|
107
|
+
k = layoutInfo.parentKey;
|
|
108
|
+
if (k === key) return true;
|
|
109
|
+
}
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
getParentView(layoutInfo) {
|
|
113
|
+
return layoutInfo.parentKey === null || layoutInfo.parentKey === void 0 ? this._rootView : this._visibleViews.get(layoutInfo.parentKey);
|
|
114
|
+
}
|
|
115
|
+
getReusableView(layoutInfo) {
|
|
116
|
+
const parentView = this.getParentView(layoutInfo);
|
|
117
|
+
const view = requireValue(parentView, "Expected parentView to exist.").getReusableView(layoutInfo.type);
|
|
118
|
+
view.layoutInfo = layoutInfo;
|
|
119
|
+
this._renderView(view);
|
|
120
|
+
return view;
|
|
121
|
+
}
|
|
122
|
+
_renderView(reusableView) {
|
|
123
|
+
if (reusableView.layoutInfo) {
|
|
124
|
+
const { type, key, content } = reusableView.layoutInfo;
|
|
125
|
+
reusableView.content = content ?? this.collection.getItem(key);
|
|
126
|
+
reusableView.rendered = this._renderContent(type, reusableView.content);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
_renderContent(type, content) {
|
|
130
|
+
const cached = content === null || content === void 0 ? null : this._renderedContent.get(content);
|
|
131
|
+
if (cached !== null && cached !== void 0) return cached;
|
|
132
|
+
const rendered = this.delegate.renderView(type, content);
|
|
133
|
+
if (content) this._renderedContent.set(content, rendered);
|
|
134
|
+
return rendered;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Returns the key for the item view currently at the given point.
|
|
138
|
+
*/
|
|
139
|
+
keyAtPoint(point) {
|
|
140
|
+
const rect = new Rect(point.x, point.y, 1, 1);
|
|
141
|
+
const layoutInfos = rect.area === 0 ? [] : this.layout.getVisibleLayoutInfos(rect);
|
|
142
|
+
for (const layoutInfo of layoutInfos) if (layoutInfo.rect.intersects(rect)) return layoutInfo.key;
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
relayout(context = {}) {
|
|
146
|
+
const anchorInfo = this.layout.UNSTABLE_getScrollAnchorInfo?.(context.layoutOptions) ?? null;
|
|
147
|
+
let anchor = null;
|
|
148
|
+
if (anchorInfo) {
|
|
149
|
+
const preLayoutInfos = [];
|
|
150
|
+
for (const [key, view] of this._visibleViews) {
|
|
151
|
+
const layoutInfo = this.layout.getLayoutInfo(key) ?? view.layoutInfo;
|
|
152
|
+
if (layoutInfo) preLayoutInfos.push([key, layoutInfo]);
|
|
153
|
+
}
|
|
154
|
+
anchor = this._scrollAnchor.captureBeforeLayout(anchorInfo, preLayoutInfos, this.visibleRect);
|
|
155
|
+
}
|
|
156
|
+
const previousContentSize = this.contentSize;
|
|
157
|
+
const previousVisibleRect = this.visibleRect;
|
|
158
|
+
this.layout.update(context);
|
|
159
|
+
const rawContentSize = this.layout.getContentSize();
|
|
160
|
+
this._contentSize = new Size(rawContentSize.width, rawContentSize.height);
|
|
161
|
+
const target = this._scrollAnchor.resolveAfterLayout({
|
|
162
|
+
anchor,
|
|
163
|
+
anchorInfo,
|
|
164
|
+
contentSize: this.contentSize,
|
|
165
|
+
getLayoutInfo: (key) => this.layout.getLayoutInfo(key),
|
|
166
|
+
isScrolling: this._isScrolling,
|
|
167
|
+
itemSizeChanged: context.itemSizeChanged ?? false,
|
|
168
|
+
postLayoutInfos: anchorInfo ? this.getVisibleLayoutInfos() : /* @__PURE__ */ new Map(),
|
|
169
|
+
previousContentSize,
|
|
170
|
+
previousVisibleRect
|
|
171
|
+
});
|
|
172
|
+
if (target) {
|
|
173
|
+
this.delegate.setVisibleRect(target);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const { visibleRect } = this;
|
|
177
|
+
let contentOffsetX = context.contentChanged === true ? 0 : visibleRect.x;
|
|
178
|
+
let contentOffsetY = context.contentChanged === true ? 0 : visibleRect.y;
|
|
179
|
+
contentOffsetX = Math.max(0, Math.min(this.contentSize.width - visibleRect.width, contentOffsetX));
|
|
180
|
+
contentOffsetY = Math.max(0, Math.min(this.contentSize.height - visibleRect.height, contentOffsetY));
|
|
181
|
+
if (contentOffsetX !== visibleRect.x || contentOffsetY !== visibleRect.y) {
|
|
182
|
+
const rect = new Rect(contentOffsetX, contentOffsetY, visibleRect.width, visibleRect.height);
|
|
183
|
+
this.delegate.setVisibleRect(rect);
|
|
184
|
+
} else this.updateSubviews();
|
|
185
|
+
}
|
|
186
|
+
getVisibleLayoutInfos() {
|
|
187
|
+
const isTestEnv = process.env.NODE_ENV === "test" && (process.env.VIRT_ON === void 0 || process.env.VIRT_ON === "");
|
|
188
|
+
const isClientWidthMocked = isTestEnv && typeof HTMLElement !== "undefined" && Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth");
|
|
189
|
+
const isClientHeightMocked = isTestEnv && typeof HTMLElement !== "undefined" && Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight");
|
|
190
|
+
const rect = isTestEnv && (!isClientWidthMocked || !isClientHeightMocked) ? new Rect(0, 0, this.contentSize.width, this.contentSize.height) : this._overscanManager.getOverscannedRect();
|
|
191
|
+
const layoutInfos = this.layout.getVisibleLayoutInfos(rect);
|
|
192
|
+
const map = /* @__PURE__ */ new Map();
|
|
193
|
+
for (const layoutInfo of layoutInfos) map.set(layoutInfo.key, layoutInfo);
|
|
194
|
+
return map;
|
|
195
|
+
}
|
|
196
|
+
updateSubviews() {
|
|
197
|
+
const visibleLayoutInfos = this.getVisibleLayoutInfos();
|
|
198
|
+
const removed = /* @__PURE__ */ new Set();
|
|
199
|
+
for (const [key, view] of this._visibleViews) {
|
|
200
|
+
const layoutInfo = visibleLayoutInfos.get(key);
|
|
201
|
+
if (!layoutInfo || view.parent !== this.getParentView(layoutInfo)) {
|
|
202
|
+
this._visibleViews.delete(key);
|
|
203
|
+
view.parent.reuseChild(view);
|
|
204
|
+
removed.add(view);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
for (const [key, layoutInfo] of visibleLayoutInfos) {
|
|
208
|
+
let view = this._visibleViews.get(key);
|
|
209
|
+
if (view) {
|
|
210
|
+
view.layoutInfo = layoutInfo;
|
|
211
|
+
const item = this.collection.getItem(layoutInfo.key);
|
|
212
|
+
if (view.content !== item) {
|
|
213
|
+
if (view.content !== null && view.content !== void 0) this._renderedContent.delete(view.content);
|
|
214
|
+
this._renderView(view);
|
|
215
|
+
}
|
|
216
|
+
} else {
|
|
217
|
+
view = this.getReusableView(layoutInfo);
|
|
218
|
+
view.parent.children.add(view);
|
|
219
|
+
this._visibleViews.set(key, view);
|
|
220
|
+
removed.delete(view);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
for (const view of removed) {
|
|
224
|
+
view.parent.children.delete(view);
|
|
225
|
+
view.parent.reusableViews.clear();
|
|
226
|
+
}
|
|
227
|
+
if (!this._isScrolling) for (const key of visibleLayoutInfos.keys()) {
|
|
228
|
+
const view = requireValue(this._visibleViews.get(key), "Visible layout keys must have rendered views.");
|
|
229
|
+
view.parent.children.delete(view);
|
|
230
|
+
view.parent.children.add(view);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/** Performs layout and updates visible views as needed. */
|
|
234
|
+
render(opts) {
|
|
235
|
+
let needsLayout = false;
|
|
236
|
+
let offsetChanged = false;
|
|
237
|
+
let sizeChanged = false;
|
|
238
|
+
let widthChanged = false;
|
|
239
|
+
let heightChanged = false;
|
|
240
|
+
let itemSizeChanged = false;
|
|
241
|
+
let layoutOptionsChanged = false;
|
|
242
|
+
let needsUpdate = false;
|
|
243
|
+
if (opts.collection !== this.collection) {
|
|
244
|
+
this._collection = opts.collection;
|
|
245
|
+
needsLayout = true;
|
|
246
|
+
}
|
|
247
|
+
if (opts.layout !== this.layout || this.layout.virtualizer !== this) {
|
|
248
|
+
this.layout.virtualizer = null;
|
|
249
|
+
opts.layout.virtualizer = this;
|
|
250
|
+
this._layout = opts.layout;
|
|
251
|
+
this._scrollAnchor.reset();
|
|
252
|
+
needsLayout = true;
|
|
253
|
+
}
|
|
254
|
+
if (opts.persistedKeys && !isSetEqual(opts.persistedKeys, this.persistedKeys)) {
|
|
255
|
+
this._persistedKeys = opts.persistedKeys;
|
|
256
|
+
needsUpdate = true;
|
|
257
|
+
}
|
|
258
|
+
if (!this.visibleRect.equals(opts.visibleRect) || !this.size.equals(opts.size)) {
|
|
259
|
+
this._overscanManager.setVisibleRect(opts.visibleRect);
|
|
260
|
+
const oldRect = new Rect(this.visibleRect.x, this.visibleRect.y, this.size.width, this.size.height);
|
|
261
|
+
const newRect = new Rect(opts.visibleRect.x, opts.visibleRect.y, opts.size.width, opts.size.height);
|
|
262
|
+
if (this.layout.shouldInvalidate(newRect, oldRect)) {
|
|
263
|
+
offsetChanged = !opts.visibleRect.pointEquals(this.visibleRect);
|
|
264
|
+
sizeChanged = !this.size.equals(opts.size);
|
|
265
|
+
widthChanged = this.size.width !== opts.size.width;
|
|
266
|
+
heightChanged = this.size.height !== opts.size.height;
|
|
267
|
+
needsLayout = true;
|
|
268
|
+
} else needsUpdate = true;
|
|
269
|
+
this._visibleRect = opts.visibleRect;
|
|
270
|
+
this._size = opts.size;
|
|
271
|
+
}
|
|
272
|
+
const applyInvalidationContext = () => {
|
|
273
|
+
if (opts.invalidationContext !== this._invalidationContext) {
|
|
274
|
+
sizeChanged ||= opts.invalidationContext.sizeChanged === true;
|
|
275
|
+
widthChanged ||= opts.invalidationContext.widthChanged === true;
|
|
276
|
+
heightChanged ||= opts.invalidationContext.heightChanged === true;
|
|
277
|
+
offsetChanged ||= opts.invalidationContext.offsetChanged === true;
|
|
278
|
+
itemSizeChanged ||= opts.invalidationContext.itemSizeChanged === true;
|
|
279
|
+
layoutOptionsChanged ||= opts.invalidationContext.layoutOptions !== null && opts.invalidationContext.layoutOptions !== void 0 && this._invalidationContext.layoutOptions !== null && this._invalidationContext.layoutOptions !== void 0 && opts.invalidationContext.layoutOptions !== this._invalidationContext.layoutOptions && this.layout.shouldInvalidateLayoutOptions(opts.invalidationContext.layoutOptions, this._invalidationContext.layoutOptions);
|
|
280
|
+
needsLayout ||= itemSizeChanged || sizeChanged || offsetChanged || layoutOptionsChanged;
|
|
281
|
+
this._invalidationContext = opts.invalidationContext;
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
applyInvalidationContext();
|
|
285
|
+
if (opts.isScrolling !== this._isScrolling) {
|
|
286
|
+
this._isScrolling = opts.isScrolling;
|
|
287
|
+
if (!opts.isScrolling) needsUpdate = true;
|
|
288
|
+
}
|
|
289
|
+
if (needsLayout) this.relayout({
|
|
290
|
+
heightChanged,
|
|
291
|
+
itemSizeChanged,
|
|
292
|
+
layoutOptions: this._invalidationContext.layoutOptions,
|
|
293
|
+
layoutOptionsChanged,
|
|
294
|
+
offsetChanged,
|
|
295
|
+
sizeChanged,
|
|
296
|
+
widthChanged
|
|
297
|
+
});
|
|
298
|
+
else if (needsUpdate) this.updateSubviews();
|
|
299
|
+
return [...this._rootView.children];
|
|
300
|
+
}
|
|
301
|
+
getVisibleView(key) {
|
|
302
|
+
return this._visibleViews.get(key);
|
|
303
|
+
}
|
|
304
|
+
invalidate(context) {
|
|
305
|
+
this.delegate.invalidate(context);
|
|
306
|
+
}
|
|
307
|
+
updateItemSize(key, size) {
|
|
308
|
+
if (!this.layout.updateItemSize) return;
|
|
309
|
+
if (this.layout.updateItemSize(key, size)) this.invalidate({ itemSizeChanged: true });
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
export { Virtualizer };
|
|
313
|
+
|
|
314
|
+
//# sourceMappingURL=virtualizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualizer.js","names":["generatedContent"],"sources":["../../src/virtualizer/virtualizer.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. 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 http://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 * Derived from Adobe React Spectrum: packages/react-stately/src/virtualizer/Virtualizer.ts.\n * Modified for Solid Aria: adapted imports, collection descriptors, and reactive state APIs for Solid 2.\n * Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.\n */\n\nimport type { Collection, Key } from \"@solid2-aria/types-shared\";\n\nimport { requireValue } from \"../utils/require-value\";\nimport type { Layout } from \"./layout\";\nimport type { LayoutInfo } from \"./layout-info\";\nimport { OverscanManager } from \"./overscan-manager\";\nimport type { Point } from \"./point\";\nimport { Rect } from \"./rect\";\nimport type { ChildView, ReusableView } from \"./reusable-view\";\nimport { RootView } from \"./reusable-view\";\nimport { ScrollAnchorTracker } from \"./scroll-anchor\";\nimport type { ScrollAnchor } from \"./scroll-anchor\";\nimport { Size } from \"./size\";\nimport type {\n InvalidationContext,\n VirtualizerDelegate,\n VirtualizerRenderOptions,\n} from \"./types\";\nimport { isSetEqual } from \"./utils\";\n\ninterface VirtualizerOptions<T extends object, V> {\n delegate: VirtualizerDelegate<T, V>;\n collection: Collection<T>;\n layout: Layout<T>;\n}\n\n/**\n * The Virtualizer class renders a scrollable collection of data using customizable layouts.\n * It supports very large collections by only rendering visible views to the DOM, reusing\n * them as you scroll. Virtualizer can present any type of view, including non-item views\n * such as section headers and footers.\n *\n * Virtualizer uses `Layout` objects to compute what views should be visible, and how\n * to position and style them. This means that virtualizer can have its items arranged in\n * a stack, a grid, a circle, or any other layout you can think of. The layout can be changed\n * dynamically at runtime as well.\n *\n * Layouts produce information on what views should appear in the virtualizer, but do not create the\n * views themselves directly. It is the responsibility of the `VirtualizerDelegate` object to render\n * elements for each layout info. The virtualizer manages a set of `ReusableView` objects, which are\n * reused as the user scrolls by swapping their content with cached elements returned by the\n * delegate.\n */\nexport class Virtualizer<T extends object, V> {\n /**\n * The virtualizer delegate. The delegate is used by the virtualizer\n * to create and configure views.\n */\n delegate: VirtualizerDelegate<T, V>;\n /** The current content of the virtualizer. */\n private _collection: Collection<T>;\n get collection(): Collection<T> {\n return this._collection;\n }\n /** The layout object that determines the visible views. */\n private _layout: Layout<T>;\n get layout(): Layout<T> {\n return this._layout;\n }\n /** The size of the scrollable content. */\n private _contentSize: Size;\n get contentSize(): Size {\n return this._contentSize;\n }\n /** The currently visible rectangle. */\n private _visibleRect: Rect;\n get visibleRect(): Rect {\n return this._visibleRect;\n }\n /** The size of the virtualizer scroll view. */\n private _size: Size;\n get size(): Size {\n return this._size;\n }\n /** The set of persisted keys that are always present in the DOM, even if not currently in view. */\n private _persistedKeys: Set<Key>;\n get persistedKeys(): Set<Key> {\n return this._persistedKeys;\n }\n private readonly _visibleViews: Map<Key, ChildView<T, V>>;\n private readonly _renderedContent: WeakMap<T, V>;\n private readonly _rootView: RootView<T, V>;\n private _isScrolling: boolean;\n private _invalidationContext: InvalidationContext;\n private readonly _overscanManager: OverscanManager;\n private readonly _scrollAnchor: ScrollAnchorTracker;\n constructor(options: VirtualizerOptions<T, V>) {\n this.delegate = options.delegate;\n this._collection = options.collection;\n this._layout = options.layout;\n this._contentSize = new Size();\n this._visibleRect = new Rect();\n this._size = new Size();\n this._persistedKeys = new Set();\n this._visibleViews = new Map();\n this._renderedContent = new WeakMap();\n this._rootView = new RootView(this);\n this._isScrolling = false;\n this._invalidationContext = {};\n this._overscanManager = new OverscanManager();\n this._scrollAnchor = new ScrollAnchorTracker();\n }\n /** Returns whether the given key, or an ancestor, is persisted. */\n isPersistedKey(key: Key): boolean {\n // Quick check if the key is directly in the set of persisted keys.\n if (this.persistedKeys.has(key)) {\n return true;\n }\n\n // If not, check if the key is an ancestor of any of the persisted keys.\n for (let k of this.persistedKeys) {\n while (k !== null && k !== undefined) {\n const layoutInfo = this.layout.getLayoutInfo(k);\n\n if (\n !layoutInfo ||\n layoutInfo.parentKey === null ||\n layoutInfo.parentKey === undefined\n ) {\n break;\n }\n\n k = layoutInfo.parentKey;\n\n if (k === key) {\n return true;\n }\n }\n }\n\n return false;\n }\n private getParentView(\n layoutInfo: LayoutInfo\n ): ReusableView<T, V> | undefined {\n return layoutInfo.parentKey === null || layoutInfo.parentKey === undefined\n ? this._rootView\n : this._visibleViews.get(layoutInfo.parentKey);\n }\n private getReusableView(layoutInfo: LayoutInfo): ChildView<T, V> {\n const parentView = this.getParentView(layoutInfo);\n\n const view = requireValue(\n parentView,\n \"Expected parentView to exist.\"\n ).getReusableView(layoutInfo.type);\n\n view.layoutInfo = layoutInfo;\n this._renderView(view);\n\n return view;\n }\n private _renderView(reusableView: ReusableView<T, V>) {\n if (reusableView.layoutInfo) {\n const { type, key, content } = reusableView.layoutInfo;\n // SAFETY: layouts synthesize content with the attached collection's item type.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n const generatedContent = content as T | null;\n reusableView.content = generatedContent ?? this.collection.getItem(key);\n reusableView.rendered = this._renderContent(type, reusableView.content);\n }\n }\n private _renderContent(type: string, content: T | null) {\n const cached =\n content === null || content === undefined\n ? null\n : this._renderedContent.get(content);\n\n if (cached !== null && cached !== undefined) {\n return cached;\n }\n\n const rendered = this.delegate.renderView(type, content);\n\n if (content) {\n this._renderedContent.set(content, rendered);\n }\n\n return rendered;\n }\n /**\n * Returns the key for the item view currently at the given point.\n */\n keyAtPoint(point: Point): Key | null {\n const rect = new Rect(point.x, point.y, 1, 1);\n\n const layoutInfos =\n rect.area === 0 ? [] : this.layout.getVisibleLayoutInfos(rect);\n\n // Layout may return multiple layout infos in the case of\n // persisted keys, so find the first one that actually intersects.\n for (const layoutInfo of layoutInfos) {\n if (layoutInfo.rect.intersects(rect)) {\n return layoutInfo.key;\n }\n }\n\n return null;\n }\n private relayout(context: InvalidationContext = {}) {\n const anchorInfo =\n this.layout.UNSTABLE_getScrollAnchorInfo?.(context.layoutOptions) ?? null;\n\n // Capture scroll anchor from current (pre-layout) view positions.\n // On first render _visibleViews is empty so no anchor will be found.\n let anchor: ScrollAnchor | null = null;\n\n if (anchorInfo) {\n const preLayoutInfos: [Key, LayoutInfo][] = [];\n\n for (const [key, view] of this._visibleViews) {\n const layoutInfo = this.layout.getLayoutInfo(key) ?? view.layoutInfo;\n\n if (layoutInfo) {\n preLayoutInfos.push([key, layoutInfo]);\n }\n }\n\n anchor = this._scrollAnchor.captureBeforeLayout(\n anchorInfo,\n preLayoutInfos,\n this.visibleRect\n );\n }\n\n const previousContentSize = this.contentSize;\n const previousVisibleRect = this.visibleRect;\n // Update the layout\n this.layout.update(context);\n const rawContentSize = this.layout.getContentSize();\n this._contentSize = new Size(rawContentSize.width, rawContentSize.height);\n\n const target = this._scrollAnchor.resolveAfterLayout({\n anchor,\n anchorInfo,\n contentSize: this.contentSize,\n getLayoutInfo: (key: Key) => this.layout.getLayoutInfo(key),\n isScrolling: this._isScrolling,\n itemSizeChanged: context.itemSizeChanged ?? false,\n postLayoutInfos: anchorInfo\n ? this.getVisibleLayoutInfos()\n : new Map<Key, LayoutInfo>(),\n previousContentSize,\n previousVisibleRect,\n });\n\n if (target) {\n // Queues a new render cycle. Return early to skip updateSubviews — running it now\n // would position views against the old visibleRect, causing a flash before the\n // incoming relayout corrects them.\n this.delegate.setVisibleRect(target);\n\n return;\n }\n\n // Constrain scroll position.\n // If the content changed, scroll to the top.\n const { visibleRect } = this;\n let contentOffsetX = context.contentChanged === true ? 0 : visibleRect.x;\n let contentOffsetY = context.contentChanged === true ? 0 : visibleRect.y;\n contentOffsetX = Math.max(\n 0,\n Math.min(this.contentSize.width - visibleRect.width, contentOffsetX)\n );\n contentOffsetY = Math.max(\n 0,\n Math.min(this.contentSize.height - visibleRect.height, contentOffsetY)\n );\n\n if (contentOffsetX !== visibleRect.x || contentOffsetY !== visibleRect.y) {\n // If the offset changed, trigger a new re-render.\n const rect = new Rect(\n contentOffsetX,\n contentOffsetY,\n visibleRect.width,\n visibleRect.height\n );\n\n this.delegate.setVisibleRect(rect);\n } else {\n this.updateSubviews();\n }\n }\n getVisibleLayoutInfos(): Map<Key, LayoutInfo> {\n const isTestEnv =\n process.env.NODE_ENV === \"test\" &&\n (process.env.VIRT_ON === undefined || process.env.VIRT_ON === \"\");\n\n const isClientWidthMocked =\n isTestEnv &&\n typeof HTMLElement !== \"undefined\" &&\n Object.getOwnPropertyNames(HTMLElement.prototype).includes(\"clientWidth\");\n\n const isClientHeightMocked =\n isTestEnv &&\n typeof HTMLElement !== \"undefined\" &&\n Object.getOwnPropertyNames(HTMLElement.prototype).includes(\n \"clientHeight\"\n );\n\n const rect =\n isTestEnv && (!isClientWidthMocked || !isClientHeightMocked)\n ? new Rect(0, 0, this.contentSize.width, this.contentSize.height)\n : this._overscanManager.getOverscannedRect();\n\n const layoutInfos = this.layout.getVisibleLayoutInfos(rect);\n const map = new Map<Key, LayoutInfo>();\n\n for (const layoutInfo of layoutInfos) {\n map.set(layoutInfo.key, layoutInfo);\n }\n\n return map;\n }\n private updateSubviews() {\n const visibleLayoutInfos = this.getVisibleLayoutInfos();\n const removed = new Set<ChildView<T, V>>();\n\n for (const [key, view] of this._visibleViews) {\n const layoutInfo = visibleLayoutInfos.get(key);\n\n // If a view's parent changed, treat it as a delete and re-create in the new parent.\n if (!layoutInfo || view.parent !== this.getParentView(layoutInfo)) {\n this._visibleViews.delete(key);\n view.parent.reuseChild(view);\n // Defer removing in case we reuse this view.\n removed.add(view);\n }\n }\n\n for (const [key, layoutInfo] of visibleLayoutInfos) {\n let view = this._visibleViews.get(key);\n\n if (view) {\n view.layoutInfo = layoutInfo;\n const item = this.collection.getItem(layoutInfo.key);\n\n if (view.content !== item) {\n if (view.content !== null && view.content !== undefined) {\n this._renderedContent.delete(view.content);\n }\n\n this._renderView(view);\n }\n } else {\n view = this.getReusableView(layoutInfo);\n view.parent.children.add(view);\n this._visibleViews.set(key, view);\n removed.delete(view);\n }\n }\n\n // The remaining views in `removed` were not reused to render new items.\n // They should be removed from the DOM. We also clear the reusable view queue\n // here since there's no point holding onto views that have been removed.\n // Doing so hurts performance in the future when reusing elements due to FIFO order.\n for (const view of removed) {\n view.parent.children.delete(view);\n view.parent.reusableViews.clear();\n }\n\n // Reordering DOM nodes is costly, so we defer this until scrolling stops.\n // DOM order does not affect visual order (due to absolute positioning),\n // but does matter for assistive technology users.\n if (!this._isScrolling) {\n // Layout infos must be in topological order (parents before children).\n for (const key of visibleLayoutInfos.keys()) {\n const view = requireValue(\n this._visibleViews.get(key),\n \"Visible layout keys must have rendered views.\"\n );\n\n view.parent.children.delete(view);\n view.parent.children.add(view);\n }\n }\n }\n /** Performs layout and updates visible views as needed. */\n render(opts: VirtualizerRenderOptions<T>): ReusableView<T, V>[] {\n let needsLayout = false;\n let offsetChanged = false;\n let sizeChanged = false;\n let widthChanged = false;\n let heightChanged = false;\n let itemSizeChanged = false;\n let layoutOptionsChanged = false;\n let needsUpdate = false;\n\n if (opts.collection !== this.collection) {\n this._collection = opts.collection;\n needsLayout = true;\n }\n\n if (opts.layout !== this.layout || this.layout.virtualizer !== this) {\n this.layout.virtualizer = null;\n\n opts.layout.virtualizer = this;\n this._layout = opts.layout;\n this._scrollAnchor.reset();\n needsLayout = true;\n }\n\n if (\n opts.persistedKeys &&\n !isSetEqual(opts.persistedKeys, this.persistedKeys)\n ) {\n this._persistedKeys = opts.persistedKeys;\n needsUpdate = true;\n }\n\n if (\n !this.visibleRect.equals(opts.visibleRect) ||\n !this.size.equals(opts.size)\n ) {\n this._overscanManager.setVisibleRect(opts.visibleRect);\n\n // Create a rectangle using the scroll position and layout size of the scroll view. This is not the same\n // as the visibleRect, whose width and height may change during window scrolling.\n const oldRect = new Rect(\n this.visibleRect.x,\n this.visibleRect.y,\n this.size.width,\n this.size.height\n );\n\n const newRect = new Rect(\n opts.visibleRect.x,\n opts.visibleRect.y,\n opts.size.width,\n opts.size.height\n );\n\n const shouldInvalidate = this.layout.shouldInvalidate(newRect, oldRect);\n\n if (shouldInvalidate) {\n offsetChanged = !opts.visibleRect.pointEquals(this.visibleRect);\n sizeChanged = !this.size.equals(opts.size);\n widthChanged = this.size.width !== opts.size.width;\n heightChanged = this.size.height !== opts.size.height;\n needsLayout = true;\n } else {\n needsUpdate = true;\n }\n\n this._visibleRect = opts.visibleRect;\n this._size = opts.size;\n }\n\n const applyInvalidationContext = () => {\n if (opts.invalidationContext !== this._invalidationContext) {\n sizeChanged ||= opts.invalidationContext.sizeChanged === true;\n widthChanged ||= opts.invalidationContext.widthChanged === true;\n heightChanged ||= opts.invalidationContext.heightChanged === true;\n offsetChanged ||= opts.invalidationContext.offsetChanged === true;\n itemSizeChanged ||= opts.invalidationContext.itemSizeChanged === true;\n layoutOptionsChanged ||=\n opts.invalidationContext.layoutOptions !== null &&\n opts.invalidationContext.layoutOptions !== undefined &&\n this._invalidationContext.layoutOptions !== null &&\n this._invalidationContext.layoutOptions !== undefined &&\n opts.invalidationContext.layoutOptions !==\n this._invalidationContext.layoutOptions &&\n this.layout.shouldInvalidateLayoutOptions(\n opts.invalidationContext.layoutOptions,\n this._invalidationContext.layoutOptions\n );\n needsLayout ||=\n itemSizeChanged ||\n sizeChanged ||\n offsetChanged ||\n layoutOptionsChanged;\n\n this._invalidationContext = opts.invalidationContext;\n }\n };\n\n applyInvalidationContext();\n\n if (opts.isScrolling !== this._isScrolling) {\n this._isScrolling = opts.isScrolling;\n\n if (!opts.isScrolling) {\n // Update to fix the DOM order after scrolling.\n needsUpdate = true;\n }\n }\n\n if (needsLayout) {\n this.relayout({\n heightChanged,\n itemSizeChanged,\n layoutOptions: this._invalidationContext.layoutOptions,\n layoutOptionsChanged,\n offsetChanged,\n sizeChanged,\n widthChanged,\n });\n } else if (needsUpdate) {\n this.updateSubviews();\n }\n\n return [...this._rootView.children];\n }\n getVisibleView(key: Key): ReusableView<T, V> | undefined {\n return this._visibleViews.get(key);\n }\n invalidate(context: InvalidationContext): void {\n this.delegate.invalidate(context);\n }\n updateItemSize(key: Key, size: Size): void {\n if (!this.layout.updateItemSize) {\n return;\n }\n\n const changed = this.layout.updateItemSize(key, size);\n\n if (changed) {\n this.invalidate({\n itemSizeChanged: true,\n });\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,IAAa,cAAb,MAA8C;;;;;CAK5C;;CAEA;CACA,IAAI,aAA4B;EAC9B,OAAO,KAAK;CACd;;CAEA;CACA,IAAI,SAAoB;EACtB,OAAO,KAAK;CACd;;CAEA;CACA,IAAI,cAAoB;EACtB,OAAO,KAAK;CACd;;CAEA;CACA,IAAI,cAAoB;EACtB,OAAO,KAAK;CACd;;CAEA;CACA,IAAI,OAAa;EACf,OAAO,KAAK;CACd;;CAEA;CACA,IAAI,gBAA0B;EAC5B,OAAO,KAAK;CACd;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,YAAY,SAAmC;EAC7C,KAAK,WAAW,QAAQ;EACxB,KAAK,cAAc,QAAQ;EAC3B,KAAK,UAAU,QAAQ;EACvB,KAAK,eAAe,IAAI,KAAK;EAC7B,KAAK,eAAe,IAAI,KAAK;EAC7B,KAAK,QAAQ,IAAI,KAAK;EACtB,KAAK,iCAAiB,IAAI,IAAI;EAC9B,KAAK,gCAAgB,IAAI,IAAI;EAC7B,KAAK,mCAAmB,IAAI,QAAQ;EACpC,KAAK,YAAY,IAAI,SAAS,IAAI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BAAoB,kBACvB,KAAK,qBAAqB,iBAC5B,KAAK,OAAO,8BACV,KAAK,oBAAoB,eACzB,KAAK,qBAAqB,aAC5B;IACF,gBACE,mBACA,eACA,iBACA;IAEF,KAAK,uBAAuB,KAAK;GACnC;EACF;EAEA,yBAAyB;EAEzB,IAAI,KAAK,gBAAgB,KAAK,cAAc;GAC1C,KAAK,eAAe,KAAK;GAEzB,IAAI,CAAC,KAAK,aAER,cAAc;EAElB;EAEA,IAAI,aACF,KAAK,SAAS;GACZ;GACA;GACA,eAAe,KAAK,qBAAqB;GACzC;GACA;GACA;GACA;EACF,CAAC;OACI,IAAI,aACT,KAAK,eAAe;EAGtB,OAAO,CAAC,GAAG,KAAK,UAAU,QAAQ;CACpC;CACA,eAAe,KAA0C;EACvD,OAAO,KAAK,cAAc,IAAI,GAAG;CACnC;CACA,WAAW,SAAoC;EAC7C,KAAK,SAAS,WAAW,OAAO;CAClC;CACA,eAAe,KAAU,MAAkB;EACzC,IAAI,CAAC,KAAK,OAAO,gBACf;EAKF,IAFgB,KAAK,OAAO,eAAe,KAAK,IAEtC,GACR,KAAK,WAAW,EACd,iBAAiB,KACnB,CAAC;CAEL;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,176 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solid2-aria/stately",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"keywords": [
|
|
6
|
+
"solid",
|
|
7
|
+
"solid2-aria",
|
|
8
|
+
"solidjs"
|
|
9
|
+
],
|
|
10
|
+
"license": "(MIT AND Apache-2.0)",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "pekochan069",
|
|
13
|
+
"email": "pekochan069@gmail.com",
|
|
14
|
+
"url": "https://github.com/pekochan069/solid2-aria.git"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/pekochan069/solid2-aria.git",
|
|
19
|
+
"directory": "packages/solid2-stately"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"LICENSE",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"imports": {
|
|
28
|
+
"#*": "./src/*"
|
|
29
|
+
},
|
|
30
|
+
"exports": {
|
|
31
|
+
".": "./dist/index.js",
|
|
32
|
+
"./autocomplete/create-autocomplete-state": "./dist/autocomplete/create-autocomplete-state.js",
|
|
33
|
+
"./calendar/create-calendar-state": "./dist/calendar/create-calendar-state.js",
|
|
34
|
+
"./calendar/create-range-calendar-state": "./dist/calendar/create-range-calendar-state.js",
|
|
35
|
+
"./calendar/types": "./dist/calendar/types.js",
|
|
36
|
+
"./calendar/utils": "./dist/calendar/utils.js",
|
|
37
|
+
"./checkbox/create-checkbox-group-state": "./dist/checkbox/create-checkbox-group-state.js",
|
|
38
|
+
"./collections/collection-builder": "./dist/collections/collection-builder.js",
|
|
39
|
+
"./collections/create-collection": "./dist/collections/create-collection.js",
|
|
40
|
+
"./collections/get-child-nodes": "./dist/collections/get-child-nodes.js",
|
|
41
|
+
"./collections/get-item-count": "./dist/collections/get-item-count.js",
|
|
42
|
+
"./collections/item": "./dist/collections/item.js",
|
|
43
|
+
"./collections/section": "./dist/collections/section.js",
|
|
44
|
+
"./collections/types": "./dist/collections/types.js",
|
|
45
|
+
"./color/color": "./dist/color/color.js",
|
|
46
|
+
"./color/color/base-color": "./dist/color/color/base-color.js",
|
|
47
|
+
"./color/color/color": "./dist/color/color/color.js",
|
|
48
|
+
"./color/color/color-classes": "./dist/color/color/color-classes.js",
|
|
49
|
+
"./color/color/color-constructors": "./dist/color/color/color-constructors.js",
|
|
50
|
+
"./color/color/hsb-color": "./dist/color/color/hsb-color.js",
|
|
51
|
+
"./color/color/hsl-color": "./dist/color/color/hsl-color.js",
|
|
52
|
+
"./color/color/normalize-hue": "./dist/color/color/normalize-hue.js",
|
|
53
|
+
"./color/color/oklch": "./dist/color/color/oklch.js",
|
|
54
|
+
"./color/color/rgb-color": "./dist/color/color/rgb-color.js",
|
|
55
|
+
"./color/create-color": "./dist/color/create-color.js",
|
|
56
|
+
"./color/create-color-area-state": "./dist/color/create-color-area-state.js",
|
|
57
|
+
"./color/create-color-channel-field-state": "./dist/color/create-color-channel-field-state.js",
|
|
58
|
+
"./color/create-color-field-state": "./dist/color/create-color-field-state.js",
|
|
59
|
+
"./color/create-color-picker-state": "./dist/color/create-color-picker-state.js",
|
|
60
|
+
"./color/create-color-slider-state": "./dist/color/create-color-slider-state.js",
|
|
61
|
+
"./color/create-color-wheel-state": "./dist/color/create-color-wheel-state.js",
|
|
62
|
+
"./color/types": "./dist/color/types.js",
|
|
63
|
+
"./combobox/create-combo-box-state": "./dist/combobox/create-combo-box-state.js",
|
|
64
|
+
"./data/create-async-list": "./dist/data/create-async-list.js",
|
|
65
|
+
"./data/create-list-data": "./dist/data/create-list-data.js",
|
|
66
|
+
"./data/create-tree-data": "./dist/data/create-tree-data.js",
|
|
67
|
+
"./datepicker/create-date-field-state": "./dist/datepicker/create-date-field-state.js",
|
|
68
|
+
"./datepicker/create-date-picker-state": "./dist/datepicker/create-date-picker-state.js",
|
|
69
|
+
"./datepicker/create-date-range-picker-state": "./dist/datepicker/create-date-range-picker-state.js",
|
|
70
|
+
"./datepicker/create-time-field-state": "./dist/datepicker/create-time-field-state.js",
|
|
71
|
+
"./datepicker/incomplete-date": "./dist/datepicker/incomplete-date.js",
|
|
72
|
+
"./datepicker/placeholders": "./dist/datepicker/placeholders.js",
|
|
73
|
+
"./datepicker/types": "./dist/datepicker/types.js",
|
|
74
|
+
"./datepicker/utils": "./dist/datepicker/utils.js",
|
|
75
|
+
"./disclosure/create-disclosure-group-state": "./dist/disclosure/create-disclosure-group-state.js",
|
|
76
|
+
"./disclosure/create-disclosure-state": "./dist/disclosure/create-disclosure-state.js",
|
|
77
|
+
"./dnd/create-draggable-collection-state": "./dist/dnd/create-draggable-collection-state.js",
|
|
78
|
+
"./dnd/create-droppable-collection-state": "./dist/dnd/create-droppable-collection-state.js",
|
|
79
|
+
"./flags/flags": "./dist/flags/flags.js",
|
|
80
|
+
"./form/create-form-validation-state": "./dist/form/create-form-validation-state.js",
|
|
81
|
+
"./grid/create-grid-state": "./dist/grid/create-grid-state.js",
|
|
82
|
+
"./grid/grid-collection": "./dist/grid/grid-collection.js",
|
|
83
|
+
"./layout/grid-layout": "./dist/layout/grid-layout.js",
|
|
84
|
+
"./layout/list-layout": "./dist/layout/list-layout.js",
|
|
85
|
+
"./layout/table-layout": "./dist/layout/table-layout.js",
|
|
86
|
+
"./layout/waterfall-layout": "./dist/layout/waterfall-layout.js",
|
|
87
|
+
"./list/create-list-state": "./dist/list/create-list-state.js",
|
|
88
|
+
"./list/create-single-select-list-state": "./dist/list/create-single-select-list-state.js",
|
|
89
|
+
"./list/list-collection": "./dist/list/list-collection.js",
|
|
90
|
+
"./menu/create-menu-trigger-state": "./dist/menu/create-menu-trigger-state.js",
|
|
91
|
+
"./menu/create-submenu-trigger-state": "./dist/menu/create-submenu-trigger-state.js",
|
|
92
|
+
"./numberfield/create-number-field-state": "./dist/numberfield/create-number-field-state.js",
|
|
93
|
+
"./overlays/create-overlay-trigger-state": "./dist/overlays/create-overlay-trigger-state.js",
|
|
94
|
+
"./radio/create-radio-group-state": "./dist/radio/create-radio-group-state.js",
|
|
95
|
+
"./searchfield/create-search-field-state": "./dist/searchfield/create-search-field-state.js",
|
|
96
|
+
"./select/create-select-state": "./dist/select/create-select-state.js",
|
|
97
|
+
"./selection/create-multiple-selection-state": "./dist/selection/create-multiple-selection-state.js",
|
|
98
|
+
"./selection/selection": "./dist/selection/selection.js",
|
|
99
|
+
"./selection/selection-manager": "./dist/selection/selection-manager.js",
|
|
100
|
+
"./selection/types": "./dist/selection/types.js",
|
|
101
|
+
"./slider/create-slider-state": "./dist/slider/create-slider-state.js",
|
|
102
|
+
"./steplist/create-step-list-state": "./dist/steplist/create-step-list-state.js",
|
|
103
|
+
"./table/cell": "./dist/table/cell.js",
|
|
104
|
+
"./table/collection-context": "./dist/table/collection-context.js",
|
|
105
|
+
"./table/column": "./dist/table/column.js",
|
|
106
|
+
"./table/create-table-column-resize-state": "./dist/table/create-table-column-resize-state.js",
|
|
107
|
+
"./table/create-table-state": "./dist/table/create-table-state.js",
|
|
108
|
+
"./table/create-tree-grid-state": "./dist/table/create-tree-grid-state.js",
|
|
109
|
+
"./table/row": "./dist/table/row.js",
|
|
110
|
+
"./table/table-body": "./dist/table/table-body.js",
|
|
111
|
+
"./table/table-collection": "./dist/table/table-collection.js",
|
|
112
|
+
"./table/table-column-layout": "./dist/table/table-column-layout.js",
|
|
113
|
+
"./table/table-header": "./dist/table/table-header.js",
|
|
114
|
+
"./table/table-utils": "./dist/table/table-utils.js",
|
|
115
|
+
"./tabs/create-tab-list-state": "./dist/tabs/create-tab-list-state.js",
|
|
116
|
+
"./toast/create-toast-state": "./dist/toast/create-toast-state.js",
|
|
117
|
+
"./toggle/create-toggle-group-state": "./dist/toggle/create-toggle-group-state.js",
|
|
118
|
+
"./toggle/create-toggle-state": "./dist/toggle/create-toggle-state.js",
|
|
119
|
+
"./tokenfield/create-token-field-state": "./dist/tokenfield/create-token-field-state.js",
|
|
120
|
+
"./tokenfield/token-field-value": "./dist/tokenfield/token-field-value.js",
|
|
121
|
+
"./tooltip/create-tooltip-trigger-state": "./dist/tooltip/create-tooltip-trigger-state.js",
|
|
122
|
+
"./tree/create-tree-state": "./dist/tree/create-tree-state.js",
|
|
123
|
+
"./tree/tree-collection": "./dist/tree/tree-collection.js",
|
|
124
|
+
"./utils/create-controlled-signal": "./dist/utils/create-controlled-signal.js",
|
|
125
|
+
"./utils/get-item-key": "./dist/utils/get-item-key.js",
|
|
126
|
+
"./utils/get-node-props": "./dist/utils/get-node-props.js",
|
|
127
|
+
"./utils/has-content": "./dist/utils/has-content.js",
|
|
128
|
+
"./utils/legacy-props": "./dist/utils/legacy-props.js",
|
|
129
|
+
"./utils/number": "./dist/utils/number.js",
|
|
130
|
+
"./utils/parse-calendar-identifier": "./dist/utils/parse-calendar-identifier.js",
|
|
131
|
+
"./utils/require-value": "./dist/utils/require-value.js",
|
|
132
|
+
"./virtualizer/create-virtualizer-state": "./dist/virtualizer/create-virtualizer-state.js",
|
|
133
|
+
"./virtualizer/layout": "./dist/virtualizer/layout.js",
|
|
134
|
+
"./virtualizer/layout-info": "./dist/virtualizer/layout-info.js",
|
|
135
|
+
"./virtualizer/overscan-manager": "./dist/virtualizer/overscan-manager.js",
|
|
136
|
+
"./virtualizer/point": "./dist/virtualizer/point.js",
|
|
137
|
+
"./virtualizer/rect": "./dist/virtualizer/rect.js",
|
|
138
|
+
"./virtualizer/reusable-view": "./dist/virtualizer/reusable-view.js",
|
|
139
|
+
"./virtualizer/scroll-anchor": "./dist/virtualizer/scroll-anchor.js",
|
|
140
|
+
"./virtualizer/size": "./dist/virtualizer/size.js",
|
|
141
|
+
"./virtualizer/types": "./dist/virtualizer/types.js",
|
|
142
|
+
"./virtualizer/utils": "./dist/virtualizer/utils.js",
|
|
143
|
+
"./virtualizer/virtualizer": "./dist/virtualizer/virtualizer.js",
|
|
144
|
+
"./package.json": "./package.json"
|
|
145
|
+
},
|
|
146
|
+
"publishConfig": {
|
|
147
|
+
"access": "public"
|
|
148
|
+
},
|
|
149
|
+
"scripts": {
|
|
150
|
+
"build": "tsdown",
|
|
151
|
+
"dev": "tsdown --watch",
|
|
152
|
+
"prepack": "bun run build",
|
|
153
|
+
"test": "bun test --conditions=browser --conditions=development",
|
|
154
|
+
"check-types": "tsrs --noEmit",
|
|
155
|
+
"check": "ultracite check",
|
|
156
|
+
"fix": "ultracite fix",
|
|
157
|
+
"generate-intl-barrel-files": "bun scripts/generate-intl-barrel-files.ts",
|
|
158
|
+
"check-port-coverage": "bun scripts/check-port-coverage.ts",
|
|
159
|
+
"check-renderer-independence": "bun run build && bun scripts/check-renderer-independence.ts"
|
|
160
|
+
},
|
|
161
|
+
"dependencies": {
|
|
162
|
+
"@internationalized/date": "^3.12.4",
|
|
163
|
+
"@internationalized/number": "^3.6.9",
|
|
164
|
+
"@internationalized/string": "^3.2.10",
|
|
165
|
+
"@solid2-aria/types-shared": "^0.0.1"
|
|
166
|
+
},
|
|
167
|
+
"devDependencies": {
|
|
168
|
+
"@types/bun": "^1.4.4",
|
|
169
|
+
"tsdown": "^0.23.2",
|
|
170
|
+
"tsrs": "^0.20.0-ts7.1.0-beta",
|
|
171
|
+
"typescript": "^7.1.0-beta"
|
|
172
|
+
},
|
|
173
|
+
"peerDependencies": {
|
|
174
|
+
"solid-js": "^2.0.0-rc.17"
|
|
175
|
+
}
|
|
176
|
+
}
|