@wirabyte/ui 2.0.0-beta.0 → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/wirabyte-ui-accordion.mjs +49 -49
- package/fesm2022/wirabyte-ui-accordion.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-alert.mjs +14 -14
- package/fesm2022/wirabyte-ui-alert.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-animate.mjs +10 -10
- package/fesm2022/wirabyte-ui-animate.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-api.mjs +4 -4
- package/fesm2022/wirabyte-ui-asidemenu.mjs +8 -8
- package/fesm2022/wirabyte-ui-asidemenu.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-autocomplete.mjs +10 -10
- package/fesm2022/wirabyte-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-avatar.mjs +24 -24
- package/fesm2022/wirabyte-ui-avatar.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-badge.mjs +20 -20
- package/fesm2022/wirabyte-ui-badge.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-blockui.mjs +8 -8
- package/fesm2022/wirabyte-ui-blockui.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-bottombar.mjs +8 -8
- package/fesm2022/wirabyte-ui-bottombar.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-breadcrumb.mjs +8 -8
- package/fesm2022/wirabyte-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-button.mjs +38 -38
- package/fesm2022/wirabyte-ui-button.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-card.mjs +34 -34
- package/fesm2022/wirabyte-ui-card.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-carousel.mjs +8 -8
- package/fesm2022/wirabyte-ui-carousel.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-chart.mjs +1243 -40
- package/fesm2022/wirabyte-ui-chart.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-chartjs.mjs +10 -10
- package/fesm2022/wirabyte-ui-chartjs.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-checkbox.mjs +29 -29
- package/fesm2022/wirabyte-ui-checkbox.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-chip.mjs +20 -20
- package/fesm2022/wirabyte-ui-chip.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-colorpicker.mjs +8 -8
- package/fesm2022/wirabyte-ui-colorpicker.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-config.mjs +20 -20
- package/fesm2022/wirabyte-ui-config.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-confirmdialog.mjs +14 -14
- package/fesm2022/wirabyte-ui-confirmdialog.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-contextmenu.mjs +7 -7
- package/fesm2022/wirabyte-ui-contextmenu.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-datepicker.mjs +83 -83
- package/fesm2022/wirabyte-ui-datepicker.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-dialog.mjs +21 -21
- package/fesm2022/wirabyte-ui-dialog.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-divider.mjs +16 -16
- package/fesm2022/wirabyte-ui-divider.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-dock.mjs +8 -8
- package/fesm2022/wirabyte-ui-dock.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-dragdrop.mjs +10 -10
- package/fesm2022/wirabyte-ui-dragdrop.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-drawer.mjs +8 -8
- package/fesm2022/wirabyte-ui-drawer.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-editor.mjs +17 -17
- package/fesm2022/wirabyte-ui-editor.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-emptystate.mjs +7 -7
- package/fesm2022/wirabyte-ui-emptystate.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-errorpage.mjs +8 -8
- package/fesm2022/wirabyte-ui-errorpage.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-fieldset.mjs +21 -21
- package/fesm2022/wirabyte-ui-fieldset.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-fileupload.mjs +11 -11
- package/fesm2022/wirabyte-ui-fileupload.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-floatlabel.mjs +7 -7
- package/fesm2022/wirabyte-ui-floatlabel.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-flow.mjs +51 -51
- package/fesm2022/wirabyte-ui-flow.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-galleria.mjs +8 -8
- package/fesm2022/wirabyte-ui-galleria.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-i18n.mjs +17 -17
- package/fesm2022/wirabyte-ui-i18n.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-iconfield.mjs +10 -10
- package/fesm2022/wirabyte-ui-iconfield.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-image.mjs +11 -11
- package/fesm2022/wirabyte-ui-image.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-imagecompare.mjs +8 -8
- package/fesm2022/wirabyte-ui-imagecompare.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-imagecropper.mjs +8 -8
- package/fesm2022/wirabyte-ui-imagecropper.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-inplace.mjs +7 -7
- package/fesm2022/wirabyte-ui-inplace.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-inputgroup.mjs +10 -10
- package/fesm2022/wirabyte-ui-inputgroup.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-inputmask.mjs +10 -10
- package/fesm2022/wirabyte-ui-inputmask.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-inputnumber.mjs +60 -60
- package/fesm2022/wirabyte-ui-inputnumber.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-inputotp.mjs +7 -7
- package/fesm2022/wirabyte-ui-inputotp.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-inputtext.mjs +12 -12
- package/fesm2022/wirabyte-ui-inputtext.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-keyfilter.mjs +7 -7
- package/fesm2022/wirabyte-ui-keyfilter.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-knob.mjs +8 -8
- package/fesm2022/wirabyte-ui-knob.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-listbox.mjs +8 -8
- package/fesm2022/wirabyte-ui-listbox.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-menu.mjs +11 -11
- package/fesm2022/wirabyte-ui-menu.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-menubar.mjs +11 -11
- package/fesm2022/wirabyte-ui-menubar.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-message.mjs +30 -30
- package/fesm2022/wirabyte-ui-message.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-metergroup.mjs +35 -35
- package/fesm2022/wirabyte-ui-metergroup.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-multiselect.mjs +11 -11
- package/fesm2022/wirabyte-ui-multiselect.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-navbar.mjs +8 -8
- package/fesm2022/wirabyte-ui-navbar.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-orderlist.mjs +10 -10
- package/fesm2022/wirabyte-ui-orderlist.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-organizationchart.mjs +8 -8
- package/fesm2022/wirabyte-ui-organizationchart.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-paginator.mjs +11 -11
- package/fesm2022/wirabyte-ui-paginator.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-panel.mjs +26 -26
- package/fesm2022/wirabyte-ui-panel.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-panelmenu.mjs +11 -11
- package/fesm2022/wirabyte-ui-panelmenu.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-password.mjs +48 -48
- package/fesm2022/wirabyte-ui-password.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-picklist.mjs +11 -11
- package/fesm2022/wirabyte-ui-picklist.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-popover.mjs +11 -11
- package/fesm2022/wirabyte-ui-popover.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-presets.mjs +2 -2
- package/fesm2022/wirabyte-ui-presets.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-progressbar.mjs +32 -32
- package/fesm2022/wirabyte-ui-progressbar.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-progressspinner.mjs +28 -28
- package/fesm2022/wirabyte-ui-progressspinner.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-radiobutton.mjs +28 -28
- package/fesm2022/wirabyte-ui-radiobutton.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-rating.mjs +25 -25
- package/fesm2022/wirabyte-ui-rating.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-result.mjs +7 -7
- package/fesm2022/wirabyte-ui-result.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-ripple.mjs +7 -7
- package/fesm2022/wirabyte-ui-ripple.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-scroller.mjs +8 -8
- package/fesm2022/wirabyte-ui-scroller.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-scrollpanel.mjs +7 -7
- package/fesm2022/wirabyte-ui-scrollpanel.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-select.mjs +11 -11
- package/fesm2022/wirabyte-ui-select.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-selectbutton.mjs +33 -33
- package/fesm2022/wirabyte-ui-selectbutton.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-sitefooter.mjs +7 -7
- package/fesm2022/wirabyte-ui-sitefooter.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-skeleton.mjs +19 -19
- package/fesm2022/wirabyte-ui-skeleton.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-slider.mjs +8 -8
- package/fesm2022/wirabyte-ui-slider.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-splitbutton.mjs +7 -7
- package/fesm2022/wirabyte-ui-splitbutton.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-splitter.mjs +11 -11
- package/fesm2022/wirabyte-ui-splitter.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-stepper.mjs +42 -42
- package/fesm2022/wirabyte-ui-stepper.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-steps.mjs +11 -11
- package/fesm2022/wirabyte-ui-steps.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-table.mjs +86 -86
- package/fesm2022/wirabyte-ui-table.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-tabs.mjs +74 -74
- package/fesm2022/wirabyte-ui-tabs.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-tag.mjs +17 -17
- package/fesm2022/wirabyte-ui-tag.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-terminal.mjs +10 -10
- package/fesm2022/wirabyte-ui-terminal.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-textarea.mjs +13 -13
- package/fesm2022/wirabyte-ui-textarea.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-thai.mjs +22 -22
- package/fesm2022/wirabyte-ui-tieredmenu.mjs +8 -8
- package/fesm2022/wirabyte-ui-tieredmenu.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-timeline.mjs +10 -10
- package/fesm2022/wirabyte-ui-timeline.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-toast.mjs +14 -14
- package/fesm2022/wirabyte-ui-toast.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-togglebutton.mjs +30 -30
- package/fesm2022/wirabyte-ui-togglebutton.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-toggleswitch.mjs +27 -27
- package/fesm2022/wirabyte-ui-toggleswitch.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-toolbar.mjs +7 -7
- package/fesm2022/wirabyte-ui-toolbar.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-tooltip.mjs +7 -7
- package/fesm2022/wirabyte-ui-tooltip.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-tree.mjs +8 -8
- package/fesm2022/wirabyte-ui-tree.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-treeselect.mjs +7 -7
- package/fesm2022/wirabyte-ui-treeselect.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-validation.mjs +16 -16
- package/fesm2022/wirabyte-ui-validation.mjs.map +1 -1
- package/fesm2022/wirabyte-ui.mjs +2 -2
- package/fesm2022/wirabyte-ui.mjs.map +1 -1
- package/package.json +123 -326
- package/schematics/ng-add/schema.json +27 -2
- package/theme/_version.scss +1 -1
- package/themes/glass/amber.css +1181 -0
- package/themes/glass/blue.css +1181 -0
- package/themes/glass/cyan.css +1181 -0
- package/themes/glass/emerald.css +1181 -0
- package/themes/glass/fuchsia.css +1181 -0
- package/themes/glass/green.css +1181 -0
- package/themes/glass/indigo.css +1181 -0
- package/themes/glass/lime.css +1181 -0
- package/themes/glass/orange.css +1181 -0
- package/themes/glass/pink.css +1181 -0
- package/themes/glass/purple.css +1181 -0
- package/themes/glass/red.css +1181 -0
- package/themes/glass/rose.css +1181 -0
- package/themes/glass/sky.css +1181 -0
- package/themes/glass/teal.css +1181 -0
- package/themes/glass/theme.css +1181 -0
- package/themes/glass/violet.css +1181 -0
- package/themes/glass/wira.css +1181 -0
- package/themes/glass/yellow.css +1181 -0
- package/themes/lanna/amber.css +1175 -0
- package/themes/lanna/blue.css +1175 -0
- package/themes/lanna/cyan.css +1175 -0
- package/themes/lanna/emerald.css +1175 -0
- package/themes/lanna/fuchsia.css +1175 -0
- package/themes/lanna/green.css +1175 -0
- package/themes/lanna/indigo.css +1175 -0
- package/themes/lanna/lime.css +1175 -0
- package/themes/lanna/orange.css +1175 -0
- package/themes/lanna/pink.css +1175 -0
- package/themes/lanna/purple.css +1175 -0
- package/themes/lanna/red.css +1175 -0
- package/themes/lanna/rose.css +1175 -0
- package/themes/lanna/sky.css +1175 -0
- package/themes/lanna/teal.css +1175 -0
- package/themes/lanna/theme.css +1175 -0
- package/themes/lanna/violet.css +1175 -0
- package/themes/lanna/wira.css +1175 -0
- package/themes/lanna/yellow.css +1175 -0
- package/themes/nakhon/amber.css +1175 -0
- package/themes/nakhon/blue.css +1175 -0
- package/themes/nakhon/cyan.css +1175 -0
- package/themes/nakhon/emerald.css +1175 -0
- package/themes/nakhon/fuchsia.css +1175 -0
- package/themes/nakhon/green.css +1175 -0
- package/themes/nakhon/indigo.css +1175 -0
- package/themes/nakhon/lime.css +1175 -0
- package/themes/nakhon/orange.css +1175 -0
- package/themes/nakhon/pink.css +1175 -0
- package/themes/nakhon/purple.css +1175 -0
- package/themes/nakhon/red.css +1175 -0
- package/themes/nakhon/rose.css +1175 -0
- package/themes/nakhon/sky.css +1175 -0
- package/themes/nakhon/teal.css +1175 -0
- package/themes/nakhon/theme.css +1175 -0
- package/themes/nakhon/violet.css +1175 -0
- package/themes/nakhon/wira.css +1175 -0
- package/themes/nakhon/yellow.css +1175 -0
- package/themes/siam/amber.css +1175 -0
- package/themes/siam/blue.css +1175 -0
- package/themes/siam/cyan.css +1175 -0
- package/themes/siam/emerald.css +1175 -0
- package/themes/siam/fuchsia.css +1175 -0
- package/themes/siam/green.css +1175 -0
- package/themes/siam/indigo.css +1175 -0
- package/themes/siam/lime.css +1175 -0
- package/themes/siam/orange.css +1175 -0
- package/themes/siam/pink.css +1175 -0
- package/themes/siam/purple.css +1175 -0
- package/themes/siam/red.css +1175 -0
- package/themes/siam/rose.css +1175 -0
- package/themes/siam/sky.css +1175 -0
- package/themes/siam/teal.css +1175 -0
- package/themes/siam/theme.css +1175 -0
- package/themes/siam/violet.css +1175 -0
- package/themes/siam/wira.css +1175 -0
- package/themes/siam/yellow.css +1175 -0
- package/themes/wira/amber.css +1175 -0
- package/themes/wira/blue.css +1175 -0
- package/themes/wira/cyan.css +1175 -0
- package/themes/wira/emerald.css +1175 -0
- package/themes/wira/fuchsia.css +1175 -0
- package/themes/wira/green.css +1175 -0
- package/themes/wira/indigo.css +1175 -0
- package/themes/wira/lime.css +1175 -0
- package/themes/wira/orange.css +1175 -0
- package/themes/wira/pink.css +1175 -0
- package/themes/wira/purple.css +1175 -0
- package/themes/wira/red.css +1175 -0
- package/themes/wira/rose.css +1175 -0
- package/themes/wira/sky.css +1175 -0
- package/themes/wira/teal.css +1175 -0
- package/themes/wira/theme.css +1175 -0
- package/themes/wira/violet.css +1175 -0
- package/themes/wira/wira.css +1175 -0
- package/themes/wira/yellow.css +1175 -0
- package/types/wirabyte-ui-accordion.d.ts +124 -0
- package/types/wirabyte-ui-alert.d.ts +254 -0
- package/types/wirabyte-ui-animate.d.ts +100 -0
- package/types/wirabyte-ui-api.d.ts +16 -0
- package/types/wirabyte-ui-asidemenu.d.ts +233 -0
- package/types/wirabyte-ui-autocomplete.d.ts +212 -0
- package/types/wirabyte-ui-avatar.d.ts +49 -0
- package/types/wirabyte-ui-badge.d.ts +66 -0
- package/types/wirabyte-ui-blockui.d.ts +51 -0
- package/types/wirabyte-ui-bottombar.d.ts +91 -0
- package/types/wirabyte-ui-breadcrumb.d.ts +52 -0
- package/types/wirabyte-ui-button.d.ts +132 -0
- package/types/wirabyte-ui-card.d.ts +66 -0
- package/types/wirabyte-ui-carousel.d.ts +202 -0
- package/types/wirabyte-ui-chart.d.ts +412 -0
- package/types/wirabyte-ui-chartjs.d.ts +98 -0
- package/types/wirabyte-ui-checkbox.d.ts +65 -0
- package/types/wirabyte-ui-chip.d.ts +40 -0
- package/types/wirabyte-ui-colorpicker.d.ts +98 -0
- package/types/wirabyte-ui-config.d.ts +330 -0
- package/types/wirabyte-ui-confirmdialog.d.ts +193 -0
- package/types/wirabyte-ui-contextmenu.d.ts +57 -0
- package/types/wirabyte-ui-core.d.ts +4296 -0
- package/types/wirabyte-ui-datepicker.d.ts +251 -0
- package/types/wirabyte-ui-dialog.d.ts +273 -0
- package/types/wirabyte-ui-divider.d.ts +34 -0
- package/types/wirabyte-ui-dock.d.ts +100 -0
- package/types/wirabyte-ui-dragdrop.d.ts +74 -0
- package/types/wirabyte-ui-drawer.d.ts +113 -0
- package/types/wirabyte-ui-editor.d.ts +500 -0
- package/types/wirabyte-ui-emptystate.d.ts +55 -0
- package/types/wirabyte-ui-errorpage.d.ts +84 -0
- package/types/wirabyte-ui-excel.d.ts +29 -0
- package/types/wirabyte-ui-fieldset.d.ts +40 -0
- package/types/wirabyte-ui-fileupload.d.ts +251 -0
- package/types/wirabyte-ui-floatlabel.d.ts +33 -0
- package/types/wirabyte-ui-flow.d.ts +1343 -0
- package/types/wirabyte-ui-galleria.d.ts +173 -0
- package/types/wirabyte-ui-i18n.d.ts +179 -0
- package/types/wirabyte-ui-iconfield.d.ts +40 -0
- package/types/wirabyte-ui-image.d.ts +100 -0
- package/types/wirabyte-ui-imagecompare.d.ts +78 -0
- package/types/wirabyte-ui-imagecropper.d.ts +396 -0
- package/types/wirabyte-ui-inplace.d.ts +69 -0
- package/types/wirabyte-ui-inputgroup.d.ts +36 -0
- package/types/wirabyte-ui-inputmask.d.ts +134 -0
- package/types/wirabyte-ui-inputnumber.d.ts +126 -0
- package/types/wirabyte-ui-inputotp.d.ts +139 -0
- package/types/wirabyte-ui-inputtext.d.ts +38 -0
- package/types/wirabyte-ui-keyfilter.d.ts +40 -0
- package/types/wirabyte-ui-knob.d.ts +104 -0
- package/types/wirabyte-ui-listbox.d.ts +197 -0
- package/types/wirabyte-ui-menu.d.ts +116 -0
- package/types/wirabyte-ui-menubar.d.ts +158 -0
- package/types/wirabyte-ui-message.d.ts +110 -0
- package/types/wirabyte-ui-metergroup.d.ts +107 -0
- package/types/wirabyte-ui-multiselect.d.ts +267 -0
- package/types/wirabyte-ui-navbar.d.ts +184 -0
- package/types/wirabyte-ui-orderlist.d.ts +166 -0
- package/types/wirabyte-ui-organizationchart.d.ts +98 -0
- package/types/wirabyte-ui-paginator.d.ts +122 -0
- package/types/wirabyte-ui-panel.d.ts +57 -0
- package/types/wirabyte-ui-panelmenu.d.ts +70 -0
- package/types/wirabyte-ui-password.d.ts +98 -0
- package/types/wirabyte-ui-picklist.d.ts +309 -0
- package/types/wirabyte-ui-popover.d.ts +81 -0
- package/types/wirabyte-ui-presets.d.ts +1 -0
- package/types/wirabyte-ui-progressbar.d.ts +75 -0
- package/types/wirabyte-ui-progressspinner.d.ts +65 -0
- package/types/wirabyte-ui-radiobutton.d.ts +89 -0
- package/types/wirabyte-ui-rating.d.ts +54 -0
- package/types/wirabyte-ui-result.d.ts +49 -0
- package/types/wirabyte-ui-ripple.d.ts +25 -0
- package/types/wirabyte-ui-scroller.d.ts +145 -0
- package/types/wirabyte-ui-scrollpanel.d.ts +37 -0
- package/types/wirabyte-ui-select.d.ts +250 -0
- package/types/wirabyte-ui-selectbutton.d.ts +80 -0
- package/types/wirabyte-ui-sitefooter.d.ts +81 -0
- package/types/wirabyte-ui-skeleton.d.ts +35 -0
- package/types/wirabyte-ui-slider.d.ts +90 -0
- package/types/wirabyte-ui-splitbutton.d.ts +85 -0
- package/types/wirabyte-ui-splitter.d.ts +146 -0
- package/types/wirabyte-ui-stepper.d.ts +251 -0
- package/types/wirabyte-ui-steps.d.ts +68 -0
- package/types/wirabyte-ui-table.d.ts +1108 -0
- package/types/wirabyte-ui-tabmenu.d.ts +1 -0
- package/types/wirabyte-ui-tabs.d.ts +229 -0
- package/types/wirabyte-ui-tag.d.ts +35 -0
- package/types/wirabyte-ui-terminal.d.ts +89 -0
- package/types/wirabyte-ui-textarea.d.ts +37 -0
- package/types/wirabyte-ui-thai.d.ts +67 -0
- package/types/wirabyte-ui-tieredmenu.d.ts +100 -0
- package/types/wirabyte-ui-timeline.d.ts +54 -0
- package/types/wirabyte-ui-toast.d.ts +151 -0
- package/types/wirabyte-ui-togglebutton.d.ts +62 -0
- package/types/wirabyte-ui-toggleswitch.d.ts +57 -0
- package/types/wirabyte-ui-toolbar.d.ts +40 -0
- package/types/wirabyte-ui-tooltip.d.ts +112 -0
- package/types/wirabyte-ui-tree.d.ts +160 -0
- package/types/wirabyte-ui-treeselect.d.ts +150 -0
- package/types/wirabyte-ui-validation.d.ts +81 -0
- package/types/wirabyte-ui.d.ts +4 -0
- package/accordion/accordion.component.d.ts +0 -102
- package/accordion/accordion.module.d.ts +0 -9
- package/accordion/accordion.types.d.ts +0 -10
- package/accordion/index.d.ts +0 -5
- package/accordion/public-api.d.ts +0 -3
- package/alert/alert-dialog.base.d.ts +0 -79
- package/alert/alert-dialog.component.d.ts +0 -8
- package/alert/alert.module.d.ts +0 -8
- package/alert/alert.service.d.ts +0 -73
- package/alert/alert.types.d.ts +0 -87
- package/alert/index.d.ts +0 -5
- package/alert/public-api.d.ts +0 -5
- package/animate/animate.directive.d.ts +0 -34
- package/animate/animate.module.d.ts +0 -11
- package/animate/animate.service.d.ts +0 -36
- package/animate/animate.styles.d.ts +0 -2
- package/animate/animate.types.d.ts +0 -20
- package/animate/index.d.ts +0 -5
- package/animate/public-api.d.ts +0 -4
- package/api/index.d.ts +0 -5
- package/api/public-api.d.ts +0 -15
- package/api/shared.module.d.ts +0 -8
- package/asidemenu/asidemenu.component.d.ts +0 -221
- package/asidemenu/asidemenu.module.d.ts +0 -9
- package/asidemenu/index.d.ts +0 -5
- package/asidemenu/public-api.d.ts +0 -2
- package/autocomplete/autocomplete.base.d.ts +0 -181
- package/autocomplete/autocomplete.component.d.ts +0 -10
- package/autocomplete/autocomplete.module.d.ts +0 -9
- package/autocomplete/autocomplete.types.d.ts +0 -10
- package/autocomplete/index.d.ts +0 -5
- package/autocomplete/public-api.d.ts +0 -4
- package/avatar/avatar.component.d.ts +0 -36
- package/avatar/avatar.module.d.ts +0 -8
- package/avatar/avatar.types.d.ts +0 -2
- package/avatar/index.d.ts +0 -5
- package/avatar/public-api.d.ts +0 -3
- package/badge/badge.component.d.ts +0 -20
- package/badge/badge.directive.d.ts +0 -32
- package/badge/badge.module.d.ts +0 -9
- package/badge/badge.styles.d.ts +0 -2
- package/badge/badge.types.d.ts +0 -3
- package/badge/index.d.ts +0 -5
- package/badge/public-api.d.ts +0 -4
- package/blockui/blockui.component.d.ts +0 -41
- package/blockui/blockui.module.d.ts +0 -8
- package/blockui/index.d.ts +0 -5
- package/blockui/public-api.d.ts +0 -2
- package/bottombar/bottombar.component.d.ts +0 -79
- package/bottombar/bottombar.module.d.ts +0 -9
- package/bottombar/index.d.ts +0 -5
- package/bottombar/public-api.d.ts +0 -2
- package/breadcrumb/breadcrumb.component.d.ts +0 -41
- package/breadcrumb/breadcrumb.module.d.ts +0 -8
- package/breadcrumb/index.d.ts +0 -5
- package/breadcrumb/public-api.d.ts +0 -2
- package/button/button-class.d.ts +0 -8
- package/button/button.component.d.ts +0 -49
- package/button/button.directive.d.ts +0 -53
- package/button/button.module.d.ts +0 -9
- package/button/button.styles.d.ts +0 -2
- package/button/button.types.d.ts +0 -8
- package/button/index.d.ts +0 -5
- package/button/public-api.d.ts +0 -7
- package/card/card-slots.d.ts +0 -11
- package/card/card.component.d.ts +0 -38
- package/card/card.module.d.ts +0 -10
- package/card/card.types.d.ts +0 -5
- package/card/index.d.ts +0 -5
- package/card/public-api.d.ts +0 -4
- package/carousel/carousel.component.d.ts +0 -169
- package/carousel/carousel.module.d.ts +0 -10
- package/carousel/carousel.types.d.ts +0 -21
- package/carousel/index.d.ts +0 -5
- package/carousel/public-api.d.ts +0 -3
- package/chart/chart.component.d.ts +0 -11
- package/chart/chart.module.d.ts +0 -8
- package/chart/index.d.ts +0 -5
- package/chart/public-api.d.ts +0 -3
- package/chartjs/chartjs.base.d.ts +0 -70
- package/chartjs/chartjs.component.d.ts +0 -10
- package/chartjs/chartjs.module.d.ts +0 -8
- package/chartjs/chartjs.types.d.ts +0 -8
- package/chartjs/index.d.ts +0 -5
- package/chartjs/public-api.d.ts +0 -4
- package/checkbox/checkbox.component.d.ts +0 -47
- package/checkbox/checkbox.module.d.ts +0 -8
- package/checkbox/checkbox.styles.d.ts +0 -2
- package/checkbox/checkbox.types.d.ts +0 -4
- package/checkbox/index.d.ts +0 -5
- package/checkbox/public-api.d.ts +0 -5
- package/chip/chip.component.d.ts +0 -30
- package/chip/chip.module.d.ts +0 -8
- package/chip/index.d.ts +0 -5
- package/chip/public-api.d.ts +0 -2
- package/colorpicker/colorpicker.component.d.ts +0 -87
- package/colorpicker/colorpicker.module.d.ts +0 -8
- package/colorpicker/index.d.ts +0 -5
- package/colorpicker/public-api.d.ts +0 -2
- package/config/forms.d.ts +0 -17
- package/config/index.d.ts +0 -5
- package/config/initializer.d.ts +0 -3
- package/config/menu-item.d.ts +0 -52
- package/config/options.d.ts +0 -48
- package/config/popup.d.ts +0 -48
- package/config/provide.d.ts +0 -23
- package/config/public-api.d.ts +0 -17
- package/config/ripple.d.ts +0 -2
- package/config/scroll-lock.d.ts +0 -5
- package/config/severity.d.ts +0 -5
- package/config/style-loader.d.ts +0 -12
- package/config/template.d.ts +0 -19
- package/config/theme.service.d.ts +0 -46
- package/config/version-guard.d.ts +0 -14
- package/config/version.d.ts +0 -6
- package/config/wu-config.service.d.ts +0 -24
- package/confirmdialog/confirmation.service.d.ts +0 -25
- package/confirmdialog/confirmdialog.base.d.ts +0 -110
- package/confirmdialog/confirmdialog.component.d.ts +0 -11
- package/confirmdialog/confirmdialog.module.d.ts +0 -9
- package/confirmdialog/confirmdialog.types.d.ts +0 -37
- package/confirmdialog/index.d.ts +0 -5
- package/confirmdialog/public-api.d.ts +0 -5
- package/contextmenu/contextmenu.component.d.ts +0 -47
- package/contextmenu/contextmenu.module.d.ts +0 -8
- package/contextmenu/index.d.ts +0 -5
- package/contextmenu/public-api.d.ts +0 -2
- package/core/carousel.d.ts +0 -27
- package/core/catalog.d.ts +0 -446
- package/core/chart/format.d.ts +0 -19
- package/core/chart/index.d.ts +0 -6
- package/core/chart/kinds.d.ts +0 -78
- package/core/chart/model.d.ts +0 -500
- package/core/chart/more.d.ts +0 -33
- package/core/chart/paths.d.ts +0 -41
- package/core/chart/scale.d.ts +0 -22
- package/core/color.d.ts +0 -31
- package/core/colorpicker.d.ts +0 -23
- package/core/compat.d.ts +0 -11
- package/core/config.d.ts +0 -64
- package/core/date.d.ts +0 -130
- package/core/datepicker.d.ts +0 -184
- package/core/dock.d.ts +0 -6
- package/core/editor.d.ts +0 -117
- package/core/errorpage.d.ts +0 -15
- package/core/excel.d.ts +0 -239
- package/core/exporters.d.ts +0 -18
- package/core/families.d.ts +0 -13
- package/core/fileupload.d.ts +0 -24
- package/core/flow/changes.d.ts +0 -63
- package/core/flow/edges.d.ts +0 -52
- package/core/flow/export.d.ts +0 -56
- package/core/flow/geometry.d.ts +0 -117
- package/core/flow/graph.d.ts +0 -104
- package/core/flow/history.d.ts +0 -54
- package/core/flow/index.d.ts +0 -13
- package/core/flow/interaction.d.ts +0 -140
- package/core/flow/layout.d.ts +0 -57
- package/core/flow/paths.d.ts +0 -76
- package/core/flow/text.d.ts +0 -18
- package/core/flow/types.d.ts +0 -217
- package/core/flow/viewport.d.ts +0 -48
- package/core/i18n.d.ts +0 -24
- package/core/imagecompare.d.ts +0 -12
- package/core/imagecropper.d.ts +0 -183
- package/core/index.d.ts +0 -39
- package/core/inputotp.d.ts +0 -20
- package/core/knob.d.ts +0 -28
- package/core/mask.d.ts +0 -43
- package/core/menu.d.ts +0 -29
- package/core/number.d.ts +0 -66
- package/core/organizationchart.d.ts +0 -39
- package/core/overrides.d.ts +0 -109
- package/core/picklist.d.ts +0 -81
- package/core/select.d.ts +0 -44
- package/core/splitter.d.ts +0 -17
- package/core/table.d.ts +0 -48
- package/core/terminal.d.ts +0 -12
- package/core/thai/buddhist.d.ts +0 -22
- package/core/thai/locale.d.ts +0 -358
- package/core/thai/text.d.ts +0 -32
- package/core/thai/thai-id.d.ts +0 -6
- package/core/tokens.d.ts +0 -69
- package/core/tree.d.ts +0 -50
- package/core/validation.d.ts +0 -18
- package/datepicker/datepicker.component.d.ts +0 -230
- package/datepicker/datepicker.module.d.ts +0 -8
- package/datepicker/datepicker.types.d.ts +0 -10
- package/datepicker/index.d.ts +0 -5
- package/datepicker/public-api.d.ts +0 -3
- package/dialog/dialog.base.d.ts +0 -147
- package/dialog/dialog.component.d.ts +0 -11
- package/dialog/dialog.module.d.ts +0 -10
- package/dialog/dialog.service.d.ts +0 -104
- package/dialog/dialog.types.d.ts +0 -3
- package/dialog/index.d.ts +0 -5
- package/dialog/public-api.d.ts +0 -5
- package/divider/divider.component.d.ts +0 -19
- package/divider/divider.module.d.ts +0 -8
- package/divider/divider.types.d.ts +0 -4
- package/divider/index.d.ts +0 -5
- package/divider/public-api.d.ts +0 -3
- package/dock/dock.component.d.ts +0 -88
- package/dock/dock.module.d.ts +0 -9
- package/dock/index.d.ts +0 -5
- package/dock/public-api.d.ts +0 -2
- package/dragdrop/dragdrop.directive.d.ts +0 -65
- package/dragdrop/dragdrop.module.d.ts +0 -8
- package/dragdrop/dragdrop.styles.d.ts +0 -2
- package/dragdrop/index.d.ts +0 -5
- package/dragdrop/public-api.d.ts +0 -2
- package/drawer/drawer.component.d.ts +0 -102
- package/drawer/drawer.module.d.ts +0 -8
- package/drawer/index.d.ts +0 -5
- package/drawer/public-api.d.ts +0 -5
- package/editor/editor-content.directive.d.ts +0 -10
- package/editor/editor-icon.directive.d.ts +0 -8
- package/editor/editor.base.d.ts +0 -367
- package/editor/editor.component.d.ts +0 -11
- package/editor/editor.dom.d.ts +0 -91
- package/editor/editor.icons.d.ts +0 -13
- package/editor/editor.module.d.ts +0 -10
- package/editor/editor.styles.d.ts +0 -2
- package/editor/editor.types.d.ts +0 -92
- package/editor/index.d.ts +0 -5
- package/editor/public-api.d.ts +0 -6
- package/emptystate/emptystate.component.d.ts +0 -44
- package/emptystate/emptystate.module.d.ts +0 -8
- package/emptystate/index.d.ts +0 -5
- package/emptystate/public-api.d.ts +0 -2
- package/errorpage/errorpage.component.d.ts +0 -73
- package/errorpage/errorpage.module.d.ts +0 -8
- package/errorpage/index.d.ts +0 -5
- package/errorpage/public-api.d.ts +0 -2
- package/esm2022/accordion/accordion.component.mjs +0 -285
- package/esm2022/accordion/accordion.module.mjs +0 -19
- package/esm2022/accordion/accordion.types.mjs +0 -17
- package/esm2022/accordion/public-api.mjs +0 -4
- package/esm2022/accordion/wirabyte-ui-accordion.mjs +0 -5
- package/esm2022/alert/alert-dialog.base.mjs +0 -355
- package/esm2022/alert/alert-dialog.component.mjs +0 -21
- package/esm2022/alert/alert.module.mjs +0 -17
- package/esm2022/alert/alert.service.mjs +0 -142
- package/esm2022/alert/alert.types.mjs +0 -2
- package/esm2022/alert/public-api.mjs +0 -6
- package/esm2022/alert/wirabyte-ui-alert.mjs +0 -5
- package/esm2022/animate/animate.directive.mjs +0 -71
- package/esm2022/animate/animate.module.mjs +0 -21
- package/esm2022/animate/animate.service.mjs +0 -183
- package/esm2022/animate/animate.styles.mjs +0 -3
- package/esm2022/animate/animate.types.mjs +0 -2
- package/esm2022/animate/public-api.mjs +0 -5
- package/esm2022/animate/wirabyte-ui-animate.mjs +0 -5
- package/esm2022/api/public-api.mjs +0 -11
- package/esm2022/api/shared.module.mjs +0 -17
- package/esm2022/api/wirabyte-ui-api.mjs +0 -5
- package/esm2022/asidemenu/asidemenu.component.mjs +0 -811
- package/esm2022/asidemenu/asidemenu.module.mjs +0 -18
- package/esm2022/asidemenu/public-api.mjs +0 -3
- package/esm2022/asidemenu/wirabyte-ui-asidemenu.mjs +0 -5
- package/esm2022/autocomplete/autocomplete.base.mjs +0 -567
- package/esm2022/autocomplete/autocomplete.component.mjs +0 -24
- package/esm2022/autocomplete/autocomplete.module.mjs +0 -18
- package/esm2022/autocomplete/autocomplete.types.mjs +0 -2
- package/esm2022/autocomplete/public-api.mjs +0 -5
- package/esm2022/autocomplete/wirabyte-ui-autocomplete.mjs +0 -5
- package/esm2022/avatar/avatar.component.mjs +0 -68
- package/esm2022/avatar/avatar.module.mjs +0 -17
- package/esm2022/avatar/avatar.types.mjs +0 -2
- package/esm2022/avatar/public-api.mjs +0 -4
- package/esm2022/avatar/wirabyte-ui-avatar.mjs +0 -5
- package/esm2022/badge/badge.component.mjs +0 -49
- package/esm2022/badge/badge.directive.mjs +0 -111
- package/esm2022/badge/badge.module.mjs +0 -18
- package/esm2022/badge/badge.styles.mjs +0 -3
- package/esm2022/badge/badge.types.mjs +0 -2
- package/esm2022/badge/public-api.mjs +0 -5
- package/esm2022/badge/wirabyte-ui-badge.mjs +0 -5
- package/esm2022/blockui/blockui.component.mjs +0 -152
- package/esm2022/blockui/blockui.module.mjs +0 -17
- package/esm2022/blockui/public-api.mjs +0 -3
- package/esm2022/blockui/wirabyte-ui-blockui.mjs +0 -5
- package/esm2022/bottombar/bottombar.component.mjs +0 -209
- package/esm2022/bottombar/bottombar.module.mjs +0 -18
- package/esm2022/bottombar/public-api.mjs +0 -3
- package/esm2022/bottombar/wirabyte-ui-bottombar.mjs +0 -5
- package/esm2022/breadcrumb/breadcrumb.component.mjs +0 -86
- package/esm2022/breadcrumb/breadcrumb.module.mjs +0 -17
- package/esm2022/breadcrumb/public-api.mjs +0 -3
- package/esm2022/breadcrumb/wirabyte-ui-breadcrumb.mjs +0 -5
- package/esm2022/button/button-class.mjs +0 -26
- package/esm2022/button/button.component.mjs +0 -110
- package/esm2022/button/button.directive.mjs +0 -193
- package/esm2022/button/button.module.mjs +0 -18
- package/esm2022/button/button.styles.mjs +0 -3
- package/esm2022/button/button.types.mjs +0 -2
- package/esm2022/button/public-api.mjs +0 -8
- package/esm2022/button/wirabyte-ui-button.mjs +0 -5
- package/esm2022/card/card-slots.mjs +0 -27
- package/esm2022/card/card.component.mjs +0 -65
- package/esm2022/card/card.module.mjs +0 -19
- package/esm2022/card/card.types.mjs +0 -2
- package/esm2022/card/public-api.mjs +0 -5
- package/esm2022/card/wirabyte-ui-card.mjs +0 -5
- package/esm2022/carousel/carousel.component.mjs +0 -617
- package/esm2022/carousel/carousel.module.mjs +0 -19
- package/esm2022/carousel/carousel.types.mjs +0 -2
- package/esm2022/carousel/public-api.mjs +0 -4
- package/esm2022/carousel/wirabyte-ui-carousel.mjs +0 -5
- package/esm2022/chart/chart.component.mjs +0 -42
- package/esm2022/chart/chart.module.mjs +0 -17
- package/esm2022/chart/public-api.mjs +0 -3
- package/esm2022/chart/wirabyte-ui-chart.mjs +0 -5
- package/esm2022/chartjs/chartjs.base.mjs +0 -204
- package/esm2022/chartjs/chartjs.component.mjs +0 -41
- package/esm2022/chartjs/chartjs.module.mjs +0 -17
- package/esm2022/chartjs/chartjs.types.mjs +0 -2
- package/esm2022/chartjs/public-api.mjs +0 -5
- package/esm2022/chartjs/wirabyte-ui-chartjs.mjs +0 -5
- package/esm2022/checkbox/checkbox.component.mjs +0 -93
- package/esm2022/checkbox/checkbox.module.mjs +0 -17
- package/esm2022/checkbox/checkbox.styles.mjs +0 -3
- package/esm2022/checkbox/checkbox.types.mjs +0 -2
- package/esm2022/checkbox/public-api.mjs +0 -6
- package/esm2022/checkbox/wirabyte-ui-checkbox.mjs +0 -5
- package/esm2022/chip/chip.component.mjs +0 -59
- package/esm2022/chip/chip.module.mjs +0 -17
- package/esm2022/chip/public-api.mjs +0 -3
- package/esm2022/chip/wirabyte-ui-chip.mjs +0 -5
- package/esm2022/colorpicker/colorpicker.component.mjs +0 -308
- package/esm2022/colorpicker/colorpicker.module.mjs +0 -17
- package/esm2022/colorpicker/public-api.mjs +0 -3
- package/esm2022/colorpicker/wirabyte-ui-colorpicker.mjs +0 -5
- package/esm2022/config/forms.mjs +0 -38
- package/esm2022/config/initializer.mjs +0 -6
- package/esm2022/config/menu-item.mjs +0 -2
- package/esm2022/config/options.mjs +0 -3
- package/esm2022/config/popup.mjs +0 -153
- package/esm2022/config/provide.mjs +0 -45
- package/esm2022/config/public-api.mjs +0 -17
- package/esm2022/config/ripple.mjs +0 -13
- package/esm2022/config/scroll-lock.mjs +0 -31
- package/esm2022/config/severity.mjs +0 -9
- package/esm2022/config/style-loader.mjs +0 -32
- package/esm2022/config/template.mjs +0 -46
- package/esm2022/config/theme.service.mjs +0 -161
- package/esm2022/config/version-guard.mjs +0 -43
- package/esm2022/config/version.mjs +0 -3
- package/esm2022/config/wirabyte-ui-config.mjs +0 -5
- package/esm2022/config/wu-config.service.mjs +0 -50
- package/esm2022/confirmdialog/confirmation.service.mjs +0 -78
- package/esm2022/confirmdialog/confirmdialog.base.mjs +0 -274
- package/esm2022/confirmdialog/confirmdialog.component.mjs +0 -22
- package/esm2022/confirmdialog/confirmdialog.module.mjs +0 -18
- package/esm2022/confirmdialog/confirmdialog.types.mjs +0 -8
- package/esm2022/confirmdialog/public-api.mjs +0 -6
- package/esm2022/confirmdialog/wirabyte-ui-confirmdialog.mjs +0 -5
- package/esm2022/contextmenu/contextmenu.component.mjs +0 -159
- package/esm2022/contextmenu/contextmenu.module.mjs +0 -17
- package/esm2022/contextmenu/public-api.mjs +0 -3
- package/esm2022/contextmenu/wirabyte-ui-contextmenu.mjs +0 -5
- package/esm2022/core/carousel.mjs +0 -62
- package/esm2022/core/catalog.mjs +0 -203
- package/esm2022/core/chart/format.mjs +0 -66
- package/esm2022/core/chart/index.mjs +0 -7
- package/esm2022/core/chart/kinds.mjs +0 -1336
- package/esm2022/core/chart/model.mjs +0 -713
- package/esm2022/core/chart/more.mjs +0 -311
- package/esm2022/core/chart/paths.mjs +0 -160
- package/esm2022/core/chart/scale.mjs +0 -58
- package/esm2022/core/color.mjs +0 -94
- package/esm2022/core/colorpicker.mjs +0 -73
- package/esm2022/core/compat.mjs +0 -149
- package/esm2022/core/config.mjs +0 -163
- package/esm2022/core/date.mjs +0 -317
- package/esm2022/core/datepicker.mjs +0 -526
- package/esm2022/core/dock.mjs +0 -14
- package/esm2022/core/editor.mjs +0 -271
- package/esm2022/core/errorpage.mjs +0 -47
- package/esm2022/core/excel.mjs +0 -809
- package/esm2022/core/exporters.mjs +0 -241
- package/esm2022/core/families.mjs +0 -1756
- package/esm2022/core/fileupload.mjs +0 -48
- package/esm2022/core/flow/changes.mjs +0 -205
- package/esm2022/core/flow/edges.mjs +0 -87
- package/esm2022/core/flow/export.mjs +0 -231
- package/esm2022/core/flow/geometry.mjs +0 -309
- package/esm2022/core/flow/graph.mjs +0 -314
- package/esm2022/core/flow/history.mjs +0 -105
- package/esm2022/core/flow/index.mjs +0 -14
- package/esm2022/core/flow/interaction.mjs +0 -246
- package/esm2022/core/flow/layout.mjs +0 -586
- package/esm2022/core/flow/paths.mjs +0 -252
- package/esm2022/core/flow/text.mjs +0 -68
- package/esm2022/core/flow/types.mjs +0 -7
- package/esm2022/core/flow/viewport.mjs +0 -133
- package/esm2022/core/i18n.mjs +0 -78
- package/esm2022/core/imagecompare.mjs +0 -28
- package/esm2022/core/imagecropper.mjs +0 -483
- package/esm2022/core/index.mjs +0 -40
- package/esm2022/core/inputotp.mjs +0 -50
- package/esm2022/core/knob.mjs +0 -106
- package/esm2022/core/mask.mjs +0 -112
- package/esm2022/core/menu.mjs +0 -77
- package/esm2022/core/number.mjs +0 -131
- package/esm2022/core/organizationchart.mjs +0 -84
- package/esm2022/core/overrides.mjs +0 -169
- package/esm2022/core/picklist.mjs +0 -248
- package/esm2022/core/select.mjs +0 -161
- package/esm2022/core/splitter.mjs +0 -63
- package/esm2022/core/table.mjs +0 -174
- package/esm2022/core/terminal.mjs +0 -29
- package/esm2022/core/thai/buddhist.mjs +0 -129
- package/esm2022/core/thai/locale.mjs +0 -652
- package/esm2022/core/thai/text.mjs +0 -164
- package/esm2022/core/thai/thai-id.mjs +0 -22
- package/esm2022/core/tokens.mjs +0 -314
- package/esm2022/core/tree.mjs +0 -137
- package/esm2022/core/validation.mjs +0 -43
- package/esm2022/core/wirabyte-ui-core.mjs +0 -5
- package/esm2022/datepicker/datepicker.component.mjs +0 -715
- package/esm2022/datepicker/datepicker.module.mjs +0 -17
- package/esm2022/datepicker/datepicker.types.mjs +0 -2
- package/esm2022/datepicker/public-api.mjs +0 -4
- package/esm2022/datepicker/wirabyte-ui-datepicker.mjs +0 -5
- package/esm2022/dialog/dialog.base.mjs +0 -433
- package/esm2022/dialog/dialog.component.mjs +0 -18
- package/esm2022/dialog/dialog.module.mjs +0 -19
- package/esm2022/dialog/dialog.service.mjs +0 -237
- package/esm2022/dialog/dialog.types.mjs +0 -2
- package/esm2022/dialog/public-api.mjs +0 -6
- package/esm2022/dialog/wirabyte-ui-dialog.mjs +0 -5
- package/esm2022/divider/divider.component.mjs +0 -47
- package/esm2022/divider/divider.module.mjs +0 -17
- package/esm2022/divider/divider.types.mjs +0 -2
- package/esm2022/divider/public-api.mjs +0 -4
- package/esm2022/divider/wirabyte-ui-divider.mjs +0 -5
- package/esm2022/dock/dock.component.mjs +0 -287
- package/esm2022/dock/dock.module.mjs +0 -18
- package/esm2022/dock/public-api.mjs +0 -3
- package/esm2022/dock/wirabyte-ui-dock.mjs +0 -5
- package/esm2022/dragdrop/dragdrop.directive.mjs +0 -206
- package/esm2022/dragdrop/dragdrop.module.mjs +0 -17
- package/esm2022/dragdrop/dragdrop.styles.mjs +0 -3
- package/esm2022/dragdrop/public-api.mjs +0 -3
- package/esm2022/dragdrop/wirabyte-ui-dragdrop.mjs +0 -5
- package/esm2022/drawer/drawer.component.mjs +0 -300
- package/esm2022/drawer/drawer.module.mjs +0 -17
- package/esm2022/drawer/public-api.mjs +0 -6
- package/esm2022/drawer/wirabyte-ui-drawer.mjs +0 -5
- package/esm2022/editor/editor-content.directive.mjs +0 -24
- package/esm2022/editor/editor-icon.directive.mjs +0 -24
- package/esm2022/editor/editor.base.mjs +0 -2082
- package/esm2022/editor/editor.component.mjs +0 -20
- package/esm2022/editor/editor.dom.mjs +0 -787
- package/esm2022/editor/editor.icons.mjs +0 -106
- package/esm2022/editor/editor.module.mjs +0 -19
- package/esm2022/editor/editor.styles.mjs +0 -3
- package/esm2022/editor/editor.types.mjs +0 -6
- package/esm2022/editor/public-api.mjs +0 -7
- package/esm2022/editor/wirabyte-ui-editor.mjs +0 -5
- package/esm2022/emptystate/emptystate.component.mjs +0 -78
- package/esm2022/emptystate/emptystate.module.mjs +0 -17
- package/esm2022/emptystate/public-api.mjs +0 -3
- package/esm2022/emptystate/wirabyte-ui-emptystate.mjs +0 -5
- package/esm2022/errorpage/errorpage.component.mjs +0 -163
- package/esm2022/errorpage/errorpage.module.mjs +0 -17
- package/esm2022/errorpage/public-api.mjs +0 -3
- package/esm2022/errorpage/wirabyte-ui-errorpage.mjs +0 -5
- package/esm2022/excel/excel.mjs +0 -35
- package/esm2022/excel/public-api.mjs +0 -3
- package/esm2022/excel/wirabyte-ui-excel.mjs +0 -5
- package/esm2022/fieldset/fieldset.component.mjs +0 -53
- package/esm2022/fieldset/fieldset.module.mjs +0 -18
- package/esm2022/fieldset/public-api.mjs +0 -3
- package/esm2022/fieldset/wirabyte-ui-fieldset.mjs +0 -5
- package/esm2022/fileupload/fileupload.base.mjs +0 -563
- package/esm2022/fileupload/fileupload.component.mjs +0 -19
- package/esm2022/fileupload/fileupload.module.mjs +0 -18
- package/esm2022/fileupload/fileupload.types.mjs +0 -2
- package/esm2022/fileupload/public-api.mjs +0 -5
- package/esm2022/fileupload/wirabyte-ui-fileupload.mjs +0 -5
- package/esm2022/floatlabel/floatlabel.component.mjs +0 -53
- package/esm2022/floatlabel/floatlabel.module.mjs +0 -17
- package/esm2022/floatlabel/floatlabel.types.mjs +0 -2
- package/esm2022/floatlabel/public-api.mjs +0 -4
- package/esm2022/floatlabel/wirabyte-ui-floatlabel.mjs +0 -5
- package/esm2022/flow/flow-background.component.mjs +0 -183
- package/esm2022/flow/flow-controls.component.mjs +0 -267
- package/esm2022/flow/flow-handle.component.mjs +0 -130
- package/esm2022/flow/flow-history.directive.mjs +0 -129
- package/esm2022/flow/flow-host.mjs +0 -7
- package/esm2022/flow/flow-minimap.component.mjs +0 -322
- package/esm2022/flow/flow-node-outlet.mjs +0 -148
- package/esm2022/flow/flow-node-resizer.component.mjs +0 -208
- package/esm2022/flow/flow-node-toolbar.component.mjs +0 -119
- package/esm2022/flow/flow-panel.component.mjs +0 -37
- package/esm2022/flow/flow-templates.mjs +0 -100
- package/esm2022/flow/flow.component.mjs +0 -3245
- package/esm2022/flow/flow.module.mjs +0 -69
- package/esm2022/flow/flow.types.mjs +0 -7
- package/esm2022/flow/public-api.mjs +0 -17
- package/esm2022/flow/wirabyte-ui-flow.mjs +0 -5
- package/esm2022/galleria/galleria.component.mjs +0 -480
- package/esm2022/galleria/galleria.module.mjs +0 -17
- package/esm2022/galleria/public-api.mjs +0 -3
- package/esm2022/galleria/wirabyte-ui-galleria.mjs +0 -5
- package/esm2022/i18n/i18n.module.mjs +0 -37
- package/esm2022/i18n/i18n.service.mjs +0 -148
- package/esm2022/i18n/i18n.types.mjs +0 -3
- package/esm2022/i18n/language-switch.component.mjs +0 -91
- package/esm2022/i18n/public-api.mjs +0 -7
- package/esm2022/i18n/translate.pipe.mjs +0 -52
- package/esm2022/i18n/wirabyte-ui-i18n.mjs +0 -5
- package/esm2022/iconfield/iconfield.component.mjs +0 -73
- package/esm2022/iconfield/iconfield.module.mjs +0 -17
- package/esm2022/iconfield/public-api.mjs +0 -3
- package/esm2022/iconfield/wirabyte-ui-iconfield.mjs +0 -5
- package/esm2022/image/image.base.mjs +0 -183
- package/esm2022/image/image.component.mjs +0 -14
- package/esm2022/image/image.module.mjs +0 -18
- package/esm2022/image/public-api.mjs +0 -4
- package/esm2022/image/wirabyte-ui-image.mjs +0 -5
- package/esm2022/imagecompare/imagecompare.component.mjs +0 -200
- package/esm2022/imagecompare/imagecompare.module.mjs +0 -18
- package/esm2022/imagecompare/public-api.mjs +0 -3
- package/esm2022/imagecompare/wirabyte-ui-imagecompare.mjs +0 -5
- package/esm2022/imagecropper/imagecropper.component.mjs +0 -1253
- package/esm2022/imagecropper/imagecropper.module.mjs +0 -17
- package/esm2022/imagecropper/imagecropper.types.mjs +0 -6
- package/esm2022/imagecropper/public-api.mjs +0 -5
- package/esm2022/imagecropper/wirabyte-ui-imagecropper.mjs +0 -5
- package/esm2022/inplace/inplace.component.mjs +0 -145
- package/esm2022/inplace/inplace.module.mjs +0 -17
- package/esm2022/inplace/public-api.mjs +0 -3
- package/esm2022/inplace/wirabyte-ui-inplace.mjs +0 -5
- package/esm2022/inputgroup/inputgroup.component.mjs +0 -61
- package/esm2022/inputgroup/inputgroup.module.mjs +0 -17
- package/esm2022/inputgroup/public-api.mjs +0 -3
- package/esm2022/inputgroup/wirabyte-ui-inputgroup.mjs +0 -5
- package/esm2022/inputmask/inputmask.base.mjs +0 -319
- package/esm2022/inputmask/inputmask.component.mjs +0 -23
- package/esm2022/inputmask/inputmask.module.mjs +0 -17
- package/esm2022/inputmask/public-api.mjs +0 -4
- package/esm2022/inputmask/wirabyte-ui-inputmask.mjs +0 -5
- package/esm2022/inputnumber/inputnumber.component.mjs +0 -255
- package/esm2022/inputnumber/inputnumber.module.mjs +0 -17
- package/esm2022/inputnumber/inputnumber.types.mjs +0 -2
- package/esm2022/inputnumber/public-api.mjs +0 -4
- package/esm2022/inputnumber/wirabyte-ui-inputnumber.mjs +0 -5
- package/esm2022/inputotp/inputotp.component.mjs +0 -344
- package/esm2022/inputotp/inputotp.module.mjs +0 -18
- package/esm2022/inputotp/inputotp.types.mjs +0 -2
- package/esm2022/inputotp/public-api.mjs +0 -4
- package/esm2022/inputotp/wirabyte-ui-inputotp.mjs +0 -5
- package/esm2022/inputtext/inputtext.directive.mjs +0 -54
- package/esm2022/inputtext/inputtext.module.mjs +0 -17
- package/esm2022/inputtext/inputtext.styles.mjs +0 -3
- package/esm2022/inputtext/inputtext.types.mjs +0 -2
- package/esm2022/inputtext/public-api.mjs +0 -6
- package/esm2022/inputtext/wirabyte-ui-inputtext.mjs +0 -5
- package/esm2022/keyfilter/keyfilter.directive.mjs +0 -131
- package/esm2022/keyfilter/keyfilter.module.mjs +0 -17
- package/esm2022/keyfilter/public-api.mjs +0 -3
- package/esm2022/keyfilter/wirabyte-ui-keyfilter.mjs +0 -5
- package/esm2022/knob/knob.component.mjs +0 -207
- package/esm2022/knob/knob.module.mjs +0 -17
- package/esm2022/knob/public-api.mjs +0 -3
- package/esm2022/knob/wirabyte-ui-knob.mjs +0 -5
- package/esm2022/listbox/listbox.component.mjs +0 -520
- package/esm2022/listbox/listbox.module.mjs +0 -17
- package/esm2022/listbox/public-api.mjs +0 -3
- package/esm2022/listbox/wirabyte-ui-listbox.mjs +0 -5
- package/esm2022/menu/menu.base.mjs +0 -320
- package/esm2022/menu/menu.component.mjs +0 -19
- package/esm2022/menu/menu.module.mjs +0 -18
- package/esm2022/menu/public-api.mjs +0 -4
- package/esm2022/menu/wirabyte-ui-menu.mjs +0 -5
- package/esm2022/menubar/menubar.base.mjs +0 -568
- package/esm2022/menubar/menubar.component.mjs +0 -19
- package/esm2022/menubar/menubar.module.mjs +0 -18
- package/esm2022/menubar/public-api.mjs +0 -4
- package/esm2022/menubar/wirabyte-ui-menubar.mjs +0 -5
- package/esm2022/message/message.component.mjs +0 -78
- package/esm2022/message/message.module.mjs +0 -20
- package/esm2022/message/message.types.mjs +0 -2
- package/esm2022/message/messages.base.mjs +0 -109
- package/esm2022/message/messages.component.mjs +0 -66
- package/esm2022/message/public-api.mjs +0 -6
- package/esm2022/message/wirabyte-ui-message.mjs +0 -5
- package/esm2022/metergroup/metergroup.component.mjs +0 -87
- package/esm2022/metergroup/metergroup.module.mjs +0 -17
- package/esm2022/metergroup/metergroup.types.mjs +0 -26
- package/esm2022/metergroup/public-api.mjs +0 -4
- package/esm2022/metergroup/wirabyte-ui-metergroup.mjs +0 -5
- package/esm2022/multiselect/multiselect.base.mjs +0 -732
- package/esm2022/multiselect/multiselect.component.mjs +0 -26
- package/esm2022/multiselect/multiselect.module.mjs +0 -18
- package/esm2022/multiselect/multiselect.styles.mjs +0 -3
- package/esm2022/multiselect/multiselect.types.mjs +0 -2
- package/esm2022/multiselect/public-api.mjs +0 -6
- package/esm2022/multiselect/wirabyte-ui-multiselect.mjs +0 -5
- package/esm2022/navbar/navbar.component.mjs +0 -460
- package/esm2022/navbar/navbar.module.mjs +0 -18
- package/esm2022/navbar/public-api.mjs +0 -3
- package/esm2022/navbar/wirabyte-ui-navbar.mjs +0 -5
- package/esm2022/orderlist/orderlist.base.mjs +0 -411
- package/esm2022/orderlist/orderlist.component.mjs +0 -17
- package/esm2022/orderlist/orderlist.module.mjs +0 -18
- package/esm2022/orderlist/orderlist.types.mjs +0 -2
- package/esm2022/orderlist/public-api.mjs +0 -5
- package/esm2022/orderlist/wirabyte-ui-orderlist.mjs +0 -5
- package/esm2022/organizationchart/organizationchart.component.mjs +0 -200
- package/esm2022/organizationchart/organizationchart.module.mjs +0 -18
- package/esm2022/organizationchart/organizationchart.types.mjs +0 -2
- package/esm2022/organizationchart/public-api.mjs +0 -4
- package/esm2022/organizationchart/wirabyte-ui-organizationchart.mjs +0 -5
- package/esm2022/paginator/paginator.base.mjs +0 -188
- package/esm2022/paginator/paginator.component.mjs +0 -20
- package/esm2022/paginator/paginator.module.mjs +0 -17
- package/esm2022/paginator/paginator.types.mjs +0 -2
- package/esm2022/paginator/public-api.mjs +0 -5
- package/esm2022/paginator/wirabyte-ui-paginator.mjs +0 -5
- package/esm2022/panel/panel.component.mjs +0 -75
- package/esm2022/panel/panel.module.mjs +0 -19
- package/esm2022/panel/panel.types.mjs +0 -2
- package/esm2022/panel/public-api.mjs +0 -4
- package/esm2022/panel/wirabyte-ui-panel.mjs +0 -5
- package/esm2022/panelmenu/panelmenu.base.mjs +0 -181
- package/esm2022/panelmenu/panelmenu.component.mjs +0 -15
- package/esm2022/panelmenu/panelmenu.module.mjs +0 -18
- package/esm2022/panelmenu/public-api.mjs +0 -4
- package/esm2022/panelmenu/wirabyte-ui-panelmenu.mjs +0 -5
- package/esm2022/password/password.component.mjs +0 -171
- package/esm2022/password/password.module.mjs +0 -17
- package/esm2022/password/password.types.mjs +0 -14
- package/esm2022/password/public-api.mjs +0 -4
- package/esm2022/password/wirabyte-ui-password.mjs +0 -5
- package/esm2022/picklist/list-drag.mjs +0 -259
- package/esm2022/picklist/picklist.base.mjs +0 -649
- package/esm2022/picklist/picklist.component.mjs +0 -17
- package/esm2022/picklist/picklist.module.mjs +0 -18
- package/esm2022/picklist/picklist.styles.mjs +0 -3
- package/esm2022/picklist/picklist.types.mjs +0 -2
- package/esm2022/picklist/public-api.mjs +0 -8
- package/esm2022/picklist/wirabyte-ui-picklist.mjs +0 -5
- package/esm2022/popover/popover.base.mjs +0 -171
- package/esm2022/popover/popover.component.mjs +0 -17
- package/esm2022/popover/popover.module.mjs +0 -18
- package/esm2022/popover/public-api.mjs +0 -4
- package/esm2022/popover/wirabyte-ui-popover.mjs +0 -5
- package/esm2022/presets/public-api.mjs +0 -5
- package/esm2022/presets/wirabyte-ui-presets.mjs +0 -5
- package/esm2022/progressbar/progressbar.component.mjs +0 -75
- package/esm2022/progressbar/progressbar.module.mjs +0 -17
- package/esm2022/progressbar/progressbar.types.mjs +0 -19
- package/esm2022/progressbar/public-api.mjs +0 -4
- package/esm2022/progressbar/wirabyte-ui-progressbar.mjs +0 -5
- package/esm2022/progressspinner/progressspinner.component.mjs +0 -78
- package/esm2022/progressspinner/progressspinner.module.mjs +0 -17
- package/esm2022/progressspinner/progressspinner.types.mjs +0 -27
- package/esm2022/progressspinner/public-api.mjs +0 -4
- package/esm2022/progressspinner/wirabyte-ui-progressspinner.mjs +0 -5
- package/esm2022/public-api.mjs +0 -3
- package/esm2022/radiobutton/public-api.mjs +0 -7
- package/esm2022/radiobutton/radio-registry.mjs +0 -40
- package/esm2022/radiobutton/radiobutton.component.mjs +0 -88
- package/esm2022/radiobutton/radiobutton.module.mjs +0 -17
- package/esm2022/radiobutton/radiobutton.styles.mjs +0 -3
- package/esm2022/radiobutton/radiobutton.types.mjs +0 -2
- package/esm2022/radiobutton/wirabyte-ui-radiobutton.mjs +0 -5
- package/esm2022/rating/public-api.mjs +0 -4
- package/esm2022/rating/rating.component.mjs +0 -80
- package/esm2022/rating/rating.module.mjs +0 -17
- package/esm2022/rating/rating.types.mjs +0 -2
- package/esm2022/rating/wirabyte-ui-rating.mjs +0 -5
- package/esm2022/result/public-api.mjs +0 -3
- package/esm2022/result/result.component.mjs +0 -72
- package/esm2022/result/result.module.mjs +0 -17
- package/esm2022/result/wirabyte-ui-result.mjs +0 -5
- package/esm2022/ripple/public-api.mjs +0 -3
- package/esm2022/ripple/ripple.directive.mjs +0 -43
- package/esm2022/ripple/ripple.module.mjs +0 -17
- package/esm2022/ripple/ripple.styles.mjs +0 -3
- package/esm2022/ripple/wirabyte-ui-ripple.mjs +0 -5
- package/esm2022/scroller/public-api.mjs +0 -6
- package/esm2022/scroller/scroller.component.mjs +0 -305
- package/esm2022/scroller/scroller.module.mjs +0 -17
- package/esm2022/scroller/wirabyte-ui-scroller.mjs +0 -5
- package/esm2022/scrollpanel/public-api.mjs +0 -3
- package/esm2022/scrollpanel/scrollpanel.component.mjs +0 -67
- package/esm2022/scrollpanel/scrollpanel.module.mjs +0 -17
- package/esm2022/scrollpanel/wirabyte-ui-scrollpanel.mjs +0 -5
- package/esm2022/select/public-api.mjs +0 -7
- package/esm2022/select/select.base.mjs +0 -667
- package/esm2022/select/select.component.mjs +0 -26
- package/esm2022/select/select.module.mjs +0 -17
- package/esm2022/select/select.styles.mjs +0 -3
- package/esm2022/select/select.types.mjs +0 -2
- package/esm2022/select/wirabyte-ui-select.mjs +0 -5
- package/esm2022/selectbutton/public-api.mjs +0 -4
- package/esm2022/selectbutton/selectbutton.component.mjs +0 -125
- package/esm2022/selectbutton/selectbutton.module.mjs +0 -18
- package/esm2022/selectbutton/selectbutton.types.mjs +0 -2
- package/esm2022/selectbutton/wirabyte-ui-selectbutton.mjs +0 -5
- package/esm2022/sitefooter/public-api.mjs +0 -3
- package/esm2022/sitefooter/sitefooter.component.mjs +0 -139
- package/esm2022/sitefooter/sitefooter.module.mjs +0 -18
- package/esm2022/sitefooter/wirabyte-ui-sitefooter.mjs +0 -5
- package/esm2022/skeleton/public-api.mjs +0 -4
- package/esm2022/skeleton/skeleton.component.mjs +0 -42
- package/esm2022/skeleton/skeleton.module.mjs +0 -17
- package/esm2022/skeleton/skeleton.types.mjs +0 -2
- package/esm2022/skeleton/wirabyte-ui-skeleton.mjs +0 -5
- package/esm2022/slider/public-api.mjs +0 -3
- package/esm2022/slider/slider.component.mjs +0 -247
- package/esm2022/slider/slider.module.mjs +0 -17
- package/esm2022/slider/wirabyte-ui-slider.mjs +0 -5
- package/esm2022/splitbutton/public-api.mjs +0 -3
- package/esm2022/splitbutton/splitbutton.component.mjs +0 -180
- package/esm2022/splitbutton/splitbutton.module.mjs +0 -17
- package/esm2022/splitbutton/wirabyte-ui-splitbutton.mjs +0 -5
- package/esm2022/splitter/public-api.mjs +0 -5
- package/esm2022/splitter/splitter-panel.component.mjs +0 -32
- package/esm2022/splitter/splitter.component.mjs +0 -372
- package/esm2022/splitter/splitter.module.mjs +0 -19
- package/esm2022/splitter/splitter.types.mjs +0 -2
- package/esm2022/splitter/wirabyte-ui-splitter.mjs +0 -5
- package/esm2022/stepper/public-api.mjs +0 -4
- package/esm2022/stepper/stepper.base.mjs +0 -392
- package/esm2022/stepper/stepper.component.mjs +0 -209
- package/esm2022/stepper/stepper.module.mjs +0 -19
- package/esm2022/stepper/wirabyte-ui-stepper.mjs +0 -5
- package/esm2022/steps/public-api.mjs +0 -4
- package/esm2022/steps/steps.base.mjs +0 -148
- package/esm2022/steps/steps.component.mjs +0 -15
- package/esm2022/steps/steps.module.mjs +0 -17
- package/esm2022/steps/wirabyte-ui-steps.mjs +0 -5
- package/esm2022/table/public-api.mjs +0 -10
- package/esm2022/table/table-celleditor.component.mjs +0 -48
- package/esm2022/table/table-filter.component.mjs +0 -144
- package/esm2022/table/table.base.mjs +0 -1443
- package/esm2022/table/table.celleditor.mjs +0 -42
- package/esm2022/table/table.component.mjs +0 -21
- package/esm2022/table/table.directives.mjs +0 -1117
- package/esm2022/table/table.filter.mjs +0 -346
- package/esm2022/table/table.module.mjs +0 -93
- package/esm2022/table/table.types.mjs +0 -3
- package/esm2022/table/wirabyte-ui-table.mjs +0 -5
- package/esm2022/tabmenu/public-api.mjs +0 -3
- package/esm2022/tabmenu/wirabyte-ui-tabmenu.mjs +0 -5
- package/esm2022/tabs/public-api.mjs +0 -9
- package/esm2022/tabs/tabmenu.base.mjs +0 -196
- package/esm2022/tabs/tabmenu.component.mjs +0 -18
- package/esm2022/tabs/tabmenu.module.mjs +0 -18
- package/esm2022/tabs/tabs.component.mjs +0 -352
- package/esm2022/tabs/tabs.module.mjs +0 -20
- package/esm2022/tabs/tabs.styles.mjs +0 -3
- package/esm2022/tabs/tabs.types.mjs +0 -50
- package/esm2022/tabs/wirabyte-ui-tabs.mjs +0 -5
- package/esm2022/tag/public-api.mjs +0 -4
- package/esm2022/tag/tag.component.mjs +0 -42
- package/esm2022/tag/tag.module.mjs +0 -17
- package/esm2022/tag/tag.types.mjs +0 -2
- package/esm2022/tag/wirabyte-ui-tag.mjs +0 -5
- package/esm2022/terminal/public-api.mjs +0 -6
- package/esm2022/terminal/terminal.component.mjs +0 -150
- package/esm2022/terminal/terminal.module.mjs +0 -17
- package/esm2022/terminal/terminal.service.mjs +0 -35
- package/esm2022/terminal/wirabyte-ui-terminal.mjs +0 -5
- package/esm2022/textarea/public-api.mjs +0 -3
- package/esm2022/textarea/textarea.directive.mjs +0 -75
- package/esm2022/textarea/textarea.module.mjs +0 -17
- package/esm2022/textarea/wirabyte-ui-textarea.mjs +0 -5
- package/esm2022/thai/public-api.mjs +0 -4
- package/esm2022/thai/thai.module.mjs +0 -18
- package/esm2022/thai/thai.pipes.mjs +0 -115
- package/esm2022/thai/wirabyte-ui-thai.mjs +0 -5
- package/esm2022/tieredmenu/public-api.mjs +0 -3
- package/esm2022/tieredmenu/tieredmenu.component.mjs +0 -385
- package/esm2022/tieredmenu/tieredmenu.module.mjs +0 -17
- package/esm2022/tieredmenu/wirabyte-ui-tieredmenu.mjs +0 -5
- package/esm2022/timeline/public-api.mjs +0 -4
- package/esm2022/timeline/timeline.base.mjs +0 -66
- package/esm2022/timeline/timeline.component.mjs +0 -68
- package/esm2022/timeline/timeline.module.mjs +0 -18
- package/esm2022/timeline/wirabyte-ui-timeline.mjs +0 -5
- package/esm2022/toast/message.service.mjs +0 -34
- package/esm2022/toast/public-api.mjs +0 -6
- package/esm2022/toast/toast.base.mjs +0 -227
- package/esm2022/toast/toast.component.mjs +0 -17
- package/esm2022/toast/toast.module.mjs +0 -18
- package/esm2022/toast/toast.types.mjs +0 -2
- package/esm2022/toast/wirabyte-ui-toast.mjs +0 -5
- package/esm2022/togglebutton/public-api.mjs +0 -4
- package/esm2022/togglebutton/togglebutton.component.mjs +0 -93
- package/esm2022/togglebutton/togglebutton.module.mjs +0 -17
- package/esm2022/togglebutton/togglebutton.types.mjs +0 -2
- package/esm2022/togglebutton/wirabyte-ui-togglebutton.mjs +0 -5
- package/esm2022/toggleswitch/public-api.mjs +0 -4
- package/esm2022/toggleswitch/toggleswitch.component.mjs +0 -78
- package/esm2022/toggleswitch/toggleswitch.module.mjs +0 -17
- package/esm2022/toggleswitch/toggleswitch.types.mjs +0 -2
- package/esm2022/toggleswitch/wirabyte-ui-toggleswitch.mjs +0 -5
- package/esm2022/toolbar/public-api.mjs +0 -3
- package/esm2022/toolbar/toolbar.component.mjs +0 -67
- package/esm2022/toolbar/toolbar.module.mjs +0 -18
- package/esm2022/toolbar/wirabyte-ui-toolbar.mjs +0 -5
- package/esm2022/tooltip/public-api.mjs +0 -4
- package/esm2022/tooltip/tooltip.directive.mjs +0 -370
- package/esm2022/tooltip/tooltip.module.mjs +0 -17
- package/esm2022/tooltip/tooltip.styles.mjs +0 -3
- package/esm2022/tooltip/tooltip.types.mjs +0 -2
- package/esm2022/tooltip/wirabyte-ui-tooltip.mjs +0 -5
- package/esm2022/tree/public-api.mjs +0 -3
- package/esm2022/tree/tree.component.mjs +0 -453
- package/esm2022/tree/tree.module.mjs +0 -17
- package/esm2022/tree/wirabyte-ui-tree.mjs +0 -5
- package/esm2022/treeselect/public-api.mjs +0 -3
- package/esm2022/treeselect/treeselect.component.mjs +0 -410
- package/esm2022/treeselect/treeselect.module.mjs +0 -17
- package/esm2022/treeselect/wirabyte-ui-treeselect.mjs +0 -5
- package/esm2022/validation/field-error.component.mjs +0 -84
- package/esm2022/validation/public-api.mjs +0 -4
- package/esm2022/validation/validation.module.mjs +0 -19
- package/esm2022/validation/validators.mjs +0 -84
- package/esm2022/validation/wirabyte-ui-validation.mjs +0 -5
- package/esm2022/wirabyte-ui.mjs +0 -5
- package/excel/excel.d.ts +0 -24
- package/excel/index.d.ts +0 -5
- package/excel/public-api.d.ts +0 -3
- package/fieldset/fieldset.component.d.ts +0 -29
- package/fieldset/fieldset.module.d.ts +0 -9
- package/fieldset/index.d.ts +0 -5
- package/fieldset/public-api.d.ts +0 -2
- package/fileupload/fileupload.base.d.ts +0 -175
- package/fileupload/fileupload.component.d.ts +0 -11
- package/fileupload/fileupload.module.d.ts +0 -9
- package/fileupload/fileupload.types.d.ts +0 -54
- package/fileupload/index.d.ts +0 -5
- package/fileupload/public-api.d.ts +0 -4
- package/floatlabel/floatlabel.component.d.ts +0 -21
- package/floatlabel/floatlabel.module.d.ts +0 -8
- package/floatlabel/floatlabel.types.d.ts +0 -1
- package/floatlabel/index.d.ts +0 -5
- package/floatlabel/public-api.d.ts +0 -3
- package/flow/flow-background.component.d.ts +0 -49
- package/flow/flow-controls.component.d.ts +0 -47
- package/flow/flow-handle.component.d.ts +0 -48
- package/flow/flow-history.directive.d.ts +0 -42
- package/flow/flow-host.d.ts +0 -48
- package/flow/flow-minimap.component.d.ts +0 -79
- package/flow/flow-node-outlet.d.ts +0 -46
- package/flow/flow-node-resizer.component.d.ts +0 -57
- package/flow/flow-node-toolbar.component.d.ts +0 -38
- package/flow/flow-panel.component.d.ts +0 -11
- package/flow/flow-templates.d.ts +0 -47
- package/flow/flow.component.d.ts +0 -633
- package/flow/flow.module.d.ts +0 -21
- package/flow/flow.types.d.ts +0 -210
- package/flow/index.d.ts +0 -5
- package/flow/public-api.d.ts +0 -16
- package/galleria/galleria.component.d.ts +0 -163
- package/galleria/galleria.module.d.ts +0 -8
- package/galleria/index.d.ts +0 -5
- package/galleria/public-api.d.ts +0 -2
- package/i18n/i18n.module.d.ts +0 -22
- package/i18n/i18n.service.d.ts +0 -54
- package/i18n/i18n.types.d.ts +0 -33
- package/i18n/index.d.ts +0 -5
- package/i18n/language-switch.component.d.ts +0 -50
- package/i18n/public-api.d.ts +0 -6
- package/i18n/translate.pipe.d.ts +0 -25
- package/iconfield/iconfield.component.d.ts +0 -30
- package/iconfield/iconfield.module.d.ts +0 -8
- package/iconfield/index.d.ts +0 -5
- package/iconfield/public-api.d.ts +0 -2
- package/image/image.base.d.ts +0 -83
- package/image/image.component.d.ts +0 -7
- package/image/image.module.d.ts +0 -9
- package/image/index.d.ts +0 -5
- package/image/public-api.d.ts +0 -3
- package/imagecompare/imagecompare.component.d.ts +0 -67
- package/imagecompare/imagecompare.module.d.ts +0 -9
- package/imagecompare/index.d.ts +0 -5
- package/imagecompare/public-api.d.ts +0 -2
- package/imagecropper/imagecropper.component.d.ts +0 -309
- package/imagecropper/imagecropper.module.d.ts +0 -8
- package/imagecropper/imagecropper.types.d.ts +0 -79
- package/imagecropper/index.d.ts +0 -5
- package/imagecropper/public-api.d.ts +0 -4
- package/index.d.ts +0 -5
- package/inplace/index.d.ts +0 -5
- package/inplace/inplace.component.d.ts +0 -59
- package/inplace/inplace.module.d.ts +0 -8
- package/inplace/public-api.d.ts +0 -2
- package/inputgroup/index.d.ts +0 -5
- package/inputgroup/inputgroup.component.d.ts +0 -26
- package/inputgroup/inputgroup.module.d.ts +0 -8
- package/inputgroup/public-api.d.ts +0 -2
- package/inputmask/index.d.ts +0 -5
- package/inputmask/inputmask.base.d.ts +0 -115
- package/inputmask/inputmask.component.d.ts +0 -10
- package/inputmask/inputmask.module.d.ts +0 -8
- package/inputmask/public-api.d.ts +0 -3
- package/inputnumber/index.d.ts +0 -5
- package/inputnumber/inputnumber.component.d.ts +0 -108
- package/inputnumber/inputnumber.module.d.ts +0 -8
- package/inputnumber/inputnumber.types.d.ts +0 -7
- package/inputnumber/public-api.d.ts +0 -3
- package/inputotp/index.d.ts +0 -5
- package/inputotp/inputotp.component.d.ts +0 -105
- package/inputotp/inputotp.module.d.ts +0 -9
- package/inputotp/inputotp.types.d.ts +0 -22
- package/inputotp/public-api.d.ts +0 -3
- package/inputtext/index.d.ts +0 -5
- package/inputtext/inputtext.directive.d.ts +0 -21
- package/inputtext/inputtext.module.d.ts +0 -8
- package/inputtext/inputtext.styles.d.ts +0 -2
- package/inputtext/inputtext.types.d.ts +0 -3
- package/inputtext/public-api.d.ts +0 -5
- package/keyfilter/index.d.ts +0 -5
- package/keyfilter/keyfilter.directive.d.ts +0 -29
- package/keyfilter/keyfilter.module.d.ts +0 -8
- package/keyfilter/public-api.d.ts +0 -2
- package/knob/index.d.ts +0 -5
- package/knob/knob.component.d.ts +0 -94
- package/knob/knob.module.d.ts +0 -8
- package/knob/public-api.d.ts +0 -2
- package/listbox/index.d.ts +0 -5
- package/listbox/listbox.component.d.ts +0 -186
- package/listbox/listbox.module.d.ts +0 -8
- package/listbox/public-api.d.ts +0 -2
- package/menu/index.d.ts +0 -5
- package/menu/menu.base.d.ts +0 -95
- package/menu/menu.component.d.ts +0 -11
- package/menu/menu.module.d.ts +0 -9
- package/menu/public-api.d.ts +0 -4
- package/menubar/index.d.ts +0 -5
- package/menubar/menubar.base.d.ts +0 -135
- package/menubar/menubar.component.d.ts +0 -11
- package/menubar/menubar.module.d.ts +0 -9
- package/menubar/public-api.d.ts +0 -4
- package/message/index.d.ts +0 -5
- package/message/message.component.d.ts +0 -39
- package/message/message.module.d.ts +0 -11
- package/message/message.types.d.ts +0 -5
- package/message/messages.base.d.ts +0 -50
- package/message/messages.component.d.ts +0 -7
- package/message/public-api.d.ts +0 -5
- package/metergroup/index.d.ts +0 -5
- package/metergroup/metergroup.component.d.ts +0 -54
- package/metergroup/metergroup.module.d.ts +0 -8
- package/metergroup/metergroup.types.d.ts +0 -42
- package/metergroup/public-api.d.ts +0 -3
- package/multiselect/index.d.ts +0 -5
- package/multiselect/multiselect.base.d.ts +0 -222
- package/multiselect/multiselect.component.d.ts +0 -11
- package/multiselect/multiselect.module.d.ts +0 -9
- package/multiselect/multiselect.styles.d.ts +0 -2
- package/multiselect/multiselect.types.d.ts +0 -20
- package/multiselect/public-api.d.ts +0 -5
- package/navbar/index.d.ts +0 -5
- package/navbar/navbar.component.d.ts +0 -172
- package/navbar/navbar.module.d.ts +0 -9
- package/navbar/public-api.d.ts +0 -2
- package/orderlist/index.d.ts +0 -5
- package/orderlist/orderlist.base.d.ts +0 -136
- package/orderlist/orderlist.component.d.ts +0 -10
- package/orderlist/orderlist.module.d.ts +0 -9
- package/orderlist/orderlist.types.d.ts +0 -10
- package/orderlist/public-api.d.ts +0 -4
- package/organizationchart/index.d.ts +0 -5
- package/organizationchart/organizationchart.component.d.ts +0 -76
- package/organizationchart/organizationchart.module.d.ts +0 -9
- package/organizationchart/organizationchart.types.d.ts +0 -10
- package/organizationchart/public-api.d.ts +0 -4
- package/paginator/index.d.ts +0 -5
- package/paginator/paginator.base.d.ts +0 -95
- package/paginator/paginator.component.d.ts +0 -10
- package/paginator/paginator.module.d.ts +0 -8
- package/paginator/paginator.types.d.ts +0 -7
- package/paginator/public-api.d.ts +0 -4
- package/panel/index.d.ts +0 -5
- package/panel/panel.component.d.ts +0 -42
- package/panel/panel.module.d.ts +0 -10
- package/panel/panel.types.d.ts +0 -2
- package/panel/public-api.d.ts +0 -3
- package/panelmenu/index.d.ts +0 -5
- package/panelmenu/panelmenu.base.d.ts +0 -53
- package/panelmenu/panelmenu.component.d.ts +0 -7
- package/panelmenu/panelmenu.module.d.ts +0 -9
- package/panelmenu/public-api.d.ts +0 -3
- package/password/index.d.ts +0 -5
- package/password/password.component.d.ts +0 -79
- package/password/password.module.d.ts +0 -8
- package/password/password.types.d.ts +0 -6
- package/password/public-api.d.ts +0 -3
- package/picklist/index.d.ts +0 -5
- package/picklist/list-drag.d.ts +0 -49
- package/picklist/picklist.base.d.ts +0 -217
- package/picklist/picklist.component.d.ts +0 -10
- package/picklist/picklist.module.d.ts +0 -9
- package/picklist/picklist.styles.d.ts +0 -2
- package/picklist/picklist.types.d.ts +0 -21
- package/picklist/public-api.d.ts +0 -7
- package/popover/index.d.ts +0 -5
- package/popover/popover.base.d.ts +0 -61
- package/popover/popover.component.d.ts +0 -10
- package/popover/popover.module.d.ts +0 -9
- package/popover/public-api.d.ts +0 -3
- package/presets/index.d.ts +0 -5
- package/presets/public-api.d.ts +0 -2
- package/progressbar/index.d.ts +0 -5
- package/progressbar/progressbar.component.d.ts +0 -48
- package/progressbar/progressbar.module.d.ts +0 -8
- package/progressbar/progressbar.types.d.ts +0 -16
- package/progressbar/public-api.d.ts +0 -3
- package/progressspinner/index.d.ts +0 -5
- package/progressspinner/progressspinner.component.d.ts +0 -44
- package/progressspinner/progressspinner.module.d.ts +0 -8
- package/progressspinner/progressspinner.types.d.ts +0 -9
- package/progressspinner/public-api.d.ts +0 -3
- package/public-api.d.ts +0 -2
- package/radiobutton/index.d.ts +0 -5
- package/radiobutton/public-api.d.ts +0 -6
- package/radiobutton/radio-registry.d.ts +0 -23
- package/radiobutton/radiobutton.component.d.ts +0 -50
- package/radiobutton/radiobutton.module.d.ts +0 -8
- package/radiobutton/radiobutton.styles.d.ts +0 -2
- package/radiobutton/radiobutton.types.d.ts +0 -4
- package/rating/index.d.ts +0 -5
- package/rating/public-api.d.ts +0 -3
- package/rating/rating.component.d.ts +0 -39
- package/rating/rating.module.d.ts +0 -8
- package/rating/rating.types.d.ts +0 -4
- package/result/index.d.ts +0 -5
- package/result/public-api.d.ts +0 -2
- package/result/result.component.d.ts +0 -39
- package/result/result.module.d.ts +0 -8
- package/ripple/index.d.ts +0 -5
- package/ripple/public-api.d.ts +0 -2
- package/ripple/ripple.directive.d.ts +0 -15
- package/ripple/ripple.module.d.ts +0 -8
- package/ripple/ripple.styles.d.ts +0 -2
- package/scroller/index.d.ts +0 -5
- package/scroller/public-api.d.ts +0 -5
- package/scroller/scroller.component.d.ts +0 -135
- package/scroller/scroller.module.d.ts +0 -8
- package/scrollpanel/index.d.ts +0 -5
- package/scrollpanel/public-api.d.ts +0 -2
- package/scrollpanel/scrollpanel.component.d.ts +0 -27
- package/scrollpanel/scrollpanel.module.d.ts +0 -8
- package/select/index.d.ts +0 -5
- package/select/public-api.d.ts +0 -6
- package/select/select.base.d.ts +0 -217
- package/select/select.component.d.ts +0 -11
- package/select/select.module.d.ts +0 -8
- package/select/select.styles.d.ts +0 -2
- package/select/select.types.d.ts +0 -9
- package/selectbutton/index.d.ts +0 -5
- package/selectbutton/public-api.d.ts +0 -3
- package/selectbutton/selectbutton.component.d.ts +0 -59
- package/selectbutton/selectbutton.module.d.ts +0 -9
- package/selectbutton/selectbutton.types.d.ts +0 -9
- package/sitefooter/index.d.ts +0 -5
- package/sitefooter/public-api.d.ts +0 -2
- package/sitefooter/sitefooter.component.d.ts +0 -69
- package/sitefooter/sitefooter.module.d.ts +0 -9
- package/skeleton/index.d.ts +0 -5
- package/skeleton/public-api.d.ts +0 -3
- package/skeleton/skeleton.component.d.ts +0 -22
- package/skeleton/skeleton.module.d.ts +0 -8
- package/skeleton/skeleton.types.d.ts +0 -2
- package/slider/index.d.ts +0 -5
- package/slider/public-api.d.ts +0 -2
- package/slider/slider.component.d.ts +0 -79
- package/slider/slider.module.d.ts +0 -8
- package/splitbutton/index.d.ts +0 -5
- package/splitbutton/public-api.d.ts +0 -2
- package/splitbutton/splitbutton.component.d.ts +0 -75
- package/splitbutton/splitbutton.module.d.ts +0 -8
- package/splitter/index.d.ts +0 -5
- package/splitter/public-api.d.ts +0 -4
- package/splitter/splitter-panel.component.d.ts +0 -20
- package/splitter/splitter.component.d.ts +0 -109
- package/splitter/splitter.module.d.ts +0 -10
- package/splitter/splitter.types.d.ts +0 -8
- package/stepper/index.d.ts +0 -5
- package/stepper/public-api.d.ts +0 -3
- package/stepper/stepper.base.d.ts +0 -200
- package/stepper/stepper.component.d.ts +0 -41
- package/stepper/stepper.module.d.ts +0 -9
- package/steps/index.d.ts +0 -5
- package/steps/public-api.d.ts +0 -3
- package/steps/steps.base.d.ts +0 -52
- package/steps/steps.component.d.ts +0 -7
- package/steps/steps.module.d.ts +0 -8
- package/table/index.d.ts +0 -5
- package/table/public-api.d.ts +0 -9
- package/table/table-celleditor.component.d.ts +0 -14
- package/table/table-filter.component.d.ts +0 -11
- package/table/table.base.d.ts +0 -410
- package/table/table.celleditor.d.ts +0 -20
- package/table/table.component.d.ts +0 -12
- package/table/table.directives.d.ts +0 -330
- package/table/table.filter.d.ts +0 -131
- package/table/table.module.d.ts +0 -12
- package/table/table.types.d.ts +0 -180
- package/tabmenu/index.d.ts +0 -5
- package/tabmenu/public-api.d.ts +0 -2
- package/tabs/index.d.ts +0 -5
- package/tabs/public-api.d.ts +0 -8
- package/tabs/tabmenu.base.d.ts +0 -59
- package/tabs/tabmenu.component.d.ts +0 -10
- package/tabs/tabmenu.module.d.ts +0 -9
- package/tabs/tabs.component.d.ts +0 -120
- package/tabs/tabs.module.d.ts +0 -10
- package/tabs/tabs.styles.d.ts +0 -2
- package/tabs/tabs.types.d.ts +0 -21
- package/tag/index.d.ts +0 -5
- package/tag/public-api.d.ts +0 -3
- package/tag/tag.component.d.ts +0 -20
- package/tag/tag.module.d.ts +0 -8
- package/tag/tag.types.d.ts +0 -2
- package/terminal/index.d.ts +0 -5
- package/terminal/public-api.d.ts +0 -5
- package/terminal/terminal.component.d.ts +0 -58
- package/terminal/terminal.module.d.ts +0 -8
- package/terminal/terminal.service.d.ts +0 -20
- package/textarea/index.d.ts +0 -5
- package/textarea/public-api.d.ts +0 -2
- package/textarea/textarea.directive.d.ts +0 -27
- package/textarea/textarea.module.d.ts +0 -8
- package/thai/index.d.ts +0 -5
- package/thai/public-api.d.ts +0 -3
- package/thai/thai.module.d.ts +0 -8
- package/thai/thai.pipes.d.ts +0 -57
- package/tieredmenu/index.d.ts +0 -5
- package/tieredmenu/public-api.d.ts +0 -2
- package/tieredmenu/tieredmenu.component.d.ts +0 -90
- package/tieredmenu/tieredmenu.module.d.ts +0 -8
- package/timeline/index.d.ts +0 -5
- package/timeline/public-api.d.ts +0 -3
- package/timeline/timeline.base.d.ts +0 -36
- package/timeline/timeline.component.d.ts +0 -7
- package/timeline/timeline.module.d.ts +0 -9
- package/toast/index.d.ts +0 -5
- package/toast/message.service.d.ts +0 -19
- package/toast/public-api.d.ts +0 -5
- package/toast/toast.base.d.ts +0 -84
- package/toast/toast.component.d.ts +0 -10
- package/toast/toast.module.d.ts +0 -9
- package/toast/toast.types.d.ts +0 -28
- package/togglebutton/index.d.ts +0 -5
- package/togglebutton/public-api.d.ts +0 -3
- package/togglebutton/togglebutton.component.d.ts +0 -47
- package/togglebutton/togglebutton.module.d.ts +0 -8
- package/togglebutton/togglebutton.types.d.ts +0 -4
- package/toggleswitch/index.d.ts +0 -5
- package/toggleswitch/public-api.d.ts +0 -3
- package/toggleswitch/toggleswitch.component.d.ts +0 -42
- package/toggleswitch/toggleswitch.module.d.ts +0 -8
- package/toggleswitch/toggleswitch.types.d.ts +0 -4
- package/toolbar/index.d.ts +0 -5
- package/toolbar/public-api.d.ts +0 -2
- package/toolbar/toolbar.component.d.ts +0 -29
- package/toolbar/toolbar.module.d.ts +0 -9
- package/tooltip/index.d.ts +0 -5
- package/tooltip/public-api.d.ts +0 -3
- package/tooltip/tooltip.directive.d.ts +0 -87
- package/tooltip/tooltip.module.d.ts +0 -8
- package/tooltip/tooltip.styles.d.ts +0 -2
- package/tooltip/tooltip.types.d.ts +0 -14
- package/tree/index.d.ts +0 -5
- package/tree/public-api.d.ts +0 -2
- package/tree/tree.component.d.ts +0 -149
- package/tree/tree.module.d.ts +0 -8
- package/treeselect/index.d.ts +0 -5
- package/treeselect/public-api.d.ts +0 -2
- package/treeselect/treeselect.component.d.ts +0 -140
- package/treeselect/treeselect.module.d.ts +0 -8
- package/validation/field-error.component.d.ts +0 -39
- package/validation/index.d.ts +0 -5
- package/validation/public-api.d.ts +0 -3
- package/validation/validation.module.d.ts +0 -9
- package/validation/validators.d.ts +0 -33
|
@@ -0,0 +1,4296 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colour math. Every formula here has a twin in packages/themes/scss/_color.scss;
|
|
3
|
+
* the parity test in packages/themes compiles the Sass and compares the output.
|
|
4
|
+
*/
|
|
5
|
+
declare const SHADES: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
6
|
+
type Shade = (typeof SHADES)[number];
|
|
7
|
+
type Palette = Record<Shade, string>;
|
|
8
|
+
/** Share of white mixed into the base colour for the light shades. */
|
|
9
|
+
declare const TINT: Record<number, number>;
|
|
10
|
+
/** Share of black mixed into the base colour for the dark shades. */
|
|
11
|
+
declare const SHADE_MIX: Record<number, number>;
|
|
12
|
+
declare function isHex(value: unknown): value is string;
|
|
13
|
+
declare function hexToRgb(hex: string): [number, number, number];
|
|
14
|
+
declare function roundChannel(v: number): number;
|
|
15
|
+
declare function rgbToHex(rgb: readonly number[]): string;
|
|
16
|
+
/**
|
|
17
|
+
* sRGB mix; `weight` is the share of colour `a`. The sum is done in whole percents so a
|
|
18
|
+
* half-way channel is exactly .5 and rounds up the same way in JS and in Sass.
|
|
19
|
+
*/
|
|
20
|
+
declare function mix(a: string, b: string, weight: number): string;
|
|
21
|
+
declare function luminance(hex: string): number;
|
|
22
|
+
/** WCAG contrast ratio between two hex colours. */
|
|
23
|
+
declare function contrast(a: string, b: string): number;
|
|
24
|
+
/**
|
|
25
|
+
* APCA lightness contrast (Lc, roughly −108 to 106; negative = light text on dark) of `text` on `bg`. Unlike the
|
|
26
|
+
* WCAG ratio it follows how people see mid-tones, e.g. white reads better than black on teal, blue or red.
|
|
27
|
+
*/
|
|
28
|
+
declare function apcaContrast(text: string, bg: string): number;
|
|
29
|
+
/** Generates the 50–950 scale from one base colour (the base becomes 500). */
|
|
30
|
+
declare function generatePalette(base: string): Palette;
|
|
31
|
+
declare function isPalette(value: unknown): value is Palette;
|
|
32
|
+
|
|
33
|
+
/** Fixed design data. packages/themes/scripts/gen-scss-data.mjs writes the Sass copy of these tables. */
|
|
34
|
+
declare const PRIMARY_SWATCHES: readonly [{
|
|
35
|
+
readonly id: "wira";
|
|
36
|
+
readonly hex: "#1e7ae0";
|
|
37
|
+
}, {
|
|
38
|
+
readonly id: "emerald";
|
|
39
|
+
readonly hex: "#10b981";
|
|
40
|
+
}, {
|
|
41
|
+
readonly id: "green";
|
|
42
|
+
readonly hex: "#22c55e";
|
|
43
|
+
}, {
|
|
44
|
+
readonly id: "lime";
|
|
45
|
+
readonly hex: "#84cc16";
|
|
46
|
+
}, {
|
|
47
|
+
readonly id: "teal";
|
|
48
|
+
readonly hex: "#14b8a6";
|
|
49
|
+
}, {
|
|
50
|
+
readonly id: "cyan";
|
|
51
|
+
readonly hex: "#06b6d4";
|
|
52
|
+
}, {
|
|
53
|
+
readonly id: "sky";
|
|
54
|
+
readonly hex: "#0ea5e9";
|
|
55
|
+
}, {
|
|
56
|
+
readonly id: "blue";
|
|
57
|
+
readonly hex: "#3b82f6";
|
|
58
|
+
}, {
|
|
59
|
+
readonly id: "indigo";
|
|
60
|
+
readonly hex: "#6366f1";
|
|
61
|
+
}, {
|
|
62
|
+
readonly id: "violet";
|
|
63
|
+
readonly hex: "#8b5cf6";
|
|
64
|
+
}, {
|
|
65
|
+
readonly id: "purple";
|
|
66
|
+
readonly hex: "#a855f7";
|
|
67
|
+
}, {
|
|
68
|
+
readonly id: "fuchsia";
|
|
69
|
+
readonly hex: "#d946ef";
|
|
70
|
+
}, {
|
|
71
|
+
readonly id: "pink";
|
|
72
|
+
readonly hex: "#ec4899";
|
|
73
|
+
}, {
|
|
74
|
+
readonly id: "rose";
|
|
75
|
+
readonly hex: "#f43f5e";
|
|
76
|
+
}, {
|
|
77
|
+
readonly id: "red";
|
|
78
|
+
readonly hex: "#ef4444";
|
|
79
|
+
}, {
|
|
80
|
+
readonly id: "orange";
|
|
81
|
+
readonly hex: "#f97316";
|
|
82
|
+
}, {
|
|
83
|
+
readonly id: "amber";
|
|
84
|
+
readonly hex: "#f59e0b";
|
|
85
|
+
}, {
|
|
86
|
+
readonly id: "yellow";
|
|
87
|
+
readonly hex: "#eab308";
|
|
88
|
+
}];
|
|
89
|
+
type SwatchId = (typeof PRIMARY_SWATCHES)[number]['id'];
|
|
90
|
+
/** Surface scales: index 0 is shade 50, index 10 is shade 950. Shade 0 is always white. */
|
|
91
|
+
declare const SURFACES: {
|
|
92
|
+
readonly slate: readonly ["#f8fafc", "#f1f5f9", "#e2e8f0", "#cbd5e1", "#94a3b8", "#64748b", "#475569", "#334155", "#1e293b", "#0f172a", "#020617"];
|
|
93
|
+
readonly gray: readonly ["#f9fafb", "#f3f4f6", "#e5e7eb", "#d1d5db", "#9ca3af", "#6b7280", "#4b5563", "#374151", "#1f2937", "#111827", "#030712"];
|
|
94
|
+
readonly zinc: readonly ["#fafafa", "#f4f4f5", "#e4e4e7", "#d4d4d8", "#a1a1aa", "#71717a", "#52525b", "#3f3f46", "#27272a", "#18181b", "#09090b"];
|
|
95
|
+
readonly neutral: readonly ["#fafafa", "#f5f5f5", "#e5e5e5", "#d4d4d4", "#a3a3a3", "#737373", "#525252", "#404040", "#262626", "#171717", "#0a0a0a"];
|
|
96
|
+
readonly stone: readonly ["#fafaf9", "#f5f5f4", "#e7e5e4", "#d6d3d1", "#a8a29e", "#78716c", "#57534e", "#44403c", "#292524", "#1c1917", "#0c0a09"];
|
|
97
|
+
/** The grays of the classic Sila and Arun themes (text #495057, borders #ced4da / #dee2e6). */
|
|
98
|
+
readonly classic: readonly ["#f8f9fa", "#e9ecef", "#dee2e6", "#ced4da", "#adb5bd", "#6c757d", "#495057", "#343a40", "#212529", "#1a1d21", "#0f1114"];
|
|
99
|
+
/** Sayan: the classic dim blue-gray dark theme (card #1f2d40, ground #17212f). */
|
|
100
|
+
readonly sayan: readonly ["#f1f5f9", "#dfe7ef", "#c7d2e0", "#9fb1c9", "#6f87a8", "#4c6587", "#3a5070", "#304562", "#1f2d40", "#17212f", "#0e1622"];
|
|
101
|
+
/** Ratri: the classic neutral dark theme (card #1e1e1e, ground #121212). */
|
|
102
|
+
readonly ratri: readonly ["#fafafa", "#f5f5f5", "#e5e5e5", "#d4d4d4", "#a3a3a3", "#737373", "#525252", "#383838", "#1e1e1e", "#121212", "#0a0a0a"];
|
|
103
|
+
/** Classic Sila dark (card #071426, ground #040d19, borders #0b213f). */
|
|
104
|
+
readonly navy: readonly ["#f0f4fa", "#dde6f2", "#c2d0e5", "#94abcc", "#6683ad", "#3e5c87", "#28456b", "#163050", "#0b213f", "#071426", "#040d19"];
|
|
105
|
+
/** Wirabyte's neutrals (wirabyte.com): cool off-white page, navy darks. */
|
|
106
|
+
readonly ink: readonly ["#f6f8fc", "#eef2f9", "#e3e8f1", "#cfd7e4", "#98a5b8", "#556274", "#334155", "#2a3a52", "#1c2839", "#0e1624", "#070b14"];
|
|
107
|
+
};
|
|
108
|
+
type SurfaceId = keyof typeof SURFACES;
|
|
109
|
+
declare const FONTS: readonly ["Kanit", "Sarabun", "Prompt", "Noto Sans Thai", "IBM Plex Sans Thai", "Anuphan", "Inter", "Roboto"];
|
|
110
|
+
/** Density multiplies every padding a preset defines (1 = the preset's own spacing). */
|
|
111
|
+
declare const DENSITY: Record<'compact' | 'normal' | 'comfortable', number>;
|
|
112
|
+
type DensityId = keyof typeof DENSITY;
|
|
113
|
+
/** Elevation sets: [cards, raised buttons, overlays]. */
|
|
114
|
+
declare const SHADOWS: Record<'none' | 'subtle' | 'soft' | 'elevated' | 'material' | 'mali' | 'sila' | 'phet', [string, string, string]>;
|
|
115
|
+
type ShadowId = keyof typeof SHADOWS;
|
|
116
|
+
/**
|
|
117
|
+
* How focus shows. ring: soft glow (Sila). outline: thin outline with a gap (Mali). inset: a thicker
|
|
118
|
+
* border on fields and no glow on controls (Material). bold: 2px outlines (Phet).
|
|
119
|
+
*/
|
|
120
|
+
declare const FOCUS_STYLES: readonly ["ring", "outline", "inset", "bold"];
|
|
121
|
+
type FocusRing = (typeof FOCUS_STYLES)[number];
|
|
122
|
+
declare const SEMANTIC_KEYS: readonly ["success", "info", "warn", "danger", "help"];
|
|
123
|
+
type SemanticKey = (typeof SEMANTIC_KEYS)[number];
|
|
124
|
+
declare const SEMANTIC_DEFAULTS: Record<SemanticKey, string>;
|
|
125
|
+
/**
|
|
126
|
+
* Look families. `classic` is the v1 look (Sila, Arun, Sayan, Ratri, Material themes), `styled` the v2/v3 look (Mali, Sila, Material, Phet presets)
|
|
127
|
+
* (v2 and v3), `wira` is WiraUI's own design (v3). Each family's tokens live in families.ts.
|
|
128
|
+
*/
|
|
129
|
+
type FamilyId = 'sila-classic' | 'arun' | 'material-classic' | 'mali' | 'sila' | 'material' | 'phet' | 'wira';
|
|
130
|
+
type Generation = 'classic' | 'styled' | 'wira';
|
|
131
|
+
declare const FAMILY_GENERATION: Record<FamilyId, Generation>;
|
|
132
|
+
type Scheme = 'light' | 'dark';
|
|
133
|
+
/** `glass` turns cards and overlays into frosted Liquid Glass panels (v3). */
|
|
134
|
+
type MaterialMode = 'solid' | 'glass';
|
|
135
|
+
interface PresetDefinition {
|
|
136
|
+
family: FamilyId;
|
|
137
|
+
label: string;
|
|
138
|
+
primary: string;
|
|
139
|
+
surface: SurfaceId;
|
|
140
|
+
semantic: Record<SemanticKey, string>;
|
|
141
|
+
fontFamily: string;
|
|
142
|
+
/** px; emitted as rem so apps that scale the root font size scale components too. */
|
|
143
|
+
fontSize: number;
|
|
144
|
+
lineHeight: number;
|
|
145
|
+
radius: number;
|
|
146
|
+
density: DensityId;
|
|
147
|
+
shadow: ShadowId;
|
|
148
|
+
ripple: boolean;
|
|
149
|
+
focusRing: FocusRing;
|
|
150
|
+
transition: number;
|
|
151
|
+
scheme: Scheme;
|
|
152
|
+
material?: MaterialMode;
|
|
153
|
+
}
|
|
154
|
+
declare const PRESETS: {
|
|
155
|
+
'sila-classic': {
|
|
156
|
+
family: "sila-classic";
|
|
157
|
+
label: string;
|
|
158
|
+
primary: string;
|
|
159
|
+
surface: "classic";
|
|
160
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
161
|
+
radius: number;
|
|
162
|
+
shadow: "material";
|
|
163
|
+
ripple: false;
|
|
164
|
+
focusRing: "ring";
|
|
165
|
+
fontFamily: "Kanit";
|
|
166
|
+
fontSize: 16;
|
|
167
|
+
lineHeight: 1.5;
|
|
168
|
+
density: "normal";
|
|
169
|
+
transition: 200;
|
|
170
|
+
scheme: "light";
|
|
171
|
+
};
|
|
172
|
+
arun: {
|
|
173
|
+
family: "arun";
|
|
174
|
+
label: string;
|
|
175
|
+
primary: string;
|
|
176
|
+
surface: "classic";
|
|
177
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
178
|
+
radius: number;
|
|
179
|
+
shadow: "material";
|
|
180
|
+
ripple: false;
|
|
181
|
+
focusRing: "ring";
|
|
182
|
+
fontFamily: "Kanit";
|
|
183
|
+
fontSize: 16;
|
|
184
|
+
lineHeight: 1.5;
|
|
185
|
+
density: "normal";
|
|
186
|
+
transition: 200;
|
|
187
|
+
scheme: "light";
|
|
188
|
+
};
|
|
189
|
+
sayan: {
|
|
190
|
+
family: "arun";
|
|
191
|
+
label: string;
|
|
192
|
+
primary: string;
|
|
193
|
+
surface: "sayan";
|
|
194
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
195
|
+
radius: number;
|
|
196
|
+
shadow: "material";
|
|
197
|
+
ripple: false;
|
|
198
|
+
focusRing: "ring";
|
|
199
|
+
scheme: "dark";
|
|
200
|
+
fontFamily: "Kanit";
|
|
201
|
+
fontSize: 16;
|
|
202
|
+
lineHeight: 1.5;
|
|
203
|
+
density: "normal";
|
|
204
|
+
transition: 200;
|
|
205
|
+
};
|
|
206
|
+
ratri: {
|
|
207
|
+
family: "arun";
|
|
208
|
+
label: string;
|
|
209
|
+
primary: string;
|
|
210
|
+
surface: "ratri";
|
|
211
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
212
|
+
radius: number;
|
|
213
|
+
shadow: "material";
|
|
214
|
+
ripple: false;
|
|
215
|
+
focusRing: "ring";
|
|
216
|
+
scheme: "dark";
|
|
217
|
+
fontFamily: "Kanit";
|
|
218
|
+
fontSize: 16;
|
|
219
|
+
lineHeight: 1.5;
|
|
220
|
+
density: "normal";
|
|
221
|
+
transition: 200;
|
|
222
|
+
};
|
|
223
|
+
'material-classic': {
|
|
224
|
+
family: "material-classic";
|
|
225
|
+
label: string;
|
|
226
|
+
fontFamily: string;
|
|
227
|
+
primary: string;
|
|
228
|
+
surface: "gray";
|
|
229
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
230
|
+
radius: number;
|
|
231
|
+
shadow: "material";
|
|
232
|
+
ripple: true;
|
|
233
|
+
focusRing: "inset";
|
|
234
|
+
fontSize: 16;
|
|
235
|
+
lineHeight: 1.5;
|
|
236
|
+
density: "normal";
|
|
237
|
+
transition: 200;
|
|
238
|
+
scheme: "light";
|
|
239
|
+
};
|
|
240
|
+
mali: {
|
|
241
|
+
family: "mali";
|
|
242
|
+
label: string;
|
|
243
|
+
primary: string;
|
|
244
|
+
surface: "slate";
|
|
245
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
246
|
+
radius: number;
|
|
247
|
+
shadow: "mali";
|
|
248
|
+
ripple: false;
|
|
249
|
+
focusRing: "outline";
|
|
250
|
+
fontFamily: "Kanit";
|
|
251
|
+
fontSize: 16;
|
|
252
|
+
lineHeight: 1.5;
|
|
253
|
+
density: "normal";
|
|
254
|
+
transition: 200;
|
|
255
|
+
scheme: "light";
|
|
256
|
+
};
|
|
257
|
+
sila: {
|
|
258
|
+
family: "sila";
|
|
259
|
+
label: string;
|
|
260
|
+
primary: string;
|
|
261
|
+
surface: "slate";
|
|
262
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
263
|
+
radius: number;
|
|
264
|
+
shadow: "sila";
|
|
265
|
+
ripple: false;
|
|
266
|
+
focusRing: "ring";
|
|
267
|
+
fontFamily: "Kanit";
|
|
268
|
+
fontSize: 16;
|
|
269
|
+
lineHeight: 1.5;
|
|
270
|
+
density: "normal";
|
|
271
|
+
transition: 200;
|
|
272
|
+
scheme: "light";
|
|
273
|
+
};
|
|
274
|
+
material: {
|
|
275
|
+
family: "material";
|
|
276
|
+
label: string;
|
|
277
|
+
fontFamily: string;
|
|
278
|
+
primary: string;
|
|
279
|
+
surface: "slate";
|
|
280
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
281
|
+
radius: number;
|
|
282
|
+
shadow: "material";
|
|
283
|
+
ripple: true;
|
|
284
|
+
focusRing: "inset";
|
|
285
|
+
fontSize: 16;
|
|
286
|
+
lineHeight: 1.5;
|
|
287
|
+
density: "normal";
|
|
288
|
+
transition: 200;
|
|
289
|
+
scheme: "light";
|
|
290
|
+
};
|
|
291
|
+
phet: {
|
|
292
|
+
family: "phet";
|
|
293
|
+
label: string;
|
|
294
|
+
primary: string;
|
|
295
|
+
surface: "slate";
|
|
296
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
297
|
+
radius: number;
|
|
298
|
+
shadow: "phet";
|
|
299
|
+
ripple: false;
|
|
300
|
+
focusRing: "bold";
|
|
301
|
+
transition: number;
|
|
302
|
+
fontFamily: "Kanit";
|
|
303
|
+
fontSize: 16;
|
|
304
|
+
lineHeight: 1.5;
|
|
305
|
+
density: "normal";
|
|
306
|
+
scheme: "light";
|
|
307
|
+
};
|
|
308
|
+
wira: {
|
|
309
|
+
family: "wira";
|
|
310
|
+
label: string;
|
|
311
|
+
primary: string;
|
|
312
|
+
surface: "ink";
|
|
313
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
314
|
+
fontFamily: string;
|
|
315
|
+
fontSize: number;
|
|
316
|
+
lineHeight: number;
|
|
317
|
+
radius: number;
|
|
318
|
+
density: "normal";
|
|
319
|
+
shadow: "subtle";
|
|
320
|
+
ripple: false;
|
|
321
|
+
focusRing: "ring";
|
|
322
|
+
transition: number;
|
|
323
|
+
scheme: "light";
|
|
324
|
+
};
|
|
325
|
+
lanna: {
|
|
326
|
+
family: "wira";
|
|
327
|
+
label: string;
|
|
328
|
+
primary: string;
|
|
329
|
+
surface: "stone";
|
|
330
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
331
|
+
fontFamily: string;
|
|
332
|
+
fontSize: number;
|
|
333
|
+
lineHeight: number;
|
|
334
|
+
radius: number;
|
|
335
|
+
density: "comfortable";
|
|
336
|
+
shadow: "soft";
|
|
337
|
+
ripple: false;
|
|
338
|
+
focusRing: "ring";
|
|
339
|
+
transition: number;
|
|
340
|
+
scheme: "light";
|
|
341
|
+
};
|
|
342
|
+
siam: {
|
|
343
|
+
family: "wira";
|
|
344
|
+
label: string;
|
|
345
|
+
primary: string;
|
|
346
|
+
surface: "gray";
|
|
347
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
348
|
+
fontFamily: string;
|
|
349
|
+
fontSize: number;
|
|
350
|
+
lineHeight: number;
|
|
351
|
+
radius: number;
|
|
352
|
+
density: "normal";
|
|
353
|
+
shadow: "elevated";
|
|
354
|
+
ripple: true;
|
|
355
|
+
focusRing: "outline";
|
|
356
|
+
transition: number;
|
|
357
|
+
scheme: "light";
|
|
358
|
+
};
|
|
359
|
+
nakhon: {
|
|
360
|
+
family: "wira";
|
|
361
|
+
label: string;
|
|
362
|
+
primary: string;
|
|
363
|
+
surface: "zinc";
|
|
364
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
365
|
+
fontFamily: string;
|
|
366
|
+
fontSize: number;
|
|
367
|
+
lineHeight: number;
|
|
368
|
+
radius: number;
|
|
369
|
+
density: "compact";
|
|
370
|
+
shadow: "none";
|
|
371
|
+
ripple: false;
|
|
372
|
+
focusRing: "outline";
|
|
373
|
+
transition: number;
|
|
374
|
+
scheme: "light";
|
|
375
|
+
};
|
|
376
|
+
ll: {
|
|
377
|
+
family: "wira";
|
|
378
|
+
label: string;
|
|
379
|
+
primary: string;
|
|
380
|
+
surface: "stone";
|
|
381
|
+
semantic: {
|
|
382
|
+
success: string;
|
|
383
|
+
info: string;
|
|
384
|
+
warn: string;
|
|
385
|
+
danger: string;
|
|
386
|
+
help: string;
|
|
387
|
+
};
|
|
388
|
+
fontFamily: string;
|
|
389
|
+
fontSize: number;
|
|
390
|
+
lineHeight: number;
|
|
391
|
+
radius: number;
|
|
392
|
+
density: "comfortable";
|
|
393
|
+
shadow: "subtle";
|
|
394
|
+
ripple: false;
|
|
395
|
+
focusRing: "ring";
|
|
396
|
+
transition: number;
|
|
397
|
+
scheme: "light";
|
|
398
|
+
};
|
|
399
|
+
kawaii: {
|
|
400
|
+
family: "wira";
|
|
401
|
+
label: string;
|
|
402
|
+
primary: string;
|
|
403
|
+
surface: "slate";
|
|
404
|
+
semantic: {
|
|
405
|
+
success: string;
|
|
406
|
+
info: string;
|
|
407
|
+
warn: string;
|
|
408
|
+
danger: string;
|
|
409
|
+
help: string;
|
|
410
|
+
};
|
|
411
|
+
fontFamily: string;
|
|
412
|
+
fontSize: number;
|
|
413
|
+
lineHeight: number;
|
|
414
|
+
radius: number;
|
|
415
|
+
density: "comfortable";
|
|
416
|
+
shadow: "soft";
|
|
417
|
+
ripple: true;
|
|
418
|
+
focusRing: "ring";
|
|
419
|
+
transition: number;
|
|
420
|
+
scheme: "light";
|
|
421
|
+
};
|
|
422
|
+
glass: {
|
|
423
|
+
family: "wira";
|
|
424
|
+
label: string;
|
|
425
|
+
primary: string;
|
|
426
|
+
surface: "slate";
|
|
427
|
+
semantic: Record<"success" | "info" | "warn" | "danger" | "help", string>;
|
|
428
|
+
fontFamily: string;
|
|
429
|
+
fontSize: number;
|
|
430
|
+
lineHeight: number;
|
|
431
|
+
radius: number;
|
|
432
|
+
density: "normal";
|
|
433
|
+
shadow: "soft";
|
|
434
|
+
ripple: false;
|
|
435
|
+
focusRing: "ring";
|
|
436
|
+
transition: number;
|
|
437
|
+
scheme: "light";
|
|
438
|
+
material: "glass";
|
|
439
|
+
};
|
|
440
|
+
};
|
|
441
|
+
type PresetId = keyof typeof PRESETS;
|
|
442
|
+
declare const PRESET_NAMES: Record<PresetId, string>;
|
|
443
|
+
/** The constant each preset is exported as from `@wirabyte/ui/presets` (`'sila-classic'` → `SilaClassic`). */
|
|
444
|
+
declare function presetExportName(id: PresetId): string;
|
|
445
|
+
/**
|
|
446
|
+
* Ready-made classic themes named after the theme folders apps already reference, so `…/themes/sila-light-teal/theme.css`
|
|
447
|
+
* becomes `@wirabyte/ui/themes/sila-light-teal/theme.css`. For v2 and v3 every preset is also a theme of its own name.
|
|
448
|
+
*/
|
|
449
|
+
interface NamedTheme {
|
|
450
|
+
preset: PresetId;
|
|
451
|
+
primary?: string;
|
|
452
|
+
surface?: SurfaceId;
|
|
453
|
+
scheme?: Scheme;
|
|
454
|
+
/** Text on primary buttons when white does not read well (Arun/Sayan/Ratri orange). */
|
|
455
|
+
primaryContrast?: string;
|
|
456
|
+
}
|
|
457
|
+
declare const CLASSIC_THEMES: Record<string, NamedTheme>;
|
|
458
|
+
type MajorVersion = 1 | 2 | 3;
|
|
459
|
+
/** What each wiraui major offers. v1 has the classic looks, v2 the styled ones, v3 adds WiraUI's own presets. */
|
|
460
|
+
declare const VERSION_CATALOG: Record<MajorVersion, {
|
|
461
|
+
presets: PresetId[];
|
|
462
|
+
defaultPreset: PresetId;
|
|
463
|
+
themes: string[];
|
|
464
|
+
defaultTheme: string;
|
|
465
|
+
}>;
|
|
466
|
+
type ComponentId = 'button' | 'input' | 'card' | 'table' | 'dialog' | 'tag';
|
|
467
|
+
interface ComponentTokenSpec {
|
|
468
|
+
id: ComponentId;
|
|
469
|
+
key: string;
|
|
470
|
+
/** CSS custom property name without the `--wu-` prefix. */
|
|
471
|
+
css: string;
|
|
472
|
+
type: 'px' | 'select' | 'bool';
|
|
473
|
+
min?: number;
|
|
474
|
+
max?: number;
|
|
475
|
+
options?: number[];
|
|
476
|
+
}
|
|
477
|
+
/** Per-component knobs the Designer exposes. Their default comes from the preset's family. */
|
|
478
|
+
declare const COMPONENT_TOKENS: ComponentTokenSpec[];
|
|
479
|
+
|
|
480
|
+
type DarkMode = 'none' | 'class' | 'media';
|
|
481
|
+
type ComponentValues = Partial<Record<ComponentId, Record<string, number | boolean>>>;
|
|
482
|
+
/**
|
|
483
|
+
* Everything a theme is made of. This is the object the Designer edits and every
|
|
484
|
+
* exported file embeds on its `wiraui-config` line.
|
|
485
|
+
*/
|
|
486
|
+
interface ThemeConfig {
|
|
487
|
+
v: 1;
|
|
488
|
+
preset: PresetId;
|
|
489
|
+
primary: string;
|
|
490
|
+
/** Hand-edited shades; null means "generate from `primary`". */
|
|
491
|
+
primaryShades: Palette | null;
|
|
492
|
+
surface: SurfaceId;
|
|
493
|
+
/** Text on primary buttons; null keeps the family's choice (white for the classic and styled looks, best contrast for Wira). */
|
|
494
|
+
primaryContrast: string | null;
|
|
495
|
+
semantic: Record<SemanticKey, string>;
|
|
496
|
+
fontFamily: string;
|
|
497
|
+
fontSize: number;
|
|
498
|
+
lineHeight: number;
|
|
499
|
+
radius: number;
|
|
500
|
+
density: DensityId;
|
|
501
|
+
shadow: ShadowId;
|
|
502
|
+
ripple: boolean;
|
|
503
|
+
focusRing: FocusRing;
|
|
504
|
+
transition: number;
|
|
505
|
+
darkMode: DarkMode;
|
|
506
|
+
/** `dark` makes the dark colours the only colours (Sayan, Ratri, sila-dark-*); dark mode switching then does nothing. */
|
|
507
|
+
scheme: Scheme;
|
|
508
|
+
material: MaterialMode;
|
|
509
|
+
components: ComponentValues;
|
|
510
|
+
}
|
|
511
|
+
declare function isPresetId(value: unknown): value is PresetId;
|
|
512
|
+
declare function defaults(preset?: PresetId | string): ThemeConfig;
|
|
513
|
+
declare function isThemeName(value: unknown): value is string;
|
|
514
|
+
/** Config of a ready-made theme (`'sila-light-teal'`, `'sayan-blue'`, `'mali'` …). */
|
|
515
|
+
declare function themeConfig(name: string): ThemeConfig;
|
|
516
|
+
/** Fills gaps from the preset and drops anything invalid. Accepts configs from older Designer builds. */
|
|
517
|
+
declare function normalize(raw: unknown): ThemeConfig;
|
|
518
|
+
declare const SCALAR_FIELDS: readonly ["primary", "surface", "primaryContrast", "fontFamily", "fontSize", "lineHeight", "radius", "density", "shadow", "focusRing", "transition", "scheme", "material"];
|
|
519
|
+
type ScalarField = (typeof SCALAR_FIELDS)[number];
|
|
520
|
+
interface ThemeDiff {
|
|
521
|
+
primary?: string;
|
|
522
|
+
primaryShades?: Palette;
|
|
523
|
+
surface?: SurfaceId;
|
|
524
|
+
primaryContrast?: string | null;
|
|
525
|
+
fontFamily?: string;
|
|
526
|
+
fontSize?: number;
|
|
527
|
+
lineHeight?: number;
|
|
528
|
+
radius?: number;
|
|
529
|
+
density?: DensityId;
|
|
530
|
+
shadow?: ShadowId;
|
|
531
|
+
focusRing?: FocusRing;
|
|
532
|
+
transition?: number;
|
|
533
|
+
scheme?: Scheme;
|
|
534
|
+
material?: MaterialMode;
|
|
535
|
+
semantic?: Partial<Record<SemanticKey, string>>;
|
|
536
|
+
components?: ComponentValues;
|
|
537
|
+
}
|
|
538
|
+
/** What differs from the preset's own defaults. Exporters use this for overrides files. */
|
|
539
|
+
declare function diff(c: ThemeConfig): ThemeDiff;
|
|
540
|
+
/** Number of individual values that differ from the preset. */
|
|
541
|
+
declare function changeCount(c: ThemeConfig): number;
|
|
542
|
+
|
|
543
|
+
/** Token name (without `--wu-`) → CSS value. */
|
|
544
|
+
type TokenMap = Record<string, string>;
|
|
545
|
+
interface ThemeTokens {
|
|
546
|
+
/** Applies in both modes unless `dark` redefines it. */
|
|
547
|
+
light: TokenMap;
|
|
548
|
+
/** Only the tokens that differ in dark mode. */
|
|
549
|
+
dark: TokenMap;
|
|
550
|
+
/** Classic/styled theme variables re-created for migrated apps; keys carry their own `--` (see compat.ts). */
|
|
551
|
+
compat?: TokenMap;
|
|
552
|
+
}
|
|
553
|
+
declare const SURFACE_DARK_REF = "var(--wu-surface-950)";
|
|
554
|
+
declare function emptyTokens(): ThemeTokens;
|
|
555
|
+
declare function mergeTokens(target: ThemeTokens, ...sources: ThemeTokens[]): ThemeTokens;
|
|
556
|
+
/** White or the darkest surface, whichever reads better on `bg` (APCA). Same rule as `wu-best-on()` in Sass. */
|
|
557
|
+
declare function bestOn(bg: string, surface950: string): string;
|
|
558
|
+
declare function surfacePalette(surface: SurfaceId | Palette): Record<string, string>;
|
|
559
|
+
declare function surfaceTokens(surface: SurfaceId | Palette): ThemeTokens;
|
|
560
|
+
/** `primary-contrast-auto` is the readable text colour; families decide whether to use it or fixed white. */
|
|
561
|
+
declare function primaryTokens(p: Palette, surface950: string): ThemeTokens;
|
|
562
|
+
declare function semanticTokens(key: SemanticKey, base: string | Palette, surface950: string): ThemeTokens;
|
|
563
|
+
/** Font size is emitted in rem so an app that scales the root font size scales components too. */
|
|
564
|
+
declare function fontTokens(c: {
|
|
565
|
+
fontFamily?: string;
|
|
566
|
+
fontSize?: number;
|
|
567
|
+
lineHeight?: number;
|
|
568
|
+
}): ThemeTokens;
|
|
569
|
+
/** Radius scale in the usual proportions (r = md): xs r/3, sm 2r/3, lg 4r/3, xl 2r. */
|
|
570
|
+
declare function radiusTokens(r: number): ThemeTokens;
|
|
571
|
+
declare function densityTokens(id: DensityId): ThemeTokens;
|
|
572
|
+
declare function shadowTokens(id: ShadowId): ThemeTokens;
|
|
573
|
+
/** Focus styles for buttons/checkboxes/switches (control-*) and text fields (field-*). See FOCUS_STYLES. */
|
|
574
|
+
declare function focusTokens(mode: FocusRing): ThemeTokens;
|
|
575
|
+
declare function transitionTokens(ms: number): ThemeTokens;
|
|
576
|
+
/**
|
|
577
|
+
* Liquid Glass (material `'glass'`): cards, floating layers and buttons are translucent panes that blur and brighten
|
|
578
|
+
* what is behind them, with a bright rim along their edges and a soft lift. Floating layers use a thicker pane so text
|
|
579
|
+
* stays readable over anything. The page behind (`--wu-backdrop`, used by `.surface-ground`) gets soft colour fields
|
|
580
|
+
* from the theme, so there is something for the glass to bend. Without backdrop-filter the panes are simply paler.
|
|
581
|
+
*/
|
|
582
|
+
declare function materialTokens(m: MaterialMode): ThemeTokens;
|
|
583
|
+
/** Tokens for an explicit component value set in the Designer, SCSS `$components` or TS overrides. */
|
|
584
|
+
declare function componentValue(spec: ComponentTokenSpec, v: number | boolean | string): ThemeTokens;
|
|
585
|
+
declare function primaryPaletteOf(c: ThemeConfig): Palette;
|
|
586
|
+
declare function computeTokens(c: ThemeConfig): ThemeTokens;
|
|
587
|
+
interface CssOptions {
|
|
588
|
+
/** Where light tokens live. Default `:root`. */
|
|
589
|
+
selector?: string;
|
|
590
|
+
darkMode?: DarkMode;
|
|
591
|
+
/** Selector for class-based dark mode. Default `:root.wu-dark`. */
|
|
592
|
+
darkSelector?: string;
|
|
593
|
+
/** Cascade layer to wrap the rules in; null for none. Default `wiraui.tokens`. */
|
|
594
|
+
layer?: string | null;
|
|
595
|
+
/** Extra declarations put first in the light block, e.g. `--wu-theme-source: css`. */
|
|
596
|
+
extra?: TokenMap;
|
|
597
|
+
indent?: string;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Cascade order. `reset` comes first so an app's own element resets (`button { font: inherit }` from a normalize,
|
|
601
|
+
* reboot or preflight file) can sit below the components: wrap them in `@layer reset { … }`. Unlayered app CSS still
|
|
602
|
+
* wins over everything, as intended for the app's own styles.
|
|
603
|
+
*/
|
|
604
|
+
declare const LAYER_ORDER = "@layer reset, wiraui.tokens, wiraui.components, wiraui.utilities, wiraui.overrides;";
|
|
605
|
+
/** Token blocks as CSS text (no header, no layer-order statement). */
|
|
606
|
+
declare function tokensToCss(t: ThemeTokens, o?: CssOptions): string;
|
|
607
|
+
/** `--wu-x: v; …` for an inline style attribute, with dark values applied when `mode` is dark. */
|
|
608
|
+
declare function tokensToStyle(t: ThemeTokens, mode?: 'light' | 'dark'): string;
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* The look of each family as token values. Values only reference other tokens through var(), so the
|
|
612
|
+
* primary/surface palettes, radius, density, shadows and focus style chosen in the config flow through.
|
|
613
|
+
* Numbers follow the MIT-licensed themes each look is modelled on (DESIGN.md §6.10), so migrating apps keep their layout:
|
|
614
|
+
* sila-classic / arun / material-classic = the classic theme.css look, mali / sila / material / phet = the styled presets.
|
|
615
|
+
*/
|
|
616
|
+
interface FamilyTokens {
|
|
617
|
+
light: TokenMap;
|
|
618
|
+
dark: TokenMap;
|
|
619
|
+
}
|
|
620
|
+
declare const FAMILIES: Record<FamilyId, FamilyTokens>;
|
|
621
|
+
|
|
622
|
+
/** Colour palettes those themes expose globally (--blue-500, --p-green-500, …). */
|
|
623
|
+
declare const PALETTE_BASES: Record<string, string>;
|
|
624
|
+
/** Aliases for a generation; WiraUI's own design has none. */
|
|
625
|
+
declare function compatAliases(generation: Generation): TokenMap;
|
|
626
|
+
/**
|
|
627
|
+
* Component tokens that read a styled-mode `--p-*` override first, so `--p-card-body-gap: 0px` in an app's styles
|
|
628
|
+
* still removes the card's body gap.
|
|
629
|
+
*/
|
|
630
|
+
declare const STYLED_INPUTS: Record<string, string>;
|
|
631
|
+
|
|
632
|
+
type Size = string | number;
|
|
633
|
+
interface SemanticOverrides {
|
|
634
|
+
primary?: Palette;
|
|
635
|
+
/** `'{slate}'` style reference to a built-in surface, or a full palette. */
|
|
636
|
+
surface?: string | Palette;
|
|
637
|
+
success?: Palette;
|
|
638
|
+
info?: Palette;
|
|
639
|
+
warn?: Palette;
|
|
640
|
+
danger?: Palette;
|
|
641
|
+
help?: Palette;
|
|
642
|
+
/** Text colour on primary buttons, e.g. `'#ffffff'`. */
|
|
643
|
+
primaryContrast?: string;
|
|
644
|
+
fontFamily?: string;
|
|
645
|
+
fontSize?: Size;
|
|
646
|
+
lineHeight?: Size;
|
|
647
|
+
radius?: Size;
|
|
648
|
+
density?: DensityId;
|
|
649
|
+
shadow?: ShadowId;
|
|
650
|
+
focusRing?: FocusRing;
|
|
651
|
+
transition?: Size;
|
|
652
|
+
material?: MaterialMode;
|
|
653
|
+
}
|
|
654
|
+
interface ComponentOverrides {
|
|
655
|
+
button?: {
|
|
656
|
+
fontWeight?: number;
|
|
657
|
+
radius?: Size;
|
|
658
|
+
paddingX?: Size;
|
|
659
|
+
};
|
|
660
|
+
input?: {
|
|
661
|
+
radius?: Size;
|
|
662
|
+
};
|
|
663
|
+
card?: {
|
|
664
|
+
padding?: Size;
|
|
665
|
+
radius?: Size;
|
|
666
|
+
bodyGap?: Size;
|
|
667
|
+
bordered?: boolean;
|
|
668
|
+
};
|
|
669
|
+
table?: {
|
|
670
|
+
rowHeight?: Size;
|
|
671
|
+
striped?: boolean;
|
|
672
|
+
};
|
|
673
|
+
dialog?: {
|
|
674
|
+
radius?: Size;
|
|
675
|
+
};
|
|
676
|
+
tag?: {
|
|
677
|
+
pill?: boolean;
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
interface ThemeOverrideSet {
|
|
681
|
+
semantic?: SemanticOverrides;
|
|
682
|
+
components?: ComponentOverrides;
|
|
683
|
+
}
|
|
684
|
+
/** Partial theme changes applied on top of the main theme (SCSS/CSS file or a preset). */
|
|
685
|
+
interface ThemeOverrides extends ThemeOverrideSet {
|
|
686
|
+
/** Applied in dark mode only. Anything not listed here applies to both modes. */
|
|
687
|
+
dark?: ThemeOverrideSet;
|
|
688
|
+
/** `definePreset()` only: `'dark'` makes the dark colours the only colours. */
|
|
689
|
+
scheme?: Scheme;
|
|
690
|
+
}
|
|
691
|
+
interface ThemePreset {
|
|
692
|
+
readonly wuPreset: true;
|
|
693
|
+
readonly name: string;
|
|
694
|
+
readonly config: ThemeConfig;
|
|
695
|
+
readonly overrides: ThemeOverrides[];
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* A 50–950 palette from a hex colour (`'#1e7ae0'`) or a built-in swatch reference (`'{emerald}'`, `'{wira}'`).
|
|
699
|
+
*/
|
|
700
|
+
declare function palette(input: string): Palette;
|
|
701
|
+
declare function defineOverrides(overrides: ThemeOverrides): ThemeOverrides;
|
|
702
|
+
declare const SilaClassic: ThemePreset;
|
|
703
|
+
declare const Arun: ThemePreset;
|
|
704
|
+
declare const Sayan: ThemePreset;
|
|
705
|
+
declare const Ratri: ThemePreset;
|
|
706
|
+
declare const MaterialClassic: ThemePreset;
|
|
707
|
+
declare const Mali: ThemePreset;
|
|
708
|
+
declare const Sila: ThemePreset;
|
|
709
|
+
declare const Material: ThemePreset;
|
|
710
|
+
declare const Phet: ThemePreset;
|
|
711
|
+
declare const Wira: ThemePreset;
|
|
712
|
+
declare const Lanna: ThemePreset;
|
|
713
|
+
declare const Siam: ThemePreset;
|
|
714
|
+
declare const Nakhon: ThemePreset;
|
|
715
|
+
declare const Glass: ThemePreset;
|
|
716
|
+
/** ♡ */
|
|
717
|
+
declare const LL: ThemePreset;
|
|
718
|
+
/** ฅ^•ﻌ•^ฅ */
|
|
719
|
+
declare const WiraKawaii: ThemePreset;
|
|
720
|
+
declare const PRESET_LIST: Record<PresetId, ThemePreset>;
|
|
721
|
+
/** A ready-made theme as a preset, e.g. `themePreset('sila-light-teal')` or `themePreset('sayan-green')`. */
|
|
722
|
+
declare function themePreset(name: string): ThemePreset;
|
|
723
|
+
/** Presets a wiraui major offers, in menu order. */
|
|
724
|
+
declare function presetsFor(major: MajorVersion): ThemePreset[];
|
|
725
|
+
/** A new preset: `base` plus your changes. Use it with `provideWiraUI({ preset })` when there is no SCSS/CSS theme file. */
|
|
726
|
+
declare function definePreset(base: ThemePreset, overrides: ThemeOverrides): ThemePreset;
|
|
727
|
+
declare function isThemePreset(value: unknown): value is ThemePreset;
|
|
728
|
+
/**
|
|
729
|
+
* Only the tokens an override set touches; derived tokens follow through `var()`.
|
|
730
|
+
* With `scheme: 'dark'` (Sayan, Ratri, sila-dark-*) the dark values are the only values.
|
|
731
|
+
*/
|
|
732
|
+
declare function overridesToTokens(o: ThemeOverrides, scheme?: Scheme): ThemeTokens;
|
|
733
|
+
/** Full token set for a preset made with `definePreset()`. */
|
|
734
|
+
declare function presetToTokens(preset: ThemePreset): ThemeTokens;
|
|
735
|
+
declare const PRESET_IDS: PresetId[];
|
|
736
|
+
|
|
737
|
+
declare const CORE_VERSION = "0.1.0";
|
|
738
|
+
/**
|
|
739
|
+
* Every exported file carries the whole config on one line so any of them can be imported back.
|
|
740
|
+
* The prefix is a contract shared with the prototype Designer: do not change it.
|
|
741
|
+
*/
|
|
742
|
+
declare const CONFIG_MARKER = "wiraui-config";
|
|
743
|
+
interface ExportOptions {
|
|
744
|
+
date?: Date;
|
|
745
|
+
generator?: string;
|
|
746
|
+
}
|
|
747
|
+
declare function toSCSS(c: ThemeConfig, o?: ExportOptions): string;
|
|
748
|
+
declare function toCSS(c: ThemeConfig, o?: ExportOptions): string;
|
|
749
|
+
declare function toTSOverrides(c: ThemeConfig, o?: ExportOptions): string;
|
|
750
|
+
declare function toTSPreset(c: ThemeConfig, o?: ExportOptions): string;
|
|
751
|
+
declare function toJSON(c: ThemeConfig, o?: ExportOptions): string;
|
|
752
|
+
/** Reads a config back from any exported file (SCSS, CSS, TS or JSON). Throws `empty`, `no-config` or `bad-config`. */
|
|
753
|
+
declare function parseImport(text: string): ThemeConfig;
|
|
754
|
+
|
|
755
|
+
/** Number formatting and parsing for number inputs. Framework-free so it is unit tested here. */
|
|
756
|
+
interface NumberFormatOptions {
|
|
757
|
+
/** BCP 47 locale, e.g. 'th-TH'. */
|
|
758
|
+
locale?: string;
|
|
759
|
+
mode?: 'decimal' | 'currency';
|
|
760
|
+
/** ISO 4217 code for currency mode, e.g. 'THB'. */
|
|
761
|
+
currency?: string;
|
|
762
|
+
minFractionDigits?: number;
|
|
763
|
+
maxFractionDigits?: number;
|
|
764
|
+
useGrouping?: boolean;
|
|
765
|
+
prefix?: string;
|
|
766
|
+
suffix?: string;
|
|
767
|
+
}
|
|
768
|
+
/** Fraction digits actually used: currency defaults to 2, decimals to 0–3, and min never exceeds max. */
|
|
769
|
+
declare function fractionDigits(o: NumberFormatOptions): {
|
|
770
|
+
min: number;
|
|
771
|
+
max: number;
|
|
772
|
+
};
|
|
773
|
+
/** `1234.5` → `'1,234.50'` / `'฿1,234.50'`, with prefix and suffix. null and NaN give ''. */
|
|
774
|
+
declare function formatNumber(value: number | null | undefined, o?: NumberFormatOptions): string;
|
|
775
|
+
/**
|
|
776
|
+
* The plain text shown while editing: no grouping, no currency, `.` as the decimal point,
|
|
777
|
+
* and no exponent (`1e-7` → `'0.0000001'`).
|
|
778
|
+
*/
|
|
779
|
+
declare function editableNumber(value: number | null | undefined, maxFractionDigits?: number): string;
|
|
780
|
+
/**
|
|
781
|
+
* Reads what the user typed or pasted: ignores grouping, spaces, currency signs and the given prefix/suffix,
|
|
782
|
+
* accepts `,` as the decimal point when there is no `.`, and returns null for empty or unreadable text.
|
|
783
|
+
*/
|
|
784
|
+
declare function parseNumber(text: string | null | undefined, o?: Pick<NumberFormatOptions, 'prefix' | 'suffix'>): number | null;
|
|
785
|
+
/** Keeps a value inside [min, max] and rounds it to `maxFractionDigits`. */
|
|
786
|
+
declare function clampNumber(value: number | null, o?: {
|
|
787
|
+
min?: number | null;
|
|
788
|
+
max?: number | null;
|
|
789
|
+
maxFractionDigits?: number;
|
|
790
|
+
}): number | null;
|
|
791
|
+
/** One step up or down from `value` (or from 0, or `min`, when empty), without float noise like 0.30000000000000004. */
|
|
792
|
+
declare function stepNumber(value: number | null, step: number, direction: 1 | -1, o?: {
|
|
793
|
+
min?: number | null;
|
|
794
|
+
max?: number | null;
|
|
795
|
+
}): number;
|
|
796
|
+
/** What a number field lets people type. */
|
|
797
|
+
interface NumberTypingRules {
|
|
798
|
+
min?: number | null;
|
|
799
|
+
max?: number | null;
|
|
800
|
+
/** Fraction digits allowed; 0 means no decimal point at all. */
|
|
801
|
+
maxFractionDigits: number;
|
|
802
|
+
prefix?: string;
|
|
803
|
+
suffix?: string;
|
|
804
|
+
/** The decimal mark of the locale. Default '.'. */
|
|
805
|
+
decimal?: string;
|
|
806
|
+
}
|
|
807
|
+
/** The decimal mark of a locale: `'.'` for th-TH and en-US, `','` for de-DE. */
|
|
808
|
+
declare function decimalSeparator(locale?: string): string;
|
|
809
|
+
/**
|
|
810
|
+
* Whether a number field may hold `text` while it is being typed: digits (Thai digits too), one decimal mark only
|
|
811
|
+
* when fractions are allowed and no more fraction digits than allowed, a leading minus only when min allows
|
|
812
|
+
* negatives, and nothing above max. Formatting already in the field (prefix, suffix, currency sign, grouping) is
|
|
813
|
+
* ignored. Below min is allowed while typing (12 on the way to 120) and corrected on blur.
|
|
814
|
+
*/
|
|
815
|
+
declare function acceptsNumberText(text: string, r: NumberTypingRules): boolean;
|
|
816
|
+
/**
|
|
817
|
+
* Whether typing `inserted` over the selection [start, end) of `current` gives text the field may hold
|
|
818
|
+
* (see `acceptsNumberText`). Letters and other signs are refused outright.
|
|
819
|
+
*/
|
|
820
|
+
declare function acceptsNumberInput(current: string, start: number, end: number, inserted: string, r: NumberTypingRules): boolean;
|
|
821
|
+
|
|
822
|
+
/** What wu-empty-state shows: no data yet, nothing found, an empty inbox or folder, a failed load, no connection. */
|
|
823
|
+
type WuEmptyStateType = 'nodata' | 'search' | 'inbox' | 'folder' | 'error' | 'offline';
|
|
824
|
+
/** What wu-result reports: the outcome of a task, or a page that cannot be shown. */
|
|
825
|
+
type WuResultStatus = 'success' | 'error' | 'info' | 'warning' | '403' | '404' | '500';
|
|
826
|
+
/** wu-error-page: what kind of failure a status code is (picks the picture and the kawaii text). */
|
|
827
|
+
type WuErrorKind = 'request' | 'auth' | 'forbidden' | 'missing' | 'time' | 'busy' | 'server' | 'gateway' | 'down';
|
|
828
|
+
/** UI strings components read. Keys follow the translation object shape apps already use, so migrating apps can reuse theirs. */
|
|
829
|
+
interface WuLocale {
|
|
830
|
+
code: string;
|
|
831
|
+
dayNames: string[];
|
|
832
|
+
dayNamesShort: string[];
|
|
833
|
+
dayNamesMin: string[];
|
|
834
|
+
monthNames: string[];
|
|
835
|
+
monthNamesShort: string[];
|
|
836
|
+
firstDayOfWeek: number;
|
|
837
|
+
today: string;
|
|
838
|
+
clear: string;
|
|
839
|
+
accept: string;
|
|
840
|
+
reject: string;
|
|
841
|
+
cancel: string;
|
|
842
|
+
choose: string;
|
|
843
|
+
upload: string;
|
|
844
|
+
emptyMessage: string;
|
|
845
|
+
emptyFilterMessage: string;
|
|
846
|
+
weekHeader: string;
|
|
847
|
+
/** Labels for icon-only buttons (close a message, remove a chip, expand a panel) and busy states. */
|
|
848
|
+
close: string;
|
|
849
|
+
remove: string;
|
|
850
|
+
expand: string;
|
|
851
|
+
collapse: string;
|
|
852
|
+
loading: string;
|
|
853
|
+
/** Search boxes, e.g. the filter of a select. */
|
|
854
|
+
search: string;
|
|
855
|
+
/** Paginator and table: the page report (placeholders {first} {last} {totalRecords} {currentPage} {totalPages} {rows}),
|
|
856
|
+
* labels of the page buttons and the rows-per-page box, and the row checkboxes. */
|
|
857
|
+
pageReport: string;
|
|
858
|
+
firstPage: string;
|
|
859
|
+
previousPage: string;
|
|
860
|
+
nextPage: string;
|
|
861
|
+
lastPage: string;
|
|
862
|
+
pageLabel: string;
|
|
863
|
+
rowsPerPage: string;
|
|
864
|
+
/** The menu button that shows a menubar's items on narrow screens. */
|
|
865
|
+
navigation: string;
|
|
866
|
+
/** wu-aside-menu: the side menu's landmark and its collapse button. */
|
|
867
|
+
sideNavigation: string;
|
|
868
|
+
collapseMenu: string;
|
|
869
|
+
expandMenu: string;
|
|
870
|
+
selectAll: string;
|
|
871
|
+
/** Label of the total row in an exported table. */
|
|
872
|
+
total: string;
|
|
873
|
+
/** wu-empty-state: the title and the line under it, per type. */
|
|
874
|
+
emptyState: Record<WuEmptyStateType, {
|
|
875
|
+
title: string;
|
|
876
|
+
description: string;
|
|
877
|
+
}>;
|
|
878
|
+
/** wu-result: the title and the line under it, per status. */
|
|
879
|
+
result: Record<WuResultStatus, {
|
|
880
|
+
title: string;
|
|
881
|
+
description: string;
|
|
882
|
+
}>;
|
|
883
|
+
/**
|
|
884
|
+
* wu-error-page: the word before the code, the buttons, the reference line, the formal text per status code (any code
|
|
885
|
+
* not listed takes `4xx` / `5xx`) and the kawaii text per kind.
|
|
886
|
+
*/
|
|
887
|
+
errorPage: {
|
|
888
|
+
error: string;
|
|
889
|
+
home: string;
|
|
890
|
+
back: string;
|
|
891
|
+
retry: string;
|
|
892
|
+
signIn: string;
|
|
893
|
+
reference: string;
|
|
894
|
+
codes: Record<string, {
|
|
895
|
+
title: string;
|
|
896
|
+
description: string;
|
|
897
|
+
}>;
|
|
898
|
+
kawaii: Record<WuErrorKind, {
|
|
899
|
+
title: string;
|
|
900
|
+
description: string;
|
|
901
|
+
}>;
|
|
902
|
+
};
|
|
903
|
+
/** wu-site-footer: the back-to-top button and the words after the copyright. wu-bottombar: its label. */
|
|
904
|
+
siteFooter: {
|
|
905
|
+
backToTop: string;
|
|
906
|
+
rights: string;
|
|
907
|
+
};
|
|
908
|
+
bottombar: string;
|
|
909
|
+
/** Multi-select field once more are chosen than it lists; {0} is the count. */
|
|
910
|
+
selectedItemsLabel: string;
|
|
911
|
+
/** Image preview: the button over the picture and the full-screen toolbar. */
|
|
912
|
+
previewImage: string;
|
|
913
|
+
rotateRight: string;
|
|
914
|
+
rotateLeft: string;
|
|
915
|
+
zoomIn: string;
|
|
916
|
+
/** wu-imagecropper */
|
|
917
|
+
imageCropper: string;
|
|
918
|
+
/** Label of wu-language-switch. */
|
|
919
|
+
language: string;
|
|
920
|
+
cropArea: string;
|
|
921
|
+
cropAreaHint: string;
|
|
922
|
+
zoom: string;
|
|
923
|
+
flipHorizontal: string;
|
|
924
|
+
flipVertical: string;
|
|
925
|
+
resetCrop: string;
|
|
926
|
+
imageLoadFailed: string;
|
|
927
|
+
zoomOut: string;
|
|
928
|
+
/** The button that lists every suggestion of an autocomplete. */
|
|
929
|
+
showOptions: string;
|
|
930
|
+
selectRow: string;
|
|
931
|
+
/** Column filter menu: match modes (the keys translation objects already use), rules and buttons. */
|
|
932
|
+
startsWith: string;
|
|
933
|
+
contains: string;
|
|
934
|
+
notContains: string;
|
|
935
|
+
endsWith: string;
|
|
936
|
+
equals: string;
|
|
937
|
+
notEquals: string;
|
|
938
|
+
lt: string;
|
|
939
|
+
lte: string;
|
|
940
|
+
gt: string;
|
|
941
|
+
gte: string;
|
|
942
|
+
dateIs: string;
|
|
943
|
+
dateIsNot: string;
|
|
944
|
+
dateBefore: string;
|
|
945
|
+
dateAfter: string;
|
|
946
|
+
noFilter: string;
|
|
947
|
+
apply: string;
|
|
948
|
+
matchAll: string;
|
|
949
|
+
matchAny: string;
|
|
950
|
+
addRule: string;
|
|
951
|
+
removeRule: string;
|
|
952
|
+
filter: string;
|
|
953
|
+
/** Pick list and order list buttons. */
|
|
954
|
+
moveUp: string;
|
|
955
|
+
moveTop: string;
|
|
956
|
+
moveDown: string;
|
|
957
|
+
moveBottom: string;
|
|
958
|
+
moveToTarget: string;
|
|
959
|
+
moveAllToTarget: string;
|
|
960
|
+
moveToSource: string;
|
|
961
|
+
moveAllToSource: string;
|
|
962
|
+
/**
|
|
963
|
+
* File upload: the hint in an empty drop area, upload states, size units, and the messages for files it turns away
|
|
964
|
+
* ({0} the file name, {1} the limit or the accepted types).
|
|
965
|
+
*/
|
|
966
|
+
dropFiles: string;
|
|
967
|
+
pending: string;
|
|
968
|
+
completed: string;
|
|
969
|
+
fileSizeTypes: string[];
|
|
970
|
+
invalidFileSize: string;
|
|
971
|
+
invalidFileType: string;
|
|
972
|
+
invalidFileLimit: string;
|
|
973
|
+
/** Password field: hint before typing, strength levels, and the show/hide button. */
|
|
974
|
+
passwordPrompt: string;
|
|
975
|
+
/** Default labels of a toggle button. */
|
|
976
|
+
yes: string;
|
|
977
|
+
no: string;
|
|
978
|
+
weak: string;
|
|
979
|
+
medium: string;
|
|
980
|
+
strong: string;
|
|
981
|
+
showPassword: string;
|
|
982
|
+
hidePassword: string;
|
|
983
|
+
/** Date picker: time field names, the 12-hour markers, and labels for its icon-only buttons. */
|
|
984
|
+
hour: string;
|
|
985
|
+
minute: string;
|
|
986
|
+
second: string;
|
|
987
|
+
am: string;
|
|
988
|
+
pm: string;
|
|
989
|
+
chooseDate: string;
|
|
990
|
+
previousMonth: string;
|
|
991
|
+
nextMonth: string;
|
|
992
|
+
previousYear: string;
|
|
993
|
+
nextYear: string;
|
|
994
|
+
previousDecade: string;
|
|
995
|
+
nextDecade: string;
|
|
996
|
+
/** Default display pattern, see `formatDate()`. */
|
|
997
|
+
dateFormat: string;
|
|
998
|
+
/** Image gallery: the arrows, the dots (`{0}` of `{1}`) and full screen. */
|
|
999
|
+
previousImage: string;
|
|
1000
|
+
nextImage: string;
|
|
1001
|
+
imageOf: string;
|
|
1002
|
+
fullScreen: string;
|
|
1003
|
+
/** Breadcrumb: the trail's label and the home link's. */
|
|
1004
|
+
breadcrumb: string;
|
|
1005
|
+
home: string;
|
|
1006
|
+
/** Colour picker: the swatch button, the hue strip and the saturation/brightness area. */
|
|
1007
|
+
colorPicker: string;
|
|
1008
|
+
hue: string;
|
|
1009
|
+
saturationBrightness: string;
|
|
1010
|
+
/** Terminal: the label of its command line. */
|
|
1011
|
+
terminalInput: string;
|
|
1012
|
+
/** Image compare: the label of its divider (a slider). */
|
|
1013
|
+
imageCompare: string;
|
|
1014
|
+
/** Carousel: how screen readers call it and its items, and an item's place (`{0}` of `{1}`). */
|
|
1015
|
+
carousel: string;
|
|
1016
|
+
slide: string;
|
|
1017
|
+
slideOf: string;
|
|
1018
|
+
/** Splitter: the label of a gutter between panels. */
|
|
1019
|
+
resizePanels: string;
|
|
1020
|
+
/** Organization chart: the chart's label. */
|
|
1021
|
+
organizationChart: string;
|
|
1022
|
+
/** One-time code boxes: the group's label and each box's (`{0}` of `{1}`). */
|
|
1023
|
+
oneTimeCode: string;
|
|
1024
|
+
otpCharacter: string;
|
|
1025
|
+
/** wu-flow (a node diagram): role names, keyboard hints, controls, and what screen readers hear as things change. */
|
|
1026
|
+
/** The diagram's accessible name and role description. */
|
|
1027
|
+
flowLabel: string;
|
|
1028
|
+
flowNode: string;
|
|
1029
|
+
flowEdge: string;
|
|
1030
|
+
/** Added to a node's or edge's name while it is selected. */
|
|
1031
|
+
flowSelectedState: string;
|
|
1032
|
+
/** Hints read with the diagram and with each node / edge. */
|
|
1033
|
+
flowPaneHint: string;
|
|
1034
|
+
flowNodeHint: string;
|
|
1035
|
+
flowEdgeHint: string;
|
|
1036
|
+
/** Controls. */
|
|
1037
|
+
flowControls: string;
|
|
1038
|
+
flowZoomIn: string;
|
|
1039
|
+
flowZoomOut: string;
|
|
1040
|
+
flowFitView: string;
|
|
1041
|
+
flowLock: string;
|
|
1042
|
+
flowUnlock: string;
|
|
1043
|
+
flowMiniMap: string;
|
|
1044
|
+
flowNodeToolbar: string;
|
|
1045
|
+
flowUndo: string;
|
|
1046
|
+
flowRedo: string;
|
|
1047
|
+
/** Announcements ({name}, {count}, {x} … are filled in). */
|
|
1048
|
+
flowSelected: string;
|
|
1049
|
+
flowSelectionCleared: string;
|
|
1050
|
+
flowMoved: string;
|
|
1051
|
+
flowMovedMany: string;
|
|
1052
|
+
flowResized: string;
|
|
1053
|
+
flowConnectStart: string;
|
|
1054
|
+
flowConnected: string;
|
|
1055
|
+
flowConnectCancelled: string;
|
|
1056
|
+
flowConnectInvalid: string;
|
|
1057
|
+
flowReconnected: string;
|
|
1058
|
+
flowDeleted: string;
|
|
1059
|
+
flowEdgeFromTo: string;
|
|
1060
|
+
flowZoomLevel: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* Form error messages, by validator key. `{label}` is the field's name when one is given (`requiredLabel`),
|
|
1063
|
+
* `{requiredLength}`, `{min}`, `{max}` come from the error.
|
|
1064
|
+
*/
|
|
1065
|
+
validation: WuValidationMessages;
|
|
1066
|
+
/** Rich-text editor: toolbar labels, menus and dialogs. `{0}` / `{1}` are filled in (a level, a size, a count). */
|
|
1067
|
+
editor: WuEditorMessages;
|
|
1068
|
+
}
|
|
1069
|
+
interface WuEditorMessages {
|
|
1070
|
+
toolbar: string;
|
|
1071
|
+
undo: string;
|
|
1072
|
+
redo: string;
|
|
1073
|
+
paragraph: string;
|
|
1074
|
+
heading: string;
|
|
1075
|
+
blockStyle: string;
|
|
1076
|
+
fontSize: string;
|
|
1077
|
+
fontFamily: string;
|
|
1078
|
+
defaultFont: string;
|
|
1079
|
+
sizeSmall: string;
|
|
1080
|
+
sizeNormal: string;
|
|
1081
|
+
sizeLarge: string;
|
|
1082
|
+
sizeHuge: string;
|
|
1083
|
+
bold: string;
|
|
1084
|
+
italic: string;
|
|
1085
|
+
underline: string;
|
|
1086
|
+
strike: string;
|
|
1087
|
+
subscript: string;
|
|
1088
|
+
superscript: string;
|
|
1089
|
+
code: string;
|
|
1090
|
+
color: string;
|
|
1091
|
+
highlight: string;
|
|
1092
|
+
removeColor: string;
|
|
1093
|
+
customColor: string;
|
|
1094
|
+
bulletList: string;
|
|
1095
|
+
orderedList: string;
|
|
1096
|
+
indent: string;
|
|
1097
|
+
outdent: string;
|
|
1098
|
+
align: string;
|
|
1099
|
+
alignLeft: string;
|
|
1100
|
+
alignCenter: string;
|
|
1101
|
+
alignRight: string;
|
|
1102
|
+
alignJustify: string;
|
|
1103
|
+
link: string;
|
|
1104
|
+
linkUrl: string;
|
|
1105
|
+
linkText: string;
|
|
1106
|
+
linkNewTab: string;
|
|
1107
|
+
openLink: string;
|
|
1108
|
+
editLink: string;
|
|
1109
|
+
unlink: string;
|
|
1110
|
+
invalidUrl: string;
|
|
1111
|
+
apply: string;
|
|
1112
|
+
image: string;
|
|
1113
|
+
imageUpload: string;
|
|
1114
|
+
imageFromUrl: string;
|
|
1115
|
+
imageUrl: string;
|
|
1116
|
+
imageAlt: string;
|
|
1117
|
+
imageDrop: string;
|
|
1118
|
+
imageWidth: string;
|
|
1119
|
+
imageOriginal: string;
|
|
1120
|
+
imageInline: string;
|
|
1121
|
+
imageLeft: string;
|
|
1122
|
+
imageCenter: string;
|
|
1123
|
+
imageRight: string;
|
|
1124
|
+
imageRemove: string;
|
|
1125
|
+
imageResize: string;
|
|
1126
|
+
uploading: string;
|
|
1127
|
+
uploadFailed: string;
|
|
1128
|
+
imageTooLarge: string;
|
|
1129
|
+
imageWrongType: string;
|
|
1130
|
+
table: string;
|
|
1131
|
+
insertTable: string;
|
|
1132
|
+
tableSize: string;
|
|
1133
|
+
rowAbove: string;
|
|
1134
|
+
rowBelow: string;
|
|
1135
|
+
colLeft: string;
|
|
1136
|
+
colRight: string;
|
|
1137
|
+
deleteRow: string;
|
|
1138
|
+
deleteCol: string;
|
|
1139
|
+
deleteTable: string;
|
|
1140
|
+
headerRow: string;
|
|
1141
|
+
mergeRight: string;
|
|
1142
|
+
mergeDown: string;
|
|
1143
|
+
splitCell: string;
|
|
1144
|
+
/** Table: merging the cells picked by dragging, the insert panel's own size fields, the table's toolbar. */
|
|
1145
|
+
mergeCells: string;
|
|
1146
|
+
tableRows: string;
|
|
1147
|
+
tableCols: string;
|
|
1148
|
+
insert: string;
|
|
1149
|
+
tableTools: string;
|
|
1150
|
+
blockquote: string;
|
|
1151
|
+
codeBlock: string;
|
|
1152
|
+
hr: string;
|
|
1153
|
+
clear: string;
|
|
1154
|
+
source: string;
|
|
1155
|
+
fullscreen: string;
|
|
1156
|
+
exitFullscreen: string;
|
|
1157
|
+
words: string;
|
|
1158
|
+
characters: string;
|
|
1159
|
+
content: string;
|
|
1160
|
+
}
|
|
1161
|
+
interface WuValidationMessages {
|
|
1162
|
+
required: string;
|
|
1163
|
+
requiredLabel: string;
|
|
1164
|
+
requiredTrue: string;
|
|
1165
|
+
email: string;
|
|
1166
|
+
minlength: string;
|
|
1167
|
+
maxlength: string;
|
|
1168
|
+
min: string;
|
|
1169
|
+
max: string;
|
|
1170
|
+
pattern: string;
|
|
1171
|
+
thaiId: string;
|
|
1172
|
+
phone: string;
|
|
1173
|
+
mismatch: string;
|
|
1174
|
+
/** Any other error key. */
|
|
1175
|
+
invalid: string;
|
|
1176
|
+
}
|
|
1177
|
+
declare const TH_LOCALE: WuLocale;
|
|
1178
|
+
declare const EN_LOCALE: WuLocale;
|
|
1179
|
+
declare const LOCALES: Record<string, WuLocale>;
|
|
1180
|
+
|
|
1181
|
+
/** wu-error-page: what a 4xx / 5xx status code means for the page, framework-free. */
|
|
1182
|
+
|
|
1183
|
+
/** The error page's built-in buttons. */
|
|
1184
|
+
type WuErrorAction = 'home' | 'back' | 'retry' | 'signIn';
|
|
1185
|
+
/** A status code to show: 400–599, else 500. */
|
|
1186
|
+
declare function httpErrorCode(value: unknown): number;
|
|
1187
|
+
/**
|
|
1188
|
+
* The kind of failure a status code is: 401 sign in, 403 forbidden, 404 / 410 missing, 408 / 504 time, 429 busy,
|
|
1189
|
+
* 502 gateway, 503 down, any other 5xx server, any other 4xx request.
|
|
1190
|
+
*/
|
|
1191
|
+
declare function httpErrorKind(code: number): WuErrorKind;
|
|
1192
|
+
/** The buttons that fit a code, the main one first: sign in (401), try again (timeouts, too many, 5xx) or back; home at the end (first for a missing page). */
|
|
1193
|
+
declare function httpErrorActions(code: number): WuErrorAction[];
|
|
1194
|
+
/** Which formal text a code reads: its own when the locale has it, else `'4xx'` / `'5xx'`. */
|
|
1195
|
+
declare function httpErrorTextKey(code: number, codes: Record<string, unknown> | null | undefined): string;
|
|
1196
|
+
|
|
1197
|
+
/** wu-dock: the macOS-style magnification, framework-free. */
|
|
1198
|
+
/**
|
|
1199
|
+
* How much a dock icon grows with the pointer `distance` px from its centre: `max` right under the pointer, easing
|
|
1200
|
+
* down (a cosine) to 1 at `reach` px, so neighbours swell a little too. `max` 1 or less turns it off.
|
|
1201
|
+
*/
|
|
1202
|
+
declare function dockScale(distance: number, reach: number, max: number): number;
|
|
1203
|
+
|
|
1204
|
+
/** `'buddhist'` shows and reads years as พ.ศ.; values stay ordinary `Date` objects (ค.ศ.) either way. */
|
|
1205
|
+
type CalendarSystem = 'gregorian' | 'buddhist';
|
|
1206
|
+
declare const BUDDHIST_OFFSET = 543;
|
|
1207
|
+
declare function toBuddhistYear(gregorianYear: number): number;
|
|
1208
|
+
declare function fromBuddhistYear(buddhistYear: number): number;
|
|
1209
|
+
interface DateFormatOptions {
|
|
1210
|
+
locale?: WuLocale;
|
|
1211
|
+
calendar?: CalendarSystem;
|
|
1212
|
+
}
|
|
1213
|
+
/**
|
|
1214
|
+
* Formats with a small pattern language: d dd M MM MMM MMMM yy yyyy EEE EEEE H HH (24-hour), h hh a (12-hour
|
|
1215
|
+
* and the locale's AM/PM), mm ss, 'literal'.
|
|
1216
|
+
* `formatDate(new Date(2013, 2, 12), 'd MMMM yyyy', { calendar: 'buddhist' })` → `12 มีนาคม 2556`.
|
|
1217
|
+
*/
|
|
1218
|
+
declare function formatDate(date: Date, pattern: string, o?: DateFormatOptions): string;
|
|
1219
|
+
/**
|
|
1220
|
+
* Reads text typed in `pattern` back into a Date. Returns null when it does not match or the day is invalid.
|
|
1221
|
+
* With `calendar: 'buddhist'` a 4-digit year is read as พ.ศ.; one below 2300 can only be a ค.ศ. year typed by habit and is read as such.
|
|
1222
|
+
* Month names and AM/PM match in any letter case, and Thai digits count.
|
|
1223
|
+
*/
|
|
1224
|
+
declare function parseDate(text: string, pattern: string, o?: DateFormatOptions): Date | null;
|
|
1225
|
+
|
|
1226
|
+
/** Thai national ID (เลขประจำตัวประชาชน 13 หลัก). */
|
|
1227
|
+
/** Check digit for the first 12 digits: (11 − Σ dᵢ·(13 − i) mod 11) mod 10. */
|
|
1228
|
+
declare function thaiIdCheckDigit(first12: string): number;
|
|
1229
|
+
declare function isValidThaiId(value: string): boolean;
|
|
1230
|
+
/** Formats as you type: `1103702345679` → `1-1037-02345-67-9`. Extra digits are dropped. */
|
|
1231
|
+
declare function formatThaiId(value: string): string;
|
|
1232
|
+
|
|
1233
|
+
/** Thai text helpers behind the `@wirabyte/ui/thai` pipes: amounts in words, Thai digits, phone numbers, date formats. */
|
|
1234
|
+
|
|
1235
|
+
/** A whole number written in digits, in Thai words: `'1000001'` → `หนึ่งล้านเอ็ด`. */
|
|
1236
|
+
declare function thaiNumberText(digits: string): string;
|
|
1237
|
+
/**
|
|
1238
|
+
* An amount of money in Thai words, as Excel's BAHTTEXT writes it: `1234.5` → `หนึ่งพันสองร้อยสามสิบสี่บาทห้าสิบสตางค์`,
|
|
1239
|
+
* `21` → `ยี่สิบเอ็ดบาทถ้วน`, `-1` → `ลบหนึ่งบาทถ้วน`. Satang are rounded to two places. Text that is not a number → `''`.
|
|
1240
|
+
*/
|
|
1241
|
+
declare function bahtText(amount: number | string | null | undefined): string;
|
|
1242
|
+
/** Arabic digits in Thai: `'2569'` → `'๒๕๖๙'`. */
|
|
1243
|
+
declare function toThaiDigits(text: unknown): string;
|
|
1244
|
+
/** Thai digits in Arabic: `'๒๕๖๙'` → `'2569'`. */
|
|
1245
|
+
declare function fromThaiDigits(text: unknown): string;
|
|
1246
|
+
/**
|
|
1247
|
+
* A Thai phone number with dashes: mobiles `081-234-5678`, Bangkok `02-123-4567`, other areas `053-123-456`;
|
|
1248
|
+
* `+66` / `66` become `0`. Thai digits are read. Anything else comes back as it was (trimmed).
|
|
1249
|
+
*/
|
|
1250
|
+
declare function formatThaiPhone(value: unknown, separator?: string): string;
|
|
1251
|
+
/** A date from what apps hold: a Date, a time in ms, or text (`'2012-05-14'` is that day here, not UTC midnight). */
|
|
1252
|
+
declare function toDateValue(value: unknown): Date | null;
|
|
1253
|
+
/** Named date formats of the `wuDate` pipe. */
|
|
1254
|
+
type ThaiDateFormat = 'short' | 'medium' | 'long' | 'full' | 'time' | 'shortDateTime' | 'dateTime';
|
|
1255
|
+
/**
|
|
1256
|
+
* The pattern (for `formatDate()`) of a named format in a language: Thai `full` is `วันอังคารที่ 28 ตุลาคม พ.ศ. 2569`,
|
|
1257
|
+
* `time` is `14:30 น.`. Anything that is not a name is a pattern already.
|
|
1258
|
+
*/
|
|
1259
|
+
declare function datePattern(format: string, lang: string, calendar: CalendarSystem): string;
|
|
1260
|
+
/**
|
|
1261
|
+
* How long ago (or until) a time, in words: `5 นาทีที่ผ่านมา`, `เมื่อวาน`, `in 3 days`. Under a minute is "now"
|
|
1262
|
+
* (`ขณะนี้` / `now`). Uses the platform's Intl.RelativeTimeFormat; `''` without it.
|
|
1263
|
+
*/
|
|
1264
|
+
declare function timeAgo(value: unknown, lang?: string, now?: Date): string;
|
|
1265
|
+
|
|
1266
|
+
/** A sortable number for the calendar day of `d`, ignoring the time. */
|
|
1267
|
+
declare function dayNumber(d: Date): number;
|
|
1268
|
+
declare function sameDay(a: Date | null | undefined, b: Date | null | undefined): boolean;
|
|
1269
|
+
/** Negative when `a` is an earlier day than `b`, 0 on the same day, positive when later. */
|
|
1270
|
+
declare function compareDays(a: Date, b: Date): number;
|
|
1271
|
+
declare function startOfDay(d: Date): Date;
|
|
1272
|
+
declare function addDays(d: Date, n: number): Date;
|
|
1273
|
+
declare function daysInMonth(year: number, month: number): number;
|
|
1274
|
+
/** The same day `n` months later, kept inside the month: 31 Jan + 1 month → 28 or 29 Feb. */
|
|
1275
|
+
declare function addMonths(d: Date, n: number): Date;
|
|
1276
|
+
declare function isValidDate(d: unknown): d is Date;
|
|
1277
|
+
interface CalendarDay {
|
|
1278
|
+
/** Midnight of the day. */
|
|
1279
|
+
date: Date;
|
|
1280
|
+
day: number;
|
|
1281
|
+
/** 0–11 and the ค.ศ. year of the day, as custom day templates expect them. */
|
|
1282
|
+
month: number;
|
|
1283
|
+
year: number;
|
|
1284
|
+
/** Belongs to the month before or after the one shown. */
|
|
1285
|
+
otherMonth: boolean;
|
|
1286
|
+
today: boolean;
|
|
1287
|
+
}
|
|
1288
|
+
/**
|
|
1289
|
+
* The six weeks that show `month` (0–11), each starting on `firstDayOfWeek` (0 = Sunday).
|
|
1290
|
+
* Always six rows, so the panel keeps its height from month to month.
|
|
1291
|
+
*/
|
|
1292
|
+
declare function calendarWeeks(year: number, month: number, firstDayOfWeek?: number, today?: Date): CalendarDay[][];
|
|
1293
|
+
/** Weekday indexes (0 = Sunday) in the order the header row shows them. */
|
|
1294
|
+
declare function weekdayOrder(firstDayOfWeek?: number): number[];
|
|
1295
|
+
interface DateLimits {
|
|
1296
|
+
/** Earliest day (and time, when the picker shows one) that can be picked. */
|
|
1297
|
+
minDate?: Date | null;
|
|
1298
|
+
maxDate?: Date | null;
|
|
1299
|
+
/** Single days that cannot be picked. */
|
|
1300
|
+
disabledDates?: readonly Date[] | null;
|
|
1301
|
+
/** Weekdays that cannot be picked, 0 = Sunday. */
|
|
1302
|
+
disabledDays?: readonly number[] | null;
|
|
1303
|
+
}
|
|
1304
|
+
declare function isDaySelectable(date: Date, l: DateLimits): boolean;
|
|
1305
|
+
/** False when the whole month lies outside minDate–maxDate. */
|
|
1306
|
+
declare function isMonthSelectable(year: number, month: number, l: DateLimits): boolean;
|
|
1307
|
+
declare function isYearSelectable(year: number, l: DateLimits): boolean;
|
|
1308
|
+
/** `date` moved inside minDate–maxDate (to the exact limit, time included). */
|
|
1309
|
+
declare function clampDate(date: Date, l: Pick<DateLimits, 'minDate' | 'maxDate'>): Date;
|
|
1310
|
+
/** Year shown to people: พ.ศ. for `'buddhist'`. */
|
|
1311
|
+
declare function displayYear(year: number, calendar?: CalendarSystem): number;
|
|
1312
|
+
/**
|
|
1313
|
+
* The 12 years one page of the year view shows, as ค.ศ. years: a decade of the years people see (2560–2569 in พ.ศ.)
|
|
1314
|
+
* plus one on each side, the way a wall calendar shows the edges of the next month.
|
|
1315
|
+
*/
|
|
1316
|
+
declare function yearPage(year: number, calendar?: CalendarSystem): {
|
|
1317
|
+
years: number[];
|
|
1318
|
+
first: number;
|
|
1319
|
+
last: number;
|
|
1320
|
+
};
|
|
1321
|
+
/**
|
|
1322
|
+
* The day focus moves to for a key in the day grid, or null for keys the grid leaves alone.
|
|
1323
|
+
* Arrows move by a day or a week, Home / End go to the start / end of the week, PageUp / PageDown change the month,
|
|
1324
|
+
* and with Shift the year.
|
|
1325
|
+
*/
|
|
1326
|
+
declare function moveDay(date: Date, key: string, o?: {
|
|
1327
|
+
shiftKey?: boolean;
|
|
1328
|
+
firstDayOfWeek?: number;
|
|
1329
|
+
}): Date | null;
|
|
1330
|
+
type HourFormat = '12' | '24';
|
|
1331
|
+
type TimeUnit = 'hour' | 'minute' | 'second';
|
|
1332
|
+
/** Steps a clock field and wraps around: 23 + 1 → 0, 0 − 5 minutes → 55. */
|
|
1333
|
+
declare function wrapStep(value: number, step: number, direction: 1 | -1, size: number): number;
|
|
1334
|
+
/** 0–23 → 12, 1–11 with AM/PM. */
|
|
1335
|
+
declare function to12Hour(hour: number): {
|
|
1336
|
+
hour: number;
|
|
1337
|
+
pm: boolean;
|
|
1338
|
+
};
|
|
1339
|
+
/** 12-hour clock back to 0–23: 12 AM → 0, 12 PM → 12. */
|
|
1340
|
+
declare function from12Hour(hour: number, pm: boolean): number;
|
|
1341
|
+
/** Smallest and largest value a time field takes, as shown: hours 0–23 or 1–12, minutes and seconds 0–59. */
|
|
1342
|
+
declare function timeFieldRange(unit: TimeUnit, hourFormat?: HourFormat): [number, number];
|
|
1343
|
+
interface TypedTimeField {
|
|
1344
|
+
/** The typed number when it is in range, else null. */
|
|
1345
|
+
value: number | null;
|
|
1346
|
+
/** The typed number even when out of range; null while there are no digits. */
|
|
1347
|
+
raw: number | null;
|
|
1348
|
+
/** No further digit could make a valid value, so focus can move to the next field. */
|
|
1349
|
+
complete: boolean;
|
|
1350
|
+
}
|
|
1351
|
+
/** Reads what was typed into one time field. Thai digits count; anything else that is not a digit is ignored. */
|
|
1352
|
+
declare function readTimeField(text: string, unit: TimeUnit, hourFormat?: HourFormat): TypedTimeField;
|
|
1353
|
+
declare function clampTimeField(n: number, unit: TimeUnit, hourFormat?: HourFormat): number;
|
|
1354
|
+
/**
|
|
1355
|
+
* Turns a date format in the `dd/mm/yy` style that existing date-picker templates use into a `formatDate()` pattern:
|
|
1356
|
+
* d dd (day), m mm (month number), M MM (short / long month name), y yy (2- / 4-digit year), D DD (short / long day name),
|
|
1357
|
+
* 'text' (literal). `classicDateFormat('dd/mm/yy')` → `'dd/MM/yyyy'`.
|
|
1358
|
+
*/
|
|
1359
|
+
declare function classicDateFormat(format: string): string;
|
|
1360
|
+
/** `formatDate()` pattern for the time part: `HH:mm`, `HH:mm:ss`, `hh:mm a`, `hh:mm:ss a`. */
|
|
1361
|
+
declare function timeFormat(o?: {
|
|
1362
|
+
hourFormat?: HourFormat;
|
|
1363
|
+
showSeconds?: boolean;
|
|
1364
|
+
}): string;
|
|
1365
|
+
interface LooseDateOptions {
|
|
1366
|
+
locale?: WuLocale;
|
|
1367
|
+
calendar?: CalendarSystem;
|
|
1368
|
+
/** Read hours, minutes and seconds after the date. */
|
|
1369
|
+
time?: boolean;
|
|
1370
|
+
/** Only a time is typed (hh:mm[:ss]); the date comes from `base`. */
|
|
1371
|
+
timeOnly?: boolean;
|
|
1372
|
+
hourFormat?: HourFormat;
|
|
1373
|
+
/** Day the time is put on for `timeOnly`. Default today. */
|
|
1374
|
+
base?: Date;
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* Reads a date typed with numbers in the day / month / year order of `pattern`, whatever the separators:
|
|
1378
|
+
* with pattern `d MMMM yyyy`, `12/3/2569`, `12-03-69` and `12.3.2569 14:30` all work. A 2-digit year is put in
|
|
1379
|
+
* the current century of the calendar. Returns null when the numbers do not make a real day or time.
|
|
1380
|
+
*/
|
|
1381
|
+
declare function parseLooseDate(text: string, pattern: string, o?: LooseDateOptions): Date | null;
|
|
1382
|
+
/**
|
|
1383
|
+
* Reads one typed date: first exactly as `pattern`, then (for a date with a time) the date alone, then
|
|
1384
|
+
* by numbers as `parseLooseDate()` does. `formatDate`'s options apply.
|
|
1385
|
+
*/
|
|
1386
|
+
declare function parseTypedDate(text: string, pattern: string, o?: LooseDateOptions & {
|
|
1387
|
+
datePattern?: string;
|
|
1388
|
+
}): Date | null;
|
|
1389
|
+
/**
|
|
1390
|
+
* Splits text holding several dates joined by `separator` back into one string per date. Pieces are joined again
|
|
1391
|
+
* while they do not parse alone, so a separator that also appears inside a date (`Mar 12, 2024, Mar 15, 2024`) still works.
|
|
1392
|
+
*/
|
|
1393
|
+
declare function splitDates(text: string, separator: RegExp, parse: (s: string) => Date | null): string[] | null;
|
|
1394
|
+
|
|
1395
|
+
type DateSelectionMode = 'single' | 'multiple' | 'range';
|
|
1396
|
+
/** What a cell of the panel is: a day, a month or a year. */
|
|
1397
|
+
type DatePickerView = 'date' | 'month' | 'year';
|
|
1398
|
+
/** single: a Date. multiple: Date[]. range: [start, end], end null until it is picked. */
|
|
1399
|
+
type DatePickerValue = Date | (Date | null)[] | null;
|
|
1400
|
+
interface DatePickerOptions extends DateLimits {
|
|
1401
|
+
selectionMode?: DateSelectionMode;
|
|
1402
|
+
/** The smallest thing picked: `'month'` picks a month (its 1st day), `'year'` a year (1 January). Default `'date'`. */
|
|
1403
|
+
view?: DatePickerView;
|
|
1404
|
+
/** 0 = Sunday. Default: the locale's. */
|
|
1405
|
+
firstDayOfWeek?: number;
|
|
1406
|
+
/** `'buddhist'` shows years as พ.ศ.; values stay ordinary Dates. Default `'gregorian'`. */
|
|
1407
|
+
calendar?: CalendarSystem;
|
|
1408
|
+
locale?: WuLocale;
|
|
1409
|
+
/** `formatDate()` pattern of the date part. Default: the locale's, or `MMMM yyyy` / `yyyy` for the month and year views. */
|
|
1410
|
+
dateFormat?: string;
|
|
1411
|
+
showTime?: boolean;
|
|
1412
|
+
timeOnly?: boolean;
|
|
1413
|
+
showSeconds?: boolean;
|
|
1414
|
+
hourFormat?: HourFormat;
|
|
1415
|
+
stepHour?: number;
|
|
1416
|
+
stepMinute?: number;
|
|
1417
|
+
stepSecond?: number;
|
|
1418
|
+
/** multiple: most dates that can be picked. */
|
|
1419
|
+
maxDateCount?: number | null;
|
|
1420
|
+
/** Days of the months before and after can be picked (the view moves there). Default true. */
|
|
1421
|
+
selectOtherMonths?: boolean;
|
|
1422
|
+
/** Years (ค.ศ.) the year view offers, `[first, last]`. Days outside can still be picked from the day view. */
|
|
1423
|
+
yearRange?: [number, number] | null;
|
|
1424
|
+
}
|
|
1425
|
+
interface DayCell extends CalendarDay {
|
|
1426
|
+
selectable: boolean;
|
|
1427
|
+
selected: boolean;
|
|
1428
|
+
rangeStart: boolean;
|
|
1429
|
+
rangeEnd: boolean;
|
|
1430
|
+
/** Strictly between the start and the end of a range. */
|
|
1431
|
+
inRange: boolean;
|
|
1432
|
+
/** Takes keyboard focus (the one cell with tabindex 0). */
|
|
1433
|
+
focused: boolean;
|
|
1434
|
+
/** The whole date, for screen readers. */
|
|
1435
|
+
label: string;
|
|
1436
|
+
}
|
|
1437
|
+
interface MonthCell {
|
|
1438
|
+
month: number;
|
|
1439
|
+
label: string;
|
|
1440
|
+
selected: boolean;
|
|
1441
|
+
/** The month of today. */
|
|
1442
|
+
current: boolean;
|
|
1443
|
+
selectable: boolean;
|
|
1444
|
+
focused: boolean;
|
|
1445
|
+
}
|
|
1446
|
+
interface YearCell {
|
|
1447
|
+
/** ค.ศ. */
|
|
1448
|
+
year: number;
|
|
1449
|
+
/** As people see it: พ.ศ. for the Buddhist calendar. */
|
|
1450
|
+
label: string;
|
|
1451
|
+
selected: boolean;
|
|
1452
|
+
current: boolean;
|
|
1453
|
+
selectable: boolean;
|
|
1454
|
+
/** One of the two years at the edges of the page, outside its decade. */
|
|
1455
|
+
outside: boolean;
|
|
1456
|
+
focused: boolean;
|
|
1457
|
+
}
|
|
1458
|
+
/** What a pick did: `changed` the value; `close` means a popup has what it needs and can close. */
|
|
1459
|
+
interface PickResult {
|
|
1460
|
+
changed: boolean;
|
|
1461
|
+
close: boolean;
|
|
1462
|
+
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Everything a date picker does except drawing it: the month, month and year grids, what is selected, keyboard moves,
|
|
1465
|
+
* the time fields, and the text of the input. Framework-free; the Angular components keep one and render from it.
|
|
1466
|
+
*/
|
|
1467
|
+
declare class DatePickerState {
|
|
1468
|
+
private readonly now;
|
|
1469
|
+
value: DatePickerValue;
|
|
1470
|
+
/** The grid on show. Starts at `options.view` and goes up to months and years from the header. */
|
|
1471
|
+
view: DatePickerView;
|
|
1472
|
+
viewYear: number;
|
|
1473
|
+
viewMonth: number;
|
|
1474
|
+
/** Cell that has keyboard focus, as a day: its month in the month view, its year in the year view. */
|
|
1475
|
+
focus: Date;
|
|
1476
|
+
/** Time the time fields show, on the 24-hour clock. */
|
|
1477
|
+
hour: number;
|
|
1478
|
+
minute: number;
|
|
1479
|
+
second: number;
|
|
1480
|
+
private o;
|
|
1481
|
+
constructor(options?: DatePickerOptions, now?: () => Date);
|
|
1482
|
+
configure(options: DatePickerOptions): void;
|
|
1483
|
+
get options(): Readonly<DatePickerOptions>;
|
|
1484
|
+
get mode(): DateSelectionMode;
|
|
1485
|
+
get baseView(): DatePickerView;
|
|
1486
|
+
get locale(): WuLocale;
|
|
1487
|
+
get calendar(): CalendarSystem;
|
|
1488
|
+
get hourFormat(): HourFormat;
|
|
1489
|
+
get firstDayOfWeek(): number;
|
|
1490
|
+
get hasTime(): boolean;
|
|
1491
|
+
get pm(): boolean;
|
|
1492
|
+
/** Takes a value from the model: Dates, ISO strings (`2026-03-12`, `2026-03-12T14:30`) or timestamps. */
|
|
1493
|
+
setValue(v: unknown): void;
|
|
1494
|
+
/** The picked dates, in order. */
|
|
1495
|
+
get dates(): Date[];
|
|
1496
|
+
/** Text for the input box. Ranges are joined with ` - `, several dates with `, `. */
|
|
1497
|
+
text(): string;
|
|
1498
|
+
format(date: Date): string;
|
|
1499
|
+
/** The whole pattern of one date in the input, time included. */
|
|
1500
|
+
get pattern(): string;
|
|
1501
|
+
get datePattern(): string;
|
|
1502
|
+
get timePattern(): string;
|
|
1503
|
+
/**
|
|
1504
|
+
* Reads typed text. `ok` is false when a date does not parse or cannot be picked (outside minDate–maxDate, disabled);
|
|
1505
|
+
* pass `check = false` to read a model string without those limits. Empty text is a valid "nothing".
|
|
1506
|
+
*/
|
|
1507
|
+
parse(text: string, check?: boolean): {
|
|
1508
|
+
ok: boolean;
|
|
1509
|
+
value: DatePickerValue;
|
|
1510
|
+
};
|
|
1511
|
+
/** Resets the panel for opening: the grid of `options.view`, showing the picked date, `defaultDate` or today. */
|
|
1512
|
+
open(defaultDate?: Date | null): void;
|
|
1513
|
+
/** Header text: the month name, the year, and the decade of the year view (`2560 – 2569`). */
|
|
1514
|
+
get monthLabel(): string;
|
|
1515
|
+
get yearLabel(): string;
|
|
1516
|
+
get decadeLabel(): string;
|
|
1517
|
+
/** False when the page before (-1) or after (1) has nothing that can be picked. */
|
|
1518
|
+
canGo(direction: 1 | -1): boolean;
|
|
1519
|
+
/** Previous / next month, year or decade, depending on the grid on show. */
|
|
1520
|
+
go(direction: 1 | -1): void;
|
|
1521
|
+
/** Header buttons: the month name opens the month grid, the year opens the year grid. */
|
|
1522
|
+
showView(view: DatePickerView): void;
|
|
1523
|
+
/** Header labels of the week, starting on `firstDayOfWeek`. */
|
|
1524
|
+
weekdays(): {
|
|
1525
|
+
day: number;
|
|
1526
|
+
short: string;
|
|
1527
|
+
long: string;
|
|
1528
|
+
}[];
|
|
1529
|
+
weeks(): DayCell[][];
|
|
1530
|
+
months(): MonthCell[];
|
|
1531
|
+
years(): YearCell[];
|
|
1532
|
+
pickDay(date: Date): PickResult;
|
|
1533
|
+
/** In the month grid: picks the month when months are what is picked, else opens that month's days. */
|
|
1534
|
+
pickMonth(month: number): PickResult;
|
|
1535
|
+
/** In the year grid: picks the year when years are what is picked, else opens that year's months. */
|
|
1536
|
+
pickYear(year: number): PickResult;
|
|
1537
|
+
/** The today button: today's day, month or year with the time the fields show. */
|
|
1538
|
+
pickToday(): PickResult;
|
|
1539
|
+
clear(): boolean;
|
|
1540
|
+
/**
|
|
1541
|
+
* Handles a key pressed on a grid cell. Returns whether it was handled (the caller then prevents the default and
|
|
1542
|
+
* focuses the cell with `focused`), and the pick that Enter or Space made.
|
|
1543
|
+
*/
|
|
1544
|
+
key(key: string, shiftKey?: boolean): {
|
|
1545
|
+
handled: boolean;
|
|
1546
|
+
result?: PickResult;
|
|
1547
|
+
};
|
|
1548
|
+
/** A time field's text, two digits: the hour on the 12-hour clock when `hourFormat` is `'12'`. */
|
|
1549
|
+
timeText(unit: TimeUnit): string;
|
|
1550
|
+
/** Up / down on a time field, wrapping around (23 → 0). Returns whether the value changed. */
|
|
1551
|
+
stepTime(unit: TimeUnit, direction: 1 | -1): boolean;
|
|
1552
|
+
/** A typed time field, as shown (1–12 for hours on the 12-hour clock); out-of-range numbers are clamped. */
|
|
1553
|
+
setTimeField(unit: TimeUnit, shown: number): boolean;
|
|
1554
|
+
setPm(pm: boolean): boolean;
|
|
1555
|
+
/** The date the time fields edit: the single value, the end (or start) of a range, the last of several. */
|
|
1556
|
+
private get timeTarget();
|
|
1557
|
+
private anchor;
|
|
1558
|
+
private select;
|
|
1559
|
+
/** Puts the fields' time on the value, or on today when nothing is picked yet. */
|
|
1560
|
+
private applyTime;
|
|
1561
|
+
private withTime;
|
|
1562
|
+
/** The time fields follow the value; with nothing picked they show `fallback` or now. */
|
|
1563
|
+
private syncTime;
|
|
1564
|
+
private showDate;
|
|
1565
|
+
/** `d` moved onto minDate's or maxDate's day when it lies outside them. */
|
|
1566
|
+
private clampDay;
|
|
1567
|
+
private yearAllowed;
|
|
1568
|
+
/** Whether a typed date may be picked: by day, month or year, and with a time inside minDate–maxDate. */
|
|
1569
|
+
private allowed;
|
|
1570
|
+
private sameUnit;
|
|
1571
|
+
private compareUnit;
|
|
1572
|
+
private normalize;
|
|
1573
|
+
}
|
|
1574
|
+
/** A Date from a Date, a timestamp or an ISO string; a date-only string (`2026-03-12`) is local midnight, not UTC. */
|
|
1575
|
+
declare function toDate(x: unknown): Date | null;
|
|
1576
|
+
|
|
1577
|
+
/** The errors of a form control, as Angular gives them (`{ required: true, minlength: { requiredLength: 8 } }`). */
|
|
1578
|
+
type ValidationErrorsLike = Record<string, unknown> | null | undefined;
|
|
1579
|
+
/**
|
|
1580
|
+
* The message for the first error of a control, in the locale's words:
|
|
1581
|
+
* `validationMessage({ minlength: { requiredLength: 8, actualLength: 3 } })` → `ต้องมีอย่างน้อย 8 ตัวอักษร`.
|
|
1582
|
+
* `overrides` (by error key) win over the locale; an error whose value is a string is used as its own message.
|
|
1583
|
+
*/
|
|
1584
|
+
declare function validationMessage(errors: ValidationErrorsLike, o?: {
|
|
1585
|
+
locale?: WuLocale;
|
|
1586
|
+
label?: string;
|
|
1587
|
+
overrides?: Partial<Record<string, string>>;
|
|
1588
|
+
}): string;
|
|
1589
|
+
/**
|
|
1590
|
+
* A Thai phone number: mobile (06, 08, 09 + 8 digits) or landline (02–07 + 7 digits), with or without
|
|
1591
|
+
* dashes and spaces, or +66 in place of the leading 0. Thai digits count.
|
|
1592
|
+
*/
|
|
1593
|
+
declare function isThaiPhone(value: string): boolean;
|
|
1594
|
+
|
|
1595
|
+
/** One row of a select list: an option, or the heading of a group (`group: true`). */
|
|
1596
|
+
interface SelectItem {
|
|
1597
|
+
option: unknown;
|
|
1598
|
+
label: string;
|
|
1599
|
+
value: unknown;
|
|
1600
|
+
disabled: boolean;
|
|
1601
|
+
/** Heading of a group of options; never picked. */
|
|
1602
|
+
group?: boolean;
|
|
1603
|
+
}
|
|
1604
|
+
/** Which fields of an option object hold its label, value and so on (`optionLabel="name_th"`). */
|
|
1605
|
+
interface SelectFields {
|
|
1606
|
+
label?: string | null;
|
|
1607
|
+
value?: string | null;
|
|
1608
|
+
disabled?: string | null;
|
|
1609
|
+
/** Options are groups (`{ label, items: [...] }`). */
|
|
1610
|
+
group?: boolean;
|
|
1611
|
+
groupLabel?: string | null;
|
|
1612
|
+
groupChildren?: string | null;
|
|
1613
|
+
}
|
|
1614
|
+
type SelectMatchMode = 'contains' | 'startsWith' | 'endsWith' | 'equals';
|
|
1615
|
+
/** A field of an option by path (`'name'`, `'address.city'`); the option itself when there is no path or it is not an object. */
|
|
1616
|
+
declare function optionField(option: unknown, path?: string | null): unknown;
|
|
1617
|
+
/** The rows a select shows, groups flattened into a heading followed by its options. */
|
|
1618
|
+
declare function selectItems(options: readonly unknown[] | null | undefined, f?: SelectFields): SelectItem[];
|
|
1619
|
+
/** Equal values: the same thing, the same `dataKey`, or objects / arrays / dates with equal contents. */
|
|
1620
|
+
declare function sameValue(a: unknown, b: unknown, dataKey?: string | null): boolean;
|
|
1621
|
+
/** Text to compare when searching: lower case, Thai digits as 0–9, runs of spaces as one, no zero-width characters. */
|
|
1622
|
+
declare function searchText(s: string): string;
|
|
1623
|
+
/**
|
|
1624
|
+
* Rows whose label (or the `filterBy` fields, comma separated as in `filterBy="name_th,code"`) match the query.
|
|
1625
|
+
* A group heading stays while any of its options matches.
|
|
1626
|
+
*/
|
|
1627
|
+
declare function filterItems(items: SelectItem[], query: string, filterBy?: string | null, mode?: SelectMatchMode): SelectItem[];
|
|
1628
|
+
/** The next pickable row from `from` in `step` direction (no wrapping), or `from` when there is none. */
|
|
1629
|
+
declare function stepIndex(items: SelectItem[], from: number, step: number): number;
|
|
1630
|
+
declare function firstIndex(items: SelectItem[]): number;
|
|
1631
|
+
declare function lastIndex(items: SelectItem[]): number;
|
|
1632
|
+
/** Index of the row holding `value`, or -1. */
|
|
1633
|
+
declare function indexOfValue(items: SelectItem[], value: unknown, dataKey?: string | null): number;
|
|
1634
|
+
/**
|
|
1635
|
+
* Type-to-find: the next pickable row after `from` whose label starts with `text`, wrapping round. Typing one letter
|
|
1636
|
+
* again cycles through the rows starting with it, as native selects do.
|
|
1637
|
+
*/
|
|
1638
|
+
declare function typeaheadIndex(items: SelectItem[], text: string, from: number): number;
|
|
1639
|
+
|
|
1640
|
+
/** One level of a multi-column sort. `order`: 1 ascending, -1 descending. */
|
|
1641
|
+
interface SortMeta {
|
|
1642
|
+
field: string;
|
|
1643
|
+
order: number;
|
|
1644
|
+
}
|
|
1645
|
+
type FilterMatchMode = SelectMatchMode | 'notContains' | 'notEquals' | 'lt' | 'lte' | 'gt' | 'gte' | 'in' | 'dateIs' | 'dateIsNot' | 'dateBefore' | 'dateAfter';
|
|
1646
|
+
/** A column filter: `{ value: 'ม.1', matchMode: 'equals' }`. In a list of rules, `operator` says how they combine. */
|
|
1647
|
+
interface FilterMeta {
|
|
1648
|
+
value: unknown;
|
|
1649
|
+
matchMode?: FilterMatchMode;
|
|
1650
|
+
operator?: 'and' | 'or';
|
|
1651
|
+
}
|
|
1652
|
+
/** One column's filter: a single rule, or rules combined by the first rule's `operator` (`and` by default). */
|
|
1653
|
+
type FilterRule = FilterMeta | FilterMeta[];
|
|
1654
|
+
/**
|
|
1655
|
+
* Compares two cell values the way people expect in a Thai table: numbers as numbers, dates by time, text in Thai
|
|
1656
|
+
* dictionary order with numbers inside it read as numbers ("ห้อง 2" before "ห้อง 10"). Empty values go last.
|
|
1657
|
+
*/
|
|
1658
|
+
declare function compareValues(a: unknown, b: unknown): number;
|
|
1659
|
+
/** Rows sorted by one or more fields (dot paths allowed). A new array; equal rows keep their order. */
|
|
1660
|
+
declare function sortRows<T>(rows: readonly T[], meta: readonly SortMeta[]): T[];
|
|
1661
|
+
/** Whether a cell value matches a filter value (text compared with searchText: case, Thai digits, spaces). */
|
|
1662
|
+
declare function matchValue(cell: unknown, filter: unknown, mode?: FilterMatchMode): boolean;
|
|
1663
|
+
/** Rows where any of `fields` (dot paths) matches the search text: the table's global search box. */
|
|
1664
|
+
declare function filterGlobal<T>(rows: readonly T[], value: string, fields: readonly string[], mode?: FilterMatchMode): T[];
|
|
1665
|
+
/** Rows that pass every column filter (`{ grade: { value: 'ม.1', matchMode: 'equals' } }`, or a list of rules). */
|
|
1666
|
+
declare function filterColumns<T>(rows: readonly T[], filters: Readonly<Record<string, FilterRule | undefined>>): T[];
|
|
1667
|
+
interface PageState {
|
|
1668
|
+
/** Index of the first row shown (0-based). */
|
|
1669
|
+
first: number;
|
|
1670
|
+
rows: number;
|
|
1671
|
+
totalRecords: number;
|
|
1672
|
+
}
|
|
1673
|
+
/** 0-based page number and page count; `first` is pulled back inside the data when rows were removed. */
|
|
1674
|
+
declare function pageInfo(s: PageState): {
|
|
1675
|
+
page: number;
|
|
1676
|
+
pageCount: number;
|
|
1677
|
+
first: number;
|
|
1678
|
+
last: number;
|
|
1679
|
+
};
|
|
1680
|
+
/** The page numbers (0-based) to show as links: `size` of them around the current page. */
|
|
1681
|
+
declare function pageLinks(page: number, pageCount: number, size?: number): number[];
|
|
1682
|
+
/**
|
|
1683
|
+
* The page report: `'กำลังแสดง {first} ถึง {last} จาก {totalRecords} รายการ'` → `กำลังแสดง 11 ถึง 20 จาก 57 รายการ`.
|
|
1684
|
+
* Placeholders: {first}, {last}, {rows}, {totalRecords}, {currentPage}, {totalPages}. Numbers get thousands separators.
|
|
1685
|
+
*/
|
|
1686
|
+
declare function pageReport(template: string, s: PageState): string;
|
|
1687
|
+
|
|
1688
|
+
/**
|
|
1689
|
+
* Excel files (.xlsx) without a dependency. A workbook is plain objects: sheets of rows of cells, each cell a value or
|
|
1690
|
+
* `{ value, formula, style, link, colSpan, rowSpan }`, plus column widths, merged ranges, frozen panes, a filter and print
|
|
1691
|
+
* settings. `buildExcel()` writes it as Office Open XML and zips it. Used by wu-table's `exportExcel()` and the
|
|
1692
|
+
* `@wirabyte/ui/excel` entry point.
|
|
1693
|
+
*
|
|
1694
|
+
* Strings stay text (leading zeros of phone numbers and Thai IDs survive, nothing turns into a formula), numbers stay
|
|
1695
|
+
* numbers, dates become Excel dates, and formulas are calculated by Excel when the file opens.
|
|
1696
|
+
*/
|
|
1697
|
+
type ExcelValue = string | number | boolean | Date | null | undefined;
|
|
1698
|
+
type ExcelBorderStyle = 'thin' | 'medium' | 'thick' | 'dashed' | 'dotted' | 'double' | 'hair' | 'mediumDashed' | 'dashDot' | 'mediumDashDot' | 'dashDotDot' | 'mediumDashDotDot' | 'slantDashDot';
|
|
1699
|
+
/** One border line: `{ style: 'thin', color: '#cbd5e1' }`. */
|
|
1700
|
+
interface ExcelBorderLine {
|
|
1701
|
+
style?: ExcelBorderStyle;
|
|
1702
|
+
color?: string;
|
|
1703
|
+
}
|
|
1704
|
+
/** Lines per side; a side left out (or `null`) has none. */
|
|
1705
|
+
interface ExcelBorders {
|
|
1706
|
+
top?: ExcelBorderStyle | ExcelBorderLine | null;
|
|
1707
|
+
right?: ExcelBorderStyle | ExcelBorderLine | null;
|
|
1708
|
+
bottom?: ExcelBorderStyle | ExcelBorderLine | null;
|
|
1709
|
+
left?: ExcelBorderStyle | ExcelBorderLine | null;
|
|
1710
|
+
}
|
|
1711
|
+
/** `'thin'` or `{ style, color }` draws all four sides; `{ top, bottom, … }` picks sides. */
|
|
1712
|
+
type ExcelBorder = ExcelBorderStyle | ExcelBorderLine | ExcelBorders;
|
|
1713
|
+
/**
|
|
1714
|
+
* How a cell looks, flat so it is quick to write: `{ bold: true, color: '#ffffff', fill: '#0f766e', align: 'center' }`.
|
|
1715
|
+
* Colours are `#rgb` or `#rrggbb`. `format` is an Excel number format: `'#,##0.00'`, `'0%'`, `'dd/mm/yyyy'`, `'@'` (text).
|
|
1716
|
+
*/
|
|
1717
|
+
interface ExcelStyle {
|
|
1718
|
+
fontName?: string;
|
|
1719
|
+
/** Points. */
|
|
1720
|
+
fontSize?: number;
|
|
1721
|
+
bold?: boolean;
|
|
1722
|
+
italic?: boolean;
|
|
1723
|
+
underline?: boolean;
|
|
1724
|
+
strike?: boolean;
|
|
1725
|
+
/** Text colour. */
|
|
1726
|
+
color?: string;
|
|
1727
|
+
/** Background colour. */
|
|
1728
|
+
fill?: string;
|
|
1729
|
+
border?: ExcelBorder;
|
|
1730
|
+
align?: 'left' | 'center' | 'right' | 'justify' | 'fill' | 'centerContinuous' | 'distributed';
|
|
1731
|
+
valign?: 'top' | 'middle' | 'bottom' | 'justify' | 'distributed';
|
|
1732
|
+
/** Wrap long text onto more lines. */
|
|
1733
|
+
wrap?: boolean;
|
|
1734
|
+
/** Shrink the text to fit the cell. */
|
|
1735
|
+
shrink?: boolean;
|
|
1736
|
+
indent?: number;
|
|
1737
|
+
/** Degrees, -90 … 90. */
|
|
1738
|
+
rotate?: number;
|
|
1739
|
+
format?: string;
|
|
1740
|
+
}
|
|
1741
|
+
/**
|
|
1742
|
+
* A cell with more than a value. `formula` is written without or with the leading `=` (`'SUM(B2:B9)'`) and Excel
|
|
1743
|
+
* calculates it on open; `value` is then the result shown until it does. `colSpan` / `rowSpan` merge it with the cells to
|
|
1744
|
+
* its right / below, like an HTML table: the next cells of the row continue after the span. `link` is a URL, or
|
|
1745
|
+
* `'#Sheet 2!A1'` for a place in the workbook.
|
|
1746
|
+
*/
|
|
1747
|
+
interface ExcelCell {
|
|
1748
|
+
value?: ExcelValue;
|
|
1749
|
+
formula?: string;
|
|
1750
|
+
style?: ExcelStyle;
|
|
1751
|
+
link?: string;
|
|
1752
|
+
colSpan?: number;
|
|
1753
|
+
rowSpan?: number;
|
|
1754
|
+
}
|
|
1755
|
+
type ExcelCellInput = ExcelValue | ExcelCell;
|
|
1756
|
+
/** A row with options; a plain array is a row of cells. `height` is in points. */
|
|
1757
|
+
interface ExcelRow {
|
|
1758
|
+
cells: ExcelCellInput[];
|
|
1759
|
+
height?: number;
|
|
1760
|
+
style?: ExcelStyle;
|
|
1761
|
+
hidden?: boolean;
|
|
1762
|
+
}
|
|
1763
|
+
/** `width` is in characters (Excel's unit). `style` applies to the cells written in the column. */
|
|
1764
|
+
interface ExcelColumn {
|
|
1765
|
+
width?: number;
|
|
1766
|
+
style?: ExcelStyle;
|
|
1767
|
+
hidden?: boolean;
|
|
1768
|
+
}
|
|
1769
|
+
interface ExcelSheet {
|
|
1770
|
+
/** Tab name (made valid: at most 31 characters, none of `[]:*?/\`, unique in the workbook). */
|
|
1771
|
+
name?: string;
|
|
1772
|
+
/** From A1 down. */
|
|
1773
|
+
rows: (ExcelCellInput[] | ExcelRow)[];
|
|
1774
|
+
/** Per column from A: options, or just the width. */
|
|
1775
|
+
columns?: (ExcelColumn | number | null | undefined)[];
|
|
1776
|
+
/** More merged ranges: `['A1:D1']`. */
|
|
1777
|
+
merges?: string[];
|
|
1778
|
+
/** The first cell that scrolls: `'A2'` keeps row 1 in view, `'B3'` rows 1–2 and column A. */
|
|
1779
|
+
freeze?: string;
|
|
1780
|
+
/** Filter buttons on a range: `'A1:F20'`. */
|
|
1781
|
+
autoFilter?: string;
|
|
1782
|
+
/** Give columns without a width one from their content. Default true. */
|
|
1783
|
+
autoWidth?: boolean;
|
|
1784
|
+
tabColor?: string;
|
|
1785
|
+
/** Show the grid lines. Default true. */
|
|
1786
|
+
gridLines?: boolean;
|
|
1787
|
+
/** Print across rather than down. */
|
|
1788
|
+
landscape?: boolean;
|
|
1789
|
+
/** Print all columns on one page width. */
|
|
1790
|
+
fitToWidth?: boolean;
|
|
1791
|
+
paper?: 'A4' | 'A3' | 'A5' | 'letter' | 'legal';
|
|
1792
|
+
/** Rows printed at the top of every page: `'1:1'`. */
|
|
1793
|
+
repeatRows?: string;
|
|
1794
|
+
}
|
|
1795
|
+
interface ExcelWorkbook {
|
|
1796
|
+
sheets: ExcelSheet[];
|
|
1797
|
+
/** Font of the whole workbook. Default Calibri 11. */
|
|
1798
|
+
fontName?: string;
|
|
1799
|
+
fontSize?: number;
|
|
1800
|
+
/** Number format of dates without a time. Default `dd/mm/yyyy`. */
|
|
1801
|
+
dateFormat?: string;
|
|
1802
|
+
/** Number format of dates with a time. Default `dd/mm/yyyy hh:mm`. */
|
|
1803
|
+
dateTimeFormat?: string;
|
|
1804
|
+
/** `'buddhist'` shows the years of the default date formats in พ.ศ. (the cells stay real dates). */
|
|
1805
|
+
calendar?: 'gregorian' | 'buddhist';
|
|
1806
|
+
}
|
|
1807
|
+
/** MIME type of .xlsx files. */
|
|
1808
|
+
declare const EXCEL_MIME = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
1809
|
+
/** `0` → `A`, `25` → `Z`, `26` → `AA`. */
|
|
1810
|
+
declare function excelColumnName(index: number): string;
|
|
1811
|
+
/** Zero-based row and column → `'B3'`. */
|
|
1812
|
+
declare function excelRef(row: number, column: number): string;
|
|
1813
|
+
/** `'B3'` → `{ row: 2, column: 1 }` (zero-based); `null` when it is not a cell reference. */
|
|
1814
|
+
declare function excelParseRef(ref: string): {
|
|
1815
|
+
row: number;
|
|
1816
|
+
column: number;
|
|
1817
|
+
} | null;
|
|
1818
|
+
/** `'A1:D1'` → zero-based corners, in order; a single cell is a range of one. */
|
|
1819
|
+
declare function excelParseRange(range: string): {
|
|
1820
|
+
top: number;
|
|
1821
|
+
left: number;
|
|
1822
|
+
bottom: number;
|
|
1823
|
+
right: number;
|
|
1824
|
+
} | null;
|
|
1825
|
+
/** Days since 1899-12-30 in local time, as Excel stores dates. */
|
|
1826
|
+
declare function excelDateNumber(date: Date): number;
|
|
1827
|
+
/** `#rgb`, `#rrggbb`, `rrggbb` or `rgb(r, g, b)` → Excel's `FFRRGGBB`; anything else → undefined. */
|
|
1828
|
+
declare function excelColor(color: string | null | undefined): string | undefined;
|
|
1829
|
+
/** Later styles win, key by key; borders merge side by side. */
|
|
1830
|
+
declare function mergeExcelStyles(...styles: (ExcelStyle | null | undefined)[]): ExcelStyle;
|
|
1831
|
+
/** Valid, unique tab names: `[]:*?/\` removed, at most 31 characters, `Sheet1` … when empty. */
|
|
1832
|
+
declare function excelSheetNames(names: (string | undefined)[]): string[];
|
|
1833
|
+
/**
|
|
1834
|
+
* The XML files of a workbook, by path inside the zip. `buildExcel()` zips them; they are separate for tests and for
|
|
1835
|
+
* tools that want to look inside.
|
|
1836
|
+
*/
|
|
1837
|
+
declare function excelParts(source: ExcelWorkbook | ExcelSheet): Record<string, string>;
|
|
1838
|
+
/** CRC-32 as ZIP files use it. */
|
|
1839
|
+
declare function crc32(data: Uint8Array): number;
|
|
1840
|
+
interface ZipEntry {
|
|
1841
|
+
name: string;
|
|
1842
|
+
data: Uint8Array;
|
|
1843
|
+
}
|
|
1844
|
+
/** A ZIP archive of the entries, deflated where the platform can (and it helps), else stored. */
|
|
1845
|
+
declare function zipFiles(entries: ZipEntry[], options?: {
|
|
1846
|
+
compress?: boolean;
|
|
1847
|
+
date?: Date;
|
|
1848
|
+
}): Promise<Uint8Array>;
|
|
1849
|
+
/** A ZIP archive of the entries, stored without compression. */
|
|
1850
|
+
declare function zipFilesSync(entries: ZipEntry[], options?: {
|
|
1851
|
+
date?: Date;
|
|
1852
|
+
}): Uint8Array;
|
|
1853
|
+
/** The .xlsx file of a workbook (or of one sheet), compressed where the platform can. */
|
|
1854
|
+
declare function buildExcel(source: ExcelWorkbook | ExcelSheet): Promise<Uint8Array>;
|
|
1855
|
+
/** The .xlsx file without compression, without waiting (bigger; for tools and tests). */
|
|
1856
|
+
declare function buildExcelSync(source: ExcelWorkbook | ExcelSheet): Uint8Array;
|
|
1857
|
+
type ExcelTotal = 'sum' | 'average' | 'count' | 'min' | 'max';
|
|
1858
|
+
/** A column of `excelSheetFromRows()`. */
|
|
1859
|
+
interface ExcelTableColumn {
|
|
1860
|
+
/** Dot path into each row: `'name'`, `'address.province'`. */
|
|
1861
|
+
field: string;
|
|
1862
|
+
header?: string;
|
|
1863
|
+
/** Characters. Default: from the content. */
|
|
1864
|
+
width?: number;
|
|
1865
|
+
/** Number format of the cells: `'#,##0.00'`, `'0%'`, `'dd/mm/yyyy'`. */
|
|
1866
|
+
format?: string;
|
|
1867
|
+
/** Style of the column's body cells. */
|
|
1868
|
+
style?: ExcelStyle;
|
|
1869
|
+
/** What the total row shows here: a function over the column, a fixed value or a cell. */
|
|
1870
|
+
total?: ExcelTotal | ExcelCell | ExcelValue;
|
|
1871
|
+
}
|
|
1872
|
+
/** What `cellStyle` gets for each body cell. */
|
|
1873
|
+
interface ExcelTableCellContext<T = unknown> {
|
|
1874
|
+
row: T;
|
|
1875
|
+
/** Zero-based position among the exported rows. */
|
|
1876
|
+
rowIndex: number;
|
|
1877
|
+
field: string;
|
|
1878
|
+
value: unknown;
|
|
1879
|
+
}
|
|
1880
|
+
/** Where things landed, for `customize` and for formulas of your own (rows are Excel's, from 1). */
|
|
1881
|
+
interface ExcelTableLayout {
|
|
1882
|
+
headerRow: number;
|
|
1883
|
+
/** First and last data row; `lastRow < firstRow` when there are none. */
|
|
1884
|
+
firstRow: number;
|
|
1885
|
+
lastRow: number;
|
|
1886
|
+
totalRow: number | null;
|
|
1887
|
+
/** The column letter of a field: `layout.column('amount')` → `'D'`. */
|
|
1888
|
+
column(field: string): string;
|
|
1889
|
+
}
|
|
1890
|
+
interface ExcelTableOptions<T = unknown> {
|
|
1891
|
+
sheetName?: string;
|
|
1892
|
+
/** A title above the table, merged across it. */
|
|
1893
|
+
title?: string | ExcelCell;
|
|
1894
|
+
/** A second line under the title. */
|
|
1895
|
+
subtitle?: string | ExcelCell;
|
|
1896
|
+
headerStyle?: ExcelStyle;
|
|
1897
|
+
/** Style of every body cell (before column and `cellStyle` styles). */
|
|
1898
|
+
bodyStyle?: ExcelStyle;
|
|
1899
|
+
/** Shade every other row; a colour picks the shade. */
|
|
1900
|
+
striped?: boolean | string;
|
|
1901
|
+
/** Thin lines around every cell; a colour picks it. Default true. */
|
|
1902
|
+
borders?: boolean | string;
|
|
1903
|
+
/** Style of one body cell, e.g. red text for a negative amount. */
|
|
1904
|
+
cellStyle?: (cell: ExcelTableCellContext<T>) => ExcelStyle | null | undefined | void;
|
|
1905
|
+
/** Style of one body row. */
|
|
1906
|
+
rowStyle?: (row: T, rowIndex: number) => ExcelStyle | null | undefined | void;
|
|
1907
|
+
/** Totals by field, added to the columns' own `total`: `{ amount: 'sum', qty: 'sum' }`. */
|
|
1908
|
+
totals?: Record<string, ExcelTotal | ExcelCell | ExcelValue>;
|
|
1909
|
+
/** Text in the first column of the total row when that column has no total. Default `Total`. */
|
|
1910
|
+
totalLabel?: string;
|
|
1911
|
+
totalStyle?: ExcelStyle;
|
|
1912
|
+
/** Keep the header in view while scrolling. Default true. */
|
|
1913
|
+
freezeHeader?: boolean;
|
|
1914
|
+
/** Filter buttons on the header. Default true. */
|
|
1915
|
+
autoFilter?: boolean;
|
|
1916
|
+
/** The value a cell exports (before styles). Default: the field's value. */
|
|
1917
|
+
value?: (row: T, field: string, raw: unknown) => ExcelValue;
|
|
1918
|
+
/** Last word on the sheet: add rows, merges, formulas, print settings. */
|
|
1919
|
+
customize?: (sheet: ExcelSheet, layout: ExcelTableLayout) => void;
|
|
1920
|
+
}
|
|
1921
|
+
/**
|
|
1922
|
+
* A sheet from rows of objects, styled like a report: optional title, bold shaded header with filter buttons that stays
|
|
1923
|
+
* in view, thin borders, widths from the content, number formats per column and a total row of SUBTOTAL formulas (they
|
|
1924
|
+
* follow the filter).
|
|
1925
|
+
*/
|
|
1926
|
+
declare function excelSheetFromRows<T = unknown>(rows: readonly T[], columns: readonly ExcelTableColumn[], options?: ExcelTableOptions<T>): ExcelSheet;
|
|
1927
|
+
|
|
1928
|
+
/** What the menu helpers read from an item (the MenuItem shape apps already use). */
|
|
1929
|
+
interface MenuItemLike {
|
|
1930
|
+
label?: string;
|
|
1931
|
+
disabled?: boolean;
|
|
1932
|
+
visible?: boolean;
|
|
1933
|
+
separator?: boolean;
|
|
1934
|
+
items?: readonly MenuItemLike[] | null;
|
|
1935
|
+
}
|
|
1936
|
+
/** The items to draw: `visible: false` ones are left out. */
|
|
1937
|
+
declare function menuVisible<T extends MenuItemLike>(items: readonly T[] | null | undefined): T[];
|
|
1938
|
+
/** Items the keyboard can land on: not separators, not disabled. */
|
|
1939
|
+
declare function menuFocusable(item: MenuItemLike | undefined): boolean;
|
|
1940
|
+
/** Whether the item opens a submenu (it has at least one item to show). */
|
|
1941
|
+
declare function menuHasSubmenu(item: MenuItemLike | undefined): boolean;
|
|
1942
|
+
/** Next (dir 1) or previous (dir -1) focusable item, wrapping round; -1 when there is none. */
|
|
1943
|
+
declare function menuStep(items: readonly MenuItemLike[], from: number, dir: 1 | -1): number;
|
|
1944
|
+
declare function menuFirst(items: readonly MenuItemLike[]): number;
|
|
1945
|
+
declare function menuLast(items: readonly MenuItemLike[]): number;
|
|
1946
|
+
/**
|
|
1947
|
+
* The item a typed letter moves to: the next one whose label starts with it, after `from`, wrapping round.
|
|
1948
|
+
* Thai labels match as typed (and Thai digits as 0–9); pressing the same letter again cycles through the matches.
|
|
1949
|
+
*/
|
|
1950
|
+
declare function menuTypeahead(items: readonly MenuItemLike[], text: string, from: number): number;
|
|
1951
|
+
/** Path keys: `"2"` is the third root item, `"2_0"` the first item of its submenu. */
|
|
1952
|
+
declare function menuKey(parent: string, index: number): string;
|
|
1953
|
+
/** `"2_0_1"` → `["2", "2_0", "2_0_1"]`: the key and every key above it. */
|
|
1954
|
+
declare function menuKeyPath(key: string): string[];
|
|
1955
|
+
/** The item a key points at, walking the visible items; undefined when the menu changed under it. */
|
|
1956
|
+
declare function menuItemAt<T extends MenuItemLike>(items: readonly T[] | null | undefined, key: string): T | undefined;
|
|
1957
|
+
|
|
1958
|
+
/**
|
|
1959
|
+
* Input masks in the familiar notation: `9` a digit, `a` a letter, `*` a letter or digit, `?` starts the optional
|
|
1960
|
+
* part, anything else is a literal typed for the user (`9-9999-99999-99-9`, `999-999-9999`, `(99) 9999-9999`).
|
|
1961
|
+
* Framework-free: wu-inputmask keeps a buffer with these helpers and the browser's input value in step with it.
|
|
1962
|
+
*/
|
|
1963
|
+
interface MaskSlot {
|
|
1964
|
+
/** A literal character the mask writes itself; undefined for a slot the user fills. */
|
|
1965
|
+
literal?: string;
|
|
1966
|
+
/** What a user-filled slot accepts. */
|
|
1967
|
+
test?: RegExp;
|
|
1968
|
+
/** At or after the `?`: not needed for the value to be complete. */
|
|
1969
|
+
optional: boolean;
|
|
1970
|
+
}
|
|
1971
|
+
interface MaskDefinitions {
|
|
1972
|
+
/** Pattern for `a` (default `[A-Za-z]`; e.g. `[A-Za-zก-๙]` to allow Thai). */
|
|
1973
|
+
characterPattern?: string;
|
|
1974
|
+
}
|
|
1975
|
+
/** Splits a mask into slots. */
|
|
1976
|
+
declare function parseMask(mask: string | null | undefined, defs?: MaskDefinitions): MaskSlot[];
|
|
1977
|
+
/** Characters typed into the slots, in order (literals are not stored). */
|
|
1978
|
+
type MaskBuffer = (string | null)[];
|
|
1979
|
+
/**
|
|
1980
|
+
* Reads text into the slots, the way typing it would: characters that fit the next slot fill it, characters equal to
|
|
1981
|
+
* the literal at that place are skipped over, anything else is dropped. Used for typing, pasting and model values.
|
|
1982
|
+
*/
|
|
1983
|
+
declare function fillMask(slots: MaskSlot[], text: string | null | undefined): MaskBuffer;
|
|
1984
|
+
/**
|
|
1985
|
+
* The text shown in the field. While editing (`focused`) empty slots show `slotChar`; otherwise the text stops after
|
|
1986
|
+
* the last filled slot (and the literals that follow it), and an empty buffer is ''.
|
|
1987
|
+
*/
|
|
1988
|
+
declare function formatMask(slots: MaskSlot[], buffer: MaskBuffer, slotChar?: string, focused?: boolean): string;
|
|
1989
|
+
/** The typed characters only (`unmask`). */
|
|
1990
|
+
declare function unmaskedValue(slots: MaskSlot[], buffer: MaskBuffer): string;
|
|
1991
|
+
/** Every required slot is filled. */
|
|
1992
|
+
declare function maskComplete(slots: MaskSlot[], buffer: MaskBuffer): boolean;
|
|
1993
|
+
/** Nothing typed yet. */
|
|
1994
|
+
declare function maskEmpty(buffer: MaskBuffer): boolean;
|
|
1995
|
+
/** Index of the last filled slot, -1 when none. */
|
|
1996
|
+
declare function lastFilled(slots: MaskSlot[], buffer: MaskBuffer): number;
|
|
1997
|
+
/** Caret position after `count` typed characters: past that many filled slots and the literals right after them. */
|
|
1998
|
+
declare function caretAfter(slots: MaskSlot[], count: number): number;
|
|
1999
|
+
/** How many characters of `text` before `caret` would land in slots (to keep the caret in place after reformatting). */
|
|
2000
|
+
declare function typedBefore(slots: MaskSlot[], text: string, caret: number): number;
|
|
2001
|
+
|
|
2002
|
+
/**
|
|
2003
|
+
* Lists the user orders by hand: wu-picklist (two lists, items move between them) and wu-orderlist (one list).
|
|
2004
|
+
* The arrays are changed in place, as apps expect: they bind `[source]="available"` and read `available` again in
|
|
2005
|
+
* `(onMoveToTarget)`.
|
|
2006
|
+
*/
|
|
2007
|
+
/** How two items are told apart: the same object, or the same `dataKey` field when one is given. */
|
|
2008
|
+
type ListSame<T = unknown> = (a: T, b: T) => boolean;
|
|
2009
|
+
declare function listSame<T = unknown>(dataKey?: string | null): ListSame<T>;
|
|
2010
|
+
/** Indexes in `list` of the `selected` items, in list order. */
|
|
2011
|
+
declare function listIndexes<T>(list: readonly T[], selected: readonly T[], same?: ListSame<T>): number[];
|
|
2012
|
+
/** The `selected` items in the order they have in `list` (the order they move in). */
|
|
2013
|
+
declare function inListOrder<T>(list: readonly T[], selected: readonly T[], same?: ListSame<T>): T[];
|
|
2014
|
+
/** Moves the selected items one place up; a block already at the top stays. Returns whether anything moved. */
|
|
2015
|
+
declare function moveUp<T>(list: T[], selected: readonly T[], same?: ListSame<T>): boolean;
|
|
2016
|
+
/** Moves the selected items one place down; a block already at the bottom stays. */
|
|
2017
|
+
declare function moveDown<T>(list: T[], selected: readonly T[], same?: ListSame<T>): boolean;
|
|
2018
|
+
/** Moves the selected items to the top, keeping their order. */
|
|
2019
|
+
declare function moveTop<T>(list: T[], selected: readonly T[], same?: ListSame<T>): boolean;
|
|
2020
|
+
/** Moves the selected items to the bottom, keeping their order. */
|
|
2021
|
+
declare function moveBottom<T>(list: T[], selected: readonly T[], same?: ListSame<T>): boolean;
|
|
2022
|
+
/**
|
|
2023
|
+
* Takes `items` out of `from` and puts them into `to` at `at` (the end by default), in the order they had in `from`.
|
|
2024
|
+
* Returns the items that moved.
|
|
2025
|
+
*/
|
|
2026
|
+
declare function transferItems<T>(from: T[], to: T[], items: readonly T[], at?: number, same?: ListSame<T>): T[];
|
|
2027
|
+
/**
|
|
2028
|
+
* Drag and drop inside one list: puts `items` before the item at `at` (an index counted before they were taken out;
|
|
2029
|
+
* `list.length` = the end). Returns whether the order changed.
|
|
2030
|
+
*/
|
|
2031
|
+
declare function moveItemsTo<T>(list: T[], items: readonly T[], at: number, same?: ListSame<T>): boolean;
|
|
2032
|
+
/** Fields to search, from `filterBy="name,code"`. */
|
|
2033
|
+
declare function listFilterFields(filterBy?: string | null): string[];
|
|
2034
|
+
/** Items matching the search box: any `filterBy` field (dot paths), or every top-level value when none is given. */
|
|
2035
|
+
declare function filterListItems<T>(items: readonly T[], query: string, filterBy?: string | null, mode?: FilterMatchMode): T[];
|
|
2036
|
+
/**
|
|
2037
|
+
* One list's selection, search and keyboard focus. The list itself stays the app's array; `visible()` is what the
|
|
2038
|
+
* search leaves. Selection follows the two habits apps know: a click toggles an item, or (`metaKey` selection, the
|
|
2039
|
+
* classic default) a click picks only that item and Ctrl / ⌘ + click adds to it.
|
|
2040
|
+
*/
|
|
2041
|
+
declare class ListState<T = unknown> {
|
|
2042
|
+
private readonly source;
|
|
2043
|
+
private readonly options;
|
|
2044
|
+
selection: T[];
|
|
2045
|
+
query: string;
|
|
2046
|
+
/** Index in the full list of the item the keyboard is on, -1 for none. */
|
|
2047
|
+
focus: number;
|
|
2048
|
+
private anchor;
|
|
2049
|
+
private cache;
|
|
2050
|
+
constructor(source: () => readonly T[], options?: () => {
|
|
2051
|
+
filterBy?: string | null;
|
|
2052
|
+
matchMode?: FilterMatchMode;
|
|
2053
|
+
dataKey?: string | null;
|
|
2054
|
+
});
|
|
2055
|
+
get list(): readonly T[];
|
|
2056
|
+
get same(): ListSame<T>;
|
|
2057
|
+
/** Items the search leaves, in list order. */
|
|
2058
|
+
visible(): T[];
|
|
2059
|
+
isVisible(item: T): boolean;
|
|
2060
|
+
/** Forget the cached search result (after the list changed in place). */
|
|
2061
|
+
touch(): void;
|
|
2062
|
+
isSelected(item: T): boolean;
|
|
2063
|
+
/** Selected items still in the list and visible, in list order: what the move buttons act on. */
|
|
2064
|
+
selectedVisible(): T[];
|
|
2065
|
+
/** A click (or Space / Enter) on `item`. Returns whether the selection changed. */
|
|
2066
|
+
pick(item: T, how?: {
|
|
2067
|
+
metaKeySelection?: boolean;
|
|
2068
|
+
meta?: boolean;
|
|
2069
|
+
shift?: boolean;
|
|
2070
|
+
}): boolean;
|
|
2071
|
+
/** Ctrl / ⌘ + A: every visible item, or none when they all are already. */
|
|
2072
|
+
toggleAll(): void;
|
|
2073
|
+
/** Drop items that left the list (moved away or removed by the app). */
|
|
2074
|
+
prune(): void;
|
|
2075
|
+
/** Keyboard focus: the next / previous visible item from the current one (-1 when the list shows nothing). */
|
|
2076
|
+
step(dir: 1 | -1): number;
|
|
2077
|
+
/** First (1) or last (-1) visible item, -1 when none. */
|
|
2078
|
+
edge(dir: 1 | -1): number;
|
|
2079
|
+
/** Where the keyboard lands when the list gets focus: the first selected visible item, else the first visible. */
|
|
2080
|
+
enter(): number;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
/** What wu-fileupload needs to know about a file; a browser `File` fits. */
|
|
2084
|
+
interface FileLike {
|
|
2085
|
+
name: string;
|
|
2086
|
+
size: number;
|
|
2087
|
+
type: string;
|
|
2088
|
+
lastModified?: number;
|
|
2089
|
+
}
|
|
2090
|
+
/**
|
|
2091
|
+
* Whether a file passes an `accept` list as the file input reads it: extensions (`.xlsx, .xls`), MIME types
|
|
2092
|
+
* (`application/pdf`) and families (`image/*`), comma separated. No list accepts everything.
|
|
2093
|
+
*/
|
|
2094
|
+
declare function acceptsFile(file: FileLike, accept?: string | null): boolean;
|
|
2095
|
+
/** Sizes as people read them: `512 B`, `1.5 KB`, `10 MB` (1 KB = 1024 bytes, up to two decimals). */
|
|
2096
|
+
declare function formatFileSize(bytes: number, units?: readonly string[]): string;
|
|
2097
|
+
type FileProblem = 'type' | 'size';
|
|
2098
|
+
/** Why a file cannot be added (`'type'` outside `accept`, `'size'` over `maxFileSize` bytes), or null when it can. */
|
|
2099
|
+
declare function checkFile(file: FileLike, rules: {
|
|
2100
|
+
accept?: string | null;
|
|
2101
|
+
maxFileSize?: number | null;
|
|
2102
|
+
}): FileProblem | null;
|
|
2103
|
+
/** The same file picked again: same name, size and type. */
|
|
2104
|
+
declare function sameFile(a: FileLike, b: FileLike): boolean;
|
|
2105
|
+
/** Whether a file is a picture a browser can show as a thumbnail. */
|
|
2106
|
+
declare function isImageFile(file: FileLike): boolean;
|
|
2107
|
+
|
|
2108
|
+
/**
|
|
2109
|
+
* Framework-free parts of wu-editor: the toolbar vocabulary and its presets, per-tool options, the undo history,
|
|
2110
|
+
* and helpers for the HTML value. The editing itself (DOM, selection) lives in the Angular entry.
|
|
2111
|
+
*/
|
|
2112
|
+
/** Every tool the toolbar can show. */
|
|
2113
|
+
type EditorTool = 'undo' | 'redo' | 'heading' | 'fontSize' | 'fontFamily' | 'bold' | 'italic' | 'underline' | 'strike' | 'subscript' | 'superscript' | 'code' | 'color' | 'highlight' | 'bulletList' | 'orderedList' | 'indent' | 'outdent' | 'align' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'link' | 'image' | 'table' | 'blockquote' | 'codeBlock' | 'hr' | 'clear' | 'source' | 'fullscreen';
|
|
2114
|
+
declare const EDITOR_TOOLS: readonly EditorTool[];
|
|
2115
|
+
type EditorToolbarPreset = 'basic' | 'standard' | 'full' | 'none';
|
|
2116
|
+
/**
|
|
2117
|
+
* What the `toolbar` input takes: a preset name, a flat list with `'|'` between groups
|
|
2118
|
+
* (`['bold', 'italic', '|', 'bulletList', 'orderedList']`), or a list of groups (`[['bold', 'italic'], ['link']]`).
|
|
2119
|
+
*/
|
|
2120
|
+
type EditorToolbar = EditorToolbarPreset | ReadonlyArray<EditorTool | '|'> | ReadonlyArray<ReadonlyArray<EditorTool>>;
|
|
2121
|
+
declare const EDITOR_TOOLBARS: Record<Exclude<EditorToolbarPreset, 'none'>, EditorTool[][]>;
|
|
2122
|
+
/** The toolbar as groups of known tools: presets expanded, `'|'` splitting groups, unknown names and empty groups left out. */
|
|
2123
|
+
declare function editorToolbarGroups(toolbar: EditorToolbar | null | undefined, fallback?: EditorToolbarPreset): EditorTool[][];
|
|
2124
|
+
interface EditorOption {
|
|
2125
|
+
label: string;
|
|
2126
|
+
value: string;
|
|
2127
|
+
}
|
|
2128
|
+
/** Fine-grained settings of each tool (`[toolOptions]`), all optional. */
|
|
2129
|
+
interface EditorToolOptions {
|
|
2130
|
+
/** Block styles of the heading menu: 0 = paragraph, 1–6 = heading levels. Default all: [0, 1, 2, 3, 4, 5, 6]. */
|
|
2131
|
+
headings?: number[];
|
|
2132
|
+
/** Other block styles at the end of the same menu. Default both: `['blockquote', 'codeBlock']`; `[]` for none. */
|
|
2133
|
+
blocks?: Array<'blockquote' | 'codeBlock'>;
|
|
2134
|
+
/** Font sizes (CSS sizes). Default small / normal / large / huge as 0.75em, 1em, 1.5em, 2.5em. */
|
|
2135
|
+
fontSizes?: EditorOption[];
|
|
2136
|
+
/** Font families (CSS font-family values). */
|
|
2137
|
+
fontFamilies?: EditorOption[];
|
|
2138
|
+
/** Text colours offered by the colour tool. */
|
|
2139
|
+
colors?: string[];
|
|
2140
|
+
/** Highlight colours. */
|
|
2141
|
+
highlights?: string[];
|
|
2142
|
+
/** Alignment choices of the align menu. Default all four. */
|
|
2143
|
+
alignments?: Array<'left' | 'center' | 'right' | 'justify'>;
|
|
2144
|
+
/** Table insert grid size and whether new tables get a header row. */
|
|
2145
|
+
table?: {
|
|
2146
|
+
rows?: number;
|
|
2147
|
+
cols?: number;
|
|
2148
|
+
headerRow?: boolean;
|
|
2149
|
+
};
|
|
2150
|
+
/** Links: open in a new tab by default; extra protocols allowed besides http(s), mailto, tel. */
|
|
2151
|
+
link?: {
|
|
2152
|
+
newTab?: boolean;
|
|
2153
|
+
protocols?: string[];
|
|
2154
|
+
};
|
|
2155
|
+
}
|
|
2156
|
+
declare const EDITOR_COLORS: string[];
|
|
2157
|
+
declare const EDITOR_HIGHLIGHTS: string[];
|
|
2158
|
+
/** Options with every default filled in. */
|
|
2159
|
+
declare function editorToolOptions(o: EditorToolOptions | null | undefined): Required<Omit<EditorToolOptions, 'table' | 'link'>> & {
|
|
2160
|
+
table: {
|
|
2161
|
+
rows: number;
|
|
2162
|
+
cols: number;
|
|
2163
|
+
headerRow: boolean;
|
|
2164
|
+
};
|
|
2165
|
+
link: {
|
|
2166
|
+
newTab: boolean;
|
|
2167
|
+
protocols: string[];
|
|
2168
|
+
};
|
|
2169
|
+
};
|
|
2170
|
+
/** Font sizes Quill offered (`ql-size-small` …), the defaults of the font-size tool. */
|
|
2171
|
+
declare const EDITOR_FONT_SIZES: EditorOption[];
|
|
2172
|
+
/**
|
|
2173
|
+
* Whether a link is safe to keep: http(s), mailto, tel, relative paths and anchors, plus any extra protocols the
|
|
2174
|
+
* app allows. `javascript:` and the like are not.
|
|
2175
|
+
*/
|
|
2176
|
+
declare function safeEditorUrl(url: string, extra?: readonly string[]): boolean;
|
|
2177
|
+
/** Whether an image source is allowed: http(s), relative, blob, or an image data URL. */
|
|
2178
|
+
declare function safeEditorImage(src: string): boolean;
|
|
2179
|
+
/** An editor value that holds nothing a reader would see: no text, no image, table or rule. */
|
|
2180
|
+
declare function isEmptyEditorHtml(html: string | null | undefined): boolean;
|
|
2181
|
+
/** Plain text of an HTML value, blocks on their own lines (for `textValue`, counters and search). */
|
|
2182
|
+
declare function editorHtmlToText(html: string | null | undefined): string;
|
|
2183
|
+
/** Words and characters of a text, counting Thai runs (which have no spaces) by character. */
|
|
2184
|
+
declare function editorCounts(text: string): {
|
|
2185
|
+
characters: number;
|
|
2186
|
+
words: number;
|
|
2187
|
+
};
|
|
2188
|
+
/** One step of the undo history: the HTML and where the caret was (paths of node indexes from the root). */
|
|
2189
|
+
interface EditorSnapshot {
|
|
2190
|
+
html: string;
|
|
2191
|
+
selection?: {
|
|
2192
|
+
start: number[];
|
|
2193
|
+
startOffset: number;
|
|
2194
|
+
end: number[];
|
|
2195
|
+
endOffset: number;
|
|
2196
|
+
} | null;
|
|
2197
|
+
}
|
|
2198
|
+
/**
|
|
2199
|
+
* Undo / redo for wu-editor. Typing is grouped: snapshots pushed within `mergeMs` of each other with `merge: true`
|
|
2200
|
+
* replace the newest step instead of adding one, so one undo removes a burst of typing.
|
|
2201
|
+
*/
|
|
2202
|
+
declare class EditorHistory {
|
|
2203
|
+
private readonly limit;
|
|
2204
|
+
private readonly mergeMs;
|
|
2205
|
+
private stack;
|
|
2206
|
+
private index;
|
|
2207
|
+
private lastPush;
|
|
2208
|
+
constructor(limit?: number, mergeMs?: number);
|
|
2209
|
+
get canUndo(): boolean;
|
|
2210
|
+
get canRedo(): boolean;
|
|
2211
|
+
get current(): EditorSnapshot | null;
|
|
2212
|
+
/** Starts over from one state (a new value from the app). */
|
|
2213
|
+
reset(s: EditorSnapshot): void;
|
|
2214
|
+
/** Records a state after a change. Returns false when nothing changed. */
|
|
2215
|
+
push(s: EditorSnapshot, opts?: {
|
|
2216
|
+
merge?: boolean;
|
|
2217
|
+
now?: number;
|
|
2218
|
+
}): boolean;
|
|
2219
|
+
/** Updates the caret of the current step (so undo returns to where the user was). */
|
|
2220
|
+
touch(selection: EditorSnapshot['selection']): void;
|
|
2221
|
+
undo(): EditorSnapshot | null;
|
|
2222
|
+
redo(): EditorSnapshot | null;
|
|
2223
|
+
private mergeable;
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
/** Hue 0–360, saturation and brightness 0–100. */
|
|
2227
|
+
interface ColorHsb {
|
|
2228
|
+
h: number;
|
|
2229
|
+
s: number;
|
|
2230
|
+
b: number;
|
|
2231
|
+
}
|
|
2232
|
+
/** Channels 0–255. */
|
|
2233
|
+
interface ColorRgb {
|
|
2234
|
+
r: number;
|
|
2235
|
+
g: number;
|
|
2236
|
+
b: number;
|
|
2237
|
+
}
|
|
2238
|
+
type ColorFormat = 'hex' | 'rgb' | 'hsb';
|
|
2239
|
+
declare function hsbToRgb(c: ColorHsb): ColorRgb;
|
|
2240
|
+
declare function rgbToHsb(c: ColorRgb): ColorHsb;
|
|
2241
|
+
declare function hsbToHex(c: ColorHsb): string;
|
|
2242
|
+
/**
|
|
2243
|
+
* A picker value in any form apps keep: `'#6466f1'`, `'6466f1'`, `'#fff'`, `'rgb(100, 102, 241)'`,
|
|
2244
|
+
* `{ r, g, b }` or `{ h, s, b }`. `null` when it is not a colour.
|
|
2245
|
+
*/
|
|
2246
|
+
declare function parseColor(value: unknown): ColorHsb | null;
|
|
2247
|
+
/** The value a picker hands back in `format`: `'#rrggbb'`, `{ r, g, b }` or `{ h, s, b }`. */
|
|
2248
|
+
declare function formatColor(c: ColorHsb, format?: ColorFormat): string | ColorRgb | ColorHsb;
|
|
2249
|
+
|
|
2250
|
+
/** One node of a tree. The same fields TreeNode has in the apps moving over. */
|
|
2251
|
+
interface TreeNode<T = any> {
|
|
2252
|
+
label?: string;
|
|
2253
|
+
data?: T;
|
|
2254
|
+
icon?: string;
|
|
2255
|
+
expandedIcon?: string;
|
|
2256
|
+
collapsedIcon?: string;
|
|
2257
|
+
children?: TreeNode<T>[];
|
|
2258
|
+
/** `false`: has children still to load (an arrow shows; `(onNodeExpand)` loads them). */
|
|
2259
|
+
leaf?: boolean;
|
|
2260
|
+
expanded?: boolean;
|
|
2261
|
+
/** Picks the template (`wuTemplate="url"`); `'default'` otherwise. */
|
|
2262
|
+
type?: string;
|
|
2263
|
+
parent?: TreeNode<T>;
|
|
2264
|
+
partialSelected?: boolean;
|
|
2265
|
+
style?: Record<string, string | number> | null;
|
|
2266
|
+
styleClass?: string;
|
|
2267
|
+
/** `false`: shown but cannot be picked. */
|
|
2268
|
+
selectable?: boolean;
|
|
2269
|
+
key?: string;
|
|
2270
|
+
loading?: boolean;
|
|
2271
|
+
draggable?: boolean;
|
|
2272
|
+
droppable?: boolean;
|
|
2273
|
+
[field: string]: unknown;
|
|
2274
|
+
}
|
|
2275
|
+
type TreeFilterMode = 'lenient' | 'strict';
|
|
2276
|
+
type TreeCheckState = 'checked' | 'partial';
|
|
2277
|
+
/** The same node: the same object, or the same `dataKey` field (`'key'`, `'data.id'`). */
|
|
2278
|
+
declare function sameNode(a: TreeNode | null | undefined, b: TreeNode | null | undefined, dataKey?: string | null): boolean;
|
|
2279
|
+
/** Visits every node, parents before children. */
|
|
2280
|
+
declare function walkTree(nodes: readonly TreeNode[] | null | undefined, visit: (node: TreeNode, parent: TreeNode | null, depth: number) => void, parent?: TreeNode | null, depth?: number): void;
|
|
2281
|
+
/** Each node's parent (from where it sits, not from `node.parent`). */
|
|
2282
|
+
declare function treeParents(nodes: readonly TreeNode[] | null | undefined): Map<TreeNode, TreeNode | null>;
|
|
2283
|
+
/**
|
|
2284
|
+
* The nodes a search leaves, or `null` when there is no search. A node matches on its label (or the `filterBy`
|
|
2285
|
+
* fields, comma separated). `lenient` keeps a match's whole subtree; `strict` keeps only matches. Either way the
|
|
2286
|
+
* ancestors of a match stay, so it can be reached.
|
|
2287
|
+
*/
|
|
2288
|
+
declare function filterTree(nodes: readonly TreeNode[] | null | undefined, query: string, filterBy?: string | null, mode?: TreeFilterMode): Set<TreeNode> | null;
|
|
2289
|
+
/** Which nodes show a ticked or a half-ticked box for this selection. */
|
|
2290
|
+
declare function treeCheckStates(nodes: readonly TreeNode[] | null | undefined, selection: readonly TreeNode[] | null | undefined, dataKey?: string | null): Map<TreeNode, TreeCheckState>;
|
|
2291
|
+
/**
|
|
2292
|
+
* The selection after ticking (or unticking) a node's box. `down`: its whole subtree follows; `up`: a parent is
|
|
2293
|
+
* ticked when all its children are, and unticked otherwise. Nodes with `selectable: false` are left as they are.
|
|
2294
|
+
*/
|
|
2295
|
+
declare function toggleTreeCheck(nodes: readonly TreeNode[] | null | undefined, selection: readonly TreeNode[] | null | undefined, node: TreeNode, check: boolean, opts?: {
|
|
2296
|
+
up?: boolean;
|
|
2297
|
+
down?: boolean;
|
|
2298
|
+
dataKey?: string | null;
|
|
2299
|
+
}): TreeNode[];
|
|
2300
|
+
|
|
2301
|
+
/**
|
|
2302
|
+
* Image cropper maths. The crop rectangle lives in pixels of the *oriented* image (the picture after rotation and
|
|
2303
|
+
* flips, plus any padding), so it survives window resizes and layout changes. Zoom is a window onto that image:
|
|
2304
|
+
* at zoom 1 the whole image shows, at zoom 2 a window half as wide and half as tall. The crop box always stays
|
|
2305
|
+
* inside the window, and the window inside the image. Framework-free; the Angular component draws and listens.
|
|
2306
|
+
*/
|
|
2307
|
+
/** Corners of a crop rectangle in image pixels: x1,y1 top-left, x2,y2 bottom-right. */
|
|
2308
|
+
interface CropperPosition {
|
|
2309
|
+
x1: number;
|
|
2310
|
+
y1: number;
|
|
2311
|
+
x2: number;
|
|
2312
|
+
y2: number;
|
|
2313
|
+
}
|
|
2314
|
+
interface CropDimensions {
|
|
2315
|
+
width: number;
|
|
2316
|
+
height: number;
|
|
2317
|
+
}
|
|
2318
|
+
/** The part of the crop box being dragged: an edge (n, e, s, w) or a corner. */
|
|
2319
|
+
type CropHandle = 'n' | 'e' | 's' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
|
|
2320
|
+
/**
|
|
2321
|
+
* Size limits in image pixels (0 or missing = no limit). `ratio` is width / height while the aspect ratio is kept;
|
|
2322
|
+
* leave it out (or null) for a free crop.
|
|
2323
|
+
*/
|
|
2324
|
+
interface CropLimits {
|
|
2325
|
+
minWidth?: number;
|
|
2326
|
+
minHeight?: number;
|
|
2327
|
+
maxWidth?: number;
|
|
2328
|
+
maxHeight?: number;
|
|
2329
|
+
ratio?: number | null;
|
|
2330
|
+
}
|
|
2331
|
+
/** How the source picture is turned: degrees clockwise, then mirrored on screen (left-right, top-bottom). */
|
|
2332
|
+
interface CropOrientation {
|
|
2333
|
+
rotate: number;
|
|
2334
|
+
flipH: boolean;
|
|
2335
|
+
flipV: boolean;
|
|
2336
|
+
}
|
|
2337
|
+
/** What is in view: zoom (1 = whole image) and the centre of the visible window in image pixels. */
|
|
2338
|
+
interface CropView {
|
|
2339
|
+
zoom: number;
|
|
2340
|
+
cx: number;
|
|
2341
|
+
cy: number;
|
|
2342
|
+
}
|
|
2343
|
+
/** A 2D affine matrix in canvas order: x' = a·x + c·y + e, y' = b·x + d·y + f. */
|
|
2344
|
+
type CropMatrix = [number, number, number, number, number, number];
|
|
2345
|
+
declare function cropWidth(r: CropperPosition): number;
|
|
2346
|
+
declare function cropHeight(r: CropperPosition): number;
|
|
2347
|
+
/** The whole area of a `width` × `height` image as a crop rectangle. */
|
|
2348
|
+
declare function cropArea(size: CropDimensions): CropperPosition;
|
|
2349
|
+
/** Corners in order (x1 ≤ x2, y1 ≤ y2), numbers only; null when the value is not a rectangle. */
|
|
2350
|
+
declare function normalizeCrop(r: unknown): CropperPosition | null;
|
|
2351
|
+
/** Same rectangle within half a pixel (so a rounded copy written back by two-way binding is not a change). */
|
|
2352
|
+
declare function sameCrop(a: CropperPosition | null | undefined, b: CropperPosition | null | undefined, tolerance?: number): boolean;
|
|
2353
|
+
/** Whole pixels, for events and two-way binding. */
|
|
2354
|
+
declare function roundCrop(r: CropperPosition): CropperPosition;
|
|
2355
|
+
/** An aspect ratio from a number or a string like `'4/3'`, `'16:9'` or `'1.5'`; null when there is none. */
|
|
2356
|
+
declare function parseAspectRatio(v: unknown): number | null;
|
|
2357
|
+
/**
|
|
2358
|
+
* The widths and heights a crop box may take when it has `roomW` × `roomH` pixels of space. With a ratio the height
|
|
2359
|
+
* follows the width, so both ranges describe the same boxes.
|
|
2360
|
+
*/
|
|
2361
|
+
declare function cropSizeRange(roomW: number, roomH: number, limits?: CropLimits): {
|
|
2362
|
+
minW: number;
|
|
2363
|
+
maxW: number;
|
|
2364
|
+
minH: number;
|
|
2365
|
+
maxH: number;
|
|
2366
|
+
};
|
|
2367
|
+
/** The starting crop box: as large as the limits allow inside `area`, centred (the whole area for a free crop). */
|
|
2368
|
+
declare function initialCrop(area: CropperPosition, limits?: CropLimits): CropperPosition;
|
|
2369
|
+
/**
|
|
2370
|
+
* Brings any rectangle inside `area` and within the limits, keeping its centre where it can. With a ratio the width
|
|
2371
|
+
* is kept and the height follows; a box that would then be too big shrinks.
|
|
2372
|
+
*/
|
|
2373
|
+
declare function clampCrop(rect: CropperPosition, area: CropperPosition, limits?: CropLimits): CropperPosition;
|
|
2374
|
+
/** Moves the box by `dx`, `dy` image pixels without changing its size; it stops at the edges of `area`. */
|
|
2375
|
+
declare function moveCrop(rect: CropperPosition, dx: number, dy: number, area: CropperPosition): CropperPosition;
|
|
2376
|
+
/**
|
|
2377
|
+
* Resizes the box `start` by dragging `handle` by `dx`, `dy` image pixels. The opposite side (or corner) stays put.
|
|
2378
|
+
* With a ratio, a corner follows whichever direction the pointer moved further; an edge changes the other side
|
|
2379
|
+
* evenly around the middle (moving the box if it reaches the image edge). The box never turns inside out.
|
|
2380
|
+
*/
|
|
2381
|
+
declare function resizeCrop(start: CropperPosition, handle: CropHandle, dx: number, dy: number, area: CropperPosition, limits?: CropLimits): CropperPosition;
|
|
2382
|
+
/**
|
|
2383
|
+
* Grows (positive `amount`) or shrinks the box around its centre, keeping its shape: `amount` is added to the width
|
|
2384
|
+
* and the height changes in proportion. Used by the + / − keys.
|
|
2385
|
+
*/
|
|
2386
|
+
declare function growCrop(rect: CropperPosition, amount: number, area: CropperPosition, limits?: CropLimits): CropperPosition;
|
|
2387
|
+
/** Degrees in [0, 360). */
|
|
2388
|
+
declare function normalizeAngle(deg: number): number;
|
|
2389
|
+
/** Size of a `width` × `height` picture once turned by `deg` degrees (its bounding box). */
|
|
2390
|
+
declare function rotatedSize(width: number, height: number, deg: number): CropDimensions;
|
|
2391
|
+
/** Grows a box to `ratio` (width / height) by adding room around it, the picture centred: for fitting a whole photo. */
|
|
2392
|
+
declare function padToRatio(size: CropDimensions, ratio: number | null | undefined): CropDimensions;
|
|
2393
|
+
/**
|
|
2394
|
+
* The matrix that draws a `srcW` × `srcH` source in oriented space: turned, mirrored and centred in `out`
|
|
2395
|
+
* (by default the turned picture's own bounding box). Use with `ctx.transform(...m)` before `drawImage(src, 0, 0)`.
|
|
2396
|
+
*/
|
|
2397
|
+
declare function orientationMatrix(srcW: number, srcH: number, o: CropOrientation, out?: CropDimensions): CropMatrix;
|
|
2398
|
+
declare function applyMatrix(m: CropMatrix, x: number, y: number): {
|
|
2399
|
+
x: number;
|
|
2400
|
+
y: number;
|
|
2401
|
+
};
|
|
2402
|
+
/**
|
|
2403
|
+
* The orientation after turning the picture on screen by `quarterTurns` (+1 = 90° clockwise). While exactly one mirror
|
|
2404
|
+
* is on, a turn of the source runs the other way on screen, so the mirrors swap to keep the turn on screen clockwise.
|
|
2405
|
+
*/
|
|
2406
|
+
declare function rotateOrientation(o: CropOrientation, quarterTurns: number): CropOrientation;
|
|
2407
|
+
/**
|
|
2408
|
+
* Carries a point from one orientation's space (`fromSize`) to another's (`toSize`), about the centres. Null when the
|
|
2409
|
+
* change is not a whole quarter turn or a mirror (the caller then starts the crop afresh).
|
|
2410
|
+
*/
|
|
2411
|
+
declare function remapPoint(x: number, y: number, fromSize: CropDimensions, from: CropOrientation, toSize: CropDimensions, to: CropOrientation): {
|
|
2412
|
+
x: number;
|
|
2413
|
+
y: number;
|
|
2414
|
+
} | null;
|
|
2415
|
+
/**
|
|
2416
|
+
* Carries the crop box along when the picture turns or mirrors, so the same part of the photo stays selected. With
|
|
2417
|
+
* `keepShape` (a kept aspect ratio) only the centre moves and the box keeps its width and height; otherwise the box
|
|
2418
|
+
* turns with the picture. Null when the change is not a quarter turn or a mirror. Clamp the result afterwards.
|
|
2419
|
+
*/
|
|
2420
|
+
declare function remapCrop(rect: CropperPosition, fromSize: CropDimensions, from: CropOrientation, toSize: CropDimensions, to: CropOrientation, keepShape?: boolean): CropperPosition | null;
|
|
2421
|
+
/** Keeps zoom within [1, maxZoom] and the window inside the image. */
|
|
2422
|
+
declare function clampView(size: CropDimensions, view: CropView, maxZoom?: number): CropView;
|
|
2423
|
+
/** The visible part of the image, in image pixels. */
|
|
2424
|
+
declare function viewWindow(size: CropDimensions, view: CropView): CropperPosition;
|
|
2425
|
+
/**
|
|
2426
|
+
* Zooms to `zoom` the way a photo grows under a frame: the crop box keeps its place and size on screen, so in image
|
|
2427
|
+
* pixels it gets smaller when zooming in (more detail) and larger when zooming out. Zoom stops where the window would
|
|
2428
|
+
* be smaller than the smallest box the limits allow.
|
|
2429
|
+
*/
|
|
2430
|
+
declare function zoomCrop(size: CropDimensions, view: CropView, crop: CropperPosition, zoom: number, limits?: CropLimits, maxZoom?: number): {
|
|
2431
|
+
view: CropView;
|
|
2432
|
+
crop: CropperPosition;
|
|
2433
|
+
};
|
|
2434
|
+
/**
|
|
2435
|
+
* Pans the window by `dx`, `dy` image pixels (positive = towards the right / bottom of the image). The crop box keeps
|
|
2436
|
+
* its place on screen, so it moves over the image by the same amount.
|
|
2437
|
+
*/
|
|
2438
|
+
declare function panCrop(size: CropDimensions, view: CropView, crop: CropperPosition, dx: number, dy: number): {
|
|
2439
|
+
view: CropView;
|
|
2440
|
+
crop: CropperPosition;
|
|
2441
|
+
};
|
|
2442
|
+
/** Canvas area browsers reliably allocate (iOS Safari's limit, 4096 × 4096). */
|
|
2443
|
+
declare const MAX_CANVAS_AREA = 16777216;
|
|
2444
|
+
interface CropOutputOptions {
|
|
2445
|
+
/** Output width in pixels; 0 = the crop's own width. */
|
|
2446
|
+
resizeToWidth?: number;
|
|
2447
|
+
/** Output height in pixels; 0 = the crop's own height. With both, the image fits inside both. */
|
|
2448
|
+
resizeToHeight?: number;
|
|
2449
|
+
/** Never enlarge a crop smaller than the requested size. */
|
|
2450
|
+
onlyScaleDown?: boolean;
|
|
2451
|
+
/** Kept aspect ratio: the height is worked out from the width so rounding cannot drift by a pixel. */
|
|
2452
|
+
ratio?: number | null;
|
|
2453
|
+
/** Largest output area in pixels. Default `MAX_CANVAS_AREA`. */
|
|
2454
|
+
maxArea?: number;
|
|
2455
|
+
}
|
|
2456
|
+
/** The size of the cropped image: the crop's pixels, resized to `resizeToWidth` / `resizeToHeight` when asked. */
|
|
2457
|
+
declare function outputSize(cropW: number, cropH: number, options?: CropOutputOptions): CropDimensions;
|
|
2458
|
+
/**
|
|
2459
|
+
* The EXIF orientation (1–8) of a JPEG from its first bytes; 1 when there is none or the data is not a JPEG.
|
|
2460
|
+
* 64 KB from the start of the file is enough: the EXIF block comes first.
|
|
2461
|
+
*/
|
|
2462
|
+
declare function readExifOrientation(data: ArrayBuffer | Uint8Array): number;
|
|
2463
|
+
/** What an EXIF orientation asks for: turn clockwise by `rotate`, then mirror left-right when `flip`. */
|
|
2464
|
+
declare function exifTransform(orientation: number): {
|
|
2465
|
+
rotate: number;
|
|
2466
|
+
flip: boolean;
|
|
2467
|
+
};
|
|
2468
|
+
/**
|
|
2469
|
+
* A Blob from a data URL (`data:image/png;base64,…`) or bare base64 (read as PNG unless `type` says otherwise).
|
|
2470
|
+
* Named like the helper apps already call to turn a cropped base64 image into an uploadable file.
|
|
2471
|
+
*/
|
|
2472
|
+
declare function base64ToFile(base64: string, type?: string): Blob;
|
|
2473
|
+
/** A built-in button of the cropper's toolbar. */
|
|
2474
|
+
type CropperToolName = 'zoomOut' | 'zoomSlider' | 'zoomIn' | 'rotateLeft' | 'rotateRight' | 'flipHorizontal' | 'flipVertical' | 'reset';
|
|
2475
|
+
/** A tool, or `'zoom'` / `'rotate'` / `'flip'` for its whole group. */
|
|
2476
|
+
type CropperTool = CropperToolName | 'zoom' | 'rotate' | 'flip';
|
|
2477
|
+
/**
|
|
2478
|
+
* The toolbar's built-in buttons: `'full'` (every button), `'none'`, or a list of tools in order where `'|'` starts a
|
|
2479
|
+
* new group. Without any `'|'` the zoom tools make one group and the rest another, as in the full toolbar.
|
|
2480
|
+
*/
|
|
2481
|
+
type CropperToolbar = 'full' | 'none' | ReadonlyArray<CropperTool | '|'>;
|
|
2482
|
+
/** The toolbar's groups of buttons for `toolbar`; unknown names are skipped and each button shows once. */
|
|
2483
|
+
declare function cropperToolbarGroups(toolbar: CropperToolbar | readonly string[] | string | null | undefined): CropperToolName[][];
|
|
2484
|
+
|
|
2485
|
+
/** Knob (wu-knob): the dial's arcs in its 100 × 100 viewBox, the value under a pointer, and key steps. */
|
|
2486
|
+
/** The dial runs from the bottom left (240°) round the top to the bottom right (-60°). Radians, counter-clockwise. */
|
|
2487
|
+
declare const KNOB_MIN_RADIANS: number;
|
|
2488
|
+
declare const KNOB_MAX_RADIANS: number;
|
|
2489
|
+
declare function knobClamp(value: number, min: number, max: number): number;
|
|
2490
|
+
/** Rounds to the step counted from `min` (0 or less: any value), without float noise (0.1 + 0.2), inside min … max. */
|
|
2491
|
+
declare function knobSnap(value: number, min: number, max: number, step: number): number;
|
|
2492
|
+
/**
|
|
2493
|
+
* The value under a point of the dial, in viewBox units (0–100 both ways), snapped to the step. The bottom gap between
|
|
2494
|
+
* the two ends gives `null` (a press there does nothing), or with `toEnds` the nearer end, so a drag past an end sticks
|
|
2495
|
+
* to it instead of stopping a step short.
|
|
2496
|
+
*/
|
|
2497
|
+
declare function knobValueAt(x: number, y: number, min: number, max: number, step: number, toEnds?: boolean): number | null;
|
|
2498
|
+
/**
|
|
2499
|
+
* The SVG paths: `range` is the whole track, `value` the filled arc from zero (or from `min` / `max` when zero is outside
|
|
2500
|
+
* the range) to the value.
|
|
2501
|
+
*/
|
|
2502
|
+
declare function knobPaths(value: number, min: number, max: number): {
|
|
2503
|
+
range: string;
|
|
2504
|
+
value: string;
|
|
2505
|
+
};
|
|
2506
|
+
/** The text in the middle: `'{value}%'` → `'40%'`. */
|
|
2507
|
+
declare function knobText(template: string | null | undefined, value: number): string;
|
|
2508
|
+
/**
|
|
2509
|
+
* The value after a key on a slider-like control: arrows ± `step`, Page Up / Page Down ± `pageStep` (10 steps), Home / End
|
|
2510
|
+
* to the ends. `null` for any other key.
|
|
2511
|
+
*/
|
|
2512
|
+
declare function rangeKeyValue(key: string, value: number, min: number, max: number, step: number, pageStep?: number): number | null;
|
|
2513
|
+
|
|
2514
|
+
/** One-time code boxes (wu-inputOtp): what each box holds, which keys go in, and pasting a whole code. */
|
|
2515
|
+
/** The characters of a model value, one per box: a string, a number or an array of characters. */
|
|
2516
|
+
declare function otpTokens(value: unknown, length: number): string[];
|
|
2517
|
+
/** The model value: the boxes' characters in order (empty boxes add nothing, as before). */
|
|
2518
|
+
declare function otpValue(tokens: readonly (string | null | undefined)[], length: number): string;
|
|
2519
|
+
/** A character a box takes: a digit with `integerOnly`, otherwise anything but white space. */
|
|
2520
|
+
declare function otpAccepts(char: string, integerOnly: boolean): boolean;
|
|
2521
|
+
/**
|
|
2522
|
+
* Pasted text as code characters: spaces and dashes are dropped (`'123 456'`, `'123-456'`). `null` when anything left
|
|
2523
|
+
* is not accepted (letters in an `integerOnly` code).
|
|
2524
|
+
*/
|
|
2525
|
+
declare function otpCleanPaste(text: string | null | undefined, integerOnly: boolean): string[] | null;
|
|
2526
|
+
/**
|
|
2527
|
+
* Writes characters into the boxes from `start`. A whole code (as long as the boxes, or longer) always starts at the
|
|
2528
|
+
* first box. Gives the new boxes and the box to focus next (after the last one written).
|
|
2529
|
+
*/
|
|
2530
|
+
declare function otpFill(tokens: readonly string[], start: number, chars: readonly string[], length: number): {
|
|
2531
|
+
tokens: string[];
|
|
2532
|
+
focus: number;
|
|
2533
|
+
};
|
|
2534
|
+
|
|
2535
|
+
/** Terminal (wu-terminal): the command history that ↑ / ↓ walk through, and the built-in clear command. */
|
|
2536
|
+
/** History with `command` added at the end: blank lines and a repeat of the last command are left out; keeps the last `max`. */
|
|
2537
|
+
declare function terminalHistoryAdd(history: readonly string[], command: string | null | undefined, max?: number): string[];
|
|
2538
|
+
/**
|
|
2539
|
+
* The history position after ↑ (`-1`) or ↓ (`+1`). Positions run 0 … `history.length`, where `history.length` is the
|
|
2540
|
+
* line being typed; the ends hold.
|
|
2541
|
+
*/
|
|
2542
|
+
declare function terminalHistoryMove(history: readonly string[], index: number, dir: -1 | 1): number;
|
|
2543
|
+
/** The command's first word: `'greet วิระ'` → `'greet'`. */
|
|
2544
|
+
declare function terminalCommandName(text: string | null | undefined): string;
|
|
2545
|
+
/** True when the line is the clear command (`'clear'` by default; case and spaces around it do not matter). */
|
|
2546
|
+
declare function terminalIsClear(text: string | null | undefined, clearCommand: string | null | undefined): boolean;
|
|
2547
|
+
|
|
2548
|
+
/** A position in 0 … 100; anything unreadable is `fallback` (50, the middle). */
|
|
2549
|
+
declare function imageCompareClamp(value: unknown, fallback?: number): number;
|
|
2550
|
+
/**
|
|
2551
|
+
* The position under a pointer at `clientX` over a box starting at `left` and `width` wide, to 0.1 %. Right to left,
|
|
2552
|
+
* the start edge is on the right.
|
|
2553
|
+
*/
|
|
2554
|
+
declare function imageCompareAt(clientX: number, left: number, width: number, rtl?: boolean): number;
|
|
2555
|
+
/**
|
|
2556
|
+
* The position after a key: ← / → move the divider that way on screen (so right to left they swap), ↑ / ↓ by a step too,
|
|
2557
|
+
* Page Up / Page Down by 10, Home / End to the edges. `null` for any other key.
|
|
2558
|
+
*/
|
|
2559
|
+
declare function imageCompareKey(key: string, value: number, step?: number, rtl?: boolean): number | null;
|
|
2560
|
+
|
|
2561
|
+
/** Carousel (wu-carousel): pages of items, what shows at a window width, and moving between pages. */
|
|
2562
|
+
/** At or below `breakpoint` (a CSS width such as `'768px'`), show `numVisible` items and move `numScroll` at a time. */
|
|
2563
|
+
interface CarouselResponsiveOptions {
|
|
2564
|
+
breakpoint: string;
|
|
2565
|
+
numVisible: number;
|
|
2566
|
+
numScroll: number;
|
|
2567
|
+
}
|
|
2568
|
+
/**
|
|
2569
|
+
* Items in view and items per move at a window width: the option with the smallest breakpoint that is still at least
|
|
2570
|
+
* the width wins; with none, the component's own numbers. `width` null (no window, e.g. on the server) uses those too.
|
|
2571
|
+
*/
|
|
2572
|
+
declare function carouselLayout(width: number | null | undefined, numVisible: unknown, numScroll: unknown, options?: readonly CarouselResponsiveOptions[] | null): {
|
|
2573
|
+
numVisible: number;
|
|
2574
|
+
numScroll: number;
|
|
2575
|
+
};
|
|
2576
|
+
/** How many pages (indicator dots) `count` items make. One page when they all fit; none when there are no items. */
|
|
2577
|
+
declare function carouselPageCount(count: number, numVisible: number, numScroll: number): number;
|
|
2578
|
+
/** The first item in view on a page. The last page is pulled back so it is full (no gap after the last item). */
|
|
2579
|
+
declare function carouselFirst(page: number, count: number, numVisible: number, numScroll: number): number;
|
|
2580
|
+
/** A page inside 0 … pages - 1. */
|
|
2581
|
+
declare function carouselClampPage(page: unknown, pageCount: number): number;
|
|
2582
|
+
/** Wrapping round only makes sense when there are more items than fit. */
|
|
2583
|
+
declare function carouselIsCircular(circular: boolean, count: number, numVisible: number): boolean;
|
|
2584
|
+
/** The page after (`dir` 1) or before (`dir` -1) `page`, wrapping when circular; `null` at an end that does not wrap. */
|
|
2585
|
+
declare function carouselStep(page: number, dir: 1 | -1, pageCount: number, circular: boolean): number | null;
|
|
2586
|
+
/** The page that keeps roughly the same items in view after `numScroll` changes (window resized past a breakpoint). */
|
|
2587
|
+
declare function carouselRepage(page: number, oldScroll: number, newScroll: number, pageCount: number): number;
|
|
2588
|
+
|
|
2589
|
+
/** Splitter (wu-splitter): panel sizes in %, moving a gutter within the panels' minimum sizes, and the saved state. */
|
|
2590
|
+
/**
|
|
2591
|
+
* Starting sizes: each panel's given size; the panels without one share what is left of 100 equally (an equal share of
|
|
2592
|
+
* 100 when nothing is left), so `[30]` for two panels is 30 / 70.
|
|
2593
|
+
*/
|
|
2594
|
+
declare function splitterSizes(count: number, panelSizes?: readonly unknown[] | null): number[];
|
|
2595
|
+
/**
|
|
2596
|
+
* Moves the gutter after panel `index` by `delta` percentage points (positive grows that panel). Both panels keep at
|
|
2597
|
+
* least their minimum size (`minSizes[index]`, `minSizes[index + 1]`) and never go below 0; their total stays the same.
|
|
2598
|
+
*/
|
|
2599
|
+
declare function splitterResize(sizes: readonly number[], index: number, delta: number, minSizes?: readonly unknown[] | null): number[];
|
|
2600
|
+
/** Sizes saved with `stateKey` (a JSON array), when they fit this splitter; otherwise null. */
|
|
2601
|
+
declare function splitterReadState(text: string | null | undefined, count: number): number[] | null;
|
|
2602
|
+
/** A panel's CSS flex-basis: its share of the room the gutters leave (`count - 1` gutters of `gutterSize` px). */
|
|
2603
|
+
declare function splitterBasis(size: number, count: number, gutterSize: number): string;
|
|
2604
|
+
/** Percentage points for a move of `px` pixels across a splitter `totalPx` wide (or tall) with `count` panels. */
|
|
2605
|
+
declare function splitterPercent(px: number, totalPx: number, count: number, gutterSize: number): number;
|
|
2606
|
+
|
|
2607
|
+
/** Organization chart (wu-organizationChart): leaves, selection, and moving between the boxes with the keys. */
|
|
2608
|
+
|
|
2609
|
+
type OrgChartSelectionMode = 'single' | 'multiple' | null | undefined;
|
|
2610
|
+
/** A node without children is a leaf, unless `leaf: false` says children are still to come. */
|
|
2611
|
+
declare function orgChartIsLeaf(node: TreeNode | null | undefined): boolean;
|
|
2612
|
+
/** Children show when the node is not a leaf and is `expanded` (the way the chart has always worked). */
|
|
2613
|
+
declare function orgChartIsOpen(node: TreeNode | null | undefined): boolean;
|
|
2614
|
+
declare function orgChartIsSelected(selection: unknown, node: TreeNode, mode: OrgChartSelectionMode): boolean;
|
|
2615
|
+
/**
|
|
2616
|
+
* The selection after a click on `node`: picked if it was not, unpicked if it was (single: the only one; multiple:
|
|
2617
|
+
* added to / taken out of the list). `null` when nothing changes (no selection mode, or `selectable: false`).
|
|
2618
|
+
*/
|
|
2619
|
+
declare function orgChartToggleSelection(selection: unknown, node: TreeNode, mode: OrgChartSelectionMode): {
|
|
2620
|
+
selection: unknown;
|
|
2621
|
+
selected: boolean;
|
|
2622
|
+
} | null;
|
|
2623
|
+
/** A box on screen: its node, parent, depth (1 = the root) and its brothers and sisters. */
|
|
2624
|
+
interface OrgChartEntry {
|
|
2625
|
+
node: TreeNode;
|
|
2626
|
+
parent: TreeNode | null;
|
|
2627
|
+
level: number;
|
|
2628
|
+
siblings: TreeNode[];
|
|
2629
|
+
}
|
|
2630
|
+
/** The boxes that show (inside open nodes), parents before children, left to right. */
|
|
2631
|
+
declare function orgChartVisible(root: TreeNode | null | undefined): OrgChartEntry[];
|
|
2632
|
+
/** What a key does on the focused box. */
|
|
2633
|
+
type OrgChartMove = {
|
|
2634
|
+
focus: TreeNode;
|
|
2635
|
+
} | {
|
|
2636
|
+
expand: TreeNode;
|
|
2637
|
+
} | {
|
|
2638
|
+
collapse: TreeNode;
|
|
2639
|
+
};
|
|
2640
|
+
/**
|
|
2641
|
+
* Keys on a box, the tree keys turned on their side: ↓ opens a closed node (when `collapsible`) or goes to its first
|
|
2642
|
+
* child; ↑ closes an open node (when `collapsible`) or goes to the parent; ← / → go to the box beside it under the same
|
|
2643
|
+
* parent; Home / End go to the root and the last box that shows. `null` when the key does nothing here.
|
|
2644
|
+
*/
|
|
2645
|
+
declare function orgChartKey(key: string, node: TreeNode, root: TreeNode | null | undefined, collapsible: boolean): OrgChartMove | null;
|
|
2646
|
+
|
|
2647
|
+
/**
|
|
2648
|
+
* The app's own translations (@wirabyte/ui/i18n), framework-free. Messages are keyed by an id (`'menu.home'`) or by the
|
|
2649
|
+
* text in the app's main language (`'บันทึก'`), so a Thai-first app can write Thai in its templates and add only an
|
|
2650
|
+
* English list; a missing key shows the key itself.
|
|
2651
|
+
*/
|
|
2652
|
+
/** One language's messages: flat (`{ 'menu.home': 'Home' }`) or nested (`{ menu: { home: 'Home' } }`). */
|
|
2653
|
+
interface I18nMessages {
|
|
2654
|
+
[key: string]: string | I18nMessages;
|
|
2655
|
+
}
|
|
2656
|
+
/** Nested messages as one flat map with dotted keys. Values that are not text are skipped. */
|
|
2657
|
+
declare function flattenMessages(messages: I18nMessages | null | undefined, prefix?: string): Record<string, string>;
|
|
2658
|
+
/** Fills `{name}` placeholders from `params`; a placeholder with no value stays as written. */
|
|
2659
|
+
declare function interpolate(text: string, params?: Record<string, unknown> | null): string;
|
|
2660
|
+
/**
|
|
2661
|
+
* The text for `key`: the language's own message, else the fallback language's, else the key itself.
|
|
2662
|
+
* `dictionaries` maps a language code to its flat messages.
|
|
2663
|
+
*/
|
|
2664
|
+
declare function translateKey(dictionaries: ReadonlyMap<string, Readonly<Record<string, string>>>, language: string, fallback: string, key: string, params?: Record<string, unknown> | null): string;
|
|
2665
|
+
/** `languages`' entry for `code`, matching `'en-US'` to `'en'` and ignoring case; null when none fits. */
|
|
2666
|
+
declare function matchLanguage(languages: readonly string[], code: string | null | undefined): string | null;
|
|
2667
|
+
/** The language to start in: the one saved from last time, else the browser's (when `browser` is given), else `fallback`. */
|
|
2668
|
+
declare function pickLanguage(languages: readonly string[], fallback: string, saved?: string | null, browser?: readonly string[] | null): string;
|
|
2669
|
+
/** What each language calls itself, for language pickers. */
|
|
2670
|
+
declare const LANGUAGE_NAMES: Readonly<Record<string, string>>;
|
|
2671
|
+
|
|
2672
|
+
/**
|
|
2673
|
+
* wu-flow: the data model. Nodes and edges are plain objects the app owns (shaped like the node/edge objects of the
|
|
2674
|
+
* popular React flow libraries, so graphs and helpers carry over), and every helper in this folder is a pure function
|
|
2675
|
+
* over them. Framework-free: the Angular component renders these and the tests run them without a browser.
|
|
2676
|
+
*/
|
|
2677
|
+
/** A side of a node: where a handle sits and which way an edge leaves it. */
|
|
2678
|
+
type FlowPosition = 'top' | 'right' | 'bottom' | 'left';
|
|
2679
|
+
interface FlowXY {
|
|
2680
|
+
x: number;
|
|
2681
|
+
y: number;
|
|
2682
|
+
}
|
|
2683
|
+
interface FlowDimensions {
|
|
2684
|
+
width: number;
|
|
2685
|
+
height: number;
|
|
2686
|
+
}
|
|
2687
|
+
/** A rectangle by its top-left corner and size. */
|
|
2688
|
+
interface FlowRect extends FlowXY, FlowDimensions {
|
|
2689
|
+
}
|
|
2690
|
+
/** A rectangle by its corners (`x2`, `y2` = bottom-right). */
|
|
2691
|
+
interface FlowBox {
|
|
2692
|
+
x: number;
|
|
2693
|
+
y: number;
|
|
2694
|
+
x2: number;
|
|
2695
|
+
y2: number;
|
|
2696
|
+
}
|
|
2697
|
+
/** `[[minX, minY], [maxX, maxY]]` in flow coordinates. */
|
|
2698
|
+
type FlowCoordinateExtent = [[number, number], [number, number]];
|
|
2699
|
+
/** Pan and zoom: a flow point `p` shows at `p * zoom + (x, y)` inside the pane. */
|
|
2700
|
+
interface FlowViewport {
|
|
2701
|
+
x: number;
|
|
2702
|
+
y: number;
|
|
2703
|
+
zoom: number;
|
|
2704
|
+
}
|
|
2705
|
+
type FlowHandleType = 'source' | 'target';
|
|
2706
|
+
/** `strict`: source handles connect to target handles only. `loose`: any handle to any other handle. */
|
|
2707
|
+
type FlowConnectionMode = 'strict' | 'loose';
|
|
2708
|
+
/** Edge shapes: `default` is a bezier curve, `step` is `smoothstep` with square corners. */
|
|
2709
|
+
type FlowEdgeType = 'default' | 'bezier' | 'straight' | 'step' | 'smoothstep' | 'simplebezier';
|
|
2710
|
+
type FlowMarkerType = 'arrow' | 'arrowclosed';
|
|
2711
|
+
/** An arrowhead on an edge end. Sizes are in flow units (they scale with the zoom). */
|
|
2712
|
+
interface FlowEdgeMarker {
|
|
2713
|
+
type: FlowMarkerType;
|
|
2714
|
+
/** Default: the edge's stroke colour. */
|
|
2715
|
+
color?: string;
|
|
2716
|
+
/** Default 16. */
|
|
2717
|
+
width?: number;
|
|
2718
|
+
/** Default 16. */
|
|
2719
|
+
height?: number;
|
|
2720
|
+
/** Line width of the open arrow. Default 1.5. */
|
|
2721
|
+
strokeWidth?: number;
|
|
2722
|
+
}
|
|
2723
|
+
type FlowMarker = FlowMarkerType | FlowEdgeMarker;
|
|
2724
|
+
/** CSS for an element: `{ 'background-color': '#fff', width: '120px' }` (camelCase keys work too). */
|
|
2725
|
+
type FlowStyle = Record<string, any>;
|
|
2726
|
+
/**
|
|
2727
|
+
* A node. `position` is relative to the parent when `parentId` is set (a sub-flow), else to the flow's origin.
|
|
2728
|
+
* Everything except `id` and `position` is optional.
|
|
2729
|
+
*/
|
|
2730
|
+
interface FlowNode<T = any> {
|
|
2731
|
+
id: string;
|
|
2732
|
+
position: FlowXY;
|
|
2733
|
+
/** Anything the node's template needs; the built-in nodes show `data.label`. */
|
|
2734
|
+
data?: T;
|
|
2735
|
+
/** Picks the template: `default` (built-in, a target handle on top and a source handle below), `input` (source only),
|
|
2736
|
+
* `output` (target only), `group` (a box for child nodes) or the name of an app template / component. */
|
|
2737
|
+
type?: string;
|
|
2738
|
+
/** Fixed size in px; without it the node takes its content's size (measured). The resizer sets these. */
|
|
2739
|
+
width?: number;
|
|
2740
|
+
height?: number;
|
|
2741
|
+
/** The size the flow measured, written back by `dimensions` changes. Read-only for the app. */
|
|
2742
|
+
measured?: {
|
|
2743
|
+
width?: number;
|
|
2744
|
+
height?: number;
|
|
2745
|
+
};
|
|
2746
|
+
/** Size to assume until the node has been measured (off-screen nodes with `onlyRenderVisibleElements`, export). */
|
|
2747
|
+
initialWidth?: number;
|
|
2748
|
+
initialHeight?: number;
|
|
2749
|
+
selected?: boolean;
|
|
2750
|
+
/** True while the node is being dragged. */
|
|
2751
|
+
dragging?: boolean;
|
|
2752
|
+
/** True while the resizer is resizing the node. */
|
|
2753
|
+
resizing?: boolean;
|
|
2754
|
+
/** Per-node switches; each defaults to the flow's own setting. */
|
|
2755
|
+
draggable?: boolean;
|
|
2756
|
+
selectable?: boolean;
|
|
2757
|
+
connectable?: boolean;
|
|
2758
|
+
deletable?: boolean;
|
|
2759
|
+
focusable?: boolean;
|
|
2760
|
+
hidden?: boolean;
|
|
2761
|
+
/** Stacking order among nodes (children always sit above their parent). */
|
|
2762
|
+
zIndex?: number;
|
|
2763
|
+
/** The parent node: `position` becomes relative to it and the node moves with it. */
|
|
2764
|
+
parentId?: string;
|
|
2765
|
+
/** Where the node may be dragged: `'parent'` keeps it inside its parent, or an extent in flow coordinates
|
|
2766
|
+
* (relative to the parent for child nodes). */
|
|
2767
|
+
extent?: 'parent' | FlowCoordinateExtent;
|
|
2768
|
+
/** Dragging this child past its parent's border grows the parent instead of stopping. */
|
|
2769
|
+
expandParent?: boolean;
|
|
2770
|
+
/** Side of the built-in source / target handle, and of edges when the node has no handle of that type. */
|
|
2771
|
+
sourcePosition?: FlowPosition;
|
|
2772
|
+
targetPosition?: FlowPosition;
|
|
2773
|
+
className?: string;
|
|
2774
|
+
style?: FlowStyle;
|
|
2775
|
+
/** Screen-reader name. Default: `data.label`, else the id. */
|
|
2776
|
+
ariaLabel?: string;
|
|
2777
|
+
/** A CSS selector: only a press inside a matching element starts a drag (a title bar, a grip). */
|
|
2778
|
+
dragHandle?: string;
|
|
2779
|
+
}
|
|
2780
|
+
/** An edge from `source` to `target` (node ids), optionally from / to a particular handle. */
|
|
2781
|
+
interface FlowEdge<T = any> {
|
|
2782
|
+
id: string;
|
|
2783
|
+
source: string;
|
|
2784
|
+
target: string;
|
|
2785
|
+
sourceHandle?: string | null;
|
|
2786
|
+
targetHandle?: string | null;
|
|
2787
|
+
/** A built-in shape (`default` bezier, `straight`, `step`, `smoothstep`, `simplebezier`) or a custom template name. */
|
|
2788
|
+
type?: string;
|
|
2789
|
+
data?: T;
|
|
2790
|
+
label?: string;
|
|
2791
|
+
labelStyle?: FlowStyle;
|
|
2792
|
+
/** Background behind the label. Default true. */
|
|
2793
|
+
labelShowBg?: boolean;
|
|
2794
|
+
labelBgStyle?: FlowStyle;
|
|
2795
|
+
/** `[x, y]` padding of the label background in px. */
|
|
2796
|
+
labelBgPadding?: [number, number];
|
|
2797
|
+
labelBgBorderRadius?: number;
|
|
2798
|
+
/** Dashes flow along the edge (still dashed, not moving, when the user asks for reduced motion). */
|
|
2799
|
+
animated?: boolean;
|
|
2800
|
+
hidden?: boolean;
|
|
2801
|
+
selected?: boolean;
|
|
2802
|
+
selectable?: boolean;
|
|
2803
|
+
deletable?: boolean;
|
|
2804
|
+
focusable?: boolean;
|
|
2805
|
+
/** Drag an end of the edge to another handle: `true` (both ends), `'source'`, `'target'` or `false`. */
|
|
2806
|
+
reconnectable?: boolean | FlowHandleType;
|
|
2807
|
+
markerStart?: FlowMarker;
|
|
2808
|
+
markerEnd?: FlowMarker;
|
|
2809
|
+
style?: FlowStyle;
|
|
2810
|
+
className?: string;
|
|
2811
|
+
/** Width of the invisible path that catches clicks. Default 20. */
|
|
2812
|
+
interactionWidth?: number;
|
|
2813
|
+
zIndex?: number;
|
|
2814
|
+
ariaLabel?: string;
|
|
2815
|
+
/** Shape settings: `curvature` (bezier), `borderRadius` and `offset` (smoothstep / step). */
|
|
2816
|
+
pathOptions?: FlowPathOptions;
|
|
2817
|
+
}
|
|
2818
|
+
interface FlowPathOptions {
|
|
2819
|
+
/** Bezier: how far the curve bends when it has to turn back. Default 0.25. */
|
|
2820
|
+
curvature?: number;
|
|
2821
|
+
/** Smoothstep: corner radius. Default 5 (0 for `step`). */
|
|
2822
|
+
borderRadius?: number;
|
|
2823
|
+
/** Smoothstep / step: how far the edge runs straight out of a handle before it turns. Default 20. */
|
|
2824
|
+
offset?: number;
|
|
2825
|
+
}
|
|
2826
|
+
/** A new link between two handles, as `(connect)` reports it. */
|
|
2827
|
+
interface FlowConnection {
|
|
2828
|
+
source: string;
|
|
2829
|
+
target: string;
|
|
2830
|
+
sourceHandle: string | null;
|
|
2831
|
+
targetHandle: string | null;
|
|
2832
|
+
}
|
|
2833
|
+
/** A handle as measured: its box relative to the node's top-left, in flow units. */
|
|
2834
|
+
interface FlowHandleBounds extends FlowRect {
|
|
2835
|
+
id: string | null;
|
|
2836
|
+
type: FlowHandleType;
|
|
2837
|
+
position: FlowPosition;
|
|
2838
|
+
}
|
|
2839
|
+
/** Where a node's handles are, by type. */
|
|
2840
|
+
interface FlowNodeHandles {
|
|
2841
|
+
source: FlowHandleBounds[];
|
|
2842
|
+
target: FlowHandleBounds[];
|
|
2843
|
+
}
|
|
2844
|
+
interface FlowNodePositionChange {
|
|
2845
|
+
type: 'position';
|
|
2846
|
+
id: string;
|
|
2847
|
+
/** Relative to the parent for child nodes. */
|
|
2848
|
+
position?: FlowXY;
|
|
2849
|
+
positionAbsolute?: FlowXY;
|
|
2850
|
+
dragging?: boolean;
|
|
2851
|
+
}
|
|
2852
|
+
interface FlowNodeDimensionChange {
|
|
2853
|
+
type: 'dimensions';
|
|
2854
|
+
id: string;
|
|
2855
|
+
dimensions?: FlowDimensions;
|
|
2856
|
+
/** True while the resizer is busy. */
|
|
2857
|
+
resizing?: boolean;
|
|
2858
|
+
/** Also set `width` / `height` on the node (the resizer does; a plain measurement only sets `measured`). */
|
|
2859
|
+
setAttributes?: boolean | 'width' | 'height';
|
|
2860
|
+
}
|
|
2861
|
+
interface FlowSelectChange {
|
|
2862
|
+
type: 'select';
|
|
2863
|
+
id: string;
|
|
2864
|
+
selected: boolean;
|
|
2865
|
+
}
|
|
2866
|
+
interface FlowRemoveChange {
|
|
2867
|
+
type: 'remove';
|
|
2868
|
+
id: string;
|
|
2869
|
+
}
|
|
2870
|
+
interface FlowAddChange<T> {
|
|
2871
|
+
type: 'add';
|
|
2872
|
+
item: T;
|
|
2873
|
+
/** Insert at this index (default: at the end). */
|
|
2874
|
+
index?: number;
|
|
2875
|
+
}
|
|
2876
|
+
interface FlowReplaceChange<T> {
|
|
2877
|
+
type: 'replace';
|
|
2878
|
+
id: string;
|
|
2879
|
+
item: T;
|
|
2880
|
+
}
|
|
2881
|
+
type FlowNodeChange<N extends FlowNode = FlowNode> = FlowNodePositionChange | FlowNodeDimensionChange | FlowSelectChange | FlowRemoveChange | FlowAddChange<N> | FlowReplaceChange<N>;
|
|
2882
|
+
type FlowEdgeChange<E extends FlowEdge = FlowEdge> = FlowSelectChange | FlowRemoveChange | FlowAddChange<E> | FlowReplaceChange<E>;
|
|
2883
|
+
/** The whole diagram, as `toJSON()` writes it and `fromJSON()` reads it. */
|
|
2884
|
+
interface FlowJSON<N extends FlowNode = FlowNode, E extends FlowEdge = FlowEdge> {
|
|
2885
|
+
nodes: N[];
|
|
2886
|
+
edges: E[];
|
|
2887
|
+
viewport: FlowViewport;
|
|
2888
|
+
}
|
|
2889
|
+
|
|
2890
|
+
/** wu-flow: rectangles, snapping, extents, handle points, hit-testing, alignment guides and the resizer's maths. */
|
|
2891
|
+
|
|
2892
|
+
declare const flowClamp: (v: number, lo: number, hi: number) => number;
|
|
2893
|
+
declare function rectToBox(r: FlowRect): FlowBox;
|
|
2894
|
+
declare function boxToRect(b: FlowBox): FlowRect;
|
|
2895
|
+
/** The smallest rectangle holding every rectangle given; `null` for none. */
|
|
2896
|
+
declare function getBoundsOfRects(rects: readonly FlowRect[]): FlowRect | null;
|
|
2897
|
+
/** The rectangle between two corners, whichever way round (a selection box dragged up and left). */
|
|
2898
|
+
declare function rectFromPoints(a: FlowXY, b: FlowXY): FlowRect;
|
|
2899
|
+
/** Area the two rectangles share (0 when they only touch). */
|
|
2900
|
+
declare function overlapArea(a: FlowRect, b: FlowRect): number;
|
|
2901
|
+
/** `inner` lies wholly inside `outer` (edges may touch). */
|
|
2902
|
+
declare function rectContains(outer: FlowRect, inner: FlowRect): boolean;
|
|
2903
|
+
/** The rectangles overlap or touch. A zero-size rectangle (an unmeasured node) counts when it lies on or in the other. */
|
|
2904
|
+
declare function rectsIntersect(a: FlowRect, b: FlowRect): boolean;
|
|
2905
|
+
declare function pointInRect(p: FlowXY, r: FlowRect): boolean;
|
|
2906
|
+
declare function expandRect(r: FlowRect, by: number): FlowRect;
|
|
2907
|
+
declare function rectCenter(r: FlowRect): FlowXY;
|
|
2908
|
+
/** Rounds a position to the grid (`[15, 15]` = every 15 flow units). A grid step of 0 or less leaves that axis alone. */
|
|
2909
|
+
declare function snapPosition(p: FlowXY, grid: readonly [number, number] | number): FlowXY;
|
|
2910
|
+
/**
|
|
2911
|
+
* Keeps a box of `size` with its top-left at `p` inside `extent`. A box larger than the extent sticks to its top-left.
|
|
2912
|
+
* No extent: unchanged.
|
|
2913
|
+
*/
|
|
2914
|
+
declare function clampPosition(p: FlowXY, extent: FlowCoordinateExtent | null | undefined, size?: FlowDimensions): FlowXY;
|
|
2915
|
+
/** A well-formed extent from app input (`[[x1, y1], [x2, y2]]`), else null. Infinite values are allowed. */
|
|
2916
|
+
declare function normalizeExtent(v: unknown): FlowCoordinateExtent | null;
|
|
2917
|
+
/** The way out of a handle on `position`, as a unit vector. */
|
|
2918
|
+
declare function positionVector(position: FlowPosition): FlowXY;
|
|
2919
|
+
declare function oppositePosition(position: FlowPosition): FlowPosition;
|
|
2920
|
+
declare function isFlowPosition(v: unknown): v is FlowPosition;
|
|
2921
|
+
/**
|
|
2922
|
+
* Where an edge meets a handle: centred on the handle, on its outer side (the side facing away from the node), so an
|
|
2923
|
+
* arrowhead stays visible next to the dot. `node` is the node's absolute top-left.
|
|
2924
|
+
*/
|
|
2925
|
+
declare function handlePoint(node: FlowXY, handle: Pick<FlowHandleBounds, 'x' | 'y' | 'width' | 'height' | 'position'>): FlowXY;
|
|
2926
|
+
/** The middle of a node's side: where an edge attaches to a node that has no handle of the type it needs. */
|
|
2927
|
+
declare function sidePoint(rect: FlowRect, position: FlowPosition): FlowXY;
|
|
2928
|
+
/** A handle of a node, with the node it is on and its centre in flow coordinates (for hit-testing). */
|
|
2929
|
+
interface FlowHandleRef {
|
|
2930
|
+
nodeId: string;
|
|
2931
|
+
id: string | null;
|
|
2932
|
+
type: FlowHandleType;
|
|
2933
|
+
position: FlowPosition;
|
|
2934
|
+
/** Centre of the handle in flow coordinates. */
|
|
2935
|
+
x: number;
|
|
2936
|
+
y: number;
|
|
2937
|
+
}
|
|
2938
|
+
/** The handle on `nodeId` with `id` (any handle of `type` when id is null), else null. */
|
|
2939
|
+
declare function findHandle<H extends {
|
|
2940
|
+
id: string | null;
|
|
2941
|
+
type: FlowHandleType;
|
|
2942
|
+
}>(handles: readonly H[], id: string | null | undefined, type?: FlowHandleType): H | null;
|
|
2943
|
+
/** Same handle (node, id and type). */
|
|
2944
|
+
declare function sameHandle(a: Pick<FlowHandleRef, 'nodeId' | 'id' | 'type'> | null | undefined, b: Pick<FlowHandleRef, 'nodeId' | 'id' | 'type'> | null | undefined): boolean;
|
|
2945
|
+
/**
|
|
2946
|
+
* Whether a connection dragged from `from` may end on `to`: never the same handle; in strict mode only a source onto a
|
|
2947
|
+
* target (or the other way round); in loose mode anything else.
|
|
2948
|
+
*/
|
|
2949
|
+
declare function handlesCompatible(from: Pick<FlowHandleRef, 'nodeId' | 'id' | 'type'>, to: Pick<FlowHandleRef, 'nodeId' | 'id' | 'type'>, mode?: FlowConnectionMode): boolean;
|
|
2950
|
+
/**
|
|
2951
|
+
* The connection between two handles, the source end first: dragging from a target handle makes the handle it ends on
|
|
2952
|
+
* the source.
|
|
2953
|
+
*/
|
|
2954
|
+
declare function connectionBetween(from: Pick<FlowHandleRef, 'nodeId' | 'id' | 'type'>, to: Pick<FlowHandleRef, 'nodeId' | 'id' | 'type'>): {
|
|
2955
|
+
source: string;
|
|
2956
|
+
sourceHandle: string | null;
|
|
2957
|
+
target: string;
|
|
2958
|
+
targetHandle: string | null;
|
|
2959
|
+
};
|
|
2960
|
+
/**
|
|
2961
|
+
* The nearest handle to `p` within `radius` (flow units) that `accept` takes, or null. Ties go to the handle listed first.
|
|
2962
|
+
*/
|
|
2963
|
+
declare function nearestHandle<H extends {
|
|
2964
|
+
x: number;
|
|
2965
|
+
y: number;
|
|
2966
|
+
}>(p: FlowXY, handles: readonly H[], radius: number, accept?: (h: H) => boolean): H | null;
|
|
2967
|
+
/**
|
|
2968
|
+
* How far to pan per frame while a drag is near the pane's border: up to `speed` px, more the closer to the border
|
|
2969
|
+
* (within `margin` px). The pane moves the other way so what is under the pointer keeps up. `p` and `pane` are in screen
|
|
2970
|
+
* pixels relative to the pane.
|
|
2971
|
+
*/
|
|
2972
|
+
declare function autoPanVelocity(p: FlowXY, pane: FlowDimensions, speed?: number, margin?: number): FlowXY;
|
|
2973
|
+
/** A guide line drawn while dragging: vertical (`x`, from `from` to `to` on y) or horizontal (`y`, from / to on x). */
|
|
2974
|
+
interface FlowGuide {
|
|
2975
|
+
orientation: 'vertical' | 'horizontal';
|
|
2976
|
+
/** x of a vertical guide, y of a horizontal one. */
|
|
2977
|
+
at: number;
|
|
2978
|
+
from: number;
|
|
2979
|
+
to: number;
|
|
2980
|
+
}
|
|
2981
|
+
interface FlowAlignment {
|
|
2982
|
+
/** Move the dragged box by this much to line it up (0 when nothing is close enough). */
|
|
2983
|
+
dx: number;
|
|
2984
|
+
dy: number;
|
|
2985
|
+
guides: FlowGuide[];
|
|
2986
|
+
}
|
|
2987
|
+
/**
|
|
2988
|
+
* Lines a dragged box up with the others: the nearest left / centre / right (and top / middle / bottom) edge within
|
|
2989
|
+
* `threshold` wins on each axis. Returns the nudge and the guide lines to draw (spanning both boxes).
|
|
2990
|
+
*/
|
|
2991
|
+
declare function alignmentGuides(moving: FlowRect, others: readonly FlowRect[], threshold: number): FlowAlignment;
|
|
2992
|
+
/** Which corner or side of the resizer is being dragged. */
|
|
2993
|
+
type FlowResizeDirection = 'top-left' | 'top' | 'top-right' | 'right' | 'bottom-right' | 'bottom' | 'bottom-left' | 'left';
|
|
2994
|
+
interface FlowResizeLimits {
|
|
2995
|
+
minWidth?: number;
|
|
2996
|
+
minHeight?: number;
|
|
2997
|
+
maxWidth?: number;
|
|
2998
|
+
maxHeight?: number;
|
|
2999
|
+
/** Keep the starting width / height ratio. */
|
|
3000
|
+
keepAspectRatio?: boolean;
|
|
3001
|
+
}
|
|
3002
|
+
/**
|
|
3003
|
+
* The box after dragging the resizer's `direction` handle by (dx, dy) flow units from `start`. The opposite corner or
|
|
3004
|
+
* side stays put; sizes stay within the limits (min 10 × 10 by default) and the ratio holds with `keepAspectRatio`.
|
|
3005
|
+
*/
|
|
3006
|
+
declare function resizeBox(start: FlowRect, direction: FlowResizeDirection, dx: number, dy: number, limits?: FlowResizeLimits): FlowRect;
|
|
3007
|
+
|
|
3008
|
+
declare const FLOW_DEFAULT_VIEWPORT: FlowViewport;
|
|
3009
|
+
declare function clampZoom(zoom: number, minZoom?: number, maxZoom?: number): number;
|
|
3010
|
+
/** A viewport from app input (missing or broken values fall back to `fallback`). */
|
|
3011
|
+
declare function normalizeViewport(v: unknown, fallback?: FlowViewport): FlowViewport;
|
|
3012
|
+
declare function sameViewport(a: FlowViewport | null | undefined, b: FlowViewport | null | undefined, epsilon?: number): boolean;
|
|
3013
|
+
/** A point in the pane to flow coordinates. */
|
|
3014
|
+
declare function screenToFlow(p: FlowXY, vp: FlowViewport): FlowXY;
|
|
3015
|
+
/** A flow point to its place in the pane. */
|
|
3016
|
+
declare function flowToScreen(p: FlowXY, vp: FlowViewport): FlowXY;
|
|
3017
|
+
/** The part of the flow the pane shows, in flow coordinates. */
|
|
3018
|
+
declare function viewRect(vp: FlowViewport, pane: FlowDimensions): FlowRect;
|
|
3019
|
+
/** Zooms to `zoom` keeping the flow point under `anchor` (a pane point, e.g. the pointer) where it is. */
|
|
3020
|
+
declare function zoomAt(vp: FlowViewport, zoom: number, anchor: FlowXY, minZoom?: number, maxZoom?: number): FlowViewport;
|
|
3021
|
+
declare function panBy(vp: FlowViewport, dx: number, dy: number): FlowViewport;
|
|
3022
|
+
/**
|
|
3023
|
+
* Keeps the view inside `extent` (flow coordinates): it cannot be panned past the extent's borders, and an extent
|
|
3024
|
+
* smaller than the view stays centred.
|
|
3025
|
+
*/
|
|
3026
|
+
declare function constrainViewport(vp: FlowViewport, pane: FlowDimensions, extent: FlowCoordinateExtent | null | undefined): FlowViewport;
|
|
3027
|
+
/** Padding around fitted content: a fraction of the pane (`0.1` = 10%, the default) or pixels (`'24px'`). */
|
|
3028
|
+
type FlowPadding = number | string;
|
|
3029
|
+
/** Padding in px on each side for a pane of this size. */
|
|
3030
|
+
declare function paddingPx(padding: FlowPadding | null | undefined, pane: FlowDimensions): {
|
|
3031
|
+
x: number;
|
|
3032
|
+
y: number;
|
|
3033
|
+
};
|
|
3034
|
+
/**
|
|
3035
|
+
* The viewport that shows `bounds` whole and centred in a pane of `width` × `height`, zoomed as far as the padding and
|
|
3036
|
+
* the zoom limits allow.
|
|
3037
|
+
*/
|
|
3038
|
+
declare function getViewportForBounds(bounds: FlowRect, width: number, height: number, minZoom?: number, maxZoom?: number, padding?: FlowPadding): FlowViewport;
|
|
3039
|
+
/** The viewport with flow point (x, y) in the middle of the pane at `zoom`. */
|
|
3040
|
+
declare function viewportForCenter(x: number, y: number, zoom: number, pane: FlowDimensions): FlowViewport;
|
|
3041
|
+
/**
|
|
3042
|
+
* A step of an animated move from `from` to `to` (t from 0 to 1): the middle of the view travels in a straight line
|
|
3043
|
+
* while the zoom changes evenly on a log scale, so zooming out and back in looks steady.
|
|
3044
|
+
*/
|
|
3045
|
+
declare function interpolateViewport(from: FlowViewport, to: FlowViewport, t: number, pane: FlowDimensions): FlowViewport;
|
|
3046
|
+
/** Slow start, slow end. */
|
|
3047
|
+
declare function easeInOutCubic(t: number): number;
|
|
3048
|
+
/** A wheel delta in pixels, whatever unit the device reports (lines and pages too). */
|
|
3049
|
+
declare function wheelDeltaPx(delta: number, deltaMode: number): number;
|
|
3050
|
+
/**
|
|
3051
|
+
* How much one wheel event zooms: a factor above 1 zooms in. A trackpad pinch (Ctrl + wheel) is more sensitive than a
|
|
3052
|
+
* mouse wheel; a single big step is capped so a fast flick does not jump.
|
|
3053
|
+
*/
|
|
3054
|
+
declare function wheelZoomFactor(deltaY: number, deltaMode: number, pinch: boolean): number;
|
|
3055
|
+
|
|
3056
|
+
type FlowPathResult = [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number];
|
|
3057
|
+
interface FlowPathParams {
|
|
3058
|
+
sourceX: number;
|
|
3059
|
+
sourceY: number;
|
|
3060
|
+
/** Which way the edge leaves the source. Default `'bottom'`. */
|
|
3061
|
+
sourcePosition?: FlowPosition;
|
|
3062
|
+
targetX: number;
|
|
3063
|
+
targetY: number;
|
|
3064
|
+
/** Which way the edge enters the target (the side of the target handle). Default `'top'`. */
|
|
3065
|
+
targetPosition?: FlowPosition;
|
|
3066
|
+
}
|
|
3067
|
+
interface FlowBezierParams extends FlowPathParams {
|
|
3068
|
+
/** How far the curve swings out when the target lies behind the source. Default 0.25. */
|
|
3069
|
+
curvature?: number;
|
|
3070
|
+
}
|
|
3071
|
+
interface FlowSmoothStepParams extends FlowPathParams {
|
|
3072
|
+
/** Corner radius. Default 5; 0 draws square corners (the `step` edge). */
|
|
3073
|
+
borderRadius?: number;
|
|
3074
|
+
/** How far the edge runs straight out of each handle before turning. Default 20. */
|
|
3075
|
+
offset?: number;
|
|
3076
|
+
/** Where the middle segment runs (default: halfway between the ends). */
|
|
3077
|
+
centerX?: number;
|
|
3078
|
+
centerY?: number;
|
|
3079
|
+
}
|
|
3080
|
+
/** Up to 3 decimals, no `-0`: short, stable path strings. */
|
|
3081
|
+
declare function fmt(n: number): string;
|
|
3082
|
+
/** The middle of a straight line between the ends, with its offsets from the source. */
|
|
3083
|
+
declare function getEdgeCenter(sourceX: number, sourceY: number, targetX: number, targetY: number): [number, number, number, number];
|
|
3084
|
+
declare function getStraightPath(p: FlowPathParams): FlowPathResult;
|
|
3085
|
+
/** A point on a cubic curve. */
|
|
3086
|
+
declare function cubicPoint(p0: FlowXY, p1: FlowXY, p2: FlowXY, p3: FlowXY, t: number): FlowXY;
|
|
3087
|
+
declare function getBezierPath(p: FlowBezierParams): FlowPathResult;
|
|
3088
|
+
/** A bezier whose control points sit halfway between the ends along each handle's axis: a gentler S-curve. */
|
|
3089
|
+
declare function getSimpleBezierPath(p: FlowPathParams): FlowPathResult;
|
|
3090
|
+
/** Drops repeated points and the middle of three points on one line. */
|
|
3091
|
+
declare function simplifyPolyline(points: readonly FlowXY[]): FlowXY[];
|
|
3092
|
+
/**
|
|
3093
|
+
* The corner points of a right-angled route from the source to the target. It leaves the source along its handle's
|
|
3094
|
+
* direction and enters the target against the target handle's direction; when the ends face each other it turns once
|
|
3095
|
+
* in the middle, otherwise it first runs `offset` out of each handle so it never doubles back over a node's side.
|
|
3096
|
+
*/
|
|
3097
|
+
declare function getStepPoints(p: FlowSmoothStepParams): FlowXY[];
|
|
3098
|
+
/** Total length of a polyline and the point halfway along it. */
|
|
3099
|
+
declare function polylineMidpoint(points: readonly FlowXY[]): FlowXY;
|
|
3100
|
+
/** Path data through `points` with each corner rounded by up to `radius` (less where the segments are short). */
|
|
3101
|
+
declare function roundedPolylinePath(points: readonly FlowXY[], radius: number): string;
|
|
3102
|
+
declare function getSmoothStepPath(p: FlowSmoothStepParams): FlowPathResult;
|
|
3103
|
+
/** `smoothstep` with square corners. */
|
|
3104
|
+
declare function getStepPath(p: FlowSmoothStepParams): FlowPathResult;
|
|
3105
|
+
/** The built-in edge shapes. */
|
|
3106
|
+
declare const FLOW_EDGE_TYPES: readonly string[];
|
|
3107
|
+
/**
|
|
3108
|
+
* The path for an edge of `type` (unknown types, such as custom templates, get the bezier the template can use or
|
|
3109
|
+
* ignore). `options` carries `curvature`, `borderRadius` and `offset`.
|
|
3110
|
+
*/
|
|
3111
|
+
/**
|
|
3112
|
+
* `getEdgePath()` with room for arrowheads. A marker is drawn along the path's last (or first) few pixels, turned only
|
|
3113
|
+
* to the very end's direction, so on a curve that still bends there the line sticks out of the arrow's side. Curved
|
|
3114
|
+
* edges therefore stop `room.end` px before the target, out along its handle, and run straight in (the same at the
|
|
3115
|
+
* source with `room.start`): the arrowhead lies on a straight piece, and the curve meets it without a kink because it
|
|
3116
|
+
* already ends in that direction. Straight and right-angled edges already end straight and are left as they are.
|
|
3117
|
+
*/
|
|
3118
|
+
declare function getEdgePathWithRoom(type: string | null | undefined, p: FlowPathParams, options?: {
|
|
3119
|
+
curvature?: number;
|
|
3120
|
+
borderRadius?: number;
|
|
3121
|
+
offset?: number;
|
|
3122
|
+
}, room?: {
|
|
3123
|
+
start?: number;
|
|
3124
|
+
end?: number;
|
|
3125
|
+
}): FlowPathResult;
|
|
3126
|
+
declare function getEdgePath(type: string | null | undefined, p: FlowPathParams, options?: {
|
|
3127
|
+
curvature?: number;
|
|
3128
|
+
borderRadius?: number;
|
|
3129
|
+
offset?: number;
|
|
3130
|
+
}): FlowPathResult;
|
|
3131
|
+
|
|
3132
|
+
interface FlowEdgeEnds {
|
|
3133
|
+
sourceX: number;
|
|
3134
|
+
sourceY: number;
|
|
3135
|
+
sourcePosition: FlowPosition;
|
|
3136
|
+
targetX: number;
|
|
3137
|
+
targetY: number;
|
|
3138
|
+
targetPosition: FlowPosition;
|
|
3139
|
+
/** The edge used the handle it names (false: it fell back to the middle of the node's side). */
|
|
3140
|
+
sourceHandleFound: boolean;
|
|
3141
|
+
targetHandleFound: boolean;
|
|
3142
|
+
}
|
|
3143
|
+
/** A node as the edge sees it: the node, its box in flow coordinates and its measured handles. */
|
|
3144
|
+
interface FlowEdgeEndNode {
|
|
3145
|
+
node: FlowNode;
|
|
3146
|
+
rect: FlowRect;
|
|
3147
|
+
handles?: FlowNodeHandles | null;
|
|
3148
|
+
}
|
|
3149
|
+
/**
|
|
3150
|
+
* The two ends of an edge: at the named handles (centred on each, on its outer side), else at the first handle of the
|
|
3151
|
+
* right kind, else in the middle of the node's `sourcePosition` / `targetPosition` side (bottom / top by default).
|
|
3152
|
+
*/
|
|
3153
|
+
declare function getEdgeEnds(edge: Pick<FlowEdge, 'sourceHandle' | 'targetHandle'>, source: FlowEdgeEndNode, target: FlowEdgeEndNode): FlowEdgeEnds;
|
|
3154
|
+
/** A marker with every field filled in (`color` stays undefined: the edge's own stroke colour). */
|
|
3155
|
+
interface FlowResolvedMarker {
|
|
3156
|
+
type: 'arrow' | 'arrowclosed';
|
|
3157
|
+
color: string | undefined;
|
|
3158
|
+
width: number;
|
|
3159
|
+
height: number;
|
|
3160
|
+
strokeWidth: number;
|
|
3161
|
+
}
|
|
3162
|
+
/** `'arrow'` / `'arrowclosed'` / `{ type, color, … }` with defaults, or null for none. */
|
|
3163
|
+
declare function normalizeMarker(marker: FlowMarker | null | undefined): FlowResolvedMarker | null;
|
|
3164
|
+
/** A stable element id for a marker (one `<marker>` per distinct look). */
|
|
3165
|
+
declare function markerId(prefix: string, m: FlowResolvedMarker): string;
|
|
3166
|
+
/**
|
|
3167
|
+
* The arrowhead drawn inside a marker: a 20 × 20 box with the tip at (17, 10), pointing along the edge — short and
|
|
3168
|
+
* wide with rounded corners (the path is stroked with round joins), so it reads as part of the line. The closed
|
|
3169
|
+
* arrow is filled; the open one is a stroked chevron.
|
|
3170
|
+
*/
|
|
3171
|
+
declare const FLOW_MARKER_VIEWBOX = "0 0 20 20";
|
|
3172
|
+
declare const FLOW_MARKER_REF: {
|
|
3173
|
+
x: number;
|
|
3174
|
+
y: number;
|
|
3175
|
+
};
|
|
3176
|
+
/** How far back from the end of its edge an arrowhead reaches, in px (a little more, so the curve joins behind it). */
|
|
3177
|
+
declare function markerLength(marker: FlowMarker | null | undefined): number;
|
|
3178
|
+
declare function markerShape(type: 'arrow' | 'arrowclosed'): string;
|
|
3179
|
+
/** The markers a set of edges needs, one per distinct look, with their ids. */
|
|
3180
|
+
declare function collectMarkers(edges: readonly Pick<FlowEdge, 'markerStart' | 'markerEnd'>[], prefix: string, defaultColor?: string): (FlowResolvedMarker & {
|
|
3181
|
+
id: string;
|
|
3182
|
+
})[];
|
|
3183
|
+
|
|
3184
|
+
/** Sizes the flow measured on screen, by node id (they win over what the node objects say). */
|
|
3185
|
+
type FlowSizeLookup = ReadonlyMap<string, FlowDimensions>;
|
|
3186
|
+
/** Looks like a node: an id and a position, and no source / target. */
|
|
3187
|
+
declare function isNode(v: unknown): v is FlowNode;
|
|
3188
|
+
/** Looks like an edge: an id, a source and a target. */
|
|
3189
|
+
declare function isEdge(v: unknown): v is FlowEdge;
|
|
3190
|
+
declare function nodeLookup<N extends FlowNode>(nodes: readonly N[]): Map<string, N>;
|
|
3191
|
+
/** Width / height to use for a node: measured on screen, else what the node says, else its initial size, else 0. */
|
|
3192
|
+
declare function nodeSize(node: FlowNode, sizes?: FlowSizeLookup | null): FlowDimensions;
|
|
3193
|
+
/** The node has a size to draw with (measured, set or initial). */
|
|
3194
|
+
declare function hasSize(node: FlowNode, sizes?: FlowSizeLookup | null): boolean;
|
|
3195
|
+
/**
|
|
3196
|
+
* A node's position in flow coordinates, adding up its parents' positions. A parent that does not exist, or a loop of
|
|
3197
|
+
* parents, ends the climb.
|
|
3198
|
+
*/
|
|
3199
|
+
declare function absolutePosition(node: FlowNode, lookup: ReadonlyMap<string, FlowNode>): FlowXY;
|
|
3200
|
+
/** Absolute positions of every node, by id. */
|
|
3201
|
+
declare function absolutePositions(nodes: readonly FlowNode[], lookup?: ReadonlyMap<string, FlowNode>): Map<string, FlowXY>;
|
|
3202
|
+
/** A node's box in flow coordinates. */
|
|
3203
|
+
declare function nodeRect(node: FlowNode, lookup?: ReadonlyMap<string, FlowNode> | null, sizes?: FlowSizeLookup | null): FlowRect;
|
|
3204
|
+
interface FlowBoundsOptions {
|
|
3205
|
+
/** All nodes, so child nodes in `nodes` are placed by their parents (default: `nodes` itself). */
|
|
3206
|
+
nodes?: readonly FlowNode[];
|
|
3207
|
+
sizes?: FlowSizeLookup | null;
|
|
3208
|
+
/** Count hidden nodes too. Default true (React-style helpers count every node passed in). */
|
|
3209
|
+
includeHidden?: boolean;
|
|
3210
|
+
}
|
|
3211
|
+
/** The box around the nodes, in flow coordinates; `{ x: 0, y: 0, width: 0, height: 0 }` for none. */
|
|
3212
|
+
declare function getNodesBounds(nodes: readonly FlowNode[], options?: FlowBoundsOptions): FlowRect;
|
|
3213
|
+
/** Nodes with an edge into `node`. */
|
|
3214
|
+
declare function getIncomers<N extends FlowNode>(node: string | {
|
|
3215
|
+
id: string;
|
|
3216
|
+
}, nodes: readonly N[], edges: readonly FlowEdge[]): N[];
|
|
3217
|
+
/** Nodes `node` has an edge to. */
|
|
3218
|
+
declare function getOutgoers<N extends FlowNode>(node: string | {
|
|
3219
|
+
id: string;
|
|
3220
|
+
}, nodes: readonly N[], edges: readonly FlowEdge[]): N[];
|
|
3221
|
+
/** Edges that start or end at any of the nodes. */
|
|
3222
|
+
declare function getConnectedEdges<E extends FlowEdge>(nodes: readonly (string | {
|
|
3223
|
+
id: string;
|
|
3224
|
+
})[], edges: readonly E[]): E[];
|
|
3225
|
+
/** The ids of a node's children, grandchildren and so on. */
|
|
3226
|
+
declare function getDescendants(id: string, nodes: readonly FlowNode[]): Set<string>;
|
|
3227
|
+
/** Number of parents above a node (0 for a top-level node). */
|
|
3228
|
+
declare function nodeDepth(node: FlowNode, lookup: ReadonlyMap<string, FlowNode>): number;
|
|
3229
|
+
/** The same nodes with every parent ahead of its children (otherwise in the given order). */
|
|
3230
|
+
declare function sortNodesParentsFirst<N extends FlowNode>(nodes: readonly N[]): N[];
|
|
3231
|
+
interface FlowZOptions {
|
|
3232
|
+
/** Raise selected nodes above the rest. Default true. */
|
|
3233
|
+
elevateOnSelect?: boolean;
|
|
3234
|
+
/** How much a selected node is raised. Default 1000. */
|
|
3235
|
+
selectedZ?: number;
|
|
3236
|
+
}
|
|
3237
|
+
/** The stacking order of each node: its `zIndex`, raised when selected, and always above its parent. */
|
|
3238
|
+
declare function computeNodeZ(nodes: readonly FlowNode[], options?: FlowZOptions): Map<string, number>;
|
|
3239
|
+
interface FlowInsideOptions {
|
|
3240
|
+
/** Count a node that only overlaps the box. Default false: it must lie wholly inside. */
|
|
3241
|
+
partially?: boolean;
|
|
3242
|
+
nodes?: readonly FlowNode[];
|
|
3243
|
+
sizes?: FlowSizeLookup | null;
|
|
3244
|
+
/** Leave out hidden nodes. Default true. */
|
|
3245
|
+
excludeHidden?: boolean;
|
|
3246
|
+
}
|
|
3247
|
+
/** Nodes inside a box in flow coordinates (box selection). */
|
|
3248
|
+
declare function getNodesInside<N extends FlowNode>(nodes: readonly N[], rect: FlowRect, options?: FlowInsideOptions): N[];
|
|
3249
|
+
/**
|
|
3250
|
+
* Nodes overlapping `target` (a node, its id, or a box), not counting the node itself. `partially` false asks for
|
|
3251
|
+
* nodes wholly inside it.
|
|
3252
|
+
*/
|
|
3253
|
+
declare function getIntersectingNodes<N extends FlowNode>(target: string | FlowNode | FlowRect, nodes: readonly N[], partially?: boolean, sizes?: FlowSizeLookup | null): N[];
|
|
3254
|
+
/** What removing these really removes: the nodes (if deletable), their children, and every edge left hanging. */
|
|
3255
|
+
declare function getElementsToRemove<N extends FlowNode, E extends FlowEdge>(input: {
|
|
3256
|
+
nodesToRemove?: readonly (string | {
|
|
3257
|
+
id: string;
|
|
3258
|
+
})[];
|
|
3259
|
+
edgesToRemove?: readonly (string | {
|
|
3260
|
+
id: string;
|
|
3261
|
+
})[];
|
|
3262
|
+
nodes: readonly N[];
|
|
3263
|
+
edges: readonly E[];
|
|
3264
|
+
}): {
|
|
3265
|
+
nodes: N[];
|
|
3266
|
+
edges: E[];
|
|
3267
|
+
};
|
|
3268
|
+
/** The nodes to move when these are dragged together: a node whose parent (or grandparent…) also moves rides along. */
|
|
3269
|
+
declare function dragRoots(ids: Iterable<string>, lookup: ReadonlyMap<string, FlowNode>): string[];
|
|
3270
|
+
/**
|
|
3271
|
+
* How a parent grows to hold a child at `child` (relative position) of `childSize`: `x` / `y` are how far the parent
|
|
3272
|
+
* moves (0 or negative: its children move the other way to stay put), `width` / `height` its new size. Null when the
|
|
3273
|
+
* child already fits.
|
|
3274
|
+
*/
|
|
3275
|
+
declare function expandParentBox(child: FlowXY, childSize: FlowDimensions, parentSize: FlowDimensions): FlowRect | null;
|
|
3276
|
+
/**
|
|
3277
|
+
* Which nodes to draw for `view` (flow coordinates) with `buffer` flow units to spare. Nodes without a size yet are
|
|
3278
|
+
* always drawn, so they can be measured.
|
|
3279
|
+
*/
|
|
3280
|
+
declare function getVisibleNodeIds(nodes: readonly FlowNode[], view: FlowRect, options?: {
|
|
3281
|
+
buffer?: number;
|
|
3282
|
+
sizes?: FlowSizeLookup | null;
|
|
3283
|
+
positions?: ReadonlyMap<string, FlowXY>;
|
|
3284
|
+
}): Set<string>;
|
|
3285
|
+
/** An edge is worth drawing when the box around its ends (plus `margin` for the curve) meets the view. */
|
|
3286
|
+
declare function isEdgeVisible(source: FlowXY, target: FlowXY, view: FlowRect, margin?: number): boolean;
|
|
3287
|
+
|
|
3288
|
+
/**
|
|
3289
|
+
* wu-flow: the change lists the flow reports (`(nodeChanges)`, `(edgeChanges)`) and the pure helpers that apply them,
|
|
3290
|
+
* for apps that keep the nodes and edges themselves (`[applyChanges]="false"`). Nothing is mutated: changed items are
|
|
3291
|
+
* copied, the rest keep their identity, so OnPush views and memoised selectors see exactly what changed.
|
|
3292
|
+
*/
|
|
3293
|
+
|
|
3294
|
+
/** Applies node changes (position, dimensions, select, remove, add, replace) and returns the new list. */
|
|
3295
|
+
declare function applyNodeChanges<N extends FlowNode = FlowNode>(changes: readonly FlowNodeChange<N>[], nodes: readonly N[]): N[];
|
|
3296
|
+
/** Applies edge changes (select, remove, add, replace) and returns the new list. */
|
|
3297
|
+
declare function applyEdgeChanges<E extends FlowEdge = FlowEdge>(changes: readonly FlowEdgeChange<E>[], edges: readonly E[]): E[];
|
|
3298
|
+
/** The id `addEdge` gives a connection without one. */
|
|
3299
|
+
declare function flowEdgeId(c: Pick<FlowConnection, 'source' | 'target'> & {
|
|
3300
|
+
sourceHandle?: string | null;
|
|
3301
|
+
targetHandle?: string | null;
|
|
3302
|
+
}): string;
|
|
3303
|
+
/**
|
|
3304
|
+
* Adds an edge (or a connection, which becomes an edge with `defaults` such as `type` or `markerEnd`). A link that is
|
|
3305
|
+
* already there between the same handles is not added twice; an incomplete one is ignored.
|
|
3306
|
+
*/
|
|
3307
|
+
declare function addEdge<E extends FlowEdge = FlowEdge>(edge: E | FlowConnection | (Partial<E> & FlowConnection), edges: readonly E[], defaults?: Partial<E>): E[];
|
|
3308
|
+
/**
|
|
3309
|
+
* Moves an end of `oldEdge` (an edge or its id) to the handles of `connection`. The edge keeps its other settings and,
|
|
3310
|
+
* unless `shouldReplaceId` is false, gets the id a new connection would. Returns the list unchanged if the edge is
|
|
3311
|
+
* not there.
|
|
3312
|
+
*/
|
|
3313
|
+
declare function reconnectEdge<E extends FlowEdge = FlowEdge>(oldEdge: E | string, connection: FlowConnection, edges: readonly E[], options?: {
|
|
3314
|
+
shouldReplaceId?: boolean;
|
|
3315
|
+
}): E[];
|
|
3316
|
+
/** The older name of `reconnectEdge`. */
|
|
3317
|
+
declare const updateEdge: typeof reconnectEdge;
|
|
3318
|
+
/** Select changes that make exactly `ids` selected (only items whose state changes are listed). */
|
|
3319
|
+
declare function selectionChanges(items: readonly {
|
|
3320
|
+
id: string;
|
|
3321
|
+
selected?: boolean;
|
|
3322
|
+
selectable?: boolean;
|
|
3323
|
+
}[], ids: Iterable<string>, canSelect?: (item: {
|
|
3324
|
+
id: string;
|
|
3325
|
+
selectable?: boolean;
|
|
3326
|
+
}) => boolean): {
|
|
3327
|
+
type: 'select';
|
|
3328
|
+
id: string;
|
|
3329
|
+
selected: boolean;
|
|
3330
|
+
}[];
|
|
3331
|
+
/** Structural equality for plain data (objects, arrays, primitives); other objects compare by identity. */
|
|
3332
|
+
declare function flowDeepEqual(a: unknown, b: unknown): boolean;
|
|
3333
|
+
/**
|
|
3334
|
+
* The changes that turn `prev` into `next` (by id): `remove` for the ones gone, `replace` for the ones that differ,
|
|
3335
|
+
* `add` (at their index) for new ones. Used to report a restore (undo, fromJSON) as a change list.
|
|
3336
|
+
*/
|
|
3337
|
+
declare function diffItems<T extends {
|
|
3338
|
+
id: string;
|
|
3339
|
+
}>(prev: readonly T[], next: readonly T[]): ({
|
|
3340
|
+
type: 'remove';
|
|
3341
|
+
id: string;
|
|
3342
|
+
} | {
|
|
3343
|
+
type: 'replace';
|
|
3344
|
+
id: string;
|
|
3345
|
+
item: T;
|
|
3346
|
+
} | {
|
|
3347
|
+
type: 'add';
|
|
3348
|
+
item: T;
|
|
3349
|
+
index: number;
|
|
3350
|
+
})[];
|
|
3351
|
+
|
|
3352
|
+
/** A node taking part in a drag, as it was when the drag started. */
|
|
3353
|
+
interface FlowDragItem {
|
|
3354
|
+
id: string;
|
|
3355
|
+
/** Absolute position at the start. */
|
|
3356
|
+
start: FlowXY;
|
|
3357
|
+
size: FlowDimensions;
|
|
3358
|
+
/** Parent's absolute position and size (child nodes only). */
|
|
3359
|
+
parentPosition?: FlowXY | null;
|
|
3360
|
+
parentSize?: FlowDimensions | null;
|
|
3361
|
+
extent?: 'parent' | FlowCoordinateExtent | null;
|
|
3362
|
+
expandParent?: boolean;
|
|
3363
|
+
}
|
|
3364
|
+
interface FlowDragOptions {
|
|
3365
|
+
/** Snap each node's position to this grid. */
|
|
3366
|
+
snapGrid?: readonly [number, number] | null;
|
|
3367
|
+
/** Where top-level nodes may go (flow coordinates). */
|
|
3368
|
+
nodeExtent?: FlowCoordinateExtent | null;
|
|
3369
|
+
}
|
|
3370
|
+
interface FlowDragResult {
|
|
3371
|
+
/** Relative to the parent for child nodes. */
|
|
3372
|
+
position: FlowXY;
|
|
3373
|
+
absolute: FlowXY;
|
|
3374
|
+
}
|
|
3375
|
+
/**
|
|
3376
|
+
* Where each dragged node goes when the pointer has moved `delta` flow units: snapped to the grid, kept inside its
|
|
3377
|
+
* parent (`extent: 'parent'`; with `expandParent` only the top / left border holds, the parent grows the other way),
|
|
3378
|
+
* inside its own extent (relative to the parent for children) or the flow's `nodeExtent` (top-level nodes).
|
|
3379
|
+
*/
|
|
3380
|
+
declare function dragPositions(items: readonly FlowDragItem[], delta: FlowXY, options?: FlowDragOptions): Map<string, FlowDragResult>;
|
|
3381
|
+
/** The size a parent needs to hold a child at `child` (relative) of `childSize`, or null when it fits. Grows right / down. */
|
|
3382
|
+
declare function parentGrowth(child: FlowXY, childSize: FlowDimensions, parentSize: FlowDimensions): FlowDimensions | null;
|
|
3383
|
+
/** The pointer moved far enough (in screen px) to count as a drag rather than a click. */
|
|
3384
|
+
declare function pastThreshold(start: FlowXY, now: FlowXY, threshold: number): boolean;
|
|
3385
|
+
interface FlowBoxSelectOptions {
|
|
3386
|
+
/** `'full'`: a node must lie wholly inside the box (default); `'partial'`: touching it is enough. */
|
|
3387
|
+
mode?: 'full' | 'partial';
|
|
3388
|
+
sizes?: FlowSizeLookup | null;
|
|
3389
|
+
/** Ids that stay selected whatever the box covers (Shift held when it started). */
|
|
3390
|
+
keep?: Iterable<string>;
|
|
3391
|
+
/** Whether a node / edge can be selected at all. */
|
|
3392
|
+
nodeSelectable?: (n: FlowNode) => boolean;
|
|
3393
|
+
edgeSelectable?: (e: FlowEdge) => boolean;
|
|
3394
|
+
}
|
|
3395
|
+
/** What a selection box covers: the nodes inside it, and the edges with both ends selected. */
|
|
3396
|
+
declare function boxSelection(nodes: readonly FlowNode[], edges: readonly FlowEdge[], rect: FlowRect, options?: FlowBoxSelectOptions): {
|
|
3397
|
+
nodes: Set<string>;
|
|
3398
|
+
edges: Set<string>;
|
|
3399
|
+
};
|
|
3400
|
+
/**
|
|
3401
|
+
* A click on an item: with a multi-select key it toggles that item and keeps the rest; without, it becomes the only
|
|
3402
|
+
* selected item.
|
|
3403
|
+
*/
|
|
3404
|
+
declare function clickSelection(selected: ReadonlySet<string>, id: string, multi: boolean): Set<string>;
|
|
3405
|
+
/** A handle as the connection logic sees it. */
|
|
3406
|
+
interface FlowConnectHandle {
|
|
3407
|
+
nodeId: string;
|
|
3408
|
+
id: string | null;
|
|
3409
|
+
type: FlowHandleType;
|
|
3410
|
+
/** The handle may start a connection / take one. Default true. */
|
|
3411
|
+
connectableStart?: boolean;
|
|
3412
|
+
connectableEnd?: boolean;
|
|
3413
|
+
/** Most edges the handle takes (null / 0 = no limit). */
|
|
3414
|
+
limit?: number | null;
|
|
3415
|
+
}
|
|
3416
|
+
/** Edges already attached to a handle (either end, for loose connections). */
|
|
3417
|
+
declare function handleConnectionCount(edges: readonly FlowEdge[], h: Pick<FlowConnectHandle, 'nodeId' | 'id' | 'type'>, ignoreEdgeId?: string | null): number;
|
|
3418
|
+
/** A handle is full when it has `limit` edges already. */
|
|
3419
|
+
declare function handleIsFull(edges: readonly FlowEdge[], h: FlowConnectHandle, ignoreEdgeId?: string | null): boolean;
|
|
3420
|
+
interface FlowConnectRules {
|
|
3421
|
+
mode?: FlowConnectionMode;
|
|
3422
|
+
edges?: readonly FlowEdge[];
|
|
3423
|
+
/** The app's own rule. */
|
|
3424
|
+
isValidConnection?: ((c: FlowConnection) => boolean) | null;
|
|
3425
|
+
/** While reconnecting: the edge being moved (it does not count against limits or as a duplicate). */
|
|
3426
|
+
ignoreEdgeId?: string | null;
|
|
3427
|
+
/** Allow a second edge between the same two handles. Default false. */
|
|
3428
|
+
allowDuplicates?: boolean;
|
|
3429
|
+
}
|
|
3430
|
+
/**
|
|
3431
|
+
* The connection a drag from `from` would make by ending on `to`, or null when it may not: the same handle, two
|
|
3432
|
+
* sources in strict mode, a handle that does not take connections or is full, a link that is already there, or the
|
|
3433
|
+
* app's `isValidConnection` says no.
|
|
3434
|
+
*/
|
|
3435
|
+
declare function validConnection(from: FlowConnectHandle, to: FlowConnectHandle, rules?: FlowConnectRules): FlowConnection | null;
|
|
3436
|
+
/**
|
|
3437
|
+
* An edge's stacking order: its `zIndex` (raised when selected, with `elevateOnSelect`), and for edges between nodes
|
|
3438
|
+
* inside groups at least the level of those nodes, so the edge is not hidden behind the group's box.
|
|
3439
|
+
*/
|
|
3440
|
+
declare function edgeZIndex(edge: Pick<FlowEdge, 'zIndex' | 'selected'>, sourceZ: number, targetZ: number, nested: boolean, elevateOnSelect?: boolean): number;
|
|
3441
|
+
/** A key matches one of `codes` (by `key`, or by `code` for letters on any keyboard layout). `null` matches nothing. */
|
|
3442
|
+
declare function keyMatches(e: {
|
|
3443
|
+
key: string;
|
|
3444
|
+
code?: string;
|
|
3445
|
+
}, codes: string | readonly string[] | null | undefined): boolean;
|
|
3446
|
+
/** A multi-select modifier is held (Shift, Ctrl or ⌘ by default). */
|
|
3447
|
+
declare function multiKeyHeld(e: {
|
|
3448
|
+
shiftKey?: boolean;
|
|
3449
|
+
ctrlKey?: boolean;
|
|
3450
|
+
metaKey?: boolean;
|
|
3451
|
+
altKey?: boolean;
|
|
3452
|
+
}, keys?: string | readonly string[] | null | undefined): boolean;
|
|
3453
|
+
/** Arrow keys as a step: `{ x, y }` in units of `step` (Shift = ten times), or null for any other key. */
|
|
3454
|
+
declare function arrowStep(e: {
|
|
3455
|
+
key: string;
|
|
3456
|
+
shiftKey?: boolean;
|
|
3457
|
+
}, step?: number): FlowXY | null;
|
|
3458
|
+
/** The key event comes from somewhere the user is typing (an input, a text area, an editable element). */
|
|
3459
|
+
declare function isTypingTarget(target: unknown): boolean;
|
|
3460
|
+
interface FlowMinimapLayout {
|
|
3461
|
+
/** The part of the flow the minimap shows, in flow coordinates (its SVG viewBox). */
|
|
3462
|
+
viewBox: FlowRect;
|
|
3463
|
+
/** Flow units per minimap pixel. */
|
|
3464
|
+
scale: number;
|
|
3465
|
+
}
|
|
3466
|
+
/**
|
|
3467
|
+
* What a minimap of `width` × `height` px shows: the nodes and the view, whole, centred, with `margin` px to spare.
|
|
3468
|
+
*/
|
|
3469
|
+
declare function minimapLayout(content: FlowRect | null, view: FlowRect, width: number, height: number, margin?: number): FlowMinimapLayout;
|
|
3470
|
+
/** The mask over everything but the view: an outer rectangle with the view cut out (fill-rule evenodd). */
|
|
3471
|
+
declare function minimapMaskPath(viewBox: FlowRect, view: FlowRect): string;
|
|
3472
|
+
/** A point on the minimap (px from its top-left) in flow coordinates. */
|
|
3473
|
+
declare function minimapToFlow(p: FlowXY, layout: FlowMinimapLayout): FlowXY;
|
|
3474
|
+
type FlowBackgroundVariant = 'dots' | 'lines' | 'cross';
|
|
3475
|
+
interface FlowBackgroundPattern {
|
|
3476
|
+
/** Tile size and where the tiling starts, in screen px. */
|
|
3477
|
+
width: number;
|
|
3478
|
+
height: number;
|
|
3479
|
+
x: number;
|
|
3480
|
+
y: number;
|
|
3481
|
+
/** Dots: radius; lines / cross: path data (in tile coordinates). */
|
|
3482
|
+
radius: number;
|
|
3483
|
+
path: string;
|
|
3484
|
+
}
|
|
3485
|
+
/**
|
|
3486
|
+
* The repeating tile of a background for the viewport: dots, lines or crosses every `gap` flow units, lined up with the
|
|
3487
|
+
* flow's origin (plus `offset`), scaled with the zoom.
|
|
3488
|
+
*/
|
|
3489
|
+
declare function backgroundPattern(vp: FlowViewport, variant: FlowBackgroundVariant, gap?: number | readonly [number, number], size?: number, offset?: number | readonly [number, number]): FlowBackgroundPattern;
|
|
3490
|
+
|
|
3491
|
+
type FlowLayoutDirection = 'TB' | 'BT' | 'LR' | 'RL';
|
|
3492
|
+
interface FlowLayoutCommon {
|
|
3493
|
+
/** Top to bottom (default), bottom to top, left to right or right to left. */
|
|
3494
|
+
direction?: FlowLayoutDirection;
|
|
3495
|
+
/** Sizes measured on screen, by node id (the flow passes its own). */
|
|
3496
|
+
sizes?: FlowSizeLookup | null;
|
|
3497
|
+
/** Size of a node that has not been measured. Default 150 × 40. */
|
|
3498
|
+
defaultWidth?: number;
|
|
3499
|
+
defaultHeight?: number;
|
|
3500
|
+
/** Set each node's `sourcePosition` / `targetPosition` to suit the direction (TB: bottom / top). Default true. */
|
|
3501
|
+
setHandlePositions?: boolean;
|
|
3502
|
+
/** Where the top-left corner of the result goes. Default (0, 0). */
|
|
3503
|
+
origin?: FlowXY;
|
|
3504
|
+
}
|
|
3505
|
+
interface FlowLayoutOptions extends FlowLayoutCommon {
|
|
3506
|
+
/** Space between nodes in the same rank. Default 40. */
|
|
3507
|
+
nodeSep?: number;
|
|
3508
|
+
/** Space between ranks. Default 80. */
|
|
3509
|
+
rankSep?: number;
|
|
3510
|
+
/** Space between parts of the graph that are not connected. Default twice `nodeSep`. */
|
|
3511
|
+
componentSep?: number;
|
|
3512
|
+
/** Ordering sweeps. Default 8. */
|
|
3513
|
+
iterations?: number;
|
|
3514
|
+
}
|
|
3515
|
+
interface FlowTreeLayoutOptions extends FlowLayoutCommon {
|
|
3516
|
+
/** Space between neighbouring boxes on a level. Default 24. */
|
|
3517
|
+
nodeSep?: number;
|
|
3518
|
+
/** Space between levels. Default 60. */
|
|
3519
|
+
levelSep?: number;
|
|
3520
|
+
/** Pack subtrees by their outlines (default true); false keeps every subtree in its own column. */
|
|
3521
|
+
compact?: boolean;
|
|
3522
|
+
}
|
|
3523
|
+
/** Handle sides that suit a layout direction. */
|
|
3524
|
+
declare function layoutHandlePositions(direction: FlowLayoutDirection): {
|
|
3525
|
+
sourcePosition: FlowPosition;
|
|
3526
|
+
targetPosition: FlowPosition;
|
|
3527
|
+
};
|
|
3528
|
+
/** Crossings between consecutive layers, for links given as [upper, lower] keys. */
|
|
3529
|
+
declare function countCrossings(layers: readonly (readonly string[])[], linkList: readonly (readonly [string, string])[]): number;
|
|
3530
|
+
/**
|
|
3531
|
+
* Positions for items in a fixed order that come as close as possible to `wanted` (least squares) while consecutive
|
|
3532
|
+
* items stay at least `gaps[i]` apart (centre to centre). Pool-adjacent-violators on the shifted targets.
|
|
3533
|
+
*/
|
|
3534
|
+
declare function placeInOrder(wanted: readonly number[], gaps: readonly number[]): number[];
|
|
3535
|
+
/**
|
|
3536
|
+
* Lays out a directed graph in layers. Nodes inside a parent that is also passed keep their place in it (links to
|
|
3537
|
+
* them count as links to the parent). Returns the nodes in the same order with new positions (and handle sides).
|
|
3538
|
+
*/
|
|
3539
|
+
declare function layoutFlow<N extends FlowNode = FlowNode>(nodes: readonly N[], edges: readonly FlowEdge[], options?: FlowLayoutOptions): N[];
|
|
3540
|
+
/**
|
|
3541
|
+
* Lays out a tree (or a forest) for an org chart: an edge from A to B makes A the parent of B (a node's first parent
|
|
3542
|
+
* wins; extra links are drawn but do not move anything). Boxes on one level line up by their top edge (left edge for
|
|
3543
|
+
* LR). Returns the nodes in the same order with new positions (and handle sides).
|
|
3544
|
+
*/
|
|
3545
|
+
declare function layoutTree<N extends FlowNode = FlowNode>(nodes: readonly N[], edges: readonly FlowEdge[], options?: FlowTreeLayoutOptions): N[];
|
|
3546
|
+
|
|
3547
|
+
interface FlowSnapshot<N extends FlowNode = FlowNode, E extends FlowEdge = FlowEdge> {
|
|
3548
|
+
nodes: N[];
|
|
3549
|
+
edges: E[];
|
|
3550
|
+
}
|
|
3551
|
+
interface FlowHistoryOptions {
|
|
3552
|
+
/** Snapshots kept to go back to. Default 100. */
|
|
3553
|
+
limit?: number;
|
|
3554
|
+
/**
|
|
3555
|
+
* Keys left out of the snapshots (and of the comparison that skips a snapshot equal to the last): what the user
|
|
3556
|
+
* would not want undone. Default `selected`, `dragging`, `resizing` and `measured`.
|
|
3557
|
+
*/
|
|
3558
|
+
ignore?: readonly string[];
|
|
3559
|
+
}
|
|
3560
|
+
/**
|
|
3561
|
+
* A stack of snapshots. `push()` after each finished change (a drag that ended, a delete, a connection);
|
|
3562
|
+
* `undo()` / `redo()` return the snapshot to show, or null at either end. A snapshot equal to the current one (ignoring
|
|
3563
|
+
* selection and measuring) is not stored, so measuring or selecting never adds an undo step.
|
|
3564
|
+
*/
|
|
3565
|
+
declare class FlowHistory<N extends FlowNode = FlowNode, E extends FlowEdge = FlowEdge> {
|
|
3566
|
+
private past;
|
|
3567
|
+
private future;
|
|
3568
|
+
private present;
|
|
3569
|
+
private readonly limit;
|
|
3570
|
+
private readonly ignore;
|
|
3571
|
+
constructor(options?: FlowHistoryOptions);
|
|
3572
|
+
/** The snapshot shown now (null before the first push). */
|
|
3573
|
+
get current(): FlowSnapshot<N, E> | null;
|
|
3574
|
+
get canUndo(): boolean;
|
|
3575
|
+
get canRedo(): boolean;
|
|
3576
|
+
/** Steps back / forward available. */
|
|
3577
|
+
get undoSize(): number;
|
|
3578
|
+
get redoSize(): number;
|
|
3579
|
+
/** The snapshot as stored: copies without the ignored keys. */
|
|
3580
|
+
snapshot(nodes: readonly N[], edges: readonly E[]): FlowSnapshot<N, E>;
|
|
3581
|
+
/** Records a new state. Returns false (nothing stored) when it equals the current one. Clears the redo stack. */
|
|
3582
|
+
push(nodes: readonly N[], edges: readonly E[]): boolean;
|
|
3583
|
+
/** Starts afresh from this state (no undo steps). */
|
|
3584
|
+
reset(nodes?: readonly N[], edges?: readonly E[]): void;
|
|
3585
|
+
clear(): void;
|
|
3586
|
+
undo(): FlowSnapshot<N, E> | null;
|
|
3587
|
+
redo(): FlowSnapshot<N, E> | null;
|
|
3588
|
+
/** Fresh objects each time, so the app can change what it gets without touching the history. */
|
|
3589
|
+
private copy;
|
|
3590
|
+
}
|
|
3591
|
+
/** What a key press asks the history for: Ctrl/⌘ + Z undoes, Ctrl/⌘ + Shift + Z and Ctrl + Y redo. */
|
|
3592
|
+
declare function flowHistoryKey(e: {
|
|
3593
|
+
key: string;
|
|
3594
|
+
code?: string;
|
|
3595
|
+
ctrlKey?: boolean;
|
|
3596
|
+
metaKey?: boolean;
|
|
3597
|
+
shiftKey?: boolean;
|
|
3598
|
+
altKey?: boolean;
|
|
3599
|
+
}): 'undo' | 'redo' | null;
|
|
3600
|
+
|
|
3601
|
+
/** `{ nodes, edges, viewport }` ready for JSON.stringify (drag / resize flags left out). */
|
|
3602
|
+
declare function flowToJSON<N extends FlowNode, E extends FlowEdge>(nodes: readonly N[], edges: readonly E[], viewport?: FlowViewport): FlowJSON<N, E>;
|
|
3603
|
+
interface FlowFromJSONOptions {
|
|
3604
|
+
/** Leave out edges whose source or target node is missing. Default true. */
|
|
3605
|
+
dropDangling?: boolean;
|
|
3606
|
+
}
|
|
3607
|
+
/**
|
|
3608
|
+
* Reads what `flowToJSON` wrote (an object or its JSON text). Broken entries are left out: nodes need an id and a
|
|
3609
|
+
* position (a number id becomes text), edges an id, source and target; the first of two equal ids wins. Null when the
|
|
3610
|
+
* input is not a diagram at all.
|
|
3611
|
+
*/
|
|
3612
|
+
declare function flowFromJSON<N extends FlowNode = FlowNode, E extends FlowEdge = FlowEdge>(input: unknown, options?: FlowFromJSONOptions): FlowJSON<N, E> | null;
|
|
3613
|
+
interface FlowSvgOptions {
|
|
3614
|
+
/** Sizes measured on screen, by node id. */
|
|
3615
|
+
sizes?: FlowSizeLookup | null;
|
|
3616
|
+
/** Measured handles, by node id (edges then start and end where they do on screen). */
|
|
3617
|
+
handles?: ReadonlyMap<string, FlowNodeHandles> | null;
|
|
3618
|
+
/** Space around the drawing, in px. Default 20. */
|
|
3619
|
+
padding?: number;
|
|
3620
|
+
/** Fill behind everything; none (transparent) by default. */
|
|
3621
|
+
background?: string | null;
|
|
3622
|
+
nodeBackground?: string;
|
|
3623
|
+
nodeBorder?: string;
|
|
3624
|
+
nodeText?: string;
|
|
3625
|
+
/** Corner radius of node boxes. Default 6. */
|
|
3626
|
+
nodeRadius?: number;
|
|
3627
|
+
groupBackground?: string;
|
|
3628
|
+
edgeColor?: string;
|
|
3629
|
+
/** Default 1.5. */
|
|
3630
|
+
edgeWidth?: number;
|
|
3631
|
+
labelBackground?: string;
|
|
3632
|
+
labelColor?: string;
|
|
3633
|
+
fontFamily?: string;
|
|
3634
|
+
/** Default 12. */
|
|
3635
|
+
fontSize?: number;
|
|
3636
|
+
/** Text of a node box. Default: `data.label`, else the node's aria label, else nothing. */
|
|
3637
|
+
nodeLabel?: (node: FlowNode) => string | null | undefined;
|
|
3638
|
+
/** Shape for edges without a `type` (default bezier). */
|
|
3639
|
+
defaultEdgeType?: string;
|
|
3640
|
+
/** Size of a node that has not been measured. Default 150 × 40. */
|
|
3641
|
+
defaultWidth?: number;
|
|
3642
|
+
defaultHeight?: number;
|
|
3643
|
+
/** Also draw hidden nodes and edges. Default false. */
|
|
3644
|
+
includeHidden?: boolean;
|
|
3645
|
+
/** `<title>` of the drawing (read by screen readers). */
|
|
3646
|
+
title?: string;
|
|
3647
|
+
}
|
|
3648
|
+
/** About how wide a line of text is: Thai vowel and tone marks above and below the line take no room. */
|
|
3649
|
+
declare function estimateTextWidth(text: string, fontSize: number): number;
|
|
3650
|
+
/**
|
|
3651
|
+
* The diagram as an SVG document: edges with their arrowheads and labels, and each node as a rounded box with its
|
|
3652
|
+
* label (custom node templates are not reproduced). Colours are plain values so the file looks the same anywhere.
|
|
3653
|
+
*/
|
|
3654
|
+
declare function flowToSvg(nodes: readonly FlowNode[], edges: readonly FlowEdge[], options?: FlowSvgOptions): string;
|
|
3655
|
+
|
|
3656
|
+
/** The `WuLocale` keys wu-flow reads (Thai and English texts live in `thai/locale.ts`). */
|
|
3657
|
+
declare const FLOW_TEXT_KEYS: readonly ["flowLabel", "flowNode", "flowEdge", "flowSelectedState", "flowPaneHint", "flowNodeHint", "flowEdgeHint", "flowControls", "flowZoomIn", "flowZoomOut", "flowFitView", "flowLock", "flowUnlock", "flowMiniMap", "flowNodeToolbar", "flowUndo", "flowRedo", "flowSelected", "flowSelectionCleared", "flowMoved", "flowMovedMany", "flowResized", "flowConnectStart", "flowConnected", "flowConnectCancelled", "flowConnectInvalid", "flowReconnected", "flowDeleted", "flowEdgeFromTo", "flowZoomLevel"];
|
|
3658
|
+
type FlowTextKey = (typeof FLOW_TEXT_KEYS)[number];
|
|
3659
|
+
type FlowTexts = Pick<WuLocale, FlowTextKey>;
|
|
3660
|
+
/** A flow text from `locale` (any object with the keys, plus `code: 'th' | 'en'`), else the built-in Thai / English. */
|
|
3661
|
+
declare function flowText(locale: {
|
|
3662
|
+
code?: string;
|
|
3663
|
+
} | null | undefined, key: FlowTextKey): string;
|
|
3664
|
+
/** Fills `{name}` placeholders. Unknown ones stay as written. */
|
|
3665
|
+
declare function flowFormat(template: string, values: Record<string, string | number>): string;
|
|
3666
|
+
/** What a screen reader calls a node: `ariaLabel`, else `data.label`, else its id. */
|
|
3667
|
+
declare function flowNodeName(node: FlowNode | null | undefined): string;
|
|
3668
|
+
/** What a screen reader calls an edge: `ariaLabel`, else its label and ends ("From A to B"). */
|
|
3669
|
+
declare function flowEdgeName(edge: FlowEdge, source: FlowNode | null | undefined, target: FlowNode | null | undefined, locale?: {
|
|
3670
|
+
code?: string;
|
|
3671
|
+
} | null): string;
|
|
3672
|
+
|
|
3673
|
+
/** wu-chart: how values read on axes, labels and tooltips. */
|
|
3674
|
+
/**
|
|
3675
|
+
* `'number'` 1,234.5 · `'integer'` 1,235 · `'percent'` 12.3% (0.123 in) · `'currency'` ฿1,234 · `'compact'` 1.2 พัน /
|
|
3676
|
+
* 2.5 แสน / 98.8 ล้าน in Thai (1.2K / 98.8M in English) · `'date'` 14 พ.ค. 2569 (a time in ms) · or a function of your own.
|
|
3677
|
+
*/
|
|
3678
|
+
type ChartValueFormat = 'number' | 'integer' | 'percent' | 'currency' | 'compact' | 'date' | ((value: number) => string);
|
|
3679
|
+
interface ChartFormatOptions {
|
|
3680
|
+
/** `'th'` or `'en'` (any BCP 47 tag works for Intl). Default `'th'`. */
|
|
3681
|
+
lang?: string;
|
|
3682
|
+
/** Currency code for `'currency'`. Default `'THB'`. */
|
|
3683
|
+
currency?: string;
|
|
3684
|
+
/** Digits after the point; default: up to 2 (0 for `integer`, 1 for `percent` and `compact`). */
|
|
3685
|
+
decimals?: number;
|
|
3686
|
+
/** Text before / after every value: `suffix: ' คน'`. */
|
|
3687
|
+
prefix?: string;
|
|
3688
|
+
suffix?: string;
|
|
3689
|
+
}
|
|
3690
|
+
/** A value as the chart writes it. Not a number → `''`. */
|
|
3691
|
+
declare function formatChartValue(value: number | null | undefined, format?: ChartValueFormat | null | undefined, o?: ChartFormatOptions): string;
|
|
3692
|
+
|
|
3693
|
+
/** wu-chart: value axes with round steps, and category bands. */
|
|
3694
|
+
interface NiceScale {
|
|
3695
|
+
min: number;
|
|
3696
|
+
max: number;
|
|
3697
|
+
step: number;
|
|
3698
|
+
ticks: number[];
|
|
3699
|
+
}
|
|
3700
|
+
/** 1, 2, 2.5, 5 or 10 times a power of ten, the smallest that gives at most `count` steps. */
|
|
3701
|
+
declare function niceStep(span: number, count: number): number;
|
|
3702
|
+
/**
|
|
3703
|
+
* An axis from `lo` to `hi` with about `count` round steps that cover the data: `niceScale(3, 97, 5)` →
|
|
3704
|
+
* 0 … 100 by 20. `zero` keeps 0 on the axis (bars). Equal ends get a step of room either side.
|
|
3705
|
+
*/
|
|
3706
|
+
declare function niceScale(lo: number, hi: number, count?: number, zero?: boolean): NiceScale;
|
|
3707
|
+
/** Maps `value` in `[d0, d1]` onto `[r0, r1]`. */
|
|
3708
|
+
declare function scaleLinear(value: number, d0: number, d1: number, r0: number, r1: number): number;
|
|
3709
|
+
/** `count` equal bands across `[start, end]`, each with `padding` (0–1) of its width left empty around the bar. */
|
|
3710
|
+
declare function bands(count: number, start: number, end: number, padding?: number): {
|
|
3711
|
+
step: number;
|
|
3712
|
+
width: number;
|
|
3713
|
+
offset: (i: number) => number;
|
|
3714
|
+
};
|
|
3715
|
+
|
|
3716
|
+
/** wu-chart: SVG path data for lines, areas, slices and bars with rounded ends. */
|
|
3717
|
+
interface ChartPoint {
|
|
3718
|
+
x: number;
|
|
3719
|
+
y: number;
|
|
3720
|
+
}
|
|
3721
|
+
/** How a line goes from point to point: straight, a smooth curve, or steps (across, then up or down). */
|
|
3722
|
+
type ChartCurve = 'straight' | 'smooth' | 'step';
|
|
3723
|
+
/** Segments through the points; `null` gaps break the line. `curve`: `true` / `'smooth'`, `'step'`, else straight. */
|
|
3724
|
+
declare function linePath(points: (ChartPoint | null)[], curve?: boolean | ChartCurve): string;
|
|
3725
|
+
/** The line closed down to `baseline` (an area chart). */
|
|
3726
|
+
declare function areaPath(points: (ChartPoint | null)[], baseline: number, curve?: boolean | ChartCurve): string;
|
|
3727
|
+
/** An area between two lines (a stacked area): `upper` left to right, then `lower` back. */
|
|
3728
|
+
declare function bandPath(upper: ChartPoint[], lower: ChartPoint[], curve?: boolean | ChartCurve): string;
|
|
3729
|
+
/**
|
|
3730
|
+
* A smooth curve that never overshoots the data (monotone cubic, Fritsch–Carlson): a peak in the data stays the peak of
|
|
3731
|
+
* the curve, unlike a Catmull-Rom spline.
|
|
3732
|
+
*/
|
|
3733
|
+
declare function monotonePath(p: ChartPoint[]): string;
|
|
3734
|
+
/**
|
|
3735
|
+
* A pie or doughnut slice: angles in radians clockwise from 12 o'clock, `inner` 0 for a pie. A whole circle is drawn as
|
|
3736
|
+
* two halves (one arc cannot start and end at the same point).
|
|
3737
|
+
*/
|
|
3738
|
+
declare function arcPath(cx: number, cy: number, inner: number, outer: number, start: number, end: number): string;
|
|
3739
|
+
/** An open arc (a stroke, for radial bars and gauge tracks): angles in radians clockwise from 12 o'clock. */
|
|
3740
|
+
declare function arcLine(cx: number, cy: number, radius: number, start: number, end: number): string;
|
|
3741
|
+
/**
|
|
3742
|
+
* The biggest circle part from `start` to `end` (radians clockwise from 12 o'clock) that fits a `width` × `height` box
|
|
3743
|
+
* with `pad` around: its centre and radius. A half circle (a gauge) sits on the bottom edge instead of in the middle.
|
|
3744
|
+
*/
|
|
3745
|
+
declare function fitArc(width: number, height: number, start: number, end: number, pad?: number): {
|
|
3746
|
+
cx: number;
|
|
3747
|
+
cy: number;
|
|
3748
|
+
radius: number;
|
|
3749
|
+
};
|
|
3750
|
+
/** A point on a circle, angle clockwise from 12 o'clock. */
|
|
3751
|
+
declare function polar(cx: number, cy: number, radius: number, angle: number): ChartPoint;
|
|
3752
|
+
/**
|
|
3753
|
+
* A bar with its far end rounded: `x, y, w, h` the box, `radius` capped at half the width / height, `end` the side that is
|
|
3754
|
+
* rounded (`'top'` for a positive vertical bar, `'bottom'` negative, `'right'` / `'left'` horizontal).
|
|
3755
|
+
*/
|
|
3756
|
+
declare function barPath(x: number, y: number, w: number, h: number, radius: number, end: 'top' | 'bottom' | 'left' | 'right'): string;
|
|
3757
|
+
|
|
3758
|
+
/**
|
|
3759
|
+
* wu-chart: from data to shapes. `chartModel()` takes series (or Chart.js-shaped data, see `chartSeriesFrom()`), the size
|
|
3760
|
+
* and the options, and returns everything a renderer draws: the plot box, axis ticks, grid, bars, lines, areas, dots,
|
|
3761
|
+
* slices, radar webs, value labels, reference lines and the hover bands, all in pixels. No DOM: text widths come from
|
|
3762
|
+
* the `measure` callback.
|
|
3763
|
+
*/
|
|
3764
|
+
|
|
3765
|
+
type ChartType = 'bar' | 'line' | 'area' | 'pie' | 'doughnut' | 'polarArea' | 'radialBar' | 'radar' | 'scatter' | 'heatmap' | 'treemap' | 'stream' | 'waterfall' | 'dumbbell' | 'timeline' | 'funnel' | 'boxplot' | 'histogram' | 'sunburst' | 'unit' | 'slope';
|
|
3766
|
+
type ChartSeriesType = 'bar' | 'line' | 'area';
|
|
3767
|
+
/** A point of a scatter or bubble chart (`r` in px makes a bubble). */
|
|
3768
|
+
interface ChartXY {
|
|
3769
|
+
x: number;
|
|
3770
|
+
y: number;
|
|
3771
|
+
r?: number;
|
|
3772
|
+
}
|
|
3773
|
+
/** A box plot's five numbers, when the data is not given as raw values. */
|
|
3774
|
+
interface ChartBoxStats {
|
|
3775
|
+
min: number;
|
|
3776
|
+
q1: number;
|
|
3777
|
+
median: number;
|
|
3778
|
+
q3: number;
|
|
3779
|
+
max: number;
|
|
3780
|
+
/** Values past the whiskers, drawn as dots. */
|
|
3781
|
+
outliers?: number[];
|
|
3782
|
+
}
|
|
3783
|
+
/** One bar of a timeline: on the row `row` (Apex's `x` works too), from `start` to `end` (numbers, dates or ISO text). */
|
|
3784
|
+
interface ChartRange {
|
|
3785
|
+
row?: string;
|
|
3786
|
+
x?: string;
|
|
3787
|
+
start: number | string | Date;
|
|
3788
|
+
end: number | string | Date;
|
|
3789
|
+
name?: string;
|
|
3790
|
+
color?: string;
|
|
3791
|
+
}
|
|
3792
|
+
/** A node of a sunburst or icicle: a value of its own (leaves), or children that add up. */
|
|
3793
|
+
interface ChartNode {
|
|
3794
|
+
name: string;
|
|
3795
|
+
value?: number;
|
|
3796
|
+
color?: string;
|
|
3797
|
+
children?: ChartNode[];
|
|
3798
|
+
}
|
|
3799
|
+
interface ChartSeries {
|
|
3800
|
+
name?: string;
|
|
3801
|
+
/**
|
|
3802
|
+
* One value per label (`null` leaves a gap; a waterfall's `null` is a total), `{ x, y, r }` points for scatter, raw
|
|
3803
|
+
* values (histogram) or a list of raw values / five numbers per label (box plot), ranges (timeline) or nodes (sunburst).
|
|
3804
|
+
*/
|
|
3805
|
+
data: (number | null | undefined)[] | ChartXY[] | (number[] | ChartBoxStats | null | undefined)[] | ChartRange[] | ChartNode[];
|
|
3806
|
+
/** In a bar, line or area chart: draw this series another way (bars and a line together). */
|
|
3807
|
+
type?: ChartSeriesType;
|
|
3808
|
+
/** CSS colour; default from the palette. */
|
|
3809
|
+
color?: string;
|
|
3810
|
+
/** A colour per value (pie slices, single-series bars). */
|
|
3811
|
+
colors?: (string | null | undefined)[];
|
|
3812
|
+
/** `'right'` puts the series on a second value axis. */
|
|
3813
|
+
axis?: 'left' | 'right';
|
|
3814
|
+
/** Series with the same stack key stack up; `stacked: true` stacks them all. */
|
|
3815
|
+
stack?: string;
|
|
3816
|
+
hidden?: boolean;
|
|
3817
|
+
smooth?: boolean;
|
|
3818
|
+
/** `'straight'`, `'smooth'` or `'step'` (wins over `smooth`). */
|
|
3819
|
+
curve?: ChartCurve;
|
|
3820
|
+
dashed?: boolean;
|
|
3821
|
+
/** Fill under a line. */
|
|
3822
|
+
fill?: boolean;
|
|
3823
|
+
}
|
|
3824
|
+
interface ChartReferenceLine {
|
|
3825
|
+
value: number;
|
|
3826
|
+
/** Shade the band from `value` to `to` instead of drawing a line. */
|
|
3827
|
+
to?: number;
|
|
3828
|
+
label?: string;
|
|
3829
|
+
color?: string;
|
|
3830
|
+
axis?: 'left' | 'right';
|
|
3831
|
+
dashed?: boolean;
|
|
3832
|
+
}
|
|
3833
|
+
/** A line (or with `to`, a shaded band) at a label of the category axis: `at` is the label or its index. */
|
|
3834
|
+
interface ChartXAnnotation {
|
|
3835
|
+
at: string | number;
|
|
3836
|
+
to?: string | number;
|
|
3837
|
+
label?: string;
|
|
3838
|
+
color?: string;
|
|
3839
|
+
dashed?: boolean;
|
|
3840
|
+
}
|
|
3841
|
+
/** A marked point with a label: the value `value` at the label `at` (or its index). */
|
|
3842
|
+
interface ChartPointAnnotation {
|
|
3843
|
+
at: string | number;
|
|
3844
|
+
value: number;
|
|
3845
|
+
label?: string;
|
|
3846
|
+
color?: string;
|
|
3847
|
+
axis?: 'left' | 'right';
|
|
3848
|
+
}
|
|
3849
|
+
/** Notes drawn on a bar, line or area chart: value lines and bands, label lines and bands, marked points. */
|
|
3850
|
+
interface ChartAnnotations {
|
|
3851
|
+
y?: ChartReferenceLine[];
|
|
3852
|
+
x?: ChartXAnnotation[];
|
|
3853
|
+
points?: ChartPointAnnotation[];
|
|
3854
|
+
}
|
|
3855
|
+
/** A heatmap colour for the values from `from` to `to` (both included); `name` shows in the legend. */
|
|
3856
|
+
interface ChartColorRange {
|
|
3857
|
+
from: number;
|
|
3858
|
+
to: number;
|
|
3859
|
+
color: string;
|
|
3860
|
+
name?: string;
|
|
3861
|
+
}
|
|
3862
|
+
interface ChartModelOptions {
|
|
3863
|
+
type: ChartType;
|
|
3864
|
+
labels?: (string | number)[];
|
|
3865
|
+
series: ChartSeries[];
|
|
3866
|
+
width: number;
|
|
3867
|
+
height: number;
|
|
3868
|
+
/** Text width in px at a font size: the renderer measures with its real font. */
|
|
3869
|
+
measure?: (text: string, fontSize: number) => number;
|
|
3870
|
+
fontSize?: number;
|
|
3871
|
+
/** Colours for series (or slices) without one, in order. */
|
|
3872
|
+
palette?: string[];
|
|
3873
|
+
/** Bars across instead of up. */
|
|
3874
|
+
horizontal?: boolean;
|
|
3875
|
+
stacked?: boolean;
|
|
3876
|
+
/** Smooth lines (each series may say otherwise). */
|
|
3877
|
+
smooth?: boolean;
|
|
3878
|
+
/** `'straight'`, `'smooth'` or `'step'` lines (wins over `smooth`; each series may say otherwise). */
|
|
3879
|
+
curve?: ChartCurve;
|
|
3880
|
+
/** Areas fade down from the line's colour. Default true; false fills them flat. */
|
|
3881
|
+
gradient?: boolean;
|
|
3882
|
+
/** A small chart with no axes, grid or text, the marks filling the box (a trend beside a number). */
|
|
3883
|
+
sparkline?: boolean;
|
|
3884
|
+
/** Where pies, doughnuts and radial bars start and end, degrees clockwise from 12 o'clock. Default 0 and 360; -90 and 90 make a half circle (a gauge). */
|
|
3885
|
+
startAngle?: number;
|
|
3886
|
+
endAngle?: number;
|
|
3887
|
+
/** Lines, bands and points to point things out (`referenceLines` are more `y` ones). */
|
|
3888
|
+
annotations?: ChartAnnotations;
|
|
3889
|
+
/** Heatmap colours by value instead of shades of one colour. */
|
|
3890
|
+
colorRanges?: ChartColorRange[];
|
|
3891
|
+
/**
|
|
3892
|
+
* The look of a kind: heatmap `'square'` / `'circle'` / `'hex'`; stream `'silhouette'` / `'wiggle'` / `'expand'`;
|
|
3893
|
+
* waterfall `'bars'` / `'steps'`; dumbbell `'dots'` / `'arrow'` / `'range'`; timeline `'bars'` / `'thin'`; funnel
|
|
3894
|
+
* `'funnel'` / `'bars'` / `'pyramid'`; box plot `'box'` / `'violin'` / `'points'`; histogram `'bars'` / `'density'`;
|
|
3895
|
+
* sunburst `'sunburst'` / `'icicle'`; unit `'waffle'` / `'dots'` / `'people'`; slope `'lines'` / `'highlight'`.
|
|
3896
|
+
*/
|
|
3897
|
+
variant?: string;
|
|
3898
|
+
/** Histogram bins. Default from the number of values (Sturges), on round edges. */
|
|
3899
|
+
bins?: number;
|
|
3900
|
+
/** Sunburst: the node shown in the middle (a path of names joined by `/`), after a click drills in. */
|
|
3901
|
+
focus?: string;
|
|
3902
|
+
/** Value axis ends; default from the data with round steps. */
|
|
3903
|
+
min?: number;
|
|
3904
|
+
max?: number;
|
|
3905
|
+
/** Keep 0 on the value axis. Default true for bars and areas, false for lines and scatter. */
|
|
3906
|
+
beginAtZero?: boolean;
|
|
3907
|
+
rightMin?: number;
|
|
3908
|
+
rightMax?: number;
|
|
3909
|
+
/** Values on bars, points and slices. */
|
|
3910
|
+
showValues?: boolean;
|
|
3911
|
+
/** Dots on line points. Default: when there are 40 points or fewer. */
|
|
3912
|
+
points?: boolean;
|
|
3913
|
+
grid?: boolean;
|
|
3914
|
+
xTitle?: string;
|
|
3915
|
+
yTitle?: string;
|
|
3916
|
+
y2Title?: string;
|
|
3917
|
+
referenceLines?: ChartReferenceLine[];
|
|
3918
|
+
format?: ChartValueFormat;
|
|
3919
|
+
/** Format of the right axis. Default `format`. */
|
|
3920
|
+
rightFormat?: ChartValueFormat;
|
|
3921
|
+
formatOptions?: ChartFormatOptions;
|
|
3922
|
+
/** Rounded bar ends, px. Default 4. */
|
|
3923
|
+
barRadius?: number;
|
|
3924
|
+
/** Space between bar groups, 0–1 of a band. Default 0.25. */
|
|
3925
|
+
barPadding?: number;
|
|
3926
|
+
/** Doughnut hole, 0–1 of the radius. Default 0.62. */
|
|
3927
|
+
cutout?: number;
|
|
3928
|
+
/** Slices hidden from a pie (legend clicks), by index. */
|
|
3929
|
+
hiddenSlices?: number[];
|
|
3930
|
+
/**
|
|
3931
|
+
* Value axes to use as they are instead of fitting them to the data (an animation keeps the final axes, or slides
|
|
3932
|
+
* between two, while the marks move). Ticks outside `min` … `max` are left out.
|
|
3933
|
+
*/
|
|
3934
|
+
scales?: {
|
|
3935
|
+
left?: ChartAxisScale;
|
|
3936
|
+
right?: ChartAxisScale;
|
|
3937
|
+
};
|
|
3938
|
+
/** How much of a pie's circle is drawn, 0–1 (the slices fan out when it grows). Default 1. */
|
|
3939
|
+
sweep?: number;
|
|
3940
|
+
}
|
|
3941
|
+
/** A value axis: its ends and where its ticks are. */
|
|
3942
|
+
interface ChartAxisScale {
|
|
3943
|
+
min: number;
|
|
3944
|
+
max: number;
|
|
3945
|
+
ticks: number[];
|
|
3946
|
+
}
|
|
3947
|
+
interface ChartText {
|
|
3948
|
+
x: number;
|
|
3949
|
+
y: number;
|
|
3950
|
+
text: string;
|
|
3951
|
+
anchor: 'start' | 'middle' | 'end';
|
|
3952
|
+
baseline?: 'auto' | 'middle' | 'hanging';
|
|
3953
|
+
rotate?: number;
|
|
3954
|
+
/** `'inside'`: on a coloured mark (light text); `'muted'`: quieter. */
|
|
3955
|
+
tone?: 'inside' | 'muted';
|
|
3956
|
+
/** Bold (a tile's name). */
|
|
3957
|
+
strong?: boolean;
|
|
3958
|
+
/** Its own colour. */
|
|
3959
|
+
color?: string;
|
|
3960
|
+
/** The hover target it belongs to (dims with the others). */
|
|
3961
|
+
hover?: string;
|
|
3962
|
+
}
|
|
3963
|
+
interface ChartBar {
|
|
3964
|
+
key: string;
|
|
3965
|
+
d: string;
|
|
3966
|
+
x: number;
|
|
3967
|
+
y: number;
|
|
3968
|
+
w: number;
|
|
3969
|
+
h: number;
|
|
3970
|
+
color: string;
|
|
3971
|
+
series: number;
|
|
3972
|
+
index: number;
|
|
3973
|
+
value: number;
|
|
3974
|
+
}
|
|
3975
|
+
interface ChartLine {
|
|
3976
|
+
key: string;
|
|
3977
|
+
d: string;
|
|
3978
|
+
color: string;
|
|
3979
|
+
series: number;
|
|
3980
|
+
dashed: boolean;
|
|
3981
|
+
/** Filled area under the line, if any. */
|
|
3982
|
+
area: string | null;
|
|
3983
|
+
/** The area fades down (a gradient from the line's colour). */
|
|
3984
|
+
gradient: boolean;
|
|
3985
|
+
}
|
|
3986
|
+
interface ChartDot {
|
|
3987
|
+
key: string;
|
|
3988
|
+
cx: number;
|
|
3989
|
+
cy: number;
|
|
3990
|
+
r: number;
|
|
3991
|
+
color: string;
|
|
3992
|
+
series: number;
|
|
3993
|
+
index: number;
|
|
3994
|
+
value: number;
|
|
3995
|
+
x?: number;
|
|
3996
|
+
}
|
|
3997
|
+
interface ChartSlice {
|
|
3998
|
+
key: string;
|
|
3999
|
+
d: string;
|
|
4000
|
+
color: string;
|
|
4001
|
+
index: number;
|
|
4002
|
+
value: number;
|
|
4003
|
+
percent: number;
|
|
4004
|
+
label: string;
|
|
4005
|
+
/** Where the slice's label sits, and the slice pushed out a little (hover). */
|
|
4006
|
+
labelX: number;
|
|
4007
|
+
labelY: number;
|
|
4008
|
+
dx: number;
|
|
4009
|
+
dy: number;
|
|
4010
|
+
}
|
|
4011
|
+
/** One ring of a radial bar: its track and the value's arc over it (open arcs, drawn as `width`-wide strokes). */
|
|
4012
|
+
interface ChartRing {
|
|
4013
|
+
key: string;
|
|
4014
|
+
index: number;
|
|
4015
|
+
color: string;
|
|
4016
|
+
value: number;
|
|
4017
|
+
/** The value as a share of `max`, 0–1. */
|
|
4018
|
+
percent: number;
|
|
4019
|
+
label: string;
|
|
4020
|
+
track: string;
|
|
4021
|
+
d: string;
|
|
4022
|
+
width: number;
|
|
4023
|
+
/** Round ends (a whole circle); a gauge's ends are cut square so they stay inside the box. */
|
|
4024
|
+
round: boolean;
|
|
4025
|
+
}
|
|
4026
|
+
/** A heatmap cell or a treemap tile. */
|
|
4027
|
+
interface ChartCell {
|
|
4028
|
+
key: string;
|
|
4029
|
+
x: number;
|
|
4030
|
+
y: number;
|
|
4031
|
+
w: number;
|
|
4032
|
+
h: number;
|
|
4033
|
+
color: string;
|
|
4034
|
+
opacity: number;
|
|
4035
|
+
series: number;
|
|
4036
|
+
index: number;
|
|
4037
|
+
value: number;
|
|
4038
|
+
label: string;
|
|
4039
|
+
texts: ChartText[];
|
|
4040
|
+
/** A circle or a hexagon (heatmap looks) instead of the rounded box. */
|
|
4041
|
+
d?: string;
|
|
4042
|
+
}
|
|
4043
|
+
/** A plain shape of the newer kinds (stream, waterfall, funnel, …), in pixels. */
|
|
4044
|
+
interface ChartShape {
|
|
4045
|
+
key: string;
|
|
4046
|
+
kind: 'path' | 'rect' | 'circle' | 'line';
|
|
4047
|
+
d?: string;
|
|
4048
|
+
x?: number;
|
|
4049
|
+
y?: number;
|
|
4050
|
+
w?: number;
|
|
4051
|
+
h?: number;
|
|
4052
|
+
r?: number;
|
|
4053
|
+
x2?: number;
|
|
4054
|
+
y2?: number;
|
|
4055
|
+
rx?: number;
|
|
4056
|
+
fill?: string;
|
|
4057
|
+
stroke?: string;
|
|
4058
|
+
strokeWidth?: number;
|
|
4059
|
+
opacity?: number;
|
|
4060
|
+
dashed?: boolean;
|
|
4061
|
+
/** Fill fading down from `fill` (a gradient). */
|
|
4062
|
+
fade?: boolean;
|
|
4063
|
+
/** A stroke going from one colour to another along the shape (`userSpaceOnUse` ends). */
|
|
4064
|
+
gradient?: {
|
|
4065
|
+
x1: number;
|
|
4066
|
+
y1: number;
|
|
4067
|
+
x2: number;
|
|
4068
|
+
y2: number;
|
|
4069
|
+
from: string;
|
|
4070
|
+
to: string;
|
|
4071
|
+
};
|
|
4072
|
+
/** How it comes in when drawn the first time: grow up, grow across, pop, draw the line, fade. */
|
|
4073
|
+
enter?: 'grow' | 'grow-x' | 'pop' | 'draw' | 'fade';
|
|
4074
|
+
/** Entrance delay, ms (a ripple across the shapes). */
|
|
4075
|
+
delay?: number;
|
|
4076
|
+
/** The hover target it belongs to (`ChartHoverBand.key`): lit when that target or one under it is pointed at. */
|
|
4077
|
+
hover?: string;
|
|
4078
|
+
/** Extra class: `'wu-chart-connector'`, `'wu-chart-whisker'`, … */
|
|
4079
|
+
className?: string;
|
|
4080
|
+
}
|
|
4081
|
+
/** A tooltip worked out with the shapes. */
|
|
4082
|
+
interface ChartTip {
|
|
4083
|
+
title: string;
|
|
4084
|
+
rows: {
|
|
4085
|
+
color: string;
|
|
4086
|
+
name: string;
|
|
4087
|
+
value: string;
|
|
4088
|
+
}[];
|
|
4089
|
+
}
|
|
4090
|
+
/** A shaded band of an annotation. */
|
|
4091
|
+
interface ChartBand {
|
|
4092
|
+
x: number;
|
|
4093
|
+
y: number;
|
|
4094
|
+
w: number;
|
|
4095
|
+
h: number;
|
|
4096
|
+
color: string;
|
|
4097
|
+
label: ChartText | null;
|
|
4098
|
+
}
|
|
4099
|
+
/** A marked point of an annotation, its label in a box above it. */
|
|
4100
|
+
interface ChartMark {
|
|
4101
|
+
x: number;
|
|
4102
|
+
y: number;
|
|
4103
|
+
color: string;
|
|
4104
|
+
label: ChartText | null;
|
|
4105
|
+
box: {
|
|
4106
|
+
x: number;
|
|
4107
|
+
y: number;
|
|
4108
|
+
w: number;
|
|
4109
|
+
h: number;
|
|
4110
|
+
} | null;
|
|
4111
|
+
}
|
|
4112
|
+
interface ChartRadar {
|
|
4113
|
+
rings: string[];
|
|
4114
|
+
spokes: {
|
|
4115
|
+
x1: number;
|
|
4116
|
+
y1: number;
|
|
4117
|
+
x2: number;
|
|
4118
|
+
y2: number;
|
|
4119
|
+
}[];
|
|
4120
|
+
shapes: {
|
|
4121
|
+
key: string;
|
|
4122
|
+
d: string;
|
|
4123
|
+
color: string;
|
|
4124
|
+
series: number;
|
|
4125
|
+
}[];
|
|
4126
|
+
ringLabels: ChartText[];
|
|
4127
|
+
}
|
|
4128
|
+
interface ChartLegendItem {
|
|
4129
|
+
index: number;
|
|
4130
|
+
name: string;
|
|
4131
|
+
color: string;
|
|
4132
|
+
hidden: boolean;
|
|
4133
|
+
shape: 'box' | 'line' | 'dot';
|
|
4134
|
+
}
|
|
4135
|
+
/** A hover target: one category (all series at that label) or one slice. */
|
|
4136
|
+
interface ChartHoverBand {
|
|
4137
|
+
index: number;
|
|
4138
|
+
x: number;
|
|
4139
|
+
y: number;
|
|
4140
|
+
w: number;
|
|
4141
|
+
h: number;
|
|
4142
|
+
/** Where the crosshair and tooltip go. */
|
|
4143
|
+
cx: number;
|
|
4144
|
+
cy: number;
|
|
4145
|
+
/** The series of a heatmap cell or treemap tile. */
|
|
4146
|
+
series?: number;
|
|
4147
|
+
/** The newer kinds: a key for the target, its tooltip, and how to find it. */
|
|
4148
|
+
key?: string;
|
|
4149
|
+
tip?: ChartTip;
|
|
4150
|
+
/** A ring slice (sunburst): hit by angle and radius. */
|
|
4151
|
+
arc?: {
|
|
4152
|
+
cx: number;
|
|
4153
|
+
cy: number;
|
|
4154
|
+
r0: number;
|
|
4155
|
+
r1: number;
|
|
4156
|
+
a0: number;
|
|
4157
|
+
a1: number;
|
|
4158
|
+
};
|
|
4159
|
+
/** A line (slope): hit near the line. */
|
|
4160
|
+
points?: {
|
|
4161
|
+
x: number;
|
|
4162
|
+
y: number;
|
|
4163
|
+
}[];
|
|
4164
|
+
/** For `(pointClick)` and the middle text. */
|
|
4165
|
+
value?: number;
|
|
4166
|
+
label?: string;
|
|
4167
|
+
/** Sunburst: a node with children (a click goes in). */
|
|
4168
|
+
drill?: boolean;
|
|
4169
|
+
/** Draw the pointer guide through `cx`. */
|
|
4170
|
+
cross?: boolean;
|
|
4171
|
+
}
|
|
4172
|
+
interface ChartModel {
|
|
4173
|
+
type: ChartType;
|
|
4174
|
+
width: number;
|
|
4175
|
+
height: number;
|
|
4176
|
+
plot: {
|
|
4177
|
+
x: number;
|
|
4178
|
+
y: number;
|
|
4179
|
+
w: number;
|
|
4180
|
+
h: number;
|
|
4181
|
+
};
|
|
4182
|
+
xTicks: ChartText[];
|
|
4183
|
+
yTicks: ChartText[];
|
|
4184
|
+
y2Ticks: ChartText[];
|
|
4185
|
+
grid: {
|
|
4186
|
+
x1: number;
|
|
4187
|
+
y1: number;
|
|
4188
|
+
x2: number;
|
|
4189
|
+
y2: number;
|
|
4190
|
+
}[];
|
|
4191
|
+
/** The value axis' zero line, when 0 is inside the axis. */
|
|
4192
|
+
zero: {
|
|
4193
|
+
x1: number;
|
|
4194
|
+
y1: number;
|
|
4195
|
+
x2: number;
|
|
4196
|
+
y2: number;
|
|
4197
|
+
} | null;
|
|
4198
|
+
titles: ChartText[];
|
|
4199
|
+
bars: ChartBar[];
|
|
4200
|
+
lines: ChartLine[];
|
|
4201
|
+
dots: ChartDot[];
|
|
4202
|
+
slices: ChartSlice[];
|
|
4203
|
+
rings: ChartRing[];
|
|
4204
|
+
cells: ChartCell[];
|
|
4205
|
+
radar: ChartRadar | null;
|
|
4206
|
+
valueLabels: ChartText[];
|
|
4207
|
+
references: {
|
|
4208
|
+
x1: number;
|
|
4209
|
+
y1: number;
|
|
4210
|
+
x2: number;
|
|
4211
|
+
y2: number;
|
|
4212
|
+
color: string;
|
|
4213
|
+
dashed: boolean;
|
|
4214
|
+
label: ChartText | null;
|
|
4215
|
+
}[];
|
|
4216
|
+
bands: ChartBand[];
|
|
4217
|
+
marks: ChartMark[];
|
|
4218
|
+
/** Shapes and texts of the newer kinds, and that they hit-test with `chartHit()`. */
|
|
4219
|
+
shapes: ChartShape[];
|
|
4220
|
+
texts: ChartText[];
|
|
4221
|
+
generic: boolean;
|
|
4222
|
+
/** Fade what is not pointed at (funnel, unit, slope, sunburst). */
|
|
4223
|
+
dimOthers: boolean;
|
|
4224
|
+
/** The middle text (sunburst): the focused node and its value. */
|
|
4225
|
+
centerText: {
|
|
4226
|
+
value: string;
|
|
4227
|
+
label: string;
|
|
4228
|
+
} | null;
|
|
4229
|
+
hover: ChartHoverBand[];
|
|
4230
|
+
legend: ChartLegendItem[];
|
|
4231
|
+
/** Hole of a doughnut or radial bar, for text in the middle (`lift`: a half circle, the text sits above its centre). */
|
|
4232
|
+
center: {
|
|
4233
|
+
x: number;
|
|
4234
|
+
y: number;
|
|
4235
|
+
r: number;
|
|
4236
|
+
lift: boolean;
|
|
4237
|
+
} | null;
|
|
4238
|
+
/** The value axes drawn (null where there is none), to hold or slide them in an animation. */
|
|
4239
|
+
scales: {
|
|
4240
|
+
left: ChartAxisScale | null;
|
|
4241
|
+
right: ChartAxisScale | null;
|
|
4242
|
+
};
|
|
4243
|
+
empty: boolean;
|
|
4244
|
+
}
|
|
4245
|
+
/** The default palette: ten colours that read apart in light and dark (overridden by the theme's `--wu-chart-*`). */
|
|
4246
|
+
declare const CHART_PALETTE: string[];
|
|
4247
|
+
/**
|
|
4248
|
+
* Series from Chart.js-shaped data (`{ labels, datasets: [{ label, data, backgroundColor, borderColor, type, yAxisID,
|
|
4249
|
+
* stack, hidden, tension, fill, borderDash }] }`), so `<wu-chartjs>` (Chart.js) data works in `<wu-chart>` as it is.
|
|
4250
|
+
*/
|
|
4251
|
+
declare function chartSeriesFrom(data: any, type?: ChartType): {
|
|
4252
|
+
labels: (string | number)[];
|
|
4253
|
+
series: ChartSeries[];
|
|
4254
|
+
};
|
|
4255
|
+
/** The shapes of a chart (see the file comment). */
|
|
4256
|
+
declare function chartModel(o: ChartModelOptions): ChartModel;
|
|
4257
|
+
|
|
4258
|
+
/**
|
|
4259
|
+
* Tiles for `values` in the box, each tile's area in proportion to its value and as square as it can be (squarified
|
|
4260
|
+
* treemap). Index for index with `values`; values of 0 or less get an empty tile.
|
|
4261
|
+
*/
|
|
4262
|
+
declare function squarify(values: number[], x: number, y: number, w: number, h: number): {
|
|
4263
|
+
x: number;
|
|
4264
|
+
y: number;
|
|
4265
|
+
w: number;
|
|
4266
|
+
h: number;
|
|
4267
|
+
}[];
|
|
4268
|
+
|
|
4269
|
+
/** Moves label centres apart so no two are closer than `gap`, inside `lo` … `hi`, staying near where they were. */
|
|
4270
|
+
declare function relaxLabels(ys: number[], gap: number, lo: number, hi: number): number[];
|
|
4271
|
+
/** Round ticks for a time axis from `lo` to `hi` (ms): minutes, hours, local midnights, Mondays-agnostic weeks or the 1st of months. */
|
|
4272
|
+
declare function timeTicks(lo: number, hi: number, count?: number): {
|
|
4273
|
+
ticks: number[];
|
|
4274
|
+
step: number;
|
|
4275
|
+
};
|
|
4276
|
+
/** The five numbers (and outliers past 1.5 × the box) of raw values. */
|
|
4277
|
+
declare function boxStats(values: number[]): ChartBoxStats & {
|
|
4278
|
+
mean: number;
|
|
4279
|
+
};
|
|
4280
|
+
/** The hover target under (x, y): ring slices by angle and radius, lines by distance, boxes by being inside, points by distance. */
|
|
4281
|
+
declare function chartHit(model: ChartModel, x: number, y: number): ChartHoverBand | null;
|
|
4282
|
+
/** The looks (`variant`) of each kind, the default first; kinds with one look have none. */
|
|
4283
|
+
declare const CHART_VARIANTS: Partial<Record<ChartType, string[]>>;
|
|
4284
|
+
/** The looks of a kind (the chart's look picker), the default first. */
|
|
4285
|
+
declare function chartVariants(type: ChartType): string[];
|
|
4286
|
+
/** Kinds whose values do not move from the old to the new (raw values, ranges, nodes, units): they come in with their shapes' own entrance. */
|
|
4287
|
+
declare function chartMovesValues(type: ChartType): boolean;
|
|
4288
|
+
/**
|
|
4289
|
+
* The kinds the same data can switch to (the type switcher): numbers per label for several series (bar, line, area,
|
|
4290
|
+
* stream, radar, heatmap, slope, dumbbell, treemap), for one series (also pie, doughnut, polar area, funnel, treemap,
|
|
4291
|
+
* unit), raw values (histogram, box plot). Timeline, sunburst, scatter, waterfall and radial bars stay as they are.
|
|
4292
|
+
*/
|
|
4293
|
+
declare function chartSwapTypes(type: ChartType, series: ChartSeries[] | null | undefined, labels?: unknown[] | null): ChartType[];
|
|
4294
|
+
|
|
4295
|
+
export { Arun, BUDDHIST_OFFSET, CHART_PALETTE, CHART_VARIANTS, CLASSIC_THEMES, COMPONENT_TOKENS, CONFIG_MARKER, CORE_VERSION, DENSITY, DatePickerState, EDITOR_COLORS, EDITOR_FONT_SIZES, EDITOR_HIGHLIGHTS, EDITOR_TOOLBARS, EDITOR_TOOLS, EN_LOCALE, EXCEL_MIME, EditorHistory, FAMILIES, FAMILY_GENERATION, FLOW_DEFAULT_VIEWPORT, FLOW_EDGE_TYPES, FLOW_MARKER_REF, FLOW_MARKER_VIEWBOX, FLOW_TEXT_KEYS, FOCUS_STYLES, FONTS, FlowHistory, Glass, KNOB_MAX_RADIANS, KNOB_MIN_RADIANS, LANGUAGE_NAMES, LAYER_ORDER, LL, LOCALES, Lanna, ListState, MAX_CANVAS_AREA, Mali, Material, MaterialClassic, Nakhon, PALETTE_BASES, PRESETS, PRESET_IDS, PRESET_LIST, PRESET_NAMES, PRIMARY_SWATCHES, Phet, Ratri, SCALAR_FIELDS, SEMANTIC_DEFAULTS, SEMANTIC_KEYS, SHADES, SHADE_MIX, SHADOWS, STYLED_INPUTS, SURFACES, SURFACE_DARK_REF, Sayan, Siam, Sila, SilaClassic, TH_LOCALE, TINT, VERSION_CATALOG, Wira, WiraKawaii, absolutePosition, absolutePositions, acceptsFile, acceptsNumberInput, acceptsNumberText, addDays, addEdge, addMonths, alignmentGuides, apcaContrast, applyEdgeChanges, applyMatrix, applyNodeChanges, arcLine, arcPath, areaPath, arrowStep, autoPanVelocity, backgroundPattern, bahtText, bandPath, bands, barPath, base64ToFile, bestOn, boxSelection, boxStats, boxToRect, buildExcel, buildExcelSync, calendarWeeks, caretAfter, carouselClampPage, carouselFirst, carouselIsCircular, carouselLayout, carouselPageCount, carouselRepage, carouselStep, changeCount, chartHit, chartModel, chartMovesValues, chartSeriesFrom, chartSwapTypes, chartVariants, checkFile, clampCrop, clampDate, clampNumber, clampPosition, clampTimeField, clampView, clampZoom, classicDateFormat, clickSelection, collectMarkers, compareDays, compareValues, compatAliases, componentValue, computeNodeZ, computeTokens, connectionBetween, constrainViewport, contrast, countCrossings, crc32, cropArea, cropHeight, cropSizeRange, cropWidth, cropperToolbarGroups, cubicPoint, datePattern, dayNumber, daysInMonth, decimalSeparator, defaults, defineOverrides, definePreset, densityTokens, diff, diffItems, displayYear, dockScale, dragPositions, dragRoots, easeInOutCubic, edgeZIndex, editableNumber, editorCounts, editorHtmlToText, editorToolOptions, editorToolbarGroups, emptyTokens, estimateTextWidth, excelColor, excelColumnName, excelDateNumber, excelParseRange, excelParseRef, excelParts, excelRef, excelSheetFromRows, excelSheetNames, exifTransform, expandParentBox, expandRect, fillMask, filterColumns, filterGlobal, filterItems, filterListItems, filterTree, findHandle, firstIndex, fitArc, flattenMessages, flowClamp, flowDeepEqual, flowEdgeId, flowEdgeName, flowFormat, flowFromJSON, flowHistoryKey, flowNodeName, flowText, flowToJSON, flowToScreen, flowToSvg, fmt, focusTokens, fontTokens, formatChartValue, formatColor, formatDate, formatFileSize, formatMask, formatNumber, formatThaiId, formatThaiPhone, fractionDigits, from12Hour, fromBuddhistYear, fromThaiDigits, generatePalette, getBezierPath, getBoundsOfRects, getConnectedEdges, getDescendants, getEdgeCenter, getEdgeEnds, getEdgePath, getEdgePathWithRoom, getElementsToRemove, getIncomers, getIntersectingNodes, getNodesBounds, getNodesInside, getOutgoers, getSimpleBezierPath, getSmoothStepPath, getStepPath, getStepPoints, getStraightPath, getViewportForBounds, getVisibleNodeIds, growCrop, handleConnectionCount, handleIsFull, handlePoint, handlesCompatible, hasSize, hexToRgb, hsbToHex, hsbToRgb, httpErrorActions, httpErrorCode, httpErrorKind, httpErrorTextKey, imageCompareAt, imageCompareClamp, imageCompareKey, inListOrder, indexOfValue, initialCrop, interpolate, interpolateViewport, isDaySelectable, isEdge, isEdgeVisible, isEmptyEditorHtml, isFlowPosition, isHex, isImageFile, isMonthSelectable, isNode, isPalette, isPresetId, isThaiPhone, isThemeName, isThemePreset, isTypingTarget, isValidDate, isValidThaiId, isYearSelectable, keyMatches, knobClamp, knobPaths, knobSnap, knobText, knobValueAt, lastFilled, lastIndex, layoutFlow, layoutHandlePositions, layoutTree, linePath, listFilterFields, listIndexes, listSame, luminance, markerId, markerLength, markerShape, maskComplete, maskEmpty, matchLanguage, matchValue, materialTokens, menuFirst, menuFocusable, menuHasSubmenu, menuItemAt, menuKey, menuKeyPath, menuLast, menuStep, menuTypeahead, menuVisible, mergeExcelStyles, mergeTokens, minimapLayout, minimapMaskPath, minimapToFlow, mix, monotonePath, moveBottom, moveCrop, moveDay, moveDown, moveItemsTo, moveTop, moveUp, multiKeyHeld, nearestHandle, niceScale, niceStep, nodeDepth, nodeLookup, nodeRect, nodeSize, normalize, normalizeAngle, normalizeCrop, normalizeExtent, normalizeMarker, normalizeViewport, oppositePosition, optionField, orgChartIsLeaf, orgChartIsOpen, orgChartIsSelected, orgChartKey, orgChartToggleSelection, orgChartVisible, orientationMatrix, otpAccepts, otpCleanPaste, otpFill, otpTokens, otpValue, outputSize, overlapArea, overridesToTokens, padToRatio, paddingPx, pageInfo, pageLinks, pageReport, palette, panBy, panCrop, parentGrowth, parseAspectRatio, parseColor, parseDate, parseImport, parseLooseDate, parseMask, parseNumber, parseTypedDate, pastThreshold, pickLanguage, placeInOrder, pointInRect, polar, polylineMidpoint, positionVector, presetExportName, presetToTokens, presetsFor, primaryPaletteOf, primaryTokens, radiusTokens, rangeKeyValue, readExifOrientation, readTimeField, reconnectEdge, rectCenter, rectContains, rectFromPoints, rectToBox, rectsIntersect, relaxLabels, remapCrop, remapPoint, resizeBox, resizeCrop, rgbToHex, rgbToHsb, rotateOrientation, rotatedSize, roundChannel, roundCrop, roundedPolylinePath, safeEditorImage, safeEditorUrl, sameCrop, sameDay, sameFile, sameHandle, sameNode, sameValue, sameViewport, scaleLinear, screenToFlow, searchText, selectItems, selectionChanges, semanticTokens, shadowTokens, sidePoint, simplifyPolyline, snapPosition, sortNodesParentsFirst, sortRows, splitDates, splitterBasis, splitterPercent, splitterReadState, splitterResize, splitterSizes, squarify, startOfDay, stepIndex, stepNumber, surfacePalette, surfaceTokens, terminalCommandName, terminalHistoryAdd, terminalHistoryMove, terminalIsClear, thaiIdCheckDigit, thaiNumberText, themeConfig, themePreset, timeAgo, timeFieldRange, timeFormat, timeTicks, to12Hour, toBuddhistYear, toCSS, toDate, toDateValue, toJSON, toSCSS, toTSOverrides, toTSPreset, toThaiDigits, toggleTreeCheck, tokensToCss, tokensToStyle, transferItems, transitionTokens, translateKey, treeCheckStates, treeParents, typeaheadIndex, typedBefore, unmaskedValue, updateEdge, validConnection, validationMessage, viewRect, viewWindow, viewportForCenter, walkTree, weekdayOrder, wheelDeltaPx, wheelZoomFactor, wrapStep, yearPage, zipFiles, zipFilesSync, zoomAt, zoomCrop };
|
|
4296
|
+
export type { CalendarDay, CalendarSystem, CarouselResponsiveOptions, ChartAnnotations, ChartAxisScale, ChartBand, ChartBar, ChartBoxStats, ChartCell, ChartColorRange, ChartCurve, ChartDot, ChartFormatOptions, ChartHoverBand, ChartLegendItem, ChartLine, ChartMark, ChartModel, ChartModelOptions, ChartNode, ChartPoint, ChartPointAnnotation, ChartRadar, ChartRange, ChartReferenceLine, ChartRing, ChartSeries, ChartSeriesType, ChartShape, ChartSlice, ChartText, ChartTip, ChartType, ChartValueFormat, ChartXAnnotation, ChartXY, ColorFormat, ColorHsb, ColorRgb, ComponentId, ComponentOverrides, ComponentTokenSpec, ComponentValues, CropDimensions, CropHandle, CropLimits, CropMatrix, CropOrientation, CropOutputOptions, CropView, CropperPosition, CropperTool, CropperToolName, CropperToolbar, CssOptions, DarkMode, DateFormatOptions, DateLimits, DatePickerOptions, DatePickerValue, DatePickerView, DateSelectionMode, DayCell, DensityId, EditorOption, EditorSnapshot, EditorTool, EditorToolOptions, EditorToolbar, EditorToolbarPreset, ExcelBorder, ExcelBorderLine, ExcelBorderStyle, ExcelBorders, ExcelCell, ExcelCellInput, ExcelColumn, ExcelRow, ExcelSheet, ExcelStyle, ExcelTableCellContext, ExcelTableColumn, ExcelTableLayout, ExcelTableOptions, ExcelTotal, ExcelValue, ExcelWorkbook, ExportOptions, FamilyId, FamilyTokens, FileLike, FileProblem, FilterMatchMode, FilterMeta, FilterRule, FlowAddChange, FlowAlignment, FlowBackgroundPattern, FlowBackgroundVariant, FlowBezierParams, FlowBoundsOptions, FlowBox, FlowBoxSelectOptions, FlowConnectHandle, FlowConnectRules, FlowConnection, FlowConnectionMode, FlowCoordinateExtent, FlowDimensions, FlowDragItem, FlowDragOptions, FlowDragResult, FlowEdge, FlowEdgeChange, FlowEdgeEndNode, FlowEdgeEnds, FlowEdgeMarker, FlowEdgeType, FlowFromJSONOptions, FlowGuide, FlowHandleBounds, FlowHandleRef, FlowHandleType, FlowHistoryOptions, FlowInsideOptions, FlowJSON, FlowLayoutCommon, FlowLayoutDirection, FlowLayoutOptions, FlowMarker, FlowMarkerType, FlowMinimapLayout, FlowNode, FlowNodeChange, FlowNodeDimensionChange, FlowNodeHandles, FlowNodePositionChange, FlowPadding, FlowPathOptions, FlowPathParams, FlowPathResult, FlowPosition, FlowRect, FlowRemoveChange, FlowReplaceChange, FlowResizeDirection, FlowResizeLimits, FlowResolvedMarker, FlowSelectChange, FlowSizeLookup, FlowSmoothStepParams, FlowSnapshot, FlowStyle, FlowSvgOptions, FlowTextKey, FlowTexts, FlowTreeLayoutOptions, FlowViewport, FlowXY, FlowZOptions, FocusRing, Generation, HourFormat, I18nMessages, ListSame, LooseDateOptions, MajorVersion, MaskBuffer, MaskDefinitions, MaskSlot, MaterialMode, MenuItemLike, MonthCell, NamedTheme, NiceScale, NumberFormatOptions, NumberTypingRules, OrgChartEntry, OrgChartMove, OrgChartSelectionMode, PageState, Palette, PickResult, PresetDefinition, PresetId, ScalarField, Scheme, SelectFields, SelectItem, SelectMatchMode, SemanticKey, SemanticOverrides, Shade, ShadowId, SortMeta, SurfaceId, SwatchId, ThaiDateFormat, ThemeConfig, ThemeDiff, ThemeOverrideSet, ThemeOverrides, ThemePreset, ThemeTokens, TimeUnit, TokenMap, TreeCheckState, TreeFilterMode, TreeNode, TypedTimeField, ValidationErrorsLike, WuEditorMessages, WuEmptyStateType, WuErrorAction, WuErrorKind, WuLocale, WuResultStatus, WuValidationMessages, YearCell, ZipEntry };
|