@kestack/web-platform 0.0.0-stage → 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +523 -2
- package/dist/_virtual/_rolldown/runtime.js +27 -0
- package/dist/app/apis/apis.d.ts +55 -0
- package/dist/app/apis/apis.d.ts.map +1 -0
- package/dist/app/apis/apis.js +43 -0
- package/dist/app/apis/apis.js.map +1 -0
- package/dist/app/apis/index.d.ts +2 -0
- package/dist/app/apis/index.js +2 -0
- package/dist/app/app.d.ts +77 -0
- package/dist/app/app.d.ts.map +1 -0
- package/dist/app/app.js +118 -0
- package/dist/app/app.js.map +1 -0
- package/dist/app/assemble/assemble.d.ts +167 -0
- package/dist/app/assemble/assemble.d.ts.map +1 -0
- package/dist/app/assemble/assemble.js +186 -0
- package/dist/app/assemble/assemble.js.map +1 -0
- package/dist/app/assemble/index.d.ts +2 -0
- package/dist/app/assemble/index.js +2 -0
- package/dist/app/assemble/public.d.ts +18 -0
- package/dist/app/assemble/public.d.ts.map +1 -0
- package/dist/app/assemble/public.js +41 -0
- package/dist/app/assemble/public.js.map +1 -0
- package/dist/app/gate/domain/check.d.ts +33 -0
- package/dist/app/gate/domain/check.d.ts.map +1 -0
- package/dist/app/gate/domain/check.js +50 -0
- package/dist/app/gate/domain/check.js.map +1 -0
- package/dist/app/gate/domain/index.d.ts +4 -0
- package/dist/app/gate/domain/index.js +3 -0
- package/dist/app/gate/domain/machine.d.ts +180 -0
- package/dist/app/gate/domain/machine.d.ts.map +1 -0
- package/dist/app/gate/domain/machine.js +383 -0
- package/dist/app/gate/domain/machine.js.map +1 -0
- package/dist/app/gate/domain/services.d.ts +37 -0
- package/dist/app/gate/domain/services.d.ts.map +1 -0
- package/dist/app/gate/domain/services.js +13 -0
- package/dist/app/gate/domain/services.js.map +1 -0
- package/dist/app/gate/domain/types.d.ts +44 -0
- package/dist/app/gate/domain/types.d.ts.map +1 -0
- package/dist/app/gate/domain/types.js +0 -0
- package/dist/app/gate/gate.d.ts +86 -0
- package/dist/app/gate/gate.d.ts.map +1 -0
- package/dist/app/gate/gate.js +351 -0
- package/dist/app/gate/gate.js.map +1 -0
- package/dist/app/gate/index.d.ts +5 -0
- package/dist/app/gate/index.js +3 -0
- package/dist/app/gate/memory.d.ts +97 -0
- package/dist/app/gate/memory.d.ts.map +1 -0
- package/dist/app/gate/memory.js +48 -0
- package/dist/app/gate/memory.js.map +1 -0
- package/dist/app/gate/react.d.ts +74 -0
- package/dist/app/gate/react.d.ts.map +1 -0
- package/dist/app/gate/react.js +107 -0
- package/dist/app/gate/react.js.map +1 -0
- package/dist/app/host/host.d.ts +90 -0
- package/dist/app/host/host.d.ts.map +1 -0
- package/dist/app/host/host.js +75 -0
- package/dist/app/host/host.js.map +1 -0
- package/dist/app/host/index.d.ts +2 -0
- package/dist/app/host/index.js +2 -0
- package/dist/app/index.d.ts +4 -0
- package/dist/app/index.js +2 -0
- package/dist/app/session/define.d.ts +60 -0
- package/dist/app/session/define.d.ts.map +1 -0
- package/dist/app/session/define.js +31 -0
- package/dist/app/session/define.js.map +1 -0
- package/dist/app/session/index.d.ts +6 -0
- package/dist/app/session/index.js +6 -0
- package/dist/app/session/keeper.d.ts +17 -0
- package/dist/app/session/keeper.d.ts.map +1 -0
- package/dist/app/session/keeper.js +21 -0
- package/dist/app/session/keeper.js.map +1 -0
- package/dist/app/session/open.d.ts +44 -0
- package/dist/app/session/open.d.ts.map +1 -0
- package/dist/app/session/open.js +70 -0
- package/dist/app/session/open.js.map +1 -0
- package/dist/app/session/react.d.ts +17 -0
- package/dist/app/session/react.d.ts.map +1 -0
- package/dist/app/session/react.js +28 -0
- package/dist/app/session/react.js.map +1 -0
- package/dist/app/session/status.d.ts +24 -0
- package/dist/app/session/status.d.ts.map +1 -0
- package/dist/app/session/status.js +25 -0
- package/dist/app/session/status.js.map +1 -0
- package/dist/app/web-host.d.ts +16 -0
- package/dist/app/web-host.d.ts.map +1 -0
- package/dist/app/web-host.js +85 -0
- package/dist/app/web-host.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.js +2 -0
- package/dist/client/root/index.d.ts +2 -0
- package/dist/client/root/index.js +2 -0
- package/dist/client/root/root.d.ts +62 -0
- package/dist/client/root/root.d.ts.map +1 -0
- package/dist/client/root/root.js +92 -0
- package/dist/client/root/root.js.map +1 -0
- package/dist/client/server.d.ts +2 -0
- package/dist/client/server.js +2 -0
- package/dist/client/theme/index.d.ts +2 -0
- package/dist/client/theme/index.js +2 -0
- package/dist/client/theme/tanstack-start.d.ts +5 -0
- package/dist/client/theme/tanstack-start.d.ts.map +1 -0
- package/dist/client/theme/tanstack-start.js +9 -0
- package/dist/client/theme/tanstack-start.js.map +1 -0
- package/dist/components/hooks/use-element-width.d.ts +9 -0
- package/dist/components/hooks/use-element-width.d.ts.map +1 -0
- package/dist/components/hooks/use-element-width.js +26 -0
- package/dist/components/hooks/use-element-width.js.map +1 -0
- package/dist/components/hooks/use-mobile.d.ts +6 -0
- package/dist/components/hooks/use-mobile.d.ts.map +1 -0
- package/dist/components/hooks/use-mobile.js +16 -0
- package/dist/components/hooks/use-mobile.js.map +1 -0
- package/dist/components/hooks/use-scroll.d.ts +12 -0
- package/dist/components/hooks/use-scroll.d.ts.map +1 -0
- package/dist/components/hooks/use-scroll.js +198 -0
- package/dist/components/hooks/use-scroll.js.map +1 -0
- package/dist/components/lib/lucide.d.ts +1 -0
- package/dist/components/lib/lucide.js +10 -0
- package/dist/components/lib/lucide.js.map +1 -0
- package/dist/components/lib/motion.d.ts +1 -0
- package/dist/components/lib/motion.js +1 -0
- package/dist/components/lib/scrollStyles.d.ts +13 -0
- package/dist/components/lib/scrollStyles.d.ts.map +1 -0
- package/dist/components/lib/scrollStyles.js +19 -0
- package/dist/components/lib/scrollStyles.js.map +1 -0
- package/dist/components/lib/shadow-dom.d.ts +17 -0
- package/dist/components/lib/shadow-dom.d.ts.map +1 -0
- package/dist/components/lib/shadow-dom.js +50 -0
- package/dist/components/lib/shadow-dom.js.map +1 -0
- package/dist/components/lib/utils.d.ts +5 -0
- package/dist/components/lib/utils.d.ts.map +1 -0
- package/dist/components/lib/utils.js +10 -0
- package/dist/components/lib/utils.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +9 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +55 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +96 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +13 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +45 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +7 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +15 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/attachment.d.ts +26 -0
- package/dist/components/ui/attachment.d.ts.map +1 -0
- package/dist/components/ui/attachment.js +106 -0
- package/dist/components/ui/attachment.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +14 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +52 -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 +31 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +13 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +74 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/bubble.d.ts +19 -0
- package/dist/components/ui/bubble.d.ts.map +1 -0
- package/dist/components/ui/bubble.js +75 -0
- package/dist/components/ui/bubble.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +13 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +43 -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 +46 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +13 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +110 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +14 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +58 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +31 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +133 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +47 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +150 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +22 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +8 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +25 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +27 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +163 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +22 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +90 -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 +135 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +94 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.js +2 -0
- package/dist/components/ui/drawer.d.ts +19 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +125 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +35 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +141 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +14 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +61 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +27 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +111 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/file-tree.d.ts +62 -0
- package/dist/components/ui/file-tree.d.ts.map +1 -0
- package/dist/components/ui/file-tree.js +300 -0
- package/dist/components/ui/file-tree.js.map +1 -0
- package/dist/components/ui/google-button.d.ts +9 -0
- package/dist/components/ui/google-button.d.ts.map +1 -0
- package/dist/components/ui/google-button.js +183 -0
- package/dist/components/ui/google-button.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +8 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +38 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +21 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +81 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +14 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +48 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +6 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +17 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +25 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +123 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +6 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +21 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +6 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +16 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/marker.d.ts +13 -0
- package/dist/components/ui/marker.d.ts.map +1 -0
- package/dist/components/ui/marker.js +45 -0
- package/dist/components/ui/marker.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +32 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +138 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/message-scroller.d.ts +13 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.js +62 -0
- package/dist/components/ui/message-scroller.js.map +1 -0
- package/dist/components/ui/message.d.ts +13 -0
- package/dist/components/ui/message.d.ts.map +1 -0
- package/dist/components/ui/message.js +51 -0
- package/dist/components/ui/message.js.map +1 -0
- package/dist/components/ui/native-select.d.ts +11 -0
- package/dist/components/ui/native-select.d.ts.map +1 -0
- package/dist/components/ui/native-select.js +40 -0
- package/dist/components/ui/native-select.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +14 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +84 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +20 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +82 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +12 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +56 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +10 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +46 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/questionnaire.d.ts +22 -0
- package/dist/components/ui/questionnaire.d.ts.map +1 -0
- package/dist/components/ui/questionnaire.js +172 -0
- package/dist/components/ui/questionnaire.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +8 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +28 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +10 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +30 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +10 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +38 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +100 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +6 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +16 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +17 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +90 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +5 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +14 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +6 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +35 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +6 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +28 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +5 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +17 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +8 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +21 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +13 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +68 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +13 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +47 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +6 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +15 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +19 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +125 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +14 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +53 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +11 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +37 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +43 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/viewers/diff-viewer/align.d.ts +23 -0
- package/dist/components/viewers/diff-viewer/align.d.ts.map +1 -0
- package/dist/components/viewers/diff-viewer/align.js +68 -0
- package/dist/components/viewers/diff-viewer/align.js.map +1 -0
- package/dist/components/viewers/diff-viewer/collapse.d.ts +20 -0
- package/dist/components/viewers/diff-viewer/collapse.d.ts.map +1 -0
- package/dist/components/viewers/diff-viewer/collapse.js +84 -0
- package/dist/components/viewers/diff-viewer/collapse.js.map +1 -0
- package/dist/components/viewers/diff-viewer/diff-viewer.d.ts +34 -0
- package/dist/components/viewers/diff-viewer/diff-viewer.d.ts.map +1 -0
- package/dist/components/viewers/diff-viewer/diff-viewer.js +373 -0
- package/dist/components/viewers/diff-viewer/diff-viewer.js.map +1 -0
- package/dist/components/viewers/diff-viewer/index.d.ts +2 -0
- package/dist/components/viewers/diff-viewer/index.js +2 -0
- package/dist/components/viewers/diff-viewer/render-model.d.ts +27 -0
- package/dist/components/viewers/diff-viewer/render-model.d.ts.map +1 -0
- package/dist/components/viewers/diff-viewer/render-model.js +83 -0
- package/dist/components/viewers/diff-viewer/render-model.js.map +1 -0
- package/dist/components/viewers/diff-viewer/sync-rows.d.ts +8 -0
- package/dist/components/viewers/diff-viewer/sync-rows.d.ts.map +1 -0
- package/dist/components/viewers/diff-viewer/sync-rows.js +32 -0
- package/dist/components/viewers/diff-viewer/sync-rows.js.map +1 -0
- package/dist/components/viewers/file-tree/expand.d.ts +7 -0
- package/dist/components/viewers/file-tree/expand.d.ts.map +1 -0
- package/dist/components/viewers/file-tree/expand.js +37 -0
- package/dist/components/viewers/file-tree/expand.js.map +1 -0
- package/dist/components/viewers/file-tree/file-tree.d.ts +20 -0
- package/dist/components/viewers/file-tree/file-tree.d.ts.map +1 -0
- package/dist/components/viewers/file-tree/file-tree.js +116 -0
- package/dist/components/viewers/file-tree/file-tree.js.map +1 -0
- package/dist/components/viewers/file-tree/index.d.ts +3 -0
- package/dist/components/viewers/file-tree/index.js +3 -0
- package/dist/components/viewers/git-changes/git-changes.d.ts +40 -0
- package/dist/components/viewers/git-changes/git-changes.d.ts.map +1 -0
- package/dist/components/viewers/git-changes/git-changes.js +170 -0
- package/dist/components/viewers/git-changes/git-changes.js.map +1 -0
- package/dist/components/viewers/git-changes/index.d.ts +2 -0
- package/dist/components/viewers/git-changes/index.js +2 -0
- package/dist/components/viewers/json/index.d.ts +4 -0
- package/dist/components/viewers/json/index.js +4 -0
- package/dist/components/viewers/json/json-editor.d.ts +14 -0
- package/dist/components/viewers/json/json-editor.d.ts.map +1 -0
- package/dist/components/viewers/json/json-editor.js +84 -0
- package/dist/components/viewers/json/json-editor.js.map +1 -0
- package/dist/components/viewers/json/json-tree.d.ts +11 -0
- package/dist/components/viewers/json/json-tree.d.ts.map +1 -0
- package/dist/components/viewers/json/json-tree.js +88 -0
- package/dist/components/viewers/json/json-tree.js.map +1 -0
- package/dist/components/viewers/json/json-viewer.d.ts +10 -0
- package/dist/components/viewers/json/json-viewer.d.ts.map +1 -0
- package/dist/components/viewers/json/json-viewer.js +48 -0
- package/dist/components/viewers/json/json-viewer.js.map +1 -0
- package/dist/components/viewers/markdown-viewer/index.d.ts +2 -0
- package/dist/components/viewers/markdown-viewer/index.js +2 -0
- package/dist/components/viewers/markdown-viewer/markdown-viewer.d.ts +8 -0
- package/dist/components/viewers/markdown-viewer/markdown-viewer.d.ts.map +1 -0
- package/dist/components/viewers/markdown-viewer/markdown-viewer.js +65 -0
- package/dist/components/viewers/markdown-viewer/markdown-viewer.js.map +1 -0
- package/dist/components/viewers/source-explorer/index.d.ts +2 -0
- package/dist/components/viewers/source-explorer/index.js +2 -0
- package/dist/components/viewers/source-explorer/initial-selection.d.ts +6 -0
- package/dist/components/viewers/source-explorer/initial-selection.d.ts.map +1 -0
- package/dist/components/viewers/source-explorer/initial-selection.js +13 -0
- package/dist/components/viewers/source-explorer/initial-selection.js.map +1 -0
- package/dist/components/viewers/source-explorer/snapshot-tree.d.ts +11 -0
- package/dist/components/viewers/source-explorer/snapshot-tree.d.ts.map +1 -0
- package/dist/components/viewers/source-explorer/snapshot-tree.js +21 -0
- package/dist/components/viewers/source-explorer/snapshot-tree.js.map +1 -0
- package/dist/components/viewers/source-explorer/source-explorer.d.ts +49 -0
- package/dist/components/viewers/source-explorer/source-explorer.d.ts.map +1 -0
- package/dist/components/viewers/source-explorer/source-explorer.js +364 -0
- package/dist/components/viewers/source-explorer/source-explorer.js.map +1 -0
- package/dist/components/viewers/source-viewer/index.d.ts +2 -0
- package/dist/components/viewers/source-viewer/index.js +2 -0
- package/dist/components/viewers/source-viewer/source-viewer.d.ts +33 -0
- package/dist/components/viewers/source-viewer/source-viewer.d.ts.map +1 -0
- package/dist/components/viewers/source-viewer/source-viewer.js +224 -0
- package/dist/components/viewers/source-viewer/source-viewer.js.map +1 -0
- package/dist/define/index.d.ts +10 -0
- package/dist/define/index.js +4 -0
- package/dist/feedback/index.d.ts +2 -0
- package/dist/feedback/index.js +2 -0
- package/dist/feedback/sound.d.ts +28 -0
- package/dist/feedback/sound.d.ts.map +1 -0
- package/dist/feedback/sound.js +150 -0
- package/dist/feedback/sound.js.map +1 -0
- package/dist/form/components/submit-button.d.ts +11 -0
- package/dist/form/components/submit-button.d.ts.map +1 -0
- package/dist/form/components/submit-button.js +26 -0
- package/dist/form/components/submit-button.js.map +1 -0
- package/dist/form/context.d.ts +8 -0
- package/dist/form/context.d.ts.map +1 -0
- package/dist/form/context.js +11 -0
- package/dist/form/context.js.map +1 -0
- package/dist/form/create-form-hook.d.ts +62 -0
- package/dist/form/create-form-hook.d.ts.map +1 -0
- package/dist/form/create-form-hook.js +51 -0
- package/dist/form/create-form-hook.js.map +1 -0
- package/dist/form/fields/date-picker-field.d.ts +9 -0
- package/dist/form/fields/date-picker-field.d.ts.map +1 -0
- package/dist/form/fields/date-picker-field.js +84 -0
- package/dist/form/fields/date-picker-field.js.map +1 -0
- package/dist/form/fields/select-field.d.ts +15 -0
- package/dist/form/fields/select-field.d.ts.map +1 -0
- package/dist/form/fields/select-field.js +65 -0
- package/dist/form/fields/select-field.js.map +1 -0
- package/dist/form/fields/switch-field.d.ts +9 -0
- package/dist/form/fields/switch-field.d.ts.map +1 -0
- package/dist/form/fields/switch-field.js +56 -0
- package/dist/form/fields/switch-field.js.map +1 -0
- package/dist/form/fields/text-field.d.ts +10 -0
- package/dist/form/fields/text-field.d.ts.map +1 -0
- package/dist/form/fields/text-field.js +58 -0
- package/dist/form/fields/text-field.js.map +1 -0
- package/dist/form/fields/textarea-field.d.ts +10 -0
- package/dist/form/fields/textarea-field.d.ts.map +1 -0
- package/dist/form/fields/textarea-field.js +58 -0
- package/dist/form/fields/textarea-field.js.map +1 -0
- package/dist/form/index.d.ts +10 -0
- package/dist/form/index.js +3 -0
- package/dist/form/types.d.ts +51 -0
- package/dist/form/types.d.ts.map +1 -0
- package/dist/form/types.js +23 -0
- package/dist/form/types.js.map +1 -0
- package/dist/input/device/device.d.ts +21 -0
- package/dist/input/device/device.d.ts.map +1 -0
- package/dist/input/device/device.js +61 -0
- package/dist/input/device/device.js.map +1 -0
- package/dist/input/device/index.d.ts +2 -0
- package/dist/input/device/index.js +2 -0
- package/dist/input/gesture/index.d.ts +9 -0
- package/dist/input/gesture/index.js +5 -0
- package/dist/input/gesture/patterns/index.d.ts +5 -0
- package/dist/input/gesture/patterns/index.js +3 -0
- package/dist/input/gesture/patterns/pull-to-refresh/index.d.ts +2 -0
- package/dist/input/gesture/patterns/pull-to-refresh/index.js +2 -0
- package/dist/input/gesture/patterns/pull-to-refresh/use-pull-to-refresh.d.ts +32 -0
- package/dist/input/gesture/patterns/pull-to-refresh/use-pull-to-refresh.d.ts.map +1 -0
- package/dist/input/gesture/patterns/pull-to-refresh/use-pull-to-refresh.js +75 -0
- package/dist/input/gesture/patterns/pull-to-refresh/use-pull-to-refresh.js.map +1 -0
- package/dist/input/gesture/patterns/sidebar/index.d.ts +2 -0
- package/dist/input/gesture/patterns/sidebar/index.js +2 -0
- package/dist/input/gesture/patterns/sidebar/use-sidebar.d.ts +41 -0
- package/dist/input/gesture/patterns/sidebar/use-sidebar.d.ts.map +1 -0
- package/dist/input/gesture/patterns/sidebar/use-sidebar.js +131 -0
- package/dist/input/gesture/patterns/sidebar/use-sidebar.js.map +1 -0
- package/dist/input/gesture/recognizers/index.d.ts +3 -0
- package/dist/input/gesture/recognizers/index.js +2 -0
- package/dist/input/gesture/recognizers/swipe/index.d.ts +2 -0
- package/dist/input/gesture/recognizers/swipe/index.js +2 -0
- package/dist/input/gesture/recognizers/swipe/use-swipe.d.ts +56 -0
- package/dist/input/gesture/recognizers/swipe/use-swipe.d.ts.map +1 -0
- package/dist/input/gesture/recognizers/swipe/use-swipe.js +150 -0
- package/dist/input/gesture/recognizers/swipe/use-swipe.js.map +1 -0
- package/dist/input/gesture/zones/index.d.ts +4 -0
- package/dist/input/gesture/zones/index.js +2 -0
- package/dist/input/gesture/zones/touch-input/index.d.ts +3 -0
- package/dist/input/gesture/zones/touch-input/index.js +3 -0
- package/dist/input/gesture/zones/touch-input/native-scroll.d.ts +28 -0
- package/dist/input/gesture/zones/touch-input/native-scroll.d.ts.map +1 -0
- package/dist/input/gesture/zones/touch-input/native-scroll.js +61 -0
- package/dist/input/gesture/zones/touch-input/native-scroll.js.map +1 -0
- package/dist/input/gesture/zones/touch-input/touch-input.d.ts +54 -0
- package/dist/input/gesture/zones/touch-input/touch-input.d.ts.map +1 -0
- package/dist/input/gesture/zones/touch-input/touch-input.js +243 -0
- package/dist/input/gesture/zones/touch-input/touch-input.js.map +1 -0
- package/dist/input/gesture/zones/zone/index.d.ts +3 -0
- package/dist/input/gesture/zones/zone/index.js +2 -0
- package/dist/input/gesture/zones/zone/motion-pointers.d.ts +33 -0
- package/dist/input/gesture/zones/zone/motion-pointers.d.ts.map +1 -0
- package/dist/input/gesture/zones/zone/motion-pointers.js +52 -0
- package/dist/input/gesture/zones/zone/motion-pointers.js.map +1 -0
- package/dist/input/gesture/zones/zone/zone.d.ts +93 -0
- package/dist/input/gesture/zones/zone/zone.d.ts.map +1 -0
- package/dist/input/gesture/zones/zone/zone.js +169 -0
- package/dist/input/gesture/zones/zone/zone.js.map +1 -0
- package/dist/input/index.d.ts +8 -0
- package/dist/input/index.js +6 -0
- package/dist/pwa/browser/dom-events.d.ts +9 -0
- package/dist/pwa/browser/dom-events.d.ts.map +1 -0
- package/dist/pwa/browser/dom-events.js +10 -0
- package/dist/pwa/browser/dom-events.js.map +1 -0
- package/dist/pwa/browser/subscription-ref.d.ts +6 -0
- package/dist/pwa/browser/subscription-ref.d.ts.map +1 -0
- package/dist/pwa/browser/subscription-ref.js +19 -0
- package/dist/pwa/browser/subscription-ref.js.map +1 -0
- package/dist/pwa/client/client.d.ts +32 -0
- package/dist/pwa/client/client.d.ts.map +1 -0
- package/dist/pwa/client/client.js +36 -0
- package/dist/pwa/client/client.js.map +1 -0
- package/dist/pwa/client/commands/commands.d.ts +9 -0
- package/dist/pwa/client/commands/commands.d.ts.map +1 -0
- package/dist/pwa/client/commands/commands.js +21 -0
- package/dist/pwa/client/commands/commands.js.map +1 -0
- package/dist/pwa/client/commands/index.d.ts +2 -0
- package/dist/pwa/client/commands/index.js +2 -0
- package/dist/pwa/client/index.d.ts +3 -0
- package/dist/pwa/client/index.js +3 -0
- package/dist/pwa/client/registration.d.ts +14 -0
- package/dist/pwa/client/registration.d.ts.map +1 -0
- package/dist/pwa/client/registration.js +36 -0
- package/dist/pwa/client/registration.js.map +1 -0
- package/dist/pwa/client/runtime-cache.d.ts +9 -0
- package/dist/pwa/client/runtime-cache.d.ts.map +1 -0
- package/dist/pwa/client/runtime-cache.js +15 -0
- package/dist/pwa/client/runtime-cache.js.map +1 -0
- package/dist/pwa/client/status/index.d.ts +2 -0
- package/dist/pwa/client/status/index.js +2 -0
- package/dist/pwa/client/status/status.d.ts +136 -0
- package/dist/pwa/client/status/status.d.ts.map +1 -0
- package/dist/pwa/client/status/status.js +83 -0
- package/dist/pwa/client/status/status.js.map +1 -0
- package/dist/pwa/extras/display-mode/display-mode.d.ts +18 -0
- package/dist/pwa/extras/display-mode/display-mode.d.ts.map +1 -0
- package/dist/pwa/extras/display-mode/display-mode.js +42 -0
- package/dist/pwa/extras/display-mode/display-mode.js.map +1 -0
- package/dist/pwa/extras/display-mode/index.d.ts +2 -0
- package/dist/pwa/extras/display-mode/index.js +2 -0
- package/dist/pwa/extras/index.d.ts +13 -0
- package/dist/pwa/extras/index.js +9 -0
- package/dist/pwa/extras/install/index.d.ts +5 -0
- package/dist/pwa/extras/install/index.js +5 -0
- package/dist/pwa/extras/install/install-content.d.ts +12 -0
- package/dist/pwa/extras/install/install-content.d.ts.map +1 -0
- package/dist/pwa/extras/install/install-content.js +57 -0
- package/dist/pwa/extras/install/install-content.js.map +1 -0
- package/dist/pwa/extras/install/install-dismissal.d.ts +5 -0
- package/dist/pwa/extras/install/install-dismissal.d.ts.map +1 -0
- package/dist/pwa/extras/install/install-dismissal.js +20 -0
- package/dist/pwa/extras/install/install-dismissal.js.map +1 -0
- package/dist/pwa/extras/install/install-prompt.d.ts +12 -0
- package/dist/pwa/extras/install/install-prompt.d.ts.map +1 -0
- package/dist/pwa/extras/install/install-prompt.js +66 -0
- package/dist/pwa/extras/install/install-prompt.js.map +1 -0
- package/dist/pwa/extras/install/install.d.ts +125 -0
- package/dist/pwa/extras/install/install.d.ts.map +1 -0
- package/dist/pwa/extras/install/install.js +80 -0
- package/dist/pwa/extras/install/install.js.map +1 -0
- package/dist/pwa/extras/install/ios.d.ts +8 -0
- package/dist/pwa/extras/install/ios.d.ts.map +1 -0
- package/dist/pwa/extras/install/ios.js +10 -0
- package/dist/pwa/extras/install/ios.js.map +1 -0
- package/dist/pwa/extras/install/media-query.d.ts +5 -0
- package/dist/pwa/extras/install/media-query.d.ts.map +1 -0
- package/dist/pwa/extras/install/media-query.js +15 -0
- package/dist/pwa/extras/install/media-query.js.map +1 -0
- package/dist/pwa/extras/lazy-service/index.d.ts +2 -0
- package/dist/pwa/extras/lazy-service/index.js +2 -0
- package/dist/pwa/extras/lazy-service/lazy-service.d.ts +11 -0
- package/dist/pwa/extras/lazy-service/lazy-service.d.ts.map +1 -0
- package/dist/pwa/extras/lazy-service/lazy-service.js +30 -0
- package/dist/pwa/extras/lazy-service/lazy-service.js.map +1 -0
- package/dist/pwa/extras/online/index.d.ts +3 -0
- package/dist/pwa/extras/online/index.js +3 -0
- package/dist/pwa/extras/online/offline-indicator.d.ts +11 -0
- package/dist/pwa/extras/online/offline-indicator.d.ts.map +1 -0
- package/dist/pwa/extras/online/offline-indicator.js +26 -0
- package/dist/pwa/extras/online/offline-indicator.js.map +1 -0
- package/dist/pwa/extras/online/online.d.ts +15 -0
- package/dist/pwa/extras/online/online.d.ts.map +1 -0
- package/dist/pwa/extras/online/online.js +27 -0
- package/dist/pwa/extras/online/online.js.map +1 -0
- package/dist/pwa/extras/storage/index.d.ts +2 -0
- package/dist/pwa/extras/storage/index.js +2 -0
- package/dist/pwa/extras/storage/storage.d.ts +28 -0
- package/dist/pwa/extras/storage/storage.d.ts.map +1 -0
- package/dist/pwa/extras/storage/storage.js +51 -0
- package/dist/pwa/extras/storage/storage.js.map +1 -0
- package/dist/pwa/index.d.ts +8 -0
- package/dist/pwa/index.js +5 -0
- package/dist/pwa/react/head.d.ts +33 -0
- package/dist/pwa/react/head.d.ts.map +1 -0
- package/dist/pwa/react/head.js +43 -0
- package/dist/pwa/react/head.js.map +1 -0
- package/dist/pwa/react/index.d.ts +4 -0
- package/dist/pwa/react/index.js +3 -0
- package/dist/pwa/react/react.d.ts +33 -0
- package/dist/pwa/react/react.d.ts.map +1 -0
- package/dist/pwa/react/react.js +67 -0
- package/dist/pwa/react/react.js.map +1 -0
- package/dist/pwa/react/update-prompt.d.ts +12 -0
- package/dist/pwa/react/update-prompt.d.ts.map +1 -0
- package/dist/pwa/react/update-prompt.js +23 -0
- package/dist/pwa/react/update-prompt.js.map +1 -0
- package/dist/pwa/react/update-toast.d.ts +15 -0
- package/dist/pwa/react/update-toast.d.ts.map +1 -0
- package/dist/pwa/react/update-toast.js +52 -0
- package/dist/pwa/react/update-toast.js.map +1 -0
- package/dist/pwa/root/index.d.ts +2 -0
- package/dist/pwa/root/index.js +2 -0
- package/dist/pwa/root/root.d.ts +14 -0
- package/dist/pwa/root/root.d.ts.map +1 -0
- package/dist/pwa/root/root.js +35 -0
- package/dist/pwa/root/root.js.map +1 -0
- package/dist/pwa/rpc/client/client.d.ts +49 -0
- package/dist/pwa/rpc/client/client.d.ts.map +1 -0
- package/dist/pwa/rpc/client/client.js +55 -0
- package/dist/pwa/rpc/client/client.js.map +1 -0
- package/dist/pwa/rpc/client/index.d.ts +3 -0
- package/dist/pwa/rpc/client/index.js +3 -0
- package/dist/pwa/rpc/client/page-environment.d.ts +25 -0
- package/dist/pwa/rpc/client/page-environment.d.ts.map +1 -0
- package/dist/pwa/rpc/client/page-environment.js +46 -0
- package/dist/pwa/rpc/client/page-environment.js.map +1 -0
- package/dist/pwa/rpc/client/platform.d.ts +26 -0
- package/dist/pwa/rpc/client/platform.d.ts.map +1 -0
- package/dist/pwa/rpc/client/platform.js +144 -0
- package/dist/pwa/rpc/client/platform.js.map +1 -0
- package/dist/pwa/rpc/client/version-skew.d.ts +24 -0
- package/dist/pwa/rpc/client/version-skew.d.ts.map +1 -0
- package/dist/pwa/rpc/client/version-skew.js +63 -0
- package/dist/pwa/rpc/client/version-skew.js.map +1 -0
- package/dist/pwa/rpc/handshake/handshake.d.ts +74 -0
- package/dist/pwa/rpc/handshake/handshake.d.ts.map +1 -0
- package/dist/pwa/rpc/handshake/handshake.js +104 -0
- package/dist/pwa/rpc/handshake/handshake.js.map +1 -0
- package/dist/pwa/rpc/handshake/index.d.ts +2 -0
- package/dist/pwa/rpc/handshake/index.js +2 -0
- package/dist/pwa/rpc/worker/connections.d.ts +31 -0
- package/dist/pwa/rpc/worker/connections.d.ts.map +1 -0
- package/dist/pwa/rpc/worker/connections.js +48 -0
- package/dist/pwa/rpc/worker/connections.js.map +1 -0
- package/dist/pwa/rpc/worker/index.d.ts +2 -0
- package/dist/pwa/rpc/worker/index.js +2 -0
- package/dist/pwa/rpc/worker/keep-alive.d.ts +11 -0
- package/dist/pwa/rpc/worker/keep-alive.d.ts.map +1 -0
- package/dist/pwa/rpc/worker/keep-alive.js +30 -0
- package/dist/pwa/rpc/worker/keep-alive.js.map +1 -0
- package/dist/pwa/rpc/worker/runner-platform.d.ts +18 -0
- package/dist/pwa/rpc/worker/runner-platform.d.ts.map +1 -0
- package/dist/pwa/rpc/worker/runner-platform.js +113 -0
- package/dist/pwa/rpc/worker/runner-platform.js.map +1 -0
- package/dist/pwa/rpc/worker/worker.d.ts +22 -0
- package/dist/pwa/rpc/worker/worker.d.ts.map +1 -0
- package/dist/pwa/rpc/worker/worker.js +23 -0
- package/dist/pwa/rpc/worker/worker.js.map +1 -0
- package/dist/pwa/shared/build/build.d.ts +55 -0
- package/dist/pwa/shared/build/build.d.ts.map +1 -0
- package/dist/pwa/shared/build/build.js +55 -0
- package/dist/pwa/shared/build/build.js.map +1 -0
- package/dist/pwa/shared/build/canonical-json.d.ts +5 -0
- package/dist/pwa/shared/build/canonical-json.d.ts.map +1 -0
- package/dist/pwa/shared/build/canonical-json.js +7 -0
- package/dist/pwa/shared/build/canonical-json.js.map +1 -0
- package/dist/pwa/shared/build/fnv1a.d.ts +5 -0
- package/dist/pwa/shared/build/fnv1a.d.ts.map +1 -0
- package/dist/pwa/shared/build/fnv1a.js +17 -0
- package/dist/pwa/shared/build/fnv1a.js.map +1 -0
- package/dist/pwa/shared/build/index.d.ts +2 -0
- package/dist/pwa/shared/build/index.js +2 -0
- package/dist/pwa/shared/commands/commands.d.ts +39 -0
- package/dist/pwa/shared/commands/commands.d.ts.map +1 -0
- package/dist/pwa/shared/commands/commands.js +51 -0
- package/dist/pwa/shared/commands/commands.js.map +1 -0
- package/dist/pwa/shared/commands/index.d.ts +2 -0
- package/dist/pwa/shared/commands/index.js +2 -0
- package/dist/pwa/shared/config/config.d.ts +231 -0
- package/dist/pwa/shared/config/config.d.ts.map +1 -0
- package/dist/pwa/shared/config/config.js +136 -0
- package/dist/pwa/shared/config/config.js.map +1 -0
- package/dist/pwa/shared/config/index.d.ts +2 -0
- package/dist/pwa/shared/config/index.js +2 -0
- package/dist/pwa/shared/config/presets.d.ts +19 -0
- package/dist/pwa/shared/config/presets.d.ts.map +1 -0
- package/dist/pwa/shared/config/presets.js +45 -0
- package/dist/pwa/shared/config/presets.js.map +1 -0
- package/dist/pwa/shared/manifest/index.d.ts +2 -0
- package/dist/pwa/shared/manifest/index.js +2 -0
- package/dist/pwa/shared/manifest/manifest.d.ts +53 -0
- package/dist/pwa/shared/manifest/manifest.d.ts.map +1 -0
- package/dist/pwa/shared/manifest/manifest.js +87 -0
- package/dist/pwa/shared/manifest/manifest.js.map +1 -0
- package/dist/pwa/shared/strategy/index.d.ts +2 -0
- package/dist/pwa/shared/strategy/index.js +2 -0
- package/dist/pwa/shared/strategy/pattern.d.ts +6 -0
- package/dist/pwa/shared/strategy/pattern.d.ts.map +1 -0
- package/dist/pwa/shared/strategy/pattern.js +23 -0
- package/dist/pwa/shared/strategy/pattern.js.map +1 -0
- package/dist/pwa/shared/strategy/strategy.d.ts +41 -0
- package/dist/pwa/shared/strategy/strategy.d.ts.map +1 -0
- package/dist/pwa/shared/strategy/strategy.js +60 -0
- package/dist/pwa/shared/strategy/strategy.js.map +1 -0
- package/dist/pwa/shared/worker-host/index.d.ts +2 -0
- package/dist/pwa/shared/worker-host/index.js +2 -0
- package/dist/pwa/shared/worker-host/worker-host.d.ts +22 -0
- package/dist/pwa/shared/worker-host/worker-host.d.ts.map +1 -0
- package/dist/pwa/shared/worker-host/worker-host.js +11 -0
- package/dist/pwa/shared/worker-host/worker-host.js.map +1 -0
- package/dist/pwa/splash/devices.d.ts +85 -0
- package/dist/pwa/splash/devices.d.ts.map +1 -0
- package/dist/pwa/splash/devices.js +109 -0
- package/dist/pwa/splash/devices.js.map +1 -0
- package/dist/pwa/splash/index.d.ts +2 -0
- package/dist/pwa/splash/index.js +2 -0
- package/dist/pwa/splash/splash.d.ts +29 -0
- package/dist/pwa/splash/splash.d.ts.map +1 -0
- package/dist/pwa/splash/splash.js +38 -0
- package/dist/pwa/splash/splash.js.map +1 -0
- package/dist/pwa/vite/build/build-plugin.d.ts +15 -0
- package/dist/pwa/vite/build/build-plugin.d.ts.map +1 -0
- package/dist/pwa/vite/build/build-plugin.js +105 -0
- package/dist/pwa/vite/build/build-plugin.js.map +1 -0
- package/dist/pwa/vite/build/build-state.d.ts +17 -0
- package/dist/pwa/vite/build/build-state.d.ts.map +1 -0
- package/dist/pwa/vite/build/build-state.js +9 -0
- package/dist/pwa/vite/build/build-state.js.map +1 -0
- package/dist/pwa/vite/build/headers.d.ts +10 -0
- package/dist/pwa/vite/build/headers.d.ts.map +1 -0
- package/dist/pwa/vite/build/headers.js +26 -0
- package/dist/pwa/vite/build/headers.js.map +1 -0
- package/dist/pwa/vite/build/index.d.ts +3 -0
- package/dist/pwa/vite/build/index.js +3 -0
- package/dist/pwa/vite/build/output-files.d.ts +12 -0
- package/dist/pwa/vite/build/output-files.d.ts.map +1 -0
- package/dist/pwa/vite/build/output-files.js +35 -0
- package/dist/pwa/vite/build/output-files.js.map +1 -0
- package/dist/pwa/vite/build/start-setup.d.ts +19 -0
- package/dist/pwa/vite/build/start-setup.d.ts.map +1 -0
- package/dist/pwa/vite/build/start-setup.js +27 -0
- package/dist/pwa/vite/build/start-setup.js.map +1 -0
- package/dist/pwa/vite/client-module/build-version.d.ts +15 -0
- package/dist/pwa/vite/client-module/build-version.d.ts.map +1 -0
- package/dist/pwa/vite/client-module/build-version.js +45 -0
- package/dist/pwa/vite/client-module/build-version.js.map +1 -0
- package/dist/pwa/vite/client-module/client-info.d.ts +22 -0
- package/dist/pwa/vite/client-module/client-info.d.ts.map +1 -0
- package/dist/pwa/vite/client-module/client-info.js +38 -0
- package/dist/pwa/vite/client-module/client-info.js.map +1 -0
- package/dist/pwa/vite/client-module/client-module.d.ts +16 -0
- package/dist/pwa/vite/client-module/client-module.d.ts.map +1 -0
- package/dist/pwa/vite/client-module/client-module.js +47 -0
- package/dist/pwa/vite/client-module/client-module.js.map +1 -0
- package/dist/pwa/vite/client-module/index.d.ts +2 -0
- package/dist/pwa/vite/client-module/index.js +2 -0
- package/dist/pwa/vite/dev/dev-plugin.d.ts +13 -0
- package/dist/pwa/vite/dev/dev-plugin.d.ts.map +1 -0
- package/dist/pwa/vite/dev/dev-plugin.js +61 -0
- package/dist/pwa/vite/dev/dev-plugin.js.map +1 -0
- package/dist/pwa/vite/dev/index.d.ts +2 -0
- package/dist/pwa/vite/dev/index.js +2 -0
- package/dist/pwa/vite/index.d.ts +2 -0
- package/dist/pwa/vite/index.js +2 -0
- package/dist/pwa/vite/precache/asset-kind.d.ts +7 -0
- package/dist/pwa/vite/precache/asset-kind.d.ts.map +1 -0
- package/dist/pwa/vite/precache/asset-kind.js +24 -0
- package/dist/pwa/vite/precache/asset-kind.js.map +1 -0
- package/dist/pwa/vite/precache/index.d.ts +2 -0
- package/dist/pwa/vite/precache/index.js +2 -0
- package/dist/pwa/vite/precache/precache.d.ts +39 -0
- package/dist/pwa/vite/precache/precache.d.ts.map +1 -0
- package/dist/pwa/vite/precache/precache.js +60 -0
- package/dist/pwa/vite/precache/precache.js.map +1 -0
- package/dist/pwa/vite/precache/revision.d.ts +5 -0
- package/dist/pwa/vite/precache/revision.d.ts.map +1 -0
- package/dist/pwa/vite/precache/revision.js +8 -0
- package/dist/pwa/vite/precache/revision.js.map +1 -0
- package/dist/pwa/vite/precache/url-path.d.ts +12 -0
- package/dist/pwa/vite/precache/url-path.d.ts.map +1 -0
- package/dist/pwa/vite/precache/url-path.js +23 -0
- package/dist/pwa/vite/precache/url-path.js.map +1 -0
- package/dist/pwa/vite/vite.d.ts +14 -0
- package/dist/pwa/vite/vite.d.ts.map +1 -0
- package/dist/pwa/vite/vite.js +27 -0
- package/dist/pwa/vite/vite.js.map +1 -0
- package/dist/pwa/vite/worker-bundle/build-module.d.ts +11 -0
- package/dist/pwa/vite/worker-bundle/build-module.d.ts.map +1 -0
- package/dist/pwa/vite/worker-bundle/build-module.js +23 -0
- package/dist/pwa/vite/worker-bundle/build-module.js.map +1 -0
- package/dist/pwa/vite/worker-bundle/entry.d.ts +10 -0
- package/dist/pwa/vite/worker-bundle/entry.d.ts.map +1 -0
- package/dist/pwa/vite/worker-bundle/entry.js +25 -0
- package/dist/pwa/vite/worker-bundle/entry.js.map +1 -0
- package/dist/pwa/vite/worker-bundle/index.d.ts +2 -0
- package/dist/pwa/vite/worker-bundle/index.js +2 -0
- package/dist/pwa/vite/worker-bundle/kill-switch.d.ts +9 -0
- package/dist/pwa/vite/worker-bundle/kill-switch.d.ts.map +1 -0
- package/dist/pwa/vite/worker-bundle/kill-switch.js +27 -0
- package/dist/pwa/vite/worker-bundle/kill-switch.js.map +1 -0
- package/dist/pwa/vite/worker-bundle/worker-bundle.d.ts +25 -0
- package/dist/pwa/vite/worker-bundle/worker-bundle.d.ts.map +1 -0
- package/dist/pwa/vite/worker-bundle/worker-bundle.js +49 -0
- package/dist/pwa/vite/worker-bundle/worker-bundle.js.map +1 -0
- package/dist/pwa/worker/commands/commands.d.ts +13 -0
- package/dist/pwa/worker/commands/commands.d.ts.map +1 -0
- package/dist/pwa/worker/commands/commands.js +23 -0
- package/dist/pwa/worker/commands/commands.js.map +1 -0
- package/dist/pwa/worker/commands/index.d.ts +2 -0
- package/dist/pwa/worker/commands/index.js +2 -0
- package/dist/pwa/worker/global-scope/global-scope.d.ts +35 -0
- package/dist/pwa/worker/global-scope/global-scope.d.ts.map +1 -0
- package/dist/pwa/worker/global-scope/global-scope.js +45 -0
- package/dist/pwa/worker/global-scope/global-scope.js.map +1 -0
- package/dist/pwa/worker/global-scope/index.d.ts +2 -0
- package/dist/pwa/worker/global-scope/index.js +2 -0
- package/dist/pwa/worker/index.d.ts +3 -0
- package/dist/pwa/worker/index.js +3 -0
- package/dist/pwa/worker/lifecycle/index.d.ts +2 -0
- package/dist/pwa/worker/lifecycle/index.js +2 -0
- package/dist/pwa/worker/lifecycle/lifecycle.d.ts +19 -0
- package/dist/pwa/worker/lifecycle/lifecycle.d.ts.map +1 -0
- package/dist/pwa/worker/lifecycle/lifecycle.js +32 -0
- package/dist/pwa/worker/lifecycle/lifecycle.js.map +1 -0
- package/dist/pwa/worker/messages/index.d.ts +2 -0
- package/dist/pwa/worker/messages/index.js +2 -0
- package/dist/pwa/worker/messages/messages.d.ts +16 -0
- package/dist/pwa/worker/messages/messages.d.ts.map +1 -0
- package/dist/pwa/worker/messages/messages.js +59 -0
- package/dist/pwa/worker/messages/messages.js.map +1 -0
- package/dist/pwa/worker/precache/download.d.ts +11 -0
- package/dist/pwa/worker/precache/download.d.ts.map +1 -0
- package/dist/pwa/worker/precache/download.js +26 -0
- package/dist/pwa/worker/precache/download.js.map +1 -0
- package/dist/pwa/worker/precache/index.d.ts +2 -0
- package/dist/pwa/worker/precache/index.js +2 -0
- package/dist/pwa/worker/precache/precache.d.ts +21 -0
- package/dist/pwa/worker/precache/precache.d.ts.map +1 -0
- package/dist/pwa/worker/precache/precache.js +35 -0
- package/dist/pwa/worker/precache/precache.js.map +1 -0
- package/dist/pwa/worker/requests/index.d.ts +2 -0
- package/dist/pwa/worker/requests/index.js +2 -0
- package/dist/pwa/worker/requests/pages/index.d.ts +2 -0
- package/dist/pwa/worker/requests/pages/index.js +2 -0
- package/dist/pwa/worker/requests/pages/pages.d.ts +25 -0
- package/dist/pwa/worker/requests/pages/pages.d.ts.map +1 -0
- package/dist/pwa/worker/requests/pages/pages.js +74 -0
- package/dist/pwa/worker/requests/pages/pages.js.map +1 -0
- package/dist/pwa/worker/requests/requests.d.ts +17 -0
- package/dist/pwa/worker/requests/requests.d.ts.map +1 -0
- package/dist/pwa/worker/requests/requests.js +28 -0
- package/dist/pwa/worker/requests/requests.js.map +1 -0
- package/dist/pwa/worker/requests/strategies/cache-store.d.ts +19 -0
- package/dist/pwa/worker/requests/strategies/cache-store.d.ts.map +1 -0
- package/dist/pwa/worker/requests/strategies/cache-store.js +50 -0
- package/dist/pwa/worker/requests/strategies/cache-store.js.map +1 -0
- package/dist/pwa/worker/requests/strategies/index.d.ts +3 -0
- package/dist/pwa/worker/requests/strategies/index.js +3 -0
- package/dist/pwa/worker/requests/strategies/kinds.d.ts +11 -0
- package/dist/pwa/worker/requests/strategies/kinds.d.ts.map +1 -0
- package/dist/pwa/worker/requests/strategies/kinds.js +35 -0
- package/dist/pwa/worker/requests/strategies/kinds.js.map +1 -0
- package/dist/pwa/worker/requests/strategies/network-first.d.ts +18 -0
- package/dist/pwa/worker/requests/strategies/network-first.d.ts.map +1 -0
- package/dist/pwa/worker/requests/strategies/network-first.js +30 -0
- package/dist/pwa/worker/requests/strategies/network-first.js.map +1 -0
- package/dist/pwa/worker/requests/strategies/strategies.d.ts +16 -0
- package/dist/pwa/worker/requests/strategies/strategies.d.ts.map +1 -0
- package/dist/pwa/worker/requests/strategies/strategies.js +22 -0
- package/dist/pwa/worker/requests/strategies/strategies.js.map +1 -0
- package/dist/pwa/worker/worker.d.ts +23 -0
- package/dist/pwa/worker/worker.d.ts.map +1 -0
- package/dist/pwa/worker/worker.js +53 -0
- package/dist/pwa/worker/worker.js.map +1 -0
- package/dist/recipes/account-lost/account-lost.d.ts +24 -0
- package/dist/recipes/account-lost/account-lost.d.ts.map +1 -0
- package/dist/recipes/account-lost/account-lost.js +35 -0
- package/dist/recipes/account-lost/account-lost.js.map +1 -0
- package/dist/recipes/account-lost/index.d.ts +2 -0
- package/dist/recipes/account-lost/index.js +2 -0
- package/dist/recipes/account-switcher/account-switcher.d.ts +25 -0
- package/dist/recipes/account-switcher/account-switcher.d.ts.map +1 -0
- package/dist/recipes/account-switcher/account-switcher.js +124 -0
- package/dist/recipes/account-switcher/account-switcher.js.map +1 -0
- package/dist/recipes/account-switcher/index.d.ts +2 -0
- package/dist/recipes/account-switcher/index.js +2 -0
- package/dist/recipes/frame/app-shell.d.ts +37 -0
- package/dist/recipes/frame/app-shell.d.ts.map +1 -0
- package/dist/recipes/frame/app-shell.js +46 -0
- package/dist/recipes/frame/app-shell.js.map +1 -0
- package/dist/recipes/frame/frame/frame.d.ts +32 -0
- package/dist/recipes/frame/frame/frame.d.ts.map +1 -0
- package/dist/recipes/frame/frame/frame.js +135 -0
- package/dist/recipes/frame/frame/frame.js.map +1 -0
- package/dist/recipes/frame/frame/geometry.d.ts +22 -0
- package/dist/recipes/frame/frame/geometry.d.ts.map +1 -0
- package/dist/recipes/frame/frame/geometry.js +36 -0
- package/dist/recipes/frame/frame/geometry.js.map +1 -0
- package/dist/recipes/frame/frame/index.d.ts +2 -0
- package/dist/recipes/frame/frame/index.js +2 -0
- package/dist/recipes/frame/frame/motion.d.ts +20 -0
- package/dist/recipes/frame/frame/motion.d.ts.map +1 -0
- package/dist/recipes/frame/frame/motion.js +58 -0
- package/dist/recipes/frame/frame/motion.js.map +1 -0
- package/dist/recipes/frame/frame/state.d.ts +17 -0
- package/dist/recipes/frame/frame/state.d.ts.map +1 -0
- package/dist/recipes/frame/frame/state.js +27 -0
- package/dist/recipes/frame/frame/state.js.map +1 -0
- package/dist/recipes/frame/header.d.ts +18 -0
- package/dist/recipes/frame/header.d.ts.map +1 -0
- package/dist/recipes/frame/header.js +43 -0
- package/dist/recipes/frame/header.js.map +1 -0
- package/dist/recipes/frame/index.d.ts +4 -0
- package/dist/recipes/frame/index.js +4 -0
- package/dist/recipes/frame/sidebar/blocks.d.ts +31 -0
- package/dist/recipes/frame/sidebar/blocks.d.ts.map +1 -0
- package/dist/recipes/frame/sidebar/blocks.js +126 -0
- package/dist/recipes/frame/sidebar/blocks.js.map +1 -0
- package/dist/recipes/frame/sidebar/index.d.ts +4 -0
- package/dist/recipes/frame/sidebar/index.js +4 -0
- package/dist/recipes/frame/sidebar/nav.d.ts +22 -0
- package/dist/recipes/frame/sidebar/nav.d.ts.map +1 -0
- package/dist/recipes/frame/sidebar/nav.js +14 -0
- package/dist/recipes/frame/sidebar/nav.js.map +1 -0
- package/dist/recipes/frame/sidebar/resize-handle.d.ts +12 -0
- package/dist/recipes/frame/sidebar/resize-handle.d.ts.map +1 -0
- package/dist/recipes/frame/sidebar/resize-handle.js +90 -0
- package/dist/recipes/frame/sidebar/resize-handle.js.map +1 -0
- package/dist/recipes/frame/sidebar/sidebar.d.ts +24 -0
- package/dist/recipes/frame/sidebar/sidebar.d.ts.map +1 -0
- package/dist/recipes/frame/sidebar/sidebar.js +30 -0
- package/dist/recipes/frame/sidebar/sidebar.js.map +1 -0
- package/dist/recipes/frame/sidebar/width.d.ts +9 -0
- package/dist/recipes/frame/sidebar/width.d.ts.map +1 -0
- package/dist/recipes/frame/sidebar/width.js +22 -0
- package/dist/recipes/frame/sidebar/width.js.map +1 -0
- package/dist/recipes/gate-screens/gate-screens.d.ts +52 -0
- package/dist/recipes/gate-screens/gate-screens.d.ts.map +1 -0
- package/dist/recipes/gate-screens/gate-screens.js +192 -0
- package/dist/recipes/gate-screens/gate-screens.js.map +1 -0
- package/dist/recipes/gate-screens/index.d.ts +2 -0
- package/dist/recipes/gate-screens/index.js +2 -0
- package/dist/recipes/kabuki-devtools/index.d.ts +2 -0
- package/dist/recipes/kabuki-devtools/index.js +2 -0
- package/dist/recipes/kabuki-devtools/ink/index.d.ts +2 -0
- package/dist/recipes/kabuki-devtools/ink/index.js +2 -0
- package/dist/recipes/kabuki-devtools/ink/ink.d.ts +37 -0
- package/dist/recipes/kabuki-devtools/ink/ink.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/ink/ink.js +37 -0
- package/dist/recipes/kabuki-devtools/ink/ink.js.map +1 -0
- package/dist/recipes/kabuki-devtools/kabuki-devtools.d.ts +40 -0
- package/dist/recipes/kabuki-devtools/kabuki-devtools.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/kabuki-devtools.js +279 -0
- package/dist/recipes/kabuki-devtools/kabuki-devtools.js.map +1 -0
- package/dist/recipes/kabuki-devtools/map/beat/beat.d.ts +13 -0
- package/dist/recipes/kabuki-devtools/map/beat/beat.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/map/beat/beat.js +223 -0
- package/dist/recipes/kabuki-devtools/map/beat/beat.js.map +1 -0
- package/dist/recipes/kabuki-devtools/map/beat/index.d.ts +2 -0
- package/dist/recipes/kabuki-devtools/map/beat/index.js +2 -0
- package/dist/recipes/kabuki-devtools/map/canvas/canvas.d.ts +29 -0
- package/dist/recipes/kabuki-devtools/map/canvas/canvas.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/map/canvas/canvas.js +221 -0
- package/dist/recipes/kabuki-devtools/map/canvas/canvas.js.map +1 -0
- package/dist/recipes/kabuki-devtools/map/canvas/index.d.ts +2 -0
- package/dist/recipes/kabuki-devtools/map/canvas/index.js +2 -0
- package/dist/recipes/kabuki-devtools/map/index.d.ts +2 -0
- package/dist/recipes/kabuki-devtools/map/index.js +2 -0
- package/dist/recipes/kabuki-devtools/map/link/index.d.ts +2 -0
- package/dist/recipes/kabuki-devtools/map/link/index.js +2 -0
- package/dist/recipes/kabuki-devtools/map/link/link.d.ts +22 -0
- package/dist/recipes/kabuki-devtools/map/link/link.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/map/link/link.js +72 -0
- package/dist/recipes/kabuki-devtools/map/link/link.js.map +1 -0
- package/dist/recipes/kabuki-devtools/map/map.d.ts +26 -0
- package/dist/recipes/kabuki-devtools/map/map.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/map/map.js +362 -0
- package/dist/recipes/kabuki-devtools/map/map.js.map +1 -0
- package/dist/recipes/kabuki-devtools/map/node/index.d.ts +2 -0
- package/dist/recipes/kabuki-devtools/map/node/index.js +2 -0
- package/dist/recipes/kabuki-devtools/map/node/node.d.ts +25 -0
- package/dist/recipes/kabuki-devtools/map/node/node.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/map/node/node.js +251 -0
- package/dist/recipes/kabuki-devtools/map/node/node.js.map +1 -0
- package/dist/recipes/kabuki-devtools/map/popup/index.d.ts +2 -0
- package/dist/recipes/kabuki-devtools/map/popup/index.js +2 -0
- package/dist/recipes/kabuki-devtools/map/popup/popup.d.ts +12 -0
- package/dist/recipes/kabuki-devtools/map/popup/popup.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/map/popup/popup.js +72 -0
- package/dist/recipes/kabuki-devtools/map/popup/popup.js.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/beats.d.ts +36 -0
- package/dist/recipes/kabuki-devtools/scene/beats.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/beats.js +46 -0
- package/dist/recipes/kabuki-devtools/scene/beats.js.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/index.d.ts +5 -0
- package/dist/recipes/kabuki-devtools/scene/index.js +3 -0
- package/dist/recipes/kabuki-devtools/scene/layout/index.d.ts +3 -0
- package/dist/recipes/kabuki-devtools/scene/layout/index.js +2 -0
- package/dist/recipes/kabuki-devtools/scene/layout/layout.d.ts +6 -0
- package/dist/recipes/kabuki-devtools/scene/layout/layout.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/layout/layout.js +8 -0
- package/dist/recipes/kabuki-devtools/scene/layout/layout.js.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/layout/outline.d.ts +5 -0
- package/dist/recipes/kabuki-devtools/scene/layout/outline.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/layout/outline.js +84 -0
- package/dist/recipes/kabuki-devtools/scene/layout/outline.js.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/layout/shapes.d.ts +57 -0
- package/dist/recipes/kabuki-devtools/scene/layout/shapes.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/layout/shapes.js +38 -0
- package/dist/recipes/kabuki-devtools/scene/layout/shapes.js.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/layout/tree.d.ts +5 -0
- package/dist/recipes/kabuki-devtools/scene/layout/tree.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/layout/tree.js +146 -0
- package/dist/recipes/kabuki-devtools/scene/layout/tree.js.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/nodes.d.ts +67 -0
- package/dist/recipes/kabuki-devtools/scene/nodes.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/nodes.js +39 -0
- package/dist/recipes/kabuki-devtools/scene/nodes.js.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/scene.d.ts +78 -0
- package/dist/recipes/kabuki-devtools/scene/scene.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/scene.js +128 -0
- package/dist/recipes/kabuki-devtools/scene/scene.js.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/tree.d.ts +20 -0
- package/dist/recipes/kabuki-devtools/scene/tree.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/scene/tree.js +85 -0
- package/dist/recipes/kabuki-devtools/scene/tree.js.map +1 -0
- package/dist/recipes/kabuki-devtools/sheet/index.d.ts +2 -0
- package/dist/recipes/kabuki-devtools/sheet/index.js +2 -0
- package/dist/recipes/kabuki-devtools/sheet/sheet.d.ts +33 -0
- package/dist/recipes/kabuki-devtools/sheet/sheet.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/sheet/sheet.js +129 -0
- package/dist/recipes/kabuki-devtools/sheet/sheet.js.map +1 -0
- package/dist/recipes/kabuki-devtools/timeline/index.d.ts +2 -0
- package/dist/recipes/kabuki-devtools/timeline/index.js +2 -0
- package/dist/recipes/kabuki-devtools/timeline/timeline.d.ts +25 -0
- package/dist/recipes/kabuki-devtools/timeline/timeline.d.ts.map +1 -0
- package/dist/recipes/kabuki-devtools/timeline/timeline.js +122 -0
- package/dist/recipes/kabuki-devtools/timeline/timeline.js.map +1 -0
- package/dist/recipes/key-bindings/index.d.ts +2 -0
- package/dist/recipes/key-bindings/index.js +2 -0
- package/dist/recipes/key-bindings/key-bindings.d.ts +19 -0
- package/dist/recipes/key-bindings/key-bindings.d.ts.map +1 -0
- package/dist/recipes/key-bindings/key-bindings.js +61 -0
- package/dist/recipes/key-bindings/key-bindings.js.map +1 -0
- package/dist/recipes/local-sign-in/index.d.ts +2 -0
- package/dist/recipes/local-sign-in/index.js +2 -0
- package/dist/recipes/local-sign-in/local-sign-in.d.ts +18 -0
- package/dist/recipes/local-sign-in/local-sign-in.d.ts.map +1 -0
- package/dist/recipes/local-sign-in/local-sign-in.js +109 -0
- package/dist/recipes/local-sign-in/local-sign-in.js.map +1 -0
- package/dist/recipes/parts/email-privacy/email-privacy.d.ts +24 -0
- package/dist/recipes/parts/email-privacy/email-privacy.d.ts.map +1 -0
- package/dist/recipes/parts/email-privacy/email-privacy.js +35 -0
- package/dist/recipes/parts/email-privacy/email-privacy.js.map +1 -0
- package/dist/recipes/parts/email-privacy/index.d.ts +2 -0
- package/dist/recipes/parts/email-privacy/index.js +2 -0
- package/dist/recipes/swipe-row/index.d.ts +2 -0
- package/dist/recipes/swipe-row/index.js +2 -0
- package/dist/recipes/swipe-row/swipe-row.d.ts +16 -0
- package/dist/recipes/swipe-row/swipe-row.d.ts.map +1 -0
- package/dist/recipes/swipe-row/swipe-row.js +96 -0
- package/dist/recipes/swipe-row/swipe-row.js.map +1 -0
- package/dist/recipes/thumb-picker/choice.d.ts +18 -0
- package/dist/recipes/thumb-picker/choice.d.ts.map +1 -0
- package/dist/recipes/thumb-picker/choice.js +0 -0
- package/dist/recipes/thumb-picker/index.d.ts +3 -0
- package/dist/recipes/thumb-picker/index.js +2 -0
- package/dist/recipes/thumb-picker/list.d.ts +18 -0
- package/dist/recipes/thumb-picker/list.d.ts.map +1 -0
- package/dist/recipes/thumb-picker/list.js +48 -0
- package/dist/recipes/thumb-picker/list.js.map +1 -0
- package/dist/recipes/thumb-picker/lock.d.ts +18 -0
- package/dist/recipes/thumb-picker/lock.d.ts.map +1 -0
- package/dist/recipes/thumb-picker/lock.js +71 -0
- package/dist/recipes/thumb-picker/lock.js.map +1 -0
- package/dist/recipes/thumb-picker/menu.d.ts +19 -0
- package/dist/recipes/thumb-picker/menu.d.ts.map +1 -0
- package/dist/recipes/thumb-picker/menu.js +127 -0
- package/dist/recipes/thumb-picker/menu.js.map +1 -0
- package/dist/recipes/thumb-picker/thumb-picker.d.ts +31 -0
- package/dist/recipes/thumb-picker/thumb-picker.d.ts.map +1 -0
- package/dist/recipes/thumb-picker/thumb-picker.js +65 -0
- package/dist/recipes/thumb-picker/thumb-picker.js.map +1 -0
- package/dist/server/index.d.ts +7 -0
- package/dist/server/index.js +5 -0
- package/dist/server/live/index.d.ts +2 -0
- package/dist/server/live/index.js +2 -0
- package/dist/server/live/live.d.ts +56 -0
- package/dist/server/live/live.d.ts.map +1 -0
- package/dist/server/live/live.js +98 -0
- package/dist/server/live/live.js.map +1 -0
- package/dist/server/serve/index.d.ts +2 -0
- package/dist/server/serve/index.js +2 -0
- package/dist/server/serve/serve.d.ts +48 -0
- package/dist/server/serve/serve.d.ts.map +1 -0
- package/dist/server/serve/serve.js +47 -0
- package/dist/server/serve/serve.js.map +1 -0
- package/dist/server/stage/index.d.ts +2 -0
- package/dist/server/stage/index.js +2 -0
- package/dist/server/stage/stage.d.ts +14 -0
- package/dist/server/stage/stage.d.ts.map +1 -0
- package/dist/server/stage/stage.js +28 -0
- package/dist/server/stage/stage.js.map +1 -0
- package/dist/server/worker/index.d.ts +2 -0
- package/dist/server/worker/index.js +2 -0
- package/dist/server/worker/worker.d.ts +19 -0
- package/dist/server/worker/worker.d.ts.map +1 -0
- package/dist/server/worker/worker.js +18 -0
- package/dist/server/worker/worker.js.map +1 -0
- package/dist/theme/cookie.d.ts +6 -0
- package/dist/theme/cookie.d.ts.map +1 -0
- package/dist/theme/cookie.js +21 -0
- package/dist/theme/cookie.js.map +1 -0
- package/dist/theme/css/font-inter.css +2 -0
- package/dist/theme/css/global.css +62 -0
- package/dist/theme/css/shiki.css +71 -0
- package/dist/theme/css/sources.css +6 -0
- package/dist/theme/css/theme.css +170 -0
- package/dist/theme/css/typography.css +1 -0
- package/dist/theme/document.d.ts +6 -0
- package/dist/theme/document.d.ts.map +1 -0
- package/dist/theme/document.js +26 -0
- package/dist/theme/document.js.map +1 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.js +4 -0
- package/dist/theme/model.d.ts +9 -0
- package/dist/theme/model.d.ts.map +1 -0
- package/dist/theme/model.js +13 -0
- package/dist/theme/model.js.map +1 -0
- package/dist/theme/status-bar.d.ts +10 -0
- package/dist/theme/status-bar.d.ts.map +1 -0
- package/dist/theme/status-bar.js +19 -0
- package/dist/theme/status-bar.js.map +1 -0
- package/dist/theme/store.d.ts +6 -0
- package/dist/theme/store.d.ts.map +1 -0
- package/dist/theme/store.js +45 -0
- package/dist/theme/store.js.map +1 -0
- package/dist/theme/theme.d.ts +22 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/theme.js +37 -0
- package/dist/theme/theme.js.map +1 -0
- package/package.json +255 -3
- package/src/app/apis/apis.ts +109 -0
- package/src/app/apis/index.ts +13 -0
- package/src/app/app.tsx +232 -0
- package/src/app/assemble/assemble.tsx +339 -0
- package/src/app/assemble/index.ts +7 -0
- package/src/app/assemble/public.ts +98 -0
- package/src/app/gate/domain/check.ts +76 -0
- package/src/app/gate/domain/index.ts +3 -0
- package/src/app/gate/domain/machine.ts +439 -0
- package/src/app/gate/domain/services.ts +46 -0
- package/src/app/gate/domain/types.ts +36 -0
- package/src/app/gate/gate.ts +501 -0
- package/src/app/gate/index.ts +3 -0
- package/src/app/gate/memory.ts +56 -0
- package/src/app/gate/react.tsx +139 -0
- package/src/app/host/host.ts +166 -0
- package/src/app/host/index.ts +10 -0
- package/src/app/index.ts +10 -0
- package/src/app/session/define.ts +75 -0
- package/src/app/session/index.ts +17 -0
- package/src/app/session/keeper.ts +34 -0
- package/src/app/session/open.ts +207 -0
- package/src/app/session/react.tsx +38 -0
- package/src/app/session/status.ts +46 -0
- package/src/app/web-host.ts +104 -0
- package/src/client/index.ts +9 -0
- package/src/client/root/index.ts +7 -0
- package/src/client/root/root.tsx +149 -0
- package/src/client/server.ts +3 -0
- package/src/client/theme/index.ts +1 -0
- package/src/client/theme/tanstack-start.ts +5 -0
- package/src/components/hooks/use-element-width.ts +24 -0
- package/src/components/hooks/use-mobile.ts +21 -0
- package/src/components/hooks/use-scroll.ts +292 -0
- package/src/components/lib/lucide.ts +1 -0
- package/src/components/lib/motion.ts +1 -0
- package/src/components/lib/scrollStyles.ts +44 -0
- package/src/components/lib/shadow-dom.tsx +86 -0
- package/src/components/lib/utils.ts +6 -0
- package/src/components/ui/accordion.tsx +71 -0
- package/src/components/ui/alert-dialog.tsx +185 -0
- package/src/components/ui/alert.tsx +75 -0
- package/src/components/ui/aspect-ratio.tsx +22 -0
- package/src/components/ui/attachment.tsx +207 -0
- package/src/components/ui/avatar.tsx +106 -0
- package/src/components/ui/badge.tsx +51 -0
- package/src/components/ui/breadcrumb.tsx +124 -0
- package/src/components/ui/bubble.tsx +127 -0
- package/src/components/ui/button-group.tsx +87 -0
- package/src/components/ui/button.tsx +57 -0
- package/src/components/ui/calendar.tsx +221 -0
- package/src/components/ui/card.tsx +102 -0
- package/src/components/ui/carousel.tsx +240 -0
- package/src/components/ui/chart.tsx +370 -0
- package/src/components/ui/checkbox.tsx +28 -0
- package/src/components/ui/collapsible.tsx +19 -0
- package/src/components/ui/combobox.tsx +295 -0
- package/src/components/ui/command.tsx +196 -0
- package/src/components/ui/context-menu.tsx +270 -0
- package/src/components/ui/dialog.tsx +157 -0
- package/src/components/ui/direction.tsx +4 -0
- package/src/components/ui/drawer.tsx +224 -0
- package/src/components/ui/dropdown-menu.tsx +275 -0
- package/src/components/ui/empty.tsx +103 -0
- package/src/components/ui/field.tsx +236 -0
- package/src/components/ui/file-tree.tsx +619 -0
- package/src/components/ui/google-button.tsx +194 -0
- package/src/components/ui/hover-card.tsx +50 -0
- package/src/components/ui/input-group.tsx +158 -0
- package/src/components/ui/input-otp.tsx +84 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/item.tsx +201 -0
- package/src/components/ui/kbd.tsx +26 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/marker.tsx +70 -0
- package/src/components/ui/menubar.tsx +280 -0
- package/src/components/ui/message-scroller.tsx +129 -0
- package/src/components/ui/message.tsx +91 -0
- package/src/components/ui/native-select.tsx +60 -0
- package/src/components/ui/navigation-menu.tsx +167 -0
- package/src/components/ui/pagination.tsx +130 -0
- package/src/components/ui/popover.tsx +87 -0
- package/src/components/ui/progress.tsx +82 -0
- package/src/components/ui/questionnaire.tsx +324 -0
- package/src/components/ui/radio-group.tsx +35 -0
- package/src/components/ui/resizable.tsx +49 -0
- package/src/components/ui/scroll-area.tsx +60 -0
- package/src/components/ui/select.tsx +200 -0
- package/src/components/ui/separator.tsx +22 -0
- package/src/components/ui/sheet.tsx +133 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +51 -0
- package/src/components/ui/sonner.tsx +43 -0
- package/src/components/ui/spinner.tsx +10 -0
- package/src/components/ui/switch.tsx +31 -0
- package/src/components/ui/table.tsx +113 -0
- package/src/components/ui/tabs.tsx +81 -0
- package/src/components/ui/textarea.tsx +17 -0
- package/src/components/ui/toast.tsx +234 -0
- package/src/components/ui/toggle-group.tsx +87 -0
- package/src/components/ui/toggle.tsx +42 -0
- package/src/components/ui/tooltip.tsx +65 -0
- package/src/components/viewers/diff-viewer/align.ts +83 -0
- package/src/components/viewers/diff-viewer/collapse.ts +102 -0
- package/src/components/viewers/diff-viewer/diff-viewer.tsx +605 -0
- package/src/components/viewers/diff-viewer/index.ts +8 -0
- package/src/components/viewers/diff-viewer/render-model.ts +123 -0
- package/src/components/viewers/diff-viewer/sync-rows.ts +41 -0
- package/src/components/viewers/file-tree/expand.ts +58 -0
- package/src/components/viewers/file-tree/file-tree.tsx +199 -0
- package/src/components/viewers/file-tree/index.ts +2 -0
- package/src/components/viewers/git-changes/git-changes.tsx +287 -0
- package/src/components/viewers/git-changes/index.ts +11 -0
- package/src/components/viewers/json/index.ts +3 -0
- package/src/components/viewers/json/json-editor.tsx +94 -0
- package/src/components/viewers/json/json-tree.tsx +110 -0
- package/src/components/viewers/json/json-viewer.tsx +61 -0
- package/src/components/viewers/markdown-viewer/index.ts +1 -0
- package/src/components/viewers/markdown-viewer/markdown-viewer.tsx +83 -0
- package/src/components/viewers/source-explorer/index.ts +11 -0
- package/src/components/viewers/source-explorer/initial-selection.ts +21 -0
- package/src/components/viewers/source-explorer/snapshot-tree.ts +39 -0
- package/src/components/viewers/source-explorer/source-explorer.tsx +598 -0
- package/src/components/viewers/source-viewer/index.ts +7 -0
- package/src/components/viewers/source-viewer/source-viewer.tsx +437 -0
- package/src/cosmos.decorator.tsx +38 -0
- package/src/css.d.ts +1 -0
- package/src/define/index.ts +26 -0
- package/src/feedback/index.ts +1 -0
- package/src/feedback/sound.ts +167 -0
- package/src/form/components/submit-button.tsx +52 -0
- package/src/form/context.ts +8 -0
- package/src/form/create-form-hook.ts +50 -0
- package/src/form/fields/date-picker-field.tsx +125 -0
- package/src/form/fields/select-field.tsx +110 -0
- package/src/form/fields/switch-field.tsx +72 -0
- package/src/form/fields/text-field.tsx +82 -0
- package/src/form/fields/textarea-field.tsx +82 -0
- package/src/form/index.ts +56 -0
- package/src/form/types.ts +76 -0
- package/src/input/device/device.ts +83 -0
- package/src/input/device/index.ts +1 -0
- package/src/input/gesture/index.ts +26 -0
- package/src/input/gesture/patterns/index.ts +3 -0
- package/src/input/gesture/patterns/pull-to-refresh/index.ts +6 -0
- package/src/input/gesture/patterns/pull-to-refresh/use-pull-to-refresh.ts +101 -0
- package/src/input/gesture/patterns/sidebar/index.ts +2 -0
- package/src/input/gesture/patterns/sidebar/use-sidebar.ts +201 -0
- package/src/input/gesture/recognizers/index.ts +12 -0
- package/src/input/gesture/recognizers/swipe/index.ts +12 -0
- package/src/input/gesture/recognizers/swipe/use-swipe.ts +224 -0
- package/src/input/gesture/zones/index.ts +11 -0
- package/src/input/gesture/zones/touch-input/index.ts +10 -0
- package/src/input/gesture/zones/touch-input/native-scroll.ts +74 -0
- package/src/input/gesture/zones/touch-input/touch-input.ts +322 -0
- package/src/input/gesture/zones/zone/index.ts +11 -0
- package/src/input/gesture/zones/zone/motion-pointers.ts +74 -0
- package/src/input/gesture/zones/zone/zone.tsx +291 -0
- package/src/input/index.ts +4 -0
- package/src/pwa/browser/dom-events.ts +17 -0
- package/src/pwa/browser/subscription-ref.ts +29 -0
- package/src/pwa/client/client.ts +43 -0
- package/src/pwa/client/commands/commands.ts +28 -0
- package/src/pwa/client/commands/index.ts +1 -0
- package/src/pwa/client/index.ts +1 -0
- package/src/pwa/client/registration.ts +63 -0
- package/src/pwa/client/runtime-cache.ts +24 -0
- package/src/pwa/client/status/index.ts +1 -0
- package/src/pwa/client/status/status.ts +155 -0
- package/src/pwa/extras/display-mode/display-mode.ts +64 -0
- package/src/pwa/extras/display-mode/index.ts +6 -0
- package/src/pwa/extras/index.ts +15 -0
- package/src/pwa/extras/install/index.ts +4 -0
- package/src/pwa/extras/install/install-content.tsx +45 -0
- package/src/pwa/extras/install/install-dismissal.ts +20 -0
- package/src/pwa/extras/install/install-prompt.tsx +93 -0
- package/src/pwa/extras/install/install.ts +134 -0
- package/src/pwa/extras/install/ios.ts +13 -0
- package/src/pwa/extras/install/media-query.ts +18 -0
- package/src/pwa/extras/lazy-service/index.ts +1 -0
- package/src/pwa/extras/lazy-service/lazy-service.ts +38 -0
- package/src/pwa/extras/online/index.ts +2 -0
- package/src/pwa/extras/online/offline-indicator.tsx +26 -0
- package/src/pwa/extras/online/online.ts +35 -0
- package/src/pwa/extras/storage/index.ts +1 -0
- package/src/pwa/extras/storage/storage.ts +101 -0
- package/src/pwa/index.ts +5 -0
- package/src/pwa/react/head.ts +69 -0
- package/src/pwa/react/index.ts +3 -0
- package/src/pwa/react/react.tsx +98 -0
- package/src/pwa/react/update-prompt.tsx +26 -0
- package/src/pwa/react/update-toast.ts +57 -0
- package/src/pwa/root/index.ts +1 -0
- package/src/pwa/root/root.tsx +39 -0
- package/src/pwa/rpc/client/client.ts +105 -0
- package/src/pwa/rpc/client/index.ts +1 -0
- package/src/pwa/rpc/client/page-environment.ts +88 -0
- package/src/pwa/rpc/client/platform.ts +213 -0
- package/src/pwa/rpc/client/version-skew.ts +71 -0
- package/src/pwa/rpc/handshake/handshake.ts +125 -0
- package/src/pwa/rpc/handshake/index.ts +11 -0
- package/src/pwa/rpc/worker/connections.ts +62 -0
- package/src/pwa/rpc/worker/index.ts +1 -0
- package/src/pwa/rpc/worker/keep-alive.ts +26 -0
- package/src/pwa/rpc/worker/runner-platform.ts +200 -0
- package/src/pwa/rpc/worker/worker.ts +44 -0
- package/src/pwa/shared/build/build.ts +78 -0
- package/src/pwa/shared/build/canonical-json.ts +11 -0
- package/src/pwa/shared/build/fnv1a.ts +13 -0
- package/src/pwa/shared/build/index.ts +19 -0
- package/src/pwa/shared/commands/commands.ts +60 -0
- package/src/pwa/shared/commands/index.ts +11 -0
- package/src/pwa/shared/config/config.ts +185 -0
- package/src/pwa/shared/config/index.ts +11 -0
- package/src/pwa/shared/config/presets.ts +45 -0
- package/src/pwa/shared/manifest/index.ts +5 -0
- package/src/pwa/shared/manifest/manifest.ts +102 -0
- package/src/pwa/shared/strategy/index.ts +8 -0
- package/src/pwa/shared/strategy/pattern.ts +20 -0
- package/src/pwa/shared/strategy/strategy.ts +107 -0
- package/src/pwa/shared/worker-host/index.ts +1 -0
- package/src/pwa/shared/worker-host/worker-host.ts +22 -0
- package/src/pwa/splash/devices.ts +28 -0
- package/src/pwa/splash/index.ts +1 -0
- package/src/pwa/splash/splash.ts +44 -0
- package/src/pwa/virtual.d.ts +13 -0
- package/src/pwa/vite/build/build-plugin.ts +153 -0
- package/src/pwa/vite/build/build-state.ts +17 -0
- package/src/pwa/vite/build/headers.ts +34 -0
- package/src/pwa/vite/build/index.ts +2 -0
- package/src/pwa/vite/build/output-files.ts +49 -0
- package/src/pwa/vite/build/start-setup.ts +50 -0
- package/src/pwa/vite/client-module/build-version.ts +43 -0
- package/src/pwa/vite/client-module/client-info.ts +58 -0
- package/src/pwa/vite/client-module/client-module.ts +67 -0
- package/src/pwa/vite/client-module/index.ts +1 -0
- package/src/pwa/vite/dev/dev-plugin.ts +72 -0
- package/src/pwa/vite/dev/index.ts +1 -0
- package/src/pwa/vite/index.ts +1 -0
- package/src/pwa/vite/precache/asset-kind.ts +25 -0
- package/src/pwa/vite/precache/index.ts +6 -0
- package/src/pwa/vite/precache/precache.ts +97 -0
- package/src/pwa/vite/precache/revision.ts +5 -0
- package/src/pwa/vite/precache/url-path.ts +21 -0
- package/src/pwa/vite/vite.ts +25 -0
- package/src/pwa/vite/worker-bundle/build-module.ts +28 -0
- package/src/pwa/vite/worker-bundle/entry.ts +29 -0
- package/src/pwa/vite/worker-bundle/index.ts +1 -0
- package/src/pwa/vite/worker-bundle/kill-switch.ts +23 -0
- package/src/pwa/vite/worker-bundle/worker-bundle.ts +71 -0
- package/src/pwa/worker/commands/commands.ts +31 -0
- package/src/pwa/worker/commands/index.ts +1 -0
- package/src/pwa/worker/global-scope/global-scope.ts +99 -0
- package/src/pwa/worker/global-scope/index.ts +9 -0
- package/src/pwa/worker/index.ts +1 -0
- package/src/pwa/worker/lifecycle/index.ts +1 -0
- package/src/pwa/worker/lifecycle/lifecycle.ts +52 -0
- package/src/pwa/worker/messages/index.ts +1 -0
- package/src/pwa/worker/messages/messages.ts +67 -0
- package/src/pwa/worker/precache/download.ts +38 -0
- package/src/pwa/worker/precache/index.ts +7 -0
- package/src/pwa/worker/precache/precache.ts +72 -0
- package/src/pwa/worker/requests/index.ts +1 -0
- package/src/pwa/worker/requests/pages/index.ts +1 -0
- package/src/pwa/worker/requests/pages/pages.ts +116 -0
- package/src/pwa/worker/requests/requests.ts +39 -0
- package/src/pwa/worker/requests/strategies/cache-store.ts +82 -0
- package/src/pwa/worker/requests/strategies/index.ts +2 -0
- package/src/pwa/worker/requests/strategies/kinds.ts +63 -0
- package/src/pwa/worker/requests/strategies/network-first.ts +40 -0
- package/src/pwa/worker/requests/strategies/strategies.ts +40 -0
- package/src/pwa/worker/worker.ts +99 -0
- package/src/recipes/account-lost/account-lost.tsx +66 -0
- package/src/recipes/account-lost/index.ts +5 -0
- package/src/recipes/account-switcher/account-switcher.tsx +199 -0
- package/src/recipes/account-switcher/index.ts +5 -0
- package/src/recipes/frame/app-shell.tsx +74 -0
- package/src/recipes/frame/frame/frame.tsx +204 -0
- package/src/recipes/frame/frame/geometry.ts +60 -0
- package/src/recipes/frame/frame/index.ts +1 -0
- package/src/recipes/frame/frame/motion.ts +85 -0
- package/src/recipes/frame/frame/state.ts +29 -0
- package/src/recipes/frame/header.tsx +54 -0
- package/src/recipes/frame/index.ts +16 -0
- package/src/recipes/frame/sidebar/blocks.tsx +214 -0
- package/src/recipes/frame/sidebar/index.ts +15 -0
- package/src/recipes/frame/sidebar/nav.tsx +46 -0
- package/src/recipes/frame/sidebar/resize-handle.tsx +94 -0
- package/src/recipes/frame/sidebar/sidebar.tsx +44 -0
- package/src/recipes/frame/sidebar/width.ts +23 -0
- package/src/recipes/gate-screens/gate-screens.tsx +213 -0
- package/src/recipes/gate-screens/index.ts +5 -0
- package/src/recipes/kabuki-devtools/index.ts +1 -0
- package/src/recipes/kabuki-devtools/ink/index.ts +2 -0
- package/src/recipes/kabuki-devtools/ink/ink.ts +53 -0
- package/src/recipes/kabuki-devtools/kabuki-devtools.tsx +419 -0
- package/src/recipes/kabuki-devtools/map/beat/beat.tsx +243 -0
- package/src/recipes/kabuki-devtools/map/beat/index.ts +1 -0
- package/src/recipes/kabuki-devtools/map/canvas/canvas.tsx +320 -0
- package/src/recipes/kabuki-devtools/map/canvas/index.ts +2 -0
- package/src/recipes/kabuki-devtools/map/index.ts +2 -0
- package/src/recipes/kabuki-devtools/map/link/index.ts +1 -0
- package/src/recipes/kabuki-devtools/map/link/link.tsx +107 -0
- package/src/recipes/kabuki-devtools/map/map.tsx +474 -0
- package/src/recipes/kabuki-devtools/map/node/index.ts +2 -0
- package/src/recipes/kabuki-devtools/map/node/node.tsx +437 -0
- package/src/recipes/kabuki-devtools/map/popup/index.ts +1 -0
- package/src/recipes/kabuki-devtools/map/popup/popup.tsx +73 -0
- package/src/recipes/kabuki-devtools/scene/beats.ts +110 -0
- package/src/recipes/kabuki-devtools/scene/index.ts +11 -0
- package/src/recipes/kabuki-devtools/scene/layout/index.ts +3 -0
- package/src/recipes/kabuki-devtools/scene/layout/layout.ts +14 -0
- package/src/recipes/kabuki-devtools/scene/layout/outline.ts +80 -0
- package/src/recipes/kabuki-devtools/scene/layout/shapes.ts +93 -0
- package/src/recipes/kabuki-devtools/scene/layout/tree.ts +181 -0
- package/src/recipes/kabuki-devtools/scene/nodes.ts +116 -0
- package/src/recipes/kabuki-devtools/scene/scene.ts +268 -0
- package/src/recipes/kabuki-devtools/scene/tree.ts +191 -0
- package/src/recipes/kabuki-devtools/sheet/index.ts +1 -0
- package/src/recipes/kabuki-devtools/sheet/sheet.tsx +193 -0
- package/src/recipes/kabuki-devtools/timeline/index.ts +2 -0
- package/src/recipes/kabuki-devtools/timeline/timeline.tsx +206 -0
- package/src/recipes/key-bindings/index.ts +1 -0
- package/src/recipes/key-bindings/key-bindings.tsx +80 -0
- package/src/recipes/local-sign-in/index.ts +5 -0
- package/src/recipes/local-sign-in/local-sign-in.tsx +148 -0
- package/src/recipes/parts/email-privacy/email-privacy.tsx +52 -0
- package/src/recipes/parts/email-privacy/index.ts +1 -0
- package/src/recipes/swipe-row/index.ts +1 -0
- package/src/recipes/swipe-row/swipe-row.tsx +97 -0
- package/src/recipes/thumb-picker/choice.ts +14 -0
- package/src/recipes/thumb-picker/index.ts +1 -0
- package/src/recipes/thumb-picker/list.tsx +73 -0
- package/src/recipes/thumb-picker/lock.ts +86 -0
- package/src/recipes/thumb-picker/menu.tsx +105 -0
- package/src/recipes/thumb-picker/thumb-picker.tsx +84 -0
- package/src/server/index.ts +21 -0
- package/src/server/live/index.ts +9 -0
- package/src/server/live/live.ts +219 -0
- package/src/server/serve/index.ts +6 -0
- package/src/server/serve/serve.ts +115 -0
- package/src/server/stage/index.ts +6 -0
- package/src/server/stage/stage.ts +43 -0
- package/src/server/worker/index.ts +1 -0
- package/src/server/worker/worker.ts +26 -0
- package/src/theme/cookie.ts +22 -0
- package/src/theme/css/font-inter.css +2 -0
- package/src/theme/css/global.css +62 -0
- package/src/theme/css/shiki.css +71 -0
- package/src/theme/css/sources.css +6 -0
- package/src/theme/css/theme.css +170 -0
- package/src/theme/css/typography.css +1 -0
- package/src/theme/document.ts +37 -0
- package/src/theme/index.ts +3 -0
- package/src/theme/model.ts +12 -0
- package/src/theme/status-bar.ts +28 -0
- package/src/theme/store.ts +66 -0
- package/src/theme/theme.ts +45 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kabuki-devtools.js","names":[],"sources":["../../../src/recipes/kabuki-devtools/kabuki-devtools.tsx"],"sourcesContent":["import { useMemo, useRef, useState } from 'react';\nimport type { ComponentProps } from 'react';\nimport { AnimatePresence } from 'motion/react';\nimport { handle, isRestore } from '@kestack/kabuki';\nimport type {\n ActorDefinition,\n Entry,\n Instance,\n Snapshot,\n} from '@kestack/kabuki';\nimport type { AppRuntime } from '@kestack/kabuki/react';\nimport { cn } from '#lib/utils';\nimport { INK } from './ink/index.ts';\nimport type { Tone } from './ink/index.ts';\nimport { AppMap } from './map/index.ts';\nimport type { Pick } from './map/index.ts';\nimport { sceneOf } from './scene/index.ts';\nimport type {\n Kind,\n Placed,\n Said,\n Scene,\n WorkerKey,\n WorkerStatus,\n} from './scene/index.ts';\nimport { Sheet } from './sheet/index.ts';\nimport { Timeline } from './timeline/index.ts';\n\n/*\n * The Inspector: the Step shown, drawn as a Map, with the Sheet and the\n * Timeline under it. It fills whatever holds it, and lays itself out by its\n * own width, not the screen's.\n *\n * 1. Scene the Map of the Step shown, from the Actors and its Snapshot,\n * with the live app's Workers laid over it when it is live.\n * 2. Pick a card, a State or Worker on it, one of its Instances, or the\n * Step's Message; a pick gone from the Step shown closes the\n * Sheet.\n * 3. Sheet what is picked, taken apart.\n * 4. Timeline which Step is shown, and whether it is live.\n */\n\ntype Statuses = NonNullable<Parameters<typeof sceneOf>[0]['statuses']>;\n\n/*\n * The Kabuki devtools: the Inspector on a running app, from its\n * runtime (`App.useRuntime()`). It fills whatever holds it.\n *\n * 1. Steps init, then every entry on the Branch shown: the Head's, or\n * the one a Step shown from another Branch is on.\n * 2. Step the Step shown is the app's own: picking one on the Timeline\n * Time Travels the app, and going live comes back to the Head.\n * Its Snapshot is replayed from the History; the Commands its\n * Message asked for are worked out again from the Step before,\n * once each.\n * 3. Workers live and running, what each Instance's Workers are doing.\n */\nexport function KabukiDevtools({\n runtime,\n layout,\n dotted,\n className,\n}: {\n /** The running app: `App.useRuntime()`. */\n readonly runtime: AppRuntime;\n /** How the Map is laid out: a packed tree, or an outline. */\n readonly layout?: Kind;\n /** Dots under the Map. On by default; off, a background given by `className` shows through. */\n readonly dotted?: boolean;\n /** Classes for its root, merged over its own: a see-through background over the app. */\n readonly className?: string;\n}) {\n const { history, branch, shown, running } = runtime;\n const definition = history.actor.definition;\n\n // 1. Steps\n const steps =\n typeof shown === 'number' && !branch.some((entry) => entry.id === shown)\n ? history.branch(shown)\n : branch;\n const live = shown === null;\n const at =\n shown === null\n ? steps.length\n : shown === 'init'\n ? 0\n : steps.findIndex((entry) => entry.id === shown) + 1;\n const entry = at === 0 ? undefined : steps[at - 1];\n\n // 2. Step\n // By the entry itself, not its id: ids start again in another runtime, or\n // once the History is cleared.\n const asked = useRef(new WeakMap<Entry, ReadonlyArray<unknown>>());\n const commandsOf = (of: Entry) => {\n const known = asked.current.get(of);\n if (known) return known;\n const commands = isRestore(of.message)\n ? []\n : handle(definition, history.snapshotAt(of.parent), of).commands;\n asked.current.set(of, commands);\n return commands;\n };\n const step = useMemo(\n () => ({\n snapshot: history.snapshotAt(entry?.id ?? null),\n ...(entry\n ? { said: { envelope: entry, commands: commandsOf(entry) } }\n : {}),\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps -- an entry never changes once written.\n [history, entry],\n );\n\n return (\n <Inspector\n definition={definition}\n step={step}\n {...(layout ? { layout } : {})}\n {...(className ? { className } : {})}\n {...(dotted === undefined ? {} : { dotted })}\n // 3. Workers\n {...(live && running ? { statuses: runtime.workers } : {})}\n timeline={{\n steps: [\n { id: 'init', label: 'init' },\n ...steps.map((each) => ({\n id: `${each.id}`,\n label: each.message._tag,\n })),\n ],\n shown: at,\n live,\n onShow: (index) =>\n runtime.show(index === 0 ? 'init' : steps[index - 1]!.id),\n onLive: () => runtime.show(null),\n }}\n />\n );\n}\n\nexport function Inspector({\n definition,\n step,\n statuses,\n layout,\n timeline,\n dotted,\n className,\n}: {\n /** The root Actor's definition. */\n readonly definition: ActorDefinition;\n /** The Step shown: its Snapshot, and the Message that made it; none for init. */\n readonly step: { readonly snapshot: Snapshot; readonly said?: Said };\n /** What the live app says of each Instance's Workers, while the Step shown is live. */\n readonly statuses?: Statuses;\n /** How the Map is laid out: a packed tree, or an outline. */\n readonly layout?: Kind;\n readonly timeline: ComponentProps<typeof Timeline>;\n /** Dots under the Map. On by default. */\n readonly dotted?: boolean;\n /** Classes for its root, merged over its own. */\n readonly className?: string;\n}) {\n const [picked, setPicked] = useState<Pick | undefined>(undefined);\n const [chosen, setChosen] = useState<ReadonlyMap<string, string>>(\n () => new Map(),\n );\n const [folded, setFolded] = useState<ReadonlySet<string>>(() => new Set());\n\n // 1. Scene\n const scene = useMemo(\n () =>\n sceneOf({\n definition,\n snapshot: step.snapshot,\n ...(step.said ? { said: step.said } : {}),\n ...(statuses ? { statuses } : {}),\n ...(layout ? { layout } : {}),\n chosen,\n folded,\n }),\n [definition, step, statuses, layout, chosen, folded],\n );\n\n // 2. Pick and 3. Sheet\n const sheet = picked && sheetOf(scene, picked);\n\n return (\n <div\n className={cn(\n '@container bg-background text-foreground relative flex h-full w-full flex-col overflow-clip',\n className,\n )}\n style={INK}\n >\n <div className=\"relative flex min-h-0 flex-1 flex-col\">\n <div className=\"relative min-h-0 flex-1\">\n <AppMap\n scene={scene}\n {...(dotted === undefined ? {} : { dotted })}\n picked={sheet ? picked : undefined}\n onPick={setPicked}\n onChoose={(place, instance) =>\n setChosen((was) => new Map(was).set(place, instance))\n }\n onFold={(place) =>\n setFolded((was) => {\n const next = new Set(was);\n if (!next.delete(place)) next.add(place);\n return next;\n })\n }\n />\n </div>\n <AnimatePresence>\n {sheet && (\n <Sheet\n key=\"sheet\"\n {...sheet}\n onClose={() => setPicked(undefined)}\n />\n )}\n </AnimatePresence>\n </div>\n {/* 4. Timeline */}\n <Timeline {...timeline} />\n </div>\n );\n}\n\ntype SheetOf = Omit<ComponentProps<typeof Sheet>, 'onClose'>;\n\nconst dataOf = ({ _tag, ...data }: { readonly _tag: string }) => data;\nconst hasFields = (value: object) => Object.keys(value).length > 0;\nconst isEmpty = (value: unknown) =>\n value !== null && typeof value === 'object' && !hasFields(value);\n\nconst TONE: Record<WorkerStatus, Tone> = {\n running: 'running',\n finished: 'dim',\n failed: 'failed',\n on: 'lit',\n};\n\nconst keyName = (name: string, key: WorkerKey) =>\n key.key === '' ? name : `${name}#${key.key}`;\n\n/** Who Sent the Message, in words. */\nconst fromOf = ({ source, send }: NonNullable<Scene['beats']>) => {\n switch (source.kind) {\n case 'view':\n return 'its View';\n case 'command':\n return `Command ${send?.by ?? source.name}`;\n case 'worker':\n return `Worker ${send?.by ?? source.name}`;\n case 'provide':\n return 'what it Provides';\n case 'outside':\n return 'outside the app';\n case 'restore':\n return 'a Restore';\n }\n};\n\n/** What the Sheet shows of a pick, or nothing if it is not in this Step. */\nconst sheetOf = (scene: Scene, pick: Pick): SheetOf | undefined => {\n if ('message' in pick) {\n const beats = scene.beats;\n if (!beats) return undefined;\n return {\n kind: 'Message',\n tone: 'message',\n title: beats.tag,\n facts: [\n {\n label: 'To',\n value: beats.to ? scene.at.get(beats.to)!.name : 'dropped',\n },\n { label: 'From', value: fromOf(beats) },\n { label: 'Time', value: `${(beats.at / 1000).toFixed(2)}s` },\n ],\n sections: [\n { title: 'Payload', value: beats.payload },\n ...(beats.commands.length\n ? [{ title: 'Commands asked for', value: beats.commands }]\n : []),\n ],\n };\n }\n\n const node = scene.at.get(pick.node);\n if (!node) return undefined;\n const { part } = pick;\n if (part && 'worker' in part)\n return workerSheet(node, part.worker, scene.live);\n if (part && 'state' in part) return stateSheet(node, part.state);\n\n const one =\n pick.instance !== undefined\n ? node.instances.find((each) => each.id === pick.instance)\n : !node.many\n ? node.instances[0]\n : undefined;\n if (one) return instanceSheet(node.name, one);\n if (node.instances.length === 0)\n return {\n kind: 'Actor',\n tone: 'dim',\n title: node.name,\n facts: [{ label: 'Running', value: 'no Instance here at this Step' }],\n };\n return {\n kind: 'Actor',\n title: node.name,\n facts: [\n { label: 'Instances', value: node.instances.length },\n ...(node.states\n ? [\n {\n label: 'In each State',\n value: node.states\n .flat()\n .map((option) => `${option.tag} ${option.count}`)\n .join(' · '),\n },\n ]\n : []),\n ],\n };\n};\n\n/** One Instance taken apart. */\nconst instanceSheet = (name: string, instance: Instance): SheetOf => {\n const state = dataOf(instance.state);\n return {\n kind: 'Instance',\n title: instance.key === undefined ? name : `${name}#${instance.key}`,\n facts: [\n { label: 'ID', value: instance.id },\n ...(instance.state._tag === 'Single'\n ? []\n : [{ label: 'State', value: instance.state._tag }]),\n ...(instance.key === undefined\n ? []\n : [{ label: 'Key', value: instance.key }]),\n ],\n sections: [\n ...(isEmpty(instance.model)\n ? []\n : [{ title: 'Model', value: instance.model }]),\n ...(hasFields(state)\n ? [{ title: `State ${instance.state._tag}`, value: state }]\n : []),\n ...(instance.props === undefined\n ? []\n : [{ title: 'Props', value: instance.props }]),\n ],\n };\n};\n\n/** One State of a card: which Instances are in it, and its data if one is. */\nconst stateSheet = (node: Placed, tag: string): SheetOf => {\n const inIt = node.instances.filter((each) => each.state._tag === tag);\n const data = !node.many && inIt[0] ? dataOf(inIt[0].state) : {};\n return {\n kind: 'State',\n tone: inIt.length ? 'active' : 'dim',\n title: tag,\n facts: [\n { label: 'Of', value: node.name },\n node.many\n ? { label: 'Instances in it', value: inIt.length }\n : {\n label: 'Active',\n value: inIt.length\n ? 'yes'\n : node.instances[0]\n ? `no, it is in ${node.instances[0].state._tag}`\n : 'not running at this Step',\n },\n ],\n sections: hasFields(data) ? [{ title: 'Data', value: data }] : [],\n };\n};\n\n/** One Worker of a card: where it is written, and each key it runs now. */\nconst workerSheet = (node: Placed, name: string, live: boolean): SheetOf => {\n const row = node.workers.find((each) => each.name === name);\n const keys = row?.keys ?? [];\n return {\n kind: 'Worker',\n tone: keys.some((each) => each.status === 'failed')\n ? 'failed'\n : keys.length\n ? 'running'\n : 'dim',\n title: name,\n facts: [\n { label: 'Of', value: node.name },\n {\n label: 'Written',\n value: row?.state ? `in ${row.state}` : 'at its top',\n },\n { label: 'Keys on', value: keys.length || 'none' },\n ],\n rows: {\n title: live ? 'Keys, live' : 'Keys on at this Step',\n items: keys.map((key) => ({\n label:\n key.instance.key === undefined\n ? keyName(name, key)\n : `${keyName(name, key)} · ${key.instance.key}`,\n detail: key.status,\n tone: TONE[key.status],\n })),\n },\n };\n};\n"],"mappings":";;;;;;;;;;;AAyDA,SAAgB,eAAe,EAC7B,SACA,QACA,QACA,aAUC;CACD,MAAM,EAAE,SAAS,QAAQ,OAAO,YAAY;CAC5C,MAAM,aAAa,QAAQ,MAAM;CAGjC,MAAM,QACJ,OAAO,UAAU,YAAY,CAAC,OAAO,MAAM,UAAU,MAAM,OAAO,KAAK,IACnE,QAAQ,OAAO,KAAK,IACpB;CACN,MAAM,OAAO,UAAU;CACvB,MAAM,KACJ,UAAU,OACN,MAAM,SACN,UAAU,SACR,IACA,MAAM,WAAW,UAAU,MAAM,OAAO,KAAK,IAAI;CAC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C7B,OAAO,KAAK,KAAK,SAAS;IACxB,OACE,IAAI,SAAS,QAAQ,KAAA,IACjB,QAAQ,MAAM,GAAG,IACjB,GAAG,QAAQ,MAAM,GAAG,EAAE,KAAK,IAAI,SAAS;IAC9C,QAAQ,IAAI;IACZ,MAAM,KAAK,IAAI;GACjB,EAAE;EACJ;CACF;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Beats } from "../../scene/beats.js";
|
|
2
|
+
import { Placed } from "../../scene/scene.js";
|
|
3
|
+
import "../../scene/index.js";
|
|
4
|
+
//#region src/recipes/kabuki-devtools/map/beat/beat.d.ts
|
|
5
|
+
export declare function Beat({ beats, where, onPick }: {
|
|
6
|
+
readonly beats: Beats;
|
|
7
|
+
/** Where a card is drawn. */
|
|
8
|
+
readonly where: (id: string) => Placed | undefined;
|
|
9
|
+
/** Open the Message. */
|
|
10
|
+
readonly onPick: () => void;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
//#endregion
|
|
13
|
+
//# sourceMappingURL=beat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beat.d.ts","names":[],"sources":["../../../../../src/recipes/kabuki-devtools/map/beat/beat.tsx"],"mappings":";;;;wBAgEgB,OACd,OACA,OACA;WAES,OAAO;;WAEP,QAAQ,eAAe;;WAEvB;oBACV,IAAA"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { ink } from "../../ink/ink.js";
|
|
2
|
+
import { CARD } from "../../scene/nodes.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { motion, useReducedMotion } from "motion/react";
|
|
5
|
+
import { ArrowUpRight, Zap } from "lucide-react";
|
|
6
|
+
//#region src/recipes/kabuki-devtools/map/beat/beat.tsx
|
|
7
|
+
/** In from a card's right edge. */
|
|
8
|
+
const INSET = 10;
|
|
9
|
+
const OUT = [
|
|
10
|
+
.23,
|
|
11
|
+
1,
|
|
12
|
+
.32,
|
|
13
|
+
1
|
|
14
|
+
];
|
|
15
|
+
/** The cards' glide to a new place, which everything here rides with. */
|
|
16
|
+
const MOVE = {
|
|
17
|
+
duration: .42,
|
|
18
|
+
ease: [
|
|
19
|
+
.32,
|
|
20
|
+
.72,
|
|
21
|
+
0,
|
|
22
|
+
1
|
|
23
|
+
]
|
|
24
|
+
};
|
|
25
|
+
/** Where on a card's right edge its name is, or one of its Worker's rows. */
|
|
26
|
+
const edgeAt = (card, worker) => {
|
|
27
|
+
const name = card.y + CARD.pad + CARD.header / 2;
|
|
28
|
+
const index = worker ? card.workers.findIndex((row) => row.name === worker) : -1;
|
|
29
|
+
const states = card.states ? CARD.gap + card.states.length * CARD.line : 0;
|
|
30
|
+
return {
|
|
31
|
+
x: card.x + card.width,
|
|
32
|
+
y: index < 0 ? name : card.y + CARD.pad + CARD.header + states + CARD.gap + index * CARD.row + CARD.row / 2
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
/** From what Sent it to the name of the card it went to, out to the right. */
|
|
36
|
+
const arrowOf = (from, to) => {
|
|
37
|
+
const side = Math.max(from.x, to.x) + (Math.abs(from.y - to.y) < 80 ? 30 : 52);
|
|
38
|
+
return `M ${from.x + 3} ${from.y} C ${side} ${from.y}, ${side} ${to.y}, ${to.x + 9} ${to.y}`;
|
|
39
|
+
};
|
|
40
|
+
function Beat({ beats, where, onPick }) {
|
|
41
|
+
const still = useReducedMotion();
|
|
42
|
+
const target = beats.to ? where(beats.to) : void 0;
|
|
43
|
+
const sent = beats.send ? where(beats.send.at) : void 0;
|
|
44
|
+
const from = beats.request ? where(beats.request.from) : void 0;
|
|
45
|
+
const anchor = target ? {
|
|
46
|
+
right: target.x + target.width,
|
|
47
|
+
top: target.y,
|
|
48
|
+
bottom: target.y + target.height
|
|
49
|
+
} : sent && {
|
|
50
|
+
right: sent.x + sent.width,
|
|
51
|
+
top: sent.y,
|
|
52
|
+
bottom: sent.y + sent.height
|
|
53
|
+
};
|
|
54
|
+
const start = sent && edgeAt(sent, beats.send?.worker);
|
|
55
|
+
const end = target && edgeAt(target);
|
|
56
|
+
const arrow = start && end && (start.x !== end.x || start.y !== end.y) ? {
|
|
57
|
+
start,
|
|
58
|
+
d: arrowOf(start, end)
|
|
59
|
+
} : void 0;
|
|
60
|
+
const landing = still ? 0 : arrow ? .3 : 0;
|
|
61
|
+
const enter = (delay) => still ? { initial: false } : {
|
|
62
|
+
initial: {
|
|
63
|
+
opacity: 0,
|
|
64
|
+
scale: .92
|
|
65
|
+
},
|
|
66
|
+
animate: {
|
|
67
|
+
opacity: 1,
|
|
68
|
+
scale: 1
|
|
69
|
+
},
|
|
70
|
+
transition: {
|
|
71
|
+
duration: .2,
|
|
72
|
+
ease: OUT,
|
|
73
|
+
delay
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const ride = still ? { duration: 0 } : MOVE;
|
|
77
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
78
|
+
className: "pointer-events-none absolute top-0 left-0",
|
|
79
|
+
children: [arrow && /* @__PURE__ */ jsxs("svg", {
|
|
80
|
+
className: "absolute top-0 left-0 overflow-visible",
|
|
81
|
+
width: 1,
|
|
82
|
+
height: 1,
|
|
83
|
+
"aria-hidden": true,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", {
|
|
86
|
+
id: `kabuki-arrow-${beats.key}`,
|
|
87
|
+
viewBox: "0 0 8 8",
|
|
88
|
+
refX: "6",
|
|
89
|
+
refY: "4",
|
|
90
|
+
markerWidth: "7",
|
|
91
|
+
markerHeight: "7",
|
|
92
|
+
orient: "auto-start-reverse",
|
|
93
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
94
|
+
d: "M 0 0 L 8 4 L 0 8 z",
|
|
95
|
+
style: { fill: ink("message") }
|
|
96
|
+
})
|
|
97
|
+
}) }),
|
|
98
|
+
/* @__PURE__ */ jsx(motion.circle, {
|
|
99
|
+
r: 3,
|
|
100
|
+
style: { fill: ink("message") },
|
|
101
|
+
initial: {
|
|
102
|
+
cx: arrow.start.x,
|
|
103
|
+
cy: arrow.start.y,
|
|
104
|
+
scale: still ? 1 : 0
|
|
105
|
+
},
|
|
106
|
+
animate: {
|
|
107
|
+
cx: arrow.start.x,
|
|
108
|
+
cy: arrow.start.y,
|
|
109
|
+
scale: 1
|
|
110
|
+
},
|
|
111
|
+
transition: {
|
|
112
|
+
cx: ride,
|
|
113
|
+
cy: ride,
|
|
114
|
+
scale: {
|
|
115
|
+
duration: .15,
|
|
116
|
+
ease: OUT
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ jsx(motion.path, {
|
|
121
|
+
fill: "none",
|
|
122
|
+
strokeWidth: 1.75,
|
|
123
|
+
strokeLinecap: "round",
|
|
124
|
+
style: { stroke: ink("message") },
|
|
125
|
+
markerEnd: `url(#kabuki-arrow-${beats.key})`,
|
|
126
|
+
initial: {
|
|
127
|
+
d: arrow.d,
|
|
128
|
+
pathLength: still ? 1 : 0
|
|
129
|
+
},
|
|
130
|
+
animate: {
|
|
131
|
+
d: arrow.d,
|
|
132
|
+
pathLength: 1
|
|
133
|
+
},
|
|
134
|
+
transition: {
|
|
135
|
+
d: ride,
|
|
136
|
+
pathLength: {
|
|
137
|
+
duration: .45,
|
|
138
|
+
ease: OUT,
|
|
139
|
+
delay: .05
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
}), anchor && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(motion.div, {
|
|
145
|
+
className: "absolute top-0 left-0",
|
|
146
|
+
initial: {
|
|
147
|
+
x: anchor.right - INSET,
|
|
148
|
+
y: anchor.top
|
|
149
|
+
},
|
|
150
|
+
animate: {
|
|
151
|
+
x: anchor.right - INSET,
|
|
152
|
+
y: anchor.top
|
|
153
|
+
},
|
|
154
|
+
transition: ride,
|
|
155
|
+
children: /* @__PURE__ */ jsxs(motion.button, {
|
|
156
|
+
type: "button",
|
|
157
|
+
onClick: onPick,
|
|
158
|
+
className: "pointer-events-auto flex h-[22px] origin-right items-center gap-1.5 rounded-full border pr-2.5 pl-2 text-[11px] whitespace-nowrap shadow-xs outline-none focus-visible:ring-2",
|
|
159
|
+
style: {
|
|
160
|
+
translate: "-100% -50%",
|
|
161
|
+
backgroundColor: ink("message-soft"),
|
|
162
|
+
borderColor: `color-mix(in oklch, ${ink("message")} 30%, transparent)`
|
|
163
|
+
},
|
|
164
|
+
...enter(landing),
|
|
165
|
+
children: [
|
|
166
|
+
from ? /* @__PURE__ */ jsx(ArrowUpRight, {
|
|
167
|
+
className: "size-3",
|
|
168
|
+
style: { color: ink("message") }
|
|
169
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
170
|
+
className: "size-1.5 rounded-full",
|
|
171
|
+
style: { backgroundColor: ink("message") }
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ jsx("span", {
|
|
174
|
+
className: "font-medium",
|
|
175
|
+
style: { color: ink("message") },
|
|
176
|
+
children: beats.tag
|
|
177
|
+
}),
|
|
178
|
+
beats.send && /* @__PURE__ */ jsxs("span", {
|
|
179
|
+
className: "text-muted-foreground",
|
|
180
|
+
children: [
|
|
181
|
+
from ? "asked by" : "from",
|
|
182
|
+
" ",
|
|
183
|
+
beats.send.by
|
|
184
|
+
]
|
|
185
|
+
}),
|
|
186
|
+
!beats.to && /* @__PURE__ */ jsx("span", {
|
|
187
|
+
className: "text-muted-foreground",
|
|
188
|
+
children: "· dropped"
|
|
189
|
+
})
|
|
190
|
+
]
|
|
191
|
+
})
|
|
192
|
+
}), beats.commands.length > 0 && /* @__PURE__ */ jsx(motion.div, {
|
|
193
|
+
className: "absolute top-0 left-0",
|
|
194
|
+
initial: {
|
|
195
|
+
x: anchor.right - INSET,
|
|
196
|
+
y: anchor.bottom
|
|
197
|
+
},
|
|
198
|
+
animate: {
|
|
199
|
+
x: anchor.right - INSET,
|
|
200
|
+
y: anchor.bottom
|
|
201
|
+
},
|
|
202
|
+
transition: ride,
|
|
203
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
204
|
+
className: "flex flex-row-reverse gap-1",
|
|
205
|
+
style: { translate: "-100% -50%" },
|
|
206
|
+
children: beats.commands.map((command, index) => /* @__PURE__ */ jsxs(motion.span, {
|
|
207
|
+
className: "flex h-5 origin-top items-center gap-1 rounded-full border px-2 font-mono text-[10.5px] whitespace-nowrap",
|
|
208
|
+
style: {
|
|
209
|
+
backgroundColor: ink("command-soft"),
|
|
210
|
+
borderColor: `color-mix(in oklch, ${ink("command")} 35%, transparent)`,
|
|
211
|
+
color: ink("command")
|
|
212
|
+
},
|
|
213
|
+
...enter(landing + .12 + index * .05),
|
|
214
|
+
children: [/* @__PURE__ */ jsx(Zap, { className: "size-2.5" }), command.name]
|
|
215
|
+
}, `${command.name}-${index}`))
|
|
216
|
+
})
|
|
217
|
+
})] })]
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
//#endregion
|
|
221
|
+
export { Beat };
|
|
222
|
+
|
|
223
|
+
//# sourceMappingURL=beat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beat.js","names":[],"sources":["../../../../../src/recipes/kabuki-devtools/map/beat/beat.tsx"],"sourcesContent":["import { motion, useReducedMotion } from 'motion/react';\nimport { ArrowUpRight, Zap } from 'lucide-react';\nimport { ink } from '../../ink/index.ts';\nimport { CARD } from '../../scene/index.ts';\nimport type { Beats, Placed } from '../../scene/index.ts';\n\n/*\n * The Beats of a Step, laid over the Map, played again for each new Message.\n *\n * 1. Send the Message's tag sits on the top edge of the card it went\n * to, with who Sent it. A Worker that Sent it has its row lit.\n * 2. Arrow an arrow draws itself from exactly what Sent it, the Worker's\n * row or the Sender's name, out to the right and into the name\n * of the card it went to: across cards for a Request, a small\n * loop for a Worker Sending to its own Instance.\n * 3. Command one chip per Command the Update asked for, on the card's\n * bottom edge.\n *\n * Each sits on its own card's edges, so it never covers another card.\n *\n * The arrow draws itself, the tag lands as it arrives, the Commands after.\n * When the cards move, a fold say, all of it glides with them. With reduced\n * motion it is simply there.\n */\n\n/** In from a card's right edge. */\nconst INSET = 10;\n\nconst OUT = [0.23, 1, 0.32, 1] as const;\n/** The cards' glide to a new place, which everything here rides with. */\nconst MOVE = { duration: 0.42, ease: [0.32, 0.72, 0, 1] } as const;\n\n/** Where on a card's right edge its name is, or one of its Worker's rows. */\nconst edgeAt = (card: Placed, worker?: string) => {\n const name = card.y + CARD.pad + CARD.header / 2;\n const index = worker\n ? card.workers.findIndex((row) => row.name === worker)\n : -1;\n const states = card.states ? CARD.gap + card.states.length * CARD.line : 0;\n return {\n x: card.x + card.width,\n y:\n index < 0\n ? name\n : card.y +\n CARD.pad +\n CARD.header +\n states +\n CARD.gap +\n index * CARD.row +\n CARD.row / 2,\n };\n};\n\n/** From what Sent it to the name of the card it went to, out to the right. */\nconst arrowOf = (\n from: { x: number; y: number },\n to: { x: number; y: number },\n) => {\n const side =\n Math.max(from.x, to.x) + (Math.abs(from.y - to.y) < 80 ? 30 : 52);\n return `M ${from.x + 3} ${from.y} C ${side} ${from.y}, ${side} ${to.y}, ${to.x + 9} ${to.y}`;\n};\n\nexport function Beat({\n beats,\n where,\n onPick,\n}: {\n readonly beats: Beats;\n /** Where a card is drawn. */\n readonly where: (id: string) => Placed | undefined;\n /** Open the Message. */\n readonly onPick: () => void;\n}) {\n const still = useReducedMotion();\n const target = beats.to ? where(beats.to) : undefined;\n const sent = beats.send ? where(beats.send.at) : undefined;\n const from = beats.request ? where(beats.request.from) : undefined;\n const anchor = target\n ? {\n right: target.x + target.width,\n top: target.y,\n bottom: target.y + target.height,\n }\n : sent && {\n right: sent.x + sent.width,\n top: sent.y,\n bottom: sent.y + sent.height,\n };\n // An arrow wherever its start is not already the name it ends at.\n const start = sent && edgeAt(sent, beats.send?.worker);\n const end = target && edgeAt(target);\n const arrow =\n start && end && (start.x !== end.x || start.y !== end.y)\n ? { start, d: arrowOf(start, end) }\n : undefined;\n // The arrow draws itself; the tag lands as it arrives; the Commands after.\n const landing = still ? 0 : arrow ? 0.3 : 0;\n const enter = (delay: number) =>\n still\n ? { initial: false as const }\n : {\n initial: { opacity: 0, scale: 0.92 },\n animate: { opacity: 1, scale: 1 },\n transition: { duration: 0.2, ease: OUT, delay },\n };\n // Everything rides with the cards when the Map moves.\n const ride = still ? { duration: 0 } : MOVE;\n\n return (\n <div className=\"pointer-events-none absolute top-0 left-0\">\n {/* 2. Arrow */}\n {arrow && (\n <svg\n className=\"absolute top-0 left-0 overflow-visible\"\n width={1}\n height={1}\n aria-hidden\n >\n <defs>\n <marker\n id={`kabuki-arrow-${beats.key}`}\n viewBox=\"0 0 8 8\"\n refX=\"6\"\n refY=\"4\"\n markerWidth=\"7\"\n markerHeight=\"7\"\n orient=\"auto-start-reverse\"\n >\n <path d=\"M 0 0 L 8 4 L 0 8 z\" style={{ fill: ink('message') }} />\n </marker>\n </defs>\n <motion.circle\n r={3}\n style={{ fill: ink('message') }}\n initial={{\n cx: arrow.start.x,\n cy: arrow.start.y,\n scale: still ? 1 : 0,\n }}\n animate={{ cx: arrow.start.x, cy: arrow.start.y, scale: 1 }}\n transition={{\n cx: ride,\n cy: ride,\n scale: { duration: 0.15, ease: OUT },\n }}\n />\n <motion.path\n fill=\"none\"\n strokeWidth={1.75}\n strokeLinecap=\"round\"\n style={{ stroke: ink('message') }}\n markerEnd={`url(#kabuki-arrow-${beats.key})`}\n initial={{ d: arrow.d, pathLength: still ? 1 : 0 }}\n animate={{ d: arrow.d, pathLength: 1 }}\n transition={{\n d: ride,\n pathLength: { duration: 0.45, ease: OUT, delay: 0.05 },\n }}\n />\n </svg>\n )}\n\n {anchor && (\n <>\n <motion.div\n className=\"absolute top-0 left-0\"\n initial={{ x: anchor.right - INSET, y: anchor.top }}\n animate={{ x: anchor.right - INSET, y: anchor.top }}\n transition={ride}\n >\n {/* 1. Send */}\n <motion.button\n type=\"button\"\n onClick={onPick}\n className=\"pointer-events-auto flex h-[22px] origin-right items-center gap-1.5 rounded-full border pr-2.5 pl-2 text-[11px] whitespace-nowrap shadow-xs outline-none focus-visible:ring-2\"\n style={{\n translate: '-100% -50%',\n backgroundColor: ink('message-soft'),\n borderColor: `color-mix(in oklch, ${ink('message')} 30%, transparent)`,\n }}\n {...enter(landing)}\n >\n {from ? (\n <ArrowUpRight\n className=\"size-3\"\n style={{ color: ink('message') }}\n />\n ) : (\n <span\n className=\"size-1.5 rounded-full\"\n style={{ backgroundColor: ink('message') }}\n />\n )}\n <span className=\"font-medium\" style={{ color: ink('message') }}>\n {beats.tag}\n </span>\n {beats.send && (\n <span className=\"text-muted-foreground\">\n {from ? 'asked by' : 'from'} {beats.send.by}\n </span>\n )}\n {!beats.to && (\n <span className=\"text-muted-foreground\">· dropped</span>\n )}\n </motion.button>\n </motion.div>\n {beats.commands.length > 0 && (\n <motion.div\n className=\"absolute top-0 left-0\"\n initial={{ x: anchor.right - INSET, y: anchor.bottom }}\n animate={{ x: anchor.right - INSET, y: anchor.bottom }}\n transition={ride}\n >\n <div\n className=\"flex flex-row-reverse gap-1\"\n style={{ translate: '-100% -50%' }}\n >\n {/* 3. Command */}\n {beats.commands.map((command, index) => (\n <motion.span\n key={`${command.name}-${index}`}\n className=\"flex h-5 origin-top items-center gap-1 rounded-full border px-2 font-mono text-[10.5px] whitespace-nowrap\"\n style={{\n backgroundColor: ink('command-soft'),\n borderColor: `color-mix(in oklch, ${ink('command')} 35%, transparent)`,\n color: ink('command'),\n }}\n {...enter(landing + 0.12 + index * 0.05)}\n >\n <Zap className=\"size-2.5\" />\n {command.name}\n </motion.span>\n ))}\n </div>\n </motion.div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AA0BA,MAAM,QAAQ;AAEd,MAAM,MAAM;CAAC;CAAM;CAAG;CAAM;AAAC;;AAE7B,MAAM,OAAO;CAAE,UAAU;CAAM,MAAM;EAAC;EAAM;EAAM;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ACV,SAAS;IAAE,GAAG,OAAO,QAAQ;IAAO,GAAG,OAAO;GAAO;GACrD,SAAS;IAAE,GAAG,OAAO,QAAQ;IAAO,GAAG,OAAO;GAAO;GACrD,YAAY;GAEZ,UAAA,oBAAC,OAAD;IACE,WAAU;IACV,OAAO,EAAE,WAAW,aAAa;IAGhC,UAAA,MAAM,SAAS,KAAK,SAAS,UAC5B,qBAAC,OAAO,MAAR;KAEE,WAAU;KACV,OAAO;MACL,iBAAiB,IAAI,cAAc;MACnC,aAAa,uBAAuB,IAAI,SAAS,EAAE;MACnD,OAAO,IAAI,SAAS;KACtB;KACA,GAAI,MAAM,UAAU,MAAO,QAAQ,GAAI;KARzC,UAAA,CAUE,oBAAC,KAAD,EAAK,WAAU,WAAY,CAAA,GAC1B,QAAQ,IACE;IAXN,GAAA,GAAG,QAAQ,KAAK,GAAG,OAWb,CACd;GACE,CAAA;EACK,CAAA,CAEd,EAAA,CAAA,CAED;;AAET"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/recipes/kabuki-devtools/map/canvas/canvas.d.ts
|
|
3
|
+
export interface Bounds {
|
|
4
|
+
readonly left: number;
|
|
5
|
+
readonly right: number;
|
|
6
|
+
readonly top: number;
|
|
7
|
+
readonly bottom: number;
|
|
8
|
+
}
|
|
9
|
+
/** Spread on what handles its own presses and scrolls, such as a list that scrolls. */
|
|
10
|
+
export declare const OWN: {
|
|
11
|
+
readonly 'data-canvas-own': '';
|
|
12
|
+
};
|
|
13
|
+
/** Spread on what is drawn, so a tap on it is not a tap on the surface. */
|
|
14
|
+
export declare const ITEM: {
|
|
15
|
+
readonly 'data-canvas-item': '';
|
|
16
|
+
};
|
|
17
|
+
export declare function Canvas({ bounds, label, onTap, dotted, children }: {
|
|
18
|
+
/** What the drawing covers, for Fit. */
|
|
19
|
+
readonly bounds: Bounds;
|
|
20
|
+
readonly label: string;
|
|
21
|
+
/** Dots under the drawing; without them, whatever is behind shows through. */
|
|
22
|
+
readonly dotted?: boolean;
|
|
23
|
+
/** The surface was tapped, away from anything drawn. */
|
|
24
|
+
readonly onTap: () => void;
|
|
25
|
+
/** The drawing, its origin at 0, 0. */
|
|
26
|
+
readonly children: ReactNode;
|
|
27
|
+
}): import("react").JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
//# sourceMappingURL=canvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas.d.ts","names":[],"sources":["../../../../../src/recipes/kabuki-devtools/map/canvas/canvas.tsx"],"mappings":";;iBA6BiB;WACN;WACA;WACA;WACA;;;qBAaE;WAAQ;;;qBAKR;WAAS;;wBAON,SACd,QACA,OACA,OACA,QACA;;WAGS,QAAQ;WACR;;WAEA;;WAEA;;WAEA,UAAU;oBACpB,IAAA"}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { ink } from "../../ink/ink.js";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { animate, motion, useMotionValue } from "motion/react";
|
|
5
|
+
import { Maximize, Minus, Plus } from "lucide-react";
|
|
6
|
+
//#region src/recipes/kabuki-devtools/map/canvas/canvas.tsx
|
|
7
|
+
const MIN = .25;
|
|
8
|
+
const MAX = 2.5;
|
|
9
|
+
/** Room above the root when the Map first opens too tall to fit, in pixels. */
|
|
10
|
+
const TOP = 100;
|
|
11
|
+
const SPRING = {
|
|
12
|
+
type: "spring",
|
|
13
|
+
duration: .45,
|
|
14
|
+
bounce: 0
|
|
15
|
+
};
|
|
16
|
+
const clamp = (scale) => Math.min(MAX, Math.max(MIN, scale));
|
|
17
|
+
/** Spread on what handles its own presses and scrolls, such as a list that scrolls. */
|
|
18
|
+
const OWN = { "data-canvas-own": "" };
|
|
19
|
+
const isOwn = (target) => target instanceof Element && target.closest("[data-canvas-own]") !== null;
|
|
20
|
+
/** Spread on what is drawn, so a tap on it is not a tap on the surface. */
|
|
21
|
+
const ITEM = { "data-canvas-item": "" };
|
|
22
|
+
const isItem = (target) => target instanceof Element && target.closest("[data-canvas-item]") !== null;
|
|
23
|
+
/** How far a pointer may move and still tap. */
|
|
24
|
+
const SLOP = 4;
|
|
25
|
+
function Canvas({ bounds, label, onTap, dotted = true, children }) {
|
|
26
|
+
const surface = useRef(null);
|
|
27
|
+
const x = useMotionValue(0);
|
|
28
|
+
const y = useMotionValue(TOP);
|
|
29
|
+
const scale = useMotionValue(1);
|
|
30
|
+
/** Scale to `next` about a point on the surface. */
|
|
31
|
+
const zoomAt = (next, px, py, smooth = false) => {
|
|
32
|
+
const to = clamp(next);
|
|
33
|
+
const ratio = to / scale.get();
|
|
34
|
+
const nx = px - (px - x.get()) * ratio;
|
|
35
|
+
const ny = py - (py - y.get()) * ratio;
|
|
36
|
+
if (smooth) {
|
|
37
|
+
animate(scale, to, SPRING);
|
|
38
|
+
animate(x, nx, SPRING);
|
|
39
|
+
animate(y, ny, SPRING);
|
|
40
|
+
} else {
|
|
41
|
+
scale.set(to);
|
|
42
|
+
x.set(nx);
|
|
43
|
+
y.set(ny);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
const element = surface.current;
|
|
48
|
+
const width = element.clientWidth;
|
|
49
|
+
const height = element.clientHeight;
|
|
50
|
+
const fits = bounds.bottom - bounds.top <= height - 112;
|
|
51
|
+
scale.set(1);
|
|
52
|
+
x.set(width / 2 - (bounds.left + bounds.right) / 2);
|
|
53
|
+
y.set(fits ? height / 2 - (bounds.top + bounds.bottom) / 2 : TOP - bounds.top);
|
|
54
|
+
}, [
|
|
55
|
+
x,
|
|
56
|
+
y,
|
|
57
|
+
scale
|
|
58
|
+
]);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const element = surface.current;
|
|
61
|
+
const onWheel = (event) => {
|
|
62
|
+
if (isOwn(event.target)) return;
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
const box = element.getBoundingClientRect();
|
|
65
|
+
const rate = event.ctrlKey ? .01 : .002;
|
|
66
|
+
zoomAt(scale.get() * Math.exp(-event.deltaY * rate), event.clientX - box.left, event.clientY - box.top);
|
|
67
|
+
};
|
|
68
|
+
element.addEventListener("wheel", onWheel, { passive: false });
|
|
69
|
+
return () => element.removeEventListener("wheel", onWheel);
|
|
70
|
+
});
|
|
71
|
+
const pointers = useRef(/* @__PURE__ */ new Map());
|
|
72
|
+
/** The press so far: where it began, whether it became a drag, and whether it began on the bare surface. */
|
|
73
|
+
const press = useRef(void 0);
|
|
74
|
+
/** A drag just ended: the click it makes is not one. */
|
|
75
|
+
const dragged = useRef(false);
|
|
76
|
+
const pinch = useRef(void 0);
|
|
77
|
+
const spread = () => {
|
|
78
|
+
const [a, b] = [...pointers.current.values()];
|
|
79
|
+
return {
|
|
80
|
+
distance: Math.hypot(a.x - b.x, a.y - b.y),
|
|
81
|
+
mid: {
|
|
82
|
+
x: (a.x + b.x) / 2,
|
|
83
|
+
y: (a.y + b.y) / 2
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
const onPointerDown = (event) => {
|
|
88
|
+
if (event.button !== 0) return;
|
|
89
|
+
dragged.current = false;
|
|
90
|
+
pointers.current.set(event.pointerId, {
|
|
91
|
+
x: event.clientX,
|
|
92
|
+
y: event.clientY
|
|
93
|
+
});
|
|
94
|
+
if (pointers.current.size === 1) press.current = {
|
|
95
|
+
x: event.clientX,
|
|
96
|
+
y: event.clientY,
|
|
97
|
+
dragging: false,
|
|
98
|
+
bare: !isItem(event.target)
|
|
99
|
+
};
|
|
100
|
+
else {
|
|
101
|
+
if (press.current) press.current.dragging = true;
|
|
102
|
+
for (const id of pointers.current.keys()) event.currentTarget.setPointerCapture(id);
|
|
103
|
+
if (pointers.current.size === 2) pinch.current = {
|
|
104
|
+
distance: spread().distance,
|
|
105
|
+
scale: scale.get()
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
const onPointerMove = (event) => {
|
|
110
|
+
const was = pointers.current.get(event.pointerId);
|
|
111
|
+
if (!was) return;
|
|
112
|
+
const now = {
|
|
113
|
+
x: event.clientX,
|
|
114
|
+
y: event.clientY
|
|
115
|
+
};
|
|
116
|
+
const held = press.current;
|
|
117
|
+
if (held && !held.dragging) {
|
|
118
|
+
if (Math.hypot(now.x - held.x, now.y - held.y) < SLOP) return;
|
|
119
|
+
held.dragging = true;
|
|
120
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
121
|
+
}
|
|
122
|
+
if (pointers.current.size === 1) {
|
|
123
|
+
x.set(x.get() + now.x - was.x);
|
|
124
|
+
y.set(y.get() + now.y - was.y);
|
|
125
|
+
}
|
|
126
|
+
pointers.current.set(event.pointerId, now);
|
|
127
|
+
if (pointers.current.size === 2 && pinch.current) {
|
|
128
|
+
const { distance, mid } = spread();
|
|
129
|
+
const box = surface.current.getBoundingClientRect();
|
|
130
|
+
zoomAt(pinch.current.scale * distance / pinch.current.distance, mid.x - box.left, mid.y - box.top);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const onPointerUp = (event) => {
|
|
134
|
+
if (!pointers.current.delete(event.pointerId)) return;
|
|
135
|
+
if (pointers.current.size < 2) pinch.current = void 0;
|
|
136
|
+
if (pointers.current.size > 0) return;
|
|
137
|
+
const held = press.current;
|
|
138
|
+
press.current = void 0;
|
|
139
|
+
if (!held) return;
|
|
140
|
+
if (held.dragging) dragged.current = true;
|
|
141
|
+
else if (held.bare && event.type === "pointerup") onTap();
|
|
142
|
+
};
|
|
143
|
+
const onClickCapture = (event) => {
|
|
144
|
+
if (!dragged.current) return;
|
|
145
|
+
dragged.current = false;
|
|
146
|
+
event.stopPropagation();
|
|
147
|
+
event.preventDefault();
|
|
148
|
+
};
|
|
149
|
+
const zoomBy = (factor) => {
|
|
150
|
+
const element = surface.current;
|
|
151
|
+
zoomAt(scale.get() * factor, element.clientWidth / 2, element.clientHeight / 2, true);
|
|
152
|
+
};
|
|
153
|
+
const fit = () => {
|
|
154
|
+
const element = surface.current;
|
|
155
|
+
const width = bounds.right - bounds.left;
|
|
156
|
+
const height = bounds.bottom - bounds.top;
|
|
157
|
+
const to = clamp(Math.min(1.25, (element.clientWidth - 112) / Math.max(1, width), (element.clientHeight - 112) / Math.max(1, height)));
|
|
158
|
+
animate(scale, to, SPRING);
|
|
159
|
+
animate(x, element.clientWidth / 2 - (bounds.left + bounds.right) / 2 * to, SPRING);
|
|
160
|
+
animate(y, element.clientHeight / 2 - (bounds.top + bounds.bottom) / 2 * to, SPRING);
|
|
161
|
+
};
|
|
162
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
163
|
+
ref: surface,
|
|
164
|
+
role: "application",
|
|
165
|
+
"aria-label": label,
|
|
166
|
+
className: "relative h-full w-full cursor-grab touch-none overflow-clip select-none active:cursor-grabbing",
|
|
167
|
+
style: dotted ? {
|
|
168
|
+
backgroundImage: `radial-gradient(${ink("grain")} 1px, transparent 1px)`,
|
|
169
|
+
backgroundSize: "20px 20px"
|
|
170
|
+
} : void 0,
|
|
171
|
+
onContextMenu: (event) => event.preventDefault(),
|
|
172
|
+
onPointerDown,
|
|
173
|
+
onClickCapture,
|
|
174
|
+
onPointerMove,
|
|
175
|
+
onPointerUp,
|
|
176
|
+
onPointerCancel: onPointerUp,
|
|
177
|
+
children: [/* @__PURE__ */ jsx(motion.div, {
|
|
178
|
+
className: "absolute top-0 left-0 origin-top-left",
|
|
179
|
+
style: {
|
|
180
|
+
x,
|
|
181
|
+
y,
|
|
182
|
+
scale
|
|
183
|
+
},
|
|
184
|
+
children
|
|
185
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
186
|
+
...ITEM,
|
|
187
|
+
className: "bg-background/85 absolute top-3 right-3 flex flex-col overflow-hidden rounded-lg border shadow-xs backdrop-blur-sm",
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ jsx(Control, {
|
|
190
|
+
label: "Zoom in",
|
|
191
|
+
onClick: () => zoomBy(1.25),
|
|
192
|
+
children: /* @__PURE__ */ jsx(Plus, {})
|
|
193
|
+
}),
|
|
194
|
+
/* @__PURE__ */ jsx(Control, {
|
|
195
|
+
label: "Zoom out",
|
|
196
|
+
onClick: () => zoomBy(.8),
|
|
197
|
+
children: /* @__PURE__ */ jsx(Minus, {})
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ jsx(Control, {
|
|
200
|
+
label: "Fit everything",
|
|
201
|
+
onClick: fit,
|
|
202
|
+
children: /* @__PURE__ */ jsx(Maximize, {})
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
})]
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function Control({ label, onClick, children }) {
|
|
209
|
+
return /* @__PURE__ */ jsx("button", {
|
|
210
|
+
type: "button",
|
|
211
|
+
"aria-label": label,
|
|
212
|
+
title: label,
|
|
213
|
+
onClick,
|
|
214
|
+
className: "text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:ring-ring grid size-9 place-items-center transition-colors duration-150 outline-none focus-visible:ring-2 focus-visible:ring-inset [&_svg]:size-4",
|
|
215
|
+
children
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
export { Canvas, ITEM, OWN };
|
|
220
|
+
|
|
221
|
+
//# sourceMappingURL=canvas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas.js","names":[],"sources":["../../../../../src/recipes/kabuki-devtools/map/canvas/canvas.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport type { ReactNode } from 'react';\nimport { animate, motion, useMotionValue } from 'motion/react';\nimport { Maximize, Minus, Plus } from 'lucide-react';\nimport { ink } from '../../ink/index.ts';\n\n/*\n * A surface to pan and zoom a drawing on, sized by whatever holds it. Knows\n * nothing of what it draws.\n *\n * 1. Place at 100%, never zoomed in: centred if the whole drawing fits,\n * else centred across with its top a little below the surface's,\n * running down. From then on it stays where the reader leaves\n * it: the surface never moves by itself.\n * 2. Pan drag with a finger or the pointer, from anywhere, over what is\n * drawn too: a press becomes a drag once it moves, and the click\n * it would have made is swallowed. A press that stays put clicks\n * what it is on.\n * 3. Zoom scroll, pinch, or the buttons; always about a point, so what\n * is under it stays there.\n * 4. Fit the whole drawing in view, on demand.\n * 5. Tap a tap on the surface itself, not on anything drawn (marked\n * `ITEM`), says so.\n * A right click never opens the browser's menu here.\n *\n * What is drawn marked `OWN` handles its own scrolls: the surface leaves\n * them alone.\n */\n\nexport interface Bounds {\n readonly left: number;\n readonly right: number;\n readonly top: number;\n readonly bottom: number;\n}\n\nconst MIN = 0.25;\nconst MAX = 2.5;\nconst PAD = 56;\n/** Room above the root when the Map first opens too tall to fit, in pixels. */\nconst TOP = 100;\nconst SPRING = { type: 'spring', duration: 0.45, bounce: 0 } as const;\n\nconst clamp = (scale: number) => Math.min(MAX, Math.max(MIN, scale));\n\n/** Spread on what handles its own presses and scrolls, such as a list that scrolls. */\nexport const OWN = { 'data-canvas-own': '' } as const;\nconst isOwn = (target: EventTarget | null) =>\n target instanceof Element && target.closest('[data-canvas-own]') !== null;\n\n/** Spread on what is drawn, so a tap on it is not a tap on the surface. */\nexport const ITEM = { 'data-canvas-item': '' } as const;\nconst isItem = (target: EventTarget | null) =>\n target instanceof Element && target.closest('[data-canvas-item]') !== null;\n\n/** How far a pointer may move and still tap. */\nconst SLOP = 4;\n\nexport function Canvas({\n bounds,\n label,\n onTap,\n dotted = true,\n children,\n}: {\n /** What the drawing covers, for Fit. */\n readonly bounds: Bounds;\n readonly label: string;\n /** Dots under the drawing; without them, whatever is behind shows through. */\n readonly dotted?: boolean;\n /** The surface was tapped, away from anything drawn. */\n readonly onTap: () => void;\n /** The drawing, its origin at 0, 0. */\n readonly children: ReactNode;\n}) {\n const surface = useRef<HTMLDivElement>(null);\n const x = useMotionValue(0);\n const y = useMotionValue(TOP);\n const scale = useMotionValue(1);\n\n /** Scale to `next` about a point on the surface. */\n const zoomAt = (next: number, px: number, py: number, smooth = false) => {\n const to = clamp(next);\n const ratio = to / scale.get();\n const nx = px - (px - x.get()) * ratio;\n const ny = py - (py - y.get()) * ratio;\n if (smooth) {\n animate(scale, to, SPRING);\n animate(x, nx, SPRING);\n animate(y, ny, SPRING);\n } else {\n scale.set(to);\n x.set(nx);\n y.set(ny);\n }\n };\n\n // 1. Place, once, from the drawing as it first is.\n useEffect(() => {\n const element = surface.current!;\n const width = element.clientWidth;\n const height = element.clientHeight;\n const fits = bounds.bottom - bounds.top <= height - PAD * 2;\n scale.set(1);\n x.set(width / 2 - (bounds.left + bounds.right) / 2);\n y.set(\n fits ? height / 2 - (bounds.top + bounds.bottom) / 2 : TOP - bounds.top,\n );\n // oxlint-disable-next-line react-hooks/exhaustive-deps -- placed once, where the drawing first is; later it stays where the reader leaves it.\n }, [x, y, scale]);\n\n // 3. Zoom, from the wheel: a passive listener could not stop the page scrolling.\n useEffect(() => {\n const element = surface.current!;\n const onWheel = (event: WheelEvent) => {\n if (isOwn(event.target)) return;\n event.preventDefault();\n const box = element.getBoundingClientRect();\n // A trackpad's pinch comes as a wheel with Ctrl, in much smaller steps.\n const rate = event.ctrlKey ? 0.01 : 0.002;\n zoomAt(\n scale.get() * Math.exp(-event.deltaY * rate),\n event.clientX - box.left,\n event.clientY - box.top,\n );\n };\n element.addEventListener('wheel', onWheel, { passive: false });\n return () => element.removeEventListener('wheel', onWheel);\n });\n\n // 2. Pan and 3. Zoom, from fingers and the pointer.\n const pointers = useRef(new Map<number, { x: number; y: number }>());\n /** The press so far: where it began, whether it became a drag, and whether it began on the bare surface. */\n const press = useRef<\n { x: number; y: number; dragging: boolean; bare: boolean } | undefined\n >(undefined);\n /** A drag just ended: the click it makes is not one. */\n const dragged = useRef(false);\n const pinch = useRef<{ distance: number; scale: number } | undefined>(\n undefined,\n );\n const spread = () => {\n const [a, b] = [...pointers.current.values()];\n return {\n distance: Math.hypot(a!.x - b!.x, a!.y - b!.y),\n mid: { x: (a!.x + b!.x) / 2, y: (a!.y + b!.y) / 2 },\n };\n };\n\n const onPointerDown = (event: React.PointerEvent) => {\n // Only the main button pans: a right click is the card's.\n if (event.button !== 0) return;\n dragged.current = false;\n pointers.current.set(event.pointerId, {\n x: event.clientX,\n y: event.clientY,\n });\n if (pointers.current.size === 1)\n press.current = {\n x: event.clientX,\n y: event.clientY,\n dragging: false,\n bare: !isItem(event.target),\n };\n else {\n // A second finger: a pinch, never a click.\n if (press.current) press.current.dragging = true;\n for (const id of pointers.current.keys())\n event.currentTarget.setPointerCapture(id);\n if (pointers.current.size === 2)\n pinch.current = { distance: spread().distance, scale: scale.get() };\n }\n };\n const onPointerMove = (event: React.PointerEvent) => {\n const was = pointers.current.get(event.pointerId);\n if (!was) return;\n const now = { x: event.clientX, y: event.clientY };\n const held = press.current;\n if (held && !held.dragging) {\n // Still a click until it moves far enough.\n if (Math.hypot(now.x - held.x, now.y - held.y) < SLOP) return;\n held.dragging = true;\n event.currentTarget.setPointerCapture(event.pointerId);\n }\n if (pointers.current.size === 1) {\n x.set(x.get() + now.x - was.x);\n y.set(y.get() + now.y - was.y);\n }\n pointers.current.set(event.pointerId, now);\n if (pointers.current.size === 2 && pinch.current) {\n const { distance, mid } = spread();\n const box = surface.current!.getBoundingClientRect();\n zoomAt(\n (pinch.current.scale * distance) / pinch.current.distance,\n mid.x - box.left,\n mid.y - box.top,\n );\n }\n };\n const onPointerUp = (event: React.PointerEvent) => {\n if (!pointers.current.delete(event.pointerId)) return;\n if (pointers.current.size < 2) pinch.current = undefined;\n if (pointers.current.size > 0) return;\n const held = press.current;\n press.current = undefined;\n if (!held) return;\n if (held.dragging) dragged.current = true;\n // 5. Tap\n else if (held.bare && event.type === 'pointerup') onTap();\n };\n const onClickCapture = (event: React.MouseEvent) => {\n if (!dragged.current) return;\n dragged.current = false;\n event.stopPropagation();\n event.preventDefault();\n };\n\n const zoomBy = (factor: number) => {\n const element = surface.current!;\n zoomAt(\n scale.get() * factor,\n element.clientWidth / 2,\n element.clientHeight / 2,\n true,\n );\n };\n\n // 4. Fit\n const fit = () => {\n const element = surface.current!;\n const width = bounds.right - bounds.left;\n const height = bounds.bottom - bounds.top;\n const to = clamp(\n Math.min(\n 1.25,\n (element.clientWidth - PAD * 2) / Math.max(1, width),\n (element.clientHeight - PAD * 2) / Math.max(1, height),\n ),\n );\n animate(scale, to, SPRING);\n animate(\n x,\n element.clientWidth / 2 - ((bounds.left + bounds.right) / 2) * to,\n SPRING,\n );\n animate(\n y,\n element.clientHeight / 2 - ((bounds.top + bounds.bottom) / 2) * to,\n SPRING,\n );\n };\n\n return (\n <div\n ref={surface}\n role=\"application\"\n aria-label={label}\n // Clipped, never hidden: a hidden overflow still scrolls to whatever takes focus, and the drawing would jump.\n className=\"relative h-full w-full cursor-grab touch-none overflow-clip select-none active:cursor-grabbing\"\n style={\n dotted\n ? {\n backgroundImage: `radial-gradient(${ink('grain')} 1px, transparent 1px)`,\n backgroundSize: '20px 20px',\n }\n : undefined\n }\n // No browser menu anywhere on the Map: a right click is the Map's own.\n onContextMenu={(event) => event.preventDefault()}\n onPointerDown={onPointerDown}\n onClickCapture={onClickCapture}\n onPointerMove={onPointerMove}\n onPointerUp={onPointerUp}\n onPointerCancel={onPointerUp}\n >\n <motion.div\n className=\"absolute top-0 left-0 origin-top-left\"\n style={{ x, y, scale }}\n >\n {children}\n </motion.div>\n <div\n {...ITEM}\n className=\"bg-background/85 absolute top-3 right-3 flex flex-col overflow-hidden rounded-lg border shadow-xs backdrop-blur-sm\"\n >\n <Control label=\"Zoom in\" onClick={() => zoomBy(1.25)}>\n <Plus />\n </Control>\n <Control label=\"Zoom out\" onClick={() => zoomBy(0.8)}>\n <Minus />\n </Control>\n <Control label=\"Fit everything\" onClick={fit}>\n <Maximize />\n </Control>\n </div>\n </div>\n );\n}\n\nfunction Control({\n label,\n onClick,\n children,\n}: {\n readonly label: string;\n readonly onClick: () => void;\n readonly children: ReactNode;\n}) {\n return (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n onClick={onClick}\n className=\"text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:ring-ring grid size-9 place-items-center transition-colors duration-150 outline-none focus-visible:ring-2 focus-visible:ring-inset [&_svg]:size-4\"\n >\n {children}\n </button>\n );\n}\n"],"mappings":";;;;;;AAoCA,MAAM,MAAM;AACZ,MAAM,MAAM;;AAGZ,MAAM,MAAM;AACZ,MAAM,SAAS;CAAE,MAAM;CAAU,UAAU;CAAM,QAAQ;AAAE;AAE3D,MAAM,SAAS,UAAkB,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;;AAGnE,MAAa,MAAM,EAAE,mBAAmB,GAAG;AAC3C,MAAM,SAAS,WACb,kBAAkB,WAAW,OAAO,QAAQ,mBAAmB,MAAM;;AAGvE,MAAa,OAAO,EAAE,oBAAoB,GAAG;AAC7C,MAAM,UAAU,WACd,kBAAkB,WAAW,OAAO,QAAQ,oBAAoB,MAAM;;AAGxE,MAAM,OAAO;AAEb,SAAgB,OAAO,EACrB,QACA,OACA,OACA,SAAS,MACT,YAWC;CACD,MAAM,UAAU,OAAuB,IAAI;CAC3C,MAAM,IAAI,eAAe,CAAC;CAC1B,MAAM,IAAI,eAAe,GAAG;CAC5B,MAAM,QAAQ,eAAe,CAAC;;CAG9B,MAAM,UAAU,MAAc,IAAY,IAAY,SAAS,UAAU;EACvE,MAAM,KAAK,MAAM,IAAI;EACrB,MAAM,QAAQ,KAAK,MAAM,IAAI;EAC7B,MAAM,KAAK,MAAM,KAAK,EAAE,IAAI,KAAK;EACjC,MAAM,KAAK,MAAM,KAAK,EAAE,IAAI,KAAK;EACjC,IAAI,QAAQ;GACV,QAAQ,OAAO,IAAI,MAAM;GACzB,QAAQ,GAAG,IAAI,MAAM;GACrB,QAAQ,GAAG,IAAI,MAAM;EACvB,OAAO;GACL,MAAM,IAAI,EAAE;GACZ,EAAE,IAAI,EAAE;GACR,EAAE,IAAI,EAAE;EACV;CACF;CAGA,gBAAgB;EACd,MAAM,UAAU,QAAQ;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