@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,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: add-widget
|
|
3
|
+
description: Adding a new widget component to packages/client. Use when creating any new widget type.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Before you write any code
|
|
7
|
+
|
|
8
|
+
1. Read an existing widget that is closest to what you are building:
|
|
9
|
+
- Input widget → `src/widgets/components/InputWidget.tsx`
|
|
10
|
+
- Display widget → `src/widgets/components/TextWidget.tsx`
|
|
11
|
+
- Container widget → `src/widgets/components/GroupWidget.tsx`
|
|
12
|
+
- Data widget → `src/widgets/components/DataWidget.tsx`
|
|
13
|
+
- Form widget → `src/widgets/form/FormWidget.tsx`
|
|
14
|
+
|
|
15
|
+
2. Read the shared hooks you MUST use:
|
|
16
|
+
- `src/widgets/hooks/useBind.ts` — binding resolution
|
|
17
|
+
- `src/widgets/hooks/useAction.ts` — trigger handlers
|
|
18
|
+
- `src/widgets/types.ts` — WidgetProps interface
|
|
19
|
+
|
|
20
|
+
3. Check if the logic you need already exists:
|
|
21
|
+
- Data fetching → `src/widgets/data/useModelRecord.ts` or `src/widgets/data/useModelQuery.ts`
|
|
22
|
+
- Form state → `src/widgets/form/FormContext.ts`
|
|
23
|
+
- Page state → `src/widgets/hooks/usePageState.ts`
|
|
24
|
+
- Expressions → `src/widgets/hooks/useExpression.ts`
|
|
25
|
+
|
|
26
|
+
## Widget file template
|
|
27
|
+
|
|
28
|
+
Every widget follows this exact structure:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import React from 'react';
|
|
32
|
+
import type { WidgetProps } from '../types.js';
|
|
33
|
+
|
|
34
|
+
export function MyWidget({ props, bind, on, children }: WidgetProps) {
|
|
35
|
+
// Read props (typed from schema below)
|
|
36
|
+
const label = (props.label as string) ?? bind.meta?.label ?? '';
|
|
37
|
+
|
|
38
|
+
// Read bound value (ALWAYS via bind, never via useWidgetContext)
|
|
39
|
+
const value = bind.value;
|
|
40
|
+
|
|
41
|
+
// Write via bind.setValue (ALWAYS, never direct state)
|
|
42
|
+
const handleChange = (newVal: unknown) => {
|
|
43
|
+
bind.setValue?.(newVal);
|
|
44
|
+
on.change?.(newVal); // fire trigger if applicable
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// Read error from bind (comes from FormContext automatically)
|
|
48
|
+
const error = bind.error;
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div>
|
|
52
|
+
{/* widget markup */}
|
|
53
|
+
{error && <p className="text-xs text-destructive mt-1">{error}</p>}
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
MyWidget.widgetMeta = {
|
|
59
|
+
name: 'my-widget',
|
|
60
|
+
label: 'My Widget',
|
|
61
|
+
category: 'input' as const, // input | display | layout | action | data
|
|
62
|
+
schema: {
|
|
63
|
+
label: { type: 'string' as const },
|
|
64
|
+
// ... prop definitions
|
|
65
|
+
},
|
|
66
|
+
binding: 'field' as const, // none | field | expression | record | model
|
|
67
|
+
triggers: ['change'], // events this widget fires via on.*
|
|
68
|
+
container: false, // true only if it renders children
|
|
69
|
+
};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Registration
|
|
73
|
+
|
|
74
|
+
After creating the widget file, register it in `src/widgets/components/register.ts`:
|
|
75
|
+
|
|
76
|
+
1. Add the import at the end of the import block
|
|
77
|
+
2. Add the component to the `builtInWidgets` array
|
|
78
|
+
|
|
79
|
+
## Rules
|
|
80
|
+
|
|
81
|
+
- Props come from `props` (page definition config), NEVER from custom React props
|
|
82
|
+
- Bound value comes from `bind.value`, NEVER from `useWidgetContext().record` directly
|
|
83
|
+
- Writing goes through `bind.setValue`, which automatically handles form state integration
|
|
84
|
+
- Triggers fire through `on.triggerName?.()`, NEVER by calling `dispatch` directly
|
|
85
|
+
- Container widgets that provide new context use `childNodes` + `WidgetRenderer`, not `children`
|
|
86
|
+
- All widgets use the `WidgetProps` interface unchanged. If you need a new field, update the shared type and ALL consumers
|
|
87
|
+
- Use shadcn components from `src/components/ui/` for UI primitives
|
|
88
|
+
- Use Tailwind classes, never inline styles
|
|
89
|
+
- Error display pattern: `{bind.error && <p className="text-xs text-destructive mt-1">{bind.error}</p>}`
|
|
90
|
+
|
|
91
|
+
## Checklist before done
|
|
92
|
+
|
|
93
|
+
- [ ] Widget accepts only `WidgetProps` (no custom props)
|
|
94
|
+
- [ ] Uses `bind.value` / `bind.setValue` for data (not custom state)
|
|
95
|
+
- [ ] Fires triggers via `on.*` (not dispatch)
|
|
96
|
+
- [ ] Has `widgetMeta` with all fields
|
|
97
|
+
- [ ] Registered in `register.ts`
|
|
98
|
+
- [ ] If container: renders via `childNodes` + `WidgetRenderer` when providing new context
|
|
99
|
+
- [ ] If input: displays `bind.error` below the field
|
|
100
|
+
- [ ] No new hooks that duplicate existing ones (useBind, useModelRecord, etc.)
|
|
101
|
+
- [ ] Builds successfully: `pnpm --filter @rangka/client build`
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
> @rangka/client@0.0.1 build /home/runner/work/rangka-framework/rangka-framework/packages/client
|
|
3
|
+
> tsc --build && vite build --outDir dist/shell
|
|
4
|
+
|
|
5
|
+
[36mvite v6.4.3 [32mbuilding for production...[36m[39m
|
|
6
|
+
transforming...
|
|
7
|
+
[32m✓[39m 3086 modules transformed.
|
|
8
|
+
rendering chunks...
|
|
9
|
+
[33m[plugin vite:reporter]
|
|
10
|
+
(!) /home/runner/work/rangka-framework/rangka-framework/packages/client/src/widgets/condition/evaluator.ts is dynamically imported by /home/runner/work/rangka-framework/rangka-framework/packages/client/src/widgets/action/dispatcher.ts but also statically imported by /home/runner/work/rangka-framework/rangka-framework/packages/client/src/widgets/condition/index.ts, dynamic import will not move module into another chunk.
|
|
11
|
+
[39m
|
|
12
|
+
computing gzip size...
|
|
13
|
+
[2mdist/shell/[22m[32mindex.html [39m[1m[2m 0.39 kB[22m[1m[22m[2m │ gzip: 0.26 kB[22m
|
|
14
|
+
[2mdist/shell/[22m[2massets/[22m[32minter-vietnamese-wght-normal-CBcvBZtf.woff2 [39m[1m[2m 10.25 kB[22m[1m[22m
|
|
15
|
+
[2mdist/shell/[22m[2massets/[22m[32minter-greek-ext-wght-normal-DlzME5K_.woff2 [39m[1m[2m 11.23 kB[22m[1m[22m
|
|
16
|
+
[2mdist/shell/[22m[2massets/[22m[32minter-cyrillic-wght-normal-DqGufNeO.woff2 [39m[1m[2m 18.75 kB[22m[1m[22m
|
|
17
|
+
[2mdist/shell/[22m[2massets/[22m[32minter-greek-wght-normal-CkhJZR-_.woff2 [39m[1m[2m 19.00 kB[22m[1m[22m
|
|
18
|
+
[2mdist/shell/[22m[2massets/[22m[32minter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 [39m[1m[2m 25.96 kB[22m[1m[22m
|
|
19
|
+
[2mdist/shell/[22m[2massets/[22m[32minter-latin-wght-normal-Dx4kXJAl.woff2 [39m[1m[2m 48.26 kB[22m[1m[22m
|
|
20
|
+
[2mdist/shell/[22m[2massets/[22m[32minter-latin-ext-wght-normal-DO1Apj_S.woff2 [39m[1m[2m 85.07 kB[22m[1m[22m
|
|
21
|
+
[2mdist/shell/[22m[2massets/[22m[35mindex-COLmoPYo.css [39m[1m[2m 164.49 kB[22m[1m[22m[2m │ gzip: 24.29 kB[22m
|
|
22
|
+
[2mdist/shell/[22m[2massets/[22m[36mindex-Ck_eod9F.js [39m[1m[2m 2.90 kB[22m[1m[22m[2m │ gzip: 1.13 kB[22m
|
|
23
|
+
[2mdist/shell/[22m[2massets/[22m[36mindex--35CAvcP.js [39m[1m[33m1,559.64 kB[39m[22m[2m │ gzip: 373.20 kB[22m
|
|
24
|
+
[33m
|
|
25
|
+
(!) Some chunks are larger than 500 kB after minification. Consider:
|
|
26
|
+
- Using dynamic import() to code-split the application
|
|
27
|
+
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
|
|
28
|
+
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.[39m
|
|
29
|
+
[32m✓ built in 5.11s[39m
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# CLAUDE.md — @rangka/client
|
|
2
|
+
|
|
3
|
+
## Package overview
|
|
4
|
+
|
|
5
|
+
The Rangka client shell — a pre-built SPA that serves as the runtime UI for all Rangka applications. It fetches metadata from the server (models, pages, navigation, permissions) and renders a complete admin interface without user code. Custom views/fields/cards are loaded as async chunks from `.rangka/`.
|
|
6
|
+
|
|
7
|
+
## Tech stack
|
|
8
|
+
|
|
9
|
+
- React 19, TypeScript 5
|
|
10
|
+
- Tailwind CSS v4 (via `@tailwindcss/vite`)
|
|
11
|
+
- TanStack Router (dynamic route building from page definitions)
|
|
12
|
+
- TanStack React Query (data fetching, caching, mutations)
|
|
13
|
+
- shadcn/ui — local component primitives in `src/components/ui/`
|
|
14
|
+
- `@rangka/shared` — shared types (PageDefinition, WidgetNode, LayoutProps, etc.)
|
|
15
|
+
|
|
16
|
+
## Project structure
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
src/
|
|
20
|
+
├── api/ — HTTP client, auth, token, boot payload fetch
|
|
21
|
+
├── auth/ — Login form, session expired screen
|
|
22
|
+
├── boot/ — Boot state machine (BootProvider, BootGate, useBoot)
|
|
23
|
+
├── components/
|
|
24
|
+
│ └── ui/ — Local shadcn components (Collapsible, ResizablePanel, ScrollArea, etc.)
|
|
25
|
+
├── context/ — React contexts (Meta, Permissions, User, ShellProviders)
|
|
26
|
+
├── data/ — Data hooks (useSource, useRecord, useMutation, QueryProvider)
|
|
27
|
+
├── router/ — Dynamic router (createShellRouter, buildRouteTree, hooks)
|
|
28
|
+
├── shell/ — Shell layout (ShellLayout, Sidebar, PageOutlet, etc.)
|
|
29
|
+
├── widgets/
|
|
30
|
+
│ ├── action/ — Action dispatcher and handler types
|
|
31
|
+
│ ├── binding/ — Binding resolver (field, expression, model)
|
|
32
|
+
│ ├── components/ — Widget implementations (one file per widget)
|
|
33
|
+
│ ├── context/ — WidgetContext type and builder
|
|
34
|
+
│ ├── data/ — Shared data hooks (useModelRecord, useModelQuery)
|
|
35
|
+
│ ├── form/ — FormWidget, FormContext, form state/validation/submit
|
|
36
|
+
│ ├── hooks/ — Shared widget hooks (useBind, useAction, useCondition, etc.)
|
|
37
|
+
│ ├── lib/ — Layout prop resolver, spacing maps
|
|
38
|
+
│ ├── renderer/ — WidgetRenderer (resolves props, applies layout wrapper)
|
|
39
|
+
│ └── state/ — Page-level state store (magic variables: $filter, $sort, $page, $search)
|
|
40
|
+
├── App.tsx — Root component
|
|
41
|
+
├── main.tsx — Entry point
|
|
42
|
+
└── index.ts — Public exports
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Widget system internals
|
|
46
|
+
|
|
47
|
+
Every widget follows the same architecture. Understand this before creating or modifying any widget.
|
|
48
|
+
|
|
49
|
+
### WidgetProps contract
|
|
50
|
+
|
|
51
|
+
All widgets receive a single `WidgetProps` object. This is the public API. Never add custom props outside this interface.
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
interface WidgetProps {
|
|
55
|
+
props: Record<string, unknown>; // widget-specific config from page definition
|
|
56
|
+
bind: {
|
|
57
|
+
value: unknown; // resolved binding value
|
|
58
|
+
setValue?: (val: unknown) => void; // setter (only for input widgets)
|
|
59
|
+
meta?: FieldMeta; // field metadata from model
|
|
60
|
+
error?: string; // validation error from FormContext
|
|
61
|
+
id?: string; // resolved record ID
|
|
62
|
+
};
|
|
63
|
+
on: Record<string, (...args: unknown[]) => void>; // trigger handlers
|
|
64
|
+
context: { record; model; mode; index }; // parent widget context
|
|
65
|
+
childNodes?: WidgetNode[]; // raw children for container widgets
|
|
66
|
+
children?: ReactNode; // pre-rendered children
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Shared hooks (MUST reuse, never recreate)
|
|
71
|
+
|
|
72
|
+
| Hook | Location | Purpose |
|
|
73
|
+
| ---------------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------- |
|
|
74
|
+
| `useBind` | `widgets/hooks/useBind.ts` | Resolves binding to value/setValue/meta. Integrates with FormContext automatically. |
|
|
75
|
+
| `useAction` / `useTriggerHandlers` | `widgets/hooks/useAction.ts` | Dispatches actions. Merges form handlers when inside FormContext. |
|
|
76
|
+
| `useWidgetContext` | `widgets/hooks/useWidgetContext.ts` | Access current WidgetContext (record, model, mode). |
|
|
77
|
+
| `useCondition` | `widgets/hooks/useCondition.ts` | Evaluates visibility conditions. |
|
|
78
|
+
| `useModelRecord` | `widgets/data/useModelRecord.ts` | Fetch single record by model + id. Uses TanStack Query. |
|
|
79
|
+
| `useModelQuery` | `widgets/data/useModelQuery.ts` | Fetch list with pagination/sort/filter. Reads magic variables from StateStore. |
|
|
80
|
+
| `useDataQuery` | `widgets/hooks/useDataQuery.ts` | Low-level hook for magic variable integration. Used by useModelQuery. |
|
|
81
|
+
| `usePageState` | `widgets/hooks/usePageState.ts` | Access page-level StateStore for $filter, $sort, $page, $search. |
|
|
82
|
+
| `useFormContext` | `widgets/form/FormContext.ts` | Access form state. Returns null when not inside a FormProvider. |
|
|
83
|
+
|
|
84
|
+
### Binding resolution flow
|
|
85
|
+
|
|
86
|
+
1. `WidgetRenderer` calls `useBind(node.bind, fieldMeta, setValue)`
|
|
87
|
+
2. `useBind` calls `resolveBinding()` which handles field/expression/model bindings
|
|
88
|
+
3. If inside a `FormProvider` and bind has a field, `useBind` overrides with form-backed value/setValue/error
|
|
89
|
+
4. The resolved `BindingResult` is passed to the widget via `widgetProps.bind`
|
|
90
|
+
|
|
91
|
+
Widgets never call `resolveBinding` directly. They read from `bind.value` and write via `bind.setValue`.
|
|
92
|
+
|
|
93
|
+
### Action dispatch flow
|
|
94
|
+
|
|
95
|
+
1. `WidgetRenderer` calls `useTriggerHandlers(node.on, handlers, boundField)`
|
|
96
|
+
2. Each trigger wraps actions in a function that calls `dispatch(action, context, handlers)`
|
|
97
|
+
3. If inside a FormProvider, `form.submit` and `form.reset` handlers are merged automatically
|
|
98
|
+
4. Widgets receive the final handlers via `widgetProps.on`
|
|
99
|
+
|
|
100
|
+
Widgets fire triggers by calling `on.change?.(value)`, `on.click?.()`, etc. They never call `dispatch` directly.
|
|
101
|
+
|
|
102
|
+
### Widget registration pattern
|
|
103
|
+
|
|
104
|
+
Every widget file exports a component + static `widgetMeta`:
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
export function MyWidget({ props, bind, on }: WidgetProps) { ... }
|
|
108
|
+
|
|
109
|
+
MyWidget.widgetMeta = {
|
|
110
|
+
name: 'my-widget', // unique type key (used in page definitions)
|
|
111
|
+
label: 'My Widget',
|
|
112
|
+
category: 'input' | 'display' | 'layout' | 'action' | 'data',
|
|
113
|
+
schema: { ... }, // prop definitions
|
|
114
|
+
binding: 'none' | 'field' | 'expression' | 'record' | 'model',
|
|
115
|
+
triggers: ['change', ...], // events this widget can fire
|
|
116
|
+
container: false, // true if it renders children
|
|
117
|
+
};
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Then add the import + entry in `widgets/components/register.ts`.
|
|
121
|
+
|
|
122
|
+
### WidgetContext hierarchy
|
|
123
|
+
|
|
124
|
+
- `WidgetContext` holds `record`, `model`, `mode`, `parent`
|
|
125
|
+
- Container widgets (data, form, table, repeat) provide a new WidgetContext via `WidgetContextProvider`
|
|
126
|
+
- Child widgets read their nearest context via `useWidgetContext()`
|
|
127
|
+
- `buildContext(node, parentCtx)` in `widgets/context/builder.ts` derives child context from parent
|
|
128
|
+
|
|
129
|
+
### Container widgets that render children
|
|
130
|
+
|
|
131
|
+
Two patterns exist:
|
|
132
|
+
|
|
133
|
+
1. **Render `children` prop directly** (most layout widgets: group, grid, section, card, split)
|
|
134
|
+
2. **Render `childNodes` via WidgetRenderer** (data, form, repeat, table). Use this when the widget provides a new WidgetContext that children must inherit.
|
|
135
|
+
|
|
136
|
+
Pattern 2 avoids context shadowing. If you render pre-built `children`, they already have their own WidgetContextProvider from the renderer. Use `childNodes` + manual WidgetRenderer when your widget needs to inject context.
|
|
137
|
+
|
|
138
|
+
## Skills available
|
|
139
|
+
|
|
140
|
+
- **`add-widget`** — step-by-step for creating any new widget type with checklist
|
|
141
|
+
|
|
142
|
+
Read this skill before writing any new widget.
|
|
143
|
+
|
|
144
|
+
## Rules
|
|
145
|
+
|
|
146
|
+
### Layout widgets render Tailwind directly
|
|
147
|
+
|
|
148
|
+
Layout widgets (Group, Grid, Split, Section, Spacer, ScrollArea, Stack) render Tailwind utility classes directly.
|
|
149
|
+
|
|
150
|
+
- Group/Grid/Section/Spacer/Stack emit plain `<div>` elements with Tailwind classes
|
|
151
|
+
- Split uses shadcn ResizablePanelGroup from `src/components/ui/resizable.tsx`
|
|
152
|
+
- ScrollArea uses shadcn ScrollArea from `src/components/ui/scroll-area.tsx`
|
|
153
|
+
- Section uses shadcn Collapsible from `src/components/ui/collapsible.tsx`
|
|
154
|
+
|
|
155
|
+
### Universal layout props
|
|
156
|
+
|
|
157
|
+
Any widget can accept layout props (`flex`, `span`, `rowSpan`, `align`, `width`, `height`, `minWidth`, `maxWidth`, `minHeight`, `maxHeight`, `scroll`, `padding`, `paddingX`, `paddingY`, `margin`, `marginX`, `marginY`, `hidden`). These are defined in the flat `props` field alongside widget-specific props.
|
|
158
|
+
|
|
159
|
+
The WidgetRenderer extracts layout props and wraps the widget in a layout div when present. The resolver lives in `src/widgets/lib/layout-props.ts`.
|
|
160
|
+
|
|
161
|
+
### Spacing tokens
|
|
162
|
+
|
|
163
|
+
All spacing uses a 7-token scale on a 4px base grid:
|
|
164
|
+
|
|
165
|
+
| Token | Value | Tailwind |
|
|
166
|
+
| ----- | ----- | -------- |
|
|
167
|
+
| none | 0 | 0 |
|
|
168
|
+
| xs | 4px | 1 |
|
|
169
|
+
| sm | 8px | 2 |
|
|
170
|
+
| md | 16px | 4 |
|
|
171
|
+
| lg | 24px | 6 |
|
|
172
|
+
| xl | 32px | 8 |
|
|
173
|
+
| 2xl | 48px | 12 |
|
|
174
|
+
|
|
175
|
+
### Always refer to the design system
|
|
176
|
+
|
|
177
|
+
All visual decisions must follow `.interface-design/system.md` at the repo root. This includes:
|
|
178
|
+
|
|
179
|
+
- Color tokens (use semantic names: `text`, `text-muted`, `surface`, `border`, etc.)
|
|
180
|
+
- Spacing (4px grid via Tailwind utilities)
|
|
181
|
+
- Typography (`text-sm` as default body, `text-xs` for labels)
|
|
182
|
+
- Radius (`rounded-sm` for most elements)
|
|
183
|
+
- Transitions (`duration-fast` for hover/focus)
|
|
184
|
+
|
|
185
|
+
Never hardcode colors, shadows, or radii. Use the token system.
|
|
186
|
+
|
|
187
|
+
### Styling
|
|
188
|
+
|
|
189
|
+
- Use Tailwind utility classes exclusively — no inline styles, no CSS modules
|
|
190
|
+
- Dark mode via `[data-theme="dark"]` attribute
|
|
191
|
+
|
|
192
|
+
### Component patterns
|
|
193
|
+
|
|
194
|
+
- Layout widgets render Tailwind directly
|
|
195
|
+
- Non-layout widgets use local shadcn components from `src/components/ui/`
|
|
196
|
+
- Keep shell components focused — one concern per file
|
|
197
|
+
- Use the `useShell()` hook for toast, overlay, panel, and navigate actions
|
|
198
|
+
|
|
199
|
+
### Data flow
|
|
200
|
+
|
|
201
|
+
- All data comes from the server via `/api/meta/boot` (metadata) and `/api/{module}/{model}` (records)
|
|
202
|
+
- `useSource` for lists with pagination/sort/filter
|
|
203
|
+
- `useRecord` for single records
|
|
204
|
+
- `useMutation` for create/update/delete
|
|
205
|
+
- Never make raw fetch calls in components — use the data hooks
|
|
206
|
+
|
|
207
|
+
### Custom view loading
|
|
208
|
+
|
|
209
|
+
- Custom views are loaded via dynamic `import()` from the manifest at `/_rangka/manifest.json`
|
|
210
|
+
- The shell resolves view names: custom views take priority over built-in views
|
|
211
|
+
- Custom views receive `ViewProps` (source, config, shell, modelMeta)
|
|
212
|
+
|
|
213
|
+
## Commands
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
pnpm dev:client # Vite dev server on port 5173 (proxy to API on 3000)
|
|
217
|
+
pnpm playground # Start API server on port 3000
|
|
218
|
+
pnpm --filter @rangka/client build # Build shell → dist/shell/
|
|
219
|
+
pnpm --filter @rangka/client test # Run tests
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Don'ts
|
|
223
|
+
|
|
224
|
+
- Don't hardcode colors or spacing — use tokens
|
|
225
|
+
- Don't use inline styles — use Tailwind classes
|
|
226
|
+
- Don't fetch data without hooks — use useSource/useRecord/useMutation
|
|
227
|
+
- Don't import from `@rangka/core` — this is a browser package, core is server-only
|
|
228
|
+
- Don't add direct DOM manipulation — use React patterns and `rangka:*` events for cross-panel communication
|
|
229
|
+
- Don't create new data-fetching logic — use `useModelRecord` or `useModelQuery` from `widgets/data/`
|
|
230
|
+
- Don't bypass `useBind` — every widget reads data through `bind.value` and writes through `bind.setValue`
|
|
231
|
+
- Don't call `dispatch` directly from widgets — use the `on` handlers from WidgetProps
|
|
232
|
+
- Don't add props outside the `WidgetProps` interface — extend `props` or `bind` in the shared types if needed
|
|
233
|
+
- Don't create a new hook that duplicates `useBind`, `useAction`, `useModelRecord`, or `useModelQuery`
|
|
234
|
+
- Don't read `useWidgetContext()` for field values — use `bind.value` which already resolves context + form state
|
|
235
|
+
- Don't modify the `WidgetProps` interface without checking every existing widget that consumes it
|
|
236
|
+
- Don't register a widget without `widgetMeta` — the registry depends on it
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rangka
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# @rangka/client
|
|
2
|
+
|
|
3
|
+
Frontend application shell for the Rangka framework.
|
|
4
|
+
|
|
5
|
+
## How it works
|
|
6
|
+
|
|
7
|
+
A pre-built React SPA that renders the entire Rangka admin interface from server metadata. It fetches models, pages, navigation, and permissions from the boot API, then dynamically renders widgets without per-screen code. Custom views and fields are loaded as async chunks.
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
src/
|
|
13
|
+
├── api/ — HTTP client, auth headers, token refresh
|
|
14
|
+
├── auth/ — Login form, session expired screen
|
|
15
|
+
├── boot/ — Boot state machine (fetches metadata, gates rendering)
|
|
16
|
+
├── components/
|
|
17
|
+
│ └── ui/ — Local shadcn primitives (Collapsible, Input, ScrollArea, etc.)
|
|
18
|
+
├── context/ — React contexts (Meta, Permissions, User, ShellProviders)
|
|
19
|
+
├── data/ — Data hooks (useSource, useRecord, useMutation, QueryProvider)
|
|
20
|
+
├── router/ — Dynamic TanStack Router (builds route tree from page definitions)
|
|
21
|
+
├── shell/ — Shell layout (sidebar, panels, page outlet)
|
|
22
|
+
├── widgets/
|
|
23
|
+
│ ├── action/ — Action dispatcher and handler types
|
|
24
|
+
│ ├── binding/ — Binding resolver (field → value, expression, model)
|
|
25
|
+
│ ├── components/ — Widget implementations (one file per widget, ~35 widgets)
|
|
26
|
+
│ ├── context/ — WidgetContext type and builder
|
|
27
|
+
│ ├── data/ — Shared data hooks (useModelRecord, useModelQuery)
|
|
28
|
+
│ ├── form/ — FormWidget, FormContext, form state/validation/submit
|
|
29
|
+
│ ├── hooks/ — Shared widget hooks (useBind, useAction, useCondition, etc.)
|
|
30
|
+
│ ├── lib/ — Layout prop resolver, spacing maps
|
|
31
|
+
│ ├── renderer/ — WidgetRenderer (resolves props, binding, layout wrapper)
|
|
32
|
+
│ └── state/ — Page-level state store (magic variables)
|
|
33
|
+
├── App.tsx — Root component
|
|
34
|
+
├── main.tsx — Entry point
|
|
35
|
+
└── index.ts — Public exports
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Key internal systems
|
|
39
|
+
|
|
40
|
+
| System | Entry point | Purpose |
|
|
41
|
+
| --------------- | ------------------------------------- | ---------------------------------------------------------- |
|
|
42
|
+
| Widget Renderer | `widgets/renderer/WidgetRenderer.tsx` | Resolves binding, props, triggers, renders widget |
|
|
43
|
+
| Binding | `widgets/hooks/useBind.ts` | Resolves field/expression/model binding + form integration |
|
|
44
|
+
| Actions | `widgets/hooks/useAction.ts` | Trigger dispatch, form handler merging |
|
|
45
|
+
| Widget Context | `widgets/context/builder.ts` | Builds hierarchical context per widget |
|
|
46
|
+
| Data hooks | `widgets/data/` | useModelRecord, useModelQuery (TanStack Query) |
|
|
47
|
+
| Form system | `widgets/form/` | FormContext, state, validation, submit |
|
|
48
|
+
| Registration | `widgets/components/register.ts` | Maps widget type names to components |
|
|
49
|
+
| State store | `widgets/state/` | Magic variables ($filter, $sort, $page, $search) |
|
|
50
|
+
|
|
51
|
+
## Commands
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pnpm --filter @rangka/client build # Build shell → dist/
|
|
55
|
+
pnpm --filter @rangka/client test # Run tests
|
|
56
|
+
pnpm dev:client # Vite dev server (port 5173)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Contributing
|
|
60
|
+
|
|
61
|
+
- All widgets receive `WidgetProps` (defined in `widgets/types.ts`). Never add custom props outside this interface.
|
|
62
|
+
- All widgets read data through `bind.value` and write through `bind.setValue`. Never bypass `useBind`.
|
|
63
|
+
- All triggers fire through `on.triggerName?.()`. Never call `dispatch` directly from a widget.
|
|
64
|
+
- Shared hooks (`useBind`, `useAction`, `useModelRecord`, `useModelQuery`) must be reused. Never create parallel implementations.
|
|
65
|
+
- Container widgets that inject new context use `childNodes` + `WidgetRenderer`, not pre-built `children`.
|
|
66
|
+
- Every widget has a static `widgetMeta` and is registered in `register.ts`.
|
|
67
|
+
- This package imports from `@rangka/shared` only. Never import from `@rangka/core` (browser vs server boundary).
|
|
68
|
+
- Use Tailwind classes exclusively. Use shadcn components from `src/components/ui/`.
|
package/components.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "radix-nova",
|
|
4
|
+
"rsc": false,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "src/index.css",
|
|
9
|
+
"baseColor": "neutral",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"iconLibrary": "lucide",
|
|
14
|
+
"rtl": false,
|
|
15
|
+
"aliases": {
|
|
16
|
+
"components": "@/components",
|
|
17
|
+
"utils": "@/lib/utils",
|
|
18
|
+
"ui": "@/components/ui",
|
|
19
|
+
"lib": "@/lib",
|
|
20
|
+
"hooks": "@/hooks"
|
|
21
|
+
},
|
|
22
|
+
"menuColor": "default",
|
|
23
|
+
"menuAccent": "bold",
|
|
24
|
+
"registries": {}
|
|
25
|
+
}
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAqCA,wBAAgB,GAAG,gCAMlB"}
|
package/dist/App.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { BootProvider, useBootContext } from './boot/BootProvider.js';
|
|
4
|
+
import { BootGate } from './boot/BootGate.js';
|
|
5
|
+
import { ShellProviders } from './context/ShellProviders.js';
|
|
6
|
+
import { QueryProvider } from './data/QueryProvider.js';
|
|
7
|
+
import { createQueryClient } from './data/queryClient.js';
|
|
8
|
+
import { RouterProvider } from './router/RouterProvider.js';
|
|
9
|
+
import { createShellRouter } from './router/createShellRouter.js';
|
|
10
|
+
function AppInner() {
|
|
11
|
+
const { state, handleSessionExpired } = useBootContext();
|
|
12
|
+
const queryClient = useMemo(() => createQueryClient(handleSessionExpired), [handleSessionExpired]);
|
|
13
|
+
const router = useMemo(() => {
|
|
14
|
+
if (state.status === 'ready') {
|
|
15
|
+
return createShellRouter(state.data.pages);
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
}, [state]);
|
|
19
|
+
return (_jsx(BootGate, { children: state.status === 'ready' && router && (_jsx(ShellProviders, { data: state.data, children: _jsx(QueryProvider, { client: queryClient, children: _jsx(RouterProvider, { router: router }) }) })) }));
|
|
20
|
+
}
|
|
21
|
+
export function App() {
|
|
22
|
+
return (_jsx(BootProvider, { children: _jsx(AppInner, {}) }));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=App.js.map
|
package/dist/App.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,SAAS,QAAQ;IACf,MAAM,EAAE,KAAK,EAAE,oBAAoB,EAAE,GAAG,cAAc,EAAE,CAAC;IAEzD,MAAM,WAAW,GAAG,OAAO,CACzB,GAAG,EAAE,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,EAC7C,CAAC,oBAAoB,CAAC,CACvB,CAAC;IAEF,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;YAC7B,OAAO,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACL,KAAC,QAAQ,cACN,KAAK,CAAC,MAAM,KAAK,OAAO,IAAI,MAAM,IAAI,CACrC,KAAC,cAAc,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,YAC9B,KAAC,aAAa,IAAC,MAAM,EAAE,WAAW,YAChC,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI,GACpB,GACD,CAClB,GACQ,CACZ,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAG;IACjB,OAAO,CACL,KAAC,YAAY,cACX,KAAC,QAAQ,KAAG,GACC,CAChB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface LoginCredentials {
|
|
2
|
+
email: string;
|
|
3
|
+
password: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SetupCredentials {
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
password: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function login(credentials: LoginCredentials): Promise<Response>;
|
|
11
|
+
export declare function setup(credentials: SetupCredentials): Promise<Response>;
|
|
12
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/api/auth.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAsB,KAAK,CAAC,WAAW,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAY5E;AAED,wBAAsB,KAAK,CAAC,WAAW,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAY5E"}
|
package/dist/api/auth.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { apiClient } from './client.js';
|
|
2
|
+
import { setToken } from './token.js';
|
|
3
|
+
export async function login(credentials) {
|
|
4
|
+
const response = await apiClient('/api/core/session', {
|
|
5
|
+
method: 'POST',
|
|
6
|
+
body: JSON.stringify(credentials),
|
|
7
|
+
});
|
|
8
|
+
if (response.ok) {
|
|
9
|
+
const { data } = await response.json();
|
|
10
|
+
setToken(data.token);
|
|
11
|
+
}
|
|
12
|
+
return response;
|
|
13
|
+
}
|
|
14
|
+
export async function setup(credentials) {
|
|
15
|
+
const response = await apiClient('/api/core/setup', {
|
|
16
|
+
method: 'POST',
|
|
17
|
+
body: JSON.stringify(credentials),
|
|
18
|
+
});
|
|
19
|
+
if (response.ok) {
|
|
20
|
+
const { data } = await response.json();
|
|
21
|
+
setToken(data.token);
|
|
22
|
+
}
|
|
23
|
+
return response;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/api/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAatC,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,WAA6B;IACvD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,mBAAmB,EAAE;QACpD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;KAClC,CAAC,CAAC;IAEH,IAAI,QAAQ,CAAC,EAAE,EAAE,CAAC;QAChB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACvC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,WAA6B;IACvD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,iBAAiB,EAAE;QAClD,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;KAClC,CAAC,CAAC;IAEH,IAAI,QAAQ,CAAC,EAAE,EAAE,CAAC;QAChB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACvC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../src/api/boot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,wBAAsB,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC,CAMvD"}
|
package/dist/api/boot.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boot.js","sourceRoot":"","sources":["../../src/api/boot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACnD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,QAAQ,CAAC;IACjB,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,EAA2B,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAIA,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAqB1F"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getToken, clearToken } from './token.js';
|
|
2
|
+
const BASE_URL = '';
|
|
3
|
+
export async function apiClient(path, options = {}) {
|
|
4
|
+
const token = getToken();
|
|
5
|
+
const headers = {
|
|
6
|
+
'Content-Type': 'application/json',
|
|
7
|
+
...options.headers,
|
|
8
|
+
};
|
|
9
|
+
if (token) {
|
|
10
|
+
headers['Authorization'] = `Bearer ${token}`;
|
|
11
|
+
}
|
|
12
|
+
const response = await fetch(`${BASE_URL}${path}`, {
|
|
13
|
+
...options,
|
|
14
|
+
headers,
|
|
15
|
+
});
|
|
16
|
+
if (response.status === 401) {
|
|
17
|
+
clearToken();
|
|
18
|
+
window.dispatchEvent(new CustomEvent('rangka:session-expired'));
|
|
19
|
+
}
|
|
20
|
+
return response;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,QAAQ,GAAG,EAAE,CAAC;AAEpB,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAY,EAAE,UAAuB,EAAE;IACrE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,OAAO,GAA2B;QACtC,cAAc,EAAE,kBAAkB;QAClC,GAAI,OAAO,CAAC,OAAkC;KAC/C,CAAC;IACF,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,KAAK,EAAE,CAAC;IAC/C,CAAC;IAED,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,IAAI,EAAE,EAAE;QACjD,GAAG,OAAO;QACV,OAAO;KACR,CAAC,CAAC;IAEH,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QAC5B,UAAU,EAAE,CAAC;QACb,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/api/paths.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/api/paths.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC"}
|