@rangka/client 0.0.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/.claude/skills/add-widget/SKILL.md +101 -0
- package/.turbo/turbo-build.log +29 -0
- package/CLAUDE.md +236 -0
- package/LICENSE +21 -0
- package/README.md +68 -0
- package/components.json +25 -0
- package/dist/App.d.ts +2 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +24 -0
- package/dist/App.js.map +1 -0
- package/dist/api/auth.d.ts +12 -0
- package/dist/api/auth.d.ts.map +1 -0
- package/dist/api/auth.js +25 -0
- package/dist/api/auth.js.map +1 -0
- package/dist/api/boot.d.ts +3 -0
- package/dist/api/boot.d.ts.map +1 -0
- package/dist/api/boot.js +9 -0
- package/dist/api/boot.js.map +1 -0
- package/dist/api/client.d.ts +2 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +22 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/paths.d.ts +2 -0
- package/dist/api/paths.d.ts.map +1 -0
- package/dist/api/paths.js +4 -0
- package/dist/api/paths.js.map +1 -0
- package/dist/api/token.d.ts +4 -0
- package/dist/api/token.d.ts.map +1 -0
- package/dist/api/token.js +11 -0
- package/dist/api/token.js.map +1 -0
- package/dist/auth/LoginForm.d.ts +11 -0
- package/dist/auth/LoginForm.d.ts.map +1 -0
- package/dist/auth/LoginForm.js +17 -0
- package/dist/auth/LoginForm.js.map +1 -0
- package/dist/auth/SessionExpired.d.ts +5 -0
- package/dist/auth/SessionExpired.d.ts.map +1 -0
- package/dist/auth/SessionExpired.js +7 -0
- package/dist/auth/SessionExpired.js.map +1 -0
- package/dist/auth/SetupForm.d.ts +11 -0
- package/dist/auth/SetupForm.d.ts.map +1 -0
- package/dist/auth/SetupForm.js +17 -0
- package/dist/auth/SetupForm.js.map +1 -0
- package/dist/boot/BootGate.d.ts +5 -0
- package/dist/boot/BootGate.d.ts.map +1 -0
- package/dist/boot/BootGate.js +25 -0
- package/dist/boot/BootGate.js.map +1 -0
- package/dist/boot/BootProvider.d.ts +17 -0
- package/dist/boot/BootProvider.d.ts.map +1 -0
- package/dist/boot/BootProvider.js +16 -0
- package/dist/boot/BootProvider.js.map +1 -0
- package/dist/boot/types.d.ts +18 -0
- package/dist/boot/types.d.ts.map +1 -0
- package/dist/boot/types.js +2 -0
- package/dist/boot/types.js.map +1 -0
- package/dist/boot/useBoot.d.ts +12 -0
- package/dist/boot/useBoot.d.ts.map +1 -0
- package/dist/boot/useBoot.js +79 -0
- package/dist/boot/useBoot.js.map +1 -0
- package/dist/components/Icon.d.ts +6 -0
- package/dist/components/Icon.d.ts.map +1 -0
- package/dist/components/Icon.js +13 -0
- package/dist/components/Icon.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +18 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +42 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +11 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +28 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +4 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +8 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +12 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +23 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +25 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +28 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +28 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +36 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +78 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +12 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +25 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +29 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +91 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +45 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +119 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +9 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +14 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +25 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +59 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +19 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +35 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +32 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +51 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +38 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.d.ts +8 -0
- package/dist/components/ui/direction.d.ts.map +1 -0
- package/dist/components/ui/direction.js +9 -0
- package/dist/components/ui/direction.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +14 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +35 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +52 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +12 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +34 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +67 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +14 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +57 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +12 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +22 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +7 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +68 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +10 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +8 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +55 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/native-select.d.ts +9 -0
- package/dist/components/ui/native-select.d.ts.map +1 -0
- package/dist/components/ui/native-select.js +14 -0
- package/dist/components/ui/native-select.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +32 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +18 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +27 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +26 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +9 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +11 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +15 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +11 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +38 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +8 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +15 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +37 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +70 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +205 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +7 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +11 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +25 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +8 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +9 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +28 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +12 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +30 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +7 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +11 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +24 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +26 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +18 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/context/MetaContext.d.ts +13 -0
- package/dist/context/MetaContext.d.ts.map +1 -0
- package/dist/context/MetaContext.js +14 -0
- package/dist/context/MetaContext.js.map +1 -0
- package/dist/context/ModuleContext.d.ts +14 -0
- package/dist/context/ModuleContext.d.ts.map +1 -0
- package/dist/context/ModuleContext.js +40 -0
- package/dist/context/ModuleContext.js.map +1 -0
- package/dist/context/PermissionsContext.d.ts +14 -0
- package/dist/context/PermissionsContext.d.ts.map +1 -0
- package/dist/context/PermissionsContext.js +20 -0
- package/dist/context/PermissionsContext.js.map +1 -0
- package/dist/context/ShellProviders.d.ts +7 -0
- package/dist/context/ShellProviders.d.ts.map +1 -0
- package/dist/context/ShellProviders.js +16 -0
- package/dist/context/ShellProviders.js.map +1 -0
- package/dist/context/UserContext.d.ts +8 -0
- package/dist/context/UserContext.d.ts.map +1 -0
- package/dist/context/UserContext.js +14 -0
- package/dist/context/UserContext.js.map +1 -0
- package/dist/data/QueryProvider.d.ts +7 -0
- package/dist/data/QueryProvider.d.ts.map +1 -0
- package/dist/data/QueryProvider.js +6 -0
- package/dist/data/QueryProvider.js.map +1 -0
- package/dist/data/queryClient.d.ts +3 -0
- package/dist/data/queryClient.d.ts.map +1 -0
- package/dist/data/queryClient.js +18 -0
- package/dist/data/queryClient.js.map +1 -0
- package/dist/data/useModelMeta.d.ts +6 -0
- package/dist/data/useModelMeta.d.ts.map +1 -0
- package/dist/data/useModelMeta.js +12 -0
- package/dist/data/useModelMeta.js.map +1 -0
- package/dist/data/useMutation.d.ts +8 -0
- package/dist/data/useMutation.d.ts.map +1 -0
- package/dist/data/useMutation.js +51 -0
- package/dist/data/useMutation.js.map +1 -0
- package/dist/data/useRecord.d.ts +6 -0
- package/dist/data/useRecord.d.ts.map +1 -0
- package/dist/data/useRecord.js +21 -0
- package/dist/data/useRecord.js.map +1 -0
- package/dist/data/useSource.d.ts +27 -0
- package/dist/data/useSource.d.ts.map +1 -0
- package/dist/data/useSource.js +82 -0
- package/dist/data/useSource.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +12 -0
- package/dist/main.js.map +1 -0
- package/dist/router/NotFound.d.ts +2 -0
- package/dist/router/NotFound.d.ts.map +1 -0
- package/dist/router/NotFound.js +5 -0
- package/dist/router/NotFound.js.map +1 -0
- package/dist/router/RouterProvider.d.ts +5 -0
- package/dist/router/RouterProvider.d.ts.map +1 -0
- package/dist/router/RouterProvider.js +7 -0
- package/dist/router/RouterProvider.js.map +1 -0
- package/dist/router/buildRouteTree.d.ts +3 -0
- package/dist/router/buildRouteTree.d.ts.map +1 -0
- package/dist/router/buildRouteTree.js +43 -0
- package/dist/router/buildRouteTree.js.map +1 -0
- package/dist/router/createShellRouter.d.ts +4 -0
- package/dist/router/createShellRouter.d.ts.map +1 -0
- package/dist/router/createShellRouter.js +8 -0
- package/dist/router/createShellRouter.js.map +1 -0
- package/dist/router/hooks.d.ts +10 -0
- package/dist/router/hooks.d.ts.map +1 -0
- package/dist/router/hooks.js +31 -0
- package/dist/router/hooks.js.map +1 -0
- package/dist/shell/assets/index--35CAvcP.js +8715 -0
- package/dist/shell/assets/index-COLmoPYo.css +1 -0
- package/dist/shell/assets/index-Ck_eod9F.js +1 -0
- package/dist/shell/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/shell/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/shell/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/shell/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/shell/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/shell/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/shell/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/shell/index.html +13 -0
- package/dist/studio/bridge.d.ts +2 -0
- package/dist/studio/bridge.d.ts.map +1 -0
- package/dist/studio/bridge.js +112 -0
- package/dist/studio/bridge.js.map +1 -0
- package/dist/studio/index.d.ts +2 -0
- package/dist/studio/index.d.ts.map +1 -0
- package/dist/studio/index.js +3 -0
- package/dist/studio/index.js.map +1 -0
- package/dist/studio/overlay.d.ts +11 -0
- package/dist/studio/overlay.d.ts.map +1 -0
- package/dist/studio/overlay.js +41 -0
- package/dist/studio/overlay.js.map +1 -0
- package/dist/studio/types.d.ts +42 -0
- package/dist/studio/types.d.ts.map +1 -0
- package/dist/studio/types.js +2 -0
- package/dist/studio/types.js.map +1 -0
- package/dist/studio/walker.d.ts +6 -0
- package/dist/studio/walker.d.ts.map +1 -0
- package/dist/studio/walker.js +43 -0
- package/dist/studio/walker.js.map +1 -0
- package/dist/widgets/action/dispatcher.d.ts +31 -0
- package/dist/widgets/action/dispatcher.d.ts.map +1 -0
- package/dist/widgets/action/dispatcher.js +224 -0
- package/dist/widgets/action/dispatcher.js.map +1 -0
- package/dist/widgets/action/index.d.ts +3 -0
- package/dist/widgets/action/index.d.ts.map +1 -0
- package/dist/widgets/action/index.js +2 -0
- package/dist/widgets/action/index.js.map +1 -0
- package/dist/widgets/binding/index.d.ts +3 -0
- package/dist/widgets/binding/index.d.ts.map +1 -0
- package/dist/widgets/binding/index.js +2 -0
- package/dist/widgets/binding/index.js.map +1 -0
- package/dist/widgets/binding/resolver.d.ts +23 -0
- package/dist/widgets/binding/resolver.d.ts.map +1 -0
- package/dist/widgets/binding/resolver.js +33 -0
- package/dist/widgets/binding/resolver.js.map +1 -0
- package/dist/widgets/components/AttachmentWidget.d.ts +29 -0
- package/dist/widgets/components/AttachmentWidget.d.ts.map +1 -0
- package/dist/widgets/components/AttachmentWidget.js +53 -0
- package/dist/widgets/components/AttachmentWidget.js.map +1 -0
- package/dist/widgets/components/AttachmentsWidget.d.ts +33 -0
- package/dist/widgets/components/AttachmentsWidget.d.ts.map +1 -0
- package/dist/widgets/components/AttachmentsWidget.js +52 -0
- package/dist/widgets/components/AttachmentsWidget.js.map +1 -0
- package/dist/widgets/components/BadgeWidget.d.ts +29 -0
- package/dist/widgets/components/BadgeWidget.d.ts.map +1 -0
- package/dist/widgets/components/BadgeWidget.js +31 -0
- package/dist/widgets/components/BadgeWidget.js.map +1 -0
- package/dist/widgets/components/ButtonWidget.d.ts +38 -0
- package/dist/widgets/components/ButtonWidget.d.ts.map +1 -0
- package/dist/widgets/components/ButtonWidget.js +29 -0
- package/dist/widgets/components/ButtonWidget.js.map +1 -0
- package/dist/widgets/components/CardWidget.d.ts +33 -0
- package/dist/widgets/components/CardWidget.d.ts.map +1 -0
- package/dist/widgets/components/CardWidget.js +28 -0
- package/dist/widgets/components/CardWidget.js.map +1 -0
- package/dist/widgets/components/CheckboxWidget.d.ts +23 -0
- package/dist/widgets/components/CheckboxWidget.d.ts.map +1 -0
- package/dist/widgets/components/CheckboxWidget.js +24 -0
- package/dist/widgets/components/CheckboxWidget.js.map +1 -0
- package/dist/widgets/components/CodeWidget.d.ts +30 -0
- package/dist/widgets/components/CodeWidget.d.ts.map +1 -0
- package/dist/widgets/components/CodeWidget.js +27 -0
- package/dist/widgets/components/CodeWidget.js.map +1 -0
- package/dist/widgets/components/ColumnWidget.d.ts +34 -0
- package/dist/widgets/components/ColumnWidget.d.ts.map +1 -0
- package/dist/widgets/components/ColumnWidget.js +20 -0
- package/dist/widgets/components/ColumnWidget.js.map +1 -0
- package/dist/widgets/components/ComputedWidget.d.ts +24 -0
- package/dist/widgets/components/ComputedWidget.d.ts.map +1 -0
- package/dist/widgets/components/ComputedWidget.js +39 -0
- package/dist/widgets/components/ComputedWidget.js.map +1 -0
- package/dist/widgets/components/DataWidget.d.ts +22 -0
- package/dist/widgets/components/DataWidget.d.ts.map +1 -0
- package/dist/widgets/components/DataWidget.js +99 -0
- package/dist/widgets/components/DataWidget.js.map +1 -0
- package/dist/widgets/components/DatePickerWidget.d.ts +23 -0
- package/dist/widgets/components/DatePickerWidget.d.ts.map +1 -0
- package/dist/widgets/components/DatePickerWidget.js +38 -0
- package/dist/widgets/components/DatePickerWidget.js.map +1 -0
- package/dist/widgets/components/DatetimeWidget.d.ts +23 -0
- package/dist/widgets/components/DatetimeWidget.d.ts.map +1 -0
- package/dist/widgets/components/DatetimeWidget.js +68 -0
- package/dist/widgets/components/DatetimeWidget.js.map +1 -0
- package/dist/widgets/components/DividerWidget.d.ts +24 -0
- package/dist/widgets/components/DividerWidget.d.ts.map +1 -0
- package/dist/widgets/components/DividerWidget.js +33 -0
- package/dist/widgets/components/DividerWidget.js.map +1 -0
- package/dist/widgets/components/DrawerWidget.d.ts +28 -0
- package/dist/widgets/components/DrawerWidget.d.ts.map +1 -0
- package/dist/widgets/components/DrawerWidget.js +36 -0
- package/dist/widgets/components/DrawerWidget.js.map +1 -0
- package/dist/widgets/components/DynamicLinkWidget.d.ts +29 -0
- package/dist/widgets/components/DynamicLinkWidget.d.ts.map +1 -0
- package/dist/widgets/components/DynamicLinkWidget.js +51 -0
- package/dist/widgets/components/DynamicLinkWidget.js.map +1 -0
- package/dist/widgets/components/GridWidget.d.ts +53 -0
- package/dist/widgets/components/GridWidget.d.ts.map +1 -0
- package/dist/widgets/components/GridWidget.js +111 -0
- package/dist/widgets/components/GridWidget.js.map +1 -0
- package/dist/widgets/components/GroupWidget.d.ts +50 -0
- package/dist/widgets/components/GroupWidget.d.ts.map +1 -0
- package/dist/widgets/components/GroupWidget.js +85 -0
- package/dist/widgets/components/GroupWidget.js.map +1 -0
- package/dist/widgets/components/IconWidget.d.ts +27 -0
- package/dist/widgets/components/IconWidget.d.ts.map +1 -0
- package/dist/widgets/components/IconWidget.js +22 -0
- package/dist/widgets/components/IconWidget.js.map +1 -0
- package/dist/widgets/components/ImageWidget.d.ts +28 -0
- package/dist/widgets/components/ImageWidget.d.ts.map +1 -0
- package/dist/widgets/components/ImageWidget.js +25 -0
- package/dist/widgets/components/ImageWidget.js.map +1 -0
- package/dist/widgets/components/InputWidget.d.ts +51 -0
- package/dist/widgets/components/InputWidget.d.ts.map +1 -0
- package/dist/widgets/components/InputWidget.js +46 -0
- package/dist/widgets/components/InputWidget.js.map +1 -0
- package/dist/widgets/components/JsonWidget.d.ts +27 -0
- package/dist/widgets/components/JsonWidget.d.ts.map +1 -0
- package/dist/widgets/components/JsonWidget.js +54 -0
- package/dist/widgets/components/JsonWidget.js.map +1 -0
- package/dist/widgets/components/LinkWidget.d.ts +26 -0
- package/dist/widgets/components/LinkWidget.d.ts.map +1 -0
- package/dist/widgets/components/LinkWidget.js +42 -0
- package/dist/widgets/components/LinkWidget.js.map +1 -0
- package/dist/widgets/components/ManyToManyWidget.d.ts +26 -0
- package/dist/widgets/components/ManyToManyWidget.d.ts.map +1 -0
- package/dist/widgets/components/ManyToManyWidget.js +54 -0
- package/dist/widgets/components/ManyToManyWidget.js.map +1 -0
- package/dist/widgets/components/ModalWidget.d.ts +28 -0
- package/dist/widgets/components/ModalWidget.d.ts.map +1 -0
- package/dist/widgets/components/ModalWidget.js +36 -0
- package/dist/widgets/components/ModalWidget.js.map +1 -0
- package/dist/widgets/components/MoneyWidget.d.ts +31 -0
- package/dist/widgets/components/MoneyWidget.d.ts.map +1 -0
- package/dist/widgets/components/MoneyWidget.js +52 -0
- package/dist/widgets/components/MoneyWidget.js.map +1 -0
- package/dist/widgets/components/RepeatWidget.d.ts +30 -0
- package/dist/widgets/components/RepeatWidget.d.ts.map +1 -0
- package/dist/widgets/components/RepeatWidget.js +50 -0
- package/dist/widgets/components/RepeatWidget.js.map +1 -0
- package/dist/widgets/components/ScrollAreaWidget.d.ts +27 -0
- package/dist/widgets/components/ScrollAreaWidget.d.ts.map +1 -0
- package/dist/widgets/components/ScrollAreaWidget.js +27 -0
- package/dist/widgets/components/ScrollAreaWidget.js.map +1 -0
- package/dist/widgets/components/SectionWidget.d.ts +36 -0
- package/dist/widgets/components/SectionWidget.d.ts.map +1 -0
- package/dist/widgets/components/SectionWidget.js +46 -0
- package/dist/widgets/components/SectionWidget.js.map +1 -0
- package/dist/widgets/components/SelectWidget.d.ts +30 -0
- package/dist/widgets/components/SelectWidget.d.ts.map +1 -0
- package/dist/widgets/components/SelectWidget.js +30 -0
- package/dist/widgets/components/SelectWidget.js.map +1 -0
- package/dist/widgets/components/SequenceWidget.d.ts +19 -0
- package/dist/widgets/components/SequenceWidget.d.ts.map +1 -0
- package/dist/widgets/components/SequenceWidget.js +20 -0
- package/dist/widgets/components/SequenceWidget.js.map +1 -0
- package/dist/widgets/components/SpacerWidget.d.ts +21 -0
- package/dist/widgets/components/SpacerWidget.d.ts.map +1 -0
- package/dist/widgets/components/SpacerWidget.js +25 -0
- package/dist/widgets/components/SpacerWidget.js.map +1 -0
- package/dist/widgets/components/SplitWidget.d.ts +32 -0
- package/dist/widgets/components/SplitWidget.d.ts.map +1 -0
- package/dist/widgets/components/SplitWidget.js +41 -0
- package/dist/widgets/components/SplitWidget.js.map +1 -0
- package/dist/widgets/components/StackWidget.d.ts +24 -0
- package/dist/widgets/components/StackWidget.d.ts.map +1 -0
- package/dist/widgets/components/StackWidget.js +29 -0
- package/dist/widgets/components/StackWidget.js.map +1 -0
- package/dist/widgets/components/TableWidget.d.ts +36 -0
- package/dist/widgets/components/TableWidget.d.ts.map +1 -0
- package/dist/widgets/components/TableWidget.js +154 -0
- package/dist/widgets/components/TableWidget.js.map +1 -0
- package/dist/widgets/components/TextWidget.d.ts +21 -0
- package/dist/widgets/components/TextWidget.d.ts.map +1 -0
- package/dist/widgets/components/TextWidget.js +38 -0
- package/dist/widgets/components/TextWidget.js.map +1 -0
- package/dist/widgets/components/TextareaWidget.d.ts +34 -0
- package/dist/widgets/components/TextareaWidget.d.ts.map +1 -0
- package/dist/widgets/components/TextareaWidget.js +31 -0
- package/dist/widgets/components/TextareaWidget.js.map +1 -0
- package/dist/widgets/components/TreeWidget.d.ts +26 -0
- package/dist/widgets/components/TreeWidget.d.ts.map +1 -0
- package/dist/widgets/components/TreeWidget.js +46 -0
- package/dist/widgets/components/TreeWidget.js.map +1 -0
- package/dist/widgets/components/index.d.ts +31 -0
- package/dist/widgets/components/index.d.ts.map +1 -0
- package/dist/widgets/components/index.js +31 -0
- package/dist/widgets/components/index.js.map +1 -0
- package/dist/widgets/components/register.d.ts +2 -0
- package/dist/widgets/components/register.d.ts.map +1 -0
- package/dist/widgets/components/register.js +85 -0
- package/dist/widgets/components/register.js.map +1 -0
- package/dist/widgets/components/table/CellRenderers.d.ts +11 -0
- package/dist/widgets/components/table/CellRenderers.d.ts.map +1 -0
- package/dist/widgets/components/table/CellRenderers.js +71 -0
- package/dist/widgets/components/table/CellRenderers.js.map +1 -0
- package/dist/widgets/components/table/TablePagination.d.ts +10 -0
- package/dist/widgets/components/table/TablePagination.d.ts.map +1 -0
- package/dist/widgets/components/table/TablePagination.js +11 -0
- package/dist/widgets/components/table/TablePagination.js.map +1 -0
- package/dist/widgets/components/table/TableToolbar.d.ts +17 -0
- package/dist/widgets/components/table/TableToolbar.d.ts.map +1 -0
- package/dist/widgets/components/table/TableToolbar.js +115 -0
- package/dist/widgets/components/table/TableToolbar.js.map +1 -0
- package/dist/widgets/components/table/filter-operators.d.ts +26 -0
- package/dist/widgets/components/table/filter-operators.d.ts.map +1 -0
- package/dist/widgets/components/table/filter-operators.js +111 -0
- package/dist/widgets/components/table/filter-operators.js.map +1 -0
- package/dist/widgets/components/table/index.d.ts +6 -0
- package/dist/widgets/components/table/index.d.ts.map +1 -0
- package/dist/widgets/components/table/index.js +5 -0
- package/dist/widgets/components/table/index.js.map +1 -0
- package/dist/widgets/condition/evaluator.d.ts +5 -0
- package/dist/widgets/condition/evaluator.d.ts.map +1 -0
- package/dist/widgets/condition/evaluator.js +49 -0
- package/dist/widgets/condition/evaluator.js.map +1 -0
- package/dist/widgets/condition/index.d.ts +2 -0
- package/dist/widgets/condition/index.d.ts.map +1 -0
- package/dist/widgets/condition/index.js +2 -0
- package/dist/widgets/condition/index.js.map +1 -0
- package/dist/widgets/context/builder.d.ts +7 -0
- package/dist/widgets/context/builder.d.ts.map +1 -0
- package/dist/widgets/context/builder.js +81 -0
- package/dist/widgets/context/builder.js.map +1 -0
- package/dist/widgets/context/index.d.ts +4 -0
- package/dist/widgets/context/index.d.ts.map +1 -0
- package/dist/widgets/context/index.js +3 -0
- package/dist/widgets/context/index.js.map +1 -0
- package/dist/widgets/context/types.d.ts +13 -0
- package/dist/widgets/context/types.d.ts.map +1 -0
- package/dist/widgets/context/types.js +21 -0
- package/dist/widgets/context/types.js.map +1 -0
- package/dist/widgets/data/index.d.ts +5 -0
- package/dist/widgets/data/index.d.ts.map +1 -0
- package/dist/widgets/data/index.js +3 -0
- package/dist/widgets/data/index.js.map +1 -0
- package/dist/widgets/data/useModelQuery.d.ts +21 -0
- package/dist/widgets/data/useModelQuery.d.ts.map +1 -0
- package/dist/widgets/data/useModelQuery.js +87 -0
- package/dist/widgets/data/useModelQuery.js.map +1 -0
- package/dist/widgets/data/useModelRecord.d.ts +12 -0
- package/dist/widgets/data/useModelRecord.d.ts.map +1 -0
- package/dist/widgets/data/useModelRecord.js +24 -0
- package/dist/widgets/data/useModelRecord.js.map +1 -0
- package/dist/widgets/expression/evaluator.d.ts +4 -0
- package/dist/widgets/expression/evaluator.d.ts.map +1 -0
- package/dist/widgets/expression/evaluator.js +84 -0
- package/dist/widgets/expression/evaluator.js.map +1 -0
- package/dist/widgets/expression/functions.d.ts +5 -0
- package/dist/widgets/expression/functions.d.ts.map +1 -0
- package/dist/widgets/expression/functions.js +128 -0
- package/dist/widgets/expression/functions.js.map +1 -0
- package/dist/widgets/expression/index.d.ts +6 -0
- package/dist/widgets/expression/index.d.ts.map +1 -0
- package/dist/widgets/expression/index.js +4 -0
- package/dist/widgets/expression/index.js.map +1 -0
- package/dist/widgets/expression/parser.d.ts +3 -0
- package/dist/widgets/expression/parser.d.ts.map +1 -0
- package/dist/widgets/expression/parser.js +202 -0
- package/dist/widgets/expression/parser.js.map +1 -0
- package/dist/widgets/expression/types.d.ts +27 -0
- package/dist/widgets/expression/types.d.ts.map +1 -0
- package/dist/widgets/expression/types.js +2 -0
- package/dist/widgets/expression/types.js.map +1 -0
- package/dist/widgets/form/FormContext.d.ts +20 -0
- package/dist/widgets/form/FormContext.d.ts.map +1 -0
- package/dist/widgets/form/FormContext.js +7 -0
- package/dist/widgets/form/FormContext.js.map +1 -0
- package/dist/widgets/form/FormProvider.d.ts +10 -0
- package/dist/widgets/form/FormProvider.d.ts.map +1 -0
- package/dist/widgets/form/FormProvider.js +64 -0
- package/dist/widgets/form/FormProvider.js.map +1 -0
- package/dist/widgets/form/FormWidget.d.ts +15 -0
- package/dist/widgets/form/FormWidget.d.ts.map +1 -0
- package/dist/widgets/form/FormWidget.js +28 -0
- package/dist/widgets/form/FormWidget.js.map +1 -0
- package/dist/widgets/form/index.d.ts +5 -0
- package/dist/widgets/form/index.d.ts.map +1 -0
- package/dist/widgets/form/index.js +4 -0
- package/dist/widgets/form/index.js.map +1 -0
- package/dist/widgets/form/useFormState.d.ts +22 -0
- package/dist/widgets/form/useFormState.d.ts.map +1 -0
- package/dist/widgets/form/useFormState.js +89 -0
- package/dist/widgets/form/useFormState.js.map +1 -0
- package/dist/widgets/form/useFormSubmit.d.ts +16 -0
- package/dist/widgets/form/useFormSubmit.d.ts.map +1 -0
- package/dist/widgets/form/useFormSubmit.js +66 -0
- package/dist/widgets/form/useFormSubmit.js.map +1 -0
- package/dist/widgets/form/useFormValidation.d.ts +6 -0
- package/dist/widgets/form/useFormValidation.d.ts.map +1 -0
- package/dist/widgets/form/useFormValidation.js +48 -0
- package/dist/widgets/form/useFormValidation.js.map +1 -0
- package/dist/widgets/hooks/index.d.ts +9 -0
- package/dist/widgets/hooks/index.d.ts.map +1 -0
- package/dist/widgets/hooks/index.js +8 -0
- package/dist/widgets/hooks/index.js.map +1 -0
- package/dist/widgets/hooks/useAction.d.ts +7 -0
- package/dist/widgets/hooks/useAction.d.ts.map +1 -0
- package/dist/widgets/hooks/useAction.js +73 -0
- package/dist/widgets/hooks/useAction.js.map +1 -0
- package/dist/widgets/hooks/useBind.d.ts +4 -0
- package/dist/widgets/hooks/useBind.d.ts.map +1 -0
- package/dist/widgets/hooks/useBind.js +27 -0
- package/dist/widgets/hooks/useBind.js.map +1 -0
- package/dist/widgets/hooks/useCondition.d.ts +3 -0
- package/dist/widgets/hooks/useCondition.d.ts.map +1 -0
- package/dist/widgets/hooks/useCondition.js +21 -0
- package/dist/widgets/hooks/useCondition.js.map +1 -0
- package/dist/widgets/hooks/useDataQuery.d.ts +19 -0
- package/dist/widgets/hooks/useDataQuery.d.ts.map +1 -0
- package/dist/widgets/hooks/useDataQuery.js +32 -0
- package/dist/widgets/hooks/useDataQuery.js.map +1 -0
- package/dist/widgets/hooks/useExpression.d.ts +2 -0
- package/dist/widgets/hooks/useExpression.d.ts.map +1 -0
- package/dist/widgets/hooks/useExpression.js +15 -0
- package/dist/widgets/hooks/useExpression.js.map +1 -0
- package/dist/widgets/hooks/usePageState.d.ts +5 -0
- package/dist/widgets/hooks/usePageState.d.ts.map +1 -0
- package/dist/widgets/hooks/usePageState.js +17 -0
- package/dist/widgets/hooks/usePageState.js.map +1 -0
- package/dist/widgets/hooks/useSurfaceContext.d.ts +5 -0
- package/dist/widgets/hooks/useSurfaceContext.d.ts.map +1 -0
- package/dist/widgets/hooks/useSurfaceContext.js +7 -0
- package/dist/widgets/hooks/useSurfaceContext.js.map +1 -0
- package/dist/widgets/hooks/useWidgetContext.d.ts +4 -0
- package/dist/widgets/hooks/useWidgetContext.d.ts.map +1 -0
- package/dist/widgets/hooks/useWidgetContext.js +11 -0
- package/dist/widgets/hooks/useWidgetContext.js.map +1 -0
- package/dist/widgets/index.d.ts +44 -0
- package/dist/widgets/index.d.ts.map +1 -0
- package/dist/widgets/index.js +31 -0
- package/dist/widgets/index.js.map +1 -0
- package/dist/widgets/lib/layout-props.d.ts +8 -0
- package/dist/widgets/lib/layout-props.d.ts.map +1 -0
- package/dist/widgets/lib/layout-props.js +134 -0
- package/dist/widgets/lib/layout-props.js.map +1 -0
- package/dist/widgets/reactivity/index.d.ts +5 -0
- package/dist/widgets/reactivity/index.d.ts.map +1 -0
- package/dist/widgets/reactivity/index.js +3 -0
- package/dist/widgets/reactivity/index.js.map +1 -0
- package/dist/widgets/reactivity/tracker.d.ts +8 -0
- package/dist/widgets/reactivity/tracker.d.ts.map +1 -0
- package/dist/widgets/reactivity/tracker.js +115 -0
- package/dist/widgets/reactivity/tracker.js.map +1 -0
- package/dist/widgets/reactivity/variables.d.ts +71 -0
- package/dist/widgets/reactivity/variables.d.ts.map +1 -0
- package/dist/widgets/reactivity/variables.js +175 -0
- package/dist/widgets/reactivity/variables.js.map +1 -0
- package/dist/widgets/registry.d.ts +14 -0
- package/dist/widgets/registry.d.ts.map +1 -0
- package/dist/widgets/registry.js +24 -0
- package/dist/widgets/registry.js.map +1 -0
- package/dist/widgets/renderer/SlotRenderer.d.ts +16 -0
- package/dist/widgets/renderer/SlotRenderer.d.ts.map +1 -0
- package/dist/widgets/renderer/SlotRenderer.js +13 -0
- package/dist/widgets/renderer/SlotRenderer.js.map +1 -0
- package/dist/widgets/renderer/WidgetRenderer.d.ts +12 -0
- package/dist/widgets/renderer/WidgetRenderer.d.ts.map +1 -0
- package/dist/widgets/renderer/WidgetRenderer.js +136 -0
- package/dist/widgets/renderer/WidgetRenderer.js.map +1 -0
- package/dist/widgets/renderer/index.d.ts +5 -0
- package/dist/widgets/renderer/index.d.ts.map +1 -0
- package/dist/widgets/renderer/index.js +3 -0
- package/dist/widgets/renderer/index.js.map +1 -0
- package/dist/widgets/shell/WidgetSlotRenderer.d.ts +14 -0
- package/dist/widgets/shell/WidgetSlotRenderer.d.ts.map +1 -0
- package/dist/widgets/shell/WidgetSlotRenderer.js +27 -0
- package/dist/widgets/shell/WidgetSlotRenderer.js.map +1 -0
- package/dist/widgets/shell/index.d.ts +5 -0
- package/dist/widgets/shell/index.d.ts.map +1 -0
- package/dist/widgets/shell/index.js +3 -0
- package/dist/widgets/shell/index.js.map +1 -0
- package/dist/widgets/shell/useActionHandlers.d.ts +7 -0
- package/dist/widgets/shell/useActionHandlers.d.ts.map +1 -0
- package/dist/widgets/shell/useActionHandlers.js +123 -0
- package/dist/widgets/shell/useActionHandlers.js.map +1 -0
- package/dist/widgets/state/index.d.ts +3 -0
- package/dist/widgets/state/index.d.ts.map +1 -0
- package/dist/widgets/state/index.js +2 -0
- package/dist/widgets/state/index.js.map +1 -0
- package/dist/widgets/state/store.d.ts +20 -0
- package/dist/widgets/state/store.d.ts.map +1 -0
- package/dist/widgets/state/store.js +84 -0
- package/dist/widgets/state/store.js.map +1 -0
- package/dist/widgets/types.d.ts +28 -0
- package/dist/widgets/types.d.ts.map +1 -0
- package/dist/widgets/types.js +2 -0
- package/dist/widgets/types.js.map +1 -0
- package/dist/widgets/validation/index.d.ts +3 -0
- package/dist/widgets/validation/index.d.ts.map +1 -0
- package/dist/widgets/validation/index.js +2 -0
- package/dist/widgets/validation/index.js.map +1 -0
- package/dist/widgets/validation/validator.d.ts +7 -0
- package/dist/widgets/validation/validator.d.ts.map +1 -0
- package/dist/widgets/validation/validator.js +125 -0
- package/dist/widgets/validation/validator.js.map +1 -0
- package/index.html +12 -0
- package/package.json +58 -0
- package/src/App.tsx +44 -0
- package/src/__tests__/setup.ts +1 -0
- package/src/api/auth.ts +41 -0
- package/src/api/boot.ts +10 -0
- package/src/api/client.ts +26 -0
- package/src/api/paths.ts +3 -0
- package/src/api/token.ts +13 -0
- package/src/auth/LoginForm.tsx +67 -0
- package/src/auth/SessionExpired.tsx +24 -0
- package/src/auth/SetupForm.tsx +76 -0
- package/src/boot/BootGate.tsx +35 -0
- package/src/boot/BootProvider.tsx +28 -0
- package/src/boot/types.ts +9 -0
- package/src/boot/useBoot.ts +111 -0
- package/src/components/Icon.tsx +17 -0
- package/src/components/ui/accordion.tsx +82 -0
- package/src/components/ui/alert-dialog.tsx +180 -0
- package/src/components/ui/alert.tsx +76 -0
- package/src/components/ui/aspect-ratio.tsx +9 -0
- package/src/components/ui/avatar.tsx +94 -0
- package/src/components/ui/badge.tsx +45 -0
- package/src/components/ui/breadcrumb.tsx +104 -0
- package/src/components/ui/button-group.tsx +78 -0
- package/src/components/ui/button.tsx +65 -0
- package/src/components/ui/calendar.tsx +187 -0
- package/src/components/ui/card.tsx +85 -0
- package/src/components/ui/carousel.tsx +229 -0
- package/src/components/ui/chart.tsx +339 -0
- package/src/components/ui/checkbox.tsx +27 -0
- package/src/components/ui/collapsible.tsx +21 -0
- package/src/components/ui/combobox.tsx +275 -0
- package/src/components/ui/command.tsx +178 -0
- package/src/components/ui/context-menu.tsx +242 -0
- package/src/components/ui/dialog.tsx +146 -0
- package/src/components/ui/direction.tsx +20 -0
- package/src/components/ui/drawer.tsx +118 -0
- package/src/components/ui/dropdown-menu.tsx +247 -0
- package/src/components/ui/empty.tsx +94 -0
- package/src/components/ui/field.tsx +224 -0
- package/src/components/ui/hover-card.tsx +36 -0
- package/src/components/ui/input-group.tsx +142 -0
- package/src/components/ui/input-otp.tsx +86 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/item.tsx +182 -0
- package/src/components/ui/kbd.tsx +26 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/menubar.tsx +260 -0
- package/src/components/ui/native-select.tsx +55 -0
- package/src/components/ui/navigation-menu.tsx +160 -0
- package/src/components/ui/pagination.tsx +112 -0
- package/src/components/ui/popover.tsx +74 -0
- package/src/components/ui/progress.tsx +31 -0
- package/src/components/ui/radio-group.tsx +42 -0
- package/src/components/ui/resizable.tsx +42 -0
- package/src/components/ui/scroll-area.tsx +53 -0
- package/src/components/ui/select.tsx +185 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sheet.tsx +128 -0
- package/src/components/ui/sidebar.tsx +669 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +54 -0
- package/src/components/ui/sonner.tsx +43 -0
- package/src/components/ui/spinner.tsx +16 -0
- package/src/components/ui/switch.tsx +33 -0
- package/src/components/ui/table.tsx +87 -0
- package/src/components/ui/tabs.tsx +80 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/toggle-group.tsx +86 -0
- package/src/components/ui/toggle.tsx +44 -0
- package/src/components/ui/tooltip.tsx +53 -0
- package/src/context/MetaContext.tsx +22 -0
- package/src/context/ModuleContext.tsx +62 -0
- package/src/context/PermissionsContext.tsx +39 -0
- package/src/context/ShellProviders.tsx +33 -0
- package/src/context/UserContext.tsx +16 -0
- package/src/data/QueryProvider.tsx +7 -0
- package/src/data/queryClient.ts +18 -0
- package/src/data/useModelMeta.ts +17 -0
- package/src/data/useMutation.ts +60 -0
- package/src/data/useRecord.ts +29 -0
- package/src/data/useSource.ts +112 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/index.css +260 -0
- package/src/index.ts +16 -0
- package/src/lib/utils.ts +6 -0
- package/src/main.tsx +17 -0
- package/src/router/NotFound.tsx +8 -0
- package/src/router/RouterProvider.tsx +7 -0
- package/src/router/buildRouteTree.tsx +63 -0
- package/src/router/createShellRouter.ts +9 -0
- package/src/router/hooks.ts +43 -0
- package/src/shell/CommandPalette.tsx +76 -0
- package/src/shell/ConfirmDialog.tsx +34 -0
- package/src/shell/ConfirmProvider.tsx +56 -0
- package/src/shell/DrawerContext.tsx +44 -0
- package/src/shell/HeaderActions.tsx +31 -0
- package/src/shell/ModuleSelectorPage.tsx +149 -0
- package/src/shell/PageOutlet.tsx +21 -0
- package/src/shell/ShellContext.tsx +45 -0
- package/src/shell/ShellDevTools.tsx +153 -0
- package/src/shell/ShellLayout.tsx +231 -0
- package/src/shell/Toast.tsx +58 -0
- package/src/shell/ToastProvider.tsx +60 -0
- package/src/shell/app-sidebar/AppSidebar.tsx +44 -0
- package/src/shell/app-sidebar/ModuleSwitcher.tsx +87 -0
- package/src/shell/app-sidebar/NavMain.tsx +64 -0
- package/src/shell/app-sidebar/NavUser.tsx +97 -0
- package/src/shell/app-sidebar/SearchMenu.tsx +22 -0
- package/src/shell/app-sidebar/index.ts +8 -0
- package/src/shell/app-sidebar/types.ts +38 -0
- package/src/shell/types.ts +6 -0
- package/src/shell/useBreadcrumbs.ts +42 -0
- package/src/studio/bridge.ts +125 -0
- package/src/studio/index.ts +3 -0
- package/src/studio/overlay.ts +47 -0
- package/src/studio/types.ts +32 -0
- package/src/studio/walker.ts +48 -0
- package/src/vite-env.d.ts +1 -0
- package/src/widgets/__tests__/action-edge-cases.test.ts +281 -0
- package/src/widgets/__tests__/action.test.ts +236 -0
- package/src/widgets/__tests__/attachment-widget.test.tsx +85 -0
- package/src/widgets/__tests__/attachments-widget.test.tsx +109 -0
- package/src/widgets/__tests__/binding.test.ts +76 -0
- package/src/widgets/__tests__/button-widget.test.tsx +145 -0
- package/src/widgets/__tests__/checkbox-widget.test.tsx +158 -0
- package/src/widgets/__tests__/code-widget.test.tsx +64 -0
- package/src/widgets/__tests__/computed-widget.test.tsx +62 -0
- package/src/widgets/__tests__/condition-edge-cases.test.ts +120 -0
- package/src/widgets/__tests__/condition.test.ts +221 -0
- package/src/widgets/__tests__/context.test.ts +99 -0
- package/src/widgets/__tests__/data-widget.test.tsx +204 -0
- package/src/widgets/__tests__/datepicker-widget.test.tsx +66 -0
- package/src/widgets/__tests__/datetime-widget.test.tsx +67 -0
- package/src/widgets/__tests__/drawer-widget.test.tsx +149 -0
- package/src/widgets/__tests__/dynamic-link-widget.test.tsx +52 -0
- package/src/widgets/__tests__/edge-cases.test.ts +232 -0
- package/src/widgets/__tests__/evaluator.test.ts +107 -0
- package/src/widgets/__tests__/functions.test.ts +147 -0
- package/src/widgets/__tests__/grid-widget.test.tsx +137 -0
- package/src/widgets/__tests__/hooks.test.tsx +249 -0
- package/src/widgets/__tests__/icon-widget.test.tsx +129 -0
- package/src/widgets/__tests__/input-widget.test.tsx +264 -0
- package/src/widgets/__tests__/integration.test.ts +116 -0
- package/src/widgets/__tests__/json-widget.test.tsx +70 -0
- package/src/widgets/__tests__/link-widget.test.tsx +92 -0
- package/src/widgets/__tests__/many-to-many-widget.test.tsx +93 -0
- package/src/widgets/__tests__/modal-widget.test.tsx +148 -0
- package/src/widgets/__tests__/money-widget.test.tsx +97 -0
- package/src/widgets/__tests__/parser.test.ts +171 -0
- package/src/widgets/__tests__/reactive-variables.test.ts +383 -0
- package/src/widgets/__tests__/renderer.test.tsx +300 -0
- package/src/widgets/__tests__/repeat-widget.test.tsx +229 -0
- package/src/widgets/__tests__/select-widget.test.tsx +231 -0
- package/src/widgets/__tests__/sequence-widget.test.tsx +58 -0
- package/src/widgets/__tests__/shell-integration.test.tsx +1343 -0
- package/src/widgets/__tests__/split-widget.test.tsx +133 -0
- package/src/widgets/__tests__/state-edge-cases.test.ts +118 -0
- package/src/widgets/__tests__/state.test.ts +106 -0
- package/src/widgets/__tests__/table-data-binding.test.tsx +482 -0
- package/src/widgets/__tests__/table-filter-popover.test.tsx +486 -0
- package/src/widgets/__tests__/table-search.test.tsx +305 -0
- package/src/widgets/__tests__/table-widget.test.tsx +509 -0
- package/src/widgets/__tests__/textarea-widget.test.tsx +105 -0
- package/src/widgets/__tests__/tracker-validator-edge-cases.test.ts +242 -0
- package/src/widgets/__tests__/tracker.test.ts +133 -0
- package/src/widgets/__tests__/tree-widget.test.tsx +97 -0
- package/src/widgets/__tests__/use-model-source.test.ts +67 -0
- package/src/widgets/__tests__/validator.test.ts +208 -0
- package/src/widgets/action/dispatcher.ts +334 -0
- package/src/widgets/action/index.ts +2 -0
- package/src/widgets/binding/index.ts +2 -0
- package/src/widgets/binding/resolver.ts +61 -0
- package/src/widgets/components/AttachmentWidget.tsx +111 -0
- package/src/widgets/components/AttachmentsWidget.tsx +121 -0
- package/src/widgets/components/BadgeWidget.tsx +35 -0
- package/src/widgets/components/ButtonWidget.tsx +43 -0
- package/src/widgets/components/CardWidget.tsx +68 -0
- package/src/widgets/components/CheckboxWidget.tsx +39 -0
- package/src/widgets/components/CodeWidget.tsx +44 -0
- package/src/widgets/components/ColumnWidget.tsx +22 -0
- package/src/widgets/components/ComputedWidget.tsx +49 -0
- package/src/widgets/components/DataWidget.tsx +189 -0
- package/src/widgets/components/DatePickerWidget.tsx +73 -0
- package/src/widgets/components/DatetimeWidget.tsx +160 -0
- package/src/widgets/components/DividerWidget.tsx +37 -0
- package/src/widgets/components/DrawerWidget.tsx +52 -0
- package/src/widgets/components/DynamicLinkWidget.tsx +130 -0
- package/src/widgets/components/GridWidget.tsx +134 -0
- package/src/widgets/components/GroupWidget.tsx +111 -0
- package/src/widgets/components/IconWidget.tsx +29 -0
- package/src/widgets/components/ImageWidget.tsx +28 -0
- package/src/widgets/components/InputWidget.tsx +70 -0
- package/src/widgets/components/JsonWidget.tsx +78 -0
- package/src/widgets/components/LinkWidget.tsx +99 -0
- package/src/widgets/components/ManyToManyWidget.tsx +125 -0
- package/src/widgets/components/ModalWidget.tsx +52 -0
- package/src/widgets/components/MoneyWidget.tsx +80 -0
- package/src/widgets/components/RepeatWidget.tsx +66 -0
- package/src/widgets/components/ScrollAreaWidget.tsx +40 -0
- package/src/widgets/components/SectionWidget.tsx +78 -0
- package/src/widgets/components/SelectWidget.tsx +63 -0
- package/src/widgets/components/SequenceWidget.tsx +32 -0
- package/src/widgets/components/SpacerWidget.tsx +29 -0
- package/src/widgets/components/SplitWidget.tsx +60 -0
- package/src/widgets/components/StackWidget.tsx +44 -0
- package/src/widgets/components/TableWidget.tsx +366 -0
- package/src/widgets/components/TextWidget.tsx +44 -0
- package/src/widgets/components/TextareaWidget.tsx +49 -0
- package/src/widgets/components/TreeWidget.tsx +109 -0
- package/src/widgets/components/index.ts +30 -0
- package/src/widgets/components/register.ts +93 -0
- package/src/widgets/components/table/CellRenderers.tsx +83 -0
- package/src/widgets/components/table/TablePagination.tsx +45 -0
- package/src/widgets/components/table/TableToolbar.tsx +285 -0
- package/src/widgets/components/table/filter-operators.ts +134 -0
- package/src/widgets/components/table/index.ts +11 -0
- package/src/widgets/condition/evaluator.ts +57 -0
- package/src/widgets/condition/index.ts +1 -0
- package/src/widgets/context/builder.ts +99 -0
- package/src/widgets/context/index.ts +8 -0
- package/src/widgets/context/types.ts +37 -0
- package/src/widgets/data/index.ts +5 -0
- package/src/widgets/data/useModelQuery.ts +116 -0
- package/src/widgets/data/useModelRecord.ts +37 -0
- package/src/widgets/expression/evaluator.ts +100 -0
- package/src/widgets/expression/functions.ts +131 -0
- package/src/widgets/expression/index.ts +13 -0
- package/src/widgets/expression/parser.ts +229 -0
- package/src/widgets/expression/types.ts +45 -0
- package/src/widgets/form/FormContext.ts +29 -0
- package/src/widgets/form/FormProvider.tsx +84 -0
- package/src/widgets/form/FormWidget.tsx +42 -0
- package/src/widgets/form/index.ts +4 -0
- package/src/widgets/form/useFormState.ts +127 -0
- package/src/widgets/form/useFormSubmit.ts +90 -0
- package/src/widgets/form/useFormValidation.ts +62 -0
- package/src/widgets/hooks/index.ts +8 -0
- package/src/widgets/hooks/useAction.ts +83 -0
- package/src/widgets/hooks/useBind.ts +34 -0
- package/src/widgets/hooks/useCondition.ts +21 -0
- package/src/widgets/hooks/useDataQuery.ts +48 -0
- package/src/widgets/hooks/useExpression.ts +14 -0
- package/src/widgets/hooks/usePageState.ts +21 -0
- package/src/widgets/hooks/useSurfaceContext.ts +11 -0
- package/src/widgets/hooks/useWidgetContext.ts +14 -0
- package/src/widgets/index.ts +80 -0
- package/src/widgets/lib/layout-props.ts +135 -0
- package/src/widgets/reactivity/index.ts +11 -0
- package/src/widgets/reactivity/tracker.ts +139 -0
- package/src/widgets/reactivity/variables.ts +213 -0
- package/src/widgets/registry.ts +41 -0
- package/src/widgets/renderer/SlotRenderer.tsx +47 -0
- package/src/widgets/renderer/WidgetRenderer.tsx +191 -0
- package/src/widgets/renderer/index.ts +4 -0
- package/src/widgets/shell/WidgetSlotRenderer.tsx +73 -0
- package/src/widgets/shell/index.ts +4 -0
- package/src/widgets/shell/useActionHandlers.ts +170 -0
- package/src/widgets/state/index.ts +2 -0
- package/src/widgets/state/store.ts +96 -0
- package/src/widgets/types.ts +28 -0
- package/src/widgets/validation/index.ts +2 -0
- package/src/widgets/validation/validator.ts +140 -0
- package/tsconfig.json +27 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/vite.config.ts +21 -0
- package/vitest.config.ts +16 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { Button } from '@/components/ui/button';
|
|
3
|
+
import { Field, FieldLabel } from '@/components/ui/field';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
import type { WidgetProps } from '../types.js';
|
|
6
|
+
|
|
7
|
+
interface FileValue {
|
|
8
|
+
name: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
size?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function AttachmentWidget({ props, bind, on }: WidgetProps) {
|
|
14
|
+
const label = (props.label as string) ?? bind.meta?.label ?? '';
|
|
15
|
+
const accept = (props.accept as string) ?? '';
|
|
16
|
+
const disabled = (props.disabled as boolean) ?? bind.meta?.readOnly ?? false;
|
|
17
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
18
|
+
|
|
19
|
+
const fileValue = bind.value as FileValue | null | undefined;
|
|
20
|
+
|
|
21
|
+
const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
22
|
+
const file = e.target.files?.[0];
|
|
23
|
+
if (file) {
|
|
24
|
+
const value = { name: file.name, size: file.size };
|
|
25
|
+
bind.setValue?.(value);
|
|
26
|
+
on.change?.(value);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const handleDrop = (e: React.DragEvent) => {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
if (disabled) return;
|
|
33
|
+
const file = e.dataTransfer.files?.[0];
|
|
34
|
+
if (file) {
|
|
35
|
+
const value = { name: file.name, size: file.size };
|
|
36
|
+
bind.setValue?.(value);
|
|
37
|
+
on.change?.(value);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const handleRemove = () => {
|
|
42
|
+
bind.setValue?.(null);
|
|
43
|
+
on.remove?.();
|
|
44
|
+
if (inputRef.current) inputRef.current.value = '';
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<Field>
|
|
49
|
+
{label && <FieldLabel>{label}</FieldLabel>}
|
|
50
|
+
{fileValue ? (
|
|
51
|
+
<div className="flex items-center gap-2 rounded-md border border-input px-3 py-2">
|
|
52
|
+
<span className="flex-1 truncate text-sm">{fileValue.name}</span>
|
|
53
|
+
{fileValue.size && (
|
|
54
|
+
<span className="text-xs text-muted-foreground">
|
|
55
|
+
{(fileValue.size / 1024).toFixed(1)} KB
|
|
56
|
+
</span>
|
|
57
|
+
)}
|
|
58
|
+
{!disabled && (
|
|
59
|
+
<Button
|
|
60
|
+
variant="ghost"
|
|
61
|
+
size="sm"
|
|
62
|
+
onClick={handleRemove}
|
|
63
|
+
className="h-5 px-1"
|
|
64
|
+
aria-label="Remove file"
|
|
65
|
+
>
|
|
66
|
+
×
|
|
67
|
+
</Button>
|
|
68
|
+
)}
|
|
69
|
+
</div>
|
|
70
|
+
) : (
|
|
71
|
+
<div
|
|
72
|
+
className={cn(
|
|
73
|
+
'flex flex-col items-center justify-center rounded-md border-2 border-dashed border-input p-4 text-center transition-colors',
|
|
74
|
+
!disabled && 'cursor-pointer hover:border-primary/50 hover:bg-accent/50',
|
|
75
|
+
disabled && 'opacity-50 cursor-not-allowed',
|
|
76
|
+
)}
|
|
77
|
+
onClick={() => !disabled && inputRef.current?.click()}
|
|
78
|
+
onDrop={handleDrop}
|
|
79
|
+
onDragOver={(e) => e.preventDefault()}
|
|
80
|
+
role="button"
|
|
81
|
+
aria-label="Upload file"
|
|
82
|
+
>
|
|
83
|
+
<p className="text-xs text-muted-foreground">Drop a file here or click to browse</p>
|
|
84
|
+
</div>
|
|
85
|
+
)}
|
|
86
|
+
<input
|
|
87
|
+
ref={inputRef}
|
|
88
|
+
type="file"
|
|
89
|
+
accept={accept}
|
|
90
|
+
onChange={handleFileChange}
|
|
91
|
+
className="hidden"
|
|
92
|
+
disabled={disabled}
|
|
93
|
+
/>
|
|
94
|
+
</Field>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
AttachmentWidget.widgetMeta = {
|
|
99
|
+
name: 'attachment',
|
|
100
|
+
label: 'Attachment',
|
|
101
|
+
category: 'input' as const,
|
|
102
|
+
schema: {
|
|
103
|
+
label: { type: 'string' as const },
|
|
104
|
+
accept: { type: 'string' as const },
|
|
105
|
+
maxSize: { type: 'string' as const },
|
|
106
|
+
disabled: { type: 'boolean' as const, default: false },
|
|
107
|
+
},
|
|
108
|
+
binding: 'field' as const,
|
|
109
|
+
triggers: ['change', 'remove'],
|
|
110
|
+
container: false,
|
|
111
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import { Button } from '@/components/ui/button';
|
|
3
|
+
import { Field, FieldLabel } from '@/components/ui/field';
|
|
4
|
+
import { cn } from '@/lib/utils';
|
|
5
|
+
import type { WidgetProps } from '../types.js';
|
|
6
|
+
|
|
7
|
+
interface FileValue {
|
|
8
|
+
name: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
size?: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function AttachmentsWidget({ props, bind, on }: WidgetProps) {
|
|
14
|
+
const label = (props.label as string) ?? bind.meta?.label ?? '';
|
|
15
|
+
const accept = (props.accept as string) ?? '';
|
|
16
|
+
const maxCount = (props.maxCount as number) ?? 10;
|
|
17
|
+
const disabled = (props.disabled as boolean) ?? bind.meta?.readOnly ?? false;
|
|
18
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
19
|
+
|
|
20
|
+
const files = (bind.value as FileValue[] | null) ?? [];
|
|
21
|
+
|
|
22
|
+
const handleFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
23
|
+
const newFiles = Array.from(e.target.files ?? []).map((f) => ({ name: f.name, size: f.size }));
|
|
24
|
+
const next = [...files, ...newFiles].slice(0, maxCount);
|
|
25
|
+
bind.setValue?.(next);
|
|
26
|
+
on.change?.(next);
|
|
27
|
+
if (inputRef.current) inputRef.current.value = '';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const handleDrop = (e: React.DragEvent) => {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
if (disabled) return;
|
|
33
|
+
const newFiles = Array.from(e.dataTransfer.files).map((f) => ({ name: f.name, size: f.size }));
|
|
34
|
+
const next = [...files, ...newFiles].slice(0, maxCount);
|
|
35
|
+
bind.setValue?.(next);
|
|
36
|
+
on.change?.(next);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const handleRemove = (index: number) => {
|
|
40
|
+
const next = files.filter((_, i) => i !== index);
|
|
41
|
+
bind.setValue?.(next);
|
|
42
|
+
on.remove?.(index);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<Field>
|
|
47
|
+
{label && <FieldLabel>{label}</FieldLabel>}
|
|
48
|
+
{files.length > 0 && (
|
|
49
|
+
<ul className="mb-2 space-y-1" role="list">
|
|
50
|
+
{files.map((file, i) => (
|
|
51
|
+
<li
|
|
52
|
+
key={`${file.name}-${i}`}
|
|
53
|
+
className="flex items-center gap-2 rounded-md border border-input px-3 py-1.5"
|
|
54
|
+
>
|
|
55
|
+
<span className="flex-1 truncate text-sm">{file.name}</span>
|
|
56
|
+
{file.size && (
|
|
57
|
+
<span className="text-xs text-muted-foreground">
|
|
58
|
+
{(file.size / 1024).toFixed(1)} KB
|
|
59
|
+
</span>
|
|
60
|
+
)}
|
|
61
|
+
{!disabled && (
|
|
62
|
+
<Button
|
|
63
|
+
variant="ghost"
|
|
64
|
+
size="sm"
|
|
65
|
+
onClick={() => handleRemove(i)}
|
|
66
|
+
className="h-5 px-1"
|
|
67
|
+
aria-label={`Remove ${file.name}`}
|
|
68
|
+
>
|
|
69
|
+
×
|
|
70
|
+
</Button>
|
|
71
|
+
)}
|
|
72
|
+
</li>
|
|
73
|
+
))}
|
|
74
|
+
</ul>
|
|
75
|
+
)}
|
|
76
|
+
{files.length < maxCount && (
|
|
77
|
+
<div
|
|
78
|
+
className={cn(
|
|
79
|
+
'flex flex-col items-center justify-center rounded-md border-2 border-dashed border-input p-4 text-center transition-colors',
|
|
80
|
+
!disabled && 'cursor-pointer hover:border-primary/50 hover:bg-accent/50',
|
|
81
|
+
disabled && 'opacity-50 cursor-not-allowed',
|
|
82
|
+
)}
|
|
83
|
+
onClick={() => !disabled && inputRef.current?.click()}
|
|
84
|
+
onDrop={handleDrop}
|
|
85
|
+
onDragOver={(e) => e.preventDefault()}
|
|
86
|
+
role="button"
|
|
87
|
+
aria-label="Upload files"
|
|
88
|
+
>
|
|
89
|
+
<p className="text-xs text-muted-foreground">
|
|
90
|
+
Drop files here or click to browse ({files.length}/{maxCount})
|
|
91
|
+
</p>
|
|
92
|
+
</div>
|
|
93
|
+
)}
|
|
94
|
+
<input
|
|
95
|
+
ref={inputRef}
|
|
96
|
+
type="file"
|
|
97
|
+
accept={accept}
|
|
98
|
+
multiple
|
|
99
|
+
onChange={handleFileChange}
|
|
100
|
+
className="hidden"
|
|
101
|
+
disabled={disabled}
|
|
102
|
+
/>
|
|
103
|
+
</Field>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
AttachmentsWidget.widgetMeta = {
|
|
108
|
+
name: 'attachments',
|
|
109
|
+
label: 'Attachments',
|
|
110
|
+
category: 'input' as const,
|
|
111
|
+
schema: {
|
|
112
|
+
label: { type: 'string' as const },
|
|
113
|
+
accept: { type: 'string' as const },
|
|
114
|
+
maxSize: { type: 'string' as const },
|
|
115
|
+
maxCount: { type: 'number' as const, default: 10 },
|
|
116
|
+
disabled: { type: 'boolean' as const, default: false },
|
|
117
|
+
},
|
|
118
|
+
binding: 'field' as const,
|
|
119
|
+
triggers: ['change', 'remove'],
|
|
120
|
+
container: false,
|
|
121
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Badge } from '@/components/ui/badge';
|
|
3
|
+
import type { WidgetProps } from '../types.js';
|
|
4
|
+
|
|
5
|
+
const variantMap: Record<string, 'default' | 'secondary' | 'outline' | 'destructive'> = {
|
|
6
|
+
solid: 'default',
|
|
7
|
+
outline: 'outline',
|
|
8
|
+
subtle: 'secondary',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export function BadgeWidget({ props, bind }: WidgetProps) {
|
|
12
|
+
const label = props.label as string | undefined;
|
|
13
|
+
const value = (bind.value as string) ?? '';
|
|
14
|
+
const variant = variantMap[(props.variant as string) ?? 'subtle'] ?? 'secondary';
|
|
15
|
+
|
|
16
|
+
return <Badge variant={variant}>{label || value}</Badge>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
BadgeWidget.widgetMeta = {
|
|
20
|
+
name: 'badge',
|
|
21
|
+
label: 'Badge',
|
|
22
|
+
category: 'display' as const,
|
|
23
|
+
schema: {
|
|
24
|
+
variant: { type: 'enum' as const, options: ['solid', 'outline', 'subtle'], default: 'subtle' },
|
|
25
|
+
color: {
|
|
26
|
+
type: 'enum' as const,
|
|
27
|
+
options: ['default', 'success', 'warning', 'error', 'info'],
|
|
28
|
+
default: 'default',
|
|
29
|
+
},
|
|
30
|
+
colorMap: { type: 'object' as const },
|
|
31
|
+
},
|
|
32
|
+
binding: 'field' as const,
|
|
33
|
+
triggers: [],
|
|
34
|
+
container: false,
|
|
35
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button as UIButton } from '@/components/ui/button';
|
|
3
|
+
import type { WidgetProps } from '../types.js';
|
|
4
|
+
|
|
5
|
+
export function ButtonWidget({ props, on }: WidgetProps) {
|
|
6
|
+
const variant = props.variant as string | undefined;
|
|
7
|
+
const size = props.size as string | undefined;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<UIButton
|
|
11
|
+
variant={
|
|
12
|
+
variant === 'primary'
|
|
13
|
+
? 'default'
|
|
14
|
+
: (variant as 'default' | 'secondary' | 'ghost' | 'destructive' | undefined)
|
|
15
|
+
}
|
|
16
|
+
size={size === 'md' ? 'default' : (size as 'sm' | 'default' | 'lg' | undefined)}
|
|
17
|
+
disabled={props.disabled as boolean | undefined}
|
|
18
|
+
onClick={on.click}
|
|
19
|
+
>
|
|
20
|
+
{props.label as string}
|
|
21
|
+
</UIButton>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ButtonWidget.widgetMeta = {
|
|
26
|
+
name: 'button',
|
|
27
|
+
label: 'Button',
|
|
28
|
+
category: 'action' as const,
|
|
29
|
+
schema: {
|
|
30
|
+
label: { type: 'string' as const, required: true },
|
|
31
|
+
variant: {
|
|
32
|
+
type: 'enum' as const,
|
|
33
|
+
options: ['primary', 'secondary', 'ghost', 'destructive'],
|
|
34
|
+
default: 'secondary',
|
|
35
|
+
},
|
|
36
|
+
size: { type: 'enum' as const, options: ['sm', 'md', 'lg'], default: 'md' },
|
|
37
|
+
disabled: { type: 'boolean' as const, default: false },
|
|
38
|
+
loading: { type: 'boolean' as const, default: false },
|
|
39
|
+
},
|
|
40
|
+
binding: 'none' as const,
|
|
41
|
+
triggers: ['click'],
|
|
42
|
+
container: false,
|
|
43
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Card,
|
|
4
|
+
CardHeader,
|
|
5
|
+
CardTitle,
|
|
6
|
+
CardDescription,
|
|
7
|
+
CardAction,
|
|
8
|
+
CardContent,
|
|
9
|
+
CardFooter,
|
|
10
|
+
} from '@/components/ui/card';
|
|
11
|
+
import { WidgetRenderer } from '../renderer/WidgetRenderer.js';
|
|
12
|
+
import { SurfaceProvider } from '../hooks/useSurfaceContext.js';
|
|
13
|
+
import type { WidgetNode } from '@rangka/shared';
|
|
14
|
+
import type { WidgetProps } from '../types.js';
|
|
15
|
+
|
|
16
|
+
export function CardWidget({ props, children }: WidgetProps) {
|
|
17
|
+
const title = props.title as string | undefined;
|
|
18
|
+
const description = props.description as string | undefined;
|
|
19
|
+
const size = (props.size as 'default' | 'sm') ?? 'default';
|
|
20
|
+
const actions = props.actions as WidgetNode[] | undefined;
|
|
21
|
+
const footer = props.footer as WidgetNode[] | undefined;
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Card size={size}>
|
|
25
|
+
{(title || description || actions) && (
|
|
26
|
+
<CardHeader>
|
|
27
|
+
{title && <CardTitle>{title}</CardTitle>}
|
|
28
|
+
{description && <CardDescription>{description}</CardDescription>}
|
|
29
|
+
{actions && actions.length > 0 && (
|
|
30
|
+
<CardAction>
|
|
31
|
+
<div className="flex items-center gap-2">
|
|
32
|
+
{actions.map((node, i) => (
|
|
33
|
+
<WidgetRenderer key={node.id ?? i} node={node} />
|
|
34
|
+
))}
|
|
35
|
+
</div>
|
|
36
|
+
</CardAction>
|
|
37
|
+
)}
|
|
38
|
+
</CardHeader>
|
|
39
|
+
)}
|
|
40
|
+
<CardContent>
|
|
41
|
+
<SurfaceProvider value="card">{children}</SurfaceProvider>
|
|
42
|
+
</CardContent>
|
|
43
|
+
{footer && footer.length > 0 && (
|
|
44
|
+
<CardFooter>
|
|
45
|
+
{footer.map((node, i) => (
|
|
46
|
+
<WidgetRenderer key={node.id ?? i} node={node} />
|
|
47
|
+
))}
|
|
48
|
+
</CardFooter>
|
|
49
|
+
)}
|
|
50
|
+
</Card>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
CardWidget.widgetMeta = {
|
|
55
|
+
name: 'card',
|
|
56
|
+
label: 'Card',
|
|
57
|
+
category: 'layout' as const,
|
|
58
|
+
schema: {
|
|
59
|
+
title: { type: 'string' as const },
|
|
60
|
+
description: { type: 'string' as const },
|
|
61
|
+
size: { type: 'enum' as const, options: ['default', 'sm'], default: 'default' },
|
|
62
|
+
actions: { type: 'array' as const },
|
|
63
|
+
footer: { type: 'array' as const },
|
|
64
|
+
},
|
|
65
|
+
binding: 'none' as const,
|
|
66
|
+
triggers: [],
|
|
67
|
+
container: true,
|
|
68
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Checkbox } from '@/components/ui/checkbox';
|
|
3
|
+
import type { WidgetProps } from '../types.js';
|
|
4
|
+
|
|
5
|
+
export function CheckboxWidget({ props, bind, on }: WidgetProps) {
|
|
6
|
+
const label = (props.label as string) ?? bind.meta?.label ?? '';
|
|
7
|
+
const disabled = (props.disabled as boolean) ?? bind.meta?.readOnly ?? false;
|
|
8
|
+
const error = bind.error;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div className="flex flex-col gap-1">
|
|
12
|
+
<div className="flex items-center gap-2">
|
|
13
|
+
<Checkbox
|
|
14
|
+
checked={(bind.value as boolean) ?? false}
|
|
15
|
+
onCheckedChange={(checked) => {
|
|
16
|
+
bind.setValue?.(checked);
|
|
17
|
+
on.change?.(checked);
|
|
18
|
+
}}
|
|
19
|
+
disabled={disabled}
|
|
20
|
+
/>
|
|
21
|
+
{label && <span className="text-sm text-foreground">{label}</span>}
|
|
22
|
+
</div>
|
|
23
|
+
{error && <p className="text-xs text-destructive">{error}</p>}
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
CheckboxWidget.widgetMeta = {
|
|
29
|
+
name: 'checkbox',
|
|
30
|
+
label: 'Checkbox',
|
|
31
|
+
category: 'input' as const,
|
|
32
|
+
schema: {
|
|
33
|
+
label: { type: 'string' as const },
|
|
34
|
+
disabled: { type: 'boolean' as const, default: false },
|
|
35
|
+
},
|
|
36
|
+
binding: 'field' as const,
|
|
37
|
+
triggers: ['change'],
|
|
38
|
+
container: false,
|
|
39
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Textarea } from '@/components/ui/textarea';
|
|
3
|
+
import { Field, FieldLabel } from '@/components/ui/field';
|
|
4
|
+
import type { WidgetProps } from '../types.js';
|
|
5
|
+
|
|
6
|
+
export function CodeWidget({ props, bind, on }: WidgetProps) {
|
|
7
|
+
const label = (props.label as string) ?? bind.meta?.label ?? '';
|
|
8
|
+
const rows = (props.rows as number) ?? 6;
|
|
9
|
+
const disabled = (props.disabled as boolean) ?? bind.meta?.readOnly ?? false;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Field>
|
|
13
|
+
{label && <FieldLabel>{label}</FieldLabel>}
|
|
14
|
+
<Textarea
|
|
15
|
+
value={(bind.value as string) ?? ''}
|
|
16
|
+
onChange={(e) => {
|
|
17
|
+
bind.setValue?.(e.target.value);
|
|
18
|
+
on.change?.(e.target.value);
|
|
19
|
+
}}
|
|
20
|
+
onFocus={() => on.focus?.()}
|
|
21
|
+
onBlur={() => on.blur?.()}
|
|
22
|
+
rows={rows}
|
|
23
|
+
disabled={disabled}
|
|
24
|
+
className="font-mono text-xs"
|
|
25
|
+
spellCheck={false}
|
|
26
|
+
/>
|
|
27
|
+
</Field>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
CodeWidget.widgetMeta = {
|
|
32
|
+
name: 'code',
|
|
33
|
+
label: 'Code',
|
|
34
|
+
category: 'input' as const,
|
|
35
|
+
schema: {
|
|
36
|
+
label: { type: 'string' as const },
|
|
37
|
+
language: { type: 'string' as const },
|
|
38
|
+
rows: { type: 'number' as const, default: 6 },
|
|
39
|
+
disabled: { type: 'boolean' as const, default: false },
|
|
40
|
+
},
|
|
41
|
+
binding: 'field' as const,
|
|
42
|
+
triggers: ['change', 'focus', 'blur'],
|
|
43
|
+
container: false,
|
|
44
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WidgetProps } from '../types.js';
|
|
3
|
+
|
|
4
|
+
export function ColumnWidget({ children }: WidgetProps) {
|
|
5
|
+
return <>{children}</>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
ColumnWidget.widgetMeta = {
|
|
9
|
+
name: 'column',
|
|
10
|
+
label: 'Column',
|
|
11
|
+
category: 'layout' as const,
|
|
12
|
+
schema: {
|
|
13
|
+
label: { type: 'string' as const, required: true },
|
|
14
|
+
width: { type: 'string' as const },
|
|
15
|
+
align: { type: 'enum' as const, options: ['left', 'center', 'right'], default: 'left' },
|
|
16
|
+
sortable: { type: 'boolean' as const },
|
|
17
|
+
filterable: { type: 'boolean' as const },
|
|
18
|
+
},
|
|
19
|
+
binding: 'none' as const,
|
|
20
|
+
triggers: [],
|
|
21
|
+
container: true,
|
|
22
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Field, FieldLabel } from '@/components/ui/field';
|
|
3
|
+
import type { WidgetProps } from '../types.js';
|
|
4
|
+
|
|
5
|
+
export function ComputedWidget({ props, bind }: WidgetProps) {
|
|
6
|
+
const label = (props.label as string) ?? bind.meta?.label ?? '';
|
|
7
|
+
const format = (props.format as string) ?? 'text';
|
|
8
|
+
const value = bind.value;
|
|
9
|
+
|
|
10
|
+
const formatValue = (val: unknown): string => {
|
|
11
|
+
if (val == null) return '—';
|
|
12
|
+
if (format === 'number' && typeof val === 'number') {
|
|
13
|
+
return val.toLocaleString();
|
|
14
|
+
}
|
|
15
|
+
if (format === 'currency' && typeof val === 'number') {
|
|
16
|
+
return val.toFixed(2);
|
|
17
|
+
}
|
|
18
|
+
if (format === 'date' && typeof val === 'string') {
|
|
19
|
+
return new Date(val).toLocaleDateString();
|
|
20
|
+
}
|
|
21
|
+
return String(val);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Field>
|
|
26
|
+
{label && <FieldLabel>{label}</FieldLabel>}
|
|
27
|
+
<div className="flex items-center h-7 text-sm" data-testid="computed-value">
|
|
28
|
+
{formatValue(value)}
|
|
29
|
+
</div>
|
|
30
|
+
</Field>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
ComputedWidget.widgetMeta = {
|
|
35
|
+
name: 'computed',
|
|
36
|
+
label: 'Computed',
|
|
37
|
+
category: 'display' as const,
|
|
38
|
+
schema: {
|
|
39
|
+
label: { type: 'string' as const },
|
|
40
|
+
format: {
|
|
41
|
+
type: 'enum' as const,
|
|
42
|
+
options: ['text', 'number', 'currency', 'date'],
|
|
43
|
+
default: 'text',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
binding: 'field' as const,
|
|
47
|
+
triggers: [],
|
|
48
|
+
container: false,
|
|
49
|
+
};
|