@constructive-io/ui 0.4.1 → 0.6.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/LICENSE +21 -0
- package/README.md +17 -22
- package/dist/button-D4vqTxhp.d.cts +20 -0
- package/dist/button-D4vqTxhp.d.ts +20 -0
- package/dist/components/alert-dialog.cjs +129 -0
- package/dist/components/alert-dialog.cjs.map +1 -0
- package/dist/components/alert-dialog.d.cts +33 -0
- package/dist/components/alert-dialog.d.ts +23 -21
- package/dist/components/alert-dialog.js +98 -296
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.cjs +62 -0
- package/dist/components/alert.cjs.map +1 -0
- package/dist/components/alert.d.cts +19 -0
- package/dist/components/alert.d.ts +18 -13
- package/dist/components/alert.js +49 -31
- package/dist/components/alert.js.map +1 -1
- package/dist/components/app-bar.cjs +81 -0
- package/dist/components/app-bar.cjs.map +1 -0
- package/dist/components/app-bar.d.cts +27 -0
- package/dist/components/app-bar.d.ts +27 -0
- package/dist/components/app-bar.js +77 -0
- package/dist/components/app-bar.js.map +1 -0
- package/dist/components/app-shell.cjs +267 -0
- package/dist/components/app-shell.cjs.map +1 -0
- package/dist/components/app-shell.d.cts +98 -0
- package/dist/components/app-shell.d.ts +98 -0
- package/dist/components/app-shell.js +264 -0
- package/dist/components/app-shell.js.map +1 -0
- package/dist/components/autocomplete.cjs +167 -0
- package/dist/components/autocomplete.cjs.map +1 -0
- package/dist/components/autocomplete.d.cts +28 -0
- package/dist/components/autocomplete.d.ts +24 -24
- package/dist/components/autocomplete.js +146 -397
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.cjs +39 -0
- package/dist/components/avatar.cjs.map +1 -0
- package/dist/components/avatar.d.cts +13 -0
- package/dist/components/avatar.d.ts +11 -11
- package/dist/components/avatar.js +24 -27
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.cjs +48 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.d.cts +15 -0
- package/dist/components/badge.d.ts +13 -13
- package/dist/components/badge.js +39 -38
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.cjs +89 -0
- package/dist/components/breadcrumb.cjs.map +1 -0
- package/dist/components/breadcrumb.d.cts +15 -0
- package/dist/components/breadcrumb.d.ts +14 -13
- package/dist/components/breadcrumb.js +63 -137
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.cjs +75 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.d.cts +2 -0
- package/dist/components/button.d.ts +2 -17
- package/dist/components/button.js +66 -57
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar-rac.cjs +72 -0
- package/dist/components/calendar-rac.cjs.map +1 -0
- package/dist/components/calendar-rac.d.cts +13 -0
- package/dist/components/calendar-rac.d.ts +8 -8
- package/dist/components/calendar-rac.js +49 -61
- package/dist/components/calendar-rac.js.map +1 -1
- package/dist/components/card.cjs +86 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.d.cts +17 -0
- package/dist/components/card.d.ts +15 -17
- package/dist/components/card.js +58 -57
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox-group.cjs +19 -0
- package/dist/components/checkbox-group.cjs.map +1 -0
- package/dist/components/checkbox-group.d.cts +7 -0
- package/dist/components/checkbox-group.d.ts +5 -5
- package/dist/components/checkbox-group.js +12 -10
- package/dist/components/checkbox-group.js.map +1 -1
- package/dist/components/checkbox.cjs +67 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.d.cts +8 -0
- package/dist/components/checkbox.d.ts +6 -6
- package/dist/components/checkbox.js +58 -61
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.cjs +90 -0
- package/dist/components/collapsible.cjs.map +1 -0
- package/dist/components/collapsible.d.cts +45 -0
- package/dist/components/collapsible.d.ts +19 -28
- package/dist/components/collapsible.js +74 -112
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.cjs +257 -0
- package/dist/components/combobox.cjs.map +1 -0
- package/dist/components/combobox.d.cts +44 -0
- package/dist/components/combobox.d.ts +36 -36
- package/dist/components/combobox.js +229 -515
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.cjs +139 -0
- package/dist/components/command.cjs.map +1 -0
- package/dist/components/command.d.cts +24 -0
- package/dist/components/command.d.ts +22 -22
- package/dist/components/command.js +109 -240
- package/dist/components/command.js.map +1 -1
- package/dist/components/dialog.cjs +139 -0
- package/dist/components/dialog.cjs.map +1 -0
- package/dist/components/dialog.d.cts +31 -0
- package/dist/components/dialog.d.ts +27 -31
- package/dist/components/dialog.js +112 -429
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dock.cjs +90 -0
- package/dist/components/dock.cjs.map +1 -0
- package/dist/components/dock.d.cts +30 -0
- package/dist/components/dock.d.ts +25 -26
- package/dist/components/dock.js +78 -104
- package/dist/components/dock.js.map +1 -1
- package/dist/components/drawer.cjs +115 -0
- package/dist/components/drawer.cjs.map +1 -0
- package/dist/components/drawer.d.cts +16 -0
- package/dist/components/drawer.d.ts +15 -15
- package/dist/components/drawer.js +77 -121
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.cjs +217 -0
- package/dist/components/dropdown-menu.cjs.map +1 -0
- package/dist/components/dropdown-menu.d.cts +53 -0
- package/dist/components/dropdown-menu.d.ts +49 -46
- package/dist/components/dropdown-menu.js +177 -357
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.cjs +72 -0
- package/dist/components/empty.cjs.map +1 -0
- package/dist/components/empty.d.cts +15 -0
- package/dist/components/empty.d.ts +15 -0
- package/dist/components/empty.js +64 -0
- package/dist/components/empty.js.map +1 -0
- package/dist/components/field.cjs +186 -0
- package/dist/components/field.cjs.map +1 -0
- package/dist/components/field.d.cts +46 -0
- package/dist/components/field.d.ts +44 -49
- package/dist/components/field.js +166 -108
- package/dist/components/field.js.map +1 -1
- package/dist/components/flickering-grid.cjs +153 -0
- package/dist/components/flickering-grid.cjs.map +1 -0
- package/dist/components/flickering-grid.d.cts +16 -0
- package/dist/components/flickering-grid.d.ts +14 -13
- package/dist/components/flickering-grid.js +144 -141
- package/dist/components/flickering-grid.js.map +1 -1
- package/dist/components/flow-zoom-panel.cjs +62 -0
- package/dist/components/flow-zoom-panel.cjs.map +1 -0
- package/dist/components/flow-zoom-panel.d.cts +12 -0
- package/dist/components/flow-zoom-panel.d.ts +12 -0
- package/dist/components/flow-zoom-panel.js +61 -0
- package/dist/components/flow-zoom-panel.js.map +1 -0
- package/dist/components/form-control.cjs +65 -0
- package/dist/components/form-control.cjs.map +1 -0
- package/dist/components/form-control.d.cts +15 -0
- package/dist/components/form-control.d.ts +11 -11
- package/dist/components/form-control.js +56 -167
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/form.cjs +102 -0
- package/dist/components/form.cjs.map +1 -0
- package/dist/components/form.d.cts +2 -0
- package/dist/components/form.d.ts +2 -37
- package/dist/components/form.js +76 -163
- package/dist/components/form.js.map +1 -1
- package/dist/components/input-group.cjs +70 -0
- package/dist/components/input-group.cjs.map +1 -0
- package/dist/components/input-group.d.cts +16 -0
- package/dist/components/input-group.d.ts +14 -16
- package/dist/components/input-group.js +51 -163
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input.cjs +37 -0
- package/dist/components/input.cjs.map +1 -0
- package/dist/components/input.d.cts +2 -0
- package/dist/components/input.d.ts +2 -11
- package/dist/components/input.js +30 -54
- package/dist/components/input.js.map +1 -1
- package/dist/components/json-input.cjs +147 -0
- package/dist/components/json-input.cjs.map +1 -0
- package/dist/components/json-input.d.cts +26 -0
- package/dist/components/json-input.d.ts +20 -19
- package/dist/components/json-input.js +132 -340
- package/dist/components/json-input.js.map +1 -1
- package/dist/components/label.cjs +27 -0
- package/dist/components/label.cjs.map +1 -0
- package/dist/components/label.d.cts +11 -0
- package/dist/components/label.d.ts +6 -6
- package/dist/components/label.js +17 -20
- package/dist/components/label.js.map +1 -1
- package/dist/components/motion-grid.cjs +68 -0
- package/dist/components/motion-grid.cjs.map +1 -0
- package/dist/components/motion-grid.d.cts +20 -0
- package/dist/components/motion-grid.d.ts +15 -15
- package/dist/components/motion-grid.js +59 -75
- package/dist/components/motion-grid.js.map +1 -1
- package/dist/components/multi-select.cjs +573 -0
- package/dist/components/multi-select.cjs.map +1 -0
- package/dist/components/multi-select.d.cts +198 -0
- package/dist/components/multi-select.d.ts +173 -173
- package/dist/components/multi-select.js +562 -874
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/page-header.cjs +30 -0
- package/dist/components/page-header.cjs.map +1 -0
- package/dist/components/page-header.d.cts +17 -0
- package/dist/components/page-header.d.ts +11 -11
- package/dist/components/page-header.js +23 -11
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/pagination.cjs +95 -0
- package/dist/components/pagination.cjs.map +1 -0
- package/dist/components/pagination.d.cts +17 -0
- package/dist/components/pagination.d.ts +15 -17
- package/dist/components/pagination.js +70 -128
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.cjs +97 -0
- package/dist/components/popover.cjs.map +1 -0
- package/dist/components/popover.d.cts +40 -0
- package/dist/components/popover.d.ts +33 -28
- package/dist/components/popover.js +78 -178
- package/dist/components/popover.js.map +1 -1
- package/dist/components/portal.cjs +156 -0
- package/dist/components/portal.cjs.map +1 -0
- package/dist/components/portal.d.cts +118 -0
- package/dist/components/portal.d.ts +33 -23
- package/dist/components/portal.js +128 -57
- package/dist/components/portal.js.map +1 -1
- package/dist/components/progress.cjs +30 -0
- package/dist/components/progress.cjs.map +1 -0
- package/dist/components/progress.d.cts +10 -0
- package/dist/components/progress.d.ts +8 -8
- package/dist/components/progress.js +21 -24
- package/dist/components/progress.js.map +1 -1
- package/dist/components/progressive-blur-scroll-container.cjs +76 -0
- package/dist/components/progressive-blur-scroll-container.cjs.map +1 -0
- package/dist/components/progressive-blur-scroll-container.d.cts +25 -0
- package/dist/components/progressive-blur-scroll-container.d.ts +19 -19
- package/dist/components/progressive-blur-scroll-container.js +70 -137
- package/dist/components/progressive-blur-scroll-container.js.map +1 -1
- package/dist/components/progressive-blur.cjs +46 -0
- package/dist/components/progressive-blur.cjs.map +1 -0
- package/dist/components/progressive-blur.d.cts +17 -0
- package/dist/components/progressive-blur.d.ts +15 -14
- package/dist/components/progressive-blur.js +38 -63
- package/dist/components/progressive-blur.js.map +1 -1
- package/dist/components/radio-group.cjs +38 -0
- package/dist/components/radio-group.cjs.map +1 -0
- package/dist/components/radio-group.d.cts +10 -0
- package/dist/components/radio-group.d.ts +8 -8
- package/dist/components/radio-group.js +28 -30
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/record-picker.cjs +8 -0
- package/dist/components/record-picker.d.cts +16 -0
- package/dist/components/record-picker.d.ts +13 -13
- package/dist/components/record-picker.js +5 -364
- package/dist/components/resizable.cjs +50 -0
- package/dist/components/resizable.cjs.map +1 -0
- package/dist/components/resizable.d.cts +11 -0
- package/dist/components/resizable.d.ts +10 -10
- package/dist/components/resizable.js +29 -37
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/responsive-diagram.cjs +56 -0
- package/dist/components/responsive-diagram.cjs.map +1 -0
- package/dist/components/responsive-diagram.d.cts +10 -0
- package/dist/components/responsive-diagram.d.ts +7 -7
- package/dist/components/responsive-diagram.js +50 -60
- package/dist/components/responsive-diagram.js.map +1 -1
- package/dist/components/scroll-area.cjs +46 -0
- package/dist/components/scroll-area.cjs.map +1 -0
- package/dist/components/scroll-area.d.cts +12 -0
- package/dist/components/scroll-area.d.ts +11 -11
- package/dist/components/scroll-area.js +35 -62
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/select.cjs +204 -0
- package/dist/components/select.cjs.map +1 -0
- package/dist/components/select.d.cts +47 -0
- package/dist/components/select.d.ts +38 -38
- package/dist/components/select.js +172 -269
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.cjs +23 -0
- package/dist/components/separator.cjs.map +1 -0
- package/dist/components/separator.d.cts +2 -0
- package/dist/components/separator.d.ts +2 -11
- package/dist/components/separator.js +14 -18
- package/dist/components/separator.js.map +1 -1
- package/dist/components/sheet.cjs +19 -0
- package/dist/components/sheet.d.cts +107 -0
- package/dist/components/sheet.d.ts +85 -90
- package/dist/components/sheet.js +3 -598
- package/dist/components/sidebar.cjs +29 -0
- package/dist/components/sidebar.d.cts +67 -0
- package/dist/components/sidebar.d.ts +63 -73
- package/dist/components/sidebar.js +3 -1215
- package/dist/components/skeleton.cjs +24 -0
- package/dist/components/skeleton.cjs.map +1 -0
- package/dist/components/skeleton.d.cts +11 -0
- package/dist/components/skeleton.d.ts +10 -6
- package/dist/components/skeleton.js +15 -10
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/sonner.cjs +23 -0
- package/dist/components/sonner.cjs.map +1 -0
- package/dist/components/sonner.d.cts +10 -0
- package/dist/components/sonner.d.ts +7 -7
- package/dist/components/sonner.js +17 -18
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/stack/index.cjs +44 -0
- package/dist/components/stack/index.d.cts +2 -0
- package/dist/components/stack/index.d.ts +2 -674
- package/dist/components/stack/index.js +3 -1444
- package/dist/components/stepper.cjs +160 -0
- package/dist/components/stepper.cjs.map +1 -0
- package/dist/components/stepper.d.cts +32 -0
- package/dist/components/stepper.d.ts +27 -25
- package/dist/components/stepper.js +133 -261
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.cjs +35 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.d.cts +8 -0
- package/dist/components/switch.d.ts +7 -7
- package/dist/components/switch.js +26 -34
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.cjs +85 -0
- package/dist/components/table.cjs.map +1 -0
- package/dist/components/table.d.cts +23 -0
- package/dist/components/table.d.ts +23 -15
- package/dist/components/table.js +56 -46
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.cjs +49 -0
- package/dist/components/tabs.cjs.map +1 -0
- package/dist/components/tabs.d.cts +10 -0
- package/dist/components/tabs.d.ts +9 -9
- package/dist/components/tabs.js +31 -36
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tags.cjs +132 -0
- package/dist/components/tags.cjs.map +1 -0
- package/dist/components/tags.d.cts +36 -0
- package/dist/components/tags.d.ts +24 -28
- package/dist/components/tags.js +114 -438
- package/dist/components/tags.js.map +1 -1
- package/dist/components/textarea.cjs +34 -0
- package/dist/components/textarea.cjs.map +1 -0
- package/dist/components/textarea.d.cts +10 -0
- package/dist/components/textarea.d.ts +8 -8
- package/dist/components/textarea.js +27 -48
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toast/index.cjs +9 -0
- package/dist/components/toast/index.d.cts +2 -0
- package/dist/components/toast/index.d.ts +2 -52
- package/dist/components/toast/index.js +3 -623
- package/dist/components/tooltip.cjs +67 -0
- package/dist/components/tooltip.cjs.map +1 -0
- package/dist/components/tooltip.d.cts +2 -0
- package/dist/components/tooltip.d.ts +2 -29
- package/dist/components/tooltip.js +53 -166
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unlink-button.cjs +24 -0
- package/dist/components/unlink-button.cjs.map +1 -0
- package/dist/components/unlink-button.d.cts +14 -0
- package/dist/components/unlink-button.d.ts +11 -11
- package/dist/components/unlink-button.js +18 -86
- package/dist/components/unlink-button.js.map +1 -1
- package/dist/form-DgRTv7O7.d.ts +54 -0
- package/dist/form-DoZEWSzb.d.cts +54 -0
- package/dist/index-CjA4CENl.d.cts +684 -0
- package/dist/index-CjA4CENl.d.ts +684 -0
- package/dist/index-UnM04j0t.d.cts +58 -0
- package/dist/index-UnM04j0t.d.ts +58 -0
- package/dist/index.cjs +408 -9346
- package/dist/index.d.cts +224 -2548
- package/dist/index.d.ts +224 -2548
- package/dist/index.js +65 -9022
- package/dist/input-CBrCuMH8.d.cts +11 -0
- package/dist/input-CBrCuMH8.d.ts +11 -0
- package/dist/motion-config-COCFHq1L.cjs +271 -0
- package/dist/motion-config-COCFHq1L.cjs.map +1 -0
- package/dist/motion-config-COsZ6azM.js +241 -0
- package/dist/motion-config-COsZ6azM.js.map +1 -0
- package/dist/record-picker-BbxngCeV.js +162 -0
- package/dist/record-picker-BbxngCeV.js.map +1 -0
- package/dist/record-picker-Bz4FApxD.cjs +167 -0
- package/dist/record-picker-Bz4FApxD.cjs.map +1 -0
- package/dist/rolldown-runtime-D_qnwXdH.cjs +35 -0
- package/dist/separator-BQEsr0Rc.d.cts +11 -0
- package/dist/separator-BQEsr0Rc.d.ts +11 -0
- package/dist/sheet-BLHnhLRH.js +425 -0
- package/dist/sheet-BLHnhLRH.js.map +1 -0
- package/dist/sheet-BdA0rfIz.cjs +515 -0
- package/dist/sheet-BdA0rfIz.cjs.map +1 -0
- package/dist/sidebar-CPy_fibW.cjs +608 -0
- package/dist/sidebar-CPy_fibW.cjs.map +1 -0
- package/dist/sidebar-Cfax0g0_.js +463 -0
- package/dist/sidebar-Cfax0g0_.js.map +1 -0
- package/dist/slot-C-jEfihz.cjs +122 -0
- package/dist/slot-C-jEfihz.cjs.map +1 -0
- package/dist/slot-EL8zfLG0.js +97 -0
- package/dist/slot-EL8zfLG0.js.map +1 -0
- package/dist/stack-DKdvlOM6.cjs +1771 -0
- package/dist/stack-DKdvlOM6.cjs.map +1 -0
- package/dist/stack-jMdxDrex.js +1531 -0
- package/dist/stack-jMdxDrex.js.map +1 -0
- package/dist/toast-D6MqijT2.cjs +316 -0
- package/dist/toast-D6MqijT2.cjs.map +1 -0
- package/dist/toast-D_BOLzm3.js +287 -0
- package/dist/toast-D_BOLzm3.js.map +1 -0
- package/dist/tooltip-CTRQoN1A.d.cts +29 -0
- package/dist/tooltip-CTRQoN1A.d.ts +29 -0
- package/dist/utils-BkMLyah9.js +12 -0
- package/dist/utils-BkMLyah9.js.map +1 -0
- package/dist/utils-CzTQ3-VI.cjs +17 -0
- package/dist/utils-CzTQ3-VI.cjs.map +1 -0
- package/package.json +288 -47
- package/src/styles/globals.css +155 -203
- package/dist/components/org-chart/index.d.ts +0 -54
- package/dist/components/org-chart/index.js +0 -861
- package/dist/components/org-chart/index.js.map +0 -1
- package/dist/components/record-picker.js.map +0 -1
- package/dist/components/sheet.js.map +0 -1
- package/dist/components/sidebar.js.map +0 -1
- package/dist/components/stack/index.js.map +0 -1
- package/dist/components/toast/index.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
const require_rolldown_runtime = require('../rolldown-runtime-D_qnwXdH.cjs');
|
|
5
|
+
const require_utils = require('../utils-CzTQ3-VI.cjs');
|
|
6
|
+
const require_components_button = require('./button.cjs');
|
|
7
|
+
const require_components_tooltip = require('./tooltip.cjs');
|
|
8
|
+
let react = require("react");
|
|
9
|
+
react = require_rolldown_runtime.__toESM(react, 1);
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
let lucide_react = require("lucide-react");
|
|
12
|
+
|
|
13
|
+
//#region src/components/json-input.tsx
|
|
14
|
+
const AceEditor = react.lazy(async () => {
|
|
15
|
+
const ace = await import("react-ace");
|
|
16
|
+
await import("ace-builds/src-noconflict/mode-json");
|
|
17
|
+
await import("ace-builds/src-noconflict/theme-textmate");
|
|
18
|
+
await import("ace-builds/src-noconflict/theme-cloud9_night");
|
|
19
|
+
return ace;
|
|
20
|
+
});
|
|
21
|
+
const EditorLoading = () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
22
|
+
className: "flex h-32 items-center justify-center",
|
|
23
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Loader2, { className: "h-6 w-6 animate-spin" })
|
|
24
|
+
});
|
|
25
|
+
const displayJsonState = (jsonState) => {
|
|
26
|
+
return {
|
|
27
|
+
loading: {
|
|
28
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Loader2, { className: "text-muted-foreground size-[18px] animate-spin" }),
|
|
29
|
+
text: "Checking JSON Format...",
|
|
30
|
+
className: "text-muted-foreground"
|
|
31
|
+
},
|
|
32
|
+
success: {
|
|
33
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckCircle2, { className: "size-[18px] text-green-600" }),
|
|
34
|
+
text: "Valid JSON Format",
|
|
35
|
+
className: "text-foreground"
|
|
36
|
+
},
|
|
37
|
+
error: {
|
|
38
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleAlert, { className: "text-destructive size-[18px]" }),
|
|
39
|
+
text: jsonState.errMsg || "Invalid JSON Format",
|
|
40
|
+
className: "text-destructive"
|
|
41
|
+
},
|
|
42
|
+
empty: {}
|
|
43
|
+
}[jsonState.state];
|
|
44
|
+
};
|
|
45
|
+
const JsonInput = ({ value = "", setValue, minLines = 16, className, theme = "light" }) => {
|
|
46
|
+
const [jsonState, setJsonState] = (0, react.useState)({ state: "empty" });
|
|
47
|
+
const handleChange = (val) => {
|
|
48
|
+
setJsonState({ state: "loading" });
|
|
49
|
+
setValue(val);
|
|
50
|
+
};
|
|
51
|
+
(0, react.useEffect)(() => {
|
|
52
|
+
const timeoutId = setTimeout(() => {
|
|
53
|
+
const error = validateJson(value);
|
|
54
|
+
if (value.trim().length === 0) setJsonState({ state: "empty" });
|
|
55
|
+
else if (error) setJsonState({
|
|
56
|
+
state: "error",
|
|
57
|
+
errMsg: error
|
|
58
|
+
});
|
|
59
|
+
else setJsonState({ state: "success" });
|
|
60
|
+
}, 400);
|
|
61
|
+
return () => clearTimeout(timeoutId);
|
|
62
|
+
}, [value]);
|
|
63
|
+
const { icon, text, className: textClassName } = displayJsonState(jsonState);
|
|
64
|
+
const isValidJson = validateJson(value) === null;
|
|
65
|
+
const lines = (0, react.useMemo)(() => {
|
|
66
|
+
return Math.max(countJsonLines(value), minLines);
|
|
67
|
+
}, [value, minLines]);
|
|
68
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
69
|
+
className: require_utils.cn("border-border/60 relative overflow-y-auto rounded-md border p-2.5", className),
|
|
70
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(JsonEditor, {
|
|
71
|
+
value,
|
|
72
|
+
setValue: handleChange,
|
|
73
|
+
lines,
|
|
74
|
+
theme
|
|
75
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_tooltip.TooltipProvider, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_tooltip.Tooltip, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_tooltip.TooltipTrigger, {
|
|
76
|
+
asChild: true,
|
|
77
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_button.Button, {
|
|
78
|
+
className: "absolute top-2 right-2 size-8 rounded-xl",
|
|
79
|
+
size: "icon",
|
|
80
|
+
variant: "outline",
|
|
81
|
+
type: "button",
|
|
82
|
+
disabled: !isValidJson,
|
|
83
|
+
onClick: () => setValue(prettifyJson(value)),
|
|
84
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.WandSparkles, { className: "text-muted-foreground size-4" })
|
|
85
|
+
})
|
|
86
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_tooltip.TooltipContent, { children: "Format JSON" })] }) })]
|
|
87
|
+
}), jsonState.state !== "empty" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
88
|
+
className: "mt-2 flex items-center gap-2",
|
|
89
|
+
children: [icon, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
90
|
+
className: require_utils.cn("text-sm", textClassName),
|
|
91
|
+
children: text
|
|
92
|
+
})]
|
|
93
|
+
})] });
|
|
94
|
+
};
|
|
95
|
+
const JsonEditor = ({ value, setValue, lines, readOnly = false, isValid = true, enableFolding = false, theme = "light" }) => {
|
|
96
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
|
|
97
|
+
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EditorLoading, {}),
|
|
98
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AceEditor, {
|
|
99
|
+
mode: "json",
|
|
100
|
+
theme: theme === "light" ? "textmate" : "cloud9_night",
|
|
101
|
+
fontSize: "14px",
|
|
102
|
+
readOnly,
|
|
103
|
+
style: {
|
|
104
|
+
width: "100%",
|
|
105
|
+
background: "transparent",
|
|
106
|
+
offset: 0
|
|
107
|
+
},
|
|
108
|
+
setOptions: {
|
|
109
|
+
useWorker: false,
|
|
110
|
+
printMargin: false,
|
|
111
|
+
showFoldWidgets: enableFolding,
|
|
112
|
+
foldStyle: "markbegin"
|
|
113
|
+
},
|
|
114
|
+
tabSize: 2,
|
|
115
|
+
wrapEnabled: readOnly && !isValid,
|
|
116
|
+
showGutter: enableFolding,
|
|
117
|
+
minLines: lines,
|
|
118
|
+
maxLines: lines,
|
|
119
|
+
highlightActiveLine: !readOnly,
|
|
120
|
+
value,
|
|
121
|
+
onChange: setValue
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const validateJson = (text) => {
|
|
126
|
+
try {
|
|
127
|
+
if (text.trim().length === 0) throw new SyntaxError(`Can't use empty string`);
|
|
128
|
+
JSON.parse(text);
|
|
129
|
+
return null;
|
|
130
|
+
} catch (error) {
|
|
131
|
+
return error.message;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const prettifyJson = (text) => {
|
|
135
|
+
try {
|
|
136
|
+
return JSON.stringify(JSON.parse(text), null, 2);
|
|
137
|
+
} catch {
|
|
138
|
+
return text;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
const countJsonLines = (text) => text.split(/\n/).length;
|
|
142
|
+
|
|
143
|
+
//#endregion
|
|
144
|
+
exports.JsonEditor = JsonEditor;
|
|
145
|
+
exports.JsonInput = JsonInput;
|
|
146
|
+
exports.validateJson = validateJson;
|
|
147
|
+
//# sourceMappingURL=json-input.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-input.cjs","names":["React","Loader2","CheckCircle2","CircleAlert","cn","TooltipProvider","Tooltip","TooltipTrigger","Button","WandSparkles","TooltipContent","Suspense"],"sources":["../../src/components/json-input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useEffect, useMemo, useState, Suspense } from 'react';\nimport { CheckCircle2, CircleAlert, Loader2, WandSparkles } from 'lucide-react';\nimport type { IAceEditorProps } from 'react-ace';\n\nimport { cn } from '../lib/utils';\n\nimport { Button } from './button';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip';\n\n// Lazy load AceEditor\nconst AceEditor = React.lazy(async () => {\n\tconst ace = await import('react-ace');\n\tawait import('ace-builds/src-noconflict/mode-json');\n\tawait import('ace-builds/src-noconflict/theme-textmate');\n\tawait import('ace-builds/src-noconflict/theme-cloud9_night');\n\treturn ace;\n});\n\nconst EditorLoading = () => (\n\t<div className=\"flex h-32 items-center justify-center\">\n\t\t<Loader2 className=\"h-6 w-6 animate-spin\" />\n\t</div>\n);\n\ntype JsonDisplay = {\n\ticon?: React.ReactNode;\n\ttext?: string;\n\tclassName?: string;\n};\n\ninterface JsonState {\n\tstate: 'empty' | 'loading' | 'success' | 'error';\n\terrMsg?: string;\n}\n\nconst displayJsonState = (jsonState: JsonState) => {\n\tconst jsonStateMap: Record<JsonState['state'], JsonDisplay> = {\n\t\tloading: {\n\t\t\ticon: <Loader2 className=\"text-muted-foreground size-[18px] animate-spin\" />,\n\t\t\ttext: 'Checking JSON Format...',\n\t\t\tclassName: 'text-muted-foreground',\n\t\t},\n\n\t\tsuccess: {\n\t\t\ticon: <CheckCircle2 className=\"size-[18px] text-green-600\" />,\n\t\t\ttext: 'Valid JSON Format',\n\t\t\tclassName: 'text-foreground',\n\t\t},\n\n\t\terror: {\n\t\t\ticon: <CircleAlert className=\"text-destructive size-[18px]\" />,\n\t\t\ttext: jsonState.errMsg || 'Invalid JSON Format',\n\t\t\tclassName: 'text-destructive',\n\t\t},\n\n\t\tempty: {},\n\t};\n\n\treturn jsonStateMap[jsonState.state];\n};\n\ntype JsonInputProps = {\n\tvalue: string;\n\tsetValue: (value: string) => void;\n\tminLines?: number;\n\tclassName?: string;\n\t/** Theme for the editor: 'light' or 'dark'. Defaults to 'light'. */\n\ttheme?: 'light' | 'dark';\n};\n\nexport const JsonInput = ({ value = '', setValue, minLines = 16, className, theme = 'light' }: JsonInputProps) => {\n\tconst [jsonState, setJsonState] = useState<JsonState>({ state: 'empty' });\n\n\tconst handleChange = (val: string) => {\n\t\tsetJsonState({ state: 'loading' });\n\t\tsetValue(val);\n\t};\n\n\tuseEffect(() => {\n\t\tconst timeoutId = setTimeout(() => {\n\t\t\tconst error = validateJson(value);\n\n\t\t\tif (value.trim().length === 0) setJsonState({ state: 'empty' });\n\t\t\telse if (error) setJsonState({ state: 'error', errMsg: error });\n\t\t\telse setJsonState({ state: 'success' });\n\t\t}, 400);\n\n\t\treturn () => clearTimeout(timeoutId);\n\t}, [value]);\n\n\tconst { icon, text, className: textClassName } = displayJsonState(jsonState);\n\tconst isValidJson = validateJson(value) === null;\n\n\tconst lines = useMemo(() => {\n\t\treturn Math.max(countJsonLines(value), minLines);\n\t}, [value, minLines]);\n\n\treturn (\n\t\t<div>\n\t\t\t<div className={cn('border-border/60 relative overflow-y-auto rounded-md border p-2.5', className)}>\n\t\t\t\t<JsonEditor value={value} setValue={handleChange} lines={lines} theme={theme} />\n\t\t\t\t<TooltipProvider>\n\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"absolute top-2 right-2 size-8 rounded-xl\"\n\t\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tdisabled={!isValidJson}\n\t\t\t\t\t\t\t\tonClick={() => setValue(prettifyJson(value))}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<WandSparkles className=\"text-muted-foreground size-4\" />\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t<TooltipContent>Format JSON</TooltipContent>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t</TooltipProvider>\n\t\t\t</div>\n\t\t\t{jsonState.state !== 'empty' && (\n\t\t\t\t<div className=\"mt-2 flex items-center gap-2\">\n\t\t\t\t\t{icon}\n\t\t\t\t\t<span className={cn('text-sm', textClassName)}>{text}</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\ntype JsonEditorProps = {\n\tvalue: string;\n\tlines: number;\n\tsetValue?: (value: string) => void;\n\treadOnly?: boolean;\n\tisValid?: boolean;\n\tenableFolding?: boolean;\n\t/** Theme for the editor: 'light' or 'dark'. Defaults to 'light'. */\n\ttheme?: 'light' | 'dark';\n};\n\nexport const JsonEditor = ({\n\tvalue,\n\tsetValue,\n\tlines,\n\treadOnly = false,\n\tisValid = true,\n\tenableFolding = false,\n\ttheme = 'light',\n}: JsonEditorProps) => {\n\tconst editorProps: IAceEditorProps = {\n\t\tmode: 'json',\n\t\ttheme: theme === 'light' ? 'textmate' : 'cloud9_night',\n\t\tfontSize: '14px',\n\t\treadOnly,\n\t\tstyle: {\n\t\t\twidth: '100%',\n\t\t\tbackground: 'transparent',\n\t\t\toffset: 0,\n\t\t},\n\t\tsetOptions: {\n\t\t\tuseWorker: false,\n\t\t\tprintMargin: false,\n\t\t\tshowFoldWidgets: enableFolding,\n\t\t\tfoldStyle: 'markbegin',\n\t\t},\n\t\ttabSize: 2,\n\t\twrapEnabled: readOnly && !isValid,\n\t\tshowGutter: enableFolding,\n\t\tminLines: lines,\n\t\tmaxLines: lines,\n\t\thighlightActiveLine: !readOnly,\n\t\tvalue,\n\t\tonChange: setValue,\n\t};\n\n\treturn (\n\t\t<Suspense fallback={<EditorLoading />}>\n\t\t\t<AceEditor {...editorProps} />\n\t\t</Suspense>\n\t);\n};\n\nexport const validateJson = (text: string) => {\n\ttry {\n\t\tif (text.trim().length === 0) throw new SyntaxError(`Can't use empty string`);\n\t\tJSON.parse(text);\n\t\treturn null;\n\t} catch (error) {\n\t\treturn (error as SyntaxError).message;\n\t}\n};\n\nconst prettifyJson = (text: string) => {\n\ttry {\n\t\treturn JSON.stringify(JSON.parse(text), null, 2);\n\t} catch {\n\t\treturn text;\n\t}\n};\n\nconst countJsonLines = (text: string) => text.split(/\\n/).length;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
//#region src/components/json-input.d.ts
|
|
3
|
+
type JsonInputProps = {
|
|
4
|
+
value: string;
|
|
5
|
+
setValue: (value: string) => void;
|
|
6
|
+
minLines?: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Theme for the editor: 'light' or 'dark'. Defaults to 'light'. */
|
|
9
|
+
theme?: 'light' | 'dark';
|
|
10
|
+
};
|
|
11
|
+
declare const JsonInput: ({ value, setValue, minLines, className, theme }: JsonInputProps) => React$1.JSX.Element;
|
|
12
|
+
type JsonEditorProps = {
|
|
13
|
+
value: string;
|
|
14
|
+
lines: number;
|
|
15
|
+
setValue?: (value: string) => void;
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
isValid?: boolean;
|
|
18
|
+
enableFolding?: boolean;
|
|
19
|
+
/** Theme for the editor: 'light' or 'dark'. Defaults to 'light'. */
|
|
20
|
+
theme?: 'light' | 'dark';
|
|
21
|
+
};
|
|
22
|
+
declare const JsonEditor: ({ value, setValue, lines, readOnly, isValid, enableFolding, theme }: JsonEditorProps) => React$1.JSX.Element;
|
|
23
|
+
declare const validateJson: (text: string) => string | null;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { JsonEditor, JsonInput, validateJson };
|
|
26
|
+
//# sourceMappingURL=json-input.d.cts.map
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
//#region src/components/json-input.d.ts
|
|
3
3
|
type JsonInputProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
value: string;
|
|
5
|
+
setValue: (value: string) => void;
|
|
6
|
+
minLines?: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Theme for the editor: 'light' or 'dark'. Defaults to 'light'. */
|
|
9
|
+
theme?: 'light' | 'dark';
|
|
10
10
|
};
|
|
11
|
-
declare const JsonInput: ({ value, setValue, minLines, className, theme }: JsonInputProps) =>
|
|
11
|
+
declare const JsonInput: ({ value, setValue, minLines, className, theme }: JsonInputProps) => React$1.JSX.Element;
|
|
12
12
|
type JsonEditorProps = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
value: string;
|
|
14
|
+
lines: number;
|
|
15
|
+
setValue?: (value: string) => void;
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
isValid?: boolean;
|
|
18
|
+
enableFolding?: boolean;
|
|
19
|
+
/** Theme for the editor: 'light' or 'dark'. Defaults to 'light'. */
|
|
20
|
+
theme?: 'light' | 'dark';
|
|
21
21
|
};
|
|
22
|
-
declare const JsonEditor: ({ value, setValue, lines, readOnly, isValid, enableFolding, theme
|
|
22
|
+
declare const JsonEditor: ({ value, setValue, lines, readOnly, isValid, enableFolding, theme }: JsonEditorProps) => React$1.JSX.Element;
|
|
23
23
|
declare const validateJson: (text: string) => string | null;
|
|
24
|
-
|
|
24
|
+
//#endregion
|
|
25
25
|
export { JsonEditor, JsonInput, validateJson };
|
|
26
|
+
//# sourceMappingURL=json-input.d.ts.map
|