@krak-stack/registry 0.10.19 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +105 -0
- package/README.md +28 -7
- package/dist/components/agent/index.d.ts +454 -0
- package/dist/components/agent/react.d.ts +55 -0
- package/dist/components/agent/react.js +2594 -0
- package/dist/components/agent/schema.d.ts +55 -0
- package/dist/components/animated-list/classes.d.ts +9 -0
- package/dist/components/animated-list/html.d.ts +11 -0
- package/dist/components/animated-list/html.js +533 -0
- package/dist/components/animated-list/index.d.ts +205 -0
- package/dist/components/animated-list/react.d.ts +11 -0
- package/dist/components/animated-list/react.js +711 -0
- package/dist/components/animated-list/schema.d.ts +44 -0
- package/dist/components/animated-number/html.d.ts +19 -0
- package/dist/components/animated-number/html.js +101 -0
- package/dist/components/animated-number/index.d.ts +80 -0
- package/dist/components/{ui/animated-number.d.ts → animated-number/react.d.ts} +2 -7
- package/dist/components/animated-number/react.js +278 -0
- package/dist/components/animated-number/schema.d.ts +9 -0
- package/dist/components/app-brand/classes.d.ts +11 -0
- package/dist/components/app-brand/html.d.ts +26 -0
- package/dist/components/app-brand/html.js +78 -0
- package/dist/components/app-brand/react.d.ts +12 -0
- package/dist/components/app-brand/react.js +86 -0
- package/dist/components/app-brand/schema.d.ts +36 -0
- package/dist/components/app-switcher/classes.d.ts +15 -0
- package/dist/components/app-switcher/html.d.ts +72 -0
- package/dist/components/app-switcher/html.js +327 -0
- package/dist/components/app-switcher/index.d.ts +47 -0
- package/dist/components/app-switcher/react.d.ts +12 -0
- package/dist/components/{ui/app-switcher.js → app-switcher/react.js} +84 -15
- package/dist/components/app-switcher/schema.d.ts +39 -0
- package/dist/components/async-action-button/classes.d.ts +11 -0
- package/dist/components/async-action-button/html.d.ts +46 -0
- package/dist/components/async-action-button/html.js +266 -0
- package/dist/components/async-action-button/index.d.ts +73 -0
- package/dist/components/async-action-button/react.d.ts +10 -0
- package/dist/components/async-action-button/react.js +378 -0
- package/dist/components/async-action-button/schema.d.ts +28 -0
- package/dist/{services/events/client/audit-log-table.d.ts → components/audit-log-table/react.d.ts} +2 -2
- package/dist/{services/events/client/audit-log-table.js → components/audit-log-table/react.js} +2195 -918
- package/dist/components/auto-height/html.d.ts +8 -0
- package/dist/components/auto-height/html.js +81 -0
- package/dist/components/auto-height/index.d.ts +2 -0
- package/dist/components/{ui/auto-height.d.ts → auto-height/react.d.ts} +2 -4
- package/dist/components/auto-height/react.js +75 -0
- package/dist/components/auto-height/schema.d.ts +7 -0
- package/dist/components/bulk-list-input/classes.d.ts +7 -0
- package/dist/components/bulk-list-input/html.d.ts +41 -0
- package/dist/components/bulk-list-input/html.js +265 -0
- package/dist/components/bulk-list-input/index.d.ts +76 -0
- package/dist/components/bulk-list-input/react.d.ts +12 -0
- package/dist/components/{ui/bulk-list-input.js → bulk-list-input/react.js} +71 -4
- package/dist/components/bulk-list-input/schema.d.ts +33 -0
- package/dist/components/choice-cards/classes.d.ts +19 -0
- package/dist/components/choice-cards/html.d.ts +76 -0
- package/dist/components/choice-cards/html.js +237 -0
- package/dist/components/choice-cards/index.d.ts +1 -0
- package/dist/components/choice-cards/react.d.ts +21 -0
- package/dist/components/{ui/choice-cards.js → choice-cards/react.js} +29 -10
- package/dist/components/choice-cards/schema.d.ts +100 -0
- package/dist/components/code-block/classes.d.ts +13 -0
- package/dist/components/code-block/html.d.ts +21 -0
- package/dist/components/code-block/html.js +381 -0
- package/dist/components/code-block/index.d.ts +4 -0
- package/dist/components/code-block/react.d.ts +4 -0
- package/dist/components/code-block/react.js +493 -0
- package/dist/components/code-block/schema.d.ts +29 -0
- package/dist/components/color-input/classes.d.ts +9 -0
- package/dist/components/color-input/html.d.ts +48 -0
- package/dist/components/color-input/html.js +187 -0
- package/dist/components/color-input/index.d.ts +88 -0
- package/dist/components/color-input/react.d.ts +7 -0
- package/dist/components/{ui/color-picker.js → color-input/react.js} +165 -233
- package/dist/components/color-input/schema.d.ts +40 -0
- package/dist/components/copy-button/html.d.ts +48 -0
- package/dist/components/copy-button/html.js +266 -0
- package/dist/components/copy-button/index.d.ts +73 -0
- package/dist/components/copy-button/react.d.ts +12 -0
- package/dist/components/copy-button/react.js +388 -0
- package/dist/components/copy-button/schema.d.ts +37 -0
- package/dist/components/copy-value/html.d.ts +37 -0
- package/dist/components/copy-value/html.js +426 -0
- package/dist/components/copy-value/index.d.ts +57 -0
- package/dist/components/copy-value/react.d.ts +9 -0
- package/dist/components/copy-value/react.js +682 -0
- package/dist/components/copy-value/schema.d.ts +45 -0
- package/dist/components/cron-input/classes.d.ts +25 -0
- package/dist/components/cron-input/html.d.ts +36 -0
- package/dist/components/cron-input/html.js +204 -0
- package/dist/components/cron-input/index.d.ts +59 -0
- package/dist/components/cron-input/react.d.ts +7 -0
- package/dist/components/{ui/cron-expression-editor.js → cron-input/react.js} +126 -54
- package/dist/components/cron-input/schema.d.ts +24 -0
- package/dist/components/danger-confirmation/classes.d.ts +7 -0
- package/dist/components/danger-confirmation/html.d.ts +39 -0
- package/dist/components/danger-confirmation/html.js +227 -0
- package/dist/components/danger-confirmation/index.d.ts +113 -0
- package/dist/components/{ui/danger-confirmation.d.ts → danger-confirmation/react.d.ts} +3 -12
- package/dist/components/danger-confirmation/react.js +550 -0
- package/dist/components/danger-confirmation/schema.d.ts +34 -0
- package/dist/components/data-table/classes.d.ts +63 -0
- package/dist/components/data-table/html.d.ts +1938 -0
- package/dist/components/data-table/html.js +2682 -0
- package/dist/components/data-table/index.d.ts +2686 -0
- package/dist/components/data-table/react.d.ts +578 -0
- package/dist/components/{ui/data-table.js → data-table/react.js} +2189 -906
- package/dist/components/data-table/schema.d.ts +3012 -0
- package/dist/components/date-input/classes.d.ts +17 -0
- package/dist/components/date-input/html.d.ts +60 -0
- package/dist/components/date-input/html.js +418 -0
- package/dist/components/date-input/index.d.ts +91 -0
- package/dist/components/date-input/react.d.ts +10 -0
- package/dist/components/{ui/date-picker.js → date-input/react.js} +233 -79
- package/dist/components/date-input/schema.d.ts +41 -0
- package/dist/components/editable-text/classes.d.ts +17 -0
- package/dist/components/editable-text/html.d.ts +51 -0
- package/dist/components/editable-text/html.js +370 -0
- package/dist/components/editable-text/index.d.ts +143 -0
- package/dist/components/editable-text/react.d.ts +6 -0
- package/dist/components/editable-text/react.js +499 -0
- package/dist/components/editable-text/schema.d.ts +31 -0
- package/dist/components/editing-locale-switcher/classes.d.ts +7 -0
- package/dist/components/editing-locale-switcher/html.d.ts +27 -0
- package/dist/components/editing-locale-switcher/html.js +250 -0
- package/dist/components/editing-locale-switcher/index.d.ts +52 -0
- package/dist/components/editing-locale-switcher/react.d.ts +7 -0
- package/dist/components/{ui/editing-locale-switcher.js → editing-locale-switcher/react.js} +70 -17
- package/dist/components/editing-locale-switcher/schema.d.ts +16 -0
- package/dist/components/{ui/effect-form.d.ts → effect-form/react.d.ts} +2 -2
- package/dist/components/{ui/effect-form.js → effect-form/react.js} +309 -83
- package/dist/components/effectcn/alert-dialog.d.ts +13 -0
- package/dist/components/effectcn/button.d.ts +31 -0
- package/dist/components/effectcn/calendar.d.ts +12 -0
- package/dist/components/effectcn/checkbox.d.ts +10 -0
- package/dist/components/effectcn/combobox.d.ts +25 -0
- package/dist/components/effectcn/dialog.d.ts +19 -0
- package/dist/components/effectcn/field.d.ts +11 -0
- package/dist/components/effectcn/file-drop.d.ts +8 -0
- package/dist/components/effectcn/input.d.ts +26 -0
- package/dist/components/effectcn/menu.d.ts +85 -0
- package/dist/components/effectcn/menubar.d.ts +8 -0
- package/dist/components/effectcn/popover.d.ts +18 -0
- package/dist/components/effectcn/scroll-area.d.ts +12 -0
- package/dist/components/effectcn/select.d.ts +68 -0
- package/dist/components/effectcn/toast.d.ts +29 -0
- package/dist/components/email-composer/index.d.ts +229 -0
- package/dist/components/email-composer/labels.d.ts +12 -0
- package/dist/components/email-composer/react.d.ts +5 -0
- package/dist/components/email-composer/react.js +1354 -0
- package/dist/components/email-composer/schema.d.ts +42 -0
- package/dist/components/email-editor/classes.d.ts +21 -0
- package/dist/components/email-editor/html.d.ts +360 -0
- package/dist/components/email-editor/html.js +1706 -0
- package/dist/components/email-editor/index.d.ts +693 -0
- package/dist/components/{ui/email-editor.d.ts → email-editor/labels.d.ts} +1 -19
- package/dist/components/email-editor/legacy-editor.html.d.ts +160 -0
- package/dist/components/email-editor/react.d.ts +11 -0
- package/dist/components/{ui/email-editor.js → email-editor/react.js} +1057 -712
- package/dist/components/email-editor/schema.d.ts +162 -0
- package/dist/components/error-component/classes.d.ts +7 -0
- package/dist/components/error-component/html.d.ts +120 -0
- package/dist/components/error-component/html.js +346 -0
- package/dist/components/error-component/index.d.ts +69 -0
- package/dist/components/error-component/react.d.ts +8 -0
- package/dist/components/error-component/react.js +744 -0
- package/dist/components/error-component/schema.d.ts +56 -0
- package/dist/components/file-input/classes.d.ts +7 -0
- package/dist/components/file-input/html.d.ts +95 -0
- package/dist/components/file-input/html.js +368 -0
- package/dist/components/file-input/index.d.ts +99 -0
- package/dist/components/file-input/react.d.ts +11 -0
- package/dist/components/{ui/file-picker.js → file-input/react.js} +122 -19
- package/dist/components/file-input/schema.d.ts +37 -0
- package/dist/components/{ui/form.d.ts → form/react.d.ts} +4 -4
- package/dist/components/{ui/form.js → form/react.js} +314 -84
- package/dist/components/icon-input/html.d.ts +55 -0
- package/dist/components/icon-input/html.js +538 -0
- package/dist/components/icon-input/index.d.ts +143 -0
- package/dist/components/icon-input/react.d.ts +6 -0
- package/dist/components/{ui/icon-input.js → icon-input/react.js} +459 -89
- package/dist/components/icon-input/schema.d.ts +23 -0
- package/dist/components/image-crop-editor/classes.d.ts +19 -0
- package/dist/components/image-crop-editor/html.d.ts +66 -0
- package/dist/components/image-crop-editor/html.js +561 -0
- package/dist/components/image-crop-editor/index.d.ts +183 -0
- package/dist/components/image-crop-editor/react.d.ts +8 -0
- package/dist/components/image-crop-editor/react.js +802 -0
- package/dist/components/image-crop-editor/schema.d.ts +54 -0
- package/dist/components/krakstack-provider/html.d.ts +17 -0
- package/dist/components/krakstack-provider/html.js +37 -0
- package/dist/components/krakstack-provider/index.d.ts +7 -0
- package/dist/components/krakstack-provider/react.d.ts +8 -0
- package/dist/components/{ui/krakstack-provider.js → krakstack-provider/react.js} +14 -5
- package/dist/components/krakstack-provider/schema.d.ts +6 -0
- package/dist/components/loading/classes.d.ts +5 -0
- package/dist/components/loading/html.d.ts +18 -0
- package/dist/components/loading/html.js +166 -0
- package/dist/components/loading/index.d.ts +6 -0
- package/dist/components/loading/react.d.ts +4 -0
- package/dist/components/loading/react.js +51 -0
- package/dist/components/loading/schema.d.ts +23 -0
- package/dist/components/locale-switcher/html.d.ts +22 -0
- package/dist/components/locale-switcher/html.js +264 -0
- package/dist/components/locale-switcher/index.d.ts +50 -0
- package/dist/components/locale-switcher/react.d.ts +7 -0
- package/dist/components/{ui/locale-switcher.js → locale-switcher/react.js} +55 -22
- package/dist/components/locale-switcher/schema.d.ts +12 -0
- package/dist/components/map-menu/classes.d.ts +13 -0
- package/dist/components/map-menu/google-maps.d.ts +80 -0
- package/dist/components/map-menu/google-viewport.d.ts +7 -0
- package/dist/components/map-menu/html.d.ts +274 -0
- package/dist/components/map-menu/html.js +934 -0
- package/dist/components/map-menu/index.d.ts +246 -0
- package/dist/components/map-menu/map.d.ts +47 -0
- package/dist/components/map-menu/react.d.ts +40 -0
- package/dist/components/{ui/map-menu.js → map-menu/react.js} +502 -141
- package/dist/components/map-menu/schema.d.ts +132 -0
- package/dist/components/markdown/classes.d.ts +1 -0
- package/dist/components/markdown/html.d.ts +23 -0
- package/dist/components/markdown/html.js +510 -0
- package/dist/components/markdown/index.d.ts +6 -0
- package/dist/components/markdown/react.d.ts +3 -0
- package/dist/components/markdown/react.js +546 -0
- package/dist/components/markdown/schema.d.ts +20 -0
- package/dist/components/notification-menu/classes.d.ts +11 -0
- package/dist/components/notification-menu/html.d.ts +67 -0
- package/dist/components/notification-menu/html.js +425 -0
- package/dist/components/notification-menu/index.d.ts +132 -0
- package/dist/components/notification-menu/react.d.ts +57 -0
- package/dist/components/notification-menu/react.js +829 -0
- package/dist/components/notification-menu/schema.d.ts +59 -0
- package/dist/components/pagination/classes.d.ts +19 -0
- package/dist/components/pagination/html.d.ts +49 -0
- package/dist/components/pagination/html.js +387 -0
- package/dist/components/pagination/index.d.ts +109 -0
- package/dist/components/pagination/react.d.ts +9 -0
- package/dist/components/{ui/pagination.js → pagination/react.js} +130 -30
- package/dist/components/pagination/schema.d.ts +36 -0
- package/dist/components/phone-number-input/classes.d.ts +17 -0
- package/dist/components/phone-number-input/html.d.ts +52 -0
- package/dist/components/phone-number-input/html.js +655 -0
- package/dist/components/phone-number-input/index.d.ts +59 -0
- package/dist/components/phone-number-input/react.d.ts +11 -0
- package/dist/components/{ui/phone-number-input.js → phone-number-input/react.js} +368 -138
- package/dist/components/phone-number-input/schema.d.ts +31 -0
- package/dist/components/presence-transition/html.d.ts +13 -0
- package/dist/components/presence-transition/html.js +128 -0
- package/dist/components/presence-transition/index.d.ts +57 -0
- package/dist/components/{ui/presence-transition.d.ts → presence-transition/react.d.ts} +3 -5
- package/dist/components/presence-transition/react.js +293 -0
- package/dist/components/presence-transition/schema.d.ts +7 -0
- package/dist/components/registry-previews/component-example.d.ts +31 -0
- package/dist/components/registry-previews/component-example.js +679 -0
- package/dist/components/registry-previews/html-preview.d.ts +17 -0
- package/dist/components/registry-previews/html-preview.js +83 -0
- package/dist/components/rich-text-editor/classes.d.ts +15 -0
- package/dist/components/rich-text-editor/engine.d.ts +9 -0
- package/dist/components/rich-text-editor/html.d.ts +246 -0
- package/dist/components/rich-text-editor/html.js +830 -0
- package/dist/components/rich-text-editor/index.d.ts +453 -0
- package/dist/components/rich-text-editor/labels.d.ts +42 -0
- package/dist/components/rich-text-editor/react.d.ts +19 -0
- package/dist/components/rich-text-editor/react.js +1175 -0
- package/dist/components/rich-text-editor/schema.d.ts +116 -0
- package/dist/components/search-menu/classes.d.ts +9 -0
- package/dist/components/search-menu/html.d.ts +127 -0
- package/dist/components/search-menu/html.js +432 -0
- package/dist/components/search-menu/index.d.ts +85 -0
- package/dist/components/search-menu/react.d.ts +18 -0
- package/dist/components/{ui/search-menu.js → search-menu/react.js} +290 -31
- package/dist/components/search-menu/schema.d.ts +78 -0
- package/dist/components/select-with-custom-input/classes.d.ts +17 -0
- package/dist/components/select-with-custom-input/html.d.ts +60 -0
- package/dist/components/select-with-custom-input/html.js +238 -0
- package/dist/components/select-with-custom-input/index.d.ts +114 -0
- package/dist/components/select-with-custom-input/react.d.ts +7 -0
- package/dist/components/{ui/select-with-custom-input.js → select-with-custom-input/react.js} +134 -29
- package/dist/components/select-with-custom-input/schema.d.ts +54 -0
- package/dist/components/sidebar-layout/classes.d.ts +21 -0
- package/dist/components/sidebar-layout/html.d.ts +97 -0
- package/dist/components/sidebar-layout/html.js +361 -0
- package/dist/components/sidebar-layout/index.d.ts +57 -0
- package/dist/components/sidebar-layout/react.d.ts +30 -0
- package/dist/components/{ui/sidebar-layout.js → sidebar-layout/react.js} +353 -39
- package/dist/components/sidebar-layout/schema.d.ts +54 -0
- package/dist/components/stats-card/classes.d.ts +11 -0
- package/dist/components/stats-card/html.d.ts +15 -0
- package/dist/components/stats-card/html.js +55 -0
- package/dist/components/stats-card/react.d.ts +7 -0
- package/dist/components/{ui/stats-card.js → stats-card/react.js} +19 -15
- package/dist/components/stats-card/schema.d.ts +14 -0
- package/dist/components/stepper/classes.d.ts +39 -0
- package/dist/components/stepper/html.d.ts +107 -0
- package/dist/components/stepper/html.js +397 -0
- package/dist/components/stepper/index.d.ts +83 -0
- package/dist/components/stepper/react.d.ts +17 -0
- package/dist/components/{ui/stepper.js → stepper/react.js} +120 -21
- package/dist/components/stepper/schema.d.ts +52 -0
- package/dist/components/support/classes.d.ts +55 -0
- package/dist/components/support/form.d.ts +19 -0
- package/dist/components/support/html.d.ts +266 -0
- package/dist/components/support/html.js +604 -0
- package/dist/components/support/index.d.ts +226 -0
- package/dist/components/support/multipart.d.ts +21 -0
- package/dist/components/support/react.d.ts +54 -0
- package/dist/components/support/react.js +1252 -0
- package/dist/components/support/schema.d.ts +69 -0
- package/dist/components/support.d.ts +1 -66
- package/dist/components/theme-switcher/html.d.ts +28 -0
- package/dist/components/theme-switcher/html.js +288 -0
- package/dist/components/theme-switcher/index.d.ts +59 -0
- package/dist/components/{ui/theme-switcher.d.ts → theme-switcher/react.d.ts} +4 -12
- package/dist/components/{ui/theme-switcher.js → theme-switcher/react.js} +69 -35
- package/dist/components/theme-switcher/schema.d.ts +33 -0
- package/dist/components/time-input/classes.d.ts +23 -0
- package/dist/components/time-input/html.d.ts +75 -0
- package/dist/components/time-input/html.js +571 -0
- package/dist/components/time-input/index.d.ts +164 -0
- package/dist/components/time-input/react.d.ts +7 -0
- package/dist/components/{ui/time-picker.js → time-input/react.js} +286 -114
- package/dist/components/time-input/schema.d.ts +96 -0
- package/dist/components/timezone-input/classes.d.ts +13 -0
- package/dist/components/timezone-input/html.d.ts +58 -0
- package/dist/components/timezone-input/html.js +804 -0
- package/dist/components/timezone-input/index.d.ts +170 -0
- package/dist/components/timezone-input/react.d.ts +9 -0
- package/dist/components/{ui/timezone-select.js → timezone-input/react.js} +493 -106
- package/dist/components/timezone-input/schema.d.ts +43 -0
- package/dist/components/toast/classes.d.ts +7 -0
- package/dist/components/toast/html.d.ts +34 -0
- package/dist/components/toast/html.js +280 -0
- package/dist/components/toast/index.d.ts +10 -0
- package/dist/components/toast/react.d.ts +9 -0
- package/dist/components/{ui/toast.js → toast/react.js} +35 -15
- package/dist/components/toast/schema.d.ts +24 -0
- package/dist/{services/events/client/tracking-notice.d.ts → components/tracking-notice/react.d.ts} +7 -1
- package/dist/{services/events/client/tracking-notice.js → components/tracking-notice/react.js} +13 -7
- package/dist/components/ui/animated-list.d.ts +1 -21
- package/dist/components/ui/app-brand.d.ts +1 -33
- package/dist/components/ui/async-action-button.d.ts +1 -17
- package/dist/components/ui/code-block.d.ts +1 -14
- package/dist/components/ui/copy-button.d.ts +1 -21
- package/dist/components/ui/data-table.d.ts +1 -584
- package/dist/components/ui/krakstack-provider.d.ts +1 -9
- package/dist/components/ui/loading.d.ts +1 -13
- package/dist/components/ui/pagination.d.ts +1 -47
- package/dist/components/ui/rich-text-editor.d.ts +1 -70
- package/dist/components/ui/search-menu.d.ts +1 -36
- package/dist/components/ui/select.js +159 -0
- package/dist/components/ui/sidebar-layout.d.ts +1 -40
- package/dist/components/ui/virtualized-combobox.d.ts +1 -59
- package/dist/components/unsaved-changes-guard/html.d.ts +34 -0
- package/dist/components/unsaved-changes-guard/html.js +172 -0
- package/dist/components/unsaved-changes-guard/index.d.ts +56 -0
- package/dist/components/unsaved-changes-guard/react.d.ts +4 -0
- package/dist/components/{ui/unsaved-changes-guard.js → unsaved-changes-guard/react.js} +74 -11
- package/dist/components/unsaved-changes-guard/schema.d.ts +37 -0
- package/dist/components/upload-attachment/classes.d.ts +11 -0
- package/dist/components/upload-attachment/html.d.ts +84 -0
- package/dist/components/upload-attachment/html.js +312 -0
- package/dist/components/upload-attachment/index.d.ts +72 -0
- package/dist/components/upload-attachment/react.d.ts +9 -0
- package/dist/components/{ui/upload-attachment.js → upload-attachment/react.js} +114 -17
- package/dist/components/upload-attachment/schema.d.ts +53 -0
- package/dist/components/virtualized-combobox/classes.d.ts +7 -0
- package/dist/components/virtualized-combobox/html.d.ts +97 -0
- package/dist/components/virtualized-combobox/html.js +310 -0
- package/dist/components/virtualized-combobox/index.d.ts +182 -0
- package/dist/components/virtualized-combobox/react.d.ts +31 -0
- package/dist/components/{ui/virtualized-combobox.js → virtualized-combobox/react.js} +160 -40
- package/dist/components/virtualized-combobox/schema.d.ts +92 -0
- package/dist/components/webhook-delivery-table/html.d.ts +216 -0
- package/dist/components/webhook-delivery-table/html.js +3008 -0
- package/dist/components/webhook-delivery-table/index.d.ts +405 -0
- package/dist/components/webhook-delivery-table/react.d.ts +13 -0
- package/dist/{services/webhooks/client/delivery-table.js → components/webhook-delivery-table/react.js} +2475 -956
- package/dist/components/webhook-delivery-table/schema.d.ts +134 -0
- package/dist/lib/docs.d.ts +17 -1
- package/dist/lib/docs.integrations.server.js +358 -73
- package/dist/lib/docs.js +861 -293
- package/dist/lib/docs.server.js +342 -57
- package/dist/lib/documentation-toolkit.d.ts +4 -4
- package/dist/lib/documentation-toolkit.js +354 -69
- package/dist/lib/effect-ui-adapter/model-runtime.d.ts +17 -0
- package/dist/lib/effect-ui-adapter/use-model.d.ts +9 -0
- package/dist/lib/effectcn-form.d.ts +3 -0
- package/dist/lib/effectcn-form.js +54 -0
- package/dist/lib/email-composer/index.d.ts +12 -0
- package/dist/lib/email-composer/index.js +110 -0
- package/dist/lib/email-composer/schema.d.ts +14 -0
- package/dist/lib/email-composer/schema.js +13 -0
- package/dist/lib/email-document/legacy-rich-text/editor.d.ts +70 -0
- package/dist/lib/email-document/legacy-rich-text/model.d.ts +19 -0
- package/dist/lib/email-document/legacy-rich-text/schema.d.ts +65 -0
- package/dist/lib/email-document/legacy-rich-text/tiptap.d.ts +39 -0
- package/dist/lib/email-document/model.d.ts +1 -1
- package/dist/lib/email-document/model.js +2 -2
- package/dist/lib/email-document/render.js +2 -2
- package/dist/lib/email-document/schema.js +1 -1
- package/dist/lib/httpapi-toolkit.d.ts +1 -1
- package/dist/lib/lucide-effect.d.ts +39 -0
- package/dist/lib/markdown/content.d.ts +1 -12
- package/dist/lib/rich-text/model.d.ts +5 -19
- package/dist/lib/rich-text/model.js +79 -111
- package/dist/lib/rich-text/schema.d.ts +5 -55
- package/dist/lib/rich-text/schema.js +17 -36
- package/dist/lib/rich-text/tiptap.d.ts +12 -0
- package/dist/lib/webfetch-toolkit.d.ts +1 -1
- package/dist/services/agent/client/index.js +695 -179
- package/dist/services/agent/client/widget.d.ts +1 -55
- package/dist/services/notification/client/index.js +138 -27
- package/dist/services/notification/client/notification-menu.d.ts +1 -85
- package/dist/services/notification/public.js +138 -27
- package/dist/services/opentelemetry/browser.js +15 -9
- package/dist/services/webhooks/index.d.ts +4 -3
- package/package.json +199 -137
- package/dist/components/support-dialog.js +0 -881
- package/dist/components/support.js +0 -881
- package/dist/components/ui/animated-list.js +0 -414
- package/dist/components/ui/animated-number.js +0 -75
- package/dist/components/ui/app-brand.js +0 -126
- package/dist/components/ui/app-switcher.d.ts +0 -26
- package/dist/components/ui/async-action-button.js +0 -149
- package/dist/components/ui/auto-height.js +0 -86
- package/dist/components/ui/bulk-list-input.d.ts +0 -25
- package/dist/components/ui/choice-cards.d.ts +0 -33
- package/dist/components/ui/code-block.js +0 -221
- package/dist/components/ui/color-picker.d.ts +0 -31
- package/dist/components/ui/copy-button.js +0 -138
- package/dist/components/ui/copy-value.d.ts +0 -24
- package/dist/components/ui/copy-value.js +0 -352
- package/dist/components/ui/cron-expression-editor.d.ts +0 -16
- package/dist/components/ui/cron-expression-editor.schema.d.ts +0 -7
- package/dist/components/ui/danger-confirmation.js +0 -398
- package/dist/components/ui/date-picker.d.ts +0 -33
- package/dist/components/ui/date-picker.schema.d.ts +0 -9
- package/dist/components/ui/editable-text.d.ts +0 -19
- package/dist/components/ui/editable-text.js +0 -341
- package/dist/components/ui/editing-locale-switcher.d.ts +0 -11
- package/dist/components/ui/error-component.d.ts +0 -34
- package/dist/components/ui/error-component.js +0 -387
- package/dist/components/ui/file-picker.d.ts +0 -37
- package/dist/components/ui/icon-input.d.ts +0 -58
- package/dist/components/ui/image-crop-editor.d.ts +0 -41
- package/dist/components/ui/image-crop-editor.js +0 -417
- package/dist/components/ui/loading.js +0 -39
- package/dist/components/ui/locale-switcher.d.ts +0 -11
- package/dist/components/ui/map-menu-map.d.ts +0 -115
- package/dist/components/ui/map-menu.d.ts +0 -87
- package/dist/components/ui/phone-number-input.d.ts +0 -22
- package/dist/components/ui/phone-number-input.schema.d.ts +0 -7
- package/dist/components/ui/presence-transition.js +0 -94
- package/dist/components/ui/rich-text-editor.js +0 -1135
- package/dist/components/ui/select-with-custom-input.d.ts +0 -36
- package/dist/components/ui/stats-card.d.ts +0 -12
- package/dist/components/ui/stepper.d.ts +0 -37
- package/dist/components/ui/time-picker.d.ts +0 -50
- package/dist/components/ui/time-picker.schema.d.ts +0 -28
- package/dist/components/ui/timezone-select.d.ts +0 -57
- package/dist/components/ui/timezone-select.schema.d.ts +0 -9
- package/dist/components/ui/toast.d.ts +0 -18
- package/dist/components/ui/unsaved-changes-guard.d.ts +0 -16
- package/dist/components/ui/upload-attachment.d.ts +0 -39
- package/dist/lib/rich-text/dom.d.ts +0 -40
- package/dist/services/notification/persistence/drizzle.d.ts +0 -868
- package/dist/services/notification/persistence/drizzle.js +0 -214
- package/dist/services/notification/persistence/index.d.ts +0 -2
- package/dist/services/notification/persistence/index.js +0 -227
- package/dist/services/notification/persistence/schema.d.ts +0 -143
- package/dist/services/notification/persistence/schema.js +0 -118
- package/dist/services/webhooks/client/delivery-table.d.ts +0 -62
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const AgentWidgetSharedPropsSchema: Schema.Struct<{
|
|
3
|
+
readonly locale: Schema.optional<Schema.String>;
|
|
4
|
+
}>;
|
|
5
|
+
export type AgentWidgetSharedProps = typeof AgentWidgetSharedPropsSchema.Type;
|
|
6
|
+
export declare const AgentWidgetSnapshotSchema: Schema.Struct<{
|
|
7
|
+
readonly context: Schema.optional<Schema.Struct<{
|
|
8
|
+
readonly key: Schema.String;
|
|
9
|
+
readonly label: Schema.String;
|
|
10
|
+
}>>;
|
|
11
|
+
readonly availableReferences: Schema.$Array<Schema.Struct<{
|
|
12
|
+
readonly key: Schema.String;
|
|
13
|
+
readonly label: Schema.String;
|
|
14
|
+
}>>;
|
|
15
|
+
readonly contextLocked: Schema.Boolean;
|
|
16
|
+
readonly pending: Schema.Boolean;
|
|
17
|
+
readonly error: Schema.optional<Schema.Literals<readonly ["invalid-request", "stream-failed", "unavailable"]>>;
|
|
18
|
+
readonly messages: Schema.$Array<Schema.Struct<{
|
|
19
|
+
readonly id: Schema.String;
|
|
20
|
+
readonly role: Schema.Literals<readonly ["user", "assistant"]>;
|
|
21
|
+
readonly text: Schema.String;
|
|
22
|
+
readonly markdown: Schema.optional<Schema.Struct<{
|
|
23
|
+
readonly html: Schema.String;
|
|
24
|
+
readonly codeBlocks: Schema.$Array<Schema.Struct<{
|
|
25
|
+
readonly code: Schema.String;
|
|
26
|
+
readonly language: Schema.String;
|
|
27
|
+
}>>;
|
|
28
|
+
}>>;
|
|
29
|
+
readonly tools: Schema.$Array<Schema.Struct<{
|
|
30
|
+
readonly type: Schema.Literal<"tool-call">;
|
|
31
|
+
readonly toolCallId: Schema.String;
|
|
32
|
+
readonly messageId: Schema.String;
|
|
33
|
+
readonly name: Schema.String;
|
|
34
|
+
readonly input: Schema.Unknown;
|
|
35
|
+
readonly metadata: Schema.Struct<{
|
|
36
|
+
readonly title: Schema.optional<Schema.String>;
|
|
37
|
+
readonly description: Schema.optional<Schema.String>;
|
|
38
|
+
readonly destructive: Schema.Boolean;
|
|
39
|
+
}>;
|
|
40
|
+
readonly approvalId: Schema.optional<Schema.String>;
|
|
41
|
+
readonly status: Schema.Literals<readonly ["running", "approval-required", "approved", "denied", "completed", "failed"]>;
|
|
42
|
+
}>>;
|
|
43
|
+
}>>;
|
|
44
|
+
}>;
|
|
45
|
+
export declare const AgentWidgetDraftSchema: Schema.Redacted<Schema.String>;
|
|
46
|
+
export declare const AgentWidgetTextSchema: Schema.String;
|
|
47
|
+
export declare const AgentWidgetIntentSchema: Schema.Union<readonly [Schema.TaggedStruct<"Submit", {
|
|
48
|
+
readonly text: Schema.Redacted<Schema.String>;
|
|
49
|
+
readonly referenceKeys: Schema.$Array<Schema.String>;
|
|
50
|
+
}>, Schema.TaggedStruct<"DecideApproval", {
|
|
51
|
+
readonly approvalId: Schema.String;
|
|
52
|
+
readonly toolCallId: Schema.String;
|
|
53
|
+
readonly approved: Schema.Boolean;
|
|
54
|
+
}>, Schema.TaggedStruct<"Interrupt", {}>, Schema.TaggedStruct<"Reset", {}>, Schema.TaggedStruct<"RemoveContext", {}>]>;
|
|
55
|
+
export type AgentWidgetIntent = typeof AgentWidgetIntentSchema.Type;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AnimatedListClassesOverrides } from "./schema.js";
|
|
2
|
+
export declare const animatedListClasses: {
|
|
3
|
+
readonly list: "relative grid gap-3";
|
|
4
|
+
readonly dragHandle: "text-muted-foreground focus-visible:ring-ring inline-flex size-8 shrink-0 cursor-grab touch-none items-center justify-center rounded-md outline-none select-none focus-visible:ring-2 active:cursor-grabbing disabled:cursor-default disabled:opacity-50";
|
|
5
|
+
};
|
|
6
|
+
export declare const resolveAnimatedListClasses: (overrides?: AnimatedListClassesOverrides) => {
|
|
7
|
+
list: string;
|
|
8
|
+
dragHandle: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type View } from "effect/ui";
|
|
2
|
+
import { Html } from "effect/ui/html";
|
|
3
|
+
import type { AnimatedListModelProps, AnimatedListRow } from "./schema.js";
|
|
4
|
+
export type { AnimatedListModelProps as AnimatedListProps, AnimatedListRow, } from "./schema.js";
|
|
5
|
+
/** Controlled keyed rows. A removed descriptor stays available to `renderItem` until its exit ends. */
|
|
6
|
+
export declare const AnimatedList: <Msg, R>(h: Html.H<Msg>, options: {
|
|
7
|
+
key?: string;
|
|
8
|
+
props: AnimatedListModelProps;
|
|
9
|
+
renderItem: (row: AnimatedListRow) => View.Input<Msg, R>;
|
|
10
|
+
onReorder?: (items: readonly AnimatedListRow[]) => Msg;
|
|
11
|
+
}) => View.Child<Msg, Exclude<R, never>>;
|
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
// ../../src/components/animated-list/html.ts
|
|
2
|
+
import { Effect, Queue, Schema as Schema3, Stream as Stream2 } from "effect";
|
|
3
|
+
import { Component as Component2, Mount } from "effect/ui";
|
|
4
|
+
import { Html } from "effect/ui/html";
|
|
5
|
+
import { GripVertical as GripVertical2 } from "lucide";
|
|
6
|
+
|
|
7
|
+
// ../../src/lib/lucide-effect.ts
|
|
8
|
+
import {
|
|
9
|
+
ArrowDown as arrowDown,
|
|
10
|
+
ArrowUp as arrowUp,
|
|
11
|
+
ListFilter as listFilter,
|
|
12
|
+
Check as check,
|
|
13
|
+
ChevronLeft as chevronLeft,
|
|
14
|
+
ChevronDown as chevronDown,
|
|
15
|
+
ChevronRight as chevronRight,
|
|
16
|
+
ChevronsLeft as chevronsLeft,
|
|
17
|
+
ChevronsRight as chevronsRight,
|
|
18
|
+
ChevronsUpDown as chevronsUpDown,
|
|
19
|
+
Copy as copy,
|
|
20
|
+
Download as download,
|
|
21
|
+
Eye as eye,
|
|
22
|
+
EyeOff as eyeOff,
|
|
23
|
+
Ellipsis as ellipsis,
|
|
24
|
+
FileJson as fileJson,
|
|
25
|
+
FileText as fileText,
|
|
26
|
+
GripVertical as gripVertical,
|
|
27
|
+
Image as image,
|
|
28
|
+
LayoutGrid as layoutGrid,
|
|
29
|
+
LoaderCircle as loaderCircle,
|
|
30
|
+
Mail as mail,
|
|
31
|
+
Paperclip as paperclip,
|
|
32
|
+
RefreshCw as refreshCw,
|
|
33
|
+
RotateCcw as rotateCcw,
|
|
34
|
+
Rows3 as rows3,
|
|
35
|
+
Search as search,
|
|
36
|
+
Settings2 as settings2,
|
|
37
|
+
TriangleAlert as triangleAlert,
|
|
38
|
+
X as x
|
|
39
|
+
} from "lucide";
|
|
40
|
+
var createLucideIcon = (icon) => (h, {
|
|
41
|
+
size = 24,
|
|
42
|
+
color = "currentColor",
|
|
43
|
+
strokeWidth = 2,
|
|
44
|
+
className
|
|
45
|
+
} = {}) => h.svg.attrs({
|
|
46
|
+
class: className,
|
|
47
|
+
width: String(size),
|
|
48
|
+
height: String(size),
|
|
49
|
+
viewBox: "0 0 24 24",
|
|
50
|
+
fill: "none",
|
|
51
|
+
stroke: color,
|
|
52
|
+
"stroke-width": String(strokeWidth),
|
|
53
|
+
"stroke-linecap": "round",
|
|
54
|
+
"stroke-linejoin": "round",
|
|
55
|
+
"aria-hidden": "true"
|
|
56
|
+
}).children(...icon.map(([tag, attributes]) => {
|
|
57
|
+
const attrs = Object.fromEntries(Object.entries(attributes).flatMap(([name, value]) => value === undefined ? [] : [[name, String(value)]]));
|
|
58
|
+
switch (tag) {
|
|
59
|
+
case "path":
|
|
60
|
+
return h.path.attrs(attrs);
|
|
61
|
+
case "circle":
|
|
62
|
+
return h.circle.attrs(attrs);
|
|
63
|
+
case "ellipse":
|
|
64
|
+
return h.ellipse.attrs(attrs);
|
|
65
|
+
case "line":
|
|
66
|
+
return h.line.attrs(attrs);
|
|
67
|
+
case "polyline":
|
|
68
|
+
return h.polyline.attrs(attrs);
|
|
69
|
+
case "polygon":
|
|
70
|
+
return h.polygon.attrs(attrs);
|
|
71
|
+
case "rect":
|
|
72
|
+
return h.rect.attrs(attrs);
|
|
73
|
+
default:
|
|
74
|
+
throw new Error(`Unsupported Lucide SVG element: ${tag}`);
|
|
75
|
+
}
|
|
76
|
+
}));
|
|
77
|
+
var Check = createLucideIcon(check);
|
|
78
|
+
var ArrowDown = createLucideIcon(arrowDown);
|
|
79
|
+
var ArrowUp = createLucideIcon(arrowUp);
|
|
80
|
+
var ListFilter = createLucideIcon(listFilter);
|
|
81
|
+
var ChevronLeft = createLucideIcon(chevronLeft);
|
|
82
|
+
var ChevronDown = createLucideIcon(chevronDown);
|
|
83
|
+
var ChevronRight = createLucideIcon(chevronRight);
|
|
84
|
+
var ChevronsLeft = createLucideIcon(chevronsLeft);
|
|
85
|
+
var ChevronsRight = createLucideIcon(chevronsRight);
|
|
86
|
+
var ChevronsUpDown = createLucideIcon(chevronsUpDown);
|
|
87
|
+
var Copy = createLucideIcon(copy);
|
|
88
|
+
var Download = createLucideIcon(download);
|
|
89
|
+
var Eye = createLucideIcon(eye);
|
|
90
|
+
var EyeOff = createLucideIcon(eyeOff);
|
|
91
|
+
var Ellipsis = createLucideIcon(ellipsis);
|
|
92
|
+
var FileJson = createLucideIcon(fileJson);
|
|
93
|
+
var FileText = createLucideIcon(fileText);
|
|
94
|
+
var GripVertical = createLucideIcon(gripVertical);
|
|
95
|
+
var Image = createLucideIcon(image);
|
|
96
|
+
var LayoutGrid = createLucideIcon(layoutGrid);
|
|
97
|
+
var LoaderCircle = createLucideIcon(loaderCircle);
|
|
98
|
+
var Mail = createLucideIcon(mail);
|
|
99
|
+
var Paperclip = createLucideIcon(paperclip);
|
|
100
|
+
var RefreshCw = createLucideIcon(refreshCw);
|
|
101
|
+
var RotateCcw = createLucideIcon(rotateCcw);
|
|
102
|
+
var Rows3 = createLucideIcon(rows3);
|
|
103
|
+
var Search = createLucideIcon(search);
|
|
104
|
+
var Settings2 = createLucideIcon(settings2);
|
|
105
|
+
var TriangleAlert = createLucideIcon(triangleAlert);
|
|
106
|
+
var X = createLucideIcon(x);
|
|
107
|
+
|
|
108
|
+
// ../../src/components/animated-list/html.ts
|
|
109
|
+
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
110
|
+
|
|
111
|
+
// ../../src/components/animated-list/classes.ts
|
|
112
|
+
var animatedListClasses = {
|
|
113
|
+
list: "relative grid gap-3",
|
|
114
|
+
dragHandle: "text-muted-foreground focus-visible:ring-ring inline-flex size-8 shrink-0 cursor-grab touch-none items-center justify-center rounded-md outline-none select-none focus-visible:ring-2 active:cursor-grabbing disabled:cursor-default disabled:opacity-50"
|
|
115
|
+
};
|
|
116
|
+
var resolveAnimatedListClasses = (overrides) => ({
|
|
117
|
+
...animatedListClasses,
|
|
118
|
+
...overrides
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
// ../../src/components/animated-list/index.ts
|
|
122
|
+
import { Schema as Schema2, Stream } from "effect";
|
|
123
|
+
import { Component, Subscription, UiSchema } from "effect/ui";
|
|
124
|
+
|
|
125
|
+
// ../../src/components/animated-list/schema.ts
|
|
126
|
+
import { Predicate, Schema, Struct } from "effect";
|
|
127
|
+
var Position = Schema.declare((value) => Predicate.isFunction(value));
|
|
128
|
+
var MessageOverrides = Schema.Struct({
|
|
129
|
+
reorder: Schema.optional(Schema.String),
|
|
130
|
+
instructions: Schema.optional(Schema.String),
|
|
131
|
+
position: Schema.optional(Position)
|
|
132
|
+
});
|
|
133
|
+
var AnimatedListClassesOverridesSchema = Schema.Record(Schema.Literals(Struct.keys(animatedListClasses)), Schema.optionalKey(Schema.String)).annotate({ identifier: "AnimatedListClassesOverrides" });
|
|
134
|
+
var AnimatedListPropsSchema = Schema.Struct({
|
|
135
|
+
classes: Schema.optional(AnimatedListClassesOverridesSchema),
|
|
136
|
+
duration: Schema.optional(Schema.Number),
|
|
137
|
+
className: Schema.optional(Schema.String),
|
|
138
|
+
itemClassName: Schema.optional(Schema.String),
|
|
139
|
+
label: Schema.optional(Schema.String),
|
|
140
|
+
dragOverflow: Schema.optional(Schema.Number),
|
|
141
|
+
locale: Schema.optional(Schema.String),
|
|
142
|
+
messages: Schema.optional(Schema.Record(Schema.String, Schema.UndefinedOr(MessageOverrides)))
|
|
143
|
+
}).annotate({ identifier: "AnimatedListProps" });
|
|
144
|
+
var AnimatedListRow = Schema.Struct({
|
|
145
|
+
key: Schema.String,
|
|
146
|
+
label: Schema.optional(Schema.String)
|
|
147
|
+
}).annotate({ identifier: "AnimatedListRow" });
|
|
148
|
+
var AnimatedListModelProps = Schema.Struct({
|
|
149
|
+
...AnimatedListPropsSchema.fields,
|
|
150
|
+
items: Schema.Array(AnimatedListRow),
|
|
151
|
+
reorderable: Schema.optional(Schema.Boolean)
|
|
152
|
+
}).annotate({ identifier: "AnimatedListModelProps" });
|
|
153
|
+
|
|
154
|
+
// ../../src/components/animated-list/index.ts
|
|
155
|
+
var labels = {
|
|
156
|
+
en: {
|
|
157
|
+
reorder: "Reorder",
|
|
158
|
+
instructions: "Drag to reorder, or use Arrow Up, Arrow Down, Home and End on the handle.",
|
|
159
|
+
position: (label, position, total) => `${label}, position ${position} of ${total}.`
|
|
160
|
+
},
|
|
161
|
+
fr: {
|
|
162
|
+
reorder: "Réordonner",
|
|
163
|
+
instructions: "Faites glisser pour réordonner, ou utilisez les flèches haut et bas, Début et Fin sur la poignée.",
|
|
164
|
+
position: (label, position, total) => `${label}, position ${position} sur ${total}.`
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
var animatedListCopy = (locale, messages) => ({
|
|
168
|
+
...locale.startsWith("fr") ? labels.fr : labels.en,
|
|
169
|
+
...messages?.[locale.split("-")[0] ?? locale],
|
|
170
|
+
...messages?.[locale]
|
|
171
|
+
});
|
|
172
|
+
var reorderTarget = (key, index, total) => key === "Home" ? 0 : key === "End" ? total - 1 : key === "ArrowUp" ? Math.max(0, index - 1) : key === "ArrowDown" ? Math.min(total - 1, index + 1) : undefined;
|
|
173
|
+
var moveItem = (items, from, to) => {
|
|
174
|
+
if (from < 0 || from >= items.length || to < 0 || to >= items.length || from === to)
|
|
175
|
+
return;
|
|
176
|
+
const next = [...items];
|
|
177
|
+
next.splice(to, 0, ...next.splice(from, 1));
|
|
178
|
+
return next;
|
|
179
|
+
};
|
|
180
|
+
var retainedRows = (items, previous) => {
|
|
181
|
+
const keys = new Set(items.map((row) => row.key));
|
|
182
|
+
const next = [...items];
|
|
183
|
+
previous.forEach((row, index) => {
|
|
184
|
+
if (!keys.has(row.key))
|
|
185
|
+
next.splice(Math.min(index, next.length), 0, row);
|
|
186
|
+
});
|
|
187
|
+
return next;
|
|
188
|
+
};
|
|
189
|
+
var listAnnouncement = (items, key, copy) => {
|
|
190
|
+
const index = items.findIndex((row) => row.key === key);
|
|
191
|
+
const row = items[index];
|
|
192
|
+
return row ? copy.position(row.label ?? row.key, index + 1, items.length) : "";
|
|
193
|
+
};
|
|
194
|
+
var AnimatedListMessage = UiSchema.TaggedEnum({
|
|
195
|
+
Synced: {},
|
|
196
|
+
Exited: { key: Schema2.String },
|
|
197
|
+
Announced: { key: Schema2.String },
|
|
198
|
+
Moved: { key: Schema2.String, to: Schema2.Number }
|
|
199
|
+
});
|
|
200
|
+
var AnimatedListEvent = UiSchema.TaggedEnum({
|
|
201
|
+
Reordered: {
|
|
202
|
+
from: Schema2.Number,
|
|
203
|
+
to: Schema2.Number,
|
|
204
|
+
items: Schema2.Array(AnimatedListRow)
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
var animatedListOptions = {
|
|
208
|
+
name: "AnimatedList",
|
|
209
|
+
props: AnimatedListModelProps,
|
|
210
|
+
model: Schema2.Struct({
|
|
211
|
+
lastItems: Schema2.Array(AnimatedListRow),
|
|
212
|
+
rows: Schema2.Array(AnimatedListRow),
|
|
213
|
+
announcedKey: Schema2.NullOr(Schema2.String)
|
|
214
|
+
}).annotate({ identifier: "AnimatedListModel" }),
|
|
215
|
+
message: AnimatedListMessage,
|
|
216
|
+
restore: false
|
|
217
|
+
};
|
|
218
|
+
var Definition = Component.define(animatedListOptions);
|
|
219
|
+
var changed = Subscription.make("animated-list/changed", Stream.succeed(AnimatedListMessage.Synced()));
|
|
220
|
+
var listMove = (props, key, to) => {
|
|
221
|
+
const from = props.items.findIndex((row) => row.key === key);
|
|
222
|
+
const items = props.reorderable && moveItem(props.items, from, to);
|
|
223
|
+
return items ? { from, to, items } : undefined;
|
|
224
|
+
};
|
|
225
|
+
var updateAnimatedList = ({
|
|
226
|
+
model,
|
|
227
|
+
props
|
|
228
|
+
}, message) => {
|
|
229
|
+
switch (message._tag) {
|
|
230
|
+
case "Synced":
|
|
231
|
+
return {
|
|
232
|
+
...model,
|
|
233
|
+
lastItems: props.items,
|
|
234
|
+
rows: retainedRows(props.items, model.rows)
|
|
235
|
+
};
|
|
236
|
+
case "Exited":
|
|
237
|
+
return props.items.some((row) => row.key === message.key) ? model : {
|
|
238
|
+
...model,
|
|
239
|
+
rows: model.rows.filter((row) => row.key !== message.key)
|
|
240
|
+
};
|
|
241
|
+
case "Announced":
|
|
242
|
+
return { ...model, announcedKey: message.key };
|
|
243
|
+
case "Moved":
|
|
244
|
+
return listMove(props, message.key, message.to) ? { ...model, announcedKey: message.key } : model;
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
var update = Definition.update(updateAnimatedList);
|
|
248
|
+
var animatedListBehaviours = {
|
|
249
|
+
init: Definition.init(({ props }) => ({
|
|
250
|
+
lastItems: props.items,
|
|
251
|
+
rows: props.items,
|
|
252
|
+
announcedKey: null
|
|
253
|
+
})),
|
|
254
|
+
update,
|
|
255
|
+
subscriptions: Definition.subscriptions(({ model, props }) => [
|
|
256
|
+
(props.items.length !== model.lastItems.length || props.items.some(({ key, label }, index) => model.lastItems[index]?.key !== key || model.lastItems[index]?.label !== label)) && changed
|
|
257
|
+
])
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
// ../../src/components/animated-list/html.ts
|
|
261
|
+
var Grip = createLucideIcon(GripVertical2);
|
|
262
|
+
var query = "(prefers-reduced-motion: reduce)";
|
|
263
|
+
var easing = "cubic-bezier(0.2, 0, 0, 1)";
|
|
264
|
+
var durationOf = (duration) => globalThis.matchMedia?.(query).matches || !Number.isFinite(duration) ? 0 : Math.max(0, duration);
|
|
265
|
+
var AnimateRow = Mount.makeStream("AnimatedList/AnimateRow", {
|
|
266
|
+
args: {
|
|
267
|
+
key: Schema3.String,
|
|
268
|
+
present: Schema3.Boolean,
|
|
269
|
+
duration: Schema3.Number
|
|
270
|
+
}
|
|
271
|
+
}, (element, initial, changes) => Stream2.callback((queue) => Effect.gen(function* () {
|
|
272
|
+
let animation;
|
|
273
|
+
let present = true;
|
|
274
|
+
const motion = globalThis.matchMedia?.(query);
|
|
275
|
+
const stop = () => {
|
|
276
|
+
if (!animation)
|
|
277
|
+
return;
|
|
278
|
+
animation.onfinish = null;
|
|
279
|
+
animation.cancel();
|
|
280
|
+
animation = undefined;
|
|
281
|
+
};
|
|
282
|
+
const settle = () => {
|
|
283
|
+
stop();
|
|
284
|
+
if (!present)
|
|
285
|
+
Queue.offerUnsafe(queue, AnimatedListMessage.Exited({ key: initial.key }));
|
|
286
|
+
};
|
|
287
|
+
const update = (args) => {
|
|
288
|
+
if (args.present === present)
|
|
289
|
+
return;
|
|
290
|
+
present = args.present;
|
|
291
|
+
const opacity = animation ? getComputedStyle(element).opacity : present ? 0 : 1;
|
|
292
|
+
stop();
|
|
293
|
+
const duration = durationOf(args.duration);
|
|
294
|
+
if (!element.animate || !duration)
|
|
295
|
+
return settle();
|
|
296
|
+
animation = element.animate([{ opacity }, { opacity: present ? 1 : 0 }], { duration, easing });
|
|
297
|
+
animation.onfinish = settle;
|
|
298
|
+
};
|
|
299
|
+
const onMotion = () => {
|
|
300
|
+
if (motion?.matches && animation)
|
|
301
|
+
settle();
|
|
302
|
+
};
|
|
303
|
+
yield* Effect.acquireRelease(Effect.sync(() => {
|
|
304
|
+
motion?.addEventListener("change", onMotion);
|
|
305
|
+
}), () => Effect.sync(() => {
|
|
306
|
+
motion?.removeEventListener("change", onMotion);
|
|
307
|
+
stop();
|
|
308
|
+
}));
|
|
309
|
+
update(initial);
|
|
310
|
+
yield* Stream2.runForEach(changes, (args) => Effect.sync(() => update(args)));
|
|
311
|
+
})));
|
|
312
|
+
var TrackList = Mount.makeStream("AnimatedList/TrackList", {
|
|
313
|
+
args: {
|
|
314
|
+
keys: Schema3.Array(Schema3.String),
|
|
315
|
+
duration: Schema3.Number,
|
|
316
|
+
overflow: Schema3.Number,
|
|
317
|
+
enabled: Schema3.Boolean
|
|
318
|
+
}
|
|
319
|
+
}, (list, initial, changes) => Stream2.callback((queue) => Effect.gen(function* () {
|
|
320
|
+
let options = initial;
|
|
321
|
+
const rows = () => Array.from(list.children).filter((child) => child instanceof HTMLLIElement);
|
|
322
|
+
let positions = new Map(rows().map((row) => [row, row.offsetTop]));
|
|
323
|
+
const animations = new Map;
|
|
324
|
+
let drag;
|
|
325
|
+
const end = () => {
|
|
326
|
+
if (!drag)
|
|
327
|
+
return;
|
|
328
|
+
const { row, pointer } = drag;
|
|
329
|
+
drag = undefined;
|
|
330
|
+
row.style.translate = "";
|
|
331
|
+
row.style.zIndex = "";
|
|
332
|
+
row.removeAttribute("data-dragging");
|
|
333
|
+
if (list.hasPointerCapture?.(pointer))
|
|
334
|
+
list.releasePointerCapture(pointer);
|
|
335
|
+
};
|
|
336
|
+
const updateDrag = () => {
|
|
337
|
+
if (!drag?.active)
|
|
338
|
+
return;
|
|
339
|
+
const bounds = list.getBoundingClientRect();
|
|
340
|
+
const top = bounds.top + list.clientTop - list.scrollTop;
|
|
341
|
+
const { row, key, y, grab } = drag;
|
|
342
|
+
const allowance = Math.max(0, options.overflow);
|
|
343
|
+
const desired = Math.max(bounds.top - allowance, Math.min(bounds.bottom - row.offsetHeight + allowance, y - grab));
|
|
344
|
+
row.style.translate = `0 ${desired - top - row.offsetTop}px`;
|
|
345
|
+
const items = rows().filter((row) => !row.inert && row.getAttribute("aria-hidden") !== "true");
|
|
346
|
+
const from = items.indexOf(row);
|
|
347
|
+
let to = from;
|
|
348
|
+
for (const [index, item] of items.entries()) {
|
|
349
|
+
const middle = top + item.offsetTop + item.offsetHeight / 2;
|
|
350
|
+
if (index < from && desired < middle) {
|
|
351
|
+
to = index;
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
if (index > from && desired + row.offsetHeight > middle)
|
|
355
|
+
to = index;
|
|
356
|
+
}
|
|
357
|
+
if (from >= 0 && to !== from)
|
|
358
|
+
Queue.offerUnsafe(queue, AnimatedListMessage.Moved({ key, to }));
|
|
359
|
+
};
|
|
360
|
+
const down = (event) => {
|
|
361
|
+
if (!options.enabled || drag || event.button !== 0 || !(event.target instanceof Element))
|
|
362
|
+
return;
|
|
363
|
+
const handle = event.target.closest("[data-slot=animated-list-handle]");
|
|
364
|
+
const row = handle?.parentElement;
|
|
365
|
+
const key = row?.dataset.motionKey;
|
|
366
|
+
if (!handle || handle.disabled || !(row instanceof HTMLLIElement) || row.parentElement !== list || key === undefined)
|
|
367
|
+
return;
|
|
368
|
+
list.setPointerCapture?.(event.pointerId);
|
|
369
|
+
drag = {
|
|
370
|
+
row,
|
|
371
|
+
key,
|
|
372
|
+
pointer: event.pointerId,
|
|
373
|
+
start: event.clientY,
|
|
374
|
+
y: event.clientY,
|
|
375
|
+
grab: event.clientY - row.getBoundingClientRect().top,
|
|
376
|
+
active: false
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
const move = (event) => {
|
|
380
|
+
if (!drag || drag.pointer !== event.pointerId)
|
|
381
|
+
return;
|
|
382
|
+
drag.y = event.clientY;
|
|
383
|
+
if (!drag.active && Math.abs(drag.y - drag.start) < 4)
|
|
384
|
+
return;
|
|
385
|
+
drag.active = true;
|
|
386
|
+
drag.row.dataset.dragging = "";
|
|
387
|
+
drag.row.style.zIndex = "1";
|
|
388
|
+
updateDrag();
|
|
389
|
+
};
|
|
390
|
+
const stop = (event) => {
|
|
391
|
+
if (drag?.pointer === event.pointerId)
|
|
392
|
+
end();
|
|
393
|
+
};
|
|
394
|
+
const motion = globalThis.matchMedia?.(query);
|
|
395
|
+
const cancelAnimations = () => {
|
|
396
|
+
for (const animation of animations.values())
|
|
397
|
+
animation.cancel();
|
|
398
|
+
animations.clear();
|
|
399
|
+
};
|
|
400
|
+
const onMotion = () => {
|
|
401
|
+
if (motion?.matches)
|
|
402
|
+
cancelAnimations();
|
|
403
|
+
};
|
|
404
|
+
const sync = (args) => {
|
|
405
|
+
options = args;
|
|
406
|
+
if (!args.enabled || drag && !args.keys.includes(`+${drag.key}`))
|
|
407
|
+
end();
|
|
408
|
+
const duration = durationOf(args.duration);
|
|
409
|
+
const next = new Map(rows().map((row) => [row, row.offsetTop]));
|
|
410
|
+
for (const [row, position] of next) {
|
|
411
|
+
const old = positions.get(row);
|
|
412
|
+
if (old === position || row === drag?.row || !duration || !row.animate)
|
|
413
|
+
continue;
|
|
414
|
+
const transform = getComputedStyle(row).transform;
|
|
415
|
+
const interrupted = transform === "none" || !globalThis.DOMMatrixReadOnly ? 0 : new DOMMatrixReadOnly(transform).m42;
|
|
416
|
+
animations.get(row)?.cancel();
|
|
417
|
+
const animation = row.animate(old === undefined ? [{ opacity: 0 }, { opacity: 1 }] : [
|
|
418
|
+
{
|
|
419
|
+
transform: `translateY(${old - position + interrupted}px)`
|
|
420
|
+
},
|
|
421
|
+
{ transform: "none" }
|
|
422
|
+
], { duration, easing });
|
|
423
|
+
animations.set(row, animation);
|
|
424
|
+
animation.onfinish = () => {
|
|
425
|
+
if (animations.get(row) === animation)
|
|
426
|
+
animations.delete(row);
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
for (const [row, animation] of animations) {
|
|
430
|
+
if (!next.has(row)) {
|
|
431
|
+
animation.cancel();
|
|
432
|
+
animations.delete(row);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
positions = next;
|
|
436
|
+
updateDrag();
|
|
437
|
+
};
|
|
438
|
+
const listeners = new AbortController;
|
|
439
|
+
yield* Effect.acquireRelease(Effect.sync(() => {
|
|
440
|
+
const { signal } = listeners;
|
|
441
|
+
list.addEventListener("pointerdown", down, { signal });
|
|
442
|
+
document.addEventListener("pointermove", move, { signal });
|
|
443
|
+
document.addEventListener("pointerup", stop, { signal });
|
|
444
|
+
document.addEventListener("pointercancel", stop, { signal });
|
|
445
|
+
document.addEventListener("lostpointercapture", stop, { signal });
|
|
446
|
+
document.addEventListener("scroll", updateDrag, {
|
|
447
|
+
capture: true,
|
|
448
|
+
signal
|
|
449
|
+
});
|
|
450
|
+
window.addEventListener("resize", end, { signal });
|
|
451
|
+
motion?.addEventListener("change", onMotion);
|
|
452
|
+
}), () => Effect.sync(() => {
|
|
453
|
+
listeners.abort();
|
|
454
|
+
motion?.removeEventListener("change", onMotion);
|
|
455
|
+
cancelAnimations();
|
|
456
|
+
end();
|
|
457
|
+
}));
|
|
458
|
+
yield* Stream2.runForEach(changes, (args) => Effect.sync(() => sync(args)));
|
|
459
|
+
})));
|
|
460
|
+
var options = {
|
|
461
|
+
...animatedListOptions,
|
|
462
|
+
events: AnimatedListEvent,
|
|
463
|
+
reads: { localeConfig: krakstackLocaleRead }
|
|
464
|
+
};
|
|
465
|
+
var List = Html.component(options).make({
|
|
466
|
+
...animatedListBehaviours,
|
|
467
|
+
init: ({ props }) => ({
|
|
468
|
+
lastItems: props.items,
|
|
469
|
+
rows: props.items,
|
|
470
|
+
announcedKey: null
|
|
471
|
+
}),
|
|
472
|
+
update: Component2.define(options).update(($, message) => {
|
|
473
|
+
const next = updateAnimatedList($, message);
|
|
474
|
+
const move = message._tag === "Moved" && listMove($.props, message.key, message.to);
|
|
475
|
+
return move ? $.set(next).emit(AnimatedListEvent.Reordered(move)) : next;
|
|
476
|
+
}),
|
|
477
|
+
parts: (p, model) => {
|
|
478
|
+
const animatedListClasses = resolveAnimatedListClasses(p.props.classes);
|
|
479
|
+
const { items, reorderable, duration = 180, dragOverflow = 12 } = p.props;
|
|
480
|
+
const copy = animatedListCopy(p.props.locale ?? p.reads.localeConfig?.locale ?? "en", p.props.messages);
|
|
481
|
+
const rows = retainedRows(items, model.rows);
|
|
482
|
+
const instructions = p.id("instructions");
|
|
483
|
+
return {
|
|
484
|
+
rows,
|
|
485
|
+
instructions,
|
|
486
|
+
copy,
|
|
487
|
+
announcement: listAnnouncement(items, model.announcedKey, copy),
|
|
488
|
+
list: p.part("ul", (b) => b.class(animatedListClasses.list, p.props.className).attrs({ "data-slot": "animated-list", "aria-label": p.props.label }).onMount(TrackList({
|
|
489
|
+
keys: rows.map((row) => `${items.some((item) => item.key === row.key) ? "+" : "-"}${row.key}`),
|
|
490
|
+
duration,
|
|
491
|
+
overflow: dragOverflow,
|
|
492
|
+
enabled: !!reorderable && items.length >= 2
|
|
493
|
+
}))),
|
|
494
|
+
row: p.part("li", (b, row) => {
|
|
495
|
+
const present = items.some((item) => item.key === row.key);
|
|
496
|
+
return b.class("relative", p.props.itemClassName).attrs({
|
|
497
|
+
inert: present ? undefined : "",
|
|
498
|
+
"data-slot": "animated-list-item",
|
|
499
|
+
"data-motion-key": row.key,
|
|
500
|
+
"aria-hidden": present ? undefined : "true"
|
|
501
|
+
}).onMount(AnimateRow({ key: row.key, present, duration }));
|
|
502
|
+
}),
|
|
503
|
+
handle: p.part("button", (b, { key, label }) => {
|
|
504
|
+
const index = items.findIndex((item) => item.key === key);
|
|
505
|
+
return b.attrs({
|
|
506
|
+
type: "button",
|
|
507
|
+
disabled: items.length < 2 || index < 0 ? "" : undefined,
|
|
508
|
+
"data-slot": "animated-list-handle",
|
|
509
|
+
"aria-label": `${copy.reorder}: ${label ?? key}`,
|
|
510
|
+
"aria-describedby": instructions
|
|
511
|
+
}).class(animatedListClasses.dragHandle).on("keydown", (event) => {
|
|
512
|
+
if (event.alt || event.ctrl || event.meta || event.shift || event.composing)
|
|
513
|
+
return;
|
|
514
|
+
const to = reorderTarget(event.key, index, items.length);
|
|
515
|
+
return to === undefined ? undefined : AnimatedListMessage.Moved({ key, to });
|
|
516
|
+
}, { preventDefault: true });
|
|
517
|
+
})
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
var AnimatedList = (h, options) => List(h, {
|
|
522
|
+
key: options.key,
|
|
523
|
+
props: { ...options.props, reorderable: !!options.onReorder },
|
|
524
|
+
onEmit: options.onReorder ? ({ items }) => options.onReorder?.(items) : undefined,
|
|
525
|
+
view: (parts) => h.div.children(parts.list(h.ul).children(parts.rows.map((row) => parts.row(h.li.key(row.key), row).children(options.onReorder && parts.handle(h.button, row).children(Grip(h, { size: 16 })), options.renderItem(row)))), options.onReorder && h.p.attr("id", parts.instructions).class("sr-only").children(parts.copy.instructions), options.onReorder && h.p.class("sr-only").attrs({
|
|
526
|
+
role: "status",
|
|
527
|
+
"aria-live": "polite",
|
|
528
|
+
"aria-atomic": "true"
|
|
529
|
+
}).children(parts.announcement))
|
|
530
|
+
});
|
|
531
|
+
export {
|
|
532
|
+
AnimatedList
|
|
533
|
+
};
|