@krak-stack/registry 0.10.20 → 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 +83 -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 +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} +2180 -909
- 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} +2174 -897
- 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} +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} +618 -135
- 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} +778 -256
- 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} +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} +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} +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 +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} +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 +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/{ui/rich-text-editor.js → rich-text-editor/react.js} +521 -100
- 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} +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} +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 -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} +2461 -948
- 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 +863 -295
- 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/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 +697 -181
- 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 +181 -142
- 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/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,679 @@
|
|
|
1
|
+
// ../../src/components/registry-previews/component-example.tsx
|
|
2
|
+
import { Atom, CodeXml } from "lucide-react";
|
|
3
|
+
|
|
4
|
+
// ../../src/components/ui/button.tsx
|
|
5
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
|
|
8
|
+
// ../../src/lib/utils.ts
|
|
9
|
+
import { cn } from "cn";
|
|
10
|
+
|
|
11
|
+
// ../../src/components/ui/button.tsx
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
14
|
+
variants: {
|
|
15
|
+
variant: {
|
|
16
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
17
|
+
outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
18
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
19
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
20
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
21
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
25
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
26
|
+
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
27
|
+
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
28
|
+
icon: "size-9",
|
|
29
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
30
|
+
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
31
|
+
"icon-lg": "size-10"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
variant: "default",
|
|
36
|
+
size: "default"
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
function Button({
|
|
40
|
+
className,
|
|
41
|
+
variant = "default",
|
|
42
|
+
size = "default",
|
|
43
|
+
...props
|
|
44
|
+
}) {
|
|
45
|
+
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
46
|
+
"data-slot": "button",
|
|
47
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ../../src/components/copy-button/react.tsx
|
|
53
|
+
import { Check, Copy, TriangleAlert } from "lucide-react";
|
|
54
|
+
import { Redacted as Redacted2 } from "effect";
|
|
55
|
+
import { Component as Component2 } from "effect/ui";
|
|
56
|
+
import { useLayoutEffect as useLayoutEffect2, useRef as useRef2, useState as useState2 } from "react";
|
|
57
|
+
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
58
|
+
|
|
59
|
+
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
60
|
+
import { MessageLog as MessageLog2 } from "effect/ui";
|
|
61
|
+
import {
|
|
62
|
+
createContext,
|
|
63
|
+
useCallback,
|
|
64
|
+
useContext,
|
|
65
|
+
useEffect,
|
|
66
|
+
useLayoutEffect,
|
|
67
|
+
useRef,
|
|
68
|
+
useState,
|
|
69
|
+
useSyncExternalStore
|
|
70
|
+
} from "react";
|
|
71
|
+
|
|
72
|
+
// ../../src/lib/effect-ui-adapter/model-runtime.ts
|
|
73
|
+
import { MessageLog, Renderer, View } from "effect/ui";
|
|
74
|
+
import { BrowserHost, Html } from "effect/ui/html";
|
|
75
|
+
import { Cause, Effect, Fiber } from "effect";
|
|
76
|
+
var node = () => ({ children: [] });
|
|
77
|
+
var modelHost = (commit) => {
|
|
78
|
+
const remove = (child) => {
|
|
79
|
+
if (!child.parent)
|
|
80
|
+
return;
|
|
81
|
+
child.parent.children.splice(child.parent.children.indexOf(child), 1);
|
|
82
|
+
delete child.parent;
|
|
83
|
+
};
|
|
84
|
+
return {
|
|
85
|
+
createElement: node,
|
|
86
|
+
createText: node,
|
|
87
|
+
setText: () => {},
|
|
88
|
+
setAttr: () => {},
|
|
89
|
+
setProp: () => {},
|
|
90
|
+
setEvents: () => {},
|
|
91
|
+
insertBefore: (parent, child, before) => {
|
|
92
|
+
if (child === before)
|
|
93
|
+
return;
|
|
94
|
+
remove(child);
|
|
95
|
+
const index = before ? parent.children.indexOf(before) : parent.children.length;
|
|
96
|
+
parent.children.splice(index, 0, child);
|
|
97
|
+
child.parent = parent;
|
|
98
|
+
},
|
|
99
|
+
remove,
|
|
100
|
+
parentOf: (child) => child.parent,
|
|
101
|
+
nextOf: (child) => child.parent?.children[child.parent.children.indexOf(child) + 1],
|
|
102
|
+
elements: ["html"],
|
|
103
|
+
controlled: new Set,
|
|
104
|
+
runsMounts: false,
|
|
105
|
+
commit
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
var mountModel = (component, props, publishSnapshot, messageLog, onEmit) => {
|
|
109
|
+
let currentProps = props;
|
|
110
|
+
let root;
|
|
111
|
+
let active = true;
|
|
112
|
+
let failure;
|
|
113
|
+
const publish = () => {
|
|
114
|
+
if (!active)
|
|
115
|
+
return;
|
|
116
|
+
if (failure) {
|
|
117
|
+
publishSnapshot({ error: failure });
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const current = root?.model();
|
|
121
|
+
if (current !== undefined)
|
|
122
|
+
publishSnapshot({ model: current });
|
|
123
|
+
};
|
|
124
|
+
const fiber = Effect.runFork(Effect.scoped(Effect.gen(function* () {
|
|
125
|
+
const mounted = yield* Renderer.mount(component, Effect.succeed(props), node(), {
|
|
126
|
+
head: false,
|
|
127
|
+
onEmit,
|
|
128
|
+
fallback: ({ cause }) => {
|
|
129
|
+
failure = new Error("Effect UI root failed", {
|
|
130
|
+
cause: Cause.squash(cause)
|
|
131
|
+
});
|
|
132
|
+
return View.text("");
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
if (!active)
|
|
136
|
+
return;
|
|
137
|
+
root = mounted;
|
|
138
|
+
if (props !== currentProps)
|
|
139
|
+
mounted.setProps(currentProps);
|
|
140
|
+
publish();
|
|
141
|
+
return yield* Effect.never;
|
|
142
|
+
}).pipe(Effect.provide(Renderer.layer(modelHost(publish))), Effect.provideService(Html.Host, BrowserHost.htmlHost), Effect.provideService(MessageLog.MessageLog, messageLog))));
|
|
143
|
+
return {
|
|
144
|
+
send: (message) => {
|
|
145
|
+
root?.send(message);
|
|
146
|
+
publish();
|
|
147
|
+
},
|
|
148
|
+
setProps: (next) => {
|
|
149
|
+
currentProps = next;
|
|
150
|
+
root?.setProps(next);
|
|
151
|
+
},
|
|
152
|
+
dispose: () => {
|
|
153
|
+
active = false;
|
|
154
|
+
root = undefined;
|
|
155
|
+
Effect.runFork(Fiber.interrupt(fiber));
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// ../../src/lib/effect-ui-adapter/use-model.ts
|
|
161
|
+
"use client";
|
|
162
|
+
var ModelMessageLogContext = createContext(undefined);
|
|
163
|
+
var useModel = (component, props, options = {}) => {
|
|
164
|
+
const contextLog = useContext(ModelMessageLogContext);
|
|
165
|
+
const messageLog = options.messageLog ?? (contextLog === undefined ? MessageLog2.noop : contextLog);
|
|
166
|
+
const [store] = useState(() => {
|
|
167
|
+
const initial = { model: component.init(props).model };
|
|
168
|
+
let snapshot = initial;
|
|
169
|
+
const listeners = new Set;
|
|
170
|
+
return {
|
|
171
|
+
subscribe: (listener) => {
|
|
172
|
+
listeners.add(listener);
|
|
173
|
+
return () => {
|
|
174
|
+
listeners.delete(listener);
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
getSnapshot: () => snapshot,
|
|
178
|
+
getServerSnapshot: () => initial,
|
|
179
|
+
publish: (next) => {
|
|
180
|
+
if ("model" in snapshot && "model" in next && Object.is(snapshot.model, next.model))
|
|
181
|
+
return;
|
|
182
|
+
if ("error" in snapshot && "error" in next && snapshot.error === next.error)
|
|
183
|
+
return;
|
|
184
|
+
snapshot = next;
|
|
185
|
+
listeners.forEach((listener) => listener());
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
});
|
|
189
|
+
const snapshot = useSyncExternalStore(store.subscribe, store.getSnapshot, store.getServerSnapshot);
|
|
190
|
+
const committed = useRef(props);
|
|
191
|
+
const onEmit = useRef(options.onEmit);
|
|
192
|
+
const runtime = useRef(undefined);
|
|
193
|
+
const send = useCallback((message) => runtime.current?.send(message), []);
|
|
194
|
+
useLayoutEffect(() => {
|
|
195
|
+
onEmit.current = options.onEmit;
|
|
196
|
+
committed.current = props;
|
|
197
|
+
runtime.current?.setProps(props);
|
|
198
|
+
}, [props, options.onEmit]);
|
|
199
|
+
useEffect(() => {
|
|
200
|
+
if (messageLog === null)
|
|
201
|
+
return;
|
|
202
|
+
const mounted = mountModel(component, committed.current, store.publish, messageLog, (event) => onEmit.current?.(event));
|
|
203
|
+
runtime.current = mounted;
|
|
204
|
+
return () => {
|
|
205
|
+
runtime.current = undefined;
|
|
206
|
+
mounted.dispose();
|
|
207
|
+
};
|
|
208
|
+
}, [component, messageLog, store]);
|
|
209
|
+
if ("error" in snapshot)
|
|
210
|
+
throw snapshot.error;
|
|
211
|
+
return { model: snapshot.model, send };
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
// ../../src/components/copy-button/index.ts
|
|
215
|
+
import { Effect as Effect2, Redacted, Schema as Schema2 } from "effect";
|
|
216
|
+
import { Command, Component, UiSchema, View as View2 } from "effect/ui";
|
|
217
|
+
|
|
218
|
+
// ../../src/components/copy-button/schema.ts
|
|
219
|
+
import { Schema } from "effect";
|
|
220
|
+
var MessageOverrides = Schema.Struct({
|
|
221
|
+
copy: Schema.optional(Schema.String),
|
|
222
|
+
copied: Schema.optional(Schema.String),
|
|
223
|
+
copyFailed: Schema.optional(Schema.String)
|
|
224
|
+
}).annotate({ identifier: "CopyButtonMessageOverrides" });
|
|
225
|
+
var CopyButtonTranslations = Schema.Record(Schema.String, Schema.UndefinedOr(MessageOverrides));
|
|
226
|
+
var copyButtonVariants = [
|
|
227
|
+
"default",
|
|
228
|
+
"secondary",
|
|
229
|
+
"outline",
|
|
230
|
+
"ghost",
|
|
231
|
+
"destructive",
|
|
232
|
+
"link"
|
|
233
|
+
];
|
|
234
|
+
var CopyButtonModelProps = Schema.Struct({
|
|
235
|
+
value: Schema.Redacted(Schema.String, { disallowJsonEncode: true }),
|
|
236
|
+
disabled: Schema.optional(Schema.Boolean),
|
|
237
|
+
resetDelay: Schema.optional(Schema.Finite)
|
|
238
|
+
}).annotate({ identifier: "CopyButtonModelProps" });
|
|
239
|
+
var copyButtonSharedProps = Schema.Struct({
|
|
240
|
+
...CopyButtonModelProps.fields,
|
|
241
|
+
valueDescription: Schema.optional(Schema.String),
|
|
242
|
+
copyVariant: Schema.optional(Schema.Literals(["default", "sm", "large"])),
|
|
243
|
+
variant: Schema.optional(Schema.Literals(copyButtonVariants)),
|
|
244
|
+
locale: Schema.optional(Schema.String),
|
|
245
|
+
messages: Schema.optional(CopyButtonTranslations)
|
|
246
|
+
}).annotate({ identifier: "CopyButtonSharedProps" });
|
|
247
|
+
|
|
248
|
+
// ../../src/components/copy-button/index.ts
|
|
249
|
+
var labels = {
|
|
250
|
+
en: { copy: "Copy", copied: "Copied", copyFailed: "Copy failed" },
|
|
251
|
+
fr: { copy: "Copier", copied: "Copié", copyFailed: "Échec de la copie" }
|
|
252
|
+
};
|
|
253
|
+
var copyButtonMessages = (locale = "en", translations) => ({
|
|
254
|
+
...locale.startsWith("fr") ? labels.fr : labels.en,
|
|
255
|
+
...translations?.[locale.split("-")[0] ?? locale],
|
|
256
|
+
...translations?.[locale]
|
|
257
|
+
});
|
|
258
|
+
var copyButtonLabel = (copy, description) => description ? `${copy} ${description}` : copy;
|
|
259
|
+
var CopyButtonMessage = UiSchema.TaggedEnum({
|
|
260
|
+
Pressed: {},
|
|
261
|
+
Finished: { success: Schema2.Boolean },
|
|
262
|
+
Reset: {}
|
|
263
|
+
}).annotate({ identifier: "CopyButtonMessage" });
|
|
264
|
+
|
|
265
|
+
class WriteClipboard extends Command.Service()("copy-button/WriteClipboard", {
|
|
266
|
+
args: {
|
|
267
|
+
value: Schema2.Redacted(Schema2.String, { disallowJsonEncode: true })
|
|
268
|
+
},
|
|
269
|
+
success: CopyButtonMessage
|
|
270
|
+
}) {
|
|
271
|
+
static layerFromWrite = (write) => WriteClipboard.toLayer(({ value }) => Effect2.tryPromise(() => write(Redacted.value(value))).pipe(Effect2.match({
|
|
272
|
+
onSuccess: () => CopyButtonMessage.Finished({ success: true }),
|
|
273
|
+
onFailure: () => CopyButtonMessage.Finished({ success: false })
|
|
274
|
+
})));
|
|
275
|
+
static browser = WriteClipboard.layerFromWrite((value) => navigator.clipboard.writeText(value));
|
|
276
|
+
}
|
|
277
|
+
var ResetClipboardFeedback = Command.make("copy-button/ResetFeedback", { args: { delay: Schema2.Number }, mode: "switch" }, ({ delay }) => Effect2.sleep(Math.max(0, delay)).pipe(Effect2.as(CopyButtonMessage.Reset())));
|
|
278
|
+
var copyButtonOptions = {
|
|
279
|
+
name: "CopyButton",
|
|
280
|
+
props: CopyButtonModelProps,
|
|
281
|
+
model: Schema2.Struct({
|
|
282
|
+
status: Schema2.Literals(["idle", "copied", "failed"])
|
|
283
|
+
}).annotate({ identifier: "CopyButtonModel" }),
|
|
284
|
+
message: CopyButtonMessage,
|
|
285
|
+
restore: false
|
|
286
|
+
};
|
|
287
|
+
var Definition = Component.define(copyButtonOptions);
|
|
288
|
+
var update = Definition.update({
|
|
289
|
+
Pressed: ($) => $.props.disabled ? $.model : $.run(WriteClipboard.make({ value: $.props.value })),
|
|
290
|
+
Finished: ($, { success }) => $.evolve({ status: success ? "copied" : "failed" }).run(ResetClipboardFeedback.make({ delay: $.props.resetDelay ?? 1500 })),
|
|
291
|
+
Reset: ($) => $.evolve({ status: "idle" })
|
|
292
|
+
});
|
|
293
|
+
var copyButtonBehaviours = {
|
|
294
|
+
init: () => ({ status: "idle" }),
|
|
295
|
+
update
|
|
296
|
+
};
|
|
297
|
+
var CopyButtonModel = Definition.make({
|
|
298
|
+
...copyButtonBehaviours,
|
|
299
|
+
view: () => View2.text("")
|
|
300
|
+
});
|
|
301
|
+
var copyButtonStatus = (status, copy, description) => {
|
|
302
|
+
if (status === "idle")
|
|
303
|
+
return "";
|
|
304
|
+
const text = status === "copied" ? copy.copied : copy.copyFailed;
|
|
305
|
+
return description ? `${text}: ${description}` : text;
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
// ../../src/components/copy-button/react.tsx
|
|
309
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
310
|
+
"use client";
|
|
311
|
+
function CopyButton({
|
|
312
|
+
value,
|
|
313
|
+
valueDescription,
|
|
314
|
+
copyVariant = "default",
|
|
315
|
+
locale: localeOverride,
|
|
316
|
+
messages,
|
|
317
|
+
onCopied,
|
|
318
|
+
onCopyError,
|
|
319
|
+
resetDelay = 1500,
|
|
320
|
+
disabled,
|
|
321
|
+
size,
|
|
322
|
+
"aria-label": ariaLabel,
|
|
323
|
+
...props
|
|
324
|
+
}) {
|
|
325
|
+
const locale = useKrakstackLocale(localeOverride);
|
|
326
|
+
const labels = copyButtonMessages(locale, messages);
|
|
327
|
+
const callbacks = useRef2({
|
|
328
|
+
onCopied,
|
|
329
|
+
onCopyError,
|
|
330
|
+
failureLabel: labels.copyFailed
|
|
331
|
+
});
|
|
332
|
+
useLayoutEffect2(() => {
|
|
333
|
+
callbacks.current = {
|
|
334
|
+
onCopied,
|
|
335
|
+
onCopyError,
|
|
336
|
+
failureLabel: labels.copyFailed
|
|
337
|
+
};
|
|
338
|
+
}, [onCopied, onCopyError, labels.copyFailed]);
|
|
339
|
+
const [component] = useState2(() => CopyButtonModel.pipe(Component2.provide(WriteClipboard.layerFromWrite(async (text) => {
|
|
340
|
+
const { onCopied, onCopyError, failureLabel } = callbacks.current;
|
|
341
|
+
try {
|
|
342
|
+
await navigator.clipboard.writeText(text);
|
|
343
|
+
onCopied?.();
|
|
344
|
+
} catch (cause) {
|
|
345
|
+
onCopyError?.(cause instanceof Error ? cause : new Error(failureLabel, { cause }));
|
|
346
|
+
throw cause;
|
|
347
|
+
}
|
|
348
|
+
}))));
|
|
349
|
+
const {
|
|
350
|
+
model: { status },
|
|
351
|
+
send
|
|
352
|
+
} = useModel(component, {
|
|
353
|
+
value: Redacted2.make(value),
|
|
354
|
+
disabled: disabled ?? false,
|
|
355
|
+
resetDelay
|
|
356
|
+
});
|
|
357
|
+
const accessibleLabel = ariaLabel ?? copyButtonLabel(labels.copy, valueDescription);
|
|
358
|
+
const isLarge = copyVariant === "large";
|
|
359
|
+
const defaultSize = copyVariant === "sm" ? "icon-xs" : isLarge ? "sm" : "icon-sm";
|
|
360
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
361
|
+
"aria-label": accessibleLabel,
|
|
362
|
+
disabled,
|
|
363
|
+
onClick: () => send(CopyButtonMessage.Pressed()),
|
|
364
|
+
size: size ?? defaultSize,
|
|
365
|
+
...props,
|
|
366
|
+
children: [
|
|
367
|
+
/* @__PURE__ */ jsx2("span", {
|
|
368
|
+
"aria-live": "polite",
|
|
369
|
+
className: "sr-only",
|
|
370
|
+
role: "status",
|
|
371
|
+
children: copyButtonStatus(status, labels, valueDescription)
|
|
372
|
+
}),
|
|
373
|
+
status === "copied" ? /* @__PURE__ */ jsx2(Check, {
|
|
374
|
+
"aria-hidden": "true"
|
|
375
|
+
}) : null,
|
|
376
|
+
status === "failed" ? /* @__PURE__ */ jsx2(TriangleAlert, {
|
|
377
|
+
"aria-hidden": "true"
|
|
378
|
+
}) : null,
|
|
379
|
+
status === "idle" ? /* @__PURE__ */ jsx2(Copy, {
|
|
380
|
+
"aria-hidden": "true"
|
|
381
|
+
}) : null,
|
|
382
|
+
isLarge ? /* @__PURE__ */ jsx2("span", {
|
|
383
|
+
children: labels.copy
|
|
384
|
+
}) : null
|
|
385
|
+
]
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
// ../../src/components/ui/copy-button.tsx
|
|
390
|
+
"use client";
|
|
391
|
+
|
|
392
|
+
// ../../src/components/code-block/react.tsx
|
|
393
|
+
import { highlight } from "@tanstack/highlight";
|
|
394
|
+
import { useKrakstackLocale as useKrakstackLocale2 } from "@krak-stack/registry/krakstack-provider/react";
|
|
395
|
+
|
|
396
|
+
// ../../src/components/code-block/classes.ts
|
|
397
|
+
var codeBlockClasses = {
|
|
398
|
+
root: "not-prose bg-muted overflow-hidden rounded-md border text-[var(--th-token)]",
|
|
399
|
+
header: "bg-background border-border/60 flex items-center justify-between border-b px-3 py-2",
|
|
400
|
+
language: "text-muted-foreground font-mono text-xs",
|
|
401
|
+
viewport: "max-h-full overflow-auto font-mono text-[0.875rem] leading-[1.625]"
|
|
402
|
+
};
|
|
403
|
+
var resolveCodeBlockClasses = (overrides) => ({
|
|
404
|
+
...codeBlockClasses,
|
|
405
|
+
...overrides
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
// ../../src/components/code-block/index.ts
|
|
409
|
+
import { createThemeCss } from "@tanstack/highlight/theme";
|
|
410
|
+
import { githubDarkTheme } from "@tanstack/highlight/themes/github-dark";
|
|
411
|
+
import { githubLightTheme } from "@tanstack/highlight/themes/github-light";
|
|
412
|
+
var codeThemeCss = `${createThemeCss({
|
|
413
|
+
light: githubLightTheme,
|
|
414
|
+
dark: githubDarkTheme,
|
|
415
|
+
lightSelector: "[data-code-theme]",
|
|
416
|
+
darkSelector: ".dark [data-code-theme]",
|
|
417
|
+
codeBlockSelector: "[data-code-theme] pre.th-code",
|
|
418
|
+
lineNumbersSelector: "[data-code-theme] .th-code--line-numbers"
|
|
419
|
+
})}
|
|
420
|
+
[data-code-theme] pre.th-code {
|
|
421
|
+
margin: 0;
|
|
422
|
+
overflow: visible;
|
|
423
|
+
background: transparent;
|
|
424
|
+
font: inherit;
|
|
425
|
+
color: inherit;
|
|
426
|
+
}
|
|
427
|
+
[data-code-theme] pre.th-code code { font: inherit; }`;
|
|
428
|
+
var messages = {
|
|
429
|
+
en: {
|
|
430
|
+
codeDescription: (language) => `${language} code`,
|
|
431
|
+
copy: "Copy",
|
|
432
|
+
copied: "Copied",
|
|
433
|
+
copyFailed: "Copy failed"
|
|
434
|
+
},
|
|
435
|
+
fr: {
|
|
436
|
+
codeDescription: (language) => `code ${language}`,
|
|
437
|
+
copy: "Copier",
|
|
438
|
+
copied: "Copié",
|
|
439
|
+
copyFailed: "Échec de la copie"
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
var codeBlockMessages = (locale = "en", translations) => ({
|
|
443
|
+
...locale.startsWith("fr") ? messages.fr : messages.en,
|
|
444
|
+
...translations?.[locale.split("-")[0] ?? locale],
|
|
445
|
+
...translations?.[locale]
|
|
446
|
+
});
|
|
447
|
+
var codeLanguage = (language = "text") => language.toLowerCase() || "text";
|
|
448
|
+
|
|
449
|
+
// ../../src/components/code-block/react.tsx
|
|
450
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
451
|
+
function CodeBlock({
|
|
452
|
+
classes: classOverrides,
|
|
453
|
+
code,
|
|
454
|
+
language = "text",
|
|
455
|
+
locale: localeOverride,
|
|
456
|
+
messages
|
|
457
|
+
}) {
|
|
458
|
+
const codeBlockClasses = resolveCodeBlockClasses(classOverrides);
|
|
459
|
+
const locale = useKrakstackLocale2(localeOverride);
|
|
460
|
+
const normalizedLanguage = codeLanguage(language);
|
|
461
|
+
const highlighted = highlight(code, { lang: normalizedLanguage });
|
|
462
|
+
const labels = codeBlockMessages(locale, messages);
|
|
463
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
464
|
+
className: codeBlockClasses.root,
|
|
465
|
+
"data-code-theme": true,
|
|
466
|
+
children: [
|
|
467
|
+
/* @__PURE__ */ jsx3("style", {
|
|
468
|
+
children: codeThemeCss
|
|
469
|
+
}),
|
|
470
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
471
|
+
className: codeBlockClasses.header,
|
|
472
|
+
children: [
|
|
473
|
+
/* @__PURE__ */ jsx3("span", {
|
|
474
|
+
className: codeBlockClasses.language,
|
|
475
|
+
children: highlighted.lang
|
|
476
|
+
}),
|
|
477
|
+
/* @__PURE__ */ jsx3(CopyButton, {
|
|
478
|
+
value: code,
|
|
479
|
+
valueDescription: labels.codeDescription(highlighted.lang),
|
|
480
|
+
variant: "ghost",
|
|
481
|
+
locale,
|
|
482
|
+
messages: { [locale]: labels }
|
|
483
|
+
})
|
|
484
|
+
]
|
|
485
|
+
}),
|
|
486
|
+
/* @__PURE__ */ jsx3("div", {
|
|
487
|
+
className: codeBlockClasses.viewport,
|
|
488
|
+
dangerouslySetInnerHTML: { __html: highlighted.html }
|
|
489
|
+
})
|
|
490
|
+
]
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
// ../../src/components/ui/tabs.tsx
|
|
494
|
+
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
495
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
496
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
497
|
+
function Tabs({
|
|
498
|
+
className,
|
|
499
|
+
orientation = "horizontal",
|
|
500
|
+
...props
|
|
501
|
+
}) {
|
|
502
|
+
return /* @__PURE__ */ jsx4(TabsPrimitive.Root, {
|
|
503
|
+
"data-slot": "tabs",
|
|
504
|
+
"data-orientation": orientation,
|
|
505
|
+
className: cn("group/tabs flex gap-2 data-horizontal:flex-col", className),
|
|
506
|
+
...props
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
var tabsListVariants = cva2("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
|
|
510
|
+
variants: {
|
|
511
|
+
variant: {
|
|
512
|
+
default: "bg-muted",
|
|
513
|
+
line: "gap-1 bg-transparent"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
defaultVariants: {
|
|
517
|
+
variant: "default"
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
function TabsList({
|
|
521
|
+
className,
|
|
522
|
+
variant = "default",
|
|
523
|
+
...props
|
|
524
|
+
}) {
|
|
525
|
+
return /* @__PURE__ */ jsx4(TabsPrimitive.List, {
|
|
526
|
+
"data-slot": "tabs-list",
|
|
527
|
+
"data-variant": variant,
|
|
528
|
+
className: cn(tabsListVariants({ variant }), className),
|
|
529
|
+
...props
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
function TabsTrigger({ className, ...props }) {
|
|
533
|
+
return /* @__PURE__ */ jsx4(TabsPrimitive.Tab, {
|
|
534
|
+
"data-slot": "tabs-trigger",
|
|
535
|
+
className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
|
|
536
|
+
...props
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
function TabsContent({ className, ...props }) {
|
|
540
|
+
return /* @__PURE__ */ jsx4(TabsPrimitive.Panel, {
|
|
541
|
+
"data-slot": "tabs-content",
|
|
542
|
+
className: cn("flex-1 text-sm outline-none", className),
|
|
543
|
+
...props
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// ../../src/components/registry-previews/component-example.tsx
|
|
548
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
549
|
+
var ComponentInstallation = ({
|
|
550
|
+
labels,
|
|
551
|
+
packageContent,
|
|
552
|
+
commandContent,
|
|
553
|
+
platformSelector,
|
|
554
|
+
tab,
|
|
555
|
+
onTabChange
|
|
556
|
+
}) => /* @__PURE__ */ jsxs3("section", {
|
|
557
|
+
className: "mb-12 grid min-w-0 scroll-mt-24 gap-4",
|
|
558
|
+
"aria-labelledby": "installation",
|
|
559
|
+
children: [
|
|
560
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
561
|
+
id: "installation",
|
|
562
|
+
className: "text-xl font-semibold tracking-tight",
|
|
563
|
+
children: labels.installation
|
|
564
|
+
}),
|
|
565
|
+
platformSelector,
|
|
566
|
+
/* @__PURE__ */ jsxs3(Tabs, {
|
|
567
|
+
className: "min-w-0",
|
|
568
|
+
...tab === undefined ? { defaultValue: "package" } : { value: tab },
|
|
569
|
+
onValueChange: (value) => {
|
|
570
|
+
if (value === "package" || value === "command")
|
|
571
|
+
onTabChange?.(value);
|
|
572
|
+
},
|
|
573
|
+
children: [
|
|
574
|
+
/* @__PURE__ */ jsxs3(TabsList, {
|
|
575
|
+
variant: "line",
|
|
576
|
+
"aria-label": labels.installation,
|
|
577
|
+
children: [
|
|
578
|
+
/* @__PURE__ */ jsx5(TabsTrigger, {
|
|
579
|
+
value: "package",
|
|
580
|
+
children: labels.package
|
|
581
|
+
}),
|
|
582
|
+
/* @__PURE__ */ jsx5(TabsTrigger, {
|
|
583
|
+
value: "command",
|
|
584
|
+
children: labels.command
|
|
585
|
+
})
|
|
586
|
+
]
|
|
587
|
+
}),
|
|
588
|
+
/* @__PURE__ */ jsx5(TabsContent, {
|
|
589
|
+
value: "package",
|
|
590
|
+
className: "grid gap-3",
|
|
591
|
+
children: packageContent
|
|
592
|
+
}),
|
|
593
|
+
/* @__PURE__ */ jsx5(TabsContent, {
|
|
594
|
+
value: "command",
|
|
595
|
+
className: "grid gap-3",
|
|
596
|
+
children: commandContent
|
|
597
|
+
})
|
|
598
|
+
]
|
|
599
|
+
})
|
|
600
|
+
]
|
|
601
|
+
});
|
|
602
|
+
var ComponentExample = ({
|
|
603
|
+
platforms,
|
|
604
|
+
platform,
|
|
605
|
+
onPlatformChange,
|
|
606
|
+
labels
|
|
607
|
+
}) => {
|
|
608
|
+
const selected = platforms.find(({ id }) => id === platform) ?? platforms[0];
|
|
609
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
610
|
+
className: "registry-example grid min-w-0 gap-8 sm:gap-10",
|
|
611
|
+
children: [
|
|
612
|
+
/* @__PURE__ */ jsx5("section", {
|
|
613
|
+
id: "preview",
|
|
614
|
+
className: "min-w-0 scroll-mt-24",
|
|
615
|
+
"aria-labelledby": "preview-heading",
|
|
616
|
+
children: /* @__PURE__ */ jsxs3(Tabs, {
|
|
617
|
+
className: "gap-3",
|
|
618
|
+
value: selected?.id,
|
|
619
|
+
onValueChange: (value) => {
|
|
620
|
+
const next = platforms.find(({ id }) => id === value);
|
|
621
|
+
if (next)
|
|
622
|
+
onPlatformChange(next.id);
|
|
623
|
+
},
|
|
624
|
+
children: [
|
|
625
|
+
/* @__PURE__ */ jsx5(TabsList, {
|
|
626
|
+
variant: "line",
|
|
627
|
+
className: "border-border mb-3 w-full justify-start border-b sm:mb-5",
|
|
628
|
+
"aria-label": labels.platform,
|
|
629
|
+
children: platforms.map(({ id, label }) => {
|
|
630
|
+
const Icon = id === "react" ? Atom : CodeXml;
|
|
631
|
+
return /* @__PURE__ */ jsxs3(TabsTrigger, {
|
|
632
|
+
value: id,
|
|
633
|
+
className: "flex-none",
|
|
634
|
+
children: [
|
|
635
|
+
/* @__PURE__ */ jsx5(Icon, {
|
|
636
|
+
className: "size-4",
|
|
637
|
+
"aria-hidden": "true",
|
|
638
|
+
"data-platform-icon": id
|
|
639
|
+
}),
|
|
640
|
+
label
|
|
641
|
+
]
|
|
642
|
+
}, id);
|
|
643
|
+
})
|
|
644
|
+
}),
|
|
645
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
646
|
+
id: "preview-heading",
|
|
647
|
+
className: "text-xl font-semibold tracking-tight",
|
|
648
|
+
children: labels.preview
|
|
649
|
+
}),
|
|
650
|
+
platforms.map(({ id, label, preview }) => /* @__PURE__ */ jsx5(TabsContent, {
|
|
651
|
+
value: id,
|
|
652
|
+
"aria-label": label,
|
|
653
|
+
className: "registry-example-preview bg-background rounded-lg border p-5 sm:p-8",
|
|
654
|
+
children: preview
|
|
655
|
+
}, id))
|
|
656
|
+
]
|
|
657
|
+
})
|
|
658
|
+
}),
|
|
659
|
+
/* @__PURE__ */ jsxs3("section", {
|
|
660
|
+
className: "grid min-w-0 gap-3",
|
|
661
|
+
children: [
|
|
662
|
+
/* @__PURE__ */ jsx5("h2", {
|
|
663
|
+
id: "usage",
|
|
664
|
+
className: "text-xl font-semibold tracking-tight",
|
|
665
|
+
children: labels.usage
|
|
666
|
+
}),
|
|
667
|
+
selected && /* @__PURE__ */ jsx5(CodeBlock, {
|
|
668
|
+
code: selected.usage,
|
|
669
|
+
language: selected.language
|
|
670
|
+
})
|
|
671
|
+
]
|
|
672
|
+
})
|
|
673
|
+
]
|
|
674
|
+
});
|
|
675
|
+
};
|
|
676
|
+
export {
|
|
677
|
+
ComponentExample,
|
|
678
|
+
ComponentInstallation
|
|
679
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Component, Renderer } from "effect/ui";
|
|
2
|
+
import { type Html } from "effect/ui/html";
|
|
3
|
+
export type RenderedHtmlPreview = {
|
|
4
|
+
html: string;
|
|
5
|
+
state: Renderer.State;
|
|
6
|
+
};
|
|
7
|
+
type MountPreview = (container: HTMLElement, signal: AbortSignal, state?: Renderer.State) => Promise<() => void>;
|
|
8
|
+
export declare const makeHtmlPreviewMount: <Name extends string, Props, Model, Msg>(preview: Component.Members<Name, Props, Model, Msg, never, never, Html.Elements>, props: Props) => MountPreview;
|
|
9
|
+
export declare const HtmlPreview: ({ mount, rendered, labels, }: {
|
|
10
|
+
mount: MountPreview;
|
|
11
|
+
rendered?: RenderedHtmlPreview | undefined;
|
|
12
|
+
labels: {
|
|
13
|
+
loading: string;
|
|
14
|
+
failed: string;
|
|
15
|
+
};
|
|
16
|
+
}) => import("react").JSX.Element;
|
|
17
|
+
export {};
|