@soxa-ui/setup 0.0.0-stage → 0.3.0-beta.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 +63 -2
- package/dist/content/descriptors/components/accordion/accordion.descriptor.d.ts +205 -0
- package/dist/content/descriptors/components/accordion/accordion.descriptor.js +80 -0
- package/dist/content/descriptors/components/accordion/collection.descriptor.d.ts +76 -0
- package/dist/content/descriptors/components/accordion/collection.descriptor.js +60 -0
- package/dist/content/descriptors/components/accordion/index.d.ts +3 -0
- package/dist/content/descriptors/components/accordion/item.descriptor.d.ts +244 -0
- package/dist/content/descriptors/components/accordion/item.descriptor.js +93 -0
- package/dist/content/descriptors/components/button.descriptor.d.ts +192 -0
- package/dist/content/descriptors/components/button.descriptor.js +39 -0
- package/dist/content/descriptors/components/calendar/calendar.descriptor.d.ts +261 -0
- package/dist/content/descriptors/components/calendar/calendar.descriptor.js +142 -0
- package/dist/content/descriptors/components/calendar/collection.descriptor.d.ts +85 -0
- package/dist/content/descriptors/components/calendar/collection.descriptor.js +88 -0
- package/dist/content/descriptors/components/calendar/index.d.ts +3 -0
- package/dist/content/descriptors/components/calendar/item.descriptor.d.ts +154 -0
- package/dist/content/descriptors/components/calendar/item.descriptor.js +65 -0
- package/dist/content/descriptors/components/check-box.descriptor.d.ts +227 -0
- package/dist/content/descriptors/components/check-box.descriptor.js +65 -0
- package/dist/content/descriptors/components/clearable.descriptor.d.ts +213 -0
- package/dist/content/descriptors/components/clearable.descriptor.js +51 -0
- package/dist/content/descriptors/components/collection/collection.descriptor.d.ts +47 -0
- package/dist/content/descriptors/components/collection/collection.descriptor.js +67 -0
- package/dist/content/descriptors/components/collection/index.d.ts +1 -0
- package/dist/content/descriptors/components/component-view.descriptor.d.ts +110 -0
- package/dist/content/descriptors/components/component-view.descriptor.js +103 -0
- package/dist/content/descriptors/components/component.descriptor.d.ts +31 -0
- package/dist/content/descriptors/components/component.descriptor.js +22 -0
- package/dist/content/descriptors/components/control.descriptor.d.ts +135 -0
- package/dist/content/descriptors/components/control.descriptor.js +33 -0
- package/dist/content/descriptors/components/date-input.descriptor.d.ts +319 -0
- package/dist/content/descriptors/components/date-input.descriptor.js +171 -0
- package/dist/content/descriptors/components/date-picker.descriptor.d.ts +445 -0
- package/dist/content/descriptors/components/date-picker.descriptor.js +255 -0
- package/dist/content/descriptors/components/dialog.descriptor.d.ts +256 -0
- package/dist/content/descriptors/components/dialog.descriptor.js +94 -0
- package/dist/content/descriptors/components/drag-and-drop.descriptor.d.ts +49 -0
- package/dist/content/descriptors/components/drag-and-drop.descriptor.js +32 -0
- package/dist/content/descriptors/components/drawer.descriptor.d.ts +244 -0
- package/dist/content/descriptors/components/drawer.descriptor.js +83 -0
- package/dist/content/descriptors/components/entity.descriptor.d.ts +39 -0
- package/dist/content/descriptors/components/entity.descriptor.js +37 -0
- package/dist/content/descriptors/components/field.descriptor.d.ts +192 -0
- package/dist/content/descriptors/components/field.descriptor.js +109 -0
- package/dist/content/descriptors/components/frame.descriptor.d.ts +191 -0
- package/dist/content/descriptors/components/frame.descriptor.js +66 -0
- package/dist/content/descriptors/components/icon.descriptor.d.ts +129 -0
- package/dist/content/descriptors/components/icon.descriptor.js +41 -0
- package/dist/content/descriptors/components/index.d.ts +50 -0
- package/dist/content/descriptors/components/input-control.descriptor.d.ts +176 -0
- package/dist/content/descriptors/components/input-control.descriptor.js +32 -0
- package/dist/content/descriptors/components/input.descriptor.d.ts +241 -0
- package/dist/content/descriptors/components/input.descriptor.js +62 -0
- package/dist/content/descriptors/components/interactive.descriptor.d.ts +100 -0
- package/dist/content/descriptors/components/interactive.descriptor.js +30 -0
- package/dist/content/descriptors/components/item-group.descriptor.d.ts +113 -0
- package/dist/content/descriptors/components/item-group.descriptor.js +44 -0
- package/dist/content/descriptors/components/item-row.descriptor.d.ts +199 -0
- package/dist/content/descriptors/components/item-row.descriptor.js +25 -0
- package/dist/content/descriptors/components/label.descriptor.d.ts +130 -0
- package/dist/content/descriptors/components/label.descriptor.js +41 -0
- package/dist/content/descriptors/components/layer.descriptor.d.ts +99 -0
- package/dist/content/descriptors/components/layer.descriptor.js +27 -0
- package/dist/content/descriptors/components/list-box/collection.descriptor.d.ts +113 -0
- package/dist/content/descriptors/components/list-box/collection.descriptor.js +96 -0
- package/dist/content/descriptors/components/list-box/group.descriptor.d.ts +115 -0
- package/dist/content/descriptors/components/list-box/group.descriptor.js +21 -0
- package/dist/content/descriptors/components/list-box/index.d.ts +4 -0
- package/dist/content/descriptors/components/list-box/item.descriptor.d.ts +219 -0
- package/dist/content/descriptors/components/list-box/item.descriptor.js +66 -0
- package/dist/content/descriptors/components/list-box/list-box.descriptor.d.ts +253 -0
- package/dist/content/descriptors/components/list-box/list-box.descriptor.js +106 -0
- package/dist/content/descriptors/components/list.d.ts +40 -0
- package/dist/content/descriptors/components/list.js +38 -0
- package/dist/content/descriptors/components/menu/checkbox-item.descriptor.d.ts +226 -0
- package/dist/content/descriptors/components/menu/checkbox-item.descriptor.js +43 -0
- package/dist/content/descriptors/components/menu/collection.descriptor.d.ts +201 -0
- package/dist/content/descriptors/components/menu/collection.descriptor.js +101 -0
- package/dist/content/descriptors/components/menu/group.descriptor.d.ts +112 -0
- package/dist/content/descriptors/components/menu/group.descriptor.js +18 -0
- package/dist/content/descriptors/components/menu/index.d.ts +10 -0
- package/dist/content/descriptors/components/menu/item.descriptor.d.ts +195 -0
- package/dist/content/descriptors/components/menu/item.descriptor.js +45 -0
- package/dist/content/descriptors/components/menu/menu.descriptor.d.ts +262 -0
- package/dist/content/descriptors/components/menu/menu.descriptor.js +177 -0
- package/dist/content/descriptors/components/menu/popover-item.descriptor.d.ts +278 -0
- package/dist/content/descriptors/components/menu/popover-item.descriptor.js +87 -0
- package/dist/content/descriptors/components/menu/radio-group.descriptor.d.ts +134 -0
- package/dist/content/descriptors/components/menu/radio-group.descriptor.js +30 -0
- package/dist/content/descriptors/components/menu/radio-item.descriptor.d.ts +236 -0
- package/dist/content/descriptors/components/menu/radio-item.descriptor.js +51 -0
- package/dist/content/descriptors/components/menu/separator.descriptor.d.ts +87 -0
- package/dist/content/descriptors/components/menu/separator.descriptor.js +17 -0
- package/dist/content/descriptors/components/menu/submenu.descriptor.d.ts +336 -0
- package/dist/content/descriptors/components/menu/submenu.descriptor.js +144 -0
- package/dist/content/descriptors/components/modal-layer.descriptor.d.ts +197 -0
- package/dist/content/descriptors/components/modal-layer.descriptor.js +101 -0
- package/dist/content/descriptors/components/number-input.descriptor.d.ts +353 -0
- package/dist/content/descriptors/components/number-input.descriptor.js +209 -0
- package/dist/content/descriptors/components/pagination/collection.descriptor.d.ts +54 -0
- package/dist/content/descriptors/components/pagination/collection.descriptor.js +55 -0
- package/dist/content/descriptors/components/pagination/index.d.ts +3 -0
- package/dist/content/descriptors/components/pagination/item.descriptor.d.ts +156 -0
- package/dist/content/descriptors/components/pagination/item.descriptor.js +68 -0
- package/dist/content/descriptors/components/pagination/pagination.descriptor.d.ts +265 -0
- package/dist/content/descriptors/components/pagination/pagination.descriptor.js +152 -0
- package/dist/content/descriptors/components/popover.descriptor.d.ts +231 -0
- package/dist/content/descriptors/components/popover.descriptor.js +156 -0
- package/dist/content/descriptors/components/progress-linear.descriptor.d.ts +165 -0
- package/dist/content/descriptors/components/progress-linear.descriptor.js +43 -0
- package/dist/content/descriptors/components/progress-spinner.descriptor.d.ts +161 -0
- package/dist/content/descriptors/components/progress-spinner.descriptor.js +36 -0
- package/dist/content/descriptors/components/progress.descriptor.d.ts +149 -0
- package/dist/content/descriptors/components/progress.descriptor.js +53 -0
- package/dist/content/descriptors/components/radio-group/collection.descriptor.d.ts +70 -0
- package/dist/content/descriptors/components/radio-group/collection.descriptor.js +56 -0
- package/dist/content/descriptors/components/radio-group/index.d.ts +3 -0
- package/dist/content/descriptors/components/radio-group/item.descriptor.d.ts +193 -0
- package/dist/content/descriptors/components/radio-group/item.descriptor.js +47 -0
- package/dist/content/descriptors/components/radio-group/radio-group.descriptor.d.ts +197 -0
- package/dist/content/descriptors/components/radio-group/radio-group.descriptor.js +66 -0
- package/dist/content/descriptors/components/rating.descriptor.d.ts +233 -0
- package/dist/content/descriptors/components/rating.descriptor.js +89 -0
- package/dist/content/descriptors/components/scroller.descriptor.d.ts +208 -0
- package/dist/content/descriptors/components/scroller.descriptor.js +91 -0
- package/dist/content/descriptors/components/select/collection.descriptor.d.ts +135 -0
- package/dist/content/descriptors/components/select/collection.descriptor.js +119 -0
- package/dist/content/descriptors/components/select/group.descriptor.d.ts +115 -0
- package/dist/content/descriptors/components/select/group.descriptor.js +21 -0
- package/dist/content/descriptors/components/select/index.d.ts +4 -0
- package/dist/content/descriptors/components/select/item.descriptor.d.ts +210 -0
- package/dist/content/descriptors/components/select/item.descriptor.js +56 -0
- package/dist/content/descriptors/components/select/select.descriptor.d.ts +454 -0
- package/dist/content/descriptors/components/select/select.descriptor.js +267 -0
- package/dist/content/descriptors/components/skeleton.descriptor.d.ts +127 -0
- package/dist/content/descriptors/components/skeleton.descriptor.js +53 -0
- package/dist/content/descriptors/components/slider.descriptor.d.ts +298 -0
- package/dist/content/descriptors/components/slider.descriptor.js +205 -0
- package/dist/content/descriptors/components/stylable.descriptor.d.ts +126 -0
- package/dist/content/descriptors/components/stylable.descriptor.js +52 -0
- package/dist/content/descriptors/components/switch.descriptor.d.ts +217 -0
- package/dist/content/descriptors/components/switch.descriptor.js +53 -0
- package/dist/content/descriptors/components/table/collection.descriptor.d.ts +183 -0
- package/dist/content/descriptors/components/table/collection.descriptor.js +178 -0
- package/dist/content/descriptors/components/table/column.descriptor.d.ts +237 -0
- package/dist/content/descriptors/components/table/column.descriptor.js +173 -0
- package/dist/content/descriptors/components/table/index.d.ts +4 -0
- package/dist/content/descriptors/components/table/row.descriptor.d.ts +166 -0
- package/dist/content/descriptors/components/table/row.descriptor.js +75 -0
- package/dist/content/descriptors/components/table/table.descriptor.d.ts +271 -0
- package/dist/content/descriptors/components/table/table.descriptor.js +164 -0
- package/dist/content/descriptors/components/tabs/collection.descriptor.d.ts +72 -0
- package/dist/content/descriptors/components/tabs/collection.descriptor.js +59 -0
- package/dist/content/descriptors/components/tabs/content.descriptor.d.ts +136 -0
- package/dist/content/descriptors/components/tabs/content.descriptor.js +52 -0
- package/dist/content/descriptors/components/tabs/index.d.ts +4 -0
- package/dist/content/descriptors/components/tabs/item.descriptor.d.ts +213 -0
- package/dist/content/descriptors/components/tabs/item.descriptor.js +67 -0
- package/dist/content/descriptors/components/tabs/tabs.descriptor.d.ts +220 -0
- package/dist/content/descriptors/components/tabs/tabs.descriptor.js +105 -0
- package/dist/content/descriptors/components/tags/collection.descriptor.d.ts +79 -0
- package/dist/content/descriptors/components/tags/collection.descriptor.js +63 -0
- package/dist/content/descriptors/components/tags/index.d.ts +3 -0
- package/dist/content/descriptors/components/tags/item.descriptor.d.ts +216 -0
- package/dist/content/descriptors/components/tags/item.descriptor.js +73 -0
- package/dist/content/descriptors/components/tags/tags.descriptor.d.ts +240 -0
- package/dist/content/descriptors/components/tags/tags.descriptor.js +109 -0
- package/dist/content/descriptors/components/textable.descriptor.d.ts +147 -0
- package/dist/content/descriptors/components/textable.descriptor.js +24 -0
- package/dist/content/descriptors/components/textarea.descriptor.d.ts +249 -0
- package/dist/content/descriptors/components/textarea.descriptor.js +95 -0
- package/dist/content/descriptors/components/toasts/collection.descriptor.d.ts +59 -0
- package/dist/content/descriptors/components/toasts/collection.descriptor.js +39 -0
- package/dist/content/descriptors/components/toasts/index.d.ts +3 -0
- package/dist/content/descriptors/components/toasts/item.descriptor.d.ts +173 -0
- package/dist/content/descriptors/components/toasts/item.descriptor.js +106 -0
- package/dist/content/descriptors/components/toasts/toasts.descriptor.d.ts +167 -0
- package/dist/content/descriptors/components/toasts/toasts.descriptor.js +94 -0
- package/dist/content/descriptors/components/tooltip.descriptor.d.ts +156 -0
- package/dist/content/descriptors/components/tooltip.descriptor.js +83 -0
- package/dist/content/descriptors/components/value-control.descriptor.d.ts +151 -0
- package/dist/content/descriptors/components/value-control.descriptor.js +36 -0
- package/dist/content/descriptors/components/virtual.descriptor.d.ts +55 -0
- package/dist/content/descriptors/components/virtual.descriptor.js +37 -0
- package/dist/content/descriptors/index.d.ts +2 -0
- package/dist/content/descriptors/plugins/accordion-item-ids.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/accordion-item-ids.plugin.js +16 -0
- package/dist/content/descriptors/plugins/action.plugin.d.ts +11 -0
- package/dist/content/descriptors/plugins/action.plugin.js +27 -0
- package/dist/content/descriptors/plugins/anchor.plugin.d.ts +47 -0
- package/dist/content/descriptors/plugins/anchor.plugin.js +73 -0
- package/dist/content/descriptors/plugins/aria.plugin.d.ts +34 -0
- package/dist/content/descriptors/plugins/aria.plugin.js +55 -0
- package/dist/content/descriptors/plugins/calendar-ids.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/calendar-ids.plugin.js +16 -0
- package/dist/content/descriptors/plugins/calendar-keyboard.plugin.d.ts +11 -0
- package/dist/content/descriptors/plugins/calendar-keyboard.plugin.js +18 -0
- package/dist/content/descriptors/plugins/calendar-names.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/calendar-names.plugin.js +17 -0
- package/dist/content/descriptors/plugins/calendar-pointer.plugin.d.ts +11 -0
- package/dist/content/descriptors/plugins/calendar-pointer.plugin.js +18 -0
- package/dist/content/descriptors/plugins/clearable-names.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/clearable-names.plugin.js +17 -0
- package/dist/content/descriptors/plugins/collection-bundles.plugin.d.ts +7 -0
- package/dist/content/descriptors/plugins/collection-bundles.plugin.js +14 -0
- package/dist/content/descriptors/plugins/collection-elements.plugin.d.ts +7 -0
- package/dist/content/descriptors/plugins/collection-elements.plugin.js +14 -0
- package/dist/content/descriptors/plugins/date-input-clipboard.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/date-input-clipboard.plugin.js +16 -0
- package/dist/content/descriptors/plugins/date-input-ids.plugin.d.ts +8 -0
- package/dist/content/descriptors/plugins/date-input-ids.plugin.js +15 -0
- package/dist/content/descriptors/plugins/date-input-keyboard.plugin.d.ts +11 -0
- package/dist/content/descriptors/plugins/date-input-keyboard.plugin.js +18 -0
- package/dist/content/descriptors/plugins/date-input-pointer.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/date-input-pointer.plugin.js +17 -0
- package/dist/content/descriptors/plugins/date-input-touch.plugin.d.ts +12 -0
- package/dist/content/descriptors/plugins/date-input-touch.plugin.js +19 -0
- package/dist/content/descriptors/plugins/date-picker-focus.plugin.d.ts +12 -0
- package/dist/content/descriptors/plugins/date-picker-focus.plugin.js +25 -0
- package/dist/content/descriptors/plugins/date-picker-ids.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/date-picker-ids.plugin.js +17 -0
- package/dist/content/descriptors/plugins/date-picker-names.plugin.d.ts +32 -0
- package/dist/content/descriptors/plugins/date-picker-names.plugin.js +38 -0
- package/dist/content/descriptors/plugins/date-picker-trigger.plugin.d.ts +7 -0
- package/dist/content/descriptors/plugins/date-picker-trigger.plugin.js +20 -0
- package/dist/content/descriptors/plugins/dialog-ids.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/dialog-ids.plugin.js +17 -0
- package/dist/content/descriptors/plugins/dialog-layout.plugin.d.ts +26 -0
- package/dist/content/descriptors/plugins/dialog-layout.plugin.js +34 -0
- package/dist/content/descriptors/plugins/dialog-names.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/dialog-names.plugin.js +16 -0
- package/dist/content/descriptors/plugins/dismiss.plugin.d.ts +34 -0
- package/dist/content/descriptors/plugins/dismiss.plugin.js +51 -0
- package/dist/content/descriptors/plugins/drag.plugin.d.ts +5 -0
- package/dist/content/descriptors/plugins/drag.plugin.js +12 -0
- package/dist/content/descriptors/plugins/drawer-layout.plugin.d.ts +22 -0
- package/dist/content/descriptors/plugins/drawer-layout.plugin.js +28 -0
- package/dist/content/descriptors/plugins/element.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/element.plugin.js +15 -0
- package/dist/content/descriptors/plugins/field-ids.plugin.d.ts +12 -0
- package/dist/content/descriptors/plugins/field-ids.plugin.js +19 -0
- package/dist/content/descriptors/plugins/frame-layout.plugin.d.ts +14 -0
- package/dist/content/descriptors/plugins/frame-layout.plugin.js +18 -0
- package/dist/content/descriptors/plugins/hide-outside.plugin.d.ts +19 -0
- package/dist/content/descriptors/plugins/hide-outside.plugin.js +29 -0
- package/dist/content/descriptors/plugins/icon-layout.plugin.d.ts +15 -0
- package/dist/content/descriptors/plugins/icon-layout.plugin.js +19 -0
- package/dist/content/descriptors/plugins/id.plugin.d.ts +26 -0
- package/dist/content/descriptors/plugins/id.plugin.js +31 -0
- package/dist/content/descriptors/plugins/index.d.ts +114 -0
- package/dist/content/descriptors/plugins/input-bool.plugin.d.ts +7 -0
- package/dist/content/descriptors/plugins/input-bool.plugin.js +14 -0
- package/dist/content/descriptors/plugins/input-control.plugin.d.ts +7 -0
- package/dist/content/descriptors/plugins/input-control.plugin.js +14 -0
- package/dist/content/descriptors/plugins/input.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/input.plugin.js +16 -0
- package/dist/content/descriptors/plugins/item-group-ids.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/item-group-ids.plugin.js +17 -0
- package/dist/content/descriptors/plugins/label-nested-warn.plugin.d.ts +8 -0
- package/dist/content/descriptors/plugins/label-nested-warn.plugin.js +15 -0
- package/dist/content/descriptors/plugins/list-height.plugin.d.ts +8 -0
- package/dist/content/descriptors/plugins/list-height.plugin.js +15 -0
- package/dist/content/descriptors/plugins/list-item.plugin.d.ts +15 -0
- package/dist/content/descriptors/plugins/list-item.plugin.js +19 -0
- package/dist/content/descriptors/plugins/list-keyboard.plugin.d.ts +5 -0
- package/dist/content/descriptors/plugins/list-keyboard.plugin.js +12 -0
- package/dist/content/descriptors/plugins/list-scroll.plugin.d.ts +16 -0
- package/dist/content/descriptors/plugins/list-scroll.plugin.js +23 -0
- package/dist/content/descriptors/plugins/locale.plugin.d.ts +13 -0
- package/dist/content/descriptors/plugins/locale.plugin.js +20 -0
- package/dist/content/descriptors/plugins/menu-focus.plugin.d.ts +11 -0
- package/dist/content/descriptors/plugins/menu-focus.plugin.js +18 -0
- package/dist/content/descriptors/plugins/menu-hover.plugin.d.ts +12 -0
- package/dist/content/descriptors/plugins/menu-hover.plugin.js +19 -0
- package/dist/content/descriptors/plugins/menu-ids.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/menu-ids.plugin.js +17 -0
- package/dist/content/descriptors/plugins/menu-keyboard.plugin.d.ts +15 -0
- package/dist/content/descriptors/plugins/menu-keyboard.plugin.js +22 -0
- package/dist/content/descriptors/plugins/menu-pointer.plugin.d.ts +13 -0
- package/dist/content/descriptors/plugins/menu-pointer.plugin.js +20 -0
- package/dist/content/descriptors/plugins/menu-popover-item-focus.plugin.d.ts +15 -0
- package/dist/content/descriptors/plugins/menu-popover-item-focus.plugin.js +22 -0
- package/dist/content/descriptors/plugins/menu-popover-item-keyboard.plugin.d.ts +13 -0
- package/dist/content/descriptors/plugins/menu-popover-item-keyboard.plugin.js +20 -0
- package/dist/content/descriptors/plugins/menu-popup-ids.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/menu-popup-ids.plugin.js +17 -0
- package/dist/content/descriptors/plugins/menu-submenu-focus.plugin.d.ts +12 -0
- package/dist/content/descriptors/plugins/menu-submenu-focus.plugin.js +19 -0
- package/dist/content/descriptors/plugins/menu-submenu-keyboard.plugin.d.ts +15 -0
- package/dist/content/descriptors/plugins/menu-submenu-keyboard.plugin.js +22 -0
- package/dist/content/descriptors/plugins/modal-focus.plugin.d.ts +11 -0
- package/dist/content/descriptors/plugins/modal-focus.plugin.js +24 -0
- package/dist/content/descriptors/plugins/modal-ids.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/modal-ids.plugin.js +16 -0
- package/dist/content/descriptors/plugins/modal-names.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/modal-names.plugin.js +16 -0
- package/dist/content/descriptors/plugins/number-input-keyboard.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/number-input-keyboard.plugin.js +17 -0
- package/dist/content/descriptors/plugins/number-input-names.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/number-input-names.plugin.js +17 -0
- package/dist/content/descriptors/plugins/number-input-stepper.plugin.d.ts +12 -0
- package/dist/content/descriptors/plugins/number-input-stepper.plugin.js +19 -0
- package/dist/content/descriptors/plugins/number-input-touch.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/number-input-touch.plugin.js +17 -0
- package/dist/content/descriptors/plugins/number-input-typing.plugin.d.ts +11 -0
- package/dist/content/descriptors/plugins/number-input-typing.plugin.js +18 -0
- package/dist/content/descriptors/plugins/option-ids.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/option-ids.plugin.js +16 -0
- package/dist/content/descriptors/plugins/pagination-focus.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/pagination-focus.plugin.js +17 -0
- package/dist/content/descriptors/plugins/pagination-names.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/pagination-names.plugin.js +17 -0
- package/dist/content/descriptors/plugins/popover-focus.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/popover-focus.plugin.js +23 -0
- package/dist/content/descriptors/plugins/popover-ids.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/popover-ids.plugin.js +16 -0
- package/dist/content/descriptors/plugins/popover-names.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/popover-names.plugin.js +16 -0
- package/dist/content/descriptors/plugins/popover-pointer.plugin.d.ts +8 -0
- package/dist/content/descriptors/plugins/popover-pointer.plugin.js +21 -0
- package/dist/content/descriptors/plugins/radio-group-checked.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/radio-group-checked.plugin.js +16 -0
- package/dist/content/descriptors/plugins/radio-group-name.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/radio-group-name.plugin.js +16 -0
- package/dist/content/descriptors/plugins/rating-hover.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/rating-hover.plugin.js +17 -0
- package/dist/content/descriptors/plugins/rating-names.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/rating-names.plugin.js +16 -0
- package/dist/content/descriptors/plugins/rating-validity.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/rating-validity.plugin.js +17 -0
- package/dist/content/descriptors/plugins/ready.plugin.d.ts +7 -0
- package/dist/content/descriptors/plugins/ready.plugin.js +14 -0
- package/dist/content/descriptors/plugins/scroll-lock.plugin.d.ts +18 -0
- package/dist/content/descriptors/plugins/scroll-lock.plugin.js +29 -0
- package/dist/content/descriptors/plugins/scroller-names.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/scroller-names.plugin.js +16 -0
- package/dist/content/descriptors/plugins/scroller-viewport.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/scroller-viewport.plugin.js +16 -0
- package/dist/content/descriptors/plugins/select-backspace.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/select-backspace.plugin.js +25 -0
- package/dist/content/descriptors/plugins/select-editable.plugin.d.ts +18 -0
- package/dist/content/descriptors/plugins/select-editable.plugin.js +31 -0
- package/dist/content/descriptors/plugins/select-ids.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/select-ids.plugin.js +16 -0
- package/dist/content/descriptors/plugins/select-keyboard.plugin.d.ts +21 -0
- package/dist/content/descriptors/plugins/select-keyboard.plugin.js +33 -0
- package/dist/content/descriptors/plugins/select-pointer.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/select-pointer.plugin.js +24 -0
- package/dist/content/descriptors/plugins/skeleton-layout.plugin.d.ts +14 -0
- package/dist/content/descriptors/plugins/skeleton-layout.plugin.js +18 -0
- package/dist/content/descriptors/plugins/slide-keyboard.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/slide-keyboard.plugin.js +16 -0
- package/dist/content/descriptors/plugins/slide-pointer.plugin.d.ts +12 -0
- package/dist/content/descriptors/plugins/slide-pointer.plugin.js +19 -0
- package/dist/content/descriptors/plugins/swipe.plugin.d.ts +13 -0
- package/dist/content/descriptors/plugins/swipe.plugin.js +20 -0
- package/dist/content/descriptors/plugins/table-column-ids.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/table-column-ids.plugin.js +17 -0
- package/dist/content/descriptors/plugins/table-column-names.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/table-column-names.plugin.js +16 -0
- package/dist/content/descriptors/plugins/table-column-reorder.plugin.d.ts +13 -0
- package/dist/content/descriptors/plugins/table-column-reorder.plugin.js +20 -0
- package/dist/content/descriptors/plugins/table-column-resize.plugin.d.ts +12 -0
- package/dist/content/descriptors/plugins/table-column-resize.plugin.js +19 -0
- package/dist/content/descriptors/plugins/table-grid.plugin.d.ts +15 -0
- package/dist/content/descriptors/plugins/table-grid.plugin.js +22 -0
- package/dist/content/descriptors/plugins/table-layout.plugin.d.ts +12 -0
- package/dist/content/descriptors/plugins/table-layout.plugin.js +19 -0
- package/dist/content/descriptors/plugins/table-names.plugin.d.ts +16 -0
- package/dist/content/descriptors/plugins/table-names.plugin.js +20 -0
- package/dist/content/descriptors/plugins/table-row-ids.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/table-row-ids.plugin.js +16 -0
- package/dist/content/descriptors/plugins/tabs-active-tab.plugin.d.ts +5 -0
- package/dist/content/descriptors/plugins/tabs-active-tab.plugin.js +12 -0
- package/dist/content/descriptors/plugins/tabs-content-warn.plugin.d.ts +8 -0
- package/dist/content/descriptors/plugins/tabs-content-warn.plugin.js +15 -0
- package/dist/content/descriptors/plugins/tabs-item-ids.plugin.d.ts +8 -0
- package/dist/content/descriptors/plugins/tabs-item-ids.plugin.js +15 -0
- package/dist/content/descriptors/plugins/tabs-item-names.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/tabs-item-names.plugin.js +16 -0
- package/dist/content/descriptors/plugins/tabs-keyboard.plugin.d.ts +8 -0
- package/dist/content/descriptors/plugins/tabs-keyboard.plugin.js +15 -0
- package/dist/content/descriptors/plugins/tabs-layout.plugin.d.ts +5 -0
- package/dist/content/descriptors/plugins/tabs-layout.plugin.js +12 -0
- package/dist/content/descriptors/plugins/tags-item-names.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/tags-item-names.plugin.js +16 -0
- package/dist/content/descriptors/plugins/tags-keyboard.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/tags-keyboard.plugin.js +16 -0
- package/dist/content/descriptors/plugins/tags-scroll.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/tags-scroll.plugin.js +17 -0
- package/dist/content/descriptors/plugins/textarea-autoresize.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/textarea-autoresize.plugin.js +17 -0
- package/dist/content/descriptors/plugins/textarea-ids.plugin.d.ts +11 -0
- package/dist/content/descriptors/plugins/textarea-ids.plugin.js +18 -0
- package/dist/content/descriptors/plugins/textarea-names.plugin.d.ts +17 -0
- package/dist/content/descriptors/plugins/textarea-names.plugin.js +21 -0
- package/dist/content/descriptors/plugins/toasts-cascade.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/toasts-cascade.plugin.js +17 -0
- package/dist/content/descriptors/plugins/toasts-item-names.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/toasts-item-names.plugin.js +16 -0
- package/dist/content/descriptors/plugins/toasts-keyboard.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/toasts-keyboard.plugin.js +16 -0
- package/dist/content/descriptors/plugins/toasts-layout.plugin.d.ts +16 -0
- package/dist/content/descriptors/plugins/toasts-layout.plugin.js +20 -0
- package/dist/content/descriptors/plugins/toasts-names.plugin.d.ts +8 -0
- package/dist/content/descriptors/plugins/toasts-names.plugin.js +15 -0
- package/dist/content/descriptors/plugins/toasts-removal.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/toasts-removal.plugin.js +16 -0
- package/dist/content/descriptors/plugins/toasts-timer.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/toasts-timer.plugin.js +16 -0
- package/dist/content/descriptors/plugins/tooltip-ids.plugin.d.ts +9 -0
- package/dist/content/descriptors/plugins/tooltip-ids.plugin.js +16 -0
- package/dist/content/descriptors/plugins/tooltip-trigger.plugin.d.ts +10 -0
- package/dist/content/descriptors/plugins/tooltip-trigger.plugin.js +23 -0
- package/dist/content/extensions/collection/collection-item.extension.class.d.ts +64 -0
- package/dist/content/extensions/collection/collection-item.extension.class.js +111 -0
- package/dist/content/extensions/collection/collection.extension.class.d.ts +21 -0
- package/dist/content/extensions/collection/collection.extension.class.js +57 -0
- package/dist/content/extensions/collection/index.d.ts +3 -0
- package/dist/content/extensions/collection/item-props.d.ts +13 -0
- package/dist/content/extensions/collection/item-props.js +20 -0
- package/dist/content/extensions/collection/keys.d.ts +23 -0
- package/dist/content/extensions/collection/keys.js +17 -0
- package/dist/content/extensions/collection/members.class.d.ts +24 -0
- package/dist/content/extensions/collection/members.class.js +18 -0
- package/dist/content/extensions/collection/types.d.ts +41 -0
- package/dist/content/extensions/drag-and-drop/drag-and-drop-collection.extension.class.d.ts +26 -0
- package/dist/content/extensions/drag-and-drop/drag-and-drop-collection.extension.class.js +34 -0
- package/dist/content/extensions/drag-and-drop/drag-and-drop.extension.class.d.ts +21 -0
- package/dist/content/extensions/drag-and-drop/drag-and-drop.extension.class.js +9 -0
- package/dist/content/extensions/drag-and-drop/index.d.ts +3 -0
- package/dist/content/extensions/drag-and-drop/keys.d.ts +15 -0
- package/dist/content/extensions/drag-and-drop/keys.js +9 -0
- package/dist/content/extensions/drag-and-drop/types.d.ts +10 -0
- package/dist/content/extensions/field/field-control.extension.class.d.ts +63 -0
- package/dist/content/extensions/field/field-control.extension.class.js +172 -0
- package/dist/content/extensions/field/field.extension.class.d.ts +21 -0
- package/dist/content/extensions/field/field.extension.class.js +14 -0
- package/dist/content/extensions/field/index.d.ts +3 -0
- package/dist/content/extensions/field/keys.d.ts +14 -0
- package/dist/content/extensions/field/keys.js +8 -0
- package/dist/content/extensions/field/types.d.ts +36 -0
- package/dist/content/extensions/index.d.ts +8 -0
- package/dist/content/extensions/item-group/index.d.ts +2 -0
- package/dist/content/extensions/item-group/item-group.extension.class.d.ts +49 -0
- package/dist/content/extensions/item-group/item-group.extension.class.js +91 -0
- package/dist/content/extensions/item-group/keys.d.ts +15 -0
- package/dist/content/extensions/item-group/keys.js +9 -0
- package/dist/content/extensions/item-group/types.d.ts +34 -0
- package/dist/content/extensions/menu/index.d.ts +3 -0
- package/dist/content/extensions/menu/keys.d.ts +10 -0
- package/dist/content/extensions/menu/keys.js +5 -0
- package/dist/content/extensions/menu/radio-group.extension.class.d.ts +22 -0
- package/dist/content/extensions/menu/radio-group.extension.class.js +9 -0
- package/dist/content/extensions/menu/radio-item.extension.class.d.ts +20 -0
- package/dist/content/extensions/menu/radio-item.extension.class.js +10 -0
- package/dist/content/extensions/menu/types.d.ts +10 -0
- package/dist/content/extensions/tabs/index.d.ts +2 -0
- package/dist/content/extensions/tabs/tabs-content-binding.extension.class.d.ts +69 -0
- package/dist/content/extensions/tabs/tabs-content-binding.extension.class.js +184 -0
- package/dist/content/extensions/tabs/types.d.ts +11 -0
- package/dist/content/extensions/toasts/index.d.ts +3 -0
- package/dist/content/extensions/toasts/keys.d.ts +11 -0
- package/dist/content/extensions/toasts/keys.js +5 -0
- package/dist/content/extensions/toasts/toasts-api.extension.class.d.ts +23 -0
- package/dist/content/extensions/toasts/toasts-api.extension.class.js +9 -0
- package/dist/content/extensions/toasts/types.d.ts +19 -0
- package/dist/content/extensions/virtual/index.d.ts +3 -0
- package/dist/content/extensions/virtual/keys.d.ts +15 -0
- package/dist/content/extensions/virtual/keys.js +8 -0
- package/dist/content/extensions/virtual/types.d.ts +40 -0
- package/dist/content/extensions/virtual/virtual-collection.extension.class.d.ts +33 -0
- package/dist/content/extensions/virtual/virtual-collection.extension.class.js +15 -0
- package/dist/content/extensions/virtual/virtual.extension.class.d.ts +36 -0
- package/dist/content/extensions/virtual/virtual.extension.class.js +74 -0
- package/dist/content/icons/index.d.ts +2 -0
- package/dist/content/icons/roles.d.ts +29 -0
- package/dist/content/icons/roles.js +36 -0
- package/dist/content/index.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +236 -0
- package/dist/protected/adapter/common/index.d.ts +6 -0
- package/dist/protected/adapter/common/parts.d.ts +30 -0
- package/dist/protected/adapter/common/parts.js +35 -0
- package/dist/protected/adapter/common/props.types.d.ts +48 -0
- package/dist/protected/adapter/common/slots.d.ts +25 -0
- package/dist/protected/adapter/common/slots.js +25 -0
- package/dist/protected/adapter/common/slots.types.d.ts +37 -0
- package/dist/protected/adapter/common/state.d.ts +14 -0
- package/dist/protected/adapter/common/state.js +14 -0
- package/dist/protected/adapter/common/state.types.d.ts +39 -0
- package/dist/protected/adapter/context/adapter-context.class.d.ts +68 -0
- package/dist/protected/adapter/context/adapter-context.class.js +118 -0
- package/dist/protected/adapter/context/create-adapter-context.d.ts +34 -0
- package/dist/protected/adapter/context/create-adapter-context.js +91 -0
- package/dist/protected/adapter/context/external-plugins.class.d.ts +51 -0
- package/dist/protected/adapter/context/external-plugins.class.js +80 -0
- package/dist/protected/adapter/context/index.d.ts +2 -0
- package/dist/protected/adapter/context/own-bundle.class.d.ts +25 -0
- package/dist/protected/adapter/context/own-bundle.class.js +86 -0
- package/dist/protected/adapter/context/shared-bundle.class.d.ts +25 -0
- package/dist/protected/adapter/context/shared-bundle.class.js +24 -0
- package/dist/protected/adapter/context/types.d.ts +184 -0
- package/dist/protected/adapter/elevator/elevator.class.d.ts +21 -0
- package/dist/protected/adapter/elevator/elevator.class.js +19 -0
- package/dist/protected/adapter/elevator/index.d.ts +3 -0
- package/dist/protected/adapter/elevator/keys.d.ts +12 -0
- package/dist/protected/adapter/elevator/keys.js +7 -0
- package/dist/protected/adapter/elevator/types.d.ts +31 -0
- package/dist/protected/adapter/exchange/assembling.class.d.ts +39 -0
- package/dist/protected/adapter/exchange/assembling.class.js +55 -0
- package/dist/protected/adapter/exchange/cell.class.d.ts +31 -0
- package/dist/protected/adapter/exchange/cell.class.js +37 -0
- package/dist/protected/adapter/exchange/event-relay.class.d.ts +29 -0
- package/dist/protected/adapter/exchange/event-relay.class.js +53 -0
- package/dist/protected/adapter/exchange/exchange.class.d.ts +78 -0
- package/dist/protected/adapter/exchange/exchange.class.js +129 -0
- package/dist/protected/adapter/exchange/index.d.ts +8 -0
- package/dist/protected/adapter/exchange/input-port.class.d.ts +64 -0
- package/dist/protected/adapter/exchange/input-port.class.js +68 -0
- package/dist/protected/adapter/exchange/line.class.d.ts +53 -0
- package/dist/protected/adapter/exchange/line.class.js +39 -0
- package/dist/protected/adapter/exchange/member.class.d.ts +20 -0
- package/dist/protected/adapter/exchange/member.class.js +11 -0
- package/dist/protected/adapter/exchange/routing.class.d.ts +25 -0
- package/dist/protected/adapter/exchange/routing.class.js +94 -0
- package/dist/protected/adapter/exchange/state-store.class.d.ts +57 -0
- package/dist/protected/adapter/exchange/state-store.class.js +76 -0
- package/dist/protected/adapter/exchange/tap.class.d.ts +54 -0
- package/dist/protected/adapter/exchange/tap.class.js +51 -0
- package/dist/protected/adapter/exchange/types.d.ts +55 -0
- package/dist/protected/adapter/exchange/update-port.class.d.ts +25 -0
- package/dist/protected/adapter/exchange/update-port.class.js +26 -0
- package/dist/protected/adapter/exchange/value.d.ts +17 -0
- package/dist/protected/adapter/exchange/value.js +31 -0
- package/dist/protected/adapter/index.d.ts +5 -0
- package/dist/protected/adapter/surface/index.d.ts +2 -0
- package/dist/protected/adapter/surface/surface.class.d.ts +34 -0
- package/dist/protected/adapter/surface/surface.class.js +87 -0
- package/dist/protected/adapter/surface/types.d.ts +29 -0
- package/dist/protected/define/component-descriptor.class.d.ts +55 -0
- package/dist/protected/define/component-descriptor.class.js +112 -0
- package/dist/protected/define/component.d.ts +14 -0
- package/dist/protected/define/component.js +12 -0
- package/dist/protected/define/contribution.d.ts +20 -0
- package/dist/protected/define/contribution.js +18 -0
- package/dist/protected/define/contribution.types.d.ts +66 -0
- package/dist/protected/define/descriptor.d.ts +21 -0
- package/dist/protected/define/descriptor.js +27 -0
- package/dist/protected/define/index.d.ts +11 -0
- package/dist/protected/define/inference.types.d.ts +247 -0
- package/dist/protected/define/inherit.d.ts +21 -0
- package/dist/protected/define/inherit.js +11 -0
- package/dist/protected/define/name.class.d.ts +21 -0
- package/dist/protected/define/name.class.js +31 -0
- package/dist/protected/define/plugin-definition.class.d.ts +45 -0
- package/dist/protected/define/plugin-definition.class.js +49 -0
- package/dist/protected/define/plugin.d.ts +18 -0
- package/dist/protected/define/plugin.js +20 -0
- package/dist/protected/define/prop-spec.class.d.ts +70 -0
- package/dist/protected/define/prop-spec.class.js +79 -0
- package/dist/protected/define/prop-type.d.ts +12 -0
- package/dist/protected/define/prop-type.js +6 -0
- package/dist/protected/define/slot-declaration.class.d.ts +20 -0
- package/dist/protected/define/slot-declaration.class.js +14 -0
- package/dist/protected/define/types.d.ts +235 -0
- package/dist/protected/index.d.ts +4 -0
- package/dist/protected/naming/common-profile.d.ts +10 -0
- package/dist/protected/naming/common-profile.js +16 -0
- package/dist/protected/naming/index.d.ts +4 -0
- package/dist/protected/naming/naming.d.ts +33 -0
- package/dist/protected/naming/naming.js +34 -0
- package/dist/protected/naming/naming.types.d.ts +49 -0
- package/dist/protected/naming/strategy.types.d.ts +27 -0
- package/dist/protected/registry/extensions.d.ts +29 -0
- package/dist/protected/registry/extensions.js +28 -0
- package/dist/protected/registry/icons.d.ts +44 -0
- package/dist/protected/registry/icons.js +59 -0
- package/dist/protected/registry/index.d.ts +5 -0
- package/dist/protected/registry/plugins.d.ts +40 -0
- package/dist/protected/registry/plugins.js +29 -0
- package/dist/protected/registry/registrations.d.ts +15 -0
- package/dist/protected/registry/registrations.js +30 -0
- package/dist/protected/registry/theme.d.ts +29 -0
- package/dist/protected/registry/theme.js +40 -0
- package/dist/protected/registry/types.d.ts +85 -0
- package/package.json +44 -4
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Профиль фреймворка: стратегия имён, которую даёт адаптер, а применяет общий слой.
|
|
3
|
+
*
|
|
4
|
+
* Ядро и дескриптор говорят на одном языке (`text`, `aria:label`,
|
|
5
|
+
* `change:text`), каждый фреймворк — на своём. Всё, чем фреймворки различаются
|
|
6
|
+
* в именах, собрано в одной константе адаптера (`VueProfile`, `ReactProfile`,
|
|
7
|
+
* …); её идентичность — ключ кэша поверхности.
|
|
8
|
+
*/
|
|
9
|
+
import type { TName } from '../define/name.class';
|
|
10
|
+
/** Правила имён пропсов и событий во фреймворке. */
|
|
11
|
+
export interface INamingStrategy {
|
|
12
|
+
/** Имя пропа: одно во всех фреймворках — `text`, `aria_label` (`underscorePropNaming`). */
|
|
13
|
+
prop(name: TName): string;
|
|
14
|
+
/** Имя события: `change:text` у Vue, `onChangeText` у React, `soChangeText` у Angular. */
|
|
15
|
+
event(name: TName): string;
|
|
16
|
+
}
|
|
17
|
+
export interface IAdapterProfile {
|
|
18
|
+
readonly naming: INamingStrategy;
|
|
19
|
+
/** Как фреймворк называет слот по умолчанию (`children`); не задано — имя не переводится. */
|
|
20
|
+
readonly defaultSlot?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Событие двусторонней привязки по имени пропа во фреймворке (`update:text` у
|
|
23
|
+
* Vue). Привязка — свойство фреймворка: у остальных поля нет, и события
|
|
24
|
+
* привязки у них не существует.
|
|
25
|
+
*/
|
|
26
|
+
readonly model?: (exportName: string) => string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Реестр расширений коллекции, поставленных снаружи на все компоненты типа.
|
|
3
|
+
*
|
|
4
|
+
* useExtensions(TTabs, [(owner) => new TTabsHistoryExtension({ owner })])
|
|
5
|
+
*
|
|
6
|
+
* Пара к `usePlugins`: тип — класс ядра владельца коллекции, кому достаётся
|
|
7
|
+
* регистрация, решает тот же список регистраций. Регистрируется фабрика, а не
|
|
8
|
+
* экземпляр: у каждого движка своё расширение. Фабрика получает владельца —
|
|
9
|
+
* как детали владельца в `custom/<component>/collection/factory.ts` ядра.
|
|
10
|
+
*
|
|
11
|
+
* Ставит расширения слой setup (`TCollectionExtension`), когда движок привязан
|
|
12
|
+
* к компоненту: движок и ядро о реестре не знают (AGENTS.md, «Движок не знает о
|
|
13
|
+
* конкретных расширениях»). Расширение только добавляет: имя, занятое
|
|
14
|
+
* расширением другого класса, — ошибка; то же расширение в том же движке
|
|
15
|
+
* (движок передан двум компонентам) второй раз не ставится.
|
|
16
|
+
*/
|
|
17
|
+
import type { TCollectionEngine } from '@soxa-ui/core';
|
|
18
|
+
import type { IBundleContext } from '../define';
|
|
19
|
+
import type { IPluginRegistrationOptions, TExtensionFactory } from './types';
|
|
20
|
+
/**
|
|
21
|
+
* Поставить расширения в движок каждого компонента типа. Возвращает отмену
|
|
22
|
+
* регистрации; уже поставленные расширения отмена не трогает.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useExtensions<TOwner extends object>(type: abstract new (...args: any[]) => TOwner, factories: readonly TExtensionFactory<TOwner>[], options?: IPluginRegistrationOptions): () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Поставить в движок расширения реестра, подходящие владельцу, в порядке
|
|
27
|
+
* регистрации. Зовёт setup при привязке движка к компоненту.
|
|
28
|
+
*/
|
|
29
|
+
export declare function applyRegisteredExtensions(owner: object, engine: TCollectionEngine<any, any>, context?: IBundleContext): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createRegistrations } from "./registrations.js";
|
|
2
|
+
//#region protected/registry/extensions.ts
|
|
3
|
+
var registrations = createRegistrations();
|
|
4
|
+
/**
|
|
5
|
+
* Поставить расширения в движок каждого компонента типа. Возвращает отмену
|
|
6
|
+
* регистрации; уже поставленные расширения отмена не трогает.
|
|
7
|
+
*/
|
|
8
|
+
function useExtensions(type, factories, options = {}) {
|
|
9
|
+
return registrations.add(type, factories, options);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Поставить в движок расширения реестра, подходящие владельцу, в порядке
|
|
13
|
+
* регистрации. Зовёт setup при привязке движка к компоненту.
|
|
14
|
+
*/
|
|
15
|
+
function applyRegisteredExtensions(owner, engine, context = {}) {
|
|
16
|
+
for (const factory of registrations.select(owner, context)) {
|
|
17
|
+
const extension = factory(owner);
|
|
18
|
+
const present = engine.extensions[extension.name];
|
|
19
|
+
if (present === void 0) {
|
|
20
|
+
engine.use(extension);
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (present instanceof Object && present.constructor === extension.constructor) continue;
|
|
24
|
+
throw new Error(`Расширение «${extension.name}» уже есть в коллекции ${owner.constructor.name}: расширение реестра только добавляет`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { applyRegisteredExtensions, useExtensions };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Реестр иконок: роли как данные, без разметки.
|
|
3
|
+
*
|
|
4
|
+
* Механика одна на все шесть адаптеров: приложение кладёт сюда пакет иконок,
|
|
5
|
+
* компоненты берут значок по роли. Сам список обязательных ролей — контракт,
|
|
6
|
+
* который растёт вместе с компонентами, — лежит в наполнении
|
|
7
|
+
* (`content/icons/roles.ts`): реестр о нём не знает и работает с любой строкой.
|
|
8
|
+
*
|
|
9
|
+
* Живёт в `setup`, потому что фреймворки сюда не импортируются: и пакет, и
|
|
10
|
+
* реестр обязаны работать одинаково во всех шести адаптерах.
|
|
11
|
+
*/
|
|
12
|
+
import type { TIconSource } from './types';
|
|
13
|
+
/**
|
|
14
|
+
* Заглушка для отсутствующей роли.
|
|
15
|
+
*
|
|
16
|
+
* Пустая, но валидная иконка: разметка не ломается, а `console.warn` говорит,
|
|
17
|
+
* чего не хватает. Бросать исключение нельзя — из-за одной иконки упало бы
|
|
18
|
+
* всё приложение.
|
|
19
|
+
*/
|
|
20
|
+
export declare const MISSING_ICON: TIconSource;
|
|
21
|
+
/**
|
|
22
|
+
* Подключает пакет иконок или отдельные роли.
|
|
23
|
+
*
|
|
24
|
+
* Вызывается один раз при старте приложения. Повторный вызов дополняет и
|
|
25
|
+
* перекрывает уже зарегистрированное — так точечная подмена одной иконки не
|
|
26
|
+
* требует пересобирать весь набор:
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* useIcons(material)
|
|
30
|
+
* useIcons({ close: myCloseIcon })
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function useIcons(pack: Partial<Record<string, TIconSource>>): void;
|
|
34
|
+
/**
|
|
35
|
+
* Иконка по роли.
|
|
36
|
+
*
|
|
37
|
+
* Никогда не возвращает `undefined`: у отсутствующей роли своя заглушка, и
|
|
38
|
+
* предупреждение печатается один раз, а не на каждый кадр отрисовки.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getIcon(role: string): TIconSource;
|
|
41
|
+
/** Есть ли роль в реестре. */
|
|
42
|
+
export declare function hasIcon(role: string): boolean;
|
|
43
|
+
/** Очищает реестр. Нужен тестам, чтобы не тянуть состояние между кейсами. */
|
|
44
|
+
export declare function resetIcons(): void;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
//#region protected/registry/icons.ts
|
|
2
|
+
/**
|
|
3
|
+
* Заглушка для отсутствующей роли.
|
|
4
|
+
*
|
|
5
|
+
* Пустая, но валидная иконка: разметка не ломается, а `console.warn` говорит,
|
|
6
|
+
* чего не хватает. Бросать исключение нельзя — из-за одной иконки упало бы
|
|
7
|
+
* всё приложение.
|
|
8
|
+
*/
|
|
9
|
+
var MISSING_ICON = {
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
body: ""
|
|
12
|
+
};
|
|
13
|
+
var registry = /* @__PURE__ */ new Map();
|
|
14
|
+
var reported = /* @__PURE__ */ new Set();
|
|
15
|
+
/**
|
|
16
|
+
* Подключает пакет иконок или отдельные роли.
|
|
17
|
+
*
|
|
18
|
+
* Вызывается один раз при старте приложения. Повторный вызов дополняет и
|
|
19
|
+
* перекрывает уже зарегистрированное — так точечная подмена одной иконки не
|
|
20
|
+
* требует пересобирать весь набор:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* useIcons(material)
|
|
24
|
+
* useIcons({ close: myCloseIcon })
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
function useIcons(pack) {
|
|
28
|
+
for (const [role, source] of Object.entries(pack)) {
|
|
29
|
+
if (!source) continue;
|
|
30
|
+
registry.set(role, source);
|
|
31
|
+
reported.delete(role);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Иконка по роли.
|
|
36
|
+
*
|
|
37
|
+
* Никогда не возвращает `undefined`: у отсутствующей роли своя заглушка, и
|
|
38
|
+
* предупреждение печатается один раз, а не на каждый кадр отрисовки.
|
|
39
|
+
*/
|
|
40
|
+
function getIcon(role) {
|
|
41
|
+
const source = registry.get(role);
|
|
42
|
+
if (source) return source;
|
|
43
|
+
if (!reported.has(role)) {
|
|
44
|
+
reported.add(role);
|
|
45
|
+
console.warn(`[soxa] Иконка «${role}» не зарегистрирована. Вызовите useIcons().`);
|
|
46
|
+
}
|
|
47
|
+
return MISSING_ICON;
|
|
48
|
+
}
|
|
49
|
+
/** Есть ли роль в реестре. */
|
|
50
|
+
function hasIcon(role) {
|
|
51
|
+
return registry.has(role);
|
|
52
|
+
}
|
|
53
|
+
/** Очищает реестр. Нужен тестам, чтобы не тянуть состояние между кейсами. */
|
|
54
|
+
function resetIcons() {
|
|
55
|
+
registry.clear();
|
|
56
|
+
reported.clear();
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { MISSING_ICON, getIcon, hasIcon, resetIcons, useIcons };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { usePlugins, resolveRegisteredPlugins } from './plugins';
|
|
2
|
+
export { useExtensions, applyRegisteredExtensions } from './extensions';
|
|
3
|
+
export { defineTheme, useTheme } from './theme';
|
|
4
|
+
export { MISSING_ICON, getIcon, hasIcon, resetIcons, useIcons } from './icons';
|
|
5
|
+
export type { IPluginRegistrationOptions, IResolvedPlugin, ITheme, IThemeExtensions, IThemePlugins, TExtensionFactory, TIconSource, TPluginScope, TRegisteredPlugin, } from './types';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Реестр плагинов, поставленных снаружи на все компоненты одного типа.
|
|
3
|
+
*
|
|
4
|
+
* usePlugins(TButton, [TTimerPlugin]) // кнопки пользователя
|
|
5
|
+
* usePlugins(TButton, [TRipplePlugin], { scope: 'all' }) // и вложенные тоже
|
|
6
|
+
* usePlugins(TButton, [AnchorPluginDescriptor]) // определением — см. ниже
|
|
7
|
+
*
|
|
8
|
+
* Кому достаётся регистрация — тип, `scope` и признак `embedded`, — решает
|
|
9
|
+
* общий список регистраций (`registrations.ts`).
|
|
10
|
+
*
|
|
11
|
+
* Плагины регистрации ставятся после плагинов дескриптора, в порядке
|
|
12
|
+
* регистрации, до `bundle:create` (`TOwnBundle`). Внешний плагин
|
|
13
|
+
* только добавляет — заменить плагин из состава компонента он не может.
|
|
14
|
+
*
|
|
15
|
+
* Поверхность компонента реестр не меняет. Пропсы и события внешнего плагина —
|
|
16
|
+
* по его контракту (`definePlugin`), через `pluginProps` и `plugin:event`
|
|
17
|
+
* (AGENTS.md, «Внешний плагин: пропсы — `pluginProps`, события — `plugin:event`»). Настраивается
|
|
18
|
+
* он и опциями регистрации.
|
|
19
|
+
*
|
|
20
|
+
* **Плагин с объявленным контрактом ставьте определением, а не классом.**
|
|
21
|
+
* Контракт записывает вызов `definePlugin` при импорте модуля определения, а
|
|
22
|
+
* пакет объявлен `sideEffects: false`: модуль, из которого ничего не взяли,
|
|
23
|
+
* сборщик выбрасывает — вместе с записью контракта. Поставленный по классу,
|
|
24
|
+
* такой плагин работал бы, но `pluginProps` до него молча не доходили бы, и
|
|
25
|
+
* только в продакшен-сборке. Импорт определения держит модуль в бандле.
|
|
26
|
+
*/
|
|
27
|
+
import type { IBundleContext } from '../define';
|
|
28
|
+
import type { IPluginRegistrationOptions, IResolvedPlugin, TRegisteredPlugin } from './types';
|
|
29
|
+
/**
|
|
30
|
+
* Поставить плагины на все компоненты типа. Возвращает отмену регистрации:
|
|
31
|
+
* её зовут, когда плагины больше не нужны новым компонентам (модуль выгружен,
|
|
32
|
+
* тест закончился). Уже собранные наборы отмена не трогает.
|
|
33
|
+
*/
|
|
34
|
+
export declare function usePlugins(type: abstract new (...args: any[]) => object, plugins: readonly TRegisteredPlugin[], options?: IPluginRegistrationOptions): () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Плагины реестра для компонента, в порядке регистрации. Один класс плагина —
|
|
37
|
+
* один раз: у повторной регистрации побеждают опции последней, как у
|
|
38
|
+
* приложения, которое донастраивает плагин темы.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveRegisteredPlugins(instance: object, context?: IBundleContext): IResolvedPlugin[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createRegistrations } from "./registrations.js";
|
|
2
|
+
//#region protected/registry/plugins.ts
|
|
3
|
+
var registrations = createRegistrations();
|
|
4
|
+
/**
|
|
5
|
+
* Поставить плагины на все компоненты типа. Возвращает отмену регистрации:
|
|
6
|
+
* её зовут, когда плагины больше не нужны новым компонентам (модуль выгружен,
|
|
7
|
+
* тест закончился). Уже собранные наборы отмена не трогает.
|
|
8
|
+
*/
|
|
9
|
+
function usePlugins(type, plugins, options = {}) {
|
|
10
|
+
return registrations.add(type, plugins.map((plugin) => "ctor" in plugin ? {
|
|
11
|
+
ctor: plugin.ctor,
|
|
12
|
+
options: plugin.options
|
|
13
|
+
} : { ctor: plugin }), options);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Плагины реестра для компонента, в порядке регистрации. Один класс плагина —
|
|
17
|
+
* один раз: у повторной регистрации побеждают опции последней, как у
|
|
18
|
+
* приложения, которое донастраивает плагин темы.
|
|
19
|
+
*/
|
|
20
|
+
function resolveRegisteredPlugins(instance, context = {}) {
|
|
21
|
+
const resolved = /* @__PURE__ */ new Map();
|
|
22
|
+
for (const plugin of registrations.select(instance, context)) {
|
|
23
|
+
resolved.delete(plugin.ctor);
|
|
24
|
+
resolved.set(plugin.ctor, plugin);
|
|
25
|
+
}
|
|
26
|
+
return [...resolved.values()];
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { resolveRegisteredPlugins, usePlugins };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Список регистраций на тип компонента: отмена и выбор подходящих компоненту.
|
|
3
|
+
*
|
|
4
|
+
* Одно правило на оба реестра — плагинов и расширений коллекции. Компонент
|
|
5
|
+
* получает регистрацию, если он `instanceof` её типа: так подходит и
|
|
6
|
+
* наследник, переданный через `ctrl`. Вложенный компонент — деталь чужой
|
|
7
|
+
* разметки, помеченная признаком `embedded`, — получает только регистрации со
|
|
8
|
+
* `scope: 'all'`; по умолчанию `scope` — `'own'`.
|
|
9
|
+
*
|
|
10
|
+
* Регистрация действует на компоненты, собранные после неё: уже собранных не
|
|
11
|
+
* касаются ни она, ни её отмена.
|
|
12
|
+
*/
|
|
13
|
+
import type { IRegistrations } from './types';
|
|
14
|
+
/** Пустой список регистраций; у каждого реестра свой. */
|
|
15
|
+
export declare function createRegistrations<TEntry>(): IRegistrations<TEntry>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region protected/registry/registrations.ts
|
|
2
|
+
/** Пустой список регистраций; у каждого реестра свой. */
|
|
3
|
+
function createRegistrations() {
|
|
4
|
+
const registrations = [];
|
|
5
|
+
return {
|
|
6
|
+
add(type, entries, options) {
|
|
7
|
+
const registration = {
|
|
8
|
+
type,
|
|
9
|
+
entries,
|
|
10
|
+
scope: options.scope ?? "own"
|
|
11
|
+
};
|
|
12
|
+
registrations.push(registration);
|
|
13
|
+
return () => {
|
|
14
|
+
const index = registrations.indexOf(registration);
|
|
15
|
+
if (index !== -1) registrations.splice(index, 1);
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
select(instance, context) {
|
|
19
|
+
const selected = [];
|
|
20
|
+
for (const { type, entries, scope } of registrations) {
|
|
21
|
+
if (!(instance instanceof type)) continue;
|
|
22
|
+
if (scope === "own" && context.embedded !== void 0) continue;
|
|
23
|
+
selected.push(...entries);
|
|
24
|
+
}
|
|
25
|
+
return selected;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { createRegistrations };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Тема как набор регистраций: плагины и расширения, без которых её CSS не работает.
|
|
3
|
+
*
|
|
4
|
+
* // @soxa-ui/theme-oren/setup
|
|
5
|
+
* export default defineTheme({
|
|
6
|
+
* name: 'oren',
|
|
7
|
+
* plugins: [{ type: TTabs, plugins: [TTabsViewPlugin] }],
|
|
8
|
+
* })
|
|
9
|
+
*
|
|
10
|
+
* // точка входа приложения
|
|
11
|
+
* useTheme(oren)
|
|
12
|
+
*
|
|
13
|
+
* Тема отдаёт CSS и `index.d.ts` (значения оформления), а то, что пишет для её
|
|
14
|
+
* CSS данные в разметку, — плагины — отдаёт этим объектом. Явным экспортом, а
|
|
15
|
+
* не раскладкой файлов по соглашению: сборщик не обходит файлы чужого пакета, и
|
|
16
|
+
* забытый файл не молчал бы, а просто не подключился.
|
|
17
|
+
*
|
|
18
|
+
* `useTheme` — те же `usePlugins`/`useExtensions`, одним вызовом. Умолчание
|
|
19
|
+
* `scope` у темы — `'all'`: тема рисует компонент и там, где он деталь чужой
|
|
20
|
+
* разметки (Tags в поле Select).
|
|
21
|
+
*/
|
|
22
|
+
import type { ITheme } from './types';
|
|
23
|
+
/** Объявить тему. Ничего не регистрирует: подключает её `useTheme`. */
|
|
24
|
+
export declare function defineTheme<T extends ITheme>(theme: T): T;
|
|
25
|
+
/**
|
|
26
|
+
* Подключить тему: зарегистрировать её плагины и расширения. Возвращает
|
|
27
|
+
* отмену всех регистраций темы.
|
|
28
|
+
*/
|
|
29
|
+
export declare function useTheme(theme: ITheme): () => void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { usePlugins } from "./plugins.js";
|
|
2
|
+
import { useExtensions } from "./extensions.js";
|
|
3
|
+
//#region protected/registry/theme.ts
|
|
4
|
+
/**
|
|
5
|
+
* Тема как набор регистраций: плагины и расширения, без которых её CSS не работает.
|
|
6
|
+
*
|
|
7
|
+
* // @soxa-ui/theme-oren/setup
|
|
8
|
+
* export default defineTheme({
|
|
9
|
+
* name: 'oren',
|
|
10
|
+
* plugins: [{ type: TTabs, plugins: [TTabsViewPlugin] }],
|
|
11
|
+
* })
|
|
12
|
+
*
|
|
13
|
+
* // точка входа приложения
|
|
14
|
+
* useTheme(oren)
|
|
15
|
+
*
|
|
16
|
+
* Тема отдаёт CSS и `index.d.ts` (значения оформления), а то, что пишет для её
|
|
17
|
+
* CSS данные в разметку, — плагины — отдаёт этим объектом. Явным экспортом, а
|
|
18
|
+
* не раскладкой файлов по соглашению: сборщик не обходит файлы чужого пакета, и
|
|
19
|
+
* забытый файл не молчал бы, а просто не подключился.
|
|
20
|
+
*
|
|
21
|
+
* `useTheme` — те же `usePlugins`/`useExtensions`, одним вызовом. Умолчание
|
|
22
|
+
* `scope` у темы — `'all'`: тема рисует компонент и там, где он деталь чужой
|
|
23
|
+
* разметки (Tags в поле Select).
|
|
24
|
+
*/
|
|
25
|
+
/** Объявить тему. Ничего не регистрирует: подключает её `useTheme`. */
|
|
26
|
+
function defineTheme(theme) {
|
|
27
|
+
return theme;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Подключить тему: зарегистрировать её плагины и расширения. Возвращает
|
|
31
|
+
* отмену всех регистраций темы.
|
|
32
|
+
*/
|
|
33
|
+
function useTheme(theme) {
|
|
34
|
+
const disposers = [...(theme.plugins ?? []).map(({ type, plugins, scope }) => usePlugins(type, plugins, { scope: scope ?? "all" })), ...(theme.extensions ?? []).map(({ type, extensions, scope }) => useExtensions(type, extensions, { scope: scope ?? "all" }))];
|
|
35
|
+
return () => {
|
|
36
|
+
for (const dispose of disposers) dispose();
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { defineTheme, useTheme };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Контракты реестра: что приложение регистрирует на тип компонента и с какими опциями.
|
|
3
|
+
*/
|
|
4
|
+
import type { IExtension } from '@soxa-ui/core';
|
|
5
|
+
import type { IPluginConstructor } from '@soxa-ui/plugins';
|
|
6
|
+
import type { IBundleContext } from '../define';
|
|
7
|
+
/**
|
|
8
|
+
* Иконка как данные, без разметки.
|
|
9
|
+
*
|
|
10
|
+
* `body` — содержимое `<svg>` без самого тега. Так адаптер сам решает, какие
|
|
11
|
+
* атрибуты повесить на корень: размер, `aria-hidden`, классы. Отдай пакет
|
|
12
|
+
* целую строку `<svg>…</svg>` — и всё это стало бы недоступно.
|
|
13
|
+
*
|
|
14
|
+
* Формат намеренно не привязан ни к фреймворку, ни к сборщику: обычные данные,
|
|
15
|
+
* которые собираются любым бандлером и читаются в Node. Прежний
|
|
16
|
+
* `import '...svg?raw'` понимал только Vite.
|
|
17
|
+
*/
|
|
18
|
+
export type TIconSource = {
|
|
19
|
+
/** Система координат: `viewBox` корневого `<svg>`. */
|
|
20
|
+
viewBox: string;
|
|
21
|
+
/** Содержимое `<svg>`: пути, группы, что угодно. */
|
|
22
|
+
body: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Тип компонента — класс ядра. Сравнение через `instanceof`: объект
|
|
26
|
+
* дескриптора строится заново на каждом монтировании, а класс один.
|
|
27
|
+
*/
|
|
28
|
+
export type TComponentType = abstract new (...args: any[]) => object;
|
|
29
|
+
/** Какие компоненты типа получают плагин. */
|
|
30
|
+
export type TPluginScope = 'own' | 'all';
|
|
31
|
+
export interface IPluginRegistrationOptions {
|
|
32
|
+
/**
|
|
33
|
+
* `'own'` — только компоненты, которые поставил пользователь; `'all'` — и
|
|
34
|
+
* вложенные в разметку других компонентов.
|
|
35
|
+
*/
|
|
36
|
+
scope?: TPluginScope;
|
|
37
|
+
}
|
|
38
|
+
/** Регистрация: записи реестра на тип компонента. */
|
|
39
|
+
export interface IRegistration<TEntry> {
|
|
40
|
+
readonly type: TComponentType;
|
|
41
|
+
readonly entries: readonly TEntry[];
|
|
42
|
+
readonly scope: TPluginScope;
|
|
43
|
+
}
|
|
44
|
+
/** Список регистраций одного реестра. */
|
|
45
|
+
export interface IRegistrations<TEntry> {
|
|
46
|
+
/** Зарегистрировать записи на тип; возвращает отмену регистрации. */
|
|
47
|
+
add(type: TComponentType, entries: readonly TEntry[], options: IPluginRegistrationOptions): () => void;
|
|
48
|
+
/** Записи регистраций, подходящих компоненту, в порядке регистрации. */
|
|
49
|
+
select(instance: object, context: IBundleContext): TEntry[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Плагин регистрации: класс, класс с опциями установки или определение
|
|
53
|
+
* `definePlugin` (у него те же `ctor` и `options`).
|
|
54
|
+
*
|
|
55
|
+
* Поверхность компонента определение не меняет: её объявляет только
|
|
56
|
+
* дескриптор. Определение нужно ради импорта — он держит в бандле модуль, где
|
|
57
|
+
* записан контракт плагина (см. `registry/plugins.ts`).
|
|
58
|
+
*/
|
|
59
|
+
export type TRegisteredPlugin = IPluginConstructor<any, any, any> | {
|
|
60
|
+
readonly ctor: IPluginConstructor<any, any, any>;
|
|
61
|
+
readonly options?: object;
|
|
62
|
+
};
|
|
63
|
+
/** Плагин, который компонент получает из реестра. */
|
|
64
|
+
export interface IResolvedPlugin {
|
|
65
|
+
readonly ctor: IPluginConstructor<any, any, any>;
|
|
66
|
+
readonly options?: object;
|
|
67
|
+
}
|
|
68
|
+
/** Фабрика расширения: владелец коллекции → расширение для его движка. */
|
|
69
|
+
export type TExtensionFactory<TOwner extends object = any> = (owner: TOwner) => IExtension<any>;
|
|
70
|
+
/** Плагины темы на тип компонента. */
|
|
71
|
+
export interface IThemePlugins extends IPluginRegistrationOptions {
|
|
72
|
+
readonly type: TComponentType;
|
|
73
|
+
readonly plugins: readonly TRegisteredPlugin[];
|
|
74
|
+
}
|
|
75
|
+
/** Расширения коллекции темы на тип владельца. */
|
|
76
|
+
export interface IThemeExtensions extends IPluginRegistrationOptions {
|
|
77
|
+
readonly type: TComponentType;
|
|
78
|
+
readonly extensions: readonly TExtensionFactory[];
|
|
79
|
+
}
|
|
80
|
+
export interface ITheme {
|
|
81
|
+
/** Имя темы — для сообщений и отладки. */
|
|
82
|
+
readonly name: string;
|
|
83
|
+
readonly plugins?: readonly IThemePlugins[];
|
|
84
|
+
readonly extensions?: readonly IThemeExtensions[];
|
|
85
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soxa-ui/setup",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.3.0-beta.1",
|
|
4
|
+
"description": "Общее для всех адаптеров: дескрипторы компонентов, их сборка на монтирование и связывание с фреймворком",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"soxa",
|
|
7
|
+
"headless",
|
|
8
|
+
"ui",
|
|
9
|
+
"descriptors"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "Yuri Soldatov",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/youra-h/soxa-ui.git",
|
|
16
|
+
"directory": "packages/setup"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/youra-h/soxa-ui",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/youra-h/soxa-ui/issues"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"type": "module",
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@soxa-ui/core": "0.3.0-beta.1",
|
|
40
|
+
"@soxa-ui/plugins": "0.3.0-beta.1"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "vite build -c vite.lib.config.ts && tsc -p tsconfig.build.json",
|
|
44
|
+
"test": "vitest run"
|
|
45
|
+
}
|
|
46
|
+
}
|