@krak-stack/registry 0.10.20 → 0.11.2
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 +89 -3
- package/README.md +11 -8
- package/dist/components/agent/index.d.ts +454 -0
- package/dist/components/agent/react.d.ts +55 -0
- package/dist/components/agent/react.js +2440 -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/{ui/animated-list.js → animated-list/react.js} +199 -54
- 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 +124 -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 +224 -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} +1964 -847
- 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/{ui/code-block.js → code-block/react.js} +168 -50
- 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 +234 -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/{ui/copy-value.js → copy-value/react.js} +243 -65
- 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/{ui/danger-confirmation.js → danger-confirmation/react.js} +203 -205
- 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} +1958 -835
- 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 +345 -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} +63 -10
- 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} +302 -76
- 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/{ui/email-composer.js → email-composer/react.js} +461 -127
- 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 -21
- 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} +600 -230
- 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/{ui/error-component.js → error-component/react.js} +281 -78
- 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} +7 -7
- package/dist/components/{ui/form.js → form/react.js} +300 -74
- 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} +305 -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 +648 -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} +321 -83
- 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 +392 -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} +123 -23
- 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 +139 -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 +525 -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/{ui/rich-text-editor.js → rich-text-editor/react.js} +365 -96
- 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} +128 -23
- 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} +127 -22
- 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} +199 -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 +1098 -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} +337 -104
- 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 -72
- package/dist/components/ui/search-menu.d.ts +1 -36
- 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} +2278 -917
- 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 +341 -75
- package/dist/lib/docs.js +715 -299
- package/dist/lib/docs.server.js +325 -59
- package/dist/lib/documentation-toolkit.d.ts +4 -4
- package/dist/lib/documentation-toolkit.js +337 -71
- 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/effect-ui-adapter/use-model.js +158 -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/schema.d.ts +14 -0
- 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 -0
- package/dist/lib/webfetch-toolkit.d.ts +1 -1
- package/dist/services/agent/client/index.js +530 -168
- 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 +185 -142
- package/dist/components/support-dialog.js +0 -881
- package/dist/components/support.js +0 -881
- 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/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/cron-expression-editor.d.ts +0 -16
- package/dist/components/ui/cron-expression-editor.schema.d.ts +0 -7
- 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/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/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/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,205 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { Component, Subscription, UiSchema } from "effect/ui";
|
|
3
|
+
import { AnimatedListModelProps, AnimatedListRow, type AnimatedListSharedProps } from "./schema.js";
|
|
4
|
+
export declare const animatedListCopy: (locale: string, messages: AnimatedListSharedProps["messages"]) => {
|
|
5
|
+
reorder: string;
|
|
6
|
+
instructions: string;
|
|
7
|
+
position: (label: string, position: number, total: number) => string;
|
|
8
|
+
};
|
|
9
|
+
export declare const reorderTarget: (key: string, index: number, total: number) => number | undefined;
|
|
10
|
+
export declare const moveItem: <T>(items: readonly T[], from: number, to: number) => T[] | undefined;
|
|
11
|
+
export declare const retainedRows: (items: readonly AnimatedListRow[], previous: readonly AnimatedListRow[]) => {
|
|
12
|
+
readonly key: string;
|
|
13
|
+
readonly label?: string | undefined;
|
|
14
|
+
}[];
|
|
15
|
+
export declare const listAnnouncement: (items: readonly AnimatedListRow[], key: string | null, copy: ReturnType<typeof animatedListCopy>) => string;
|
|
16
|
+
export declare const AnimatedListMessage: UiSchema.TaggedEnum<{
|
|
17
|
+
readonly Announced: Schema.TaggedStruct<"Announced", {
|
|
18
|
+
readonly key: Schema.String;
|
|
19
|
+
}>;
|
|
20
|
+
readonly Exited: Schema.TaggedStruct<"Exited", {
|
|
21
|
+
readonly key: Schema.String;
|
|
22
|
+
}>;
|
|
23
|
+
readonly Moved: Schema.TaggedStruct<"Moved", {
|
|
24
|
+
readonly key: Schema.String;
|
|
25
|
+
readonly to: Schema.Number;
|
|
26
|
+
}>;
|
|
27
|
+
readonly Synced: Schema.TaggedStruct<"Synced", {}>;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const AnimatedListEvent: UiSchema.TaggedEnum<{
|
|
30
|
+
readonly Reordered: Schema.TaggedStruct<"Reordered", {
|
|
31
|
+
readonly from: Schema.Number;
|
|
32
|
+
readonly to: Schema.Number;
|
|
33
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
34
|
+
readonly key: Schema.String;
|
|
35
|
+
readonly label: Schema.optional<Schema.String>;
|
|
36
|
+
}>>;
|
|
37
|
+
}>;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const animatedListOptions: {
|
|
40
|
+
readonly name: "AnimatedList";
|
|
41
|
+
readonly props: Schema.Struct<{
|
|
42
|
+
readonly classes: Schema.optional<Schema.$Record<Schema.Literals<("dragHandle" | "list")[]>, Schema.optionalKey<Schema.String>>>;
|
|
43
|
+
readonly duration: Schema.optional<Schema.Number>;
|
|
44
|
+
readonly className: Schema.optional<Schema.String>;
|
|
45
|
+
readonly itemClassName: Schema.optional<Schema.String>;
|
|
46
|
+
readonly label: Schema.optional<Schema.String>;
|
|
47
|
+
readonly dragOverflow: Schema.optional<Schema.Number>;
|
|
48
|
+
readonly locale: Schema.optional<Schema.String>;
|
|
49
|
+
readonly messages: Schema.optional<Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Struct<{
|
|
50
|
+
readonly reorder: Schema.optional<Schema.String>;
|
|
51
|
+
readonly instructions: Schema.optional<Schema.String>;
|
|
52
|
+
readonly position: Schema.optional<Schema.declare<(label: string, position: number, total: number) => string, (label: string, position: number, total: number) => string>>;
|
|
53
|
+
}>>>>;
|
|
54
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
55
|
+
readonly key: Schema.String;
|
|
56
|
+
readonly label: Schema.optional<Schema.String>;
|
|
57
|
+
}>>;
|
|
58
|
+
readonly reorderable: Schema.optional<Schema.Boolean>;
|
|
59
|
+
}>;
|
|
60
|
+
readonly model: Schema.Struct<{
|
|
61
|
+
readonly lastItems: Schema.$Array<Schema.Struct<{
|
|
62
|
+
readonly key: Schema.String;
|
|
63
|
+
readonly label: Schema.optional<Schema.String>;
|
|
64
|
+
}>>;
|
|
65
|
+
readonly rows: Schema.$Array<Schema.Struct<{
|
|
66
|
+
readonly key: Schema.String;
|
|
67
|
+
readonly label: Schema.optional<Schema.String>;
|
|
68
|
+
}>>;
|
|
69
|
+
readonly announcedKey: Schema.NullOr<Schema.String>;
|
|
70
|
+
}>;
|
|
71
|
+
readonly message: UiSchema.TaggedEnum<{
|
|
72
|
+
readonly Announced: Schema.TaggedStruct<"Announced", {
|
|
73
|
+
readonly key: Schema.String;
|
|
74
|
+
}>;
|
|
75
|
+
readonly Exited: Schema.TaggedStruct<"Exited", {
|
|
76
|
+
readonly key: Schema.String;
|
|
77
|
+
}>;
|
|
78
|
+
readonly Moved: Schema.TaggedStruct<"Moved", {
|
|
79
|
+
readonly key: Schema.String;
|
|
80
|
+
readonly to: Schema.Number;
|
|
81
|
+
}>;
|
|
82
|
+
readonly Synced: Schema.TaggedStruct<"Synced", {}>;
|
|
83
|
+
}>;
|
|
84
|
+
readonly restore: false;
|
|
85
|
+
};
|
|
86
|
+
export declare const listMove: (props: typeof AnimatedListModelProps.Type, key: string, to: number) => {
|
|
87
|
+
from: number;
|
|
88
|
+
to: number;
|
|
89
|
+
items: {
|
|
90
|
+
readonly key: string;
|
|
91
|
+
readonly label?: string | undefined;
|
|
92
|
+
}[];
|
|
93
|
+
} | undefined;
|
|
94
|
+
export declare const updateAnimatedList: ({ model, props, }: {
|
|
95
|
+
model: typeof animatedListOptions.model.Type;
|
|
96
|
+
props: typeof AnimatedListModelProps.Type;
|
|
97
|
+
}, message: typeof AnimatedListMessage.Type) => {
|
|
98
|
+
readonly lastItems: readonly {
|
|
99
|
+
readonly key: string;
|
|
100
|
+
readonly label?: string | undefined;
|
|
101
|
+
}[];
|
|
102
|
+
readonly rows: readonly {
|
|
103
|
+
readonly key: string;
|
|
104
|
+
readonly label?: string | undefined;
|
|
105
|
+
}[];
|
|
106
|
+
readonly announcedKey: string | null;
|
|
107
|
+
};
|
|
108
|
+
type Model = typeof animatedListOptions.model.Type;
|
|
109
|
+
type Message = typeof AnimatedListMessage.Type;
|
|
110
|
+
export declare const animatedListBehaviours: {
|
|
111
|
+
init: ($: Component.Init<{
|
|
112
|
+
readonly lastItems: readonly {
|
|
113
|
+
readonly key: string;
|
|
114
|
+
readonly label?: string | undefined;
|
|
115
|
+
}[];
|
|
116
|
+
readonly rows: readonly {
|
|
117
|
+
readonly key: string;
|
|
118
|
+
readonly label?: string | undefined;
|
|
119
|
+
}[];
|
|
120
|
+
readonly announcedKey: string | null;
|
|
121
|
+
}, {
|
|
122
|
+
readonly _tag: "Announced";
|
|
123
|
+
readonly key: string;
|
|
124
|
+
} | {
|
|
125
|
+
readonly _tag: "Exited";
|
|
126
|
+
readonly key: string;
|
|
127
|
+
} | {
|
|
128
|
+
readonly _tag: "Moved";
|
|
129
|
+
readonly key: string;
|
|
130
|
+
readonly to: number;
|
|
131
|
+
} | {
|
|
132
|
+
readonly _tag: "Synced";
|
|
133
|
+
}, never, {
|
|
134
|
+
readonly classes?: {
|
|
135
|
+
readonly dragHandle?: string | undefined;
|
|
136
|
+
readonly list?: string | undefined;
|
|
137
|
+
} | undefined;
|
|
138
|
+
readonly duration?: number | undefined;
|
|
139
|
+
readonly className?: string | undefined;
|
|
140
|
+
readonly itemClassName?: string | undefined;
|
|
141
|
+
readonly label?: string | undefined;
|
|
142
|
+
readonly dragOverflow?: number | undefined;
|
|
143
|
+
readonly locale?: string | undefined;
|
|
144
|
+
readonly messages?: {
|
|
145
|
+
readonly [x: string]: {
|
|
146
|
+
readonly reorder?: string | undefined;
|
|
147
|
+
readonly instructions?: string | undefined;
|
|
148
|
+
readonly position?: ((label: string, position: number, total: number) => string) | undefined;
|
|
149
|
+
} | undefined;
|
|
150
|
+
} | undefined;
|
|
151
|
+
readonly items: readonly {
|
|
152
|
+
readonly key: string;
|
|
153
|
+
readonly label?: string | undefined;
|
|
154
|
+
}[];
|
|
155
|
+
readonly reorderable?: boolean | undefined;
|
|
156
|
+
}>) => {
|
|
157
|
+
lastItems: readonly {
|
|
158
|
+
readonly key: string;
|
|
159
|
+
readonly label?: string | undefined;
|
|
160
|
+
}[];
|
|
161
|
+
rows: readonly {
|
|
162
|
+
readonly key: string;
|
|
163
|
+
readonly label?: string | undefined;
|
|
164
|
+
}[];
|
|
165
|
+
announcedKey: null;
|
|
166
|
+
};
|
|
167
|
+
update: (context: Component.Update<Model, Message, never, AnimatedListModelProps>, message: Message) => Model;
|
|
168
|
+
subscriptions: ($: Component.Current<{
|
|
169
|
+
readonly lastItems: readonly {
|
|
170
|
+
readonly key: string;
|
|
171
|
+
readonly label?: string | undefined;
|
|
172
|
+
}[];
|
|
173
|
+
readonly rows: readonly {
|
|
174
|
+
readonly key: string;
|
|
175
|
+
readonly label?: string | undefined;
|
|
176
|
+
}[];
|
|
177
|
+
readonly announcedKey: string | null;
|
|
178
|
+
}, {
|
|
179
|
+
readonly classes?: {
|
|
180
|
+
readonly dragHandle?: string | undefined;
|
|
181
|
+
readonly list?: string | undefined;
|
|
182
|
+
} | undefined;
|
|
183
|
+
readonly duration?: number | undefined;
|
|
184
|
+
readonly className?: string | undefined;
|
|
185
|
+
readonly itemClassName?: string | undefined;
|
|
186
|
+
readonly label?: string | undefined;
|
|
187
|
+
readonly dragOverflow?: number | undefined;
|
|
188
|
+
readonly locale?: string | undefined;
|
|
189
|
+
readonly messages?: {
|
|
190
|
+
readonly [x: string]: {
|
|
191
|
+
readonly reorder?: string | undefined;
|
|
192
|
+
readonly instructions?: string | undefined;
|
|
193
|
+
readonly position?: ((label: string, position: number, total: number) => string) | undefined;
|
|
194
|
+
} | undefined;
|
|
195
|
+
} | undefined;
|
|
196
|
+
readonly items: readonly {
|
|
197
|
+
readonly key: string;
|
|
198
|
+
readonly label?: string | undefined;
|
|
199
|
+
}[];
|
|
200
|
+
readonly reorderable?: boolean | undefined;
|
|
201
|
+
}, {}>) => readonly (false | Subscription.Subscription<{
|
|
202
|
+
readonly _tag: "Synced";
|
|
203
|
+
}, never> | null | undefined)[];
|
|
204
|
+
};
|
|
205
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { AnimatedListSharedProps } from "./schema.js";
|
|
3
|
+
export type AnimatedListProps<T> = AnimatedListSharedProps & {
|
|
4
|
+
items: readonly T[];
|
|
5
|
+
getKey: (item: T) => string;
|
|
6
|
+
children: (item: T) => ReactNode;
|
|
7
|
+
onReorder?: (items: T[]) => void;
|
|
8
|
+
getItemLabel?: (item: T) => string;
|
|
9
|
+
};
|
|
10
|
+
/** Stable entity keys preserve child state across inserts and reordering. */
|
|
11
|
+
export declare const AnimatedList: <T>({ classes: classOverrides, items, getKey, children, duration, className, itemClassName, label, onReorder, dragOverflow, getItemLabel, locale: override, messages, }: AnimatedListProps<T>) => import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../../src/components/
|
|
1
|
+
// ../../src/components/animated-list/react.tsx
|
|
2
2
|
import {
|
|
3
3
|
useEffect as useEffect2,
|
|
4
4
|
useEffectEvent as useEffectEvent2,
|
|
@@ -7,8 +7,9 @@ import {
|
|
|
7
7
|
useState as useState2
|
|
8
8
|
} from "react";
|
|
9
9
|
import { GripVertical } from "lucide-react";
|
|
10
|
+
import { Component as Component2, View } from "effect/ui";
|
|
10
11
|
import { cn } from "cn";
|
|
11
|
-
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider";
|
|
12
|
+
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
12
13
|
|
|
13
14
|
// ../../src/lib/krakmotion.ts
|
|
14
15
|
import {
|
|
@@ -42,26 +43,6 @@ var animateElement = (element, frames, duration, complete) => {
|
|
|
42
43
|
animation.cancel();
|
|
43
44
|
};
|
|
44
45
|
};
|
|
45
|
-
var useKeyedPresence = (items, getKey) => {
|
|
46
|
-
const [previous, setPrevious] = useState(items);
|
|
47
|
-
const [retained, setRetained] = useState(items);
|
|
48
|
-
if (previous !== items) {
|
|
49
|
-
const keys = new Set(items.map(getKey));
|
|
50
|
-
const next = [...items];
|
|
51
|
-
retained.forEach((item, index) => {
|
|
52
|
-
if (!keys.has(getKey(item)))
|
|
53
|
-
next.splice(Math.min(index, next.length), 0, item);
|
|
54
|
-
});
|
|
55
|
-
setPrevious(items);
|
|
56
|
-
setRetained(next);
|
|
57
|
-
}
|
|
58
|
-
const present = new Set(items.map(getKey));
|
|
59
|
-
return {
|
|
60
|
-
items: retained,
|
|
61
|
-
present,
|
|
62
|
-
remove: (key) => setRetained((current) => current.filter((item) => getKey(item) !== key))
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
46
|
var useListLayout = (ref, duration) => {
|
|
66
47
|
const previous = useRef(new Map);
|
|
67
48
|
const animations = useRef(new Map);
|
|
@@ -227,8 +208,53 @@ var useVerticalDrag = ({
|
|
|
227
208
|
};
|
|
228
209
|
};
|
|
229
210
|
|
|
230
|
-
// ../../src/components/
|
|
231
|
-
import {
|
|
211
|
+
// ../../src/components/animated-list/react.tsx
|
|
212
|
+
import { useModel } from "@krak-stack/registry/effect-ui-adapter/react";
|
|
213
|
+
|
|
214
|
+
// ../../src/components/animated-list/classes.ts
|
|
215
|
+
var animatedListClasses = {
|
|
216
|
+
list: "relative grid gap-3",
|
|
217
|
+
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"
|
|
218
|
+
};
|
|
219
|
+
var resolveAnimatedListClasses = (overrides) => ({
|
|
220
|
+
...animatedListClasses,
|
|
221
|
+
...overrides
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
// ../../src/components/animated-list/index.ts
|
|
225
|
+
import { Schema as Schema2, Stream } from "effect";
|
|
226
|
+
import { Component, Subscription, UiSchema } from "effect/ui";
|
|
227
|
+
|
|
228
|
+
// ../../src/components/animated-list/schema.ts
|
|
229
|
+
import { Predicate, Schema, Struct } from "effect";
|
|
230
|
+
var Position = Schema.declare((value) => Predicate.isFunction(value));
|
|
231
|
+
var MessageOverrides = Schema.Struct({
|
|
232
|
+
reorder: Schema.optional(Schema.String),
|
|
233
|
+
instructions: Schema.optional(Schema.String),
|
|
234
|
+
position: Schema.optional(Position)
|
|
235
|
+
});
|
|
236
|
+
var AnimatedListClassesOverridesSchema = Schema.Record(Schema.Literals(Struct.keys(animatedListClasses)), Schema.optionalKey(Schema.String)).annotate({ identifier: "AnimatedListClassesOverrides" });
|
|
237
|
+
var AnimatedListPropsSchema = Schema.Struct({
|
|
238
|
+
classes: Schema.optional(AnimatedListClassesOverridesSchema),
|
|
239
|
+
duration: Schema.optional(Schema.Number),
|
|
240
|
+
className: Schema.optional(Schema.String),
|
|
241
|
+
itemClassName: Schema.optional(Schema.String),
|
|
242
|
+
label: Schema.optional(Schema.String),
|
|
243
|
+
dragOverflow: Schema.optional(Schema.Number),
|
|
244
|
+
locale: Schema.optional(Schema.String),
|
|
245
|
+
messages: Schema.optional(Schema.Record(Schema.String, Schema.UndefinedOr(MessageOverrides)))
|
|
246
|
+
}).annotate({ identifier: "AnimatedListProps" });
|
|
247
|
+
var AnimatedListRow = Schema.Struct({
|
|
248
|
+
key: Schema.String,
|
|
249
|
+
label: Schema.optional(Schema.String)
|
|
250
|
+
}).annotate({ identifier: "AnimatedListRow" });
|
|
251
|
+
var AnimatedListModelProps = Schema.Struct({
|
|
252
|
+
...AnimatedListPropsSchema.fields,
|
|
253
|
+
items: Schema.Array(AnimatedListRow),
|
|
254
|
+
reorderable: Schema.optional(Schema.Boolean)
|
|
255
|
+
}).annotate({ identifier: "AnimatedListModelProps" });
|
|
256
|
+
|
|
257
|
+
// ../../src/components/animated-list/index.ts
|
|
232
258
|
var labels = {
|
|
233
259
|
en: {
|
|
234
260
|
reorder: "Reorder",
|
|
@@ -241,7 +267,107 @@ var labels = {
|
|
|
241
267
|
position: (label, position, total) => `${label}, position ${position} sur ${total}.`
|
|
242
268
|
}
|
|
243
269
|
};
|
|
270
|
+
var animatedListCopy = (locale, messages) => ({
|
|
271
|
+
...locale.startsWith("fr") ? labels.fr : labels.en,
|
|
272
|
+
...messages?.[locale.split("-")[0] ?? locale],
|
|
273
|
+
...messages?.[locale]
|
|
274
|
+
});
|
|
275
|
+
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;
|
|
276
|
+
var moveItem = (items, from, to) => {
|
|
277
|
+
if (from < 0 || from >= items.length || to < 0 || to >= items.length || from === to)
|
|
278
|
+
return;
|
|
279
|
+
const next = [...items];
|
|
280
|
+
next.splice(to, 0, ...next.splice(from, 1));
|
|
281
|
+
return next;
|
|
282
|
+
};
|
|
283
|
+
var retainedRows = (items, previous) => {
|
|
284
|
+
const keys = new Set(items.map((row) => row.key));
|
|
285
|
+
const next = [...items];
|
|
286
|
+
previous.forEach((row, index) => {
|
|
287
|
+
if (!keys.has(row.key))
|
|
288
|
+
next.splice(Math.min(index, next.length), 0, row);
|
|
289
|
+
});
|
|
290
|
+
return next;
|
|
291
|
+
};
|
|
292
|
+
var listAnnouncement = (items, key, copy) => {
|
|
293
|
+
const index = items.findIndex((row) => row.key === key);
|
|
294
|
+
const row = items[index];
|
|
295
|
+
return row ? copy.position(row.label ?? row.key, index + 1, items.length) : "";
|
|
296
|
+
};
|
|
297
|
+
var AnimatedListMessage = UiSchema.TaggedEnum({
|
|
298
|
+
Synced: {},
|
|
299
|
+
Exited: { key: Schema2.String },
|
|
300
|
+
Announced: { key: Schema2.String },
|
|
301
|
+
Moved: { key: Schema2.String, to: Schema2.Number }
|
|
302
|
+
});
|
|
303
|
+
var AnimatedListEvent = UiSchema.TaggedEnum({
|
|
304
|
+
Reordered: {
|
|
305
|
+
from: Schema2.Number,
|
|
306
|
+
to: Schema2.Number,
|
|
307
|
+
items: Schema2.Array(AnimatedListRow)
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
var animatedListOptions = {
|
|
311
|
+
name: "AnimatedList",
|
|
312
|
+
props: AnimatedListModelProps,
|
|
313
|
+
model: Schema2.Struct({
|
|
314
|
+
lastItems: Schema2.Array(AnimatedListRow),
|
|
315
|
+
rows: Schema2.Array(AnimatedListRow),
|
|
316
|
+
announcedKey: Schema2.NullOr(Schema2.String)
|
|
317
|
+
}).annotate({ identifier: "AnimatedListModel" }),
|
|
318
|
+
message: AnimatedListMessage,
|
|
319
|
+
restore: false
|
|
320
|
+
};
|
|
321
|
+
var Definition = Component.define(animatedListOptions);
|
|
322
|
+
var changed = Subscription.make("animated-list/changed", Stream.succeed(AnimatedListMessage.Synced()));
|
|
323
|
+
var listMove = (props, key, to) => {
|
|
324
|
+
const from = props.items.findIndex((row) => row.key === key);
|
|
325
|
+
const items = props.reorderable && moveItem(props.items, from, to);
|
|
326
|
+
return items ? { from, to, items } : undefined;
|
|
327
|
+
};
|
|
328
|
+
var updateAnimatedList = ({
|
|
329
|
+
model,
|
|
330
|
+
props
|
|
331
|
+
}, message) => {
|
|
332
|
+
switch (message._tag) {
|
|
333
|
+
case "Synced":
|
|
334
|
+
return {
|
|
335
|
+
...model,
|
|
336
|
+
lastItems: props.items,
|
|
337
|
+
rows: retainedRows(props.items, model.rows)
|
|
338
|
+
};
|
|
339
|
+
case "Exited":
|
|
340
|
+
return props.items.some((row) => row.key === message.key) ? model : {
|
|
341
|
+
...model,
|
|
342
|
+
rows: model.rows.filter((row) => row.key !== message.key)
|
|
343
|
+
};
|
|
344
|
+
case "Announced":
|
|
345
|
+
return { ...model, announcedKey: message.key };
|
|
346
|
+
case "Moved":
|
|
347
|
+
return listMove(props, message.key, message.to) ? { ...model, announcedKey: message.key } : model;
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
var update = Definition.update(updateAnimatedList);
|
|
351
|
+
var animatedListBehaviours = {
|
|
352
|
+
init: Definition.init(({ props }) => ({
|
|
353
|
+
lastItems: props.items,
|
|
354
|
+
rows: props.items,
|
|
355
|
+
announcedKey: null
|
|
356
|
+
})),
|
|
357
|
+
update,
|
|
358
|
+
subscriptions: Definition.subscriptions(({ model, props }) => [
|
|
359
|
+
(props.items.length !== model.lastItems.length || props.items.some(({ key, label }, index) => model.lastItems[index]?.key !== key || model.lastItems[index]?.label !== label)) && changed
|
|
360
|
+
])
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
// ../../src/components/animated-list/react.tsx
|
|
364
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
365
|
+
var Model = Component2.define(animatedListOptions).make({
|
|
366
|
+
...animatedListBehaviours,
|
|
367
|
+
view: () => View.text("")
|
|
368
|
+
});
|
|
244
369
|
var AnimatedList = ({
|
|
370
|
+
classes: classOverrides,
|
|
245
371
|
items,
|
|
246
372
|
getKey,
|
|
247
373
|
children,
|
|
@@ -255,30 +381,45 @@ var AnimatedList = ({
|
|
|
255
381
|
locale: override,
|
|
256
382
|
messages
|
|
257
383
|
}) => {
|
|
384
|
+
const animatedListClasses = resolveAnimatedListClasses(classOverrides);
|
|
258
385
|
const locale = useKrakstackLocale(override);
|
|
259
|
-
const copy =
|
|
260
|
-
...locale.startsWith("fr") ? labels.fr : labels.en,
|
|
261
|
-
...messages?.[locale.split("-")[0] ?? locale],
|
|
262
|
-
...messages?.[locale]
|
|
263
|
-
};
|
|
386
|
+
const copy = animatedListCopy(locale, messages);
|
|
264
387
|
const instructions = useId();
|
|
265
388
|
const container = useRef2(null);
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
389
|
+
const descriptors = items.map((item) => ({
|
|
390
|
+
key: getKey(item),
|
|
391
|
+
label: getItemLabel?.(item)
|
|
392
|
+
}));
|
|
393
|
+
const { model, send } = useModel(Model, {
|
|
394
|
+
items: descriptors,
|
|
395
|
+
reorderable: !!onReorder
|
|
396
|
+
});
|
|
397
|
+
const retained = retainedRows(descriptors, model.rows);
|
|
398
|
+
const current = new Map(items.map((item) => [getKey(item), { item }]));
|
|
399
|
+
const [previous, setPrevious] = useState2(() => ({
|
|
400
|
+
items,
|
|
401
|
+
rows: model.rows,
|
|
402
|
+
rendered: current
|
|
403
|
+
}));
|
|
404
|
+
const rendered = new Map(retained.flatMap(({ key }) => {
|
|
405
|
+
const value = current.get(key) ?? previous.rendered.get(key);
|
|
406
|
+
return value ? [[key, value]] : [];
|
|
407
|
+
}));
|
|
408
|
+
if (previous.items !== items || previous.rows !== model.rows) {
|
|
409
|
+
setPrevious({ items, rows: model.rows, rendered });
|
|
410
|
+
}
|
|
411
|
+
const committed = useRef2(false);
|
|
412
|
+
useEffect2(() => {
|
|
413
|
+
committed.current = true;
|
|
414
|
+
}, []);
|
|
270
415
|
useListLayout(container, duration);
|
|
271
|
-
const announcement =
|
|
416
|
+
const announcement = listAnnouncement(descriptors, model.announcedKey, copy);
|
|
272
417
|
const move = (key, target) => {
|
|
273
418
|
const index = items.findIndex((item) => getKey(item) === key);
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
const next = [...items];
|
|
277
|
-
const [item] = next.splice(index, 1);
|
|
278
|
-
if (item === undefined)
|
|
419
|
+
const next = onReorder && moveItem(items, index, target);
|
|
420
|
+
if (!next || !onReorder)
|
|
279
421
|
return;
|
|
280
|
-
|
|
281
|
-
setAnnouncedKey(key);
|
|
422
|
+
send(AnimatedListMessage.Announced({ key }));
|
|
282
423
|
onReorder(next);
|
|
283
424
|
};
|
|
284
425
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
@@ -286,27 +427,30 @@ var AnimatedList = ({
|
|
|
286
427
|
/* @__PURE__ */ jsx("ul", {
|
|
287
428
|
ref: container,
|
|
288
429
|
"data-slot": "animated-list",
|
|
289
|
-
className: cn(
|
|
430
|
+
className: cn(animatedListClasses.list, className),
|
|
290
431
|
"aria-label": label,
|
|
291
|
-
children: retained.
|
|
292
|
-
const
|
|
432
|
+
children: retained.map(({ key, label }) => {
|
|
433
|
+
const value = rendered.get(key);
|
|
434
|
+
if (!value)
|
|
435
|
+
return null;
|
|
293
436
|
const index = items.findIndex((candidate) => getKey(candidate) === key);
|
|
294
437
|
return /* @__PURE__ */ jsx(ListItem, {
|
|
295
438
|
itemKey: key,
|
|
296
|
-
present:
|
|
297
|
-
|
|
439
|
+
present: current.has(key),
|
|
440
|
+
committed,
|
|
298
441
|
duration,
|
|
299
442
|
className: itemClassName,
|
|
443
|
+
handleClassName: animatedListClasses.dragHandle,
|
|
300
444
|
instructions,
|
|
301
|
-
handleLabel: `${copy.reorder}: ${
|
|
445
|
+
handleLabel: `${copy.reorder}: ${label ?? key}`,
|
|
302
446
|
reorderable: !!onReorder,
|
|
303
447
|
disabled: items.length < 2,
|
|
304
448
|
container,
|
|
305
449
|
dragOverflow,
|
|
306
|
-
onExit: () =>
|
|
450
|
+
onExit: () => send(AnimatedListMessage.Exited({ key })),
|
|
307
451
|
onMove: (target) => move(key, target),
|
|
308
|
-
onKeyMove: (direction) => move(key, direction
|
|
309
|
-
children: children(item)
|
|
452
|
+
onKeyMove: (direction) => move(key, reorderTarget(direction, index, items.length) ?? index),
|
|
453
|
+
children: children(value.item)
|
|
310
454
|
}, key);
|
|
311
455
|
})
|
|
312
456
|
}),
|
|
@@ -332,11 +476,12 @@ var AnimatedList = ({
|
|
|
332
476
|
var ListItem = ({
|
|
333
477
|
itemKey,
|
|
334
478
|
present,
|
|
335
|
-
|
|
479
|
+
committed,
|
|
336
480
|
duration,
|
|
337
481
|
className,
|
|
338
482
|
instructions,
|
|
339
483
|
handleLabel,
|
|
484
|
+
handleClassName,
|
|
340
485
|
reorderable,
|
|
341
486
|
disabled,
|
|
342
487
|
container,
|
|
@@ -363,7 +508,7 @@ var ListItem = ({
|
|
|
363
508
|
const element = ref.current;
|
|
364
509
|
const first = !mounted.current;
|
|
365
510
|
mounted.current = true;
|
|
366
|
-
if (!element || first &&
|
|
511
|
+
if (!element || first && !committed.current && present)
|
|
367
512
|
return;
|
|
368
513
|
if (!first && lastPresent.current === present && !transitioning.current)
|
|
369
514
|
return;
|
|
@@ -374,7 +519,7 @@ var ListItem = ({
|
|
|
374
519
|
if (!present)
|
|
375
520
|
exit();
|
|
376
521
|
});
|
|
377
|
-
}, [present,
|
|
522
|
+
}, [present, committed, duration, reduced]);
|
|
378
523
|
return /* @__PURE__ */ jsxs("li", {
|
|
379
524
|
ref,
|
|
380
525
|
"data-slot": "animated-list-item",
|
|
@@ -389,7 +534,7 @@ var ListItem = ({
|
|
|
389
534
|
disabled: disabled || !present,
|
|
390
535
|
"aria-label": handleLabel,
|
|
391
536
|
"aria-describedby": instructions,
|
|
392
|
-
className:
|
|
537
|
+
className: handleClassName,
|
|
393
538
|
...drag,
|
|
394
539
|
onKeyDown: (event) => {
|
|
395
540
|
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
declare const AnimatedListClassesOverridesSchema: Schema.$Record<Schema.Literals<("dragHandle" | "list")[]>, Schema.optionalKey<Schema.String>>;
|
|
3
|
+
export type AnimatedListClassesOverrides = typeof AnimatedListClassesOverridesSchema.Type;
|
|
4
|
+
export declare const AnimatedListPropsSchema: Schema.Struct<{
|
|
5
|
+
readonly classes: Schema.optional<Schema.$Record<Schema.Literals<("dragHandle" | "list")[]>, Schema.optionalKey<Schema.String>>>;
|
|
6
|
+
readonly duration: Schema.optional<Schema.Number>;
|
|
7
|
+
readonly className: Schema.optional<Schema.String>;
|
|
8
|
+
readonly itemClassName: Schema.optional<Schema.String>;
|
|
9
|
+
readonly label: Schema.optional<Schema.String>;
|
|
10
|
+
readonly dragOverflow: Schema.optional<Schema.Number>;
|
|
11
|
+
readonly locale: Schema.optional<Schema.String>;
|
|
12
|
+
readonly messages: Schema.optional<Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Struct<{
|
|
13
|
+
readonly reorder: Schema.optional<Schema.String>;
|
|
14
|
+
readonly instructions: Schema.optional<Schema.String>;
|
|
15
|
+
readonly position: Schema.optional<Schema.declare<(label: string, position: number, total: number) => string, (label: string, position: number, total: number) => string>>;
|
|
16
|
+
}>>>>;
|
|
17
|
+
}>;
|
|
18
|
+
export type AnimatedListSharedProps = typeof AnimatedListPropsSchema.Type;
|
|
19
|
+
export declare const AnimatedListRow: Schema.Struct<{
|
|
20
|
+
readonly key: Schema.String;
|
|
21
|
+
readonly label: Schema.optional<Schema.String>;
|
|
22
|
+
}>;
|
|
23
|
+
export type AnimatedListRow = typeof AnimatedListRow.Type;
|
|
24
|
+
export declare const AnimatedListModelProps: Schema.Struct<{
|
|
25
|
+
readonly classes: Schema.optional<Schema.$Record<Schema.Literals<("dragHandle" | "list")[]>, Schema.optionalKey<Schema.String>>>;
|
|
26
|
+
readonly duration: Schema.optional<Schema.Number>;
|
|
27
|
+
readonly className: Schema.optional<Schema.String>;
|
|
28
|
+
readonly itemClassName: Schema.optional<Schema.String>;
|
|
29
|
+
readonly label: Schema.optional<Schema.String>;
|
|
30
|
+
readonly dragOverflow: Schema.optional<Schema.Number>;
|
|
31
|
+
readonly locale: Schema.optional<Schema.String>;
|
|
32
|
+
readonly messages: Schema.optional<Schema.$Record<Schema.String, Schema.UndefinedOr<Schema.Struct<{
|
|
33
|
+
readonly reorder: Schema.optional<Schema.String>;
|
|
34
|
+
readonly instructions: Schema.optional<Schema.String>;
|
|
35
|
+
readonly position: Schema.optional<Schema.declare<(label: string, position: number, total: number) => string, (label: string, position: number, total: number) => string>>;
|
|
36
|
+
}>>>>;
|
|
37
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
38
|
+
readonly key: Schema.String;
|
|
39
|
+
readonly label: Schema.optional<Schema.String>;
|
|
40
|
+
}>>;
|
|
41
|
+
readonly reorderable: Schema.optional<Schema.Boolean>;
|
|
42
|
+
}>;
|
|
43
|
+
export type AnimatedListModelProps = typeof AnimatedListModelProps.Type;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Html } from "effect/ui/html";
|
|
2
|
+
export type { AnimatedNumberProps } from "./schema.js";
|
|
3
|
+
export declare const AnimatedNumber: import("effect/ui/Component").Component<"AnimatedNumber", {
|
|
4
|
+
readonly value: number;
|
|
5
|
+
readonly duration?: number | undefined;
|
|
6
|
+
readonly format?: Intl.NumberFormatOptions | undefined;
|
|
7
|
+
readonly locale?: string | undefined;
|
|
8
|
+
readonly className?: string | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
readonly displayed: number;
|
|
11
|
+
readonly target: number;
|
|
12
|
+
readonly from: number;
|
|
13
|
+
readonly start: number | null;
|
|
14
|
+
readonly duration: number;
|
|
15
|
+
}, {
|
|
16
|
+
readonly _tag: "Frame";
|
|
17
|
+
readonly now: number;
|
|
18
|
+
readonly instant: boolean;
|
|
19
|
+
}, never, never, Html.Elements, {}, never>;
|