@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,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
|
3
|
+
import type { WidgetProps } from '../types.js';
|
|
4
|
+
import { usePageState } from '../hooks/usePageState.js';
|
|
5
|
+
|
|
6
|
+
const sizeMap = {
|
|
7
|
+
sm: 'sm:max-w-sm',
|
|
8
|
+
md: 'sm:max-w-lg',
|
|
9
|
+
lg: 'sm:max-w-3xl',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export function ModalWidget({ props, children }: WidgetProps) {
|
|
13
|
+
const title = (props.title as string) ?? '';
|
|
14
|
+
const size = (props.size as 'sm' | 'md' | 'lg') ?? 'md';
|
|
15
|
+
const closable = (props.closable as boolean) ?? true;
|
|
16
|
+
const visibleField = props._visibleField as string | undefined;
|
|
17
|
+
const state = usePageState();
|
|
18
|
+
|
|
19
|
+
const handleOpenChange = (open: boolean) => {
|
|
20
|
+
if (!open && closable && visibleField && visibleField.startsWith('$state.')) {
|
|
21
|
+
const key = visibleField.slice(7);
|
|
22
|
+
state.set(key, false);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<Dialog open={true} onOpenChange={handleOpenChange}>
|
|
28
|
+
<DialogContent className={sizeMap[size]} showCloseButton={closable}>
|
|
29
|
+
{title && (
|
|
30
|
+
<DialogHeader>
|
|
31
|
+
<DialogTitle>{title}</DialogTitle>
|
|
32
|
+
</DialogHeader>
|
|
33
|
+
)}
|
|
34
|
+
{children}
|
|
35
|
+
</DialogContent>
|
|
36
|
+
</Dialog>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
ModalWidget.widgetMeta = {
|
|
41
|
+
name: 'modal',
|
|
42
|
+
label: 'Modal',
|
|
43
|
+
category: 'layout' as const,
|
|
44
|
+
schema: {
|
|
45
|
+
size: { type: 'enum' as const, options: ['sm', 'md', 'lg'], default: 'md' },
|
|
46
|
+
title: { type: 'string' as const },
|
|
47
|
+
closable: { type: 'boolean' as const, default: true },
|
|
48
|
+
},
|
|
49
|
+
binding: 'none' as const,
|
|
50
|
+
triggers: [],
|
|
51
|
+
container: true,
|
|
52
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Input } from '@/components/ui/input';
|
|
3
|
+
import { Field, FieldLabel } from '@/components/ui/field';
|
|
4
|
+
import type { WidgetProps } from '../types.js';
|
|
5
|
+
|
|
6
|
+
export function MoneyWidget({ props, bind, on }: WidgetProps) {
|
|
7
|
+
const label = (props.label as string) ?? bind.meta?.label ?? '';
|
|
8
|
+
const currency = (props.currency as string) ?? '$';
|
|
9
|
+
const disabled = (props.disabled as boolean) ?? bind.meta?.readOnly ?? false;
|
|
10
|
+
const readOnly = (props.readOnly as boolean) ?? bind.meta?.readOnly ?? false;
|
|
11
|
+
const error = bind.error;
|
|
12
|
+
|
|
13
|
+
const rawValue = bind.value as number | null | undefined;
|
|
14
|
+
const [displayValue, setDisplayValue] = useState<string>(
|
|
15
|
+
rawValue != null ? rawValue.toFixed(2) : '',
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
19
|
+
const text = e.target.value;
|
|
20
|
+
setDisplayValue(text);
|
|
21
|
+
const num = parseFloat(text);
|
|
22
|
+
if (!isNaN(num)) {
|
|
23
|
+
bind.setValue?.(num);
|
|
24
|
+
on.change?.(num);
|
|
25
|
+
} else if (text === '') {
|
|
26
|
+
bind.setValue?.(null);
|
|
27
|
+
on.change?.(null);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const handleFocus = () => {
|
|
32
|
+
on.focus?.();
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const handleBlur = () => {
|
|
36
|
+
const num = parseFloat(displayValue);
|
|
37
|
+
if (!isNaN(num)) {
|
|
38
|
+
setDisplayValue(num.toFixed(2));
|
|
39
|
+
}
|
|
40
|
+
on.blur?.();
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<Field>
|
|
45
|
+
{label && <FieldLabel>{label}</FieldLabel>}
|
|
46
|
+
<div className="flex items-center">
|
|
47
|
+
<span className="inline-flex h-8 items-center border border-r-0 border-input bg-muted px-2 text-xs text-muted-foreground">
|
|
48
|
+
{currency}
|
|
49
|
+
</span>
|
|
50
|
+
<Input
|
|
51
|
+
type="text"
|
|
52
|
+
inputMode="decimal"
|
|
53
|
+
value={displayValue}
|
|
54
|
+
onChange={handleChange}
|
|
55
|
+
onFocus={handleFocus}
|
|
56
|
+
onBlur={handleBlur}
|
|
57
|
+
disabled={disabled}
|
|
58
|
+
readOnly={readOnly}
|
|
59
|
+
placeholder="0.00"
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
{error && <p className="text-xs text-destructive mt-1">{error}</p>}
|
|
63
|
+
</Field>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
MoneyWidget.widgetMeta = {
|
|
68
|
+
name: 'money',
|
|
69
|
+
label: 'Money',
|
|
70
|
+
category: 'input' as const,
|
|
71
|
+
schema: {
|
|
72
|
+
label: { type: 'string' as const },
|
|
73
|
+
currency: { type: 'string' as const, default: '$' },
|
|
74
|
+
disabled: { type: 'boolean' as const, default: false },
|
|
75
|
+
readOnly: { type: 'boolean' as const, default: false },
|
|
76
|
+
},
|
|
77
|
+
binding: 'field' as const,
|
|
78
|
+
triggers: ['change', 'focus', 'blur'],
|
|
79
|
+
container: false,
|
|
80
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WidgetProps } from '../types.js';
|
|
3
|
+
import { useWidgetContext } from '../hooks/useWidgetContext.js';
|
|
4
|
+
import { WidgetContextProvider } from '../hooks/useWidgetContext.js';
|
|
5
|
+
import { buildRowContext } from '../context/builder.js';
|
|
6
|
+
|
|
7
|
+
export function RepeatWidget({ props, bind: bindProp, children }: WidgetProps) {
|
|
8
|
+
const ctx = useWidgetContext();
|
|
9
|
+
|
|
10
|
+
const layout = (props.layout as string) ?? 'list';
|
|
11
|
+
const columns = (props.columns as number) ?? 3;
|
|
12
|
+
const gap = (props.gap as string) ?? 'md';
|
|
13
|
+
|
|
14
|
+
// Determine source records:
|
|
15
|
+
// 1. If bind.value is an array (from bind.field on parent record), use that
|
|
16
|
+
// 2. Otherwise, read records from parent context (data widget in collection mode)
|
|
17
|
+
let records: Record<string, unknown>[] = [];
|
|
18
|
+
|
|
19
|
+
if (Array.isArray(bindProp.value)) {
|
|
20
|
+
records = bindProp.value as Record<string, unknown>[];
|
|
21
|
+
} else if (ctx.records) {
|
|
22
|
+
records = ctx.records;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const gapMap: Record<string, string> = { sm: '8px', md: '16px', lg: '24px' };
|
|
26
|
+
|
|
27
|
+
const containerStyle: React.CSSProperties =
|
|
28
|
+
layout === 'grid'
|
|
29
|
+
? {
|
|
30
|
+
display: 'grid',
|
|
31
|
+
gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
|
|
32
|
+
gap: gapMap[gap] ?? gapMap.md,
|
|
33
|
+
}
|
|
34
|
+
: {
|
|
35
|
+
display: 'flex',
|
|
36
|
+
flexDirection: 'column',
|
|
37
|
+
gap: gapMap[gap] ?? gapMap.md,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<div style={containerStyle} data-widget="repeat" data-layout={layout}>
|
|
42
|
+
{records.map((record, index) => {
|
|
43
|
+
const rowCtx = buildRowContext(record, index, ctx);
|
|
44
|
+
return (
|
|
45
|
+
<WidgetContextProvider key={(record.id as string) ?? index} value={rowCtx}>
|
|
46
|
+
<div data-repeat-index={index}>{children}</div>
|
|
47
|
+
</WidgetContextProvider>
|
|
48
|
+
);
|
|
49
|
+
})}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
RepeatWidget.widgetMeta = {
|
|
55
|
+
name: 'repeat',
|
|
56
|
+
label: 'Repeat',
|
|
57
|
+
category: 'data' as const,
|
|
58
|
+
schema: {
|
|
59
|
+
layout: { type: 'enum' as const, options: ['list', 'grid'], default: 'list' },
|
|
60
|
+
columns: { type: 'number' as const, default: 3 },
|
|
61
|
+
gap: { type: 'enum' as const, options: ['sm', 'md', 'lg'], default: 'md' },
|
|
62
|
+
},
|
|
63
|
+
binding: 'field' as const,
|
|
64
|
+
triggers: [],
|
|
65
|
+
container: true,
|
|
66
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import { ScrollArea } from '@/components/ui/scroll-area';
|
|
4
|
+
import type { WidgetProps } from '../types.js';
|
|
5
|
+
|
|
6
|
+
export function ScrollAreaWidget({ props, children }: WidgetProps) {
|
|
7
|
+
const direction = (props.direction as 'vertical' | 'horizontal' | 'both') ?? 'vertical';
|
|
8
|
+
const height = props.height as string | undefined;
|
|
9
|
+
const maxHeight = props.maxHeight as string | undefined;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<ScrollArea
|
|
13
|
+
className={cn(
|
|
14
|
+
direction === 'horizontal' && 'overflow-x-auto',
|
|
15
|
+
height && (height === '100%' ? 'h-full' : `h-[${height}]`),
|
|
16
|
+
maxHeight && `max-h-[${maxHeight}]`,
|
|
17
|
+
)}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</ScrollArea>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
ScrollAreaWidget.widgetMeta = {
|
|
25
|
+
name: 'scroll-area',
|
|
26
|
+
label: 'Scroll Area',
|
|
27
|
+
category: 'layout' as const,
|
|
28
|
+
schema: {
|
|
29
|
+
direction: {
|
|
30
|
+
type: 'enum' as const,
|
|
31
|
+
options: ['vertical', 'horizontal', 'both'],
|
|
32
|
+
default: 'vertical',
|
|
33
|
+
},
|
|
34
|
+
height: { type: 'string' as const },
|
|
35
|
+
maxHeight: { type: 'string' as const },
|
|
36
|
+
},
|
|
37
|
+
binding: 'none' as const,
|
|
38
|
+
triggers: [],
|
|
39
|
+
container: true,
|
|
40
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import { ChevronRight } from 'lucide-react';
|
|
4
|
+
import type { SpacingToken } from '@rangka/shared';
|
|
5
|
+
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@/components/ui/collapsible';
|
|
6
|
+
import type { WidgetProps } from '../types.js';
|
|
7
|
+
|
|
8
|
+
const paddingMap: Record<SpacingToken, string> = {
|
|
9
|
+
none: 'p-0',
|
|
10
|
+
xs: 'p-1',
|
|
11
|
+
sm: 'p-2',
|
|
12
|
+
md: 'p-4',
|
|
13
|
+
lg: 'p-6',
|
|
14
|
+
xl: 'p-8',
|
|
15
|
+
'2xl': 'p-12',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export function SectionWidget({ props, children }: WidgetProps) {
|
|
19
|
+
const label = (props.label as string) ?? '';
|
|
20
|
+
const collapsible = (props.collapsible as boolean) ?? false;
|
|
21
|
+
const defaultCollapsed = (props.defaultCollapsed as boolean) ?? false;
|
|
22
|
+
const padding = (props.padding as SpacingToken) ?? 'md';
|
|
23
|
+
const icon = props.icon as string | undefined;
|
|
24
|
+
|
|
25
|
+
const [open, setOpen] = useState(!defaultCollapsed);
|
|
26
|
+
|
|
27
|
+
if (!collapsible) {
|
|
28
|
+
return (
|
|
29
|
+
<div className="flex flex-col">
|
|
30
|
+
<div className="flex items-center gap-2 border-b border-border pb-2 mb-3">
|
|
31
|
+
{icon && <span className="text-muted-foreground">{icon}</span>}
|
|
32
|
+
<h3 className="text-sm font-medium">{label}</h3>
|
|
33
|
+
</div>
|
|
34
|
+
<div className={cn(paddingMap[padding])}>{children}</div>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Collapsible open={open} onOpenChange={setOpen}>
|
|
41
|
+
<div className="flex flex-col">
|
|
42
|
+
<CollapsibleTrigger className="flex items-center gap-2 border-b border-border pb-2 mb-3 cursor-pointer hover:text-foreground/80">
|
|
43
|
+
<ChevronRight
|
|
44
|
+
className={cn(
|
|
45
|
+
'h-4 w-4 text-muted-foreground transition-transform duration-150',
|
|
46
|
+
open && 'rotate-90',
|
|
47
|
+
)}
|
|
48
|
+
/>
|
|
49
|
+
{icon && <span className="text-muted-foreground">{icon}</span>}
|
|
50
|
+
<h3 className="text-sm font-medium">{label}</h3>
|
|
51
|
+
</CollapsibleTrigger>
|
|
52
|
+
<CollapsibleContent>
|
|
53
|
+
<div className={cn(paddingMap[padding])}>{children}</div>
|
|
54
|
+
</CollapsibleContent>
|
|
55
|
+
</div>
|
|
56
|
+
</Collapsible>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
SectionWidget.widgetMeta = {
|
|
61
|
+
name: 'section',
|
|
62
|
+
label: 'Section',
|
|
63
|
+
category: 'layout' as const,
|
|
64
|
+
schema: {
|
|
65
|
+
label: { type: 'string' as const, required: true },
|
|
66
|
+
collapsible: { type: 'boolean' as const, default: false },
|
|
67
|
+
defaultCollapsed: { type: 'boolean' as const, default: false },
|
|
68
|
+
padding: {
|
|
69
|
+
type: 'enum' as const,
|
|
70
|
+
options: ['none', 'xs', 'sm', 'md', 'lg', 'xl', '2xl'],
|
|
71
|
+
default: 'md',
|
|
72
|
+
},
|
|
73
|
+
icon: { type: 'string' as const },
|
|
74
|
+
},
|
|
75
|
+
binding: 'none' as const,
|
|
76
|
+
triggers: [],
|
|
77
|
+
container: true,
|
|
78
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Select,
|
|
4
|
+
SelectTrigger,
|
|
5
|
+
SelectValue,
|
|
6
|
+
SelectContent,
|
|
7
|
+
SelectItem,
|
|
8
|
+
} from '@/components/ui/select';
|
|
9
|
+
import { Field, FieldLabel } from '@/components/ui/field';
|
|
10
|
+
import type { WidgetProps } from '../types.js';
|
|
11
|
+
|
|
12
|
+
export function SelectWidget({ props, bind, on }: WidgetProps) {
|
|
13
|
+
const label = (props.label as string) ?? bind.meta?.label ?? '';
|
|
14
|
+
const placeholder = (props.placeholder as string) ?? '';
|
|
15
|
+
const disabled = (props.disabled as boolean) ?? bind.meta?.readOnly ?? false;
|
|
16
|
+
const error = bind.error;
|
|
17
|
+
|
|
18
|
+
const rawOptions = (bind.meta?.options ?? []) as (string | { label: string; value: string })[];
|
|
19
|
+
const options = rawOptions.map((opt) =>
|
|
20
|
+
typeof opt === 'string' ? { label: opt, value: opt } : opt,
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Field>
|
|
25
|
+
{label && <FieldLabel>{label}</FieldLabel>}
|
|
26
|
+
<Select
|
|
27
|
+
value={(bind.value as string) ?? ''}
|
|
28
|
+
onValueChange={(val) => {
|
|
29
|
+
bind.setValue?.(val);
|
|
30
|
+
on.change?.(val);
|
|
31
|
+
}}
|
|
32
|
+
disabled={disabled}
|
|
33
|
+
>
|
|
34
|
+
<SelectTrigger>
|
|
35
|
+
<SelectValue placeholder={placeholder} />
|
|
36
|
+
</SelectTrigger>
|
|
37
|
+
<SelectContent>
|
|
38
|
+
{options.map((opt) => (
|
|
39
|
+
<SelectItem key={opt.value} value={opt.value}>
|
|
40
|
+
{opt.label}
|
|
41
|
+
</SelectItem>
|
|
42
|
+
))}
|
|
43
|
+
</SelectContent>
|
|
44
|
+
</Select>
|
|
45
|
+
{error && <p className="text-xs text-destructive mt-1">{error}</p>}
|
|
46
|
+
</Field>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
SelectWidget.widgetMeta = {
|
|
51
|
+
name: 'select',
|
|
52
|
+
label: 'Select',
|
|
53
|
+
category: 'input' as const,
|
|
54
|
+
schema: {
|
|
55
|
+
label: { type: 'string' as const },
|
|
56
|
+
placeholder: { type: 'string' as const },
|
|
57
|
+
searchable: { type: 'boolean' as const, default: false },
|
|
58
|
+
disabled: { type: 'boolean' as const, default: false },
|
|
59
|
+
},
|
|
60
|
+
binding: 'field' as const,
|
|
61
|
+
triggers: ['change'],
|
|
62
|
+
container: false,
|
|
63
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Badge } from '@/components/ui/badge';
|
|
3
|
+
import { Field, FieldLabel } from '@/components/ui/field';
|
|
4
|
+
import type { WidgetProps } from '../types.js';
|
|
5
|
+
|
|
6
|
+
export function SequenceWidget({ props, bind }: WidgetProps) {
|
|
7
|
+
const label = (props.label as string) ?? bind.meta?.label ?? '';
|
|
8
|
+
const value = bind.value as string | null | undefined;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<Field>
|
|
12
|
+
{label && <FieldLabel>{label}</FieldLabel>}
|
|
13
|
+
<div className="flex items-center h-7">
|
|
14
|
+
<Badge variant="secondary" className="font-mono text-xs">
|
|
15
|
+
{value || 'Auto'}
|
|
16
|
+
</Badge>
|
|
17
|
+
</div>
|
|
18
|
+
</Field>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
SequenceWidget.widgetMeta = {
|
|
23
|
+
name: 'sequence',
|
|
24
|
+
label: 'Sequence',
|
|
25
|
+
category: 'display' as const,
|
|
26
|
+
schema: {
|
|
27
|
+
label: { type: 'string' as const },
|
|
28
|
+
},
|
|
29
|
+
binding: 'field' as const,
|
|
30
|
+
triggers: [],
|
|
31
|
+
container: false,
|
|
32
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import type { WidgetProps } from '../types.js';
|
|
4
|
+
|
|
5
|
+
const sizeMap: Record<string, string> = {
|
|
6
|
+
xs: 'h-1',
|
|
7
|
+
sm: 'h-2',
|
|
8
|
+
md: 'h-4',
|
|
9
|
+
lg: 'h-6',
|
|
10
|
+
xl: 'h-8',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export function SpacerWidget({ props }: WidgetProps) {
|
|
14
|
+
const size = (props.size as string) ?? 'md';
|
|
15
|
+
|
|
16
|
+
return <div className={cn(sizeMap[size] ?? 'h-4')} aria-hidden="true" />;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
SpacerWidget.widgetMeta = {
|
|
20
|
+
name: 'spacer',
|
|
21
|
+
label: 'Spacer',
|
|
22
|
+
category: 'layout' as const,
|
|
23
|
+
schema: {
|
|
24
|
+
size: { type: 'enum' as const, options: ['xs', 'sm', 'md', 'lg', 'xl'], default: 'md' },
|
|
25
|
+
},
|
|
26
|
+
binding: 'none' as const,
|
|
27
|
+
triggers: [],
|
|
28
|
+
container: false,
|
|
29
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import type { SpacingToken } from '@rangka/shared';
|
|
4
|
+
import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from '@/components/ui/resizable';
|
|
5
|
+
import { WidgetRenderer } from '../renderer/WidgetRenderer.js';
|
|
6
|
+
import type { WidgetProps } from '../types.js';
|
|
7
|
+
|
|
8
|
+
const paddingMap: Record<SpacingToken, string> = {
|
|
9
|
+
none: 'p-0',
|
|
10
|
+
xs: 'p-1',
|
|
11
|
+
sm: 'p-2',
|
|
12
|
+
md: 'p-4',
|
|
13
|
+
lg: 'p-6',
|
|
14
|
+
xl: 'p-8',
|
|
15
|
+
'2xl': 'p-12',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export function SplitWidget({ props, childNodes }: WidgetProps) {
|
|
19
|
+
const sizes = props.sizes as number[] | undefined;
|
|
20
|
+
const direction = (props.direction as 'horizontal' | 'vertical') ?? 'horizontal';
|
|
21
|
+
const minSize = (props.minSize as number) ?? 10;
|
|
22
|
+
const padding = props.padding as SpacingToken | undefined;
|
|
23
|
+
|
|
24
|
+
const nodes = childNodes ?? [];
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<ResizablePanelGroup
|
|
28
|
+
orientation={direction}
|
|
29
|
+
className={cn('h-full w-full', padding && paddingMap[padding])}
|
|
30
|
+
>
|
|
31
|
+
{nodes.map((node, i) => (
|
|
32
|
+
<React.Fragment key={node.id ?? i}>
|
|
33
|
+
{i > 0 && <ResizableHandle withHandle />}
|
|
34
|
+
<ResizablePanel defaultSize={sizes?.[i] ?? 100 / nodes.length} minSize={minSize}>
|
|
35
|
+
<WidgetRenderer node={node} />
|
|
36
|
+
</ResizablePanel>
|
|
37
|
+
</React.Fragment>
|
|
38
|
+
))}
|
|
39
|
+
</ResizablePanelGroup>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
SplitWidget.widgetMeta = {
|
|
44
|
+
name: 'split',
|
|
45
|
+
label: 'Split',
|
|
46
|
+
category: 'layout' as const,
|
|
47
|
+
schema: {
|
|
48
|
+
sizes: { type: 'array' as const },
|
|
49
|
+
direction: {
|
|
50
|
+
type: 'enum' as const,
|
|
51
|
+
options: ['horizontal', 'vertical'],
|
|
52
|
+
default: 'horizontal',
|
|
53
|
+
},
|
|
54
|
+
minSize: { type: 'number' as const, default: 10 },
|
|
55
|
+
padding: { type: 'enum' as const, options: ['none', 'xs', 'sm', 'md', 'lg', 'xl', '2xl'] },
|
|
56
|
+
},
|
|
57
|
+
binding: 'none' as const,
|
|
58
|
+
triggers: [],
|
|
59
|
+
container: true,
|
|
60
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils';
|
|
3
|
+
import type { SpacingToken } from '@rangka/shared';
|
|
4
|
+
import type { WidgetProps } from '../types.js';
|
|
5
|
+
|
|
6
|
+
const paddingMap: Record<SpacingToken, string> = {
|
|
7
|
+
none: 'p-0',
|
|
8
|
+
xs: 'p-1',
|
|
9
|
+
sm: 'p-2',
|
|
10
|
+
md: 'p-4',
|
|
11
|
+
lg: 'p-6',
|
|
12
|
+
xl: 'p-8',
|
|
13
|
+
'2xl': 'p-12',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export function StackWidget({ props, children }: WidgetProps) {
|
|
17
|
+
const height = (props.height as string) ?? 'auto';
|
|
18
|
+
const padding = props.padding as SpacingToken | undefined;
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div
|
|
22
|
+
className={cn(
|
|
23
|
+
'relative',
|
|
24
|
+
height === 'auto' ? 'h-auto' : height === '100%' ? 'h-full' : `h-[${height}]`,
|
|
25
|
+
padding && paddingMap[padding],
|
|
26
|
+
)}
|
|
27
|
+
>
|
|
28
|
+
{children}
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
StackWidget.widgetMeta = {
|
|
34
|
+
name: 'stack',
|
|
35
|
+
label: 'Stack',
|
|
36
|
+
category: 'layout' as const,
|
|
37
|
+
schema: {
|
|
38
|
+
height: { type: 'string' as const, default: 'auto' },
|
|
39
|
+
padding: { type: 'enum' as const, options: ['none', 'xs', 'sm', 'md', 'lg', 'xl', '2xl'] },
|
|
40
|
+
},
|
|
41
|
+
binding: 'none' as const,
|
|
42
|
+
triggers: [],
|
|
43
|
+
container: true,
|
|
44
|
+
};
|