@spinjs/components 0.1.0-preview.2 → 0.2.0-alpha.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/README.md +15 -5
- package/dist/angle-slider/angle-slider.events.d.ts +2 -3
- package/dist/angle-slider/angle-slider.machine.d.ts +4 -5
- package/dist/angle-slider/angle-slider.machine.js +2 -2
- package/dist/angle-slider/angle-slider.presentation.d.ts +10 -11
- package/dist/angle-slider/angle-slider.presentation.js +2 -2
- package/dist/angle-slider/angle-slider.state.d.ts +1 -2
- package/dist/angle-slider/angle-slider.state.js +1 -1
- package/dist/angle-slider/angle-slider.transitions.d.ts +2 -3
- package/dist/angle-slider/examples/basic.html +2 -2
- package/dist/angle-slider/examples/basic.html.js +5 -0
- package/dist/angle-slider/examples/knob.html +1 -1
- package/dist/angle-slider/examples/knob.html.js +5 -0
- package/dist/angle-slider/examples/labeled.html +11 -11
- package/dist/angle-slider/examples/labeled.html.js +5 -0
- package/dist/angle-slider/examples/marks.html +2 -2
- package/dist/angle-slider/examples/marks.html.js +5 -0
- package/dist/async-list/async-list.events.d.ts +2 -3
- package/dist/async-list/async-list.machine.d.ts +2 -3
- package/dist/async-list/async-list.machine.js +1 -1
- package/dist/async-list/async-list.presentation.d.ts +13 -14
- package/dist/async-list/async-list.presentation.js +2 -2
- package/dist/async-list/async-list.state.d.ts +1 -2
- package/dist/async-list/async-list.state.js +1 -1
- package/dist/async-list/async-list.transitions.d.ts +3 -4
- package/dist/async-list/examples/basic.html +7 -7
- package/dist/async-list/examples/basic.html.js +5 -0
- package/dist/avatar/avatar.events.d.ts +2 -3
- package/dist/avatar/avatar.machine.d.ts +12 -4
- package/dist/avatar/avatar.machine.js +1 -1
- package/dist/avatar/avatar.presentation.d.ts +5 -6
- package/dist/avatar/avatar.presentation.js +1 -1
- package/dist/avatar/avatar.state.d.ts +1 -2
- package/dist/avatar/avatar.state.js +1 -1
- package/dist/avatar/avatar.transitions.d.ts +2 -3
- package/dist/avatar/examples/badge.html +2 -2
- package/dist/avatar/examples/badge.html.js +5 -0
- package/dist/avatar/examples/badgeminimal.html +1 -1
- package/dist/avatar/examples/badgeminimal.html.js +5 -0
- package/dist/avatar/examples/basic.html +1 -1
- package/dist/avatar/examples/basic.html.js +5 -0
- package/dist/avatar/examples/count.html +5 -5
- package/dist/avatar/examples/count.html.js +5 -0
- package/dist/avatar/examples/fallback.html +1 -1
- package/dist/avatar/examples/fallback.html.js +5 -0
- package/dist/avatar/examples/group.html +4 -4
- package/dist/avatar/examples/group.html.js +5 -0
- package/dist/avatar/examples/icon.html +2 -2
- package/dist/avatar/examples/icon.html.js +5 -0
- package/dist/avatar/examples/multiples.html +4 -4
- package/dist/avatar/examples/multiples.html.js +5 -0
- package/dist/avatar/examples/pills.html +12 -12
- package/dist/avatar/examples/pills.html.js +5 -0
- package/dist/avatar/examples/pillsolid.html +4 -4
- package/dist/avatar/examples/pillsolid.html.js +5 -0
- package/dist/avatar/examples/rounded.html +1 -1
- package/dist/avatar/examples/rounded.html.js +5 -0
- package/dist/avatar/examples/status.html +2 -2
- package/dist/avatar/examples/status.html.js +5 -0
- package/dist/avatar/examples/statusminimal.html +1 -1
- package/dist/avatar/examples/statusminimal.html.js +5 -0
- package/dist/avatar/examples/trusted.html +6 -6
- package/dist/avatar/examples/trusted.html.js +5 -0
- package/dist/avatar/examples/verification.html +3 -3
- package/dist/avatar/examples/verification.html.js +5 -0
- package/dist/carousel/carousel.events.d.ts +2 -3
- package/dist/carousel/carousel.machine.d.ts +3 -4
- package/dist/carousel/carousel.machine.js +1 -1
- package/dist/carousel/carousel.presentation.d.ts +14 -15
- package/dist/carousel/carousel.presentation.js +2 -2
- package/dist/carousel/carousel.state.d.ts +1 -2
- package/dist/carousel/carousel.state.js +1 -1
- package/dist/carousel/carousel.transitions.d.ts +2 -3
- package/dist/carousel/examples/autoplay.html +8 -8
- package/dist/carousel/examples/autoplay.html.js +5 -0
- package/dist/carousel/examples/basic.html +7 -7
- package/dist/carousel/examples/basic.html.js +5 -0
- package/dist/carousel/examples/cards.html +8 -8
- package/dist/carousel/examples/cards.html.js +5 -0
- package/dist/carousel/examples/hero.html +6 -6
- package/dist/carousel/examples/hero.html.js +5 -0
- package/dist/carousel/examples/infinite.html +7 -7
- package/dist/carousel/examples/infinite.html.js +5 -0
- package/dist/carousel/examples/minimal.html +5 -5
- package/dist/carousel/examples/minimal.html.js +5 -0
- package/dist/carousel/examples/testimonials.html +10 -10
- package/dist/carousel/examples/testimonials.html.js +5 -0
- package/dist/carousel/examples/thumbnails.html +8 -8
- package/dist/carousel/examples/thumbnails.html.js +5 -0
- package/dist/carousel/examples/vertical.html +8 -8
- package/dist/carousel/examples/vertical.html.js +5 -0
- package/dist/cascade-select/cascade.events.d.ts +2 -3
- package/dist/cascade-select/cascade.machine.d.ts +3 -4
- package/dist/cascade-select/cascade.machine.js +1 -1
- package/dist/cascade-select/cascade.presentation.d.ts +8 -9
- package/dist/cascade-select/cascade.presentation.js +12 -12
- package/dist/cascade-select/cascade.state.d.ts +1 -2
- package/dist/cascade-select/cascade.state.js +1 -1
- package/dist/cascade-select/cascade.transitions.d.ts +2 -3
- package/dist/cascade-select/examples/basic.html +13 -11
- package/dist/cascade-select/examples/basic.html.js +5 -0
- package/dist/color-picker/color-picker.events.d.ts +3 -4
- package/dist/color-picker/color-picker.machine.d.ts +3 -3
- package/dist/color-picker/color-picker.machine.js +1 -1
- package/dist/color-picker/color-picker.presentation.d.ts +18 -19
- package/dist/color-picker/color-picker.presentation.js +4 -5
- package/dist/color-picker/color-picker.state.d.ts +2 -3
- package/dist/color-picker/color-picker.state.js +2 -2
- package/dist/color-picker/color-picker.transitions.d.ts +3 -4
- package/dist/color-picker/color.d.ts +39 -0
- package/dist/color-picker/color.js +401 -0
- package/dist/color-picker/examples/basic.html +14 -14
- package/dist/color-picker/examples/basic.html.js +5 -0
- package/dist/color-picker/examples/hue-wheel.html +9 -9
- package/dist/color-picker/examples/hue-wheel.html.js +5 -0
- package/dist/color-picker/examples/inline.html +8 -8
- package/dist/color-picker/examples/inline.html.js +5 -0
- package/dist/color-picker/examples/with-presets.html +10 -10
- package/dist/color-picker/examples/with-presets.html.js +5 -0
- package/dist/combobox/combobox.events.d.ts +2 -3
- package/dist/combobox/combobox.machine.d.ts +3 -4
- package/dist/combobox/combobox.machine.js +1 -1
- package/dist/combobox/combobox.presentation.d.ts +8 -9
- package/dist/combobox/combobox.presentation.js +3 -3
- package/dist/combobox/combobox.state.d.ts +1 -2
- package/dist/combobox/combobox.state.js +1 -1
- package/dist/combobox/combobox.transitions.d.ts +3 -4
- package/dist/combobox/examples/basic.html +7 -7
- package/dist/combobox/examples/basic.html.js +5 -0
- package/dist/combobox/examples/directory.html +7 -7
- package/dist/combobox/examples/directory.html.js +5 -0
- package/dist/combobox/examples/grouping.html +7 -7
- package/dist/combobox/examples/grouping.html.js +5 -0
- package/dist/combobox/examples/multiple.html +8 -8
- package/dist/combobox/examples/multiple.html.js +5 -0
- package/dist/compiler/emit.d.ts +6 -0
- package/dist/compiler/emit.js +217 -0
- package/dist/compiler/transform.d.ts +52 -0
- package/dist/compiler/transform.js +169 -0
- package/dist/controller.d.ts +2 -3
- package/dist/controller.js +1 -1
- package/dist/date-input/date-input.events.d.ts +2 -3
- package/dist/date-input/date-input.machine.d.ts +3 -3
- package/dist/date-input/date-input.machine.js +1 -1
- package/dist/date-input/date-input.presentation.d.ts +6 -7
- package/dist/date-input/date-input.presentation.js +1 -1
- package/dist/date-input/date-input.state.d.ts +1 -2
- package/dist/date-input/date-input.state.js +1 -1
- package/dist/date-input/date-input.transitions.d.ts +3 -4
- package/dist/date-input/examples/basic.html +3 -3
- package/dist/date-input/examples/basic.html.js +5 -0
- package/dist/date-picker/date-picker.events.d.ts +2 -3
- package/dist/date-picker/date-picker.machine.d.ts +2 -3
- package/dist/date-picker/date-picker.machine.js +1 -1
- package/dist/date-picker/date-picker.presentation.d.ts +14 -15
- package/dist/date-picker/date-picker.presentation.js +2 -2
- package/dist/date-picker/date-picker.state.d.ts +1 -2
- package/dist/date-picker/date-picker.state.js +1 -1
- package/dist/date-picker/date-picker.transitions.d.ts +3 -4
- package/dist/date-picker/examples/appointment.html +7 -7
- package/dist/date-picker/examples/appointment.html.js +5 -0
- package/dist/date-picker/examples/basic.html.js +5 -0
- package/dist/date-picker/examples/multiple.html.js +5 -0
- package/dist/date-picker/examples/pricing.html.js +5 -0
- package/dist/date-picker/examples/range.html.js +5 -0
- package/dist/date-picker/examples/unavailable.html.js +5 -0
- package/dist/editable/editable.events.d.ts +2 -3
- package/dist/editable/editable.machine.d.ts +3 -4
- package/dist/editable/editable.machine.js +1 -1
- package/dist/editable/editable.presentation.d.ts +6 -7
- package/dist/editable/editable.presentation.js +1 -1
- package/dist/editable/editable.state.d.ts +1 -2
- package/dist/editable/editable.state.js +1 -1
- package/dist/editable/editable.transitions.d.ts +3 -4
- package/dist/editable/examples/basic.html +7 -7
- package/dist/editable/examples/basic.html.js +5 -0
- package/dist/editable/examples/doubleclick.html +6 -6
- package/dist/editable/examples/doubleclick.html.js +5 -0
- package/dist/editable/examples/inline-edit.html +4 -4
- package/dist/editable/examples/inline-edit.html.js +5 -0
- package/dist/editable/examples/profile-field.html +7 -7
- package/dist/editable/examples/profile-field.html.js +5 -0
- package/dist/editable/examples/resize.html +6 -6
- package/dist/editable/examples/resize.html.js +5 -0
- package/dist/editable/examples/task-item.html +7 -7
- package/dist/editable/examples/task-item.html.js +5 -0
- package/dist/editable/examples/title-editor.html +3 -3
- package/dist/editable/examples/title-editor.html.js +5 -0
- package/dist/editable/examples/with-controls.html +4 -4
- package/dist/editable/examples/with-controls.html.js +5 -0
- package/dist/examples.d.ts +22 -0
- package/dist/examples.js +501 -0
- package/dist/file-upload/examples/avatar.html +8 -8
- package/dist/file-upload/examples/avatar.html.js +5 -0
- package/dist/file-upload/examples/basic.html +8 -8
- package/dist/file-upload/examples/basic.html.js +5 -0
- package/dist/file-upload/examples/directory.html +8 -8
- package/dist/file-upload/examples/directory.html.js +5 -0
- package/dist/file-upload/examples/dragdrop.html +8 -8
- package/dist/file-upload/examples/dragdrop.html.js +5 -0
- package/dist/file-upload/examples/files.html +9 -9
- package/dist/file-upload/examples/files.html.js +5 -0
- package/dist/file-upload/examples/images.html +8 -8
- package/dist/file-upload/examples/images.html.js +5 -0
- package/dist/file-upload/examples/paste.html +8 -8
- package/dist/file-upload/examples/paste.html.js +5 -0
- package/dist/file-upload/examples/table.html +7 -7
- package/dist/file-upload/examples/table.html.js +5 -0
- package/dist/file-upload/file-upload.events.d.ts +2 -3
- package/dist/file-upload/file-upload.machine.d.ts +5 -3
- package/dist/file-upload/file-upload.machine.js +1 -1
- package/dist/file-upload/file-upload.presentation.d.ts +10 -11
- package/dist/file-upload/file-upload.presentation.js +1 -1
- package/dist/file-upload/file-upload.state.d.ts +1 -2
- package/dist/file-upload/file-upload.state.js +1 -1
- package/dist/file-upload/file-upload.transitions.d.ts +3 -4
- package/dist/floating-panel/examples/basic.html +22 -23
- package/dist/floating-panel/examples/basic.html.js +5 -0
- package/dist/floating-panel/examples/calculator.html +41 -41
- package/dist/floating-panel/examples/calculator.html.js +5 -0
- package/dist/floating-panel/examples/chat.html +29 -29
- package/dist/floating-panel/examples/chat.html.js +5 -0
- package/dist/floating-panel/examples/media-player.html +27 -27
- package/dist/floating-panel/examples/media-player.html.js +5 -0
- package/dist/floating-panel/examples/notes.html +36 -36
- package/dist/floating-panel/examples/notes.html.js +5 -0
- package/dist/floating-panel/examples/settings.html +34 -34
- package/dist/floating-panel/examples/settings.html.js +5 -0
- package/dist/floating-panel/examples/task.html +40 -40
- package/dist/floating-panel/examples/task.html.js +5 -0
- package/dist/floating-panel/examples/video-call.html +25 -25
- package/dist/floating-panel/examples/video-call.html.js +5 -0
- package/dist/floating-panel/floating-panel.events.d.ts +2 -3
- package/dist/floating-panel/floating-panel.machine.d.ts +2 -3
- package/dist/floating-panel/floating-panel.machine.js +1 -1
- package/dist/floating-panel/floating-panel.presentation.d.ts +11 -13
- package/dist/floating-panel/floating-panel.presentation.js +3 -6
- package/dist/floating-panel/floating-panel.state.d.ts +1 -2
- package/dist/floating-panel/floating-panel.state.js +1 -1
- package/dist/floating-panel/floating-panel.transitions.d.ts +3 -4
- package/dist/hover-card/examples/basic.html +5 -5
- package/dist/hover-card/examples/basic.html.js +5 -0
- package/dist/hover-card/examples/controlled.html +9 -10
- package/dist/hover-card/examples/controlled.html.js +5 -0
- package/dist/hover-card/examples/custom-positioning.html +8 -8
- package/dist/hover-card/examples/custom-positioning.html.js +5 -0
- package/dist/hover-card/examples/link.html +2 -2
- package/dist/hover-card/examples/link.html.js +5 -0
- package/dist/hover-card/examples/product.html +9 -9
- package/dist/hover-card/examples/product.html.js +5 -0
- package/dist/hover-card/examples/user.html +11 -11
- package/dist/hover-card/examples/user.html.js +5 -0
- package/dist/hover-card/examples/with-arrow.html +9 -9
- package/dist/hover-card/examples/with-arrow.html.js +5 -0
- package/dist/hover-card/hover-card.controller-def.d.ts +2 -4
- package/dist/hover-card/hover-card.controller-def.js +1 -1
- package/dist/image-cropper/crop-geometry.d.ts +1 -2
- package/dist/image-cropper/crop-geometry.js +1 -1
- package/dist/image-cropper/examples/basic.html +3 -3
- package/dist/image-cropper/examples/basic.html.js +5 -0
- package/dist/image-cropper/examples/circle.html +3 -3
- package/dist/image-cropper/examples/circle.html.js +5 -0
- package/dist/image-cropper/image-cropper.events.d.ts +2 -3
- package/dist/image-cropper/image-cropper.machine.d.ts +3 -4
- package/dist/image-cropper/image-cropper.machine.js +2 -2
- package/dist/image-cropper/image-cropper.presentation.d.ts +7 -8
- package/dist/image-cropper/image-cropper.presentation.js +2 -2
- package/dist/image-cropper/image-cropper.state.d.ts +1 -2
- package/dist/image-cropper/image-cropper.state.js +1 -1
- package/dist/image-cropper/image-cropper.transitions.d.ts +3 -4
- package/dist/index.d.ts +28 -13
- package/dist/index.js +21 -14
- package/dist/listbox/examples/basic.html +9 -9
- package/dist/listbox/examples/basic.html.js +5 -0
- package/dist/listbox/examples/controlled.html +9 -9
- package/dist/listbox/examples/controlled.html.js +5 -0
- package/dist/listbox/examples/countries.html +9 -9
- package/dist/listbox/examples/countries.html.js +5 -0
- package/dist/listbox/examples/grouped.html +9 -9
- package/dist/listbox/examples/grouped.html.js +5 -0
- package/dist/listbox/examples/icons.html +10 -10
- package/dist/listbox/examples/icons.html.js +5 -0
- package/dist/listbox/examples/multiple.html +9 -9
- package/dist/listbox/examples/multiple.html.js +5 -0
- package/dist/listbox/examples/priority.html +9 -9
- package/dist/listbox/examples/priority.html.js +5 -0
- package/dist/listbox/examples/settings.html +9 -9
- package/dist/listbox/examples/settings.html.js +5 -0
- package/dist/listbox/listbox.events.d.ts +2 -3
- package/dist/listbox/listbox.machine.d.ts +2 -3
- package/dist/listbox/listbox.machine.js +1 -1
- package/dist/listbox/listbox.presentation.d.ts +6 -5
- package/dist/listbox/listbox.presentation.js +1 -1
- package/dist/listbox/listbox.state.d.ts +1 -2
- package/dist/listbox/listbox.state.js +1 -1
- package/dist/listbox/listbox.transitions.d.ts +3 -4
- package/dist/menu/examples/basic.html +15 -13
- package/dist/menu/examples/basic.html.js +5 -0
- package/dist/menu/examples/context.html +14 -12
- package/dist/menu/examples/context.html.js +5 -0
- package/dist/menu/examples/groups.html +15 -13
- package/dist/menu/examples/groups.html.js +5 -0
- package/dist/menu/examples/icons.html +17 -15
- package/dist/menu/examples/icons.html.js +5 -0
- package/dist/menu/examples/nested.html +15 -13
- package/dist/menu/examples/nested.html.js +5 -0
- package/dist/menu/examples/user.html +21 -19
- package/dist/menu/examples/user.html.js +5 -0
- package/dist/menu/menu.events.d.ts +2 -3
- package/dist/menu/menu.machine.d.ts +2 -3
- package/dist/menu/menu.machine.js +1 -1
- package/dist/menu/menu.presentation.d.ts +6 -8
- package/dist/menu/menu.presentation.js +4 -5
- package/dist/menu/menu.state.d.ts +1 -2
- package/dist/menu/menu.state.js +1 -1
- package/dist/mode-picker/examples/basic.html +1 -1
- package/dist/mode-picker/examples/basic.html.js +5 -0
- package/dist/mode-picker/examples/minimal.html +1 -1
- package/dist/mode-picker/examples/minimal.html.js +5 -0
- package/dist/mode-picker/examples/pill.html +1 -1
- package/dist/mode-picker/examples/pill.html.js +5 -0
- package/dist/mode-picker/mode-picker.events.d.ts +2 -3
- package/dist/mode-picker/mode-picker.machine.d.ts +3 -3
- package/dist/mode-picker/mode-picker.machine.js +1 -1
- package/dist/mode-picker/mode-picker.presentation.d.ts +7 -8
- package/dist/mode-picker/mode-picker.presentation.js +2 -2
- package/dist/mode-picker/mode-picker.state.d.ts +1 -2
- package/dist/mode-picker/mode-picker.transitions.d.ts +3 -4
- package/dist/navigation-menu/examples/basic.html +6 -6
- package/dist/navigation-menu/examples/basic.html.js +5 -0
- package/dist/navigation-menu/examples/grouped.html +14 -12
- package/dist/navigation-menu/examples/grouped.html.js +5 -0
- package/dist/navigation-menu/examples/minimal.html +7 -5
- package/dist/navigation-menu/examples/minimal.html.js +5 -0
- package/dist/navigation-menu/navigation-menu.events.d.ts +2 -3
- package/dist/navigation-menu/navigation-menu.machine.d.ts +3 -3
- package/dist/navigation-menu/navigation-menu.machine.js +1 -1
- package/dist/navigation-menu/navigation-menu.presentation.d.ts +6 -7
- package/dist/navigation-menu/navigation-menu.presentation.js +2 -2
- package/dist/navigation-menu/navigation-menu.state.d.ts +1 -2
- package/dist/navigation-menu/navigation-menu.state.js +1 -1
- package/dist/navigation-menu/navigation-menu.transitions.d.ts +3 -4
- package/dist/number-input/examples/basic.html +10 -10
- package/dist/number-input/examples/basic.html.js +5 -0
- package/dist/number-input/examples/currency.html +6 -6
- package/dist/number-input/examples/currency.html.js +5 -0
- package/dist/number-input/examples/decimal.html +4 -4
- package/dist/number-input/examples/decimal.html.js +5 -0
- package/dist/number-input/examples/limits.html +6 -6
- package/dist/number-input/examples/limits.html.js +5 -0
- package/dist/number-input/examples/percentage.html +6 -6
- package/dist/number-input/examples/percentage.html.js +5 -0
- package/dist/number-input/examples/quantity.html +6 -6
- package/dist/number-input/examples/quantity.html.js +5 -0
- package/dist/number-input/examples/scrubber.html +11 -11
- package/dist/number-input/examples/scrubber.html.js +5 -0
- package/dist/number-input/examples/wheel.html +7 -7
- package/dist/number-input/examples/wheel.html.js +5 -0
- package/dist/number-input/number-input.events.d.ts +2 -3
- package/dist/number-input/number-input.machine.d.ts +4 -4
- package/dist/number-input/number-input.machine.js +1 -1
- package/dist/number-input/number-input.presentation.d.ts +7 -8
- package/dist/number-input/number-input.presentation.js +4 -4
- package/dist/number-input/number-input.state.d.ts +1 -2
- package/dist/number-input/number-input.state.js +1 -1
- package/dist/number-input/number-input.transitions.d.ts +3 -4
- package/dist/pagination/examples/basic.html +2 -2
- package/dist/pagination/examples/basic.html.js +5 -0
- package/dist/pagination/examples/dropdown.html +2 -2
- package/dist/pagination/examples/dropdown.html.js +5 -0
- package/dist/pagination/examples/info.html +3 -3
- package/dist/pagination/examples/info.html.js +5 -0
- package/dist/pagination/examples/jump.html +2 -2
- package/dist/pagination/examples/jump.html.js +5 -0
- package/dist/pagination/examples/numbered.html +2 -2
- package/dist/pagination/examples/numbered.html.js +5 -0
- package/dist/pagination/examples/pagesize.html +4 -4
- package/dist/pagination/examples/pagesize.html.js +5 -0
- package/dist/pagination/pagination.events.d.ts +2 -3
- package/dist/pagination/pagination.machine.d.ts +4 -4
- package/dist/pagination/pagination.machine.js +1 -1
- package/dist/pagination/pagination.presentation.d.ts +4 -5
- package/dist/pagination/pagination.presentation.js +1 -1
- package/dist/pagination/pagination.state.d.ts +1 -2
- package/dist/pagination/pagination.state.js +1 -1
- package/dist/pagination/pagination.transitions.d.ts +2 -3
- package/dist/pin-input/examples/basic.html +2 -2
- package/dist/pin-input/examples/basic.html.js +5 -0
- package/dist/pin-input/examples/field.html +4 -4
- package/dist/pin-input/examples/field.html.js +5 -0
- package/dist/pin-input/examples/masked.html +3 -3
- package/dist/pin-input/examples/masked.html.js +5 -0
- package/dist/pin-input/examples/placeholder.html +3 -3
- package/dist/pin-input/examples/placeholder.html.js +5 -0
- package/dist/pin-input/examples/twofactor.html +4 -4
- package/dist/pin-input/examples/twofactor.html.js +5 -0
- package/dist/pin-input/examples/verification.html +6 -6
- package/dist/pin-input/examples/verification.html.js +5 -0
- package/dist/pin-input/pin-input.events.d.ts +2 -3
- package/dist/pin-input/pin-input.machine.d.ts +3 -3
- package/dist/pin-input/pin-input.machine.js +1 -1
- package/dist/pin-input/pin-input.presentation.d.ts +4 -5
- package/dist/pin-input/pin-input.presentation.js +2 -2
- package/dist/pin-input/pin-input.state.d.ts +1 -2
- package/dist/pin-input/pin-input.state.js +1 -1
- package/dist/pin-input/pin-input.transitions.d.ts +1 -2
- package/dist/popover/examples/basic.html +4 -4
- package/dist/popover/examples/basic.html.js +5 -0
- package/dist/popover/examples/feedback.html +5 -5
- package/dist/popover/examples/feedback.html.js +5 -0
- package/dist/popover/examples/notifications.html +5 -5
- package/dist/popover/examples/notifications.html.js +5 -0
- package/dist/popover/examples/settings.html +8 -8
- package/dist/popover/examples/settings.html.js +5 -0
- package/dist/popover/examples/share.html +5 -5
- package/dist/popover/examples/share.html.js +5 -0
- package/dist/popover/examples/user.html +10 -10
- package/dist/popover/examples/user.html.js +5 -0
- package/dist/popover/popover.controller-def.d.ts +2 -4
- package/dist/popover/popover.controller-def.js +1 -1
- package/dist/rating-group/examples/basic.html +9 -9
- package/dist/rating-group/examples/basic.html.js +5 -0
- package/dist/rating-group/examples/movie.html +11 -11
- package/dist/rating-group/examples/movie.html.js +5 -0
- package/dist/rating-group/examples/product-review.html +13 -13
- package/dist/rating-group/examples/product-review.html.js +5 -0
- package/dist/rating-group/examples/service-evaluation.html +5 -5
- package/dist/rating-group/examples/service-evaluation.html.js +5 -0
- package/dist/rating-group/rating-group.events.d.ts +2 -3
- package/dist/rating-group/rating-group.machine.d.ts +2 -3
- package/dist/rating-group/rating-group.machine.js +1 -1
- package/dist/rating-group/rating-group.presentation.d.ts +6 -7
- package/dist/rating-group/rating-group.presentation.js +2 -2
- package/dist/rating-group/rating-group.state.d.ts +1 -2
- package/dist/rating-group/rating-group.state.js +1 -1
- package/dist/rating-group/rating-group.transitions.d.ts +3 -4
- package/dist/react/react.d.ts +2 -3
- package/dist/runtime/actions/action.d.ts +64 -0
- package/dist/runtime/actions/action.js +45 -0
- package/dist/runtime/actions/anchor.d.ts +43 -0
- package/dist/runtime/actions/anchor.js +127 -0
- package/dist/runtime/actions/date-picker-focus.d.ts +19 -0
- package/dist/runtime/actions/date-picker-focus.js +16 -0
- package/dist/runtime/actions/drag.d.ts +66 -0
- package/dist/runtime/actions/drag.js +118 -0
- package/dist/runtime/actions/form-control.d.ts +18 -0
- package/dist/runtime/actions/form-control.js +41 -0
- package/dist/runtime/actions/hover-delay.d.ts +26 -0
- package/dist/runtime/actions/hover-delay.js +61 -0
- package/dist/runtime/actions/index.d.ts +113 -0
- package/dist/runtime/actions/index.js +240 -0
- package/dist/runtime/actions/infinite-scroll.d.ts +22 -0
- package/dist/runtime/actions/infinite-scroll.js +33 -0
- package/dist/runtime/actions/interact-outside.d.ts +43 -0
- package/dist/runtime/actions/interact-outside.js +72 -0
- package/dist/runtime/actions/observe.d.ts +27 -0
- package/dist/runtime/actions/observe.js +25 -0
- package/dist/runtime/actions/scroll-into-view.d.ts +32 -0
- package/dist/runtime/actions/scroll-into-view.js +36 -0
- package/dist/runtime/actions/select-focus.d.ts +17 -0
- package/dist/runtime/actions/select-focus.js +16 -0
- package/dist/runtime/actions/select-options.d.ts +25 -0
- package/dist/runtime/actions/select-options.js +27 -0
- package/dist/runtime/actions/toast-actions.d.ts +65 -0
- package/dist/runtime/actions/toast-actions.js +143 -0
- package/dist/runtime/aria.d.ts +231 -0
- package/dist/runtime/aria.js +193 -0
- package/dist/runtime/component/define.d.ts +242 -0
- package/dist/runtime/component/define.js +12 -0
- package/dist/runtime/component/ids.d.ts +14 -0
- package/dist/runtime/component/ids.js +35 -0
- package/dist/runtime/component/synthesize.d.ts +32 -0
- package/dist/runtime/component/synthesize.js +385 -0
- package/dist/runtime/core/signal.d.ts +57 -0
- package/dist/runtime/core/signal.js +100 -0
- package/dist/runtime/core/style.d.ts +14 -0
- package/dist/runtime/core/style.js +31 -0
- package/dist/runtime/directives/bind.d.ts +38 -0
- package/dist/runtime/directives/bind.js +244 -0
- package/dist/runtime/directives/for.d.ts +12 -0
- package/dist/runtime/directives/for.js +104 -0
- package/dist/runtime/directives/if.d.ts +10 -0
- package/dist/runtime/directives/if.js +45 -0
- package/dist/runtime/directives/load.d.ts +13 -0
- package/dist/runtime/directives/load.js +119 -0
- package/dist/runtime/directives/spread.d.ts +17 -0
- package/dist/runtime/directives/spread.js +121 -0
- package/dist/runtime/directives/tpl.d.ts +11 -0
- package/dist/runtime/directives/tpl.js +39 -0
- package/dist/runtime/directives/use.d.ts +13 -0
- package/dist/runtime/directives/use.js +34 -0
- package/dist/runtime/index.d.ts +101 -0
- package/dist/runtime/index.js +40 -0
- package/dist/runtime/machine/fsm/machine.d.ts +192 -0
- package/dist/runtime/machine/fsm/machine.js +248 -0
- package/dist/runtime/math/index.d.ts +2 -0
- package/dist/runtime/math/index.js +1 -0
- package/dist/runtime/math/numbers.d.ts +58 -0
- package/dist/runtime/math/numbers.js +115 -0
- package/dist/runtime/props.d.ts +61 -0
- package/dist/runtime/props.js +113 -0
- package/dist/runtime/scope/element.d.ts +86 -0
- package/dist/runtime/scope/element.js +226 -0
- package/dist/runtime/scope/table.d.ts +55 -0
- package/dist/runtime/scope/table.js +174 -0
- package/dist/runtime/syntax/braces.d.ts +2 -0
- package/dist/runtime/syntax/braces.js +35 -0
- package/dist/runtime/syntax/classes.d.ts +22 -0
- package/dist/runtime/syntax/classes.js +119 -0
- package/dist/runtime/syntax/display.d.ts +25 -0
- package/dist/runtime/syntax/display.js +344 -0
- package/dist/runtime/syntax/expand-groups.d.ts +12 -0
- package/dist/runtime/syntax/expand-groups.js +31 -0
- package/dist/runtime/syntax/ir.d.ts +76 -0
- package/dist/runtime/syntax/ir.js +11 -0
- package/dist/runtime/syntax/parse.d.ts +2 -0
- package/dist/runtime/syntax/parse.js +407 -0
- package/dist/runtime/syntax/script-block.d.ts +43 -0
- package/dist/runtime/syntax/script-block.js +190 -0
- package/dist/runtime/testing.d.ts +11 -0
- package/dist/runtime/testing.js +1 -0
- package/dist/select/examples/basic.html +9 -9
- package/dist/select/examples/basic.html.js +5 -0
- package/dist/select/examples/category.html +10 -10
- package/dist/select/examples/category.html.js +5 -0
- package/dist/select/examples/country.html +10 -10
- package/dist/select/examples/country.html.js +5 -0
- package/dist/select/examples/language.html.js +5 -0
- package/dist/select/examples/multiple.html.js +5 -0
- package/dist/select/examples/profile.html +10 -10
- package/dist/select/examples/profile.html.js +5 -0
- package/dist/select/examples/theme.html.js +5 -0
- package/dist/select/examples/with-overlapping-label.html +8 -8
- package/dist/select/examples/with-overlapping-label.html.js +5 -0
- package/dist/select/select.events.d.ts +2 -3
- package/dist/select/select.machine.d.ts +2 -3
- package/dist/select/select.machine.js +1 -1
- package/dist/select/select.presentation.d.ts +16 -20
- package/dist/select/select.presentation.js +6 -6
- package/dist/select/select.shared.d.ts +1 -2
- package/dist/select/select.state.d.ts +1 -2
- package/dist/select/select.state.js +1 -1
- package/dist/select/select.transitions.d.ts +2 -3
- package/dist/shared/keyboard.d.ts +1 -2
- package/dist/signature-pad/examples/basic.html +3 -3
- package/dist/signature-pad/examples/basic.html.js +5 -0
- package/dist/signature-pad/examples/contract.html +7 -7
- package/dist/signature-pad/examples/contract.html.js +5 -0
- package/dist/signature-pad/examples/receipt.html +8 -8
- package/dist/signature-pad/examples/receipt.html.js +5 -0
- package/dist/signature-pad/examples/with-preview.html +6 -6
- package/dist/signature-pad/examples/with-preview.html.js +5 -0
- package/dist/signature-pad/signature-pad.events.d.ts +2 -3
- package/dist/signature-pad/signature-pad.machine.d.ts +4 -4
- package/dist/signature-pad/signature-pad.machine.js +2 -2
- package/dist/signature-pad/signature-pad.presentation.d.ts +10 -11
- package/dist/signature-pad/signature-pad.presentation.js +2 -2
- package/dist/signature-pad/signature-pad.state.d.ts +1 -2
- package/dist/signature-pad/signature-pad.state.js +1 -1
- package/dist/signature-pad/signature-pad.transitions.d.ts +3 -4
- package/dist/slider/examples/basic.html +1 -1
- package/dist/slider/examples/basic.html.js +5 -0
- package/dist/slider/examples/equalizer.html +13 -13
- package/dist/slider/examples/equalizer.html.js +5 -0
- package/dist/slider/examples/fractional.html.js +5 -0
- package/dist/slider/examples/marks.html +2 -2
- package/dist/slider/examples/marks.html.js +5 -0
- package/dist/slider/examples/range.html +1 -1
- package/dist/slider/examples/range.html.js +5 -0
- package/dist/slider/examples/stepped.html.js +5 -0
- package/dist/slider/examples/ticks.html +2 -2
- package/dist/slider/examples/ticks.html.js +5 -0
- package/dist/slider/examples/vertical.html.js +5 -0
- package/dist/slider/slider.events.d.ts +2 -3
- package/dist/slider/slider.machine.d.ts +3 -3
- package/dist/slider/slider.machine.js +2 -2
- package/dist/slider/slider.presentation.d.ts +8 -9
- package/dist/slider/slider.presentation.js +2 -2
- package/dist/slider/slider.state.d.ts +1 -2
- package/dist/slider/slider.state.js +1 -1
- package/dist/slider/slider.transitions.d.ts +3 -4
- package/dist/slider/slider.transitions.js +1 -1
- package/dist/solid/solid.d.ts +2 -3
- package/dist/spin-element.d.ts +1 -2
- package/dist/spin-element.js +1 -1
- package/dist/splitter/examples/basic.html +2 -2
- package/dist/splitter/examples/basic.html.js +5 -0
- package/dist/splitter/examples/nested.html +4 -4
- package/dist/splitter/examples/nested.html.js +5 -0
- package/dist/splitter/examples/threepanels.html +2 -2
- package/dist/splitter/examples/threepanels.html.js +5 -0
- package/dist/splitter/examples/vertical.html +2 -2
- package/dist/splitter/examples/vertical.html.js +5 -0
- package/dist/splitter/splitter.events.d.ts +2 -3
- package/dist/splitter/splitter.machine.d.ts +2 -3
- package/dist/splitter/splitter.machine.js +1 -1
- package/dist/splitter/splitter.presentation.d.ts +5 -6
- package/dist/splitter/splitter.presentation.js +1 -1
- package/dist/splitter/splitter.state.d.ts +1 -2
- package/dist/splitter/splitter.state.js +1 -1
- package/dist/splitter/splitter.transitions.d.ts +2 -3
- package/dist/steps/examples/basic.html +5 -5
- package/dist/steps/examples/basic.html.js +5 -0
- package/dist/steps/examples/checkmarks.html +4 -4
- package/dist/steps/examples/checkmarks.html.js +5 -0
- package/dist/steps/examples/content.html +5 -5
- package/dist/steps/examples/content.html.js +5 -0
- package/dist/steps/examples/descriptions.html +2 -2
- package/dist/steps/examples/descriptions.html.js +5 -0
- package/dist/steps/examples/icons.html +2 -2
- package/dist/steps/examples/icons.html.js +5 -0
- package/dist/steps/examples/lines.html +2 -2
- package/dist/steps/examples/lines.html.js +5 -0
- package/dist/steps/examples/navigation.html +4 -4
- package/dist/steps/examples/navigation.html.js +5 -0
- package/dist/steps/examples/onboarding.html +4 -4
- package/dist/steps/examples/onboarding.html.js +5 -0
- package/dist/steps/examples/progress.html +3 -3
- package/dist/steps/examples/progress.html.js +5 -0
- package/dist/steps/examples/segmented.html +6 -6
- package/dist/steps/examples/segmented.html.js +5 -0
- package/dist/steps/examples/vertical.html +5 -5
- package/dist/steps/examples/vertical.html.js +5 -0
- package/dist/steps/examples/verticallabels.html +2 -2
- package/dist/steps/examples/verticallabels.html.js +5 -0
- package/dist/steps/examples/verticalnavigation.html +2 -2
- package/dist/steps/examples/verticalnavigation.html.js +5 -0
- package/dist/steps/steps.events.d.ts +2 -3
- package/dist/steps/steps.machine.d.ts +3 -3
- package/dist/steps/steps.machine.js +1 -1
- package/dist/steps/steps.presentation.d.ts +4 -5
- package/dist/steps/steps.presentation.js +1 -1
- package/dist/steps/steps.state.d.ts +1 -2
- package/dist/steps/steps.state.js +1 -1
- package/dist/steps/steps.transitions.d.ts +3 -4
- package/dist/tabs/examples/basic.html +2 -2
- package/dist/tabs/examples/basic.html.js +5 -0
- package/dist/tabs/examples/dashboard.html +42 -42
- package/dist/tabs/examples/dashboard.html.js +5 -0
- package/dist/tabs/examples/ghost.html +2 -2
- package/dist/tabs/examples/ghost.html.js +5 -0
- package/dist/tabs/examples/icon-above.html +6 -6
- package/dist/tabs/examples/icon-above.html.js +5 -0
- package/dist/tabs/examples/icon-only.html +3 -3
- package/dist/tabs/examples/icon-only.html.js +5 -0
- package/dist/tabs/examples/outline-with-icons.html +6 -6
- package/dist/tabs/examples/outline-with-icons.html.js +5 -0
- package/dist/tabs/examples/outline.html +3 -3
- package/dist/tabs/examples/outline.html.js +5 -0
- package/dist/tabs/examples/pills.html +2 -2
- package/dist/tabs/examples/pills.html.js +5 -0
- package/dist/tabs/examples/project.html +33 -33
- package/dist/tabs/examples/project.html.js +5 -0
- package/dist/tabs/examples/settings.html +35 -35
- package/dist/tabs/examples/settings.html.js +5 -0
- package/dist/tabs/examples/stack-with-icons.html +7 -7
- package/dist/tabs/examples/stack-with-icons.html.js +5 -0
- package/dist/tabs/examples/stack.html +3 -3
- package/dist/tabs/examples/stack.html.js +5 -0
- package/dist/tabs/examples/underline.html +3 -3
- package/dist/tabs/examples/underline.html.js +5 -0
- package/dist/tabs/examples/vertical-ghost.html +3 -3
- package/dist/tabs/examples/vertical-ghost.html.js +5 -0
- package/dist/tabs/examples/vertical-icons.html +5 -5
- package/dist/tabs/examples/vertical-icons.html.js +5 -0
- package/dist/tabs/examples/vertical-underline.html +4 -4
- package/dist/tabs/examples/vertical-underline.html.js +5 -0
- package/dist/tabs/examples/vertical-with-icons.html +6 -6
- package/dist/tabs/examples/vertical-with-icons.html.js +5 -0
- package/dist/tabs/examples/vertical.html +2 -2
- package/dist/tabs/examples/vertical.html.js +5 -0
- package/dist/tabs/examples/with-badges.html +3 -3
- package/dist/tabs/examples/with-badges.html.js +5 -0
- package/dist/tabs/examples/with-icons.html +4 -4
- package/dist/tabs/examples/with-icons.html.js +5 -0
- package/dist/tabs/tabs.events.d.ts +2 -3
- package/dist/tabs/tabs.machine.d.ts +3 -3
- package/dist/tabs/tabs.machine.js +1 -1
- package/dist/tabs/tabs.presentation.d.ts +6 -7
- package/dist/tabs/tabs.presentation.js +1 -1
- package/dist/tabs/tabs.state.d.ts +1 -2
- package/dist/tabs/tabs.state.js +1 -1
- package/dist/tabs/tabs.transitions.d.ts +3 -4
- package/dist/tags-input/examples/basic.html +9 -9
- package/dist/tags-input/examples/basic.html.js +5 -0
- package/dist/tags-input/examples/with-combobox.html +14 -14
- package/dist/tags-input/examples/with-combobox.html.js +5 -0
- package/dist/tags-input/tags.events.d.ts +2 -3
- package/dist/tags-input/tags.machine.d.ts +6 -4
- package/dist/tags-input/tags.machine.js +2 -2
- package/dist/tags-input/tags.presentation.d.ts +6 -7
- package/dist/tags-input/tags.presentation.js +1 -1
- package/dist/tags-input/tags.state.d.ts +1 -2
- package/dist/tags-input/tags.state.js +2 -2
- package/dist/tags-input/tags.transitions.d.ts +2 -3
- package/dist/theme-picker/examples/basic.html +6 -6
- package/dist/theme-picker/examples/basic.html.js +5 -0
- package/dist/theme-picker/examples/cards.html +4 -4
- package/dist/theme-picker/examples/cards.html.js +5 -0
- package/dist/theme-picker/examples/compact.html +3 -3
- package/dist/theme-picker/examples/compact.html.js +5 -0
- package/dist/theme-picker/examples/swatches.html +2 -2
- package/dist/theme-picker/examples/swatches.html.js +5 -0
- package/dist/theme-picker/theme-picker.events.d.ts +2 -3
- package/dist/theme-picker/theme-picker.machine.d.ts +3 -3
- package/dist/theme-picker/theme-picker.machine.js +1 -1
- package/dist/theme-picker/theme-picker.presentation.d.ts +9 -10
- package/dist/theme-picker/theme-picker.presentation.js +2 -2
- package/dist/theme-picker/theme-picker.state.d.ts +1 -2
- package/dist/theme-picker/theme-picker.transitions.d.ts +3 -4
- package/dist/timer/examples/basic.html +1 -1
- package/dist/timer/examples/basic.html.js +5 -0
- package/dist/timer/examples/card.html +4 -4
- package/dist/timer/examples/card.html.js +5 -0
- package/dist/timer/examples/compact.html +5 -5
- package/dist/timer/examples/compact.html.js +5 -0
- package/dist/timer/examples/countdown.html +3 -3
- package/dist/timer/examples/countdown.html.js +5 -0
- package/dist/timer/examples/labels.html +3 -3
- package/dist/timer/examples/labels.html.js +5 -0
- package/dist/timer/examples/large.html +2 -2
- package/dist/timer/examples/large.html.js +5 -0
- package/dist/timer/examples/minimal.html +1 -1
- package/dist/timer/examples/minimal.html.js +5 -0
- package/dist/timer/examples/pomodoro.html +3 -3
- package/dist/timer/examples/pomodoro.html.js +5 -0
- package/dist/timer/examples/workout.html +4 -4
- package/dist/timer/examples/workout.html.js +5 -0
- package/dist/timer/timer.events.d.ts +2 -3
- package/dist/timer/timer.machine.d.ts +2 -3
- package/dist/timer/timer.machine.js +1 -1
- package/dist/timer/timer.presentation.d.ts +7 -8
- package/dist/timer/timer.presentation.js +1 -1
- package/dist/timer/timer.state.d.ts +1 -2
- package/dist/timer/timer.state.js +1 -1
- package/dist/timer/timer.transitions.d.ts +2 -3
- package/dist/toast/examples/action.html +3 -3
- package/dist/toast/examples/action.html.js +5 -0
- package/dist/toast/examples/basic.html +3 -3
- package/dist/toast/examples/basic.html.js +5 -0
- package/dist/toast/examples/bottomcenter.html +3 -3
- package/dist/toast/examples/bottomcenter.html.js +5 -0
- package/dist/toast/examples/bottomleft.html +3 -3
- package/dist/toast/examples/bottomleft.html.js +5 -0
- package/dist/toast/examples/bottomright.html +3 -3
- package/dist/toast/examples/bottomright.html.js +5 -0
- package/dist/toast/examples/duration.html +3 -3
- package/dist/toast/examples/duration.html.js +5 -0
- package/dist/toast/examples/promise.html +6 -6
- package/dist/toast/examples/promise.html.js +5 -0
- package/dist/toast/examples/topcenter.html +3 -3
- package/dist/toast/examples/topcenter.html.js +5 -0
- package/dist/toast/examples/topleft.html +3 -3
- package/dist/toast/examples/topleft.html.js +5 -0
- package/dist/toast/examples/topright.html +3 -3
- package/dist/toast/examples/topright.html.js +5 -0
- package/dist/toast/examples/types.html +3 -3
- package/dist/toast/examples/types.html.js +5 -0
- package/dist/toast/examples/updatable.html.js +5 -0
- package/dist/toast/toast.events.d.ts +2 -3
- package/dist/toast/toast.machine.d.ts +4 -4
- package/dist/toast/toast.machine.js +1 -1
- package/dist/toast/toast.presentation.d.ts +5 -6
- package/dist/toast/toast.presentation.js +1 -1
- package/dist/toast/toast.state.d.ts +1 -2
- package/dist/toast/toast.state.js +3 -3
- package/dist/toast/toast.transitions.d.ts +3 -4
- package/dist/toc/examples/basic.html +31 -0
- package/dist/toc/examples/basic.html.js +5 -0
- package/dist/toc/toc.events.d.ts +19 -0
- package/dist/toc/toc.events.js +1 -0
- package/dist/toc/toc.machine.d.ts +5 -0
- package/dist/toc/toc.machine.js +59 -0
- package/dist/toc/toc.presentation.d.ts +127 -0
- package/dist/toc/toc.presentation.js +117 -0
- package/dist/toc/toc.state.d.ts +41 -0
- package/dist/toc/toc.state.js +64 -0
- package/dist/toc/toc.transitions.d.ts +8 -0
- package/dist/toc/toc.transitions.js +27 -0
- package/dist/toggle-group/examples/basic.html +2 -2
- package/dist/toggle-group/examples/basic.html.js +5 -0
- package/dist/toggle-group/examples/ghost.html +1 -1
- package/dist/toggle-group/examples/ghost.html.js +5 -0
- package/dist/toggle-group/examples/icons.html +3 -3
- package/dist/toggle-group/examples/icons.html.js +5 -0
- package/dist/toggle-group/examples/multiple.html.js +5 -0
- package/dist/toggle-group/examples/outline.html +2 -2
- package/dist/toggle-group/examples/outline.html.js +5 -0
- package/dist/toggle-group/examples/toolbar.html +3 -3
- package/dist/toggle-group/examples/toolbar.html.js +5 -0
- package/dist/toggle-group/toggle-group.events.d.ts +2 -3
- package/dist/toggle-group/toggle-group.machine.d.ts +3 -3
- package/dist/toggle-group/toggle-group.machine.js +1 -1
- package/dist/toggle-group/toggle-group.presentation.d.ts +6 -7
- package/dist/toggle-group/toggle-group.presentation.js +2 -2
- package/dist/toggle-group/toggle-group.state.d.ts +1 -2
- package/dist/toggle-group/toggle-group.state.js +1 -1
- package/dist/toggle-group/toggle-group.transitions.d.ts +3 -4
- package/dist/tooltip/examples/basic.html.js +5 -0
- package/dist/tooltip/examples/metrics.html +9 -9
- package/dist/tooltip/examples/metrics.html.js +5 -0
- package/dist/tooltip/examples/positioning.html +4 -4
- package/dist/tooltip/examples/positioning.html.js +5 -0
- package/dist/tooltip/examples/status.html +10 -10
- package/dist/tooltip/examples/status.html.js +5 -0
- package/dist/tooltip/examples/video.html +6 -6
- package/dist/tooltip/examples/video.html.js +5 -0
- package/dist/tooltip/examples/with-arrow.html +1 -1
- package/dist/tooltip/examples/with-arrow.html.js +5 -0
- package/dist/tooltip/tooltip.controller-def.d.ts +3 -5
- package/dist/tooltip/tooltip.controller-def.js +1 -1
- package/dist/tour/examples/basic.html +5 -5
- package/dist/tour/examples/basic.html.js +5 -0
- package/dist/tour/tour.events.d.ts +2 -3
- package/dist/tour/tour.machine.d.ts +7 -3
- package/dist/tour/tour.machine.js +1 -1
- package/dist/tour/tour.presentation.d.ts +6 -7
- package/dist/tour/tour.presentation.js +1 -1
- package/dist/tour/tour.state.d.ts +1 -2
- package/dist/tour/tour.state.js +1 -1
- package/dist/tour/tour.transitions.d.ts +3 -4
- package/dist/tree-view/examples/basic.html +10 -10
- package/dist/tree-view/examples/basic.html.js +5 -0
- package/dist/tree-view/examples/loading.html +11 -11
- package/dist/tree-view/examples/loading.html.js +5 -0
- package/dist/tree-view/tree-view.events.d.ts +2 -3
- package/dist/tree-view/tree-view.machine.d.ts +2 -3
- package/dist/tree-view/tree-view.machine.js +1 -1
- package/dist/tree-view/tree-view.presentation.d.ts +7 -8
- package/dist/tree-view/tree-view.presentation.js +2 -2
- package/dist/tree-view/tree-view.state.d.ts +1 -2
- package/dist/tree-view/tree-view.state.js +1 -1
- package/dist/tree-view/tree-view.transitions.d.ts +3 -4
- package/package.json +43 -8
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// src/runtime/aria.ts
|
|
2
|
+
/** The id an ARIA relation points at. */
|
|
3
|
+
function targetId(scope, target) {
|
|
4
|
+
if (target === void 0) return void 0;
|
|
5
|
+
if ("id" in target) return target.id;
|
|
6
|
+
if ("parts" in target) {
|
|
7
|
+
const ids = target.parts.map((ref) => scope.id(ref.part, ref.slot));
|
|
8
|
+
return ids.length > 0 ? ids.join(" ") : void 0;
|
|
9
|
+
}
|
|
10
|
+
return scope.id(target.part, target.slot);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A part the user cannot act on.
|
|
14
|
+
*
|
|
15
|
+
* The state is stated rather than implied: the part is still in the page,
|
|
16
|
+
* and a reader has to hear that it is unavailable.
|
|
17
|
+
*/
|
|
18
|
+
function ariaDisabled(state) {
|
|
19
|
+
return { "aria-disabled": state };
|
|
20
|
+
}
|
|
21
|
+
/** A part that is not in the page for a reader. */
|
|
22
|
+
function ariaHidden(state) {
|
|
23
|
+
return { "aria-hidden": state };
|
|
24
|
+
}
|
|
25
|
+
/** A part whose value is not valid. */
|
|
26
|
+
function ariaInvalid(state) {
|
|
27
|
+
return { "aria-invalid": state };
|
|
28
|
+
}
|
|
29
|
+
/** A toggle that is held down. */
|
|
30
|
+
function ariaPressed(state) {
|
|
31
|
+
return { "aria-pressed": state };
|
|
32
|
+
}
|
|
33
|
+
/** A part that is still working. */
|
|
34
|
+
function ariaBusy(state) {
|
|
35
|
+
return { "aria-busy": state };
|
|
36
|
+
}
|
|
37
|
+
/** Where a part stands within a set. */
|
|
38
|
+
function ariaCurrent(place) {
|
|
39
|
+
return { "aria-current": place };
|
|
40
|
+
}
|
|
41
|
+
/** The direction a region reads in. */
|
|
42
|
+
function ariaOrientation(dir) {
|
|
43
|
+
return { "aria-orientation": dir };
|
|
44
|
+
}
|
|
45
|
+
/** The name a part gives itself beyond its role. */
|
|
46
|
+
function ariaRoleDescription(text) {
|
|
47
|
+
return { "aria-roledescription": text };
|
|
48
|
+
}
|
|
49
|
+
/** A description of a part that no element owns. */
|
|
50
|
+
function ariaDescription(text) {
|
|
51
|
+
return { "aria-description": text };
|
|
52
|
+
}
|
|
53
|
+
/** How a combobox completes what is typed into it. */
|
|
54
|
+
function ariaAutocomplete(mode) {
|
|
55
|
+
return { "aria-autocomplete": mode };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A prop's truth, as an ARIA state.
|
|
59
|
+
*
|
|
60
|
+
* The corpus states a boolean prop as its own truth: a prop that is absent
|
|
61
|
+
* or false says nothing, so the attribute is not written at all, and a
|
|
62
|
+
* prop that is true states the state.
|
|
63
|
+
*/
|
|
64
|
+
function ariaFlag(value) {
|
|
65
|
+
return value ? true : void 0;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A prop's value, as an ARIA state.
|
|
69
|
+
*
|
|
70
|
+
* A boolean prop is the state it is: a prop that is false states "false",
|
|
71
|
+
* and a prop that is absent states nothing at all.
|
|
72
|
+
*/
|
|
73
|
+
function ariaState(value) {
|
|
74
|
+
if (typeof value === "boolean") return value;
|
|
75
|
+
if (value === "true") return "true";
|
|
76
|
+
if (value === "false") return "false";
|
|
77
|
+
}
|
|
78
|
+
/** Whether a part must be filled in. */
|
|
79
|
+
function ariaRequired(state) {
|
|
80
|
+
return { "aria-required": state };
|
|
81
|
+
}
|
|
82
|
+
/** Whether a part refuses edits. */
|
|
83
|
+
function ariaReadOnly(state) {
|
|
84
|
+
return { "aria-readonly": state };
|
|
85
|
+
}
|
|
86
|
+
/** The element that describes a part. */
|
|
87
|
+
function ariaDescribedBy(scope, target) {
|
|
88
|
+
return { "aria-describedby": targetId(scope, target) };
|
|
89
|
+
}
|
|
90
|
+
/** The element that names a part. */
|
|
91
|
+
function ariaLabelledBy(scope, target) {
|
|
92
|
+
return { "aria-labelledby": targetId(scope, target) };
|
|
93
|
+
}
|
|
94
|
+
/** The region a part controls. */
|
|
95
|
+
function ariaControls(scope, target) {
|
|
96
|
+
return { "aria-controls": targetId(scope, target) };
|
|
97
|
+
}
|
|
98
|
+
/** The elements a part owns. */
|
|
99
|
+
function ariaOwns(scope, target) {
|
|
100
|
+
return { "aria-owns": targetId(scope, target) };
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A region that announces itself.
|
|
104
|
+
*
|
|
105
|
+
* The region says how loudly it speaks, whether it speaks as a whole, and
|
|
106
|
+
* which of its changes are worth speaking of.
|
|
107
|
+
*/
|
|
108
|
+
function liveRegion(init) {
|
|
109
|
+
return {
|
|
110
|
+
..."live" in init ? { "aria-live": init.live } : {},
|
|
111
|
+
..."atomic" in init ? { "aria-atomic": init.atomic } : {},
|
|
112
|
+
..."relevant" in init ? { "aria-relevant": init.relevant } : {}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* A control that opens a region.
|
|
117
|
+
*
|
|
118
|
+
* The trigger says whether the region is open, what kind of popup it
|
|
119
|
+
* opens, and which region that is. A trigger that opens no region states
|
|
120
|
+
* no `aria-controls`, and a part that is not a trigger at all states
|
|
121
|
+
* neither.
|
|
122
|
+
*/
|
|
123
|
+
function disclosureTrigger(scope, init) {
|
|
124
|
+
return {
|
|
125
|
+
..."expanded" in init ? { "aria-expanded": init.expanded } : {},
|
|
126
|
+
..."hasPopup" in init ? { "aria-haspopup": init.hasPopup } : {},
|
|
127
|
+
..."controls" in init ? { "aria-controls": targetId(scope, init.controls) } : {}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* A surface that holds rows.
|
|
132
|
+
*
|
|
133
|
+
* The surface says what names it, which row is the active descendant, and
|
|
134
|
+
* the selection states it carries.
|
|
135
|
+
*/
|
|
136
|
+
function listSurface(scope, init) {
|
|
137
|
+
return {
|
|
138
|
+
..."labelledBy" in init ? { "aria-labelledby": targetId(scope, init.labelledBy) } : {},
|
|
139
|
+
..."activeDescendant" in init ? { "aria-activedescendant": targetId(scope, init.activeDescendant) } : {},
|
|
140
|
+
..."multiSelectable" in init ? { "aria-multiselectable": init.multiSelectable } : {},
|
|
141
|
+
..."required" in init ? { "aria-required": init.required } : {},
|
|
142
|
+
..."readOnly" in init ? { "aria-readonly": init.readOnly } : {}
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* A field that completes what is typed into it.
|
|
147
|
+
*
|
|
148
|
+
* The field says how it completes, which region it controls, whether that
|
|
149
|
+
* region is open, and which row it is on.
|
|
150
|
+
*/
|
|
151
|
+
function comboboxInput(scope, init) {
|
|
152
|
+
return {
|
|
153
|
+
..."autocomplete" in init ? ariaAutocomplete(init.autocomplete) : {},
|
|
154
|
+
..."controls" in init ? { "aria-controls": targetId(scope, init.controls) } : {},
|
|
155
|
+
..."expanded" in init ? { "aria-expanded": init.expanded } : {},
|
|
156
|
+
..."activeDescendant" in init ? { "aria-activedescendant": targetId(scope, init.activeDescendant) } : {}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* A handle that rides a range.
|
|
161
|
+
*
|
|
162
|
+
* The thumb says the range it rides and where it sits in it; `text` is
|
|
163
|
+
* what a reader hears, which the number alone does not say.
|
|
164
|
+
*/
|
|
165
|
+
function sliderThumb(init) {
|
|
166
|
+
return {
|
|
167
|
+
..."min" in init ? { "aria-valuemin": init.min } : {},
|
|
168
|
+
..."max" in init ? { "aria-valuemax": init.max } : {},
|
|
169
|
+
..."now" in init ? { "aria-valuenow": init.now } : {},
|
|
170
|
+
..."text" in init ? { "aria-valuetext": init.text } : {}
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* A row inside a set.
|
|
175
|
+
*
|
|
176
|
+
* A row is either selected or checked, never both: `selected` says the
|
|
177
|
+
* row is the chosen one, `checked` says the row carries a state of its
|
|
178
|
+
* own. `posInSet` and `setSize` place the row in the set it belongs to,
|
|
179
|
+
* and `level` places it in the hierarchy it belongs to.
|
|
180
|
+
*/
|
|
181
|
+
function optionRow(init) {
|
|
182
|
+
return {
|
|
183
|
+
..."selected" in init ? { "aria-selected": init.selected } : {},
|
|
184
|
+
..."checked" in init ? { "aria-checked": init.checked } : {},
|
|
185
|
+
..."posInSet" in init ? { "aria-posinset": init.posInSet } : {},
|
|
186
|
+
..."setSize" in init ? { "aria-setsize": init.setSize } : {},
|
|
187
|
+
..."level" in init ? { "aria-level": init.level } : {},
|
|
188
|
+
..."disabled" in init ? ariaDisabled(init.disabled) : {}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
export { ariaAutocomplete, ariaBusy, ariaControls, ariaCurrent, ariaDescribedBy, ariaDescription, ariaDisabled, ariaFlag, ariaHidden, ariaInvalid, ariaLabelledBy, ariaOrientation, ariaOwns, ariaPressed, ariaReadOnly, ariaRequired, ariaRoleDescription, ariaState, comboboxInput, disclosureTrigger, listSurface, liveRegion, optionRow, sliderThumb };
|
|
192
|
+
|
|
193
|
+
//# sourceMappingURL=aria.js.map
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/** The component definition: everything a component author writes besides
|
|
2
|
+
* the machine and the markup.
|
|
3
|
+
*
|
|
4
|
+
* The machine owns state. The markup owns structure. This file owns the
|
|
5
|
+
* narrow seam between them: which props exist and how they parse, which
|
|
6
|
+
* parts exist and which attributes each carries as a function of live
|
|
7
|
+
* state, which node reflexes report back in as events, which authored
|
|
8
|
+
* channels stay controlled, and which transitions report out.
|
|
9
|
+
*
|
|
10
|
+
* Nothing here is logic over state — every function reads, none decides.
|
|
11
|
+
* The framework synthesizes the bridge and the connect from this; no
|
|
12
|
+
* hand-written `getXProps()` exists for any component. */
|
|
13
|
+
import { EventMap, EventUnion, Machine } from "@spinjs/components/fsm";
|
|
14
|
+
export interface ParseHost {
|
|
15
|
+
/** The element root: behavioral host props (sanitize, validate,
|
|
16
|
+
* translations) live as element properties, not scope props. */
|
|
17
|
+
readonly root: () => Element;
|
|
18
|
+
}
|
|
19
|
+
export type PropParser = (raw: unknown, host?: ParseHost) => unknown;
|
|
20
|
+
/** What a part bag reads. All live — the framework calls this per tick
|
|
21
|
+
* and memoizes on the returned signature. */
|
|
22
|
+
export type AnyEvent = {
|
|
23
|
+
readonly type: string;
|
|
24
|
+
} & Record<string, unknown>;
|
|
25
|
+
export interface PartView<R = unknown, C extends object = Record<string, unknown>, P = Record<string, unknown>, Ev = AnyEvent, S extends string = string> {
|
|
26
|
+
readonly props: P;
|
|
27
|
+
readonly context: C;
|
|
28
|
+
readonly state: S;
|
|
29
|
+
readonly root: () => Element;
|
|
30
|
+
readonly id: (part: string, slot?: unknown) => string;
|
|
31
|
+
readonly measure: (part: string, slot?: unknown) => DOMRect | null;
|
|
32
|
+
send(event: Ev): void;
|
|
33
|
+
readonly attr: (value: boolean) => string | undefined;
|
|
34
|
+
readonly slot: R;
|
|
35
|
+
}
|
|
36
|
+
export type ViewFor<C extends object, E extends EventMap = Record<string, Record<string, unknown>>, S extends string = string, P = Record<string, unknown>> = PartView<unknown, C, P, EventUnion<E>, S>;
|
|
37
|
+
export interface PartDef<R = unknown, C extends object = Record<string, unknown>, P = Record<string, unknown>, Ev = AnyEvent, S extends string = string> {
|
|
38
|
+
/** The id segment when it differs from the part key (`value-text` for
|
|
39
|
+
* the `valueText` method family). Default: the key. */
|
|
40
|
+
readonly id?: string;
|
|
41
|
+
/** The bag: attributes, aria, node reflexes (`onLoad`, `use:observe`).
|
|
42
|
+
* Keys are bag entries; values may read the scope. Receives the recipe's
|
|
43
|
+
* argument when the part takes one (`getTriggerProps({ focusable })`).
|
|
44
|
+
*
|
|
45
|
+
* The bag rebuilds when the scope's fields it read move: the reads are
|
|
46
|
+
* recorded, so a dependency is never named by hand. Optional when the
|
|
47
|
+
* part carries only its auto-stamped `id`, `data-scope`, and `data-part`. */
|
|
48
|
+
attrs?(view: PartView<R, C, P, Ev, S>, arg?: unknown): Record<string, unknown>;
|
|
49
|
+
}
|
|
50
|
+
/** What a slotted bag reads: the part view plus the slot. Slots are
|
|
51
|
+
* stable identities (a thumb index, a row key). */
|
|
52
|
+
export interface SlotView<R = unknown, C extends object = Record<string, unknown>, P = Record<string, unknown>, Ev = AnyEvent, S extends string = string> extends PartView<R, C, P, Ev, S> {}
|
|
53
|
+
export type SlotViewFor<R, C extends object, E extends EventMap = Record<string, Record<string, unknown>>, S extends string = string, P = Record<string, unknown>> = SlotView<R, C, P, EventUnion<E>, S>;
|
|
54
|
+
export interface SlotDef<R = unknown, C extends object = Record<string, unknown>, P = Record<string, unknown>, Ev = AnyEvent, S extends string = string> {
|
|
55
|
+
/** The id segment when it differs from the slot key. Default: the key. */
|
|
56
|
+
readonly id?: string;
|
|
57
|
+
/** Whether the framework stamps `id`, `data-scope`, and `data-part` onto
|
|
58
|
+
* the slot's bag before `attrs(scope)`. Default `true`; set `false` for
|
|
59
|
+
* form controls like hidden inputs that omit scope/part attributes. */
|
|
60
|
+
readonly stamp?: boolean;
|
|
61
|
+
/** The slot identities, for the recipe's iteration: rows, blocks, thumb
|
|
62
|
+
* indexes. Receives parsed props: the collection lives there. */
|
|
63
|
+
readonly indexes: (context: C, props: Record<string, unknown>) => readonly unknown[];
|
|
64
|
+
attrs(view: SlotView<R, C, P, Ev, S>, arg?: unknown): Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
export interface ReaderDef<C extends object = Record<string, unknown>, R = unknown, S extends string = string> {
|
|
67
|
+
/** A state projection: live context + state + parsed props (the
|
|
68
|
+
* collection lives in props, rows never enter the machine) + the root
|
|
69
|
+
* (a fieldset's disabled state disables the control, and only the root
|
|
70
|
+
* knows its ancestors). */
|
|
71
|
+
read(context: C, state: S, props: Record<string, unknown>, root?: () => Element): R;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The machine a component consumes: a factory over the machine's OWN
|
|
75
|
+
* arguments.
|
|
76
|
+
*/
|
|
77
|
+
export type MachineFactory<C extends object, E extends EventMap, A = unknown, S extends string = string> = (args: A, authored: (name: string) => boolean) => Machine<C, E, S>;
|
|
78
|
+
export interface MethodDef<C extends object = Record<string, unknown>, R = unknown, A extends readonly unknown[] = readonly unknown[], S extends string = string> {
|
|
79
|
+
/** An indexed read (`getThumbValue(index)`): live context + state + args
|
|
80
|
+
* + parsed props + part ids. */
|
|
81
|
+
call(context: C, state: S, args: A, props: Record<string, unknown>, id: (part: string, slot?: unknown) => string): R;
|
|
82
|
+
}
|
|
83
|
+
export type CommandDef<A extends readonly unknown[] = readonly unknown[], C extends object = Record<string, unknown>, E extends EventMap = Record<string, object>> = {
|
|
84
|
+
/** A sending command: name + event from args, live context, and part
|
|
85
|
+
* ids. */
|
|
86
|
+
event(args: A, context: C, id: (part: string, slot?: unknown) => string): EventUnion<E>;
|
|
87
|
+
readonly view?: undefined;
|
|
88
|
+
} | {
|
|
89
|
+
/** A view-only command (node focus with no machine move): the api
|
|
90
|
+
* method runs this with the part ids instead of sending. */
|
|
91
|
+
readonly event?: undefined;
|
|
92
|
+
view(args: {
|
|
93
|
+
readonly args: A;
|
|
94
|
+
readonly id: (part: string, slot?: unknown) => string;
|
|
95
|
+
readonly focus: (part: string, slot?: unknown) => void;
|
|
96
|
+
readonly measure: (part: string, slot?: unknown) => DOMRect | null;
|
|
97
|
+
readonly root: () => Element;
|
|
98
|
+
}): void;
|
|
99
|
+
};
|
|
100
|
+
export interface EventDef<W extends readonly unknown[] = readonly unknown[], C extends object = Record<string, unknown>, S extends string = string> {
|
|
101
|
+
/** The callback prop name on the props surface (the def maps it to a CustomEvent). */
|
|
102
|
+
readonly prop: string;
|
|
103
|
+
/** Values the framework snapshots per notify; a change fires the event. */
|
|
104
|
+
watch(context: C, state: S): readonly unknown[];
|
|
105
|
+
/** Maps the changed values to the event detail. Receives the triggering
|
|
106
|
+
* lives in props, so row-resolving details read it here), and the live
|
|
107
|
+
* context — the watch carries ONLY the fire condition; current values for
|
|
108
|
+
* the payload come from here, so an unrelated move never reports. */
|
|
109
|
+
detail(watched: W, event?: {
|
|
110
|
+
readonly type: string;
|
|
111
|
+
}, props?: Record<string, unknown>, context?: C): Record<string, unknown>;
|
|
112
|
+
/** Which sends fire this event: every move, or commits (release +
|
|
113
|
+
* keyboard commit) only. Default `"move"`. */
|
|
114
|
+
readonly on?: "move" | "commit";
|
|
115
|
+
/** Event-gated reports (the `invokeOnSelect` rule): evaluated per send with
|
|
116
|
+
* the before/after contexts; a null return reports nothing (a guard the
|
|
117
|
+
* machine refused). When present, `watch` still advances the cursor. */
|
|
118
|
+
readonly select?: (event: {
|
|
119
|
+
readonly type: string;
|
|
120
|
+
} & Record<string, unknown>, before: C, after: C, states?: {
|
|
121
|
+
readonly was: string;
|
|
122
|
+
readonly is: string;
|
|
123
|
+
}, source?: string) => Record<string, unknown> | readonly Record<string, unknown>[] | null;
|
|
124
|
+
}
|
|
125
|
+
export interface ComponentDef<C extends object, E extends EventMap, P = Record<string, unknown>, A = unknown, S extends string = string, Methods = Record<string, MethodDef<C, unknown, readonly unknown[], S>>, Readers = Record<string, ReaderDef<C, unknown, S>>> {
|
|
126
|
+
readonly name: string;
|
|
127
|
+
/** The start state, or its computation from parsed props. */
|
|
128
|
+
readonly start?: S | ((props: Record<string, unknown>, authored: (name: string) => boolean) => S);
|
|
129
|
+
/** Events sent once after start. */
|
|
130
|
+
readonly establish?: (props: Record<string, unknown>, authored: (name: string) => boolean) => readonly ({
|
|
131
|
+
type: string;
|
|
132
|
+
} & Record<string, unknown>)[];
|
|
133
|
+
/** Derived context sync inside the owned effect. Runs as `refresh` → `applyContract` → `reconcile` → `settled`: live functions that must stay fresh sync through `scalarsOf`, and post-mount unauthored prop writes never reach context (author config at mount). */
|
|
134
|
+
readonly reconcile?: (args: {
|
|
135
|
+
readonly context: C;
|
|
136
|
+
readonly state: S;
|
|
137
|
+
readonly parsed: Record<string, unknown>;
|
|
138
|
+
readonly authored: (name: string) => boolean;
|
|
139
|
+
readonly send: (event: {
|
|
140
|
+
type: string;
|
|
141
|
+
} & Record<string, unknown>) => void;
|
|
142
|
+
}) => boolean;
|
|
143
|
+
/** Event enrichment pre-send. */
|
|
144
|
+
readonly dispatch?: (event: {
|
|
145
|
+
type: string;
|
|
146
|
+
} & Record<string, unknown>, props: Record<string, unknown>) => {
|
|
147
|
+
type: string;
|
|
148
|
+
} & Record<string, unknown>;
|
|
149
|
+
/** Once, after the first connect build: entry focus and mount reflexes. Receives props only, so mount-time gates like pin-input autoFocus stay props reads intentionally. */
|
|
150
|
+
readonly mounted?: (args: {
|
|
151
|
+
readonly props: Record<string, unknown>;
|
|
152
|
+
readonly root: () => Element;
|
|
153
|
+
readonly id: (part: string, slot?: unknown) => string;
|
|
154
|
+
readonly focus: (part: string, slot?: unknown) => void;
|
|
155
|
+
readonly measure: (part: string, slot?: unknown) => DOMRect | null;
|
|
156
|
+
}) => void;
|
|
157
|
+
/** Post-send view reflexes: the `settled` step of the refresh → applyContract → reconcile → settled pipeline. */
|
|
158
|
+
readonly settled?: (args: {
|
|
159
|
+
readonly event: AnyEvent;
|
|
160
|
+
readonly before: {
|
|
161
|
+
readonly context: C;
|
|
162
|
+
readonly state: S;
|
|
163
|
+
};
|
|
164
|
+
readonly after: {
|
|
165
|
+
readonly context: C;
|
|
166
|
+
readonly state: S;
|
|
167
|
+
};
|
|
168
|
+
readonly props: Record<string, unknown>;
|
|
169
|
+
readonly root: () => Element;
|
|
170
|
+
readonly id: (part: string, slot?: unknown) => string;
|
|
171
|
+
readonly focus: (part: string, slot?: unknown) => void;
|
|
172
|
+
readonly measure: (part: string, slot?: unknown) => DOMRect | null;
|
|
173
|
+
readonly send: (event: AnyEvent) => void;
|
|
174
|
+
}) => void;
|
|
175
|
+
/** Static scalar field names: host writes to these merge into context without an event. */
|
|
176
|
+
readonly scalars?: readonly string[];
|
|
177
|
+
/** Live scalar values: functions that must stay fresh (async-list load/sortFn) sync through here every effect run. */
|
|
178
|
+
readonly scalarsOf?: (parsed: Record<string, unknown>, authored: (name: string) => boolean) => Record<string, unknown>;
|
|
179
|
+
/** Names the commit-kind sends: those report `commit` events, all others report `move`. */
|
|
180
|
+
readonly commitEvents?: readonly (EventUnion<E>["type"] | (string & {}))[];
|
|
181
|
+
readonly machine?: MachineFactory<C, E, A, S>;
|
|
182
|
+
readonly args?: (props: P) => A;
|
|
183
|
+
readonly parts: Record<string, PartDef<unknown, C, P, EventUnion<E>, S>>;
|
|
184
|
+
readonly slots?: Record<string, SlotDef<never, C, P, EventUnion<E>, S>>;
|
|
185
|
+
readonly commands: Record<string, CommandDef<readonly unknown[], C, E>>;
|
|
186
|
+
readonly methods?: Methods;
|
|
187
|
+
readonly readers?: Readers;
|
|
188
|
+
readonly events: Record<string, EventDef<readonly unknown[], C, S>>;
|
|
189
|
+
}
|
|
190
|
+
/** A reader entry's value type, or never when the entry is not a reader. */
|
|
191
|
+
export type ReaderValue<T> = T extends {
|
|
192
|
+
read(...args: never[]): infer R;
|
|
193
|
+
} ? R : never;
|
|
194
|
+
/** A method entry's api surface: infers tuple parameters from `call`'s
|
|
195
|
+
* `args` parameter when declared, or `() => R` for 0-arg methods. */
|
|
196
|
+
export type MethodValue<T> = T extends {
|
|
197
|
+
call: (context: never, state?: never) => infer R;
|
|
198
|
+
} ? () => R : T extends {
|
|
199
|
+
call: (context: never, state: never, args: infer A extends readonly unknown[], ...rest: never[]) => infer R;
|
|
200
|
+
} ? (...args: A) => R : never;
|
|
201
|
+
/** A command entry's callable surface: infers tuple parameters from
|
|
202
|
+
* `event(args: A, ...)` when declared, or `() => void` for 0-arg commands. */
|
|
203
|
+
export type CommandFn<T> = T extends {
|
|
204
|
+
event: () => unknown;
|
|
205
|
+
} | {
|
|
206
|
+
view: () => unknown;
|
|
207
|
+
} ? () => void : T extends {
|
|
208
|
+
event: (args: infer A extends readonly unknown[], ...rest: never[]) => unknown;
|
|
209
|
+
} ? (...args: A) => void : T extends {
|
|
210
|
+
view: (args: infer V) => unknown;
|
|
211
|
+
} ? V extends {
|
|
212
|
+
readonly args: infer A extends readonly unknown[];
|
|
213
|
+
} ? (...args: A) => void : () => void : never;
|
|
214
|
+
/** A slot entry's `getXProps` surface: infers the slot parameter type `R`. */
|
|
215
|
+
export type SlotPropsFn<T> = T extends {
|
|
216
|
+
attrs: (view: SlotView<infer R, never, never, never, never>, ...args: never[]) => unknown;
|
|
217
|
+
} ? (slot: R) => Record<string, unknown> : (slot: unknown) => Record<string, unknown>;
|
|
218
|
+
/** The state union a component's machine declares, or `string` when untyped. */
|
|
219
|
+
export type StateOf<D> = D extends {
|
|
220
|
+
readonly machine?: (...args: never[]) => {
|
|
221
|
+
readonly initialState: {
|
|
222
|
+
readonly value: infer S extends string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
} ? S : string;
|
|
226
|
+
/** The api a component's def implies. */
|
|
227
|
+
export type ApiOf<D extends {
|
|
228
|
+
readonly readers?: Record<string, unknown>;
|
|
229
|
+
readonly methods?: Record<string, unknown>;
|
|
230
|
+
readonly commands?: Record<string, unknown>;
|
|
231
|
+
readonly parts?: Record<string, unknown>;
|
|
232
|
+
readonly slots?: Record<string, unknown>;
|
|
233
|
+
}> = { readonly [K in keyof D["readers"] & string as D["readers"] extends Record<K, unknown> ? K : never]: D["readers"] extends Record<K, infer T> ? ReaderValue<T> : never; } & { readonly [K in keyof D["methods"] & string as D["methods"] extends Record<K, unknown> ? K : never]: D["methods"] extends Record<K, infer T> ? MethodValue<T> : never; } & { readonly [K in keyof D["commands"] & string]: D["commands"] extends Record<K, infer T> ? CommandFn<T> : never; } & { readonly [K in keyof NonNullable<D["parts"]> & string as `get${Capitalize<K>}Props`]: (slot?: unknown) => Record<string, unknown>; } & { readonly [K in keyof NonNullable<D["slots"]> & string as `get${Capitalize<K>}Indexes`]: NonNullable<D["slots"]> extends Record<K, infer T> ? T extends {
|
|
234
|
+
indexes(...args: never[]): readonly (infer E)[];
|
|
235
|
+
} ? () => readonly E[] : () => readonly unknown[] : () => readonly unknown[]; } & { readonly [K in keyof NonNullable<D["slots"]> & string as `get${Capitalize<K>}Props`]: NonNullable<D["slots"]> extends Record<K, infer T> ? SlotPropsFn<T> : (slot: unknown) => Record<string, unknown>; } & {
|
|
236
|
+
/** The machine's mode, live: the framework's own reader. */
|
|
237
|
+
readonly state: StateOf<D>;
|
|
238
|
+
};
|
|
239
|
+
/** Present (`""`) when the condition holds and absent (`undefined`) otherwise. */
|
|
240
|
+
export declare function dataAttr(value: boolean): string | undefined;
|
|
241
|
+
/** True when a keystroke is part of an active IME composition session. */
|
|
242
|
+
export declare function isComposing(event: KeyboardEvent): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/runtime/component/define.ts
|
|
2
|
+
/** Present (`""`) when the condition holds and absent (`undefined`) otherwise. */
|
|
3
|
+
function dataAttr(value) {
|
|
4
|
+
return value ? "" : void 0;
|
|
5
|
+
}
|
|
6
|
+
/** True when a keystroke is part of an active IME composition session. */
|
|
7
|
+
function isComposing(event) {
|
|
8
|
+
return event.isComposing === true || event.keyCode === 229;
|
|
9
|
+
}
|
|
10
|
+
export { dataAttr, isComposing };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=define.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Namespaced element ids: `<name>:<element-id>:<part>[:<slot>]`.
|
|
2
|
+
*
|
|
3
|
+
* One factory per connect replaces the hand-written id template strings.
|
|
4
|
+
* Ids are stable per element instance; slot ids take the slot index. */
|
|
5
|
+
export type IdFn = (part: string, slot?: unknown) => string;
|
|
6
|
+
/** Focus a part by id: a missing node is a no-op, never a throw (the
|
|
7
|
+
* element may not be in the document). */
|
|
8
|
+
export declare function focuser(id: IdFn): (part: string, slot?: unknown) => void;
|
|
9
|
+
/** Measure a part by id: a missing node reports null, never a throw (the
|
|
10
|
+
* element may not be in the document yet). Framework-core owned, so defs and
|
|
11
|
+
* bags read geometry through this instead of touching `document` directly;
|
|
12
|
+
* the node resolves through the same identity path `focuser` uses. */
|
|
13
|
+
export declare function measurer(id: IdFn): (part: string, slot?: unknown) => DOMRect | null;
|
|
14
|
+
export declare function ids(name: string, id: string): IdFn;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/runtime/component/ids.ts
|
|
2
|
+
/** Focus a part by id: a missing node is a no-op, never a throw (the
|
|
3
|
+
* element may not be in the document). */
|
|
4
|
+
function focuser(id) {
|
|
5
|
+
return (part, slot) => {
|
|
6
|
+
if (typeof document === "undefined") return;
|
|
7
|
+
document.getElementById(id(part, slot))?.focus({ preventScroll: true });
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/** Measure a part by id: a missing node reports null, never a throw (the
|
|
11
|
+
* element may not be in the document yet). Framework-core owned, so defs and
|
|
12
|
+
* bags read geometry through this instead of touching `document` directly;
|
|
13
|
+
* the node resolves through the same identity path `focuser` uses. */
|
|
14
|
+
function measurer(id) {
|
|
15
|
+
return (part, slot) => {
|
|
16
|
+
if (typeof document === "undefined") return null;
|
|
17
|
+
const node = document.getElementById(id(part, slot));
|
|
18
|
+
if (!(node instanceof Element)) return null;
|
|
19
|
+
try {
|
|
20
|
+
return node.getBoundingClientRect();
|
|
21
|
+
} catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function ids(name, id) {
|
|
27
|
+
const root = id.startsWith(`${name}:`) ? id : `${name}:${id}`;
|
|
28
|
+
return (part, slot) => {
|
|
29
|
+
if (part === "") return root;
|
|
30
|
+
return slot === void 0 || slot === null ? `${root}:${part}` : `${root}:${part}:${String(slot)}`;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export { focuser, ids, measurer };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=ids.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EventMap } from "../machine/fsm/machine.js";
|
|
2
|
+
import { ApiOf, ComponentDef } from "./define.js";
|
|
3
|
+
import { MachineDef } from "../index.js";
|
|
4
|
+
/**
|
|
5
|
+
* The props the host actually wrote, as a predicate.
|
|
6
|
+
* Controlled components live on the authored/written split: a host that
|
|
7
|
+
* writes `value` owns it, and the element marks the write so the bridge can
|
|
8
|
+
* tell a live prop from a coerced default.
|
|
9
|
+
*/
|
|
10
|
+
export declare function authoredProps(props: () => Record<string, unknown>): (name: string) => boolean;
|
|
11
|
+
/** A callback prop, when the host wrote a function for it. */
|
|
12
|
+
export declare function pickCallback<T>(props: Record<string, unknown>, name: string): T | undefined;
|
|
13
|
+
/** A text prop, or empty when the host wrote anything else. */
|
|
14
|
+
export declare function textProp(raw: unknown): string;
|
|
15
|
+
export type DefinedComponent<Api extends object, A = unknown> = ((args?: A) => Api) & Omit<MachineDef, "createBridge"> & {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly fields: readonly string[];
|
|
18
|
+
readonly createBridge: (props: () => Record<string, unknown>, root: () => Element, id: string) => {
|
|
19
|
+
readonly api: Api;
|
|
20
|
+
dispose(): void;
|
|
21
|
+
};
|
|
22
|
+
readonly manifest: {
|
|
23
|
+
readonly parts: readonly string[];
|
|
24
|
+
readonly slots: readonly string[];
|
|
25
|
+
readonly readers: readonly string[];
|
|
26
|
+
readonly methods: readonly string[];
|
|
27
|
+
readonly commands: readonly string[];
|
|
28
|
+
readonly events: readonly string[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare function defineComponent<const D extends ComponentDef<never, never, never, never, never, never, never>>(def: D): D extends ComponentDef<infer _C, infer _E, infer _P, infer A, infer _S, never, never> ? DefinedComponent<ApiOf<D>, A> : never;
|
|
32
|
+
export declare function defineComponent<C extends object, E extends EventMap, Api extends object, A = unknown, S extends string = string>(def: ComponentDef<C, E, Record<string, unknown>, A, S>): DefinedComponent<Api, A>;
|