@moldable-ai/ui 0.2.21 → 0.2.24
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/dist/catalog/catalog-coverage.d.ts +1 -1
- package/dist/catalog/catalog-manifest.d.ts +1 -1
- package/dist/catalog/catalog-manifest.js +1 -1
- package/dist/catalog/catalog-types.d.ts +7 -0
- package/dist/catalog/catalog-types.d.ts.map +1 -1
- package/dist/catalog/catalog-types.js +1 -0
- package/dist/catalog/component-catalog.d.ts +1 -1
- package/dist/catalog/component-catalog.js +2 -2
- package/dist/catalog/core-catalog-exclusions.d.ts +1 -1
- package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -1
- package/dist/catalog/core-catalog-exclusions.js +1 -146
- package/dist/catalog/core-catalog.d.ts +1 -1
- package/dist/catalog/core-catalog.d.ts.map +1 -1
- package/dist/catalog/core-catalog.js +11 -7
- package/dist/catalog/core-collection-stories.d.ts +1 -1
- package/dist/catalog/core-collection-stories.d.ts.map +1 -1
- package/dist/catalog/core-collection-stories.js +41 -9
- package/dist/catalog/core-control-stories.d.ts +1 -1
- package/dist/catalog/core-control-stories.d.ts.map +1 -1
- package/dist/catalog/core-control-stories.js +53 -22
- package/dist/catalog/core-feedback-stories.d.ts +1 -1
- package/dist/catalog/core-feedback-stories.d.ts.map +1 -1
- package/dist/catalog/core-feedback-stories.js +89 -10
- package/dist/catalog/core-form-stories.d.ts +3 -0
- package/dist/catalog/core-form-stories.d.ts.map +1 -0
- package/dist/catalog/core-form-stories.js +56 -0
- package/dist/catalog/core-foundation-stories.d.ts +1 -1
- package/dist/catalog/core-foundation-stories.js +7 -7
- package/dist/catalog/core-layout-stories.d.ts +3 -0
- package/dist/catalog/core-layout-stories.d.ts.map +1 -0
- package/dist/catalog/core-layout-stories.js +78 -0
- package/dist/catalog/core-navigation-stories.d.ts +1 -1
- package/dist/catalog/core-navigation-stories.d.ts.map +1 -1
- package/dist/catalog/core-navigation-stories.js +25 -3
- package/dist/catalog/core-overlay-stories.d.ts +1 -1
- package/dist/catalog/core-overlay-stories.d.ts.map +1 -1
- package/dist/catalog/core-overlay-stories.js +113 -8
- package/dist/catalog/index.d.ts +6 -6
- package/dist/catalog/index.js +6 -6
- package/dist/components/app-error-boundary.d.ts.map +1 -1
- package/dist/components/app-error-boundary.js +4 -3
- package/dist/components/chat/chat-image-lightbox.js +3 -3
- package/dist/components/chat/chat-input.js +5 -5
- package/dist/components/chat/chat-message.js +17 -17
- package/dist/components/chat/chat-messages.d.ts +1 -1
- package/dist/components/chat/chat-messages.js +3 -3
- package/dist/components/chat/chat-panel.d.ts +6 -6
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +33 -33
- package/dist/components/chat/checkpoint-badge.js +3 -3
- package/dist/components/chat/conversation-history.d.ts.map +1 -1
- package/dist/components/chat/conversation-history.js +13 -13
- package/dist/components/chat/index.d.ts +20 -15
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +20 -15
- package/dist/components/chat/markdown.js +1 -1
- package/dist/components/chat/model-effort-selector.js +10 -10
- package/dist/components/chat/model-selector.js +4 -4
- package/dist/components/chat/reasoning-effort-selector.js +4 -4
- package/dist/components/chat/restore-dialog.js +3 -3
- package/dist/components/chat/thinking-timeline.js +2 -2
- package/dist/components/chat/tool-approval.d.ts +1 -1
- package/dist/components/chat/tool-approval.d.ts.map +1 -1
- package/dist/components/chat/tool-approval.js +9 -9
- package/dist/components/chat/tool-handlers.d.ts +2 -2
- package/dist/components/chat/tool-handlers.js +90 -90
- package/dist/components/chat/voice-orb-audio.d.ts +16 -0
- package/dist/components/chat/voice-orb-audio.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-audio.js +110 -0
- package/dist/components/chat/voice-orb-renderer.d.ts +51 -0
- package/dist/components/chat/voice-orb-renderer.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-renderer.js +410 -0
- package/dist/components/chat/voice-orb-shaders.d.ts +3 -0
- package/dist/components/chat/voice-orb-shaders.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-shaders.js +355 -0
- package/dist/components/chat/voice-orb-types.d.ts +24 -0
- package/dist/components/chat/voice-orb-types.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-types.js +73 -0
- package/dist/components/chat/voice-orb.d.ts +20 -0
- package/dist/components/chat/voice-orb.d.ts.map +1 -0
- package/dist/components/chat/voice-orb.js +67 -0
- package/dist/components/code-block.js +1 -1
- package/dist/components/hardware/bluetooth-panel.d.ts +2 -2
- package/dist/components/hardware/bluetooth-panel.js +10 -10
- package/dist/components/hardware/camera-preview.js +6 -6
- package/dist/components/hardware/capability-badge.d.ts +2 -2
- package/dist/components/hardware/capability-badge.js +2 -2
- package/dist/components/hardware/capability-matrix.d.ts +1 -1
- package/dist/components/hardware/capability-matrix.js +5 -5
- package/dist/components/hardware/clipboard-button.d.ts +1 -1
- package/dist/components/hardware/clipboard-button.js +2 -2
- package/dist/components/hardware/device-list.js +1 -1
- package/dist/components/hardware/display-map.d.ts +1 -1
- package/dist/components/hardware/display-map.js +7 -7
- package/dist/components/hardware/haptic-button.d.ts +2 -2
- package/dist/components/hardware/haptic-button.js +3 -3
- package/dist/components/hardware/hardware-panel.js +1 -1
- package/dist/components/hardware/hid-panel.d.ts +2 -2
- package/dist/components/hardware/hid-panel.js +10 -10
- package/dist/components/hardware/index.d.ts +26 -26
- package/dist/components/hardware/index.js +26 -26
- package/dist/components/hardware/live-indicator.js +1 -1
- package/dist/components/hardware/local-auth-button.d.ts +2 -2
- package/dist/components/hardware/local-auth-button.js +4 -4
- package/dist/components/hardware/location-panel.d.ts +1 -1
- package/dist/components/hardware/location-panel.js +6 -6
- package/dist/components/hardware/microphone-meter.js +7 -7
- package/dist/components/hardware/midi-monitor.d.ts +2 -2
- package/dist/components/hardware/midi-monitor.js +9 -9
- package/dist/components/hardware/notification-panel.d.ts +1 -1
- package/dist/components/hardware/notification-panel.js +8 -8
- package/dist/components/hardware/power-blocker-controller.d.ts +1 -1
- package/dist/components/hardware/power-blocker-controller.js +1 -1
- package/dist/components/hardware/power-panel.d.ts +1 -1
- package/dist/components/hardware/power-panel.js +9 -9
- package/dist/components/hardware/readout.js +1 -1
- package/dist/components/hardware/screen-share-preview.js +5 -5
- package/dist/components/hardware/secure-storage-panel.d.ts +1 -1
- package/dist/components/hardware/secure-storage-panel.js +9 -9
- package/dist/components/hardware/serial-console.d.ts +2 -2
- package/dist/components/hardware/serial-console.js +10 -10
- package/dist/components/hardware/shortcut-recorder.d.ts +1 -1
- package/dist/components/hardware/shortcut-recorder.js +4 -4
- package/dist/components/hardware/stream-log.js +1 -1
- package/dist/components/hardware/system-audio-monitor.d.ts +1 -1
- package/dist/components/hardware/system-audio-monitor.js +9 -9
- package/dist/components/hardware/usb-panel.d.ts +5 -5
- package/dist/components/hardware/usb-panel.js +10 -10
- package/dist/components/hardware/use-capability.d.ts +1 -1
- package/dist/components/hardware/use-capability.js +1 -1
- package/dist/components/markdown.js +5 -5
- package/dist/components/native-capabilities/bluetooth-panel.d.ts +2 -2
- package/dist/components/native-capabilities/bluetooth-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/bluetooth-panel.js +17 -17
- package/dist/components/native-capabilities/camera-preview.d.ts.map +1 -1
- package/dist/components/native-capabilities/camera-preview.js +7 -7
- package/dist/components/native-capabilities/capability-badge.d.ts +2 -2
- package/dist/components/native-capabilities/capability-badge.js +4 -4
- package/dist/components/native-capabilities/capability-matrix.d.ts +1 -1
- package/dist/components/native-capabilities/capability-matrix.js +7 -7
- package/dist/components/native-capabilities/clipboard-button.d.ts +1 -1
- package/dist/components/native-capabilities/clipboard-button.js +2 -2
- package/dist/components/native-capabilities/device-list.js +4 -4
- package/dist/components/native-capabilities/display-map.d.ts +1 -1
- package/dist/components/native-capabilities/display-map.d.ts.map +1 -1
- package/dist/components/native-capabilities/display-map.js +11 -11
- package/dist/components/native-capabilities/haptic-button.d.ts +2 -2
- package/dist/components/native-capabilities/haptic-button.js +3 -3
- package/dist/components/native-capabilities/hid-panel.d.ts +2 -2
- package/dist/components/native-capabilities/hid-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/hid-panel.js +14 -14
- package/dist/components/native-capabilities/index.d.ts +26 -26
- package/dist/components/native-capabilities/index.js +26 -26
- package/dist/components/native-capabilities/live-indicator.js +3 -3
- package/dist/components/native-capabilities/local-auth-button.d.ts +2 -2
- package/dist/components/native-capabilities/local-auth-button.js +4 -4
- package/dist/components/native-capabilities/location-panel.d.ts +1 -1
- package/dist/components/native-capabilities/location-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/location-panel.js +8 -8
- package/dist/components/native-capabilities/microphone-meter.js +9 -9
- package/dist/components/native-capabilities/midi-monitor.d.ts +2 -2
- package/dist/components/native-capabilities/midi-monitor.d.ts.map +1 -1
- package/dist/components/native-capabilities/midi-monitor.js +11 -11
- package/dist/components/native-capabilities/native-capability-panel.js +6 -6
- package/dist/components/native-capabilities/notification-panel.d.ts +1 -1
- package/dist/components/native-capabilities/notification-panel.js +9 -9
- package/dist/components/native-capabilities/power-blocker-controller.d.ts +1 -1
- package/dist/components/native-capabilities/power-blocker-controller.js +1 -1
- package/dist/components/native-capabilities/power-panel.d.ts +1 -1
- package/dist/components/native-capabilities/power-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/power-panel.js +12 -12
- package/dist/components/native-capabilities/readout.d.ts.map +1 -1
- package/dist/components/native-capabilities/readout.js +2 -2
- package/dist/components/native-capabilities/screen-share-preview.js +6 -6
- package/dist/components/native-capabilities/secure-storage-panel.d.ts +1 -1
- package/dist/components/native-capabilities/secure-storage-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/secure-storage-panel.js +11 -11
- package/dist/components/native-capabilities/serial-console.d.ts +2 -2
- package/dist/components/native-capabilities/serial-console.d.ts.map +1 -1
- package/dist/components/native-capabilities/serial-console.js +11 -11
- package/dist/components/native-capabilities/shortcut-recorder.d.ts +1 -1
- package/dist/components/native-capabilities/shortcut-recorder.js +5 -5
- package/dist/components/native-capabilities/stream-log.js +3 -3
- package/dist/components/native-capabilities/system-audio-monitor.d.ts +1 -1
- package/dist/components/native-capabilities/system-audio-monitor.js +12 -12
- package/dist/components/native-capabilities/usb-panel.d.ts +5 -5
- package/dist/components/native-capabilities/usb-panel.js +15 -15
- package/dist/components/native-capabilities/use-capability.d.ts +1 -1
- package/dist/components/native-capabilities/use-capability.js +1 -1
- package/dist/components/rich-media-player.js +3 -3
- package/dist/components/ui/accordion.js +3 -3
- package/dist/components/ui/alert-dialog.d.ts +5 -3
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +20 -10
- package/dist/components/ui/alert.d.ts +2 -2
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +11 -11
- package/dist/components/ui/app-frame.d.ts +7 -1
- package/dist/components/ui/app-frame.d.ts.map +1 -1
- package/dist/components/ui/app-frame.js +52 -16
- package/dist/components/ui/avatar.js +5 -5
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +4 -4
- package/dist/components/ui/breadcrumb.js +2 -2
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button-group.js +4 -4
- package/dist/components/ui/button.d.ts +6 -4
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +50 -18
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +15 -15
- package/dist/components/ui/card.js +3 -3
- package/dist/components/ui/carousel.d.ts +1 -1
- package/dist/components/ui/carousel.js +4 -4
- package/dist/components/ui/chart.js +5 -5
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/collapsible.js +3 -3
- package/dist/components/ui/color-well.js +2 -2
- package/dist/components/ui/combobox.js +9 -9
- package/dist/components/ui/command.d.ts +1 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +9 -9
- package/dist/components/ui/confirm-dialog.d.ts +1 -1
- package/dist/components/ui/confirm-dialog.d.ts.map +1 -1
- package/dist/components/ui/confirm-dialog.js +2 -2
- package/dist/components/ui/context-menu.d.ts +16 -5
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +92 -16
- package/dist/components/ui/date-field.d.ts.map +1 -1
- package/dist/components/ui/date-field.js +8 -8
- package/dist/components/ui/date-picker.d.ts +2 -2
- package/dist/components/ui/date-picker.js +7 -7
- package/dist/components/ui/dialog-primary-action.d.ts +4 -0
- package/dist/components/ui/dialog-primary-action.d.ts.map +1 -0
- package/dist/components/ui/dialog-primary-action.js +37 -0
- package/dist/components/ui/dialog.d.ts +6 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +20 -7
- package/dist/components/ui/drawer.js +4 -4
- package/dist/components/ui/dropdown-menu.d.ts +15 -5
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +98 -16
- package/dist/components/ui/edge-fade.js +1 -1
- package/dist/components/ui/empty.d.ts +1 -1
- package/dist/components/ui/empty.js +5 -5
- package/dist/components/ui/error-boundary-view.d.ts +12 -0
- package/dist/components/ui/error-boundary-view.d.ts.map +1 -0
- package/dist/components/ui/error-boundary-view.js +8 -0
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/field.d.ts.map +1 -1
- package/dist/components/ui/field.js +9 -9
- package/dist/components/ui/form.js +4 -4
- package/dist/components/ui/grid.d.ts.map +1 -1
- package/dist/components/ui/grid.js +5 -5
- package/dist/components/ui/hover-card.js +2 -2
- package/dist/components/ui/icon-button.d.ts +1 -1
- package/dist/components/ui/icon-button.d.ts.map +1 -1
- package/dist/components/ui/icon-button.js +3 -4
- package/dist/components/ui/index.d.ts +77 -76
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +77 -76
- package/dist/components/ui/input-group.d.ts +3 -3
- package/dist/components/ui/input-group.js +14 -14
- package/dist/components/ui/input-otp.js +3 -3
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/inspector.d.ts +1 -1
- package/dist/components/ui/inspector.js +6 -6
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/item.js +7 -7
- package/dist/components/ui/kbd.js +2 -2
- package/dist/components/ui/label.js +2 -2
- package/dist/components/ui/list.d.ts.map +1 -1
- package/dist/components/ui/list.js +5 -5
- package/dist/components/ui/material.js +3 -3
- package/dist/components/ui/menu-items.d.ts +28 -0
- package/dist/components/ui/menu-items.d.ts.map +1 -0
- package/dist/components/ui/menu-items.js +111 -0
- package/dist/components/ui/menubar.js +11 -11
- package/dist/components/ui/message-scroller-controller.d.ts +1 -1
- package/dist/components/ui/message-scroller-controller.js +1 -1
- package/dist/components/ui/message-scroller-primitive.d.ts +1 -1
- package/dist/components/ui/message-scroller-primitive.js +1 -1
- package/dist/components/ui/message-scroller.d.ts +2 -2
- package/dist/components/ui/message-scroller.js +3 -3
- package/dist/components/ui/navigation-button-group.d.ts +2 -2
- package/dist/components/ui/navigation-button-group.js +2 -2
- package/dist/components/ui/navigation-menu.js +6 -6
- package/dist/components/ui/notification-dot.js +2 -2
- package/dist/components/ui/number-input.js +8 -8
- package/dist/components/ui/pagination.d.ts +1 -1
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/panel.d.ts +1 -1
- package/dist/components/ui/panel.js +3 -3
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/popover.js +3 -3
- package/dist/components/ui/progress.js +2 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +2 -2
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +15 -4
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +3 -3
- package/dist/components/ui/search-field.js +7 -7
- package/dist/components/ui/segmented-control.js +9 -9
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +6 -6
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/sheet.js +4 -4
- package/dist/components/ui/sidebar.d.ts +5 -5
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +111 -24
- package/dist/components/ui/skeleton.js +2 -2
- package/dist/components/ui/slider.d.ts +3 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +3 -3
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/spinner.js +2 -2
- package/dist/components/ui/split-view.js +1 -1
- package/dist/components/ui/status.d.ts +1 -1
- package/dist/components/ui/status.d.ts.map +1 -1
- package/dist/components/ui/status.js +10 -9
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +7 -7
- package/dist/components/ui/tabs.js +3 -3
- package/dist/components/ui/text.d.ts +2 -2
- package/dist/components/ui/text.js +19 -19
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/toggle-group.d.ts +1 -1
- package/dist/components/ui/toggle-group.js +4 -4
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.js +10 -10
- package/dist/components/ui/toolbar.d.ts +7 -7
- package/dist/components/ui/toolbar.js +7 -7
- package/dist/components/ui/tooltip.d.ts +2 -2
- package/dist/components/ui/tooltip.js +5 -5
- package/dist/index.d.ts +21 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -15
- package/dist/lib/frame-lifecycle.d.ts +49 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +163 -1
- package/dist/lib/host-date-time-picker.d.ts +36 -0
- package/dist/lib/host-date-time-picker.d.ts.map +1 -0
- package/dist/lib/host-date-time-picker.js +162 -0
- package/dist/lib/host-file-dialog.d.ts +66 -0
- package/dist/lib/host-file-dialog.d.ts.map +1 -0
- package/dist/lib/host-file-dialog.js +221 -0
- package/dist/lib/host-native-menu.d.ts +116 -0
- package/dist/lib/host-native-menu.d.ts.map +1 -0
- package/dist/lib/host-native-menu.js +242 -0
- package/dist/lib/host-services.d.ts +13 -0
- package/dist/lib/host-services.d.ts.map +1 -0
- package/dist/lib/host-services.js +161 -0
- package/dist/lib/host-share.d.ts +39 -0
- package/dist/lib/host-share.d.ts.map +1 -0
- package/dist/lib/host-share.js +161 -0
- package/dist/lib/host-web-surface.d.ts +31 -0
- package/dist/lib/host-web-surface.d.ts.map +1 -0
- package/dist/lib/host-web-surface.js +116 -0
- package/dist/lib/native-capabilities/access.d.ts +2 -2
- package/dist/lib/native-capabilities/access.js +2 -2
- package/dist/lib/native-capabilities/bluetooth-access.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-access.js +2 -2
- package/dist/lib/native-capabilities/bluetooth-connection.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-connection.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-gatt.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-gatt.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-internal.d.ts +2 -2
- package/dist/lib/native-capabilities/bluetooth-internal.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts +2 -2
- package/dist/lib/native-capabilities/bluetooth-native-fallback.js +2 -2
- package/dist/lib/native-capabilities/bluetooth.d.ts +6 -6
- package/dist/lib/native-capabilities/bluetooth.js +4 -4
- package/dist/lib/native-capabilities/bridge.d.ts +1 -1
- package/dist/lib/native-capabilities/bridge.js +2 -2
- package/dist/lib/native-capabilities/capabilities.d.ts +1 -1
- package/dist/lib/native-capabilities/capabilities.js +1 -1
- package/dist/lib/native-capabilities/clipboard.js +2 -2
- package/dist/lib/native-capabilities/device-io-errors.d.ts +1 -1
- package/dist/lib/native-capabilities/device-io-errors.js +1 -1
- package/dist/lib/native-capabilities/displays.d.ts +1 -1
- package/dist/lib/native-capabilities/displays.js +1 -1
- package/dist/lib/native-capabilities/global-shortcuts.d.ts +2 -2
- package/dist/lib/native-capabilities/global-shortcuts.js +1 -1
- package/dist/lib/native-capabilities/haptics.d.ts +1 -1
- package/dist/lib/native-capabilities/haptics.js +1 -1
- package/dist/lib/native-capabilities/hid-native.d.ts +2 -2
- package/dist/lib/native-capabilities/hid-native.js +3 -3
- package/dist/lib/native-capabilities/hid.js +5 -5
- package/dist/lib/native-capabilities/index.d.ts +39 -39
- package/dist/lib/native-capabilities/index.js +21 -21
- package/dist/lib/native-capabilities/local-authentication.d.ts +1 -1
- package/dist/lib/native-capabilities/local-authentication.js +1 -1
- package/dist/lib/native-capabilities/location.js +1 -1
- package/dist/lib/native-capabilities/media-permissions.d.ts +1 -1
- package/dist/lib/native-capabilities/media-permissions.js +1 -1
- package/dist/lib/native-capabilities/media.d.ts +1 -1
- package/dist/lib/native-capabilities/media.js +2 -2
- package/dist/lib/native-capabilities/midi-access.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-access.js +3 -3
- package/dist/lib/native-capabilities/midi-internal.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-internal.js +1 -1
- package/dist/lib/native-capabilities/midi-native-fallback.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-native-fallback.js +2 -2
- package/dist/lib/native-capabilities/midi-ports.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-ports.js +1 -1
- package/dist/lib/native-capabilities/midi.d.ts +5 -5
- package/dist/lib/native-capabilities/midi.js +3 -3
- package/dist/lib/native-capabilities/native-device-io.d.ts +1 -1
- package/dist/lib/native-capabilities/native-device-io.js +1 -1
- package/dist/lib/native-capabilities/native-device-lifecycle.js +1 -1
- package/dist/lib/native-capabilities/notifications.d.ts +2 -2
- package/dist/lib/native-capabilities/notifications.js +1 -1
- package/dist/lib/native-capabilities/power-session.d.ts +2 -2
- package/dist/lib/native-capabilities/power-session.js +1 -1
- package/dist/lib/native-capabilities/secure-storage.d.ts +1 -1
- package/dist/lib/native-capabilities/secure-storage.js +1 -1
- package/dist/lib/native-capabilities/serial-native.d.ts +2 -2
- package/dist/lib/native-capabilities/serial-native.js +3 -3
- package/dist/lib/native-capabilities/serial.js +5 -5
- package/dist/lib/native-capabilities/system-audio.d.ts +1 -1
- package/dist/lib/native-capabilities/system-audio.js +1 -1
- package/dist/lib/native-capabilities/usb-native.d.ts +2 -2
- package/dist/lib/native-capabilities/usb-native.js +3 -3
- package/dist/lib/native-capabilities/usb.js +5 -5
- package/dist/lib/native-hardware/bluetooth-access.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-access.js +1 -1
- package/dist/lib/native-hardware/bluetooth-connection.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-connection.js +1 -1
- package/dist/lib/native-hardware/bluetooth-gatt.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-gatt.js +1 -1
- package/dist/lib/native-hardware/bluetooth-internal.d.ts +2 -2
- package/dist/lib/native-hardware/bluetooth-internal.js +1 -1
- package/dist/lib/native-hardware/bluetooth-native-fallback.d.ts +2 -2
- package/dist/lib/native-hardware/bluetooth-native-fallback.js +2 -2
- package/dist/lib/native-hardware/bluetooth.d.ts +6 -6
- package/dist/lib/native-hardware/bluetooth.js +4 -4
- package/dist/lib/native-hardware/bridge.d.ts +1 -1
- package/dist/lib/native-hardware/bridge.js +2 -2
- package/dist/lib/native-hardware/capabilities.d.ts +1 -1
- package/dist/lib/native-hardware/capabilities.js +1 -1
- package/dist/lib/native-hardware/clipboard.js +1 -1
- package/dist/lib/native-hardware/device-io-errors.d.ts +1 -1
- package/dist/lib/native-hardware/device-io-errors.js +1 -1
- package/dist/lib/native-hardware/displays.d.ts +1 -1
- package/dist/lib/native-hardware/displays.js +1 -1
- package/dist/lib/native-hardware/global-shortcuts.d.ts +2 -2
- package/dist/lib/native-hardware/global-shortcuts.js +1 -1
- package/dist/lib/native-hardware/haptics.d.ts +1 -1
- package/dist/lib/native-hardware/haptics.js +1 -1
- package/dist/lib/native-hardware/hid-native.d.ts +2 -2
- package/dist/lib/native-hardware/hid-native.js +3 -3
- package/dist/lib/native-hardware/hid.js +4 -4
- package/dist/lib/native-hardware/index.d.ts +37 -37
- package/dist/lib/native-hardware/index.js +20 -20
- package/dist/lib/native-hardware/local-authentication.d.ts +1 -1
- package/dist/lib/native-hardware/local-authentication.js +1 -1
- package/dist/lib/native-hardware/location.js +1 -1
- package/dist/lib/native-hardware/media-permissions.d.ts +1 -1
- package/dist/lib/native-hardware/media-permissions.js +1 -1
- package/dist/lib/native-hardware/media.d.ts +1 -1
- package/dist/lib/native-hardware/media.js +1 -1
- package/dist/lib/native-hardware/midi-access.d.ts +1 -1
- package/dist/lib/native-hardware/midi-access.js +2 -2
- package/dist/lib/native-hardware/midi-internal.d.ts +1 -1
- package/dist/lib/native-hardware/midi-internal.js +1 -1
- package/dist/lib/native-hardware/midi-native-fallback.d.ts +1 -1
- package/dist/lib/native-hardware/midi-native-fallback.js +2 -2
- package/dist/lib/native-hardware/midi-ports.d.ts +1 -1
- package/dist/lib/native-hardware/midi-ports.js +1 -1
- package/dist/lib/native-hardware/midi.d.ts +5 -5
- package/dist/lib/native-hardware/midi.js +3 -3
- package/dist/lib/native-hardware/native-device-io.d.ts +1 -1
- package/dist/lib/native-hardware/native-device-io.js +1 -1
- package/dist/lib/native-hardware/native-device-lifecycle.js +1 -1
- package/dist/lib/native-hardware/notifications.d.ts +2 -2
- package/dist/lib/native-hardware/notifications.js +1 -1
- package/dist/lib/native-hardware/power-session.d.ts +2 -2
- package/dist/lib/native-hardware/power-session.js +1 -1
- package/dist/lib/native-hardware/secure-storage.d.ts +1 -1
- package/dist/lib/native-hardware/secure-storage.js +1 -1
- package/dist/lib/native-hardware/serial-native.d.ts +2 -2
- package/dist/lib/native-hardware/serial-native.js +3 -3
- package/dist/lib/native-hardware/serial.js +4 -4
- package/dist/lib/native-hardware/system-audio.d.ts +1 -1
- package/dist/lib/native-hardware/system-audio.js +1 -1
- package/dist/lib/native-hardware/usb-native.d.ts +2 -2
- package/dist/lib/native-hardware/usb-native.js +3 -3
- package/dist/lib/native-hardware/usb.js +4 -4
- package/dist/lib/theme.js +1 -1
- package/docs/README.md +1 -0
- package/docs/design-tokens.md +28 -6
- package/docs/foundations.md +4 -2
- package/docs/visual-regression.md +78 -0
- package/package.json +15 -4
- package/src/components/ui/alert-dialog.md +27 -0
- package/src/components/ui/button.md +10 -3
- package/src/components/ui/confirm-dialog.md +97 -0
- package/src/components/ui/context-menu.md +158 -0
- package/src/components/ui/dialog.md +23 -4
- package/src/components/ui/dropdown-menu.md +165 -0
- package/src/components/ui/error-boundary-view.md +98 -0
- package/src/components/ui/hover-card.md +90 -0
- package/src/components/ui/select.md +111 -0
- package/src/lib/host-date-time-picker.md +29 -0
- package/src/lib/host-file-dialog.md +76 -0
- package/src/lib/host-native-menu.md +67 -0
- package/src/lib/host-share.md +36 -0
- package/src/lib/host-web-surface.md +66 -0
- package/src/styles/index.css +141 -68
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
export const voiceOrbVertexShader = `
|
|
2
|
+
attribute vec2 a_position;
|
|
3
|
+
varying vec2 v_uv;
|
|
4
|
+
|
|
5
|
+
void main() {
|
|
6
|
+
v_uv = (a_position + 1.0) * 0.5;
|
|
7
|
+
gl_Position = vec4(a_position, 0.0, 1.0);
|
|
8
|
+
}
|
|
9
|
+
`;
|
|
10
|
+
export const voiceOrbFragmentShader = `
|
|
11
|
+
precision highp float;
|
|
12
|
+
|
|
13
|
+
varying vec2 v_uv;
|
|
14
|
+
|
|
15
|
+
uniform vec2 u_resolution;
|
|
16
|
+
uniform float u_time;
|
|
17
|
+
uniform float u_micLevel;
|
|
18
|
+
uniform float u_outputLevel;
|
|
19
|
+
uniform float u_stateListen;
|
|
20
|
+
uniform float u_stateThink;
|
|
21
|
+
uniform float u_stateSpeak;
|
|
22
|
+
uniform float u_stateMuted;
|
|
23
|
+
uniform float u_stateError;
|
|
24
|
+
uniform float u_motionScale;
|
|
25
|
+
uniform vec4 u_audio;
|
|
26
|
+
uniform vec4 u_cumulativeAudio;
|
|
27
|
+
|
|
28
|
+
#define PI 3.141592653589793
|
|
29
|
+
#define NUM_OCTAVES 5
|
|
30
|
+
|
|
31
|
+
float rand(vec2 n) {
|
|
32
|
+
return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
float noise(vec2 p) {
|
|
36
|
+
vec2 ip = floor(p);
|
|
37
|
+
vec2 u = fract(p);
|
|
38
|
+
u = u * u * (3.0 - 2.0 * u);
|
|
39
|
+
float value = mix(
|
|
40
|
+
mix(rand(ip), rand(ip + vec2(1.0, 0.0)), u.x),
|
|
41
|
+
mix(rand(ip + vec2(0.0, 1.0)), rand(ip + vec2(1.0, 1.0)), u.x),
|
|
42
|
+
u.y
|
|
43
|
+
);
|
|
44
|
+
return value * value;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
float fbm(vec2 point) {
|
|
48
|
+
float value = 0.0;
|
|
49
|
+
float amplitude = 0.5;
|
|
50
|
+
vec2 shift = vec2(100.0);
|
|
51
|
+
mat2 rotation = mat2(cos(0.5), sin(0.5), -sin(0.5), cos(0.5));
|
|
52
|
+
for (int index = 0; index < NUM_OCTAVES; index++) {
|
|
53
|
+
value += amplitude * noise(point);
|
|
54
|
+
point = rotation * point * 2.0 + shift;
|
|
55
|
+
amplitude *= 0.5;
|
|
56
|
+
}
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
vec3 blendLinearBurn(vec3 base, vec3 blend, float opacity) {
|
|
61
|
+
vec3 burned = max(base + blend - vec3(1.0), vec3(0.0));
|
|
62
|
+
return burned * opacity + base * (1.0 - opacity);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
vec4 permute(vec4 value) {
|
|
66
|
+
return mod((value * 34.0 + 1.0) * value, 289.0);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
vec4 taylorInvSqrt(vec4 value) {
|
|
70
|
+
return 1.79284291400159 - 0.85373472095314 * value;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
vec3 fade(vec3 value) {
|
|
74
|
+
return value * value * value * (value * (value * 6.0 - 15.0) + 10.0);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
float cnoise(vec3 point) {
|
|
78
|
+
vec3 cell0 = floor(point);
|
|
79
|
+
vec3 cell1 = cell0 + vec3(1.0);
|
|
80
|
+
cell0 = mod(cell0, 289.0);
|
|
81
|
+
cell1 = mod(cell1, 289.0);
|
|
82
|
+
vec3 offset0 = fract(point);
|
|
83
|
+
vec3 offset1 = offset0 - vec3(1.0);
|
|
84
|
+
vec4 x = vec4(cell0.x, cell1.x, cell0.x, cell1.x);
|
|
85
|
+
vec4 y = vec4(cell0.yy, cell1.yy);
|
|
86
|
+
vec4 z0 = vec4(cell0.z);
|
|
87
|
+
vec4 z1 = vec4(cell1.z);
|
|
88
|
+
vec4 xy = permute(permute(x) + y);
|
|
89
|
+
vec4 xy0 = permute(xy + z0);
|
|
90
|
+
vec4 xy1 = permute(xy + z1);
|
|
91
|
+
|
|
92
|
+
vec4 gx0 = xy0 / 7.0;
|
|
93
|
+
vec4 gy0 = fract(floor(gx0) / 7.0) - 0.5;
|
|
94
|
+
gx0 = fract(gx0);
|
|
95
|
+
vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);
|
|
96
|
+
vec4 sz0 = step(gz0, vec4(0.0));
|
|
97
|
+
gx0 -= sz0 * (step(vec4(0.0), gx0) - 0.5);
|
|
98
|
+
gy0 -= sz0 * (step(vec4(0.0), gy0) - 0.5);
|
|
99
|
+
|
|
100
|
+
vec4 gx1 = xy1 / 7.0;
|
|
101
|
+
vec4 gy1 = fract(floor(gx1) / 7.0) - 0.5;
|
|
102
|
+
gx1 = fract(gx1);
|
|
103
|
+
vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);
|
|
104
|
+
vec4 sz1 = step(gz1, vec4(0.0));
|
|
105
|
+
gx1 -= sz1 * (step(vec4(0.0), gx1) - 0.5);
|
|
106
|
+
gy1 -= sz1 * (step(vec4(0.0), gy1) - 0.5);
|
|
107
|
+
|
|
108
|
+
vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);
|
|
109
|
+
vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);
|
|
110
|
+
vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);
|
|
111
|
+
vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);
|
|
112
|
+
vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);
|
|
113
|
+
vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);
|
|
114
|
+
vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);
|
|
115
|
+
vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);
|
|
116
|
+
|
|
117
|
+
vec4 norm0 = taylorInvSqrt(
|
|
118
|
+
vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))
|
|
119
|
+
);
|
|
120
|
+
g000 *= norm0.x;
|
|
121
|
+
g010 *= norm0.y;
|
|
122
|
+
g100 *= norm0.z;
|
|
123
|
+
g110 *= norm0.w;
|
|
124
|
+
vec4 norm1 = taylorInvSqrt(
|
|
125
|
+
vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))
|
|
126
|
+
);
|
|
127
|
+
g001 *= norm1.x;
|
|
128
|
+
g011 *= norm1.y;
|
|
129
|
+
g101 *= norm1.z;
|
|
130
|
+
g111 *= norm1.w;
|
|
131
|
+
|
|
132
|
+
float n000 = dot(g000, offset0);
|
|
133
|
+
float n100 = dot(g100, vec3(offset1.x, offset0.yz));
|
|
134
|
+
float n010 = dot(g010, vec3(offset0.x, offset1.y, offset0.z));
|
|
135
|
+
float n110 = dot(g110, vec3(offset1.xy, offset0.z));
|
|
136
|
+
float n001 = dot(g001, vec3(offset0.xy, offset1.z));
|
|
137
|
+
float n101 = dot(g101, vec3(offset1.x, offset0.y, offset1.z));
|
|
138
|
+
float n011 = dot(g011, vec3(offset0.x, offset1.yz));
|
|
139
|
+
float n111 = dot(g111, offset1);
|
|
140
|
+
|
|
141
|
+
vec3 fadePoint = fade(offset0);
|
|
142
|
+
vec4 noiseZ = mix(
|
|
143
|
+
vec4(n000, n100, n010, n110),
|
|
144
|
+
vec4(n001, n101, n011, n111),
|
|
145
|
+
fadePoint.z
|
|
146
|
+
);
|
|
147
|
+
vec2 noiseYZ = mix(noiseZ.xy, noiseZ.zw, fadePoint.y);
|
|
148
|
+
return 2.2 * mix(noiseYZ.x, noiseYZ.y, fadePoint.x);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
void main() {
|
|
152
|
+
vec2 st = v_uv - 0.5;
|
|
153
|
+
st.x *= u_resolution.x / u_resolution.y;
|
|
154
|
+
|
|
155
|
+
float sound = max(max(u_audio.x, u_audio.y), max(u_audio.z, u_audio.w));
|
|
156
|
+
float stateAmount = max(
|
|
157
|
+
max(u_stateListen, u_stateThink),
|
|
158
|
+
max(u_stateSpeak, max(u_stateMuted, u_stateError))
|
|
159
|
+
);
|
|
160
|
+
float audioEnergy = smoothstep(0.08, 0.72, max(sound, u_micLevel));
|
|
161
|
+
float outputEnergy = smoothstep(0.04, 0.46, u_outputLevel);
|
|
162
|
+
float animatedTime = u_time * u_motionScale;
|
|
163
|
+
float breath = sin(animatedTime * PI * 0.34) * 0.5 + 0.5;
|
|
164
|
+
float entry = smoothstep(0.0, 0.9, stateAmount);
|
|
165
|
+
float maxRadius = min(
|
|
166
|
+
0.36,
|
|
167
|
+
min(0.5, 0.5 * u_resolution.x / u_resolution.y) - 0.16
|
|
168
|
+
);
|
|
169
|
+
float baseRadius = mix(maxRadius * 0.88, maxRadius * 0.94, u_stateThink);
|
|
170
|
+
float radius = baseRadius * mix(0.82, 1.0, entry);
|
|
171
|
+
radius += outputEnergy * maxRadius * 0.12;
|
|
172
|
+
radius +=
|
|
173
|
+
(1.0 - u_stateThink) *
|
|
174
|
+
(1.0 - outputEnergy) *
|
|
175
|
+
breath *
|
|
176
|
+
maxRadius *
|
|
177
|
+
0.01;
|
|
178
|
+
radius = min(maxRadius, radius);
|
|
179
|
+
|
|
180
|
+
vec2 drift = vec2(
|
|
181
|
+
sin(animatedTime * 0.43) * 0.0028,
|
|
182
|
+
sin(animatedTime * 0.36 + 1.7) * 0.0035
|
|
183
|
+
);
|
|
184
|
+
vec2 lifted = st - drift;
|
|
185
|
+
float distanceToEdge = length(lifted) - radius;
|
|
186
|
+
float edgeWidth = max(1.25 / min(u_resolution.x, u_resolution.y), 0.0014);
|
|
187
|
+
if (distanceToEdge > edgeWidth) discard;
|
|
188
|
+
float edge = 1.0 - smoothstep(-edgeWidth, edgeWidth, distanceToEdge);
|
|
189
|
+
|
|
190
|
+
vec2 uv = lifted / (2.0 * radius) + 0.5;
|
|
191
|
+
float soundScale = 1.0 + audioEnergy * 0.22;
|
|
192
|
+
float time = animatedTime * 0.34;
|
|
193
|
+
float noiseX = cnoise(vec3(
|
|
194
|
+
uv + vec2(0.0, 74.8572),
|
|
195
|
+
(time + u_cumulativeAudio.x * 0.05 * soundScale) * 0.3
|
|
196
|
+
));
|
|
197
|
+
float noiseY = cnoise(vec3(
|
|
198
|
+
uv + vec2(203.91282, 10.0),
|
|
199
|
+
(time + u_cumulativeAudio.z * 0.05 * soundScale) * 0.3
|
|
200
|
+
));
|
|
201
|
+
uv += vec2(noiseX * 2.0, noiseY) * 0.19;
|
|
202
|
+
|
|
203
|
+
float voiceWarpX = cnoise(vec3(
|
|
204
|
+
uv * 3.1 + vec2(0.0, 17.3),
|
|
205
|
+
u_cumulativeAudio.x * 0.085 + u_cumulativeAudio.z * 0.035
|
|
206
|
+
));
|
|
207
|
+
float voiceWarpY = cnoise(vec3(
|
|
208
|
+
uv * 3.4 + vec2(31.7, 0.0),
|
|
209
|
+
u_cumulativeAudio.y * 0.075 + u_cumulativeAudio.w * 0.045
|
|
210
|
+
));
|
|
211
|
+
uv += vec2(voiceWarpX, voiceWarpY) * audioEnergy * 0.04;
|
|
212
|
+
uv.y +=
|
|
213
|
+
sin(uv.x * 5.4 + u_cumulativeAudio.w * 0.19) *
|
|
214
|
+
audioEnergy *
|
|
215
|
+
0.016;
|
|
216
|
+
|
|
217
|
+
float watercolor =
|
|
218
|
+
cnoise(vec3(uv * 18.0 + vec2(344.91282, 0.0), time * 0.3)) +
|
|
219
|
+
cnoise(vec3(uv * 39.6 + vec2(723.937, 0.0), time * 0.4)) * 0.5;
|
|
220
|
+
uv += watercolor * 0.006;
|
|
221
|
+
|
|
222
|
+
float textureA = noise(
|
|
223
|
+
uv * 22.0 + vec2(time * 0.08, u_cumulativeAudio.x * 0.025)
|
|
224
|
+
);
|
|
225
|
+
float textureB = noise(
|
|
226
|
+
vec2(1.0 - uv.x, uv.y) * 41.0 +
|
|
227
|
+
vec2(u_cumulativeAudio.z * 0.018, -time * 0.11)
|
|
228
|
+
);
|
|
229
|
+
float texture = mix(
|
|
230
|
+
textureA,
|
|
231
|
+
textureB,
|
|
232
|
+
sin(time + u_cumulativeAudio.w * 0.12) * 0.5 + 0.5
|
|
233
|
+
) - 0.5;
|
|
234
|
+
uv += texture * (0.012 + audioEnergy * 0.004);
|
|
235
|
+
|
|
236
|
+
uv.y = 1.0 - uv.y;
|
|
237
|
+
vec2 centeredUv = uv - 0.5;
|
|
238
|
+
float angle = -0.16;
|
|
239
|
+
uv = mat2(cos(angle), -sin(angle), sin(angle), cos(angle)) * centeredUv + 0.5;
|
|
240
|
+
uv.y -= 0.03;
|
|
241
|
+
|
|
242
|
+
vec2 stNoise = uv * 1.25;
|
|
243
|
+
vec2 q = vec2(
|
|
244
|
+
fbm(
|
|
245
|
+
stNoise * 0.5 +
|
|
246
|
+
0.075 * (time + u_cumulativeAudio.w * 0.175 * soundScale)
|
|
247
|
+
),
|
|
248
|
+
fbm(
|
|
249
|
+
stNoise * 0.5 +
|
|
250
|
+
0.075 * (time + u_cumulativeAudio.x * 0.136 * soundScale)
|
|
251
|
+
)
|
|
252
|
+
);
|
|
253
|
+
vec2 r = vec2(
|
|
254
|
+
fbm(
|
|
255
|
+
stNoise + q + vec2(0.3, 9.2) +
|
|
256
|
+
0.15 * (time + u_cumulativeAudio.y * 0.234 * soundScale)
|
|
257
|
+
),
|
|
258
|
+
fbm(
|
|
259
|
+
stNoise + q + vec2(8.3, 0.8) +
|
|
260
|
+
0.126 * (time + u_cumulativeAudio.z * 0.165 * soundScale)
|
|
261
|
+
)
|
|
262
|
+
);
|
|
263
|
+
float field = fbm(stNoise + r - q);
|
|
264
|
+
float fullField = pow(
|
|
265
|
+
((field + 0.6 * field * field + 0.7 * field) + 0.5) * 0.5,
|
|
266
|
+
0.55
|
|
267
|
+
);
|
|
268
|
+
|
|
269
|
+
vec3 mainColor = mix(
|
|
270
|
+
vec3(0.94, 0.965, 1.0),
|
|
271
|
+
vec3(1.0, 0.99, 0.96),
|
|
272
|
+
u_micLevel
|
|
273
|
+
);
|
|
274
|
+
vec3 lowColor = vec3(0.36, 0.34, 0.96);
|
|
275
|
+
vec3 midColor = mix(
|
|
276
|
+
vec3(0.57, 0.64, 1.0),
|
|
277
|
+
vec3(0.96, 0.92, 1.0),
|
|
278
|
+
u_micLevel
|
|
279
|
+
);
|
|
280
|
+
vec3 highColor = vec3(1.0, 0.99, 0.97);
|
|
281
|
+
|
|
282
|
+
vec3 offsets = vec3(
|
|
283
|
+
u_cumulativeAudio.x * 0.15 * soundScale,
|
|
284
|
+
-u_cumulativeAudio.y * 0.5 * soundScale,
|
|
285
|
+
u_cumulativeAudio.z * 1.5 * soundScale
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
vec2 lowUv = uv + vec2((fullField - 0.5) * 1.2, 0.025);
|
|
289
|
+
float lowNoise = noise(
|
|
290
|
+
lowUv * 2.0 + vec2(sin(offsets.x * 0.25), time * 0.5 + offsets.x)
|
|
291
|
+
) * 2.0;
|
|
292
|
+
float lowMask = smoothstep(
|
|
293
|
+
lowNoise - 1.8,
|
|
294
|
+
lowNoise + 1.8,
|
|
295
|
+
((lowUv.y - 0.5) * (5.0 - u_audio.x * 0.05 * soundScale)) + 0.5
|
|
296
|
+
);
|
|
297
|
+
|
|
298
|
+
vec2 midUv = uv + vec2((fullField - 0.5) * 0.85, 0.025);
|
|
299
|
+
float midNoise = noise(
|
|
300
|
+
midUv * 4.0 +
|
|
301
|
+
vec2(sin(offsets.y * 0.15) * 2.4 + 293.0, time + offsets.y * 0.5)
|
|
302
|
+
) * 2.0;
|
|
303
|
+
float midMask = smoothstep(
|
|
304
|
+
midNoise - ((0.9 + u_audio.y * 0.4) * 1.5),
|
|
305
|
+
midNoise + ((0.9 + u_audio.y * 0.8) * 1.5),
|
|
306
|
+
((midUv.y - 0.6) * (5.0 - u_audio.y * 0.75)) + 0.5
|
|
307
|
+
);
|
|
308
|
+
|
|
309
|
+
vec2 highUv = uv + vec2((fullField - 0.5) * 1.1);
|
|
310
|
+
float highNoise = noise(
|
|
311
|
+
highUv * 6.0 +
|
|
312
|
+
vec2(sin(offsets.z * 0.1) * 2.4 + 153.0, time * 1.2 + offsets.z * 0.8)
|
|
313
|
+
) * 2.0;
|
|
314
|
+
float highMask = smoothstep(
|
|
315
|
+
highNoise - 1.05,
|
|
316
|
+
highNoise + 1.05,
|
|
317
|
+
((highUv.y - 0.9) * 6.0) + 0.5
|
|
318
|
+
);
|
|
319
|
+
|
|
320
|
+
lowMask = pow(lowMask, 0.8);
|
|
321
|
+
midMask = pow(midMask, 0.9);
|
|
322
|
+
vec3 color = blendLinearBurn(mainColor, lowColor, 1.0 - lowMask);
|
|
323
|
+
color = blendLinearBurn(
|
|
324
|
+
color,
|
|
325
|
+
mix(mainColor, midColor, 1.0 - midMask),
|
|
326
|
+
lowMask
|
|
327
|
+
);
|
|
328
|
+
color = mix(
|
|
329
|
+
color,
|
|
330
|
+
mix(mainColor, highColor, 1.0 - highMask),
|
|
331
|
+
lowMask * midMask
|
|
332
|
+
);
|
|
333
|
+
|
|
334
|
+
float fineNoise = fbm(
|
|
335
|
+
uv * 12.0 + vec2(time * 0.13, -time * 0.09) + r * 0.4
|
|
336
|
+
);
|
|
337
|
+
color = mix(
|
|
338
|
+
color,
|
|
339
|
+
highColor,
|
|
340
|
+
smoothstep(0.58, 0.9, fineNoise) * (0.035 + audioEnergy * 0.025)
|
|
341
|
+
);
|
|
342
|
+
color = mix(
|
|
343
|
+
color,
|
|
344
|
+
lowColor,
|
|
345
|
+
smoothstep(0.42, 0.12, fineNoise) * 0.018
|
|
346
|
+
);
|
|
347
|
+
|
|
348
|
+
float luminance = dot(color, vec3(0.299, 0.587, 0.114));
|
|
349
|
+
color = mix(color, vec3(luminance), u_stateMuted * 0.72);
|
|
350
|
+
color = mix(color, vec3(1.0, 0.35, 0.31), u_stateError * 0.58);
|
|
351
|
+
|
|
352
|
+
float alpha = edge * smoothstep(0.0, 0.18, stateAmount + 0.3);
|
|
353
|
+
gl_FragColor = vec4(color, alpha);
|
|
354
|
+
}
|
|
355
|
+
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const voiceOrbStates: readonly ["inactive", "connecting", "listening", "thinking", "speaking", "muted", "disconnecting", "error"];
|
|
2
|
+
export type VoiceOrbState = (typeof voiceOrbStates)[number];
|
|
3
|
+
export interface VoiceOrbAudioLevels {
|
|
4
|
+
low: number;
|
|
5
|
+
mid: number;
|
|
6
|
+
high: number;
|
|
7
|
+
overall: number;
|
|
8
|
+
}
|
|
9
|
+
export interface VoiceOrbStateTargets {
|
|
10
|
+
listen: number;
|
|
11
|
+
think: number;
|
|
12
|
+
speak: number;
|
|
13
|
+
muted: number;
|
|
14
|
+
error: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const voiceOrbStateTransitionSeconds = 0.28;
|
|
17
|
+
export declare const voiceOrbSpeakingThreshold = 0.08;
|
|
18
|
+
export declare const voiceOrbSilenceThreshold = 0.04;
|
|
19
|
+
export declare const voiceOrbSilenceHoldMs = 300;
|
|
20
|
+
export declare const silentVoiceOrbAudioLevels: VoiceOrbAudioLevels;
|
|
21
|
+
export declare function normalizeVoiceOrbAudioLevels(levels: VoiceOrbAudioLevels): VoiceOrbAudioLevels;
|
|
22
|
+
export declare function getVoiceOrbStateTargets(state: VoiceOrbState): VoiceOrbStateTargets;
|
|
23
|
+
export declare function getVoiceOrbStateLabel(state: VoiceOrbState): string;
|
|
24
|
+
//# sourceMappingURL=voice-orb-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice-orb-types.d.ts","sourceRoot":"","sources":["../../../src/components/chat/voice-orb-types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,6GASjB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3D,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,8BAA8B,OAAO,CAAA;AAClD,eAAO,MAAM,yBAAyB,OAAO,CAAA;AAC7C,eAAO,MAAM,wBAAwB,OAAO,CAAA;AAC5C,eAAO,MAAM,qBAAqB,MAAM,CAAA;AAExC,eAAO,MAAM,yBAAyB,EAAE,mBAKvC,CAAA;AAOD,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,mBAAmB,GAC1B,mBAAmB,CAOrB;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,aAAa,GACnB,oBAAoB,CAmBtB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,CAmBlE"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export const voiceOrbStates = [
|
|
2
|
+
'inactive',
|
|
3
|
+
'connecting',
|
|
4
|
+
'listening',
|
|
5
|
+
'thinking',
|
|
6
|
+
'speaking',
|
|
7
|
+
'muted',
|
|
8
|
+
'disconnecting',
|
|
9
|
+
'error',
|
|
10
|
+
];
|
|
11
|
+
export const voiceOrbStateTransitionSeconds = 0.28;
|
|
12
|
+
export const voiceOrbSpeakingThreshold = 0.08;
|
|
13
|
+
export const voiceOrbSilenceThreshold = 0.04;
|
|
14
|
+
export const voiceOrbSilenceHoldMs = 300;
|
|
15
|
+
export const silentVoiceOrbAudioLevels = {
|
|
16
|
+
low: 0,
|
|
17
|
+
mid: 0,
|
|
18
|
+
high: 0,
|
|
19
|
+
overall: 0,
|
|
20
|
+
};
|
|
21
|
+
function normalizeLevel(value) {
|
|
22
|
+
if (!Number.isFinite(value))
|
|
23
|
+
return 0;
|
|
24
|
+
return Math.max(0, Math.min(1, value));
|
|
25
|
+
}
|
|
26
|
+
export function normalizeVoiceOrbAudioLevels(levels) {
|
|
27
|
+
return {
|
|
28
|
+
low: normalizeLevel(levels.low),
|
|
29
|
+
mid: normalizeLevel(levels.mid),
|
|
30
|
+
high: normalizeLevel(levels.high),
|
|
31
|
+
overall: normalizeLevel(levels.overall),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function getVoiceOrbStateTargets(state) {
|
|
35
|
+
switch (state) {
|
|
36
|
+
case 'inactive':
|
|
37
|
+
return { listen: 0, think: 0, speak: 0, muted: 0, error: 0 };
|
|
38
|
+
case 'connecting':
|
|
39
|
+
return { listen: 0, think: 1, speak: 0, muted: 0, error: 0 };
|
|
40
|
+
case 'listening':
|
|
41
|
+
return { listen: 1, think: 0, speak: 0, muted: 0, error: 0 };
|
|
42
|
+
case 'thinking':
|
|
43
|
+
return { listen: 0.65, think: 1, speak: 0, muted: 0, error: 0 };
|
|
44
|
+
case 'speaking':
|
|
45
|
+
return { listen: 0.2, think: 0, speak: 1, muted: 0, error: 0 };
|
|
46
|
+
case 'muted':
|
|
47
|
+
return { listen: 0.45, think: 0, speak: 0, muted: 1, error: 0 };
|
|
48
|
+
case 'disconnecting':
|
|
49
|
+
return { listen: 0.35, think: 0, speak: 0, muted: 0, error: 0 };
|
|
50
|
+
case 'error':
|
|
51
|
+
return { listen: 0.2, think: 0, speak: 0, muted: 0, error: 1 };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export function getVoiceOrbStateLabel(state) {
|
|
55
|
+
switch (state) {
|
|
56
|
+
case 'inactive':
|
|
57
|
+
return 'Voice inactive';
|
|
58
|
+
case 'connecting':
|
|
59
|
+
return 'Connecting voice';
|
|
60
|
+
case 'listening':
|
|
61
|
+
return 'Listening';
|
|
62
|
+
case 'thinking':
|
|
63
|
+
return 'Thinking';
|
|
64
|
+
case 'speaking':
|
|
65
|
+
return 'Speaking';
|
|
66
|
+
case 'muted':
|
|
67
|
+
return 'Microphone muted';
|
|
68
|
+
case 'disconnecting':
|
|
69
|
+
return 'Ending voice session';
|
|
70
|
+
case 'error':
|
|
71
|
+
return 'Voice unavailable';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VoiceOrbAudioLevels, type VoiceOrbState } from './voice-orb-types.js';
|
|
3
|
+
export interface VoiceOrbProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
4
|
+
state: VoiceOrbState;
|
|
5
|
+
/** Audio stream to analyse. A live session should pass its remote output. */
|
|
6
|
+
stream?: MediaStream | null;
|
|
7
|
+
/** Precomputed levels take effect when no stream is supplied. */
|
|
8
|
+
audioLevels?: VoiceOrbAudioLevels;
|
|
9
|
+
onAudioLevels?: (levels: VoiceOrbAudioLevels) => void;
|
|
10
|
+
/** Synthetic energy used for state previews before a stream is available. */
|
|
11
|
+
previewAudioLevel?: number;
|
|
12
|
+
/** Render one deterministic frame at this timestamp instead of animating. */
|
|
13
|
+
previewTimeMs?: number;
|
|
14
|
+
reducedMotion?: boolean;
|
|
15
|
+
size?: number;
|
|
16
|
+
glow?: boolean;
|
|
17
|
+
label?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function VoiceOrb({ state, stream, audioLevels, onAudioLevels, previewAudioLevel, previewTimeMs, reducedMotion, size, glow, label, className, style, ...props }: VoiceOrbProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=voice-orb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice-orb.d.ts","sourceRoot":"","sources":["../../../src/components/chat/voice-orb.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAGnB,MAAM,mBAAmB,CAAA;AAE1B,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC/D,KAAK,EAAE,aAAa,CAAA;IACpB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3B,iEAAiE;IACjE,WAAW,CAAC,EAAE,mBAAmB,CAAA;IACjC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACrD,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,MAAa,EACb,WAAW,EACX,aAAa,EACb,iBAAqB,EACrB,aAAa,EACb,aAAa,EACb,IAAU,EACV,IAAW,EACX,KAAK,EACL,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,2CAkFf"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { VoiceOrbStreamAnalyser } from './voice-orb-audio.js';
|
|
6
|
+
import { VoiceOrbRenderer } from './voice-orb-renderer.js';
|
|
7
|
+
import { getVoiceOrbStateLabel, normalizeVoiceOrbAudioLevels, } from './voice-orb-types.js';
|
|
8
|
+
export function VoiceOrb({ state, stream = null, audioLevels, onAudioLevels, previewAudioLevel = 0, previewTimeMs, reducedMotion, size = 160, glow = true, label, className, style, ...props }) {
|
|
9
|
+
const canvasRef = useRef(null);
|
|
10
|
+
const rendererRef = useRef(null);
|
|
11
|
+
const analyserRef = useRef(null);
|
|
12
|
+
const onAudioLevelsRef = useRef(onAudioLevels);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
onAudioLevelsRef.current = onAudioLevels;
|
|
15
|
+
}, [onAudioLevels]);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
const canvas = canvasRef.current;
|
|
18
|
+
if (!canvas)
|
|
19
|
+
return;
|
|
20
|
+
const renderer = new VoiceOrbRenderer(canvas);
|
|
21
|
+
const analyser = new VoiceOrbStreamAnalyser((levels) => {
|
|
22
|
+
renderer.setAudioLevels(levels);
|
|
23
|
+
onAudioLevelsRef.current?.(levels);
|
|
24
|
+
});
|
|
25
|
+
rendererRef.current = renderer;
|
|
26
|
+
analyserRef.current = analyser;
|
|
27
|
+
return () => {
|
|
28
|
+
analyser.dispose();
|
|
29
|
+
renderer.dispose();
|
|
30
|
+
analyserRef.current = null;
|
|
31
|
+
rendererRef.current = null;
|
|
32
|
+
};
|
|
33
|
+
}, []);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
rendererRef.current?.setState(state);
|
|
36
|
+
}, [state]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
analyserRef.current?.setStream(stream);
|
|
39
|
+
}, [stream]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (stream)
|
|
42
|
+
return;
|
|
43
|
+
const normalized = audioLevels
|
|
44
|
+
? normalizeVoiceOrbAudioLevels(audioLevels)
|
|
45
|
+
: null;
|
|
46
|
+
rendererRef.current?.setAudioLevels(normalized);
|
|
47
|
+
if (normalized)
|
|
48
|
+
onAudioLevelsRef.current?.(normalized);
|
|
49
|
+
}, [audioLevels, stream]);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
rendererRef.current?.setPreview(previewAudioLevel, previewTimeMs);
|
|
52
|
+
}, [previewAudioLevel, previewTimeMs]);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
55
|
+
const sync = () => {
|
|
56
|
+
rendererRef.current?.setReducedMotion(reducedMotion ?? mediaQuery.matches);
|
|
57
|
+
};
|
|
58
|
+
sync();
|
|
59
|
+
mediaQuery.addEventListener('change', sync);
|
|
60
|
+
return () => mediaQuery.removeEventListener('change', sync);
|
|
61
|
+
}, [reducedMotion]);
|
|
62
|
+
return (_jsx("div", { role: "img", "aria-label": label ?? getVoiceOrbStateLabel(state), "data-slot": "voice-orb", "data-state": state, className: cn('relative shrink-0', className), style: { width: size, height: size, ...style }, ...props, children: _jsx("canvas", { ref: canvasRef, "aria-hidden": "true", className: "pointer-events-none absolute -inset-5 size-[calc(100%+2.5rem)] max-w-none", style: {
|
|
63
|
+
filter: glow
|
|
64
|
+
? 'drop-shadow(0 0 4px rgb(154 154 249 / 55%))'
|
|
65
|
+
: undefined,
|
|
66
|
+
} }) }));
|
|
67
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { memo, useEffect, useState } from 'react';
|
|
4
|
-
import { cn } from '../lib/utils';
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
5
|
let highlighterPromise = null;
|
|
6
6
|
async function getHighlighter() {
|
|
7
7
|
if (!highlighterPromise) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableBluetoothConnection, type MoldableBluetoothDevice, type MoldableBluetoothRemoteGATTCharacteristic, type MoldableNativeBluetoothDevice } from '../../lib/native-hardware';
|
|
2
|
+
import { type MoldableBluetoothConnection, type MoldableBluetoothDevice, type MoldableBluetoothRemoteGATTCharacteristic, type MoldableNativeBluetoothDevice } from '../../lib/native-hardware/index.js';
|
|
3
3
|
export type MoldableBluetoothStatus = 'idle' | 'requesting' | 'connecting' | 'connected' | 'error';
|
|
4
4
|
export interface MoldableBluetoothCharacteristicInfo {
|
|
5
5
|
serviceUuid: string;
|
|
@@ -30,7 +30,7 @@ export declare function useMoldableBluetooth(options?: UseMoldableBluetoothOptio
|
|
|
30
30
|
services: MoldableBluetoothServiceInfo[];
|
|
31
31
|
subscribedUuids: string[];
|
|
32
32
|
error: Error | null;
|
|
33
|
-
entries: import("./stream-log").StreamLogEntry[];
|
|
33
|
+
entries: import("./stream-log.js").StreamLogEntry[];
|
|
34
34
|
request: (serviceUuid?: string) => Promise<void>;
|
|
35
35
|
connect: () => Promise<void>;
|
|
36
36
|
disconnect: () => Promise<void>;
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Binary, Bluetooth } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { NativeHardwareBridgeError, connectMoldableBluetoothDevice, isMoldableBluetoothSupported, observeMoldableBluetoothNotifications, readMoldableBluetoothValue, requestMoldableBluetoothWithFallback, writeMoldableBluetoothValue, } from '../../lib/native-hardware';
|
|
6
|
-
import { Button } from '../ui/button';
|
|
7
|
-
import { Input } from '../ui/input';
|
|
8
|
-
import { Spinner } from '../ui/spinner';
|
|
9
|
-
import { cleanupBluetoothSubscriptions, parseBluetoothHexBytes, } from './bluetooth-panel-helpers';
|
|
10
|
-
import { CapabilityBadge } from './capability-badge';
|
|
11
|
-
import { DeviceList, DeviceListEmpty, DeviceListItem } from './device-list';
|
|
12
|
-
import { HardwarePanel, HardwarePanelAction, HardwarePanelContent, HardwarePanelHeader, HardwarePanelIcon, HardwarePanelTitle, } from './hardware-panel';
|
|
13
|
-
import { LiveIndicator } from './live-indicator';
|
|
14
|
-
import { StreamLog, useStreamLog } from './stream-log';
|
|
5
|
+
import { NativeHardwareBridgeError, connectMoldableBluetoothDevice, isMoldableBluetoothSupported, observeMoldableBluetoothNotifications, readMoldableBluetoothValue, requestMoldableBluetoothWithFallback, writeMoldableBluetoothValue, } from '../../lib/native-hardware/index.js';
|
|
6
|
+
import { Button } from '../ui/button.js';
|
|
7
|
+
import { Input } from '../ui/input.js';
|
|
8
|
+
import { Spinner } from '../ui/spinner.js';
|
|
9
|
+
import { cleanupBluetoothSubscriptions, parseBluetoothHexBytes, } from './bluetooth-panel-helpers.js';
|
|
10
|
+
import { CapabilityBadge } from './capability-badge.js';
|
|
11
|
+
import { DeviceList, DeviceListEmpty, DeviceListItem } from './device-list.js';
|
|
12
|
+
import { HardwarePanel, HardwarePanelAction, HardwarePanelContent, HardwarePanelHeader, HardwarePanelIcon, HardwarePanelTitle, } from './hardware-panel.js';
|
|
13
|
+
import { LiveIndicator } from './live-indicator.js';
|
|
14
|
+
import { StreamLog, useStreamLog } from './stream-log.js';
|
|
15
15
|
const HEX_DUMP_MAX_BYTES = 32;
|
|
16
16
|
const BLUETOOTH_BASE_UUID_SUFFIX = '-0000-1000-8000-00805f9b34fb';
|
|
17
17
|
function toError(cause) {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Camera, CameraOff, RefreshCw, Square } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { NativeHardwareBridgeError, enumerateMoldableMediaDevices, getMoldableCameraStream, getMoldableMediaPermissionStatus, requestMoldableMediaPermission, stopMoldableMediaStream, } from '../../lib/native-hardware';
|
|
6
|
-
import { cn } from '../../lib/utils';
|
|
7
|
-
import { Button } from '../ui/button';
|
|
8
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../ui/select';
|
|
9
|
-
import { Spinner } from '../ui/spinner';
|
|
10
|
-
import { LiveIndicator } from './live-indicator';
|
|
5
|
+
import { NativeHardwareBridgeError, enumerateMoldableMediaDevices, getMoldableCameraStream, getMoldableMediaPermissionStatus, requestMoldableMediaPermission, stopMoldableMediaStream, } from '../../lib/native-hardware/index.js';
|
|
6
|
+
import { cn } from '../../lib/utils.js';
|
|
7
|
+
import { Button } from '../ui/button.js';
|
|
8
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../ui/select.js';
|
|
9
|
+
import { Spinner } from '../ui/spinner.js';
|
|
10
|
+
import { LiveIndicator } from './live-indicator.js';
|
|
11
11
|
function isPermissionDenied(error) {
|
|
12
12
|
if (error instanceof NativeHardwareBridgeError) {
|
|
13
13
|
return error.code === 'permission_denied';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { NativeHardwareCapabilityId } from '../../lib/native-hardware';
|
|
3
|
-
import { type MoldableCapabilityStatus } from './use-capability';
|
|
2
|
+
import type { NativeHardwareCapabilityId } from '../../lib/native-hardware/index.js';
|
|
3
|
+
import { type MoldableCapabilityStatus } from './use-capability.js';
|
|
4
4
|
declare function CapabilityDot({ status, className, ...props }: React.ComponentProps<'span'> & {
|
|
5
5
|
status: MoldableCapabilityStatus;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from '../../lib/utils';
|
|
4
|
-
import { useMoldableCapability, } from './use-capability';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
|
+
import { useMoldableCapability, } from './use-capability.js';
|
|
5
5
|
const STATUS_LABEL = {
|
|
6
6
|
checking: 'Checking',
|
|
7
7
|
supported: 'Supported',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type NativeHardwareCapabilityId } from '../../lib/native-hardware';
|
|
2
|
+
import { type NativeHardwareCapabilityId } from '../../lib/native-hardware/index.js';
|
|
3
3
|
export interface CapabilityMatrixProps extends React.ComponentProps<'div'> {
|
|
4
4
|
/** Subset of capabilities to show; defaults to every known capability. */
|
|
5
5
|
capabilities?: NativeHardwareCapabilityId[];
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Activity, BatteryCharging, Bell, Bluetooth, Cable, Camera, Clipboard, ClipboardCopy, Fingerprint, Gamepad2, KeyRound, Keyboard, MapPin, Mic, Monitor, MonitorUp, Moon, Music, Timer, Usb, Vibrate, Volume2, } from 'lucide-react';
|
|
4
4
|
import { useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { NATIVE_HARDWARE_CAPABILITY_IDS, } from '../../lib/native-hardware';
|
|
6
|
-
import { cn } from '../../lib/utils';
|
|
7
|
-
import { Skeleton } from '../ui/skeleton';
|
|
8
|
-
import { CapabilityDot } from './capability-badge';
|
|
9
|
-
import { loadMoldableCapabilities, } from './use-capability';
|
|
5
|
+
import { NATIVE_HARDWARE_CAPABILITY_IDS, } from '../../lib/native-hardware/index.js';
|
|
6
|
+
import { cn } from '../../lib/utils.js';
|
|
7
|
+
import { Skeleton } from '../ui/skeleton.js';
|
|
8
|
+
import { CapabilityDot } from './capability-badge.js';
|
|
9
|
+
import { loadMoldableCapabilities, } from './use-capability.js';
|
|
10
10
|
const CAPABILITY_ICON = {
|
|
11
11
|
camera: Camera,
|
|
12
12
|
microphone: Mic,
|