@brett_lamy/ui 2.0.0 → 3.1.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/README.md +12 -5
- package/dist/components/adaptive-pane.d.ts.map +1 -1
- package/dist/components/adaptive-pane.js +30 -0
- package/dist/components/animated-height.d.ts.map +1 -1
- package/dist/components/animated-height.js +82 -0
- package/dist/{templates → components}/artifact-chat-container.d.ts +12 -5
- package/dist/components/artifact-chat-container.d.ts.map +1 -0
- package/dist/components/artifact-chat-container.js +200 -0
- package/dist/components/avatar.js +26 -0
- package/dist/components/badge.js +24 -0
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +46 -0
- package/dist/components/card.js +56 -0
- package/dist/components/celebrate.d.ts.map +1 -1
- package/dist/components/celebrate.js +142 -0
- package/dist/components/chat-column.d.ts.map +1 -0
- package/dist/components/chat-column.js +26 -0
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +55 -0
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +65 -0
- package/dist/components/command-menu.d.ts.map +1 -1
- package/dist/components/command-menu.js +906 -0
- package/dist/components/composer/annotator.d.ts.map +1 -0
- package/dist/components/composer/annotator.js +17 -0
- package/dist/components/composer/composer-files.d.ts.map +1 -0
- package/dist/components/composer/composer-files.js +91 -0
- package/dist/components/{workbench/wb-popover.d.ts → composer/composer-popover.d.ts} +1 -1
- package/dist/components/composer/composer-popover.d.ts.map +1 -0
- package/dist/components/composer/composer-popover.js +29 -0
- package/dist/components/{workbench → composer}/composer.d.ts +3 -3
- package/dist/components/composer/composer.d.ts.map +1 -0
- package/dist/components/composer/composer.js +1633 -0
- package/dist/components/{workbench/chat.d.ts → conversation.d.ts} +2 -2
- package/dist/components/conversation.d.ts.map +1 -0
- package/dist/components/conversation.js +357 -0
- package/dist/components/credenza.d.ts.map +1 -1
- package/dist/components/credenza.js +294 -0
- package/dist/components/dialog.d.ts +2 -2
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +125 -0
- package/dist/components/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure.js +59 -0
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +114 -0
- package/dist/components/edge-drawer.js +73 -0
- package/dist/components/edit-bar.d.ts.map +1 -1
- package/dist/components/edit-bar.js +33 -0
- package/dist/components/{chat/floating-chat.d.ts → floating-chat.d.ts} +8 -4
- package/dist/components/floating-chat.d.ts.map +1 -0
- package/dist/components/floating-chat.js +288 -0
- package/dist/components/{chat/floating-sheet.d.ts → floating-sheet.d.ts} +5 -5
- package/dist/components/floating-sheet.d.ts.map +1 -0
- package/dist/components/floating-sheet.js +252 -0
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +32 -0
- package/dist/{lib/workbench/icons.d.ts → components/icon-button.d.ts} +5 -5
- package/dist/components/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button.js +31 -0
- package/dist/components/icon-swap.d.ts.map +1 -1
- package/dist/components/icon-swap.js +80 -0
- package/dist/components/index-bar.d.ts +14 -1
- package/dist/components/index-bar.d.ts.map +1 -1
- package/dist/components/index-bar.js +249 -0
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +30 -0
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +21 -0
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +22 -0
- package/dist/components/list-box.d.ts +1 -3
- package/dist/components/list-box.d.ts.map +1 -1
- package/dist/components/list-box.js +104 -0
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +491 -0
- package/dist/components/markdown-editor.d.ts.map +1 -1
- package/dist/components/markdown-editor.js +322 -0
- package/dist/components/{workbench/markdown.d.ts → markdown-view.d.ts} +1 -1
- package/dist/components/markdown-view.d.ts.map +1 -0
- package/dist/components/markdown-view.js +129 -0
- package/dist/components/measure-h.d.ts.map +1 -1
- package/dist/components/measure-h.js +20 -0
- package/dist/components/message-scroller.d.ts.map +1 -0
- package/dist/components/message-scroller.js +247 -0
- package/dist/components/morph.d.ts.map +1 -1
- package/dist/components/morph.js +89 -0
- package/dist/components/navigation-stack.d.ts +14 -0
- package/dist/components/navigation-stack.d.ts.map +1 -1
- package/dist/components/navigation-stack.js +506 -0
- package/dist/components/now-playing-bars.js +38 -0
- package/dist/components/number-morph.d.ts.map +1 -1
- package/dist/components/number-morph.js +123 -0
- package/dist/components/pencilkit/constants.d.ts.map +1 -0
- package/dist/components/pencilkit/constants.js +63 -0
- package/dist/components/pencilkit/pencil-canvas.d.ts +1 -1
- package/dist/components/pencilkit/pencil-canvas.d.ts.map +1 -1
- package/dist/components/pencilkit/pencil-canvas.js +105 -0
- package/dist/components/pencilkit/pencil-toolbar.d.ts +2 -2
- package/dist/components/pencilkit/pencil-toolbar.d.ts.map +1 -1
- package/dist/components/pencilkit/pencil-toolbar.js +186 -0
- package/dist/components/pencilkit/pencilkit-annotator.d.ts +1 -1
- package/dist/components/pencilkit/pencilkit-annotator.d.ts.map +1 -1
- package/dist/components/pencilkit/pencilkit-annotator.js +44 -0
- package/dist/components/pencilkit/stroke-path.d.ts +1 -1
- package/dist/components/pencilkit/stroke-path.d.ts.map +1 -1
- package/dist/components/pencilkit/stroke-path.js +44 -0
- package/dist/components/pencilkit/use-pencil-history.d.ts +2 -2
- package/dist/components/pencilkit/use-pencil-history.d.ts.map +1 -1
- package/dist/components/pencilkit/use-pencil-history.js +25 -0
- package/dist/components/plain-button.d.ts +10 -0
- package/dist/components/plain-button.d.ts.map +1 -0
- package/dist/components/plain-button.js +23 -0
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +36 -0
- package/dist/components/progress-ring.d.ts.map +1 -1
- package/dist/components/progress-ring.js +195 -0
- package/dist/components/progress-stepper.d.ts.map +1 -0
- package/dist/components/progress-stepper.js +62 -0
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +54 -0
- package/dist/components/qr-svg.d.ts.map +1 -1
- package/dist/components/qr-svg.js +74 -0
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +41 -0
- package/dist/components/replay-preview.d.ts +4 -0
- package/dist/components/replay-preview.d.ts.map +1 -0
- package/dist/components/replay-preview.js +3 -0
- package/dist/components/scroll-area.js +23 -0
- package/dist/components/search-field.d.ts.map +1 -1
- package/dist/components/search-field.js +44 -0
- package/dist/components/segmented.d.ts +1 -1
- package/dist/components/segmented.d.ts.map +1 -1
- package/dist/components/segmented.js +32 -0
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +93 -0
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +40 -0
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +55 -0
- package/dist/components/side-drawer.d.ts +10 -1
- package/dist/components/side-drawer.d.ts.map +1 -1
- package/dist/components/side-drawer.js +247 -0
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +282 -0
- package/dist/components/skeleton.js +48 -0
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +98 -0
- package/dist/components/snap-sheet.d.ts.map +1 -0
- package/dist/components/snap-sheet.js +100 -0
- package/dist/components/spinner.js +35 -0
- package/dist/components/split-view.d.ts.map +1 -1
- package/dist/components/split-view.js +1060 -0
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +27 -0
- package/dist/components/syntax-highlighting.d.ts.map +1 -1
- package/dist/components/syntax-highlighting.js +293 -0
- package/dist/components/tab-bar.js +28 -0
- package/dist/components/tab-view.d.ts +1 -1
- package/dist/components/tab-view.d.ts.map +1 -1
- package/dist/components/tab-view.js +307 -0
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +86 -0
- package/dist/components/text-field.d.ts.map +1 -1
- package/dist/components/text-field.js +29 -0
- package/dist/components/text-morph.d.ts.map +1 -1
- package/dist/components/text-morph.js +131 -0
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +30 -0
- package/dist/components/toast.d.ts +0 -2
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/toast.js +302 -0
- package/dist/components/toggle-group.d.ts +1 -1
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +48 -0
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.d.ts.map +1 -1
- package/dist/components/toggle.js +42 -0
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +42 -0
- package/dist/{lib/workbench/theme.d.ts → components/workbench-theme.d.ts} +2 -2
- package/dist/components/workbench-theme.d.ts.map +1 -0
- package/dist/components/workbench-theme.js +34 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +29 -47
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +94 -20350
- package/dist/lib/append-stream.d.ts +43 -0
- package/dist/lib/append-stream.d.ts.map +1 -0
- package/dist/lib/append-stream.js +128 -0
- package/dist/lib/container.d.ts.map +1 -1
- package/dist/lib/container.js +49 -0
- package/dist/lib/durable-streams.d.ts +102 -0
- package/dist/lib/durable-streams.d.ts.map +1 -0
- package/dist/lib/durable-streams.js +280 -0
- package/dist/lib/icon-shapes/chat.js +13 -0
- package/dist/lib/icon-shapes/pencilkit.js +20 -0
- package/dist/lib/icon-shapes/workbench.js +47 -0
- package/dist/lib/icon.d.ts +1 -1
- package/dist/lib/icon.d.ts.map +1 -1
- package/dist/lib/icon.js +1774 -0
- package/dist/lib/motion.d.ts +16 -0
- package/dist/lib/motion.d.ts.map +1 -1
- package/dist/lib/motion.js +104 -0
- package/dist/lib/{chat/persistent-host.d.ts → persistent-host.d.ts} +1 -1
- package/dist/lib/persistent-host.d.ts.map +1 -0
- package/dist/lib/persistent-host.js +41 -0
- package/dist/lib/primitives.js +8 -0
- package/dist/lib/qr.js +552 -0
- package/dist/lib/row-label.d.ts.map +1 -1
- package/dist/lib/row-label.js +10 -0
- package/dist/lib/session-recorder.d.ts +87 -0
- package/dist/lib/session-recorder.d.ts.map +1 -0
- package/dist/lib/session-recorder.js +257 -0
- package/dist/lib/sheet-drag.d.ts +1 -1
- package/dist/lib/sheet-drag.d.ts.map +1 -1
- package/dist/lib/sheet-drag.js +128 -0
- package/dist/lib/syntax.js +204 -0
- package/dist/lib/theme.d.ts +33 -8
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +138 -0
- package/dist/lib/tokens.generated.d.ts +16 -0
- package/dist/lib/tokens.generated.d.ts.map +1 -0
- package/dist/lib/tokens.generated.js +22 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +18 -0
- package/dist/theme.css +0 -60
- package/package.json +5 -7
- package/dist/components/adaptive-pane.stories.d.ts +0 -7
- package/dist/components/adaptive-pane.stories.d.ts.map +0 -1
- package/dist/components/avatar.stories.d.ts +0 -9
- package/dist/components/avatar.stories.d.ts.map +0 -1
- package/dist/components/badge.stories.d.ts +0 -9
- package/dist/components/badge.stories.d.ts.map +0 -1
- package/dist/components/button.stories.d.ts +0 -11
- package/dist/components/button.stories.d.ts.map +0 -1
- package/dist/components/card.stories.d.ts +0 -9
- package/dist/components/card.stories.d.ts.map +0 -1
- package/dist/components/chat/chat-column.d.ts.map +0 -1
- package/dist/components/chat/chat-column.stories.d.ts +0 -9
- package/dist/components/chat/chat-column.stories.d.ts.map +0 -1
- package/dist/components/chat/floating-chat.d.ts.map +0 -1
- package/dist/components/chat/floating-chat.stories.d.ts +0 -17
- package/dist/components/chat/floating-chat.stories.d.ts.map +0 -1
- package/dist/components/chat/floating-sheet.d.ts.map +0 -1
- package/dist/components/chat/floating-sheet.stories.d.ts +0 -22
- package/dist/components/chat/floating-sheet.stories.d.ts.map +0 -1
- package/dist/components/chat/progress-stepper.d.ts.map +0 -1
- package/dist/components/checkbox.stories.d.ts +0 -11
- package/dist/components/checkbox.stories.d.ts.map +0 -1
- package/dist/components/combobox.stories.d.ts +0 -10
- package/dist/components/combobox.stories.d.ts.map +0 -1
- package/dist/components/command-menu.stories.d.ts +0 -17
- package/dist/components/command-menu.stories.d.ts.map +0 -1
- package/dist/components/credenza.stories.d.ts +0 -8
- package/dist/components/credenza.stories.d.ts.map +0 -1
- package/dist/components/dialog.stories.d.ts +0 -12
- package/dist/components/dialog.stories.d.ts.map +0 -1
- package/dist/components/disclosure.stories.d.ts +0 -10
- package/dist/components/disclosure.stories.d.ts.map +0 -1
- package/dist/components/dropdown-menu.stories.d.ts +0 -11
- package/dist/components/dropdown-menu.stories.d.ts.map +0 -1
- package/dist/components/edge-drawer.stories.d.ts +0 -8
- package/dist/components/edge-drawer.stories.d.ts.map +0 -1
- package/dist/components/edit-bar.stories.d.ts +0 -10
- package/dist/components/edit-bar.stories.d.ts.map +0 -1
- package/dist/components/form.stories.d.ts +0 -9
- package/dist/components/form.stories.d.ts.map +0 -1
- package/dist/components/haptic-indicator.d.ts +0 -11
- package/dist/components/haptic-indicator.d.ts.map +0 -1
- package/dist/components/haptic-indicator.stories.d.ts +0 -8
- package/dist/components/haptic-indicator.stories.d.ts.map +0 -1
- package/dist/components/index-bar.stories.d.ts +0 -12
- package/dist/components/index-bar.stories.d.ts.map +0 -1
- package/dist/components/input.stories.d.ts +0 -10
- package/dist/components/input.stories.d.ts.map +0 -1
- package/dist/components/kbd.stories.d.ts +0 -9
- package/dist/components/kbd.stories.d.ts.map +0 -1
- package/dist/components/label.stories.d.ts +0 -8
- package/dist/components/label.stories.d.ts.map +0 -1
- package/dist/components/list-box.stories.d.ts +0 -9
- package/dist/components/list-box.stories.d.ts.map +0 -1
- package/dist/components/list-row.stories.d.ts +0 -24
- package/dist/components/list-row.stories.d.ts.map +0 -1
- package/dist/components/list.stories.d.ts +0 -27
- package/dist/components/list.stories.d.ts.map +0 -1
- package/dist/components/markdown-editor.stories.d.ts +0 -17
- package/dist/components/markdown-editor.stories.d.ts.map +0 -1
- package/dist/components/morph.stories.d.ts +0 -14
- package/dist/components/morph.stories.d.ts.map +0 -1
- package/dist/components/motion.stories.d.ts +0 -15
- package/dist/components/motion.stories.d.ts.map +0 -1
- package/dist/components/navigation-stack.stories.d.ts +0 -31
- package/dist/components/navigation-stack.stories.d.ts.map +0 -1
- package/dist/components/now-playing-bars.stories.d.ts +0 -12
- package/dist/components/now-playing-bars.stories.d.ts.map +0 -1
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts +0 -18
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts.map +0 -1
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts +0 -10
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts.map +0 -1
- package/dist/components/popover.stories.d.ts +0 -9
- package/dist/components/popover.stories.d.ts.map +0 -1
- package/dist/components/progress-ring.stories.d.ts +0 -15
- package/dist/components/progress-ring.stories.d.ts.map +0 -1
- package/dist/components/progress.stories.d.ts +0 -10
- package/dist/components/progress.stories.d.ts.map +0 -1
- package/dist/components/qr-svg.stories.d.ts +0 -16
- package/dist/components/qr-svg.stories.d.ts.map +0 -1
- package/dist/components/radio-group.stories.d.ts +0 -10
- package/dist/components/radio-group.stories.d.ts.map +0 -1
- package/dist/components/scroll-area.stories.d.ts +0 -8
- package/dist/components/scroll-area.stories.d.ts.map +0 -1
- package/dist/components/search-field.stories.d.ts +0 -10
- package/dist/components/search-field.stories.d.ts.map +0 -1
- package/dist/components/segmented.stories.d.ts +0 -8
- package/dist/components/segmented.stories.d.ts.map +0 -1
- package/dist/components/select.stories.d.ts +0 -12
- package/dist/components/select.stories.d.ts.map +0 -1
- package/dist/components/separator.stories.d.ts +0 -9
- package/dist/components/separator.stories.d.ts.map +0 -1
- package/dist/components/sheet.stories.d.ts +0 -12
- package/dist/components/sheet.stories.d.ts.map +0 -1
- package/dist/components/side-drawer.stories.d.ts +0 -8
- package/dist/components/side-drawer.stories.d.ts.map +0 -1
- package/dist/components/sidebar.stories.d.ts +0 -10
- package/dist/components/sidebar.stories.d.ts.map +0 -1
- package/dist/components/skeleton.stories.d.ts +0 -11
- package/dist/components/skeleton.stories.d.ts.map +0 -1
- package/dist/components/slider.stories.d.ts +0 -12
- package/dist/components/slider.stories.d.ts.map +0 -1
- package/dist/components/spinner.stories.d.ts +0 -9
- package/dist/components/spinner.stories.d.ts.map +0 -1
- package/dist/components/split-view.stories.d.ts +0 -58
- package/dist/components/split-view.stories.d.ts.map +0 -1
- package/dist/components/switch.stories.d.ts +0 -9
- package/dist/components/switch.stories.d.ts.map +0 -1
- package/dist/components/syntax-highlighting.stories.d.ts +0 -18
- package/dist/components/syntax-highlighting.stories.d.ts.map +0 -1
- package/dist/components/tab-bar.stories.d.ts +0 -8
- package/dist/components/tab-bar.stories.d.ts.map +0 -1
- package/dist/components/tab-view.stories.d.ts +0 -37
- package/dist/components/tab-view.stories.d.ts.map +0 -1
- package/dist/components/tabs.stories.d.ts +0 -9
- package/dist/components/tabs.stories.d.ts.map +0 -1
- package/dist/components/text-field.stories.d.ts +0 -9
- package/dist/components/text-field.stories.d.ts.map +0 -1
- package/dist/components/toast.stories.d.ts +0 -13
- package/dist/components/toast.stories.d.ts.map +0 -1
- package/dist/components/toggle-group.stories.d.ts +0 -10
- package/dist/components/toggle-group.stories.d.ts.map +0 -1
- package/dist/components/toggle.stories.d.ts +0 -9
- package/dist/components/toggle.stories.d.ts.map +0 -1
- package/dist/components/tooltip.stories.d.ts +0 -11
- package/dist/components/tooltip.stories.d.ts.map +0 -1
- package/dist/components/workbench/annotator.d.ts.map +0 -1
- package/dist/components/workbench/chat.d.ts.map +0 -1
- package/dist/components/workbench/chat.stories.d.ts +0 -13
- package/dist/components/workbench/chat.stories.d.ts.map +0 -1
- package/dist/components/workbench/composer-files.d.ts.map +0 -1
- package/dist/components/workbench/composer.d.ts.map +0 -1
- package/dist/components/workbench/composer.stories.d.ts +0 -35
- package/dist/components/workbench/composer.stories.d.ts.map +0 -1
- package/dist/components/workbench/fixtures.d.ts +0 -38
- package/dist/components/workbench/fixtures.d.ts.map +0 -1
- package/dist/components/workbench/markdown.d.ts.map +0 -1
- package/dist/components/workbench/message-scroller.d.ts.map +0 -1
- package/dist/components/workbench/message-scroller.stories.d.ts +0 -9
- package/dist/components/workbench/message-scroller.stories.d.ts.map +0 -1
- package/dist/components/workbench/model-picker.d.ts +0 -29
- package/dist/components/workbench/model-picker.d.ts.map +0 -1
- package/dist/components/workbench/models.d.ts +0 -32
- package/dist/components/workbench/models.d.ts.map +0 -1
- package/dist/components/workbench/snap-sheet.d.ts.map +0 -1
- package/dist/components/workbench/snap-sheet.stories.d.ts +0 -8
- package/dist/components/workbench/snap-sheet.stories.d.ts.map +0 -1
- package/dist/components/workbench/surfaces.d.ts +0 -67
- package/dist/components/workbench/surfaces.d.ts.map +0 -1
- package/dist/components/workbench/surfaces.stories.d.ts +0 -15
- package/dist/components/workbench/surfaces.stories.d.ts.map +0 -1
- package/dist/components/workbench/terminal.d.ts +0 -51
- package/dist/components/workbench/terminal.d.ts.map +0 -1
- package/dist/components/workbench/terminal.stories.d.ts +0 -8
- package/dist/components/workbench/terminal.stories.d.ts.map +0 -1
- package/dist/components/workbench/wb-popover.d.ts.map +0 -1
- package/dist/components/workbench/workbench-composer.d.ts +0 -26
- package/dist/components/workbench/workbench-composer.d.ts.map +0 -1
- package/dist/demos/delivery/delivery-tracking-demo.d.ts +0 -41
- package/dist/demos/delivery/delivery-tracking-demo.d.ts.map +0 -1
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts +0 -13
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts.map +0 -1
- package/dist/demos/haptics-playground.d.ts +0 -18
- package/dist/demos/haptics-playground.d.ts.map +0 -1
- package/dist/demos/haptics-playground.stories.d.ts +0 -8
- package/dist/demos/haptics-playground.stories.d.ts.map +0 -1
- package/dist/demos/map-chat/geo.d.ts +0 -46
- package/dist/demos/map-chat/geo.d.ts.map +0 -1
- package/dist/demos/map-chat/map-agent.d.ts +0 -48
- package/dist/demos/map-chat/map-agent.d.ts.map +0 -1
- package/dist/demos/map-chat/map-chat-demo.d.ts +0 -19
- package/dist/demos/map-chat/map-chat-demo.d.ts.map +0 -1
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts +0 -16
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts.map +0 -1
- package/dist/demos/map-chat/map-icons.d.ts +0 -44
- package/dist/demos/map-chat/map-icons.d.ts.map +0 -1
- package/dist/demos/map-chat/places.d.ts +0 -29
- package/dist/demos/map-chat/places.d.ts.map +0 -1
- package/dist/demos/map-chat/tile-map.d.ts +0 -108
- package/dist/demos/map-chat/tile-map.d.ts.map +0 -1
- package/dist/demos/pencilkit/demo-strokes.d.ts +0 -4
- package/dist/demos/pencilkit/demo-strokes.d.ts.map +0 -1
- package/dist/demos/pencilkit/pencilkit-demo.d.ts +0 -17
- package/dist/demos/pencilkit/pencilkit-demo.d.ts.map +0 -1
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts +0 -11
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts.map +0 -1
- package/dist/demos/sidebar-demo.d.ts +0 -6
- package/dist/demos/sidebar-demo.d.ts.map +0 -1
- package/dist/demos/split-view-demos.d.ts +0 -50
- package/dist/demos/split-view-demos.d.ts.map +0 -1
- package/dist/lib/chat/chat-shell-context.d.ts +0 -20
- package/dist/lib/chat/chat-shell-context.d.ts.map +0 -1
- package/dist/lib/chat/persistent-host.d.ts.map +0 -1
- package/dist/lib/haptics.d.ts +0 -27
- package/dist/lib/haptics.d.ts.map +0 -1
- package/dist/lib/icon.stories.d.ts +0 -15
- package/dist/lib/icon.stories.d.ts.map +0 -1
- package/dist/lib/pencilkit/constants.d.ts.map +0 -1
- package/dist/lib/workbench/haptics.d.ts +0 -3
- package/dist/lib/workbench/haptics.d.ts.map +0 -1
- package/dist/lib/workbench/icons.d.ts.map +0 -1
- package/dist/lib/workbench/motion.d.ts +0 -19
- package/dist/lib/workbench/motion.d.ts.map +0 -1
- package/dist/lib/workbench/press.d.ts +0 -10
- package/dist/lib/workbench/press.d.ts.map +0 -1
- package/dist/lib/workbench/theme.d.ts.map +0 -1
- package/dist/lib/workbench/util.d.ts +0 -8
- package/dist/lib/workbench/util.d.ts.map +0 -1
- package/dist/stories/frame.d.ts +0 -16
- package/dist/stories/frame.d.ts.map +0 -1
- package/dist/stories/primitive-frame.d.ts +0 -20
- package/dist/stories/primitive-frame.d.ts.map +0 -1
- package/dist/templates/artifact-chat-container.d.ts.map +0 -1
- package/dist/templates/artifact-chat-container.stories.d.ts +0 -24
- package/dist/templates/artifact-chat-container.stories.d.ts.map +0 -1
- package/dist/templates/chat-shell.d.ts +0 -87
- package/dist/templates/chat-shell.d.ts.map +0 -1
- package/dist/templates/workbench-shell.d.ts +0 -177
- package/dist/templates/workbench-shell.d.ts.map +0 -1
- package/dist/templates/workbench-shell.stories.d.ts +0 -17
- package/dist/templates/workbench-shell.stories.d.ts.map +0 -1
- /package/dist/components/{chat/chat-column.d.ts → chat-column.d.ts} +0 -0
- /package/dist/components/{workbench → composer}/annotator.d.ts +0 -0
- /package/dist/components/{workbench → composer}/composer-files.d.ts +0 -0
- /package/dist/components/{workbench/message-scroller.d.ts → message-scroller.d.ts} +0 -0
- /package/dist/{lib → components}/pencilkit/constants.d.ts +0 -0
- /package/dist/components/{chat/progress-stepper.d.ts → progress-stepper.d.ts} +0 -0
- /package/dist/components/{workbench/snap-sheet.d.ts → snap-sheet.d.ts} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare class StreamFullError extends Error {
|
|
2
|
+
constructor(name: string);
|
|
3
|
+
}
|
|
4
|
+
/** localStorage, or null where there is none (server render, blocked storage). */
|
|
5
|
+
export declare function storage(): Storage | null;
|
|
6
|
+
export declare const packSync: (records: unknown[]) => string;
|
|
7
|
+
export declare function pack(records: unknown[]): Promise<string>;
|
|
8
|
+
export declare function unpack<T>(chunk: string): Promise<T[]>;
|
|
9
|
+
export interface LocalStreamsOptions {
|
|
10
|
+
/** Called when a write doesn't fit: free some room (removing a stream) and return true, or return false to give up. */
|
|
11
|
+
evict?: (writing: string) => boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare class LocalStreams {
|
|
14
|
+
private opts;
|
|
15
|
+
private listeners;
|
|
16
|
+
/** Where each stream ends as far as calls in flight are concerned, so concurrent appends take distinct offsets. */
|
|
17
|
+
private tail;
|
|
18
|
+
private chain;
|
|
19
|
+
constructor(opts?: LocalStreamsOptions);
|
|
20
|
+
private chunks;
|
|
21
|
+
/** Every stream with at least one record. */
|
|
22
|
+
names(): string[];
|
|
23
|
+
/** How many records the stream holds. */
|
|
24
|
+
length(name: string): number;
|
|
25
|
+
/** Characters the stream occupies (keys and values). */
|
|
26
|
+
size(name?: string): number;
|
|
27
|
+
private next;
|
|
28
|
+
private put;
|
|
29
|
+
/** Append records; resolves to the offset of the first. Writes happen in call order. */
|
|
30
|
+
append(name: string, records: unknown[]): Promise<number>;
|
|
31
|
+
/** Append now, uncompressed: for a page that is about to go. Anything still being compressed lands after it by offset. */
|
|
32
|
+
appendSync(name: string, records: unknown[]): number;
|
|
33
|
+
/** Resolves once every append started so far has been written. */
|
|
34
|
+
flush(): Promise<void>;
|
|
35
|
+
/** Records from `from` (inclusive) to `to` (exclusive). */
|
|
36
|
+
read<T = unknown>(name: string, from?: number, to?: number): Promise<T[]>;
|
|
37
|
+
/** Drop a whole stream. Not an edit of the stream — it is gone, as when storage is cleared. */
|
|
38
|
+
remove(name: string): void;
|
|
39
|
+
/** Called after any change in this tab, or (via `storage` events) in another. */
|
|
40
|
+
subscribe(cb: () => void): () => void;
|
|
41
|
+
private emit;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=append-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"append-stream.d.ts","sourceRoot":"","sources":["../../src/lib/append-stream.ts"],"names":[],"mappings":"AAcA,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,IAAI,EAAE,MAAM;CAIzB;AAMD,kFAAkF;AAClF,wBAAgB,OAAO,IAAI,OAAO,GAAG,IAAI,CAExC;AAWD,eAAO,MAAM,QAAQ,GAAI,SAAS,OAAO,EAAE,WAAmC,CAAC;AAE/E,wBAAsB,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAI9D;AAED,wBAAsB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAI3D;AAMD,MAAM,WAAW,mBAAmB;IAClC,uHAAuH;IACvH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CACtC;AAED,qBAAa,YAAY;IAMX,OAAO,CAAC,IAAI;IALxB,OAAO,CAAC,SAAS,CAAyB;IAC1C,mHAAmH;IACnH,OAAO,CAAC,IAAI,CAA6B;IACzC,OAAO,CAAC,KAAK,CAAoC;gBAE7B,IAAI,GAAE,mBAAwB;IAElD,OAAO,CAAC,MAAM;IAcd,6CAA6C;IAC7C,KAAK,IAAI,MAAM,EAAE;IAIjB,yCAAyC;IACzC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAM5B,wDAAwD;IACxD,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM;IAK3B,OAAO,CAAC,IAAI;IAMZ,OAAO,CAAC,GAAG;IAYX,wFAAwF;IACxF,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAQzD,0HAA0H;IAC1H,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM;IAOpD,kEAAkE;IAC5D,KAAK;IAIX,2DAA2D;IACrD,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,SAAI,EAAE,EAAE,SAAW,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAY5E,+FAA+F;IAC/F,MAAM,CAAC,IAAI,EAAE,MAAM;IAQnB,iFAAiF;IACjF,SAAS,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAUrC,OAAO,CAAC,IAAI;CAGb"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region src/lib/append-stream.ts
|
|
3
|
+
var e = class extends Error {
|
|
4
|
+
constructor(e) {
|
|
5
|
+
super(`No room to append to "${e}" in localStorage`), this.name = "StreamFullError";
|
|
6
|
+
}
|
|
7
|
+
}, t = "bl-stream:", n = /^bl-stream:(.+):(\d{10})\.(\d+)$/, r = (e) => String(e).padStart(10, "0");
|
|
8
|
+
function i() {
|
|
9
|
+
try {
|
|
10
|
+
return typeof localStorage > "u" ? null : localStorage;
|
|
11
|
+
} catch {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function a(e) {
|
|
16
|
+
let t = "";
|
|
17
|
+
for (let n = 0; n < e.length; n += 32768) t += String.fromCharCode(...e.subarray(n, n + 32768));
|
|
18
|
+
return btoa(t);
|
|
19
|
+
}
|
|
20
|
+
var o = (e) => Uint8Array.from(atob(e), (e) => e.charCodeAt(0)), s = (e) => `j:${JSON.stringify(e)}`;
|
|
21
|
+
async function c(e) {
|
|
22
|
+
if (typeof CompressionStream > "u") return s(e);
|
|
23
|
+
let t = new Blob([JSON.stringify(e)]).stream().pipeThrough(new CompressionStream("gzip"));
|
|
24
|
+
return `g:${a(new Uint8Array(await new Response(t).arrayBuffer()))}`;
|
|
25
|
+
}
|
|
26
|
+
async function l(e) {
|
|
27
|
+
if (e.startsWith("j:")) return JSON.parse(e.slice(2));
|
|
28
|
+
let t = new Blob([o(e.slice(2))]).stream().pipeThrough(new DecompressionStream("gzip"));
|
|
29
|
+
return JSON.parse(await new Response(t).text());
|
|
30
|
+
}
|
|
31
|
+
var u = class {
|
|
32
|
+
opts;
|
|
33
|
+
listeners = /* @__PURE__ */ new Set();
|
|
34
|
+
tail = /* @__PURE__ */ new Map();
|
|
35
|
+
chain = Promise.resolve();
|
|
36
|
+
constructor(e = {}) {
|
|
37
|
+
this.opts = e;
|
|
38
|
+
}
|
|
39
|
+
chunks(e) {
|
|
40
|
+
let r = i();
|
|
41
|
+
if (!r) return [];
|
|
42
|
+
let a = [], o = e === void 0 ? null : encodeURIComponent(e);
|
|
43
|
+
for (let e = 0; e < r.length; e++) {
|
|
44
|
+
let i = r.key(e);
|
|
45
|
+
if (!i?.startsWith(t)) continue;
|
|
46
|
+
let s = n.exec(i);
|
|
47
|
+
s && (o === null || s[1] === o) && a.push({
|
|
48
|
+
key: i,
|
|
49
|
+
name: decodeURIComponent(s[1]),
|
|
50
|
+
start: +s[2],
|
|
51
|
+
count: +s[3]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return a.sort((e, t) => e.start - t.start);
|
|
55
|
+
}
|
|
56
|
+
names() {
|
|
57
|
+
return [...new Set(this.chunks().map((e) => e.name))];
|
|
58
|
+
}
|
|
59
|
+
length(e) {
|
|
60
|
+
let t = this.chunks(e), n = t[t.length - 1];
|
|
61
|
+
return Math.max(n ? n.start + n.count : 0, 0);
|
|
62
|
+
}
|
|
63
|
+
size(e) {
|
|
64
|
+
let t = i();
|
|
65
|
+
return t ? this.chunks(e).reduce((e, n) => e + n.key.length + (t.getItem(n.key)?.length ?? 0), 0) : 0;
|
|
66
|
+
}
|
|
67
|
+
next(e, t) {
|
|
68
|
+
let n = Math.max(this.tail.get(e) ?? 0, this.length(e));
|
|
69
|
+
return this.tail.set(e, n + t), n;
|
|
70
|
+
}
|
|
71
|
+
put(n, a, o, s) {
|
|
72
|
+
let c = i();
|
|
73
|
+
if (!c) throw new e(n);
|
|
74
|
+
let l = `${t}${encodeURIComponent(n)}:${r(a)}.${o}`;
|
|
75
|
+
for (;;) try {
|
|
76
|
+
c.setItem(l, s);
|
|
77
|
+
break;
|
|
78
|
+
} catch {
|
|
79
|
+
if (!this.opts.evict?.(n)) throw new e(n);
|
|
80
|
+
}
|
|
81
|
+
this.emit();
|
|
82
|
+
}
|
|
83
|
+
append(e, t) {
|
|
84
|
+
if (!t.length) return Promise.resolve(this.length(e));
|
|
85
|
+
let n = this.next(e, t.length), r = this.chain.then(async () => this.put(e, n, t.length, await c(t)));
|
|
86
|
+
return this.chain = r.catch(() => void 0), r.then(() => n);
|
|
87
|
+
}
|
|
88
|
+
appendSync(e, t) {
|
|
89
|
+
if (!t.length) return this.length(e);
|
|
90
|
+
let n = this.next(e, t.length);
|
|
91
|
+
return this.put(e, n, t.length, s(t)), n;
|
|
92
|
+
}
|
|
93
|
+
async flush() {
|
|
94
|
+
await this.chain;
|
|
95
|
+
}
|
|
96
|
+
async read(e, t = 0, n = Infinity) {
|
|
97
|
+
let r = i();
|
|
98
|
+
if (!r) return [];
|
|
99
|
+
let a = [];
|
|
100
|
+
for (let i of this.chunks(e)) {
|
|
101
|
+
if (i.start + i.count <= t || i.start >= n) continue;
|
|
102
|
+
let e = await l(r.getItem(i.key) ?? "j:[]");
|
|
103
|
+
a.push(...e.slice(Math.max(0, t - i.start), Math.min(i.count, n - i.start)));
|
|
104
|
+
}
|
|
105
|
+
return a;
|
|
106
|
+
}
|
|
107
|
+
remove(e) {
|
|
108
|
+
let t = i();
|
|
109
|
+
if (t) {
|
|
110
|
+
for (let n of this.chunks(e)) t.removeItem(n.key);
|
|
111
|
+
this.tail.delete(e), this.emit();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
subscribe(e) {
|
|
115
|
+
this.listeners.add(e);
|
|
116
|
+
let n = (n) => {
|
|
117
|
+
(!n.key || n.key.startsWith(t)) && e();
|
|
118
|
+
};
|
|
119
|
+
return typeof window < "u" && window.addEventListener("storage", n), () => {
|
|
120
|
+
this.listeners.delete(e), typeof window < "u" && window.removeEventListener("storage", n);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
emit() {
|
|
124
|
+
this.listeners.forEach((e) => e());
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
export { u as LocalStreams, e as StreamFullError, c as pack, s as packSync, i as storage, l as unpack };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/lib/container.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/lib/container.ts"],"names":[],"mappings":"AACA,OAAO,EAA+D,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKpH,wGAAwG;AACxG,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,cAAc,EAAE,OAAO,SAAO,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,MAAM,CAAC,CAcvH;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AACD;4GAC4G;AAC5G,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,WAAW,GAAG,cAAc,EACrE,OAAO,GAAE,aAA4C,GACpD,CAAC,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,aAAa,CAAC,CAkBtC;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AACD,qGAAqG;AACrG,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAItD;AAED,6FAA6F;AAC7F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAQ3E"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Children as e, isValidElement as t, useLayoutEffect as n, useRef as r, useState as i } from "react";
|
|
3
|
+
//#region src/lib/container.ts
|
|
4
|
+
function a(e = 1200) {
|
|
5
|
+
let t = r(null), [a, o] = i(e);
|
|
6
|
+
return n(() => {
|
|
7
|
+
let e = t.current;
|
|
8
|
+
if (!e) return;
|
|
9
|
+
let n = (e) => {
|
|
10
|
+
e > 0 && o(e);
|
|
11
|
+
};
|
|
12
|
+
if (n(e.getBoundingClientRect().width), typeof ResizeObserver > "u") return;
|
|
13
|
+
let r = new ResizeObserver((e) => n(e[0].contentRect.width));
|
|
14
|
+
return r.observe(e), () => r.disconnect();
|
|
15
|
+
}, []), [t, a];
|
|
16
|
+
}
|
|
17
|
+
function o(e = {
|
|
18
|
+
width: 1200,
|
|
19
|
+
height: 800
|
|
20
|
+
}) {
|
|
21
|
+
let t = r(null), [a, o] = i(e);
|
|
22
|
+
return n(() => {
|
|
23
|
+
let e = t.current;
|
|
24
|
+
if (!e) return;
|
|
25
|
+
let n = (e, t) => {
|
|
26
|
+
e <= 0 && t <= 0 || o((n) => n.width === e && n.height === t ? n : {
|
|
27
|
+
width: e,
|
|
28
|
+
height: t
|
|
29
|
+
});
|
|
30
|
+
}, r = e.getBoundingClientRect();
|
|
31
|
+
if (n(r.width, r.height), typeof ResizeObserver > "u") return;
|
|
32
|
+
let i = new ResizeObserver((e) => n(e[0].contentRect.width, e[0].contentRect.height));
|
|
33
|
+
return i.observe(e), () => i.disconnect();
|
|
34
|
+
}, []), [t, a];
|
|
35
|
+
}
|
|
36
|
+
function s(e) {
|
|
37
|
+
let t = (() => null);
|
|
38
|
+
return t.__tkSlot = e, t;
|
|
39
|
+
}
|
|
40
|
+
function c(n) {
|
|
41
|
+
let r = {};
|
|
42
|
+
return e.forEach(n, (e) => {
|
|
43
|
+
if (!t(e) || typeof e.type != "function") return;
|
|
44
|
+
let n = e.type.__tkSlot;
|
|
45
|
+
n && (r[n] = e.props.children ?? null);
|
|
46
|
+
}), r;
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { c as collectSlots, s as defineSlot, o as useContainerSize, a as useContainerWidth };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { LocalStreams } from './append-stream';
|
|
2
|
+
export interface DurableStreamsConfig {
|
|
3
|
+
/** The server's base, e.g. `https://abc123.rivet.run/durable-streams`. Streams live at `<url>/v1/stream/<name>`. */
|
|
4
|
+
url: string;
|
|
5
|
+
/** Sent with every request: `{ Authorization: 'Bearer …' }`. */
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
/** Put every stream under this prefix (a namespace per user or app). */
|
|
8
|
+
prefix?: string;
|
|
9
|
+
/** For tests, or a custom transport. Default: the global `fetch`. */
|
|
10
|
+
fetch?: typeof fetch;
|
|
11
|
+
}
|
|
12
|
+
export interface ProducerWrite {
|
|
13
|
+
id: string;
|
|
14
|
+
epoch: number;
|
|
15
|
+
seq: number;
|
|
16
|
+
}
|
|
17
|
+
export declare class DurableStreamsClient {
|
|
18
|
+
private cfg;
|
|
19
|
+
constructor(cfg: DurableStreamsConfig);
|
|
20
|
+
private url;
|
|
21
|
+
private request;
|
|
22
|
+
/** Create the stream (JSON mode) if it isn't there. */
|
|
23
|
+
create(name: string): Promise<void>;
|
|
24
|
+
/** Append records as one write. A write whose producer sequence the server has already seen counts as done. */
|
|
25
|
+
append(name: string, records: unknown[], producer?: ProducerWrite): Promise<void>;
|
|
26
|
+
/** Everything from `offset` (`-1`: the start) to the end as it stands. */
|
|
27
|
+
read<T = unknown>(name: string, offset?: string): Promise<{
|
|
28
|
+
items: T[];
|
|
29
|
+
next: string;
|
|
30
|
+
}>;
|
|
31
|
+
/** Follow the stream from `offset`: `onItems` gets each batch as it arrives, until `signal` aborts. */
|
|
32
|
+
tail<T = unknown>(name: string, offset: string, onItems: (items: T[], next: string) => void, signal: AbortSignal): Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
export interface CloudSettings {
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
url: string;
|
|
37
|
+
/** A bearer token, sent as `Authorization: Bearer …`. */
|
|
38
|
+
token: string;
|
|
39
|
+
/** Put this device's streams under this prefix on the server. */
|
|
40
|
+
prefix: string;
|
|
41
|
+
}
|
|
42
|
+
export interface CloudStatus {
|
|
43
|
+
state: 'off' | 'idle' | 'syncing' | 'offline' | 'error';
|
|
44
|
+
/** Records written here that the server hasn't acknowledged. */
|
|
45
|
+
pending: number;
|
|
46
|
+
lastSyncAt?: number;
|
|
47
|
+
error?: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function loadCloudSettings(): CloudSettings;
|
|
50
|
+
/** An id for this browser, stable across sessions, that marks its writes. */
|
|
51
|
+
export declare function deviceId(): string;
|
|
52
|
+
/**
|
|
53
|
+
* Mirrors local streams to a Durable Streams server while enabled, and keeps a read-through copy of the streams named
|
|
54
|
+
* in `pull` (other devices' work) up to date. Progress is a small cursor per stream per server, kept in localStorage:
|
|
55
|
+
* the streams themselves are never modified.
|
|
56
|
+
*/
|
|
57
|
+
export declare class CloudSync {
|
|
58
|
+
private local;
|
|
59
|
+
private pull;
|
|
60
|
+
private transport;
|
|
61
|
+
private settings;
|
|
62
|
+
private status;
|
|
63
|
+
private listeners;
|
|
64
|
+
private stopLocal?;
|
|
65
|
+
private timer?;
|
|
66
|
+
private running;
|
|
67
|
+
private failures;
|
|
68
|
+
private abort?;
|
|
69
|
+
/** The latest contents of each `pull` stream on the server. */
|
|
70
|
+
private pulled;
|
|
71
|
+
constructor(local: LocalStreams, pull?: string[], transport?: {
|
|
72
|
+
fetch?: typeof fetch;
|
|
73
|
+
});
|
|
74
|
+
subscribe: (cb: () => void) => () => void;
|
|
75
|
+
getStatus: () => CloudStatus;
|
|
76
|
+
getSettings: () => CloudSettings;
|
|
77
|
+
private set;
|
|
78
|
+
private client;
|
|
79
|
+
private cursorKey;
|
|
80
|
+
private cursor;
|
|
81
|
+
private saveCursor;
|
|
82
|
+
/** Save settings and start or stop syncing to match. */
|
|
83
|
+
configure(next: Partial<CloudSettings>): void;
|
|
84
|
+
/** Begin syncing if the settings say to. Safe to call again. */
|
|
85
|
+
start(): void;
|
|
86
|
+
stop(): void;
|
|
87
|
+
/** Records of a `pull` stream as the server has them (empty until the first read, or with sync off). */
|
|
88
|
+
pulledRecords<T>(name: string): T[];
|
|
89
|
+
/** Read a whole stream from the server (for one this device doesn't hold). */
|
|
90
|
+
readRemote<T>(name: string): Promise<T[]>;
|
|
91
|
+
private schedule;
|
|
92
|
+
private run;
|
|
93
|
+
private pending;
|
|
94
|
+
/** Keep the `pull` streams' server copies current, live. */
|
|
95
|
+
private followPulled;
|
|
96
|
+
}
|
|
97
|
+
/** The sync engine's status and settings, live. */
|
|
98
|
+
export declare function useCloud(cloud: CloudSync): {
|
|
99
|
+
status: CloudStatus;
|
|
100
|
+
settings: CloudSettings;
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=durable-streams.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"durable-streams.d.ts","sourceRoot":"","sources":["../../src/lib/durable-streams.ts"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAa7D,MAAM,WAAW,oBAAoB;IACnC,oHAAoH;IACpH,GAAG,EAAE,MAAM,CAAC;IACZ,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE;AAEzE,qBAAa,oBAAoB;IACnB,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,oBAAoB;IAE7C,OAAO,CAAC,GAAG;IAIX,OAAO,CAAC,OAAO;IAIf,uDAAuD;IACjD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMzC,+GAA+G;IACzG,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBvF,0EAA0E;IACpE,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAO,GAAG,OAAO,CAAC;QAAE,KAAK,EAAE,CAAC,EAAE,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAe3F,uGAAuG;IACjG,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAWvI;AAID,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACxD,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAQD,wBAAgB,iBAAiB,IAAI,aAAa,CAEjD;AAED,6EAA6E;AAC7E,wBAAgB,QAAQ,IAAI,MAAM,CAQjC;AAID;;;;GAIG;AACH,qBAAa,SAAS;IAYR,OAAO,CAAC,KAAK;IAAgB,OAAO,CAAC,IAAI;IAAiB,OAAO,CAAC,SAAS;IAXvF,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,MAAM,CAA6C;IAC3D,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,SAAS,CAAC,CAAa;IAC/B,OAAO,CAAC,KAAK,CAAC,CAAgC;IAC9C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,KAAK,CAAC,CAAkB;IAChC,+DAA+D;IAC/D,OAAO,CAAC,MAAM,CAAgC;gBAE1B,KAAK,EAAE,YAAY,EAAU,IAAI,GAAE,MAAM,EAAO,EAAU,SAAS,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;KAAO;IAGtH,SAAS,GAAI,IAAI,MAAM,IAAI,gBAA8E;IACzG,SAAS,oBAAqB;IAC9B,WAAW,sBAAuB;IAClC,OAAO,CAAC,GAAG;IAKX,OAAO,CAAC,MAAM;IAWd,OAAO,CAAC,SAAS;IAGjB,OAAO,CAAC,MAAM;IAGd,OAAO,CAAC,UAAU;IAIlB,wDAAwD;IACxD,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC;IAQtC,gEAAgE;IAChE,KAAK;IAcL,IAAI;IAUJ,wGAAwG;IACxG,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE;IAInC,8EAA8E;IACxE,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAK/C,OAAO,CAAC,QAAQ;YAMF,GAAG;IAkCjB,OAAO,CAAC,OAAO;IAIf,4DAA4D;IAC5D,OAAO,CAAC,YAAY;CAoBrB;AAED,mDAAmD;AACnD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,aAAa,CAAA;CAAE,CAI3F"}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { storage as e } from "./append-stream.js";
|
|
3
|
+
import { useSyncExternalStore as t } from "react";
|
|
4
|
+
//#region src/lib/durable-streams.ts
|
|
5
|
+
var n = class {
|
|
6
|
+
cfg;
|
|
7
|
+
constructor(e) {
|
|
8
|
+
this.cfg = e;
|
|
9
|
+
}
|
|
10
|
+
url(e, t = "") {
|
|
11
|
+
return `${this.cfg.url.replace(/\/+$/, "")}/v1/stream/${encodeURIComponent((this.cfg.prefix ?? "") + e)}${t}`;
|
|
12
|
+
}
|
|
13
|
+
request(e, t = {}) {
|
|
14
|
+
return (this.cfg.fetch ?? fetch)(e, {
|
|
15
|
+
...t,
|
|
16
|
+
headers: {
|
|
17
|
+
...this.cfg.headers,
|
|
18
|
+
...t.headers
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
async create(e) {
|
|
23
|
+
let t = await this.request(this.url(e), {
|
|
24
|
+
method: "PUT",
|
|
25
|
+
headers: { "Content-Type": "application/json" }
|
|
26
|
+
});
|
|
27
|
+
if (!t.ok && t.status !== 409) throw Error(`create ${e}: ${t.status}`);
|
|
28
|
+
}
|
|
29
|
+
async append(e, t, n) {
|
|
30
|
+
let r = () => this.request(this.url(e), {
|
|
31
|
+
method: "POST",
|
|
32
|
+
headers: {
|
|
33
|
+
"Content-Type": "application/json",
|
|
34
|
+
...n ? {
|
|
35
|
+
"Producer-Id": n.id,
|
|
36
|
+
"Producer-Epoch": String(n.epoch),
|
|
37
|
+
"Producer-Seq": String(n.seq)
|
|
38
|
+
} : null
|
|
39
|
+
},
|
|
40
|
+
body: JSON.stringify(t)
|
|
41
|
+
}), i = await r();
|
|
42
|
+
if (i.status === 404 && (await this.create(e), i = await r()), i.ok) return;
|
|
43
|
+
let a = Number(i.headers.get("Producer-Expected-Seq"));
|
|
44
|
+
if (!(i.status === 409 && n && Number.isFinite(a) && i.headers.has("Producer-Expected-Seq") && a > n.seq)) throw Error(`append ${e}: ${i.status}`);
|
|
45
|
+
}
|
|
46
|
+
async read(e, t = "-1") {
|
|
47
|
+
let n = [], r = t;
|
|
48
|
+
for (;;) {
|
|
49
|
+
let t = await this.request(this.url(e, `?offset=${encodeURIComponent(r)}`));
|
|
50
|
+
if (t.status === 404) return {
|
|
51
|
+
items: n,
|
|
52
|
+
next: r
|
|
53
|
+
};
|
|
54
|
+
if (!t.ok) throw Error(`read ${e}: ${t.status}`);
|
|
55
|
+
let i = t.status === 204 ? "" : await t.text();
|
|
56
|
+
i && n.push(...JSON.parse(i));
|
|
57
|
+
let a = t.headers.get("Stream-Next-Offset");
|
|
58
|
+
if (t.headers.get("Stream-Up-To-Date") === "true" || !a || a === r) return {
|
|
59
|
+
items: n,
|
|
60
|
+
next: a ?? r
|
|
61
|
+
};
|
|
62
|
+
r = a;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async tail(e, t, n, r) {
|
|
66
|
+
let i = t;
|
|
67
|
+
for (; !r.aborted;) {
|
|
68
|
+
let t = await this.request(this.url(e, `?offset=${encodeURIComponent(i)}&live=long-poll`), { signal: r });
|
|
69
|
+
if (t.status === 404) {
|
|
70
|
+
await new Promise((e) => setTimeout(e, 3e3));
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (!t.ok) throw Error(`tail ${e}: ${t.status}`);
|
|
74
|
+
let a = t.status === 204 ? "" : await t.text();
|
|
75
|
+
i = t.headers.get("Stream-Next-Offset") ?? i, a && n(JSON.parse(a), i);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}, r = "bl-cloud:settings", i = "bl-cloud:cursor:", a = "bl-cloud:device", o = 400, s = {
|
|
79
|
+
enabled: !1,
|
|
80
|
+
url: "",
|
|
81
|
+
token: "",
|
|
82
|
+
prefix: ""
|
|
83
|
+
};
|
|
84
|
+
function c() {
|
|
85
|
+
try {
|
|
86
|
+
return {
|
|
87
|
+
...s,
|
|
88
|
+
...JSON.parse(e()?.getItem(r) ?? "{}")
|
|
89
|
+
};
|
|
90
|
+
} catch {
|
|
91
|
+
return s;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function l() {
|
|
95
|
+
let t = e(), n = t?.getItem(a);
|
|
96
|
+
if (!n) {
|
|
97
|
+
n = `d${Date.now().toString(36)}${Math.random().toString(36).slice(2, 8)}`;
|
|
98
|
+
try {
|
|
99
|
+
t?.setItem(a, n);
|
|
100
|
+
} catch {}
|
|
101
|
+
}
|
|
102
|
+
return n;
|
|
103
|
+
}
|
|
104
|
+
var u = class {
|
|
105
|
+
local;
|
|
106
|
+
pull;
|
|
107
|
+
transport;
|
|
108
|
+
settings = c();
|
|
109
|
+
status = {
|
|
110
|
+
state: "off",
|
|
111
|
+
pending: 0
|
|
112
|
+
};
|
|
113
|
+
listeners = /* @__PURE__ */ new Set();
|
|
114
|
+
stopLocal;
|
|
115
|
+
timer;
|
|
116
|
+
running = !1;
|
|
117
|
+
failures = 0;
|
|
118
|
+
abort;
|
|
119
|
+
pulled = /* @__PURE__ */ new Map();
|
|
120
|
+
constructor(e, t = [], n = {}) {
|
|
121
|
+
this.local = e, this.pull = t, this.transport = n;
|
|
122
|
+
}
|
|
123
|
+
subscribe = (e) => (this.listeners.add(e), () => {
|
|
124
|
+
this.listeners.delete(e);
|
|
125
|
+
});
|
|
126
|
+
getStatus = () => this.status;
|
|
127
|
+
getSettings = () => this.settings;
|
|
128
|
+
set(e) {
|
|
129
|
+
this.status = {
|
|
130
|
+
...this.status,
|
|
131
|
+
...e
|
|
132
|
+
}, this.listeners.forEach((e) => e());
|
|
133
|
+
}
|
|
134
|
+
client() {
|
|
135
|
+
let e = this.settings;
|
|
136
|
+
return !e.enabled || !e.url.trim() ? null : new n({
|
|
137
|
+
url: e.url.trim(),
|
|
138
|
+
prefix: e.prefix.trim() ? `${e.prefix.trim().replace(/\/+$/, "")}.` : void 0,
|
|
139
|
+
headers: e.token.trim() ? { Authorization: `Bearer ${e.token.trim()}` } : void 0,
|
|
140
|
+
fetch: this.transport.fetch
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
cursorKey(e) {
|
|
144
|
+
return `${i}${encodeURIComponent(`${this.settings.url}|${this.settings.prefix}`)}:${encodeURIComponent(e)}`;
|
|
145
|
+
}
|
|
146
|
+
cursor(t) {
|
|
147
|
+
try {
|
|
148
|
+
return {
|
|
149
|
+
records: 0,
|
|
150
|
+
batches: 0,
|
|
151
|
+
...JSON.parse(e()?.getItem(this.cursorKey(t)) ?? "{}")
|
|
152
|
+
};
|
|
153
|
+
} catch {
|
|
154
|
+
return {
|
|
155
|
+
records: 0,
|
|
156
|
+
batches: 0
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
saveCursor(t, n) {
|
|
161
|
+
try {
|
|
162
|
+
e()?.setItem(this.cursorKey(t), JSON.stringify(n));
|
|
163
|
+
} catch {}
|
|
164
|
+
}
|
|
165
|
+
configure(t) {
|
|
166
|
+
this.settings = {
|
|
167
|
+
...this.settings,
|
|
168
|
+
...t
|
|
169
|
+
};
|
|
170
|
+
try {
|
|
171
|
+
e()?.setItem(r, JSON.stringify(this.settings));
|
|
172
|
+
} catch {}
|
|
173
|
+
this.stop(), this.start(), this.listeners.forEach((e) => e());
|
|
174
|
+
}
|
|
175
|
+
start() {
|
|
176
|
+
if (this.stopLocal || !this.client()) {
|
|
177
|
+
this.client() || this.set({
|
|
178
|
+
state: "off",
|
|
179
|
+
pending: 0,
|
|
180
|
+
error: void 0
|
|
181
|
+
});
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
this.stopLocal = this.local.subscribe(() => this.schedule());
|
|
185
|
+
let e = () => this.schedule(0), t = () => this.set({ state: "offline" });
|
|
186
|
+
addEventListener("online", e), addEventListener("offline", t);
|
|
187
|
+
let n = this.stopLocal;
|
|
188
|
+
this.stopLocal = () => {
|
|
189
|
+
n(), removeEventListener("online", e), removeEventListener("offline", t);
|
|
190
|
+
}, this.set({
|
|
191
|
+
state: navigator.onLine === !1 ? "offline" : "idle",
|
|
192
|
+
error: void 0
|
|
193
|
+
}), this.schedule(0), this.followPulled();
|
|
194
|
+
}
|
|
195
|
+
stop() {
|
|
196
|
+
this.stopLocal?.(), this.stopLocal = void 0, clearTimeout(this.timer), this.abort?.abort(), this.abort = void 0, this.pulled.clear(), this.set({
|
|
197
|
+
state: "off",
|
|
198
|
+
pending: 0,
|
|
199
|
+
error: void 0
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
pulledRecords(e) {
|
|
203
|
+
return this.pulled.get(e) ?? [];
|
|
204
|
+
}
|
|
205
|
+
async readRemote(e) {
|
|
206
|
+
let t = this.client();
|
|
207
|
+
return t ? (await t.read(e)).items : [];
|
|
208
|
+
}
|
|
209
|
+
schedule(e = 500) {
|
|
210
|
+
this.client() && (clearTimeout(this.timer), this.timer = setTimeout(() => void this.run(), e));
|
|
211
|
+
}
|
|
212
|
+
async run() {
|
|
213
|
+
let e = this.client();
|
|
214
|
+
if (!(!e || this.running)) {
|
|
215
|
+
if (navigator.onLine === !1) {
|
|
216
|
+
this.set({ state: "offline" });
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
this.running = !0, this.set({ state: "syncing" });
|
|
220
|
+
try {
|
|
221
|
+
let t = l();
|
|
222
|
+
for (let n of this.local.names()) {
|
|
223
|
+
let r = this.cursor(n), i = this.local.length(n);
|
|
224
|
+
if (!(r.records >= i)) for (r.records === 0 && r.batches === 0 && await e.create(n); r.records < i;) {
|
|
225
|
+
let i = await this.local.read(n, r.records, r.records + o);
|
|
226
|
+
if (!i.length) break;
|
|
227
|
+
await e.append(n, i, {
|
|
228
|
+
id: t,
|
|
229
|
+
epoch: 0,
|
|
230
|
+
seq: r.batches
|
|
231
|
+
}), r.records += i.length, r.batches += 1, this.saveCursor(n, r), this.set({ pending: this.pending() });
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
this.failures = 0, this.set({
|
|
235
|
+
state: "idle",
|
|
236
|
+
pending: this.pending(),
|
|
237
|
+
lastSyncAt: Date.now(),
|
|
238
|
+
error: void 0
|
|
239
|
+
});
|
|
240
|
+
} catch (e) {
|
|
241
|
+
this.failures++, this.set({
|
|
242
|
+
state: "error",
|
|
243
|
+
pending: this.pending(),
|
|
244
|
+
error: e instanceof Error ? e.message : String(e)
|
|
245
|
+
}), this.schedule(Math.min(6e4, 1e3 * 2 ** this.failures));
|
|
246
|
+
} finally {
|
|
247
|
+
this.running = !1;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
pending() {
|
|
252
|
+
return this.local.names().reduce((e, t) => e + Math.max(0, this.local.length(t) - this.cursor(t).records), 0);
|
|
253
|
+
}
|
|
254
|
+
followPulled() {
|
|
255
|
+
let e = this.client();
|
|
256
|
+
if (!e || !this.pull.length) return;
|
|
257
|
+
let t = this.abort = new AbortController();
|
|
258
|
+
for (let n of this.pull) (async () => {
|
|
259
|
+
try {
|
|
260
|
+
let { items: r, next: i } = await e.read(n);
|
|
261
|
+
this.pulled.set(n, r), this.listeners.forEach((e) => e()), await e.tail(n, i, (e) => {
|
|
262
|
+
this.pulled.set(n, [...this.pulled.get(n) ?? [], ...e]), this.listeners.forEach((e) => e());
|
|
263
|
+
}, t.signal);
|
|
264
|
+
} catch (e) {
|
|
265
|
+
t.signal.aborted || this.set({
|
|
266
|
+
state: "error",
|
|
267
|
+
error: e instanceof Error ? e.message : String(e)
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
})();
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
function d(e) {
|
|
274
|
+
return {
|
|
275
|
+
status: t(e.subscribe, e.getStatus, e.getStatus),
|
|
276
|
+
settings: t(e.subscribe, e.getSettings, e.getSettings)
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
//#endregion
|
|
280
|
+
export { u as CloudSync, n as DurableStreamsClient, l as deviceId, c as loadCloudSettings, d as useCloud };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/lib/icon-shapes/chat.ts
|
|
2
|
+
var e = {
|
|
3
|
+
number: [{ d: "M9 4L7 20M17 4l-2 16M4 9h17M3 15h17" }],
|
|
4
|
+
"chevron-right-compact": [{ d: "M9 6l6 6-6 6" }],
|
|
5
|
+
"text-bubble": [{ d: "M7 8h10M7 12h6M5 4h14v12H9l-4 4z" }],
|
|
6
|
+
"bell-simple": [{ d: "M6 9a6 6 0 0112 0c0 5 2 6 2 6H4s2-1 2-6M10 20a2 2 0 004 0" }],
|
|
7
|
+
"bubble-oval": [{ d: "M12 4.5c4.7 0 8.5 3 8.5 6.8s-3.8 6.8-8.5 6.8c-1 0-1.9-.1-2.8-.4L5 19.5l1.1-3.4C4.5 14.9 3.5 13.2 3.5 11.3c0-3.8 3.8-6.8 8.5-6.8z" }],
|
|
8
|
+
"bolt-simple": [{ d: "M13 2L4 14h6l-1 8 9-12h-6z" }],
|
|
9
|
+
sparkle: [{ d: "M12 3l2.2 6.2L20 12l-5.8 2.8L12 21l-2.2-6.2L4 12l5.8-2.8z" }],
|
|
10
|
+
"people-simple": [{ d: "M9 11a3.5 3.5 0 100-7 3.5 3.5 0 000 7zM2.5 20c0-3.6 2.9-5.5 6.5-5.5s6.5 1.9 6.5 5.5M16 4.6a3.5 3.5 0 010 6.8M18 15c2.1.7 3.5 2.2 3.5 5" }]
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as CHAT_SHAPES };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/lib/icon-shapes/pencilkit.ts
|
|
2
|
+
var e = {
|
|
3
|
+
"pencil-tip": [{ d: "M13.2 4.6l6.2 6.2L9 21.2H3.2V15z" }, { d: "M11 7l6 6" }],
|
|
4
|
+
highlighter: [
|
|
5
|
+
{ d: "M14.6 3.6l5.8 5.8-8.6 8.6H6.4v-5.4z" },
|
|
6
|
+
{ d: "M6.4 17.6L4 21.2" },
|
|
7
|
+
{ d: "M3 21.2h17" }
|
|
8
|
+
],
|
|
9
|
+
"pencil-sketch": [{ d: "M4.5 19.5l1-4L16.8 4.2a2 2 0 0 1 2.8 2.8L8.5 18.3l-4 1.2z" }, { d: "M14.6 6.4l3 3" }],
|
|
10
|
+
eraser: [
|
|
11
|
+
{ d: "M7.8 20.5h8.7" },
|
|
12
|
+
{ d: "M4.6 15.1l8.3-8.3a2 2 0 0 1 2.8 0l2.5 2.5a2 2 0 0 1 0 2.8l-7.4 7.4H8.4a2 2 0 0 1-1.4-.6z" },
|
|
13
|
+
{ d: "M10.3 10.2l4.6 4.6" }
|
|
14
|
+
],
|
|
15
|
+
"arrow-uturn-backward": [{ d: "M7.5 9.2H14a5 5 0 0 1 0 10h-3.4" }, { d: "M10.8 5.8L7.4 9.2l3.4 3.4" }],
|
|
16
|
+
"arrow-uturn-forward": [{ d: "M16.5 9.2H10a5 5 0 0 0 0 10h3.4" }, { d: "M13.2 5.8l3.4 3.4-3.4 3.4" }],
|
|
17
|
+
"trash-slim": [{ d: "M5 7h14M9.5 7V5.4A1.4 1.4 0 0 1 10.9 4h2.2a1.4 1.4 0 0 1 1.4 1.4V7M7 7l.8 12a1.4 1.4 0 0 0 1.4 1.3h5.6a1.4 1.4 0 0 0 1.4-1.3L17 7" }]
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { e as PENCILKIT_SHAPES };
|