@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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// ../../src/components/
|
|
1
|
+
// ../../src/components/map-menu/react.tsx
|
|
2
2
|
import { Dialog as DialogPrimitive2 } from "@base-ui/react/dialog";
|
|
3
|
-
import {
|
|
3
|
+
import { LocateFixed as LocateFixed2, MapPin, Search, X } from "lucide-react";
|
|
4
4
|
import { useEffect as useEffect2, useId, useRef as useRef2, useState as useState2 } from "react";
|
|
5
5
|
|
|
6
6
|
// ../../src/components/ui/button.tsx
|
|
@@ -114,15 +114,107 @@ function DialogTitle({ className, ...props }) {
|
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
// ../../src/components/
|
|
117
|
+
// ../../src/components/map-menu/classes.ts
|
|
118
|
+
var mapMenuClasses = {
|
|
119
|
+
resultTitle: "block text-sm font-medium wrap-anywhere",
|
|
120
|
+
resultDescription: "text-muted-foreground mt-1 block text-xs wrap-anywhere",
|
|
121
|
+
status: "text-muted-foreground p-3 text-sm",
|
|
122
|
+
error: "text-destructive p-3 text-sm"
|
|
123
|
+
};
|
|
124
|
+
var resolveMapMenuClasses = (overrides) => ({
|
|
125
|
+
...mapMenuClasses,
|
|
126
|
+
...overrides
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// ../../src/components/map-menu/map.tsx
|
|
118
130
|
import { LocateFixed, Minus, Plus } from "lucide-react";
|
|
119
|
-
import {
|
|
131
|
+
import {
|
|
132
|
+
useEffect,
|
|
133
|
+
useEffectEvent,
|
|
134
|
+
useRef,
|
|
135
|
+
useState,
|
|
136
|
+
useSyncExternalStore
|
|
137
|
+
} from "react";
|
|
120
138
|
import { Schema } from "effect";
|
|
121
|
-
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider";
|
|
139
|
+
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
140
|
+
|
|
141
|
+
// ../../src/components/map-menu/google-maps.ts
|
|
142
|
+
var scriptId = "krak-stack-google-maps-script";
|
|
143
|
+
var callback = "__krakStackGoogleMapsInit";
|
|
144
|
+
var loads = new WeakMap;
|
|
145
|
+
var ready = (api) => Boolean(api?.maps?.Map && api.maps.Marker && api.maps.Circle && api.maps.event);
|
|
146
|
+
var loadGoogleMaps = (document2, apiKey) => {
|
|
147
|
+
const window2 = document2.defaultView;
|
|
148
|
+
if (!window2)
|
|
149
|
+
return Promise.reject(new Error("Google Maps requires a browser."));
|
|
150
|
+
if (ready(window2.google))
|
|
151
|
+
return Promise.resolve(window2.google);
|
|
152
|
+
const previous = loads.get(document2);
|
|
153
|
+
if (previous)
|
|
154
|
+
return previous;
|
|
155
|
+
const promise = new Promise((resolve, reject) => {
|
|
156
|
+
const existing = document2.getElementById(scriptId);
|
|
157
|
+
const created = document2.createElement("script");
|
|
158
|
+
const script = existing ?? created;
|
|
159
|
+
const cleanup = () => {
|
|
160
|
+
window2.clearTimeout(timeout);
|
|
161
|
+
script.removeEventListener("error", failed);
|
|
162
|
+
script.removeEventListener("load", loaded);
|
|
163
|
+
window2.__krakStackGoogleMapsInit = undefined;
|
|
164
|
+
};
|
|
165
|
+
const failed = () => {
|
|
166
|
+
cleanup();
|
|
167
|
+
script.remove();
|
|
168
|
+
reject(new Error("Google Maps failed to load."));
|
|
169
|
+
};
|
|
170
|
+
const initialized = () => {
|
|
171
|
+
if (!ready(window2.google))
|
|
172
|
+
return failed();
|
|
173
|
+
cleanup();
|
|
174
|
+
resolve(window2.google);
|
|
175
|
+
};
|
|
176
|
+
const loaded = () => {
|
|
177
|
+
if (ready(window2.google))
|
|
178
|
+
initialized();
|
|
179
|
+
};
|
|
180
|
+
const timeout = window2.setTimeout(failed, 30000);
|
|
181
|
+
window2.__krakStackGoogleMapsInit = initialized;
|
|
182
|
+
script.addEventListener("error", failed);
|
|
183
|
+
script.addEventListener("load", loaded);
|
|
184
|
+
if (!existing) {
|
|
185
|
+
created.id = scriptId;
|
|
186
|
+
created.async = true;
|
|
187
|
+
created.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(apiKey)}&loading=async&callback=${callback}`;
|
|
188
|
+
document2.head.append(created);
|
|
189
|
+
}
|
|
190
|
+
}).catch((error) => {
|
|
191
|
+
loads.delete(document2);
|
|
192
|
+
throw error;
|
|
193
|
+
});
|
|
194
|
+
loads.set(document2, promise);
|
|
195
|
+
return promise;
|
|
196
|
+
};
|
|
197
|
+
var clampZoom = (zoom, min, max) => Math.min(max, Math.max(min, zoom));
|
|
198
|
+
var mapOptions = (center, zoom, interactive, minZoom, maxZoom) => ({
|
|
199
|
+
center,
|
|
200
|
+
zoom: clampZoom(zoom, minZoom, maxZoom),
|
|
201
|
+
clickableIcons: interactive,
|
|
202
|
+
disableDefaultUI: true,
|
|
203
|
+
draggable: interactive,
|
|
204
|
+
fullscreenControl: false,
|
|
205
|
+
gestureHandling: interactive ? "auto" : "none",
|
|
206
|
+
keyboardShortcuts: interactive,
|
|
207
|
+
mapTypeControl: false,
|
|
208
|
+
maxZoom,
|
|
209
|
+
minZoom,
|
|
210
|
+
scrollwheel: interactive,
|
|
211
|
+
streetViewControl: false,
|
|
212
|
+
zoomControl: false
|
|
213
|
+
});
|
|
214
|
+
var mapPinIcon = (color) => `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="40" height="48" viewBox="0 0 40 48"><path d="M20 46s15-14.3 15-27A15 15 0 1 0 5 19c0 12.7 15 27 15 27Z" fill="${color.replace(/[&"'<>]/g, "")}" stroke="white" stroke-width="3"/><circle cx="20" cy="19" r="6" fill="white"/></svg>`)}`;
|
|
215
|
+
|
|
216
|
+
// ../../src/components/map-menu/map.tsx
|
|
122
217
|
import { jsx as jsx3, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
|
|
123
|
-
var googleMapsScriptId = "krak-stack-google-maps-script";
|
|
124
|
-
var googleMapsCallbackName = "__krakStackGoogleMapsInit";
|
|
125
|
-
var googleMapsPromise;
|
|
126
218
|
var defaultMessages = {
|
|
127
219
|
en: {
|
|
128
220
|
mapLabel: "Google map",
|
|
@@ -152,63 +244,6 @@ var googleMapMessages = (locale, translations) => ({
|
|
|
152
244
|
...translations?.[locale.split("-")[0] ?? locale],
|
|
153
245
|
...translations?.[locale]
|
|
154
246
|
});
|
|
155
|
-
var isGoogleMapsReady = (api) => Boolean(api?.maps.Map && api.maps.Marker && api.maps.Circle && api.maps.event);
|
|
156
|
-
var loadGoogleMaps = (apiKey) => {
|
|
157
|
-
if (!globalThis.window || !globalThis.document) {
|
|
158
|
-
return Promise.reject(new Error("Google Maps requires a browser."));
|
|
159
|
-
}
|
|
160
|
-
const browserWindow = window;
|
|
161
|
-
if (isGoogleMapsReady(browserWindow.google)) {
|
|
162
|
-
return Promise.resolve(browserWindow.google);
|
|
163
|
-
}
|
|
164
|
-
if (googleMapsPromise)
|
|
165
|
-
return googleMapsPromise;
|
|
166
|
-
googleMapsPromise = new Promise((resolve, reject) => {
|
|
167
|
-
const resolveApi = () => {
|
|
168
|
-
if (isGoogleMapsReady(browserWindow.google)) {
|
|
169
|
-
resolve(browserWindow.google);
|
|
170
|
-
} else
|
|
171
|
-
reject(new Error("Google Maps failed to initialize."));
|
|
172
|
-
};
|
|
173
|
-
const rejectLoad = () => reject(new Error("Google Maps failed to load."));
|
|
174
|
-
browserWindow.__krakStackGoogleMapsInit = resolveApi;
|
|
175
|
-
const existingScript = document.getElementById(googleMapsScriptId);
|
|
176
|
-
if (existingScript) {
|
|
177
|
-
existingScript.addEventListener("error", rejectLoad, { once: true });
|
|
178
|
-
existingScript.addEventListener("load", resolveApi, { once: true });
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
const script = document.createElement("script");
|
|
182
|
-
script.id = googleMapsScriptId;
|
|
183
|
-
script.async = true;
|
|
184
|
-
script.src = `https://maps.googleapis.com/maps/api/js?key=${encodeURIComponent(apiKey)}&loading=async&callback=${googleMapsCallbackName}`;
|
|
185
|
-
script.addEventListener("error", rejectLoad, { once: true });
|
|
186
|
-
document.head.append(script);
|
|
187
|
-
}).catch((error) => {
|
|
188
|
-
googleMapsPromise = undefined;
|
|
189
|
-
browserWindow.__krakStackGoogleMapsInit = undefined;
|
|
190
|
-
document.getElementById(googleMapsScriptId)?.remove();
|
|
191
|
-
throw error;
|
|
192
|
-
});
|
|
193
|
-
return googleMapsPromise;
|
|
194
|
-
};
|
|
195
|
-
var clampZoom = (zoom, minZoom, maxZoom) => Math.min(maxZoom, Math.max(minZoom, zoom));
|
|
196
|
-
var mapOptions = (center, zoom, interactive, minZoom, maxZoom) => ({
|
|
197
|
-
center,
|
|
198
|
-
zoom: clampZoom(zoom, minZoom, maxZoom),
|
|
199
|
-
clickableIcons: interactive,
|
|
200
|
-
disableDefaultUI: true,
|
|
201
|
-
draggable: interactive,
|
|
202
|
-
fullscreenControl: false,
|
|
203
|
-
gestureHandling: interactive ? "auto" : "none",
|
|
204
|
-
keyboardShortcuts: interactive,
|
|
205
|
-
mapTypeControl: false,
|
|
206
|
-
maxZoom,
|
|
207
|
-
minZoom,
|
|
208
|
-
scrollwheel: interactive,
|
|
209
|
-
streetViewControl: false,
|
|
210
|
-
zoomControl: false
|
|
211
|
-
});
|
|
212
247
|
var createMapState = (loadState, currentZoom) => {
|
|
213
248
|
let snapshot = { loadState, currentZoom };
|
|
214
249
|
const listeners = new Set;
|
|
@@ -304,7 +339,7 @@ var MapMenuMap = ({
|
|
|
304
339
|
return;
|
|
305
340
|
let mounted = true;
|
|
306
341
|
setLoadState("loading");
|
|
307
|
-
loadGoogleMaps(normalizedApiKey).then((api) => {
|
|
342
|
+
loadGoogleMaps(element.ownerDocument, normalizedApiKey).then((api) => {
|
|
308
343
|
if (!mounted)
|
|
309
344
|
return;
|
|
310
345
|
try {
|
|
@@ -569,9 +604,131 @@ function Input({ className, type, ...props }) {
|
|
|
569
604
|
});
|
|
570
605
|
}
|
|
571
606
|
|
|
572
|
-
// ../../src/components/ui/
|
|
573
|
-
import {
|
|
574
|
-
import {
|
|
607
|
+
// ../../src/components/ui/select.tsx
|
|
608
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
609
|
+
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
610
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
611
|
+
"use client";
|
|
612
|
+
var Select = SelectPrimitive.Root;
|
|
613
|
+
function SelectValue({ className, ...props }) {
|
|
614
|
+
return /* @__PURE__ */ jsx5(SelectPrimitive.Value, {
|
|
615
|
+
"data-slot": "select-value",
|
|
616
|
+
className: cn("flex flex-1 text-left", className),
|
|
617
|
+
...props
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
function SelectTrigger({
|
|
621
|
+
className,
|
|
622
|
+
size = "default",
|
|
623
|
+
children,
|
|
624
|
+
...props
|
|
625
|
+
}) {
|
|
626
|
+
return /* @__PURE__ */ jsxs3(SelectPrimitive.Trigger, {
|
|
627
|
+
"data-slot": "select-trigger",
|
|
628
|
+
"data-size": size,
|
|
629
|
+
className: cn("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
630
|
+
...props,
|
|
631
|
+
children: [
|
|
632
|
+
children,
|
|
633
|
+
/* @__PURE__ */ jsx5(SelectPrimitive.Icon, {
|
|
634
|
+
render: /* @__PURE__ */ jsx5(ChevronDownIcon, {
|
|
635
|
+
className: "text-muted-foreground pointer-events-none size-4"
|
|
636
|
+
})
|
|
637
|
+
})
|
|
638
|
+
]
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
function SelectContent({
|
|
642
|
+
className,
|
|
643
|
+
children,
|
|
644
|
+
side = "bottom",
|
|
645
|
+
sideOffset = 4,
|
|
646
|
+
align = "start",
|
|
647
|
+
alignOffset = 0,
|
|
648
|
+
alignItemWithTrigger = false,
|
|
649
|
+
...props
|
|
650
|
+
}) {
|
|
651
|
+
return /* @__PURE__ */ jsx5(SelectPrimitive.Portal, {
|
|
652
|
+
children: /* @__PURE__ */ jsx5(SelectPrimitive.Positioner, {
|
|
653
|
+
side,
|
|
654
|
+
sideOffset,
|
|
655
|
+
align,
|
|
656
|
+
alignOffset,
|
|
657
|
+
alignItemWithTrigger,
|
|
658
|
+
className: "isolate z-50",
|
|
659
|
+
children: /* @__PURE__ */ jsxs3(SelectPrimitive.Popup, {
|
|
660
|
+
"data-slot": "select-content",
|
|
661
|
+
"data-align-trigger": alignItemWithTrigger,
|
|
662
|
+
className: cn("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none", className),
|
|
663
|
+
...props,
|
|
664
|
+
children: [
|
|
665
|
+
/* @__PURE__ */ jsx5(SelectScrollUpButton, {}),
|
|
666
|
+
/* @__PURE__ */ jsx5(SelectPrimitive.List, {
|
|
667
|
+
children
|
|
668
|
+
}),
|
|
669
|
+
/* @__PURE__ */ jsx5(SelectScrollDownButton, {})
|
|
670
|
+
]
|
|
671
|
+
})
|
|
672
|
+
})
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
function SelectItem({
|
|
676
|
+
className,
|
|
677
|
+
children,
|
|
678
|
+
...props
|
|
679
|
+
}) {
|
|
680
|
+
return /* @__PURE__ */ jsxs3(SelectPrimitive.Item, {
|
|
681
|
+
"data-slot": "select-item",
|
|
682
|
+
className: cn("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
683
|
+
...props,
|
|
684
|
+
children: [
|
|
685
|
+
/* @__PURE__ */ jsx5(SelectPrimitive.ItemText, {
|
|
686
|
+
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
687
|
+
children
|
|
688
|
+
}),
|
|
689
|
+
/* @__PURE__ */ jsx5(SelectPrimitive.ItemIndicator, {
|
|
690
|
+
render: /* @__PURE__ */ jsx5("span", {
|
|
691
|
+
className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center"
|
|
692
|
+
}),
|
|
693
|
+
children: /* @__PURE__ */ jsx5(CheckIcon, {
|
|
694
|
+
className: "pointer-events-none"
|
|
695
|
+
})
|
|
696
|
+
})
|
|
697
|
+
]
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
function SelectScrollUpButton({
|
|
701
|
+
className,
|
|
702
|
+
...props
|
|
703
|
+
}) {
|
|
704
|
+
return /* @__PURE__ */ jsx5(SelectPrimitive.ScrollUpArrow, {
|
|
705
|
+
"data-slot": "select-scroll-up-button",
|
|
706
|
+
className: cn("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
707
|
+
...props,
|
|
708
|
+
children: /* @__PURE__ */ jsx5(ChevronUpIcon, {})
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
function SelectScrollDownButton({
|
|
712
|
+
className,
|
|
713
|
+
...props
|
|
714
|
+
}) {
|
|
715
|
+
return /* @__PURE__ */ jsx5(SelectPrimitive.ScrollDownArrow, {
|
|
716
|
+
"data-slot": "select-scroll-down-button",
|
|
717
|
+
className: cn("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
718
|
+
...props,
|
|
719
|
+
children: /* @__PURE__ */ jsx5(ChevronDownIcon, {})
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
// ../../src/components/map-menu/react.tsx
|
|
724
|
+
import { useKrakstackLocale as useKrakstackLocale2 } from "@krak-stack/registry/krakstack-provider/react";
|
|
725
|
+
|
|
726
|
+
// ../../src/components/map-menu/index.ts
|
|
727
|
+
import { Effect, Redacted, Schema as Schema3 } from "effect";
|
|
728
|
+
import { Command, Component, UiSchema } from "effect/ui";
|
|
729
|
+
|
|
730
|
+
// ../../src/components/map-menu/schema.ts
|
|
731
|
+
import { Schema as Schema2, Struct } from "effect";
|
|
575
732
|
var MapMenuMode;
|
|
576
733
|
((MapMenuMode) => {
|
|
577
734
|
MapMenuMode["Point"] = "point";
|
|
@@ -582,8 +739,98 @@ var MapMenuPresentation;
|
|
|
582
739
|
MapMenuPresentation["Dialog"] = "dialog";
|
|
583
740
|
MapMenuPresentation["Inline"] = "inline";
|
|
584
741
|
})(MapMenuPresentation ||= {});
|
|
585
|
-
var
|
|
586
|
-
|
|
742
|
+
var messageKeys = [
|
|
743
|
+
"title",
|
|
744
|
+
"location",
|
|
745
|
+
"placeholder",
|
|
746
|
+
"clear",
|
|
747
|
+
"close",
|
|
748
|
+
"currentLocation",
|
|
749
|
+
"searchWithin",
|
|
750
|
+
"suggestions",
|
|
751
|
+
"loading",
|
|
752
|
+
"noResults",
|
|
753
|
+
"searchHint",
|
|
754
|
+
"ipNotice",
|
|
755
|
+
"browserNotice",
|
|
756
|
+
"radiusHint",
|
|
757
|
+
"cancel",
|
|
758
|
+
"confirm",
|
|
759
|
+
"confirmError"
|
|
760
|
+
];
|
|
761
|
+
var MapMenuMessagesSchema = Schema2.Record(Schema2.Literals(messageKeys), Schema2.String);
|
|
762
|
+
var Translations = Schema2.Record(Schema2.String, Schema2.UndefinedOr(Schema2.Record(Schema2.Literals(messageKeys), Schema2.optionalKey(Schema2.String))));
|
|
763
|
+
var MapMenuPointSchema = Schema2.Struct({
|
|
764
|
+
lat: Schema2.Finite,
|
|
765
|
+
lng: Schema2.Finite
|
|
766
|
+
}).annotate({ identifier: "MapMenuPoint" });
|
|
767
|
+
var MapMenuLocationSchema = Schema2.Struct({
|
|
768
|
+
id: Schema2.String,
|
|
769
|
+
label: Schema2.String,
|
|
770
|
+
title: Schema2.optional(Schema2.String),
|
|
771
|
+
details: Schema2.optional(Schema2.String),
|
|
772
|
+
center: MapMenuPointSchema
|
|
773
|
+
}).annotate({ identifier: "MapMenuLocation" });
|
|
774
|
+
var MapMenuClassesOverridesSchema = Schema2.Record(Schema2.Literals(Struct.keys(mapMenuClasses)), Schema2.optionalKey(Schema2.String)).annotate({ identifier: "MapMenuClassesOverrides" });
|
|
775
|
+
var MapMenuSharedPropsSchema = Schema2.Struct({
|
|
776
|
+
classes: Schema2.optional(MapMenuClassesOverridesSchema),
|
|
777
|
+
input: Schema2.String,
|
|
778
|
+
selectedLocation: Schema2.NullOr(MapMenuLocationSchema),
|
|
779
|
+
suggestions: Schema2.Array(MapMenuLocationSchema),
|
|
780
|
+
locating: Schema2.optional(Schema2.Boolean),
|
|
781
|
+
loadingSuggestions: Schema2.optional(Schema2.Boolean),
|
|
782
|
+
suggestionsError: Schema2.optional(Schema2.String),
|
|
783
|
+
error: Schema2.optional(Schema2.String),
|
|
784
|
+
provenance: Schema2.optional(Schema2.Literals(["ip", "browser"])),
|
|
785
|
+
overlayColor: Schema2.optional(Schema2.String),
|
|
786
|
+
className: Schema2.optional(Schema2.String),
|
|
787
|
+
confirmClassName: Schema2.optional(Schema2.String),
|
|
788
|
+
locale: Schema2.optional(Schema2.String),
|
|
789
|
+
messages: Schema2.optional(Translations)
|
|
790
|
+
}).annotate({ identifier: "MapMenuSharedProps" });
|
|
791
|
+
var MapMenuViewportSchema = Schema2.Struct({
|
|
792
|
+
center: Schema2.NullOr(MapMenuPointSchema),
|
|
793
|
+
radiusKm: Schema2.NullOr(Schema2.Finite),
|
|
794
|
+
overlayColor: Schema2.String
|
|
795
|
+
}).annotate({ identifier: "MapMenuViewport" });
|
|
796
|
+
var MapMenuBrowserKey = Schema2.Redacted(Schema2.String, {
|
|
797
|
+
disallowJsonEncode: true
|
|
798
|
+
});
|
|
799
|
+
var MapMenuHtmlPropsSchema = Schema2.Struct({
|
|
800
|
+
...MapMenuSharedPropsSchema.fields,
|
|
801
|
+
apiKey: Schema2.optional(MapMenuBrowserKey),
|
|
802
|
+
mode: Schema2.optional(Schema2.Enum(MapMenuMode)),
|
|
803
|
+
presentation: Schema2.optional(Schema2.Enum(MapMenuPresentation)),
|
|
804
|
+
open: Schema2.optional(Schema2.Boolean),
|
|
805
|
+
radiusKm: Schema2.optional(Schema2.Finite.check(Schema2.isGreaterThan(0))),
|
|
806
|
+
radiusOptions: Schema2.optional(Schema2.Array(Schema2.Finite.check(Schema2.isGreaterThan(0)))),
|
|
807
|
+
canUseCurrentLocation: Schema2.optional(Schema2.Boolean)
|
|
808
|
+
}).annotate({ identifier: "MapMenuHtmlProps" });
|
|
809
|
+
var MapMenuSelectionSchema = Schema2.Struct({
|
|
810
|
+
location: MapMenuLocationSchema,
|
|
811
|
+
radiusKm: Schema2.optionalKey(Schema2.Finite)
|
|
812
|
+
}).annotate({ identifier: "MapMenuSelection" });
|
|
813
|
+
|
|
814
|
+
// ../../src/components/map-menu/index.ts
|
|
815
|
+
var mapMenuSelectionMatches = ({
|
|
816
|
+
selectedLocation,
|
|
817
|
+
input
|
|
818
|
+
}) => selectedLocation?.label === input.trim();
|
|
819
|
+
var mapMenuRadiiKm = [
|
|
820
|
+
1,
|
|
821
|
+
2,
|
|
822
|
+
5,
|
|
823
|
+
10,
|
|
824
|
+
20,
|
|
825
|
+
40,
|
|
826
|
+
50,
|
|
827
|
+
60,
|
|
828
|
+
80,
|
|
829
|
+
100,
|
|
830
|
+
250,
|
|
831
|
+
500
|
|
832
|
+
];
|
|
833
|
+
var labels = {
|
|
587
834
|
en: {
|
|
588
835
|
title: "Choose your location",
|
|
589
836
|
location: "City or address",
|
|
@@ -623,7 +870,116 @@ var defaultMessages2 = {
|
|
|
623
870
|
confirmError: "Votre lieu n’a pas pu être enregistré. Réessayez."
|
|
624
871
|
}
|
|
625
872
|
};
|
|
873
|
+
var mapMenuMessages = (locale = "en", messages) => {
|
|
874
|
+
const base = locale.split("-")[0] ?? locale;
|
|
875
|
+
return {
|
|
876
|
+
...base === "fr" ? labels.fr : labels.en,
|
|
877
|
+
...messages?.[base],
|
|
878
|
+
...messages?.[locale]
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
var MapMenuEvent = UiSchema.TaggedEnum({
|
|
882
|
+
InputChanged: { input: Schema3.String },
|
|
883
|
+
LocationSelected: { location: MapMenuLocationSchema },
|
|
884
|
+
RadiusChanged: { radiusKm: Schema3.Finite },
|
|
885
|
+
CurrentLocationRequested: {},
|
|
886
|
+
OpenChanged: { open: Schema3.Boolean },
|
|
887
|
+
Cancelled: {},
|
|
888
|
+
Confirmed: {}
|
|
889
|
+
});
|
|
890
|
+
var CameraAction = Schema3.Literals(["in", "out", "fit"]);
|
|
891
|
+
var MapMenuMessage = UiSchema.TaggedEnum({
|
|
892
|
+
Edited: { input: Schema3.String },
|
|
893
|
+
SuggestionsOpened: {},
|
|
894
|
+
SuggestionsClosed: {},
|
|
895
|
+
Picked: { id: Schema3.String },
|
|
896
|
+
RadiusPicked: { radiusKm: Schema3.Finite },
|
|
897
|
+
Locate: {},
|
|
898
|
+
Cancel: {},
|
|
899
|
+
Confirm: {},
|
|
900
|
+
Finished: { success: Schema3.Boolean },
|
|
901
|
+
CameraRequested: { action: CameraAction },
|
|
902
|
+
MapStatus: {
|
|
903
|
+
status: Schema3.Literals(["loading", "ready", "configuration", "load"])
|
|
904
|
+
},
|
|
905
|
+
ZoomChanged: { zoom: Schema3.Finite }
|
|
906
|
+
});
|
|
907
|
+
var Selection = Schema3.Redacted(MapMenuSelectionSchema, {
|
|
908
|
+
disallowJsonEncode: true
|
|
909
|
+
});
|
|
910
|
+
|
|
911
|
+
class SaveMapSelection extends Command.Service()("map-menu/SaveSelection", { args: { selection: Selection }, success: MapMenuMessage }) {
|
|
912
|
+
static layerFromSave = (save) => SaveMapSelection.toLayer(({ selection }) => Effect.suspend(() => save(Redacted.value(selection))).pipe(Effect.match({
|
|
913
|
+
onSuccess: () => MapMenuMessage.Finished({ success: true }),
|
|
914
|
+
onFailure: () => MapMenuMessage.Finished({ success: false })
|
|
915
|
+
})));
|
|
916
|
+
}
|
|
917
|
+
var CameraRequest = Schema3.Struct({
|
|
918
|
+
action: CameraAction,
|
|
919
|
+
revision: Schema3.Int
|
|
920
|
+
});
|
|
921
|
+
var mapMenuOptions = {
|
|
922
|
+
name: "MapMenu",
|
|
923
|
+
props: MapMenuHtmlPropsSchema,
|
|
924
|
+
model: Schema3.Struct({
|
|
925
|
+
suggestionsOpen: Schema3.Boolean,
|
|
926
|
+
save: Schema3.Literals(["idle", "pending", "failed"]),
|
|
927
|
+
mapStatus: Schema3.Literals(["loading", "ready", "configuration", "load"]),
|
|
928
|
+
zoom: Schema3.NullOr(Schema3.Finite),
|
|
929
|
+
camera: Schema3.NullOr(CameraRequest)
|
|
930
|
+
}),
|
|
931
|
+
message: MapMenuMessage,
|
|
932
|
+
events: MapMenuEvent,
|
|
933
|
+
restore: false
|
|
934
|
+
};
|
|
935
|
+
var inline = (props) => props.presentation === "inline" /* Inline */;
|
|
936
|
+
var visible = (props) => inline(props) || props.open === true;
|
|
937
|
+
var mapMenuCanConfirm = (props) => visible(props) && !props.locating && mapMenuSelectionMatches(props) && (props.mode === "point" /* Point */ || props.radiusKm !== undefined);
|
|
938
|
+
var update = Component.define(mapMenuOptions).update({
|
|
939
|
+
Edited: ($, { input }) => $.model.save === "pending" ? $.model : $.evolve({
|
|
940
|
+
suggestionsOpen: Boolean(input.trim()),
|
|
941
|
+
save: "idle"
|
|
942
|
+
}).emit(MapMenuEvent.InputChanged({ input })),
|
|
943
|
+
SuggestionsOpened: ($) => $.model.save === "pending" ? $.model : $.evolve({ suggestionsOpen: true }),
|
|
944
|
+
SuggestionsClosed: ($) => $.evolve({ suggestionsOpen: false }),
|
|
945
|
+
Picked: ($, { id }) => {
|
|
946
|
+
if ($.model.save === "pending")
|
|
947
|
+
return $.model;
|
|
948
|
+
const location = $.props.suggestions.slice(0, 3).find((item) => item.id === id);
|
|
949
|
+
return location ? $.evolve({ suggestionsOpen: false, save: "idle" }).emit(MapMenuEvent.InputChanged({ input: location.label })).emit(MapMenuEvent.LocationSelected({ location })) : $.model;
|
|
950
|
+
},
|
|
951
|
+
RadiusPicked: ($, { radiusKm }) => $.model.save === "pending" || $.props.mode === "point" /* Point */ || !($.props.radiusOptions ?? mapMenuRadiiKm).includes(radiusKm) ? $.model : $.emit(MapMenuEvent.RadiusChanged({ radiusKm })),
|
|
952
|
+
Locate: ($) => $.model.save !== "pending" && $.props.canUseCurrentLocation && !$.props.locating ? $.evolve({ suggestionsOpen: false }).emit(MapMenuEvent.CurrentLocationRequested()) : $.model,
|
|
953
|
+
Cancel: ($) => $.model.save === "pending" ? $.model : $.evolve({ save: "idle", suggestionsOpen: false }).emit(inline($.props) ? MapMenuEvent.Cancelled() : MapMenuEvent.OpenChanged({ open: false })),
|
|
954
|
+
Confirm: ($) => {
|
|
955
|
+
const { selectedLocation, mode, radiusKm } = $.props;
|
|
956
|
+
if ($.model.save === "pending" || !selectedLocation || !mapMenuCanConfirm($.props))
|
|
957
|
+
return $.model;
|
|
958
|
+
const selection = mode === "point" /* Point */ || radiusKm === undefined ? { location: selectedLocation } : { location: selectedLocation, radiusKm };
|
|
959
|
+
return $.evolve({ save: "pending", suggestionsOpen: false }).run(SaveMapSelection.make({ selection: Redacted.make(selection) }));
|
|
960
|
+
},
|
|
961
|
+
Finished: ($, { success }) => {
|
|
962
|
+
if ($.model.save !== "pending")
|
|
963
|
+
return $.model;
|
|
964
|
+
if (!success)
|
|
965
|
+
return $.evolve({ save: "failed" });
|
|
966
|
+
const next = $.evolve({ save: "idle" }).emit(MapMenuEvent.Confirmed());
|
|
967
|
+
return inline($.props) ? next : next.emit(MapMenuEvent.OpenChanged({ open: false }));
|
|
968
|
+
},
|
|
969
|
+
CameraRequested: ($, { action }) => $.model.mapStatus === "ready" ? $.evolve({
|
|
970
|
+
camera: { action, revision: ($.model.camera?.revision ?? 0) + 1 }
|
|
971
|
+
}) : $.model,
|
|
972
|
+
MapStatus: ($, { status }) => $.evolve({
|
|
973
|
+
mapStatus: status,
|
|
974
|
+
zoom: status === "ready" ? $.model.zoom : null
|
|
975
|
+
}),
|
|
976
|
+
ZoomChanged: ($, { zoom }) => $.evolve({ zoom })
|
|
977
|
+
});
|
|
978
|
+
|
|
979
|
+
// ../../src/components/map-menu/react.tsx
|
|
980
|
+
import { jsx as jsx6, jsxs as jsxs4, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
626
981
|
var MapMenu = (props) => {
|
|
982
|
+
const mapMenuClasses = resolveMapMenuClasses(props.classes);
|
|
627
983
|
const {
|
|
628
984
|
apiKey,
|
|
629
985
|
input,
|
|
@@ -650,12 +1006,7 @@ var MapMenu = (props) => {
|
|
|
650
1006
|
const radiusEnabled = props.mode !== "point" /* Point */;
|
|
651
1007
|
const locale = useKrakstackLocale2(localeOverride);
|
|
652
1008
|
const suggestions = locationSuggestions.slice(0, 3);
|
|
653
|
-
const
|
|
654
|
-
const labels = {
|
|
655
|
-
...baseLocale === "fr" ? defaultMessages2.fr : defaultMessages2.en,
|
|
656
|
-
...messages?.[baseLocale],
|
|
657
|
-
...messages?.[locale]
|
|
658
|
-
};
|
|
1009
|
+
const labels = mapMenuMessages(locale, messages);
|
|
659
1010
|
const id = useId();
|
|
660
1011
|
const inputRef = useRef2(null);
|
|
661
1012
|
const popupRef = useRef2(null);
|
|
@@ -663,9 +1014,12 @@ var MapMenu = (props) => {
|
|
|
663
1014
|
const [activeIndex, setActiveIndex] = useState2(-1);
|
|
664
1015
|
const [applying, setApplying] = useState2(false);
|
|
665
1016
|
const [confirmFailed, setConfirmFailed] = useState2(false);
|
|
666
|
-
const selectedMatchesInput =
|
|
1017
|
+
const selectedMatchesInput = mapMenuSelectionMatches({
|
|
1018
|
+
selectedLocation,
|
|
1019
|
+
input
|
|
1020
|
+
});
|
|
667
1021
|
const notice = provenance === "ip" ? labels.ipNotice : provenance === "browser" ? labels.browserNotice : !selectedMatchesInput ? labels.searchHint : undefined;
|
|
668
|
-
const markerIcon =
|
|
1022
|
+
const markerIcon = mapPinIcon(overlayColor);
|
|
669
1023
|
useEffect2(() => {
|
|
670
1024
|
if (inline || !open || !window.visualViewport)
|
|
671
1025
|
return;
|
|
@@ -729,16 +1083,16 @@ var MapMenu = (props) => {
|
|
|
729
1083
|
setApplying(false);
|
|
730
1084
|
}
|
|
731
1085
|
};
|
|
732
|
-
const content = /* @__PURE__ */
|
|
1086
|
+
const content = /* @__PURE__ */ jsxs4(Fragment2, {
|
|
733
1087
|
children: [
|
|
734
|
-
!inline ? /* @__PURE__ */
|
|
1088
|
+
!inline ? /* @__PURE__ */ jsxs4(DialogHeader, {
|
|
735
1089
|
className: "shrink-0 px-5 pt-6 pr-16 pb-5 text-left sm:px-7 sm:pt-[25px] sm:pb-[22px] [@media(max-height:599px)]:py-4",
|
|
736
1090
|
children: [
|
|
737
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ jsx6(DialogTitle, {
|
|
738
1092
|
className: "text-2xl font-semibold",
|
|
739
1093
|
children: labels.title
|
|
740
1094
|
}),
|
|
741
|
-
/* @__PURE__ */
|
|
1095
|
+
/* @__PURE__ */ jsx6(Button, {
|
|
742
1096
|
type: "button",
|
|
743
1097
|
variant: "ghost",
|
|
744
1098
|
size: "icon",
|
|
@@ -746,38 +1100,38 @@ var MapMenu = (props) => {
|
|
|
746
1100
|
disabled: applying,
|
|
747
1101
|
"aria-label": labels.close,
|
|
748
1102
|
onClick: () => changeOpen(false),
|
|
749
|
-
children: /* @__PURE__ */
|
|
1103
|
+
children: /* @__PURE__ */ jsx6(X, {})
|
|
750
1104
|
})
|
|
751
1105
|
]
|
|
752
1106
|
}) : null,
|
|
753
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
754
1108
|
className: inline ? "flex min-w-0 flex-col gap-4" : "flex min-h-0 min-w-0 flex-1 flex-col gap-[18px] overflow-y-auto px-5 pb-6 sm:px-7 [@media(max-height:599px)]:pb-3",
|
|
755
1109
|
children: [
|
|
756
|
-
/* @__PURE__ */
|
|
1110
|
+
/* @__PURE__ */ jsxs4("fieldset", {
|
|
757
1111
|
disabled: applying,
|
|
758
1112
|
"data-slot": "map-menu-toolbar",
|
|
759
1113
|
className: cn("grid min-w-0 shrink-0 grid-cols-1 items-end gap-3", onUseCurrentLocation && "sm:grid-cols-[minmax(0,1fr)_max-content]"),
|
|
760
1114
|
children: [
|
|
761
|
-
/* @__PURE__ */
|
|
1115
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
762
1116
|
className: "relative flex min-w-0 flex-col gap-2",
|
|
763
1117
|
onBlur: (event) => {
|
|
764
1118
|
if (!event.currentTarget.contains(event.relatedTarget))
|
|
765
1119
|
setDropdownOpen(false);
|
|
766
1120
|
},
|
|
767
1121
|
children: [
|
|
768
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ jsx6("label", {
|
|
769
1123
|
htmlFor: `${id}-input`,
|
|
770
1124
|
className: "text-sm font-medium",
|
|
771
1125
|
children: labels.location
|
|
772
1126
|
}),
|
|
773
|
-
/* @__PURE__ */
|
|
1127
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
774
1128
|
className: "relative",
|
|
775
1129
|
children: [
|
|
776
|
-
/* @__PURE__ */
|
|
1130
|
+
/* @__PURE__ */ jsx6(Search, {
|
|
777
1131
|
"aria-hidden": "true",
|
|
778
1132
|
className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3.5 size-4 -translate-y-1/2"
|
|
779
1133
|
}),
|
|
780
|
-
/* @__PURE__ */
|
|
1134
|
+
/* @__PURE__ */ jsx6(Input, {
|
|
781
1135
|
ref: inputRef,
|
|
782
1136
|
id: `${id}-input`,
|
|
783
1137
|
value: input,
|
|
@@ -819,7 +1173,7 @@ var MapMenu = (props) => {
|
|
|
819
1173
|
}
|
|
820
1174
|
}
|
|
821
1175
|
}),
|
|
822
|
-
input ? /* @__PURE__ */
|
|
1176
|
+
input ? /* @__PURE__ */ jsx6("button", {
|
|
823
1177
|
type: "button",
|
|
824
1178
|
"aria-label": labels.clear,
|
|
825
1179
|
className: "text-muted-foreground absolute top-[3px] right-1 grid size-11 cursor-pointer place-items-center rounded focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
@@ -829,20 +1183,20 @@ var MapMenu = (props) => {
|
|
|
829
1183
|
setActiveIndex(-1);
|
|
830
1184
|
inputRef.current?.focus();
|
|
831
1185
|
},
|
|
832
|
-
children: /* @__PURE__ */
|
|
1186
|
+
children: /* @__PURE__ */ jsx6(X, {
|
|
833
1187
|
className: "size-4"
|
|
834
1188
|
})
|
|
835
1189
|
}) : null
|
|
836
1190
|
]
|
|
837
1191
|
}),
|
|
838
|
-
dropdownOpen ? /* @__PURE__ */
|
|
1192
|
+
dropdownOpen ? /* @__PURE__ */ jsxs4("div", {
|
|
839
1193
|
id: `${id}-suggestions`,
|
|
840
1194
|
role: "listbox",
|
|
841
1195
|
"aria-label": labels.suggestions,
|
|
842
1196
|
"aria-busy": loadingSuggestions,
|
|
843
1197
|
className: "bg-popover text-popover-foreground absolute inset-x-0 top-full z-30 mt-1 max-h-[min(16rem,35dvh)] overflow-y-auto rounded-md border p-1 shadow-lg",
|
|
844
1198
|
children: [
|
|
845
|
-
suggestions.map((location, index) => /* @__PURE__ */
|
|
1199
|
+
suggestions.map((location, index) => /* @__PURE__ */ jsxs4("button", {
|
|
846
1200
|
id: `${id}-option-${index}`,
|
|
847
1201
|
type: "button",
|
|
848
1202
|
role: "option",
|
|
@@ -853,43 +1207,43 @@ var MapMenu = (props) => {
|
|
|
853
1207
|
onMouseDown: (event) => event.preventDefault(),
|
|
854
1208
|
onClick: () => select(location),
|
|
855
1209
|
children: [
|
|
856
|
-
/* @__PURE__ */
|
|
1210
|
+
/* @__PURE__ */ jsx6(MapPin, {
|
|
857
1211
|
"aria-hidden": "true",
|
|
858
1212
|
className: "size-4 shrink-0",
|
|
859
1213
|
style: { color: overlayColor }
|
|
860
1214
|
}),
|
|
861
|
-
/* @__PURE__ */
|
|
1215
|
+
/* @__PURE__ */ jsxs4("span", {
|
|
862
1216
|
className: "min-w-0",
|
|
863
1217
|
children: [
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
-
className:
|
|
1218
|
+
/* @__PURE__ */ jsx6("span", {
|
|
1219
|
+
className: mapMenuClasses.resultTitle,
|
|
866
1220
|
children: location.title ?? location.label
|
|
867
1221
|
}),
|
|
868
|
-
location.details ? /* @__PURE__ */
|
|
869
|
-
className:
|
|
1222
|
+
location.details ? /* @__PURE__ */ jsx6("span", {
|
|
1223
|
+
className: mapMenuClasses.resultDescription,
|
|
870
1224
|
children: location.details
|
|
871
1225
|
}) : null
|
|
872
1226
|
]
|
|
873
1227
|
})
|
|
874
1228
|
]
|
|
875
1229
|
}, location.id)),
|
|
876
|
-
loadingSuggestions ? /* @__PURE__ */
|
|
1230
|
+
loadingSuggestions ? /* @__PURE__ */ jsx6("p", {
|
|
877
1231
|
role: "status",
|
|
878
|
-
className:
|
|
1232
|
+
className: mapMenuClasses.status,
|
|
879
1233
|
children: labels.loading
|
|
880
|
-
}) : suggestionsError ? /* @__PURE__ */
|
|
1234
|
+
}) : suggestionsError ? /* @__PURE__ */ jsx6("p", {
|
|
881
1235
|
role: "alert",
|
|
882
|
-
className:
|
|
1236
|
+
className: mapMenuClasses.error,
|
|
883
1237
|
children: suggestionsError
|
|
884
|
-
}) : !suggestions.length ? /* @__PURE__ */
|
|
885
|
-
className:
|
|
1238
|
+
}) : !suggestions.length ? /* @__PURE__ */ jsx6("p", {
|
|
1239
|
+
className: mapMenuClasses.status,
|
|
886
1240
|
children: labels.noResults
|
|
887
1241
|
}) : null
|
|
888
1242
|
]
|
|
889
1243
|
}) : null
|
|
890
1244
|
]
|
|
891
1245
|
}),
|
|
892
|
-
onUseCurrentLocation ? /* @__PURE__ */
|
|
1246
|
+
onUseCurrentLocation ? /* @__PURE__ */ jsxs4(Button, {
|
|
893
1247
|
type: "button",
|
|
894
1248
|
variant: "outline",
|
|
895
1249
|
"data-slot": "map-menu-current",
|
|
@@ -897,30 +1251,30 @@ var MapMenu = (props) => {
|
|
|
897
1251
|
className: "bg-card h-[50px] w-max gap-[7px] justify-self-start px-3 shadow-none",
|
|
898
1252
|
onClick: onUseCurrentLocation,
|
|
899
1253
|
children: [
|
|
900
|
-
/* @__PURE__ */
|
|
1254
|
+
/* @__PURE__ */ jsx6(LocateFixed2, {
|
|
901
1255
|
className: "text-foreground size-[17px]"
|
|
902
1256
|
}),
|
|
903
1257
|
labels.currentLocation
|
|
904
1258
|
]
|
|
905
1259
|
}) : null,
|
|
906
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
907
1261
|
className: "col-span-full grid text-xs leading-5",
|
|
908
1262
|
children: [
|
|
909
|
-
[labels.ipNotice, labels.browserNotice, labels.searchHint].map((text) => /* @__PURE__ */
|
|
1263
|
+
[labels.ipNotice, labels.browserNotice, labels.searchHint].map((text) => /* @__PURE__ */ jsx6("span", {
|
|
910
1264
|
"aria-hidden": "true",
|
|
911
1265
|
className: "invisible col-start-1 row-start-1 pl-6",
|
|
912
1266
|
children: text
|
|
913
1267
|
}, text)),
|
|
914
|
-
notice ? /* @__PURE__ */
|
|
1268
|
+
notice ? /* @__PURE__ */ jsxs4("p", {
|
|
915
1269
|
role: "status",
|
|
916
1270
|
"data-slot": "map-menu-provenance",
|
|
917
1271
|
className: "text-muted-foreground col-start-1 row-start-1 flex items-start gap-2",
|
|
918
1272
|
children: [
|
|
919
|
-
/* @__PURE__ */
|
|
1273
|
+
/* @__PURE__ */ jsx6(MapPin, {
|
|
920
1274
|
"aria-hidden": "true",
|
|
921
1275
|
className: "text-foreground mt-0.5 size-4 shrink-0"
|
|
922
1276
|
}),
|
|
923
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ jsx6("span", {
|
|
924
1278
|
className: "wrap-anywhere",
|
|
925
1279
|
children: notice
|
|
926
1280
|
})
|
|
@@ -928,33 +1282,40 @@ var MapMenu = (props) => {
|
|
|
928
1282
|
}) : null
|
|
929
1283
|
]
|
|
930
1284
|
}),
|
|
931
|
-
radiusEnabled ? /* @__PURE__ */
|
|
1285
|
+
radiusEnabled ? /* @__PURE__ */ jsxs4("div", {
|
|
932
1286
|
className: "after:bg-border col-span-full flex flex-wrap items-center gap-3 after:h-px after:flex-1",
|
|
933
1287
|
children: [
|
|
934
|
-
/* @__PURE__ */
|
|
1288
|
+
/* @__PURE__ */ jsx6("label", {
|
|
935
1289
|
htmlFor: `${id}-radius`,
|
|
936
1290
|
className: "text-sm font-medium",
|
|
937
1291
|
children: labels.searchWithin
|
|
938
1292
|
}),
|
|
939
|
-
/* @__PURE__ */
|
|
940
|
-
|
|
1293
|
+
/* @__PURE__ */ jsxs4(Select, {
|
|
1294
|
+
value: radiusKm,
|
|
1295
|
+
items: radiusOptions.map((radius) => ({
|
|
1296
|
+
value: radius,
|
|
1297
|
+
label: `${radius} Km`
|
|
1298
|
+
})),
|
|
1299
|
+
disabled: applying,
|
|
1300
|
+
onValueChange: (value) => {
|
|
1301
|
+
if (value !== null)
|
|
1302
|
+
props.onRadiusChange(value);
|
|
1303
|
+
},
|
|
941
1304
|
children: [
|
|
942
|
-
/* @__PURE__ */
|
|
1305
|
+
/* @__PURE__ */ jsx6(SelectTrigger, {
|
|
943
1306
|
id: `${id}-radius`,
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1307
|
+
className: "bg-card min-w-24 shadow-none data-[size=default]:h-11",
|
|
1308
|
+
children: /* @__PURE__ */ jsx6(SelectValue, {})
|
|
1309
|
+
}),
|
|
1310
|
+
/* @__PURE__ */ jsx6(SelectContent, {
|
|
1311
|
+
"data-map-menu-radius-popup": "",
|
|
1312
|
+
children: radiusOptions.map((radius) => /* @__PURE__ */ jsxs4(SelectItem, {
|
|
948
1313
|
value: radius,
|
|
949
1314
|
children: [
|
|
950
1315
|
radius,
|
|
951
|
-
"
|
|
1316
|
+
" Km"
|
|
952
1317
|
]
|
|
953
1318
|
}, radius))
|
|
954
|
-
}),
|
|
955
|
-
/* @__PURE__ */ jsx5(ChevronDown, {
|
|
956
|
-
"aria-hidden": "true",
|
|
957
|
-
className: "pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2"
|
|
958
1319
|
})
|
|
959
1320
|
]
|
|
960
1321
|
})
|
|
@@ -962,11 +1323,11 @@ var MapMenu = (props) => {
|
|
|
962
1323
|
}) : null
|
|
963
1324
|
]
|
|
964
1325
|
}),
|
|
965
|
-
/* @__PURE__ */
|
|
1326
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
966
1327
|
"data-slot": "map-menu-map",
|
|
967
1328
|
className: inline ? "relative h-80 min-w-0 sm:h-96" : "relative min-h-56 min-w-0 flex-[1_0_14rem] [@media(max-height:599px)]:min-h-[182px] [@media(max-height:599px)]:basis-[182px]",
|
|
968
1329
|
children: [
|
|
969
|
-
/* @__PURE__ */
|
|
1330
|
+
/* @__PURE__ */ jsx6(MapMenuMap, {
|
|
970
1331
|
apiKey,
|
|
971
1332
|
center: selectedLocation?.center ?? { lat: 0, lng: 0 },
|
|
972
1333
|
zoom: !radiusEnabled && selectedLocation ? 15 : 4,
|
|
@@ -987,7 +1348,7 @@ var MapMenu = (props) => {
|
|
|
987
1348
|
className: "h-full min-h-0 w-full rounded-md",
|
|
988
1349
|
controlsClassName: "bg-card rounded-md shadow-md"
|
|
989
1350
|
}),
|
|
990
|
-
radiusEnabled && selectedLocation ? /* @__PURE__ */
|
|
1351
|
+
radiusEnabled && selectedLocation ? /* @__PURE__ */ jsx6("p", {
|
|
991
1352
|
className: "bg-card text-muted-foreground pointer-events-none absolute bottom-[25px] left-3 m-0 max-w-[calc(100%-24px)] rounded px-2.5 py-[7px] text-xs shadow-sm",
|
|
992
1353
|
children: labels.radiusHint
|
|
993
1354
|
}) : null
|
|
@@ -995,18 +1356,18 @@ var MapMenu = (props) => {
|
|
|
995
1356
|
})
|
|
996
1357
|
]
|
|
997
1358
|
}),
|
|
998
|
-
/* @__PURE__ */
|
|
1359
|
+
/* @__PURE__ */ jsxs4(DialogFooter, {
|
|
999
1360
|
className: inline ? "gap-3 border-0 bg-transparent p-0" : "shrink-0 gap-3 border-0 bg-transparent px-5 pt-[18px] pb-[max(18px,env(safe-area-inset-bottom))] sm:px-7 [@media(max-height:599px)]:pt-3 [@media(max-height:599px)]:pb-[max(12px,env(safe-area-inset-bottom))]",
|
|
1000
1361
|
children: [
|
|
1001
|
-
error || confirmFailed ? /* @__PURE__ */
|
|
1362
|
+
error || confirmFailed ? /* @__PURE__ */ jsx6("p", {
|
|
1002
1363
|
role: "alert",
|
|
1003
1364
|
className: "text-destructive w-full self-center text-sm sm:mr-auto sm:w-auto",
|
|
1004
1365
|
children: error ?? labels.confirmError
|
|
1005
1366
|
}) : null,
|
|
1006
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ jsxs4("div", {
|
|
1007
1368
|
className: "flex gap-2",
|
|
1008
1369
|
children: [
|
|
1009
|
-
/* @__PURE__ */
|
|
1370
|
+
/* @__PURE__ */ jsx6(Button, {
|
|
1010
1371
|
type: "button",
|
|
1011
1372
|
variant: "outline",
|
|
1012
1373
|
className: "bg-card min-h-11 flex-1",
|
|
@@ -1014,7 +1375,7 @@ var MapMenu = (props) => {
|
|
|
1014
1375
|
onClick: () => changeOpen(false),
|
|
1015
1376
|
children: labels.cancel
|
|
1016
1377
|
}),
|
|
1017
|
-
/* @__PURE__ */
|
|
1378
|
+
/* @__PURE__ */ jsx6(Button, {
|
|
1018
1379
|
type: "button",
|
|
1019
1380
|
"data-slot": "map-menu-confirm",
|
|
1020
1381
|
className: cn("min-h-11 flex-[2] bg-[oklch(0.9247_0.0524_66.1732)] text-zinc-950 hover:bg-[oklch(0.9247_0.0524_66.1732)] hover:brightness-95", confirmClassName),
|
|
@@ -1029,7 +1390,7 @@ var MapMenu = (props) => {
|
|
|
1029
1390
|
]
|
|
1030
1391
|
});
|
|
1031
1392
|
if (inline) {
|
|
1032
|
-
return /* @__PURE__ */
|
|
1393
|
+
return /* @__PURE__ */ jsx6("section", {
|
|
1033
1394
|
role: "group",
|
|
1034
1395
|
"aria-label": labels.title,
|
|
1035
1396
|
"data-slot": "map-menu",
|
|
@@ -1038,13 +1399,13 @@ var MapMenu = (props) => {
|
|
|
1038
1399
|
children: content
|
|
1039
1400
|
});
|
|
1040
1401
|
}
|
|
1041
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ jsx6(Dialog, {
|
|
1042
1403
|
open,
|
|
1043
1404
|
onOpenChange: changeOpen,
|
|
1044
|
-
children: /* @__PURE__ */
|
|
1405
|
+
children: /* @__PURE__ */ jsxs4(DialogPortal, {
|
|
1045
1406
|
children: [
|
|
1046
|
-
/* @__PURE__ */
|
|
1047
|
-
/* @__PURE__ */
|
|
1407
|
+
/* @__PURE__ */ jsx6(DialogOverlay, {}),
|
|
1408
|
+
/* @__PURE__ */ jsx6(DialogPrimitive2.Popup, {
|
|
1048
1409
|
ref: popupRef,
|
|
1049
1410
|
initialFocus: inputRef,
|
|
1050
1411
|
"aria-describedby": undefined,
|