@moldable-ai/ui 0.2.22 → 0.2.25
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/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 -150
- 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 +40 -8
- 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 +48 -20
- 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.js +2 -2
- 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 +2 -2
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +16 -10
- package/dist/components/ui/alert.d.ts +1 -1
- 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 +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +16 -16
- 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.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.d.ts +2 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +16 -8
- 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.map +1 -1
- package/dist/components/ui/error-boundary-view.js +3 -3
- 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.js +3 -3
- package/dist/components/ui/index.d.ts +77 -77
- package/dist/components/ui/index.js +77 -77
- package/dist/components/ui/input-group.d.ts +2 -2
- 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.js +1 -1
- 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 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -20
- package/dist/lib/frame-lifecycle.d.ts +27 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +136 -0
- package/dist/lib/host-date-time-picker.d.ts +1 -1
- package/dist/lib/host-date-time-picker.js +1 -1
- package/dist/lib/host-file-dialog.d.ts +1 -1
- package/dist/lib/host-file-dialog.js +1 -1
- package/dist/lib/host-native-menu.d.ts +48 -7
- package/dist/lib/host-native-menu.d.ts.map +1 -1
- package/dist/lib/host-native-menu.js +56 -1
- package/dist/lib/host-services.js +1 -1
- package/dist/lib/host-share.d.ts +1 -1
- package/dist/lib/host-share.js +1 -1
- 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/design-tokens.md +28 -6
- package/docs/foundations.md +4 -2
- package/package.json +4 -2
- package/src/components/ui/confirm-dialog.md +97 -0
- package/src/components/ui/context-menu.md +158 -0
- package/src/components/ui/dropdown-menu.md +165 -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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
5
|
/** Rolling entry buffer for `StreamLog`, capped at `maxEntries`. */
|
|
6
6
|
export function useStreamLog(maxEntries = 500) {
|
|
7
7
|
const [entries, setEntries] = useState([]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableSystemAudioCaptureMode, type MoldableSystemAudioEvent } from '../../lib/native-hardware';
|
|
2
|
+
import { type MoldableSystemAudioCaptureMode, type MoldableSystemAudioEvent } from '../../lib/native-hardware/index.js';
|
|
3
3
|
export type MoldableSystemAudioMonitorStatus = 'idle' | 'starting' | 'stopping' | 'capturing' | 'error';
|
|
4
4
|
export interface UseMoldableSystemAudioOptions {
|
|
5
5
|
/** Observe raw capture events (lifecycle plus PCM data frames). */
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Play, Square, Volume2, VolumeX } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { startMoldableSystemAudioCapture, stopMoldableSystemAudioCapture, subscribeMoldableSystemAudioEvents, } from '../../lib/native-hardware';
|
|
6
|
-
import { Button } from '../ui/button';
|
|
7
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../ui/select';
|
|
8
|
-
import { Spinner } from '../ui/spinner';
|
|
9
|
-
import { CapabilityBadge } from './capability-badge';
|
|
10
|
-
import { HardwarePanel, HardwarePanelAction, HardwarePanelContent, HardwarePanelFooter, HardwarePanelHeader, HardwarePanelIcon, HardwarePanelTitle, } from './hardware-panel';
|
|
11
|
-
import { LiveIndicator } from './live-indicator';
|
|
12
|
-
import { StreamLog, useStreamLog } from './stream-log';
|
|
13
|
-
import { useMoldableCapability } from './use-capability';
|
|
5
|
+
import { startMoldableSystemAudioCapture, stopMoldableSystemAudioCapture, subscribeMoldableSystemAudioEvents, } from '../../lib/native-hardware/index.js';
|
|
6
|
+
import { Button } from '../ui/button.js';
|
|
7
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../ui/select.js';
|
|
8
|
+
import { Spinner } from '../ui/spinner.js';
|
|
9
|
+
import { CapabilityBadge } from './capability-badge.js';
|
|
10
|
+
import { HardwarePanel, HardwarePanelAction, HardwarePanelContent, HardwarePanelFooter, HardwarePanelHeader, HardwarePanelIcon, HardwarePanelTitle, } from './hardware-panel.js';
|
|
11
|
+
import { LiveIndicator } from './live-indicator.js';
|
|
12
|
+
import { StreamLog, useStreamLog } from './stream-log.js';
|
|
13
|
+
import { useMoldableCapability } from './use-capability.js';
|
|
14
14
|
const SYSTEM_AUDIO_SAMPLE_RATE = 48_000;
|
|
15
15
|
const FRAME_LOG_INTERVAL = 50;
|
|
16
16
|
function computeRmsLevel(buffer) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableUsbControlTransferParameters, type MoldableUsbDevice, type MoldableUsbDeviceFilter, type MoldableUsbOpenOptions, type MoldableUsbRequestOptions } from '../../lib/native-hardware';
|
|
2
|
+
import { type MoldableUsbControlTransferParameters, type MoldableUsbDevice, type MoldableUsbDeviceFilter, type MoldableUsbOpenOptions, type MoldableUsbRequestOptions } from '../../lib/native-hardware/index.js';
|
|
3
3
|
export type MoldableUsbStatus = 'idle' | 'loading' | 'requesting' | 'error';
|
|
4
4
|
export interface UseMoldableUsbOptions {
|
|
5
5
|
/** Device filters used when `request` does not override them. */
|
|
@@ -29,10 +29,10 @@ export declare function useMoldableUsb(options?: UseMoldableUsbOptions): {
|
|
|
29
29
|
open: (device: MoldableUsbDevice) => Promise<void>;
|
|
30
30
|
close: (device: MoldableUsbDevice) => Promise<boolean>;
|
|
31
31
|
forget: (device: MoldableUsbDevice) => Promise<boolean>;
|
|
32
|
-
readEndpoint: (device: MoldableUsbDevice, endpoint: number, length: number) => Promise<import("
|
|
33
|
-
writeEndpoint: (device: MoldableUsbDevice, endpoint: number, data: BufferSource) => Promise<import("
|
|
34
|
-
readControl: (device: MoldableUsbDevice, setup: MoldableUsbControlTransferParameters, length: number) => Promise<import("
|
|
35
|
-
writeControl: (device: MoldableUsbDevice, setup: MoldableUsbControlTransferParameters, data?: BufferSource) => Promise<import("
|
|
32
|
+
readEndpoint: (device: MoldableUsbDevice, endpoint: number, length: number) => Promise<import("../../index.js").MoldableUsbInTransferResult>;
|
|
33
|
+
writeEndpoint: (device: MoldableUsbDevice, endpoint: number, data: BufferSource) => Promise<import("../../index.js").MoldableUsbOutTransferResult>;
|
|
34
|
+
readControl: (device: MoldableUsbDevice, setup: MoldableUsbControlTransferParameters, length: number) => Promise<import("../../index.js").MoldableUsbInTransferResult>;
|
|
35
|
+
writeControl: (device: MoldableUsbDevice, setup: MoldableUsbControlTransferParameters, data?: BufferSource) => Promise<import("../../index.js").MoldableUsbOutTransferResult>;
|
|
36
36
|
clearHalt: (device: MoldableUsbDevice, direction: "in" | "out", endpoint: number) => Promise<void>;
|
|
37
37
|
reset: (device: MoldableUsbDevice) => Promise<void>;
|
|
38
38
|
};
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { RefreshCw, RotateCcw, Trash2, Usb } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { NativeHardwareBridgeError, clearMoldableUsbHalt, closeMoldableUsbDevice, forgetMoldableUsbDevice, getMoldableUsbDevices, openMoldableUsbDevice, readMoldableUsbControlTransfer, readMoldableUsbEndpoint, requestMoldableUsbDevice, resetMoldableUsbDevice, writeMoldableUsbControlTransfer, writeMoldableUsbEndpoint, } from '../../lib/native-hardware';
|
|
6
|
-
import { Button } from '../ui/button';
|
|
7
|
-
import { Input } from '../ui/input';
|
|
8
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../ui/select';
|
|
9
|
-
import { Spinner } from '../ui/spinner';
|
|
10
|
-
import { CapabilityBadge } from './capability-badge';
|
|
11
|
-
import { formatHexBytes, parseHexBytes, parseIntegerInput, } from './device-io-controls';
|
|
12
|
-
import { DeviceList, DeviceListEmpty, DeviceListItem } from './device-list';
|
|
13
|
-
import { HardwarePanel, HardwarePanelAction, HardwarePanelContent, HardwarePanelFooter, HardwarePanelHeader, HardwarePanelIcon, HardwarePanelTitle, } from './hardware-panel';
|
|
14
|
-
import { Readout, ReadoutItem } from './readout';
|
|
5
|
+
import { NativeHardwareBridgeError, clearMoldableUsbHalt, closeMoldableUsbDevice, forgetMoldableUsbDevice, getMoldableUsbDevices, openMoldableUsbDevice, readMoldableUsbControlTransfer, readMoldableUsbEndpoint, requestMoldableUsbDevice, resetMoldableUsbDevice, writeMoldableUsbControlTransfer, writeMoldableUsbEndpoint, } from '../../lib/native-hardware/index.js';
|
|
6
|
+
import { Button } from '../ui/button.js';
|
|
7
|
+
import { Input } from '../ui/input.js';
|
|
8
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../ui/select.js';
|
|
9
|
+
import { Spinner } from '../ui/spinner.js';
|
|
10
|
+
import { CapabilityBadge } from './capability-badge.js';
|
|
11
|
+
import { formatHexBytes, parseHexBytes, parseIntegerInput, } from './device-io-controls.js';
|
|
12
|
+
import { DeviceList, DeviceListEmpty, DeviceListItem } from './device-list.js';
|
|
13
|
+
import { HardwarePanel, HardwarePanelAction, HardwarePanelContent, HardwarePanelFooter, HardwarePanelHeader, HardwarePanelIcon, HardwarePanelTitle, } from './hardware-panel.js';
|
|
14
|
+
import { Readout, ReadoutItem } from './readout.js';
|
|
15
15
|
function toError(cause) {
|
|
16
16
|
return cause instanceof Error ? cause : new Error(String(cause));
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type NativeHardwareCapabilityDescriptor, type NativeHardwareCapabilityId, type NativeHardwareCapabilityManifest } from '../../lib/native-hardware';
|
|
1
|
+
import { type NativeHardwareCapabilityDescriptor, type NativeHardwareCapabilityId, type NativeHardwareCapabilityManifest } from '../../lib/native-hardware/index.js';
|
|
2
2
|
export type MoldableCapabilityStatus = 'checking' | 'supported' | 'partial' | 'unsupported' | 'unavailable';
|
|
3
3
|
/**
|
|
4
4
|
* Loads the native capability manifest once per page and shares it across all
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import { getMoldableNativeCapabilities, } from '../../lib/native-hardware';
|
|
3
|
+
import { getMoldableNativeCapabilities, } from '../../lib/native-hardware/index.js';
|
|
4
4
|
let manifestPromise = null;
|
|
5
5
|
/**
|
|
6
6
|
* Loads the native capability manifest once per page and shares it across all
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import React, { memo, useState } from 'react';
|
|
4
4
|
import ReactMarkdown from 'react-markdown';
|
|
5
|
-
import { cn } from '../lib/utils';
|
|
6
|
-
import { CodeBlock } from './code-block';
|
|
7
|
-
import { RichMediaPlayer } from './rich-media-player';
|
|
8
|
-
import { Button } from './ui/button';
|
|
9
|
-
import { Checkbox } from './ui/checkbox';
|
|
5
|
+
import { cn } from '../lib/utils.js';
|
|
6
|
+
import { CodeBlock } from './code-block.js';
|
|
7
|
+
import { RichMediaPlayer } from './rich-media-player.js';
|
|
8
|
+
import { Button } from './ui/button.js';
|
|
9
|
+
import { Checkbox } from './ui/checkbox.js';
|
|
10
10
|
import rehypeRaw from 'rehype-raw';
|
|
11
11
|
import remarkGfm from 'remark-gfm';
|
|
12
12
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableBluetoothConnection, type MoldableBluetoothDevice, type MoldableBluetoothRemoteGATTCharacteristic, type MoldableNativeBluetoothDevice } from '../../lib/native-capabilities';
|
|
2
|
+
import { type MoldableBluetoothConnection, type MoldableBluetoothDevice, type MoldableBluetoothRemoteGATTCharacteristic, type MoldableNativeBluetoothDevice } from '../../lib/native-capabilities/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>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bluetooth-panel.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/bluetooth-panel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,yCAAyC,EAG9C,KAAK,6BAA6B,EAQnC,MAAM,+BAA+B,CAAA;AAqBtC,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,OAAO,CAAA;AAgDX,MAAM,WAAW,mCAAmC;IAClD,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,wEAAwE;IACxE,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,0EAA0E;IAC1E,cAAc,EAAE,yCAAyC,GAAG,IAAI,CAAA;CACjE;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,mCAAmC,EAAE,CAAA;CACvD;AA+ED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,CAAC,EAAE,CACR,cAAc,EAAE,mCAAmC,EACnD,KAAK,EAAE,QAAQ,KACZ,IAAI,CAAA;CACV;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,2BAAgC;;;;;;;;;4BAkJlB,MAAM;;;2BAiDJ,mCAAmC;gCA0BnC,mCAAmC;kCAqCnC,mCAAmC;4BAqBxC,mCAAmC,SAC5C,YAAY;+BAmCH,mCAAmC,SAC5C,MAAM;;EAsClB;AAED,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACtE,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,CACR,cAAc,EAAE,mCAAmC,EACnD,KAAK,EAAE,QAAQ,KACZ,IAAI,CAAA;CACV;AAED;;;;GAIG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,WAAW,EACX,OAAO,EACP,GAAG,KAAK,EACT,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"bluetooth-panel.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/bluetooth-panel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,yCAAyC,EAG9C,KAAK,6BAA6B,EAQnC,MAAM,+BAA+B,CAAA;AAqBtC,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,OAAO,CAAA;AAgDX,MAAM,WAAW,mCAAmC;IAClD,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,wEAAwE;IACxE,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,0EAA0E;IAC1E,cAAc,EAAE,yCAAyC,GAAG,IAAI,CAAA;CACjE;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,mCAAmC,EAAE,CAAA;CACvD;AA+ED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,CAAC,EAAE,CACR,cAAc,EAAE,mCAAmC,EACnD,KAAK,EAAE,QAAQ,KACZ,IAAI,CAAA;CACV;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,2BAAgC;;;;;;;;;4BAkJlB,MAAM;;;2BAiDJ,mCAAmC;gCA0BnC,mCAAmC;kCAqCnC,mCAAmC;4BAqBxC,mCAAmC,SAC5C,YAAY;+BAmCH,mCAAmC,SAC5C,MAAM;;EAsClB;AAED,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACtE,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,CACR,cAAc,EAAE,mCAAmC,EACnD,KAAK,EAAE,QAAQ,KACZ,IAAI,CAAA;CACV;AAED;;;;GAIG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,WAAW,EACX,OAAO,EACP,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAmPrB;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -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 { NativeCapabilityBridgeError, connectMoldableBluetoothDevice, isMoldableBluetoothSupported, observeMoldableBluetoothNotifications, readMoldableBluetoothValue, requestMoldableBluetoothWithFallback, writeMoldableBluetoothValue, } from '../../lib/native-capabilities';
|
|
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 { LiveIndicator } from './live-indicator';
|
|
13
|
-
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel';
|
|
14
|
-
import { StreamLog, useStreamLog } from './stream-log';
|
|
5
|
+
import { NativeCapabilityBridgeError, connectMoldableBluetoothDevice, isMoldableBluetoothSupported, observeMoldableBluetoothNotifications, readMoldableBluetoothValue, requestMoldableBluetoothWithFallback, writeMoldableBluetoothValue, } from '../../lib/native-capabilities/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 { LiveIndicator } from './live-indicator.js';
|
|
13
|
+
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel.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) {
|
|
@@ -433,15 +433,15 @@ function BluetoothPanel({ className, serviceUuid, onValue, ...props }) {
|
|
|
433
433
|
const connected = bluetooth.status === 'connected';
|
|
434
434
|
const busy = bluetooth.status === 'requesting' || bluetooth.status === 'connecting';
|
|
435
435
|
const deviceName = bluetooth.device?.name || 'BLE device';
|
|
436
|
-
return (_jsxs(NativeCapabilityPanel, { "data-slot": "bluetooth-panel", "data-status": bluetooth.status, className: className, ...props, children: [_jsxs(NativeCapabilityPanelHeader, { children: [_jsx(NativeCapabilityPanelIcon, { children: _jsx(Bluetooth, {}) }), _jsx(NativeCapabilityPanelTitle, { children: "Bluetooth LE" }), _jsx(CapabilityBadge, { capability: "bluetooth" }), _jsx(NativeCapabilityPanelAction, { children: connected ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground inline-flex max-w-40 items-center
|
|
436
|
+
return (_jsxs(NativeCapabilityPanel, { "data-slot": "bluetooth-panel", "data-status": bluetooth.status, className: className, ...props, children: [_jsxs(NativeCapabilityPanelHeader, { children: [_jsx(NativeCapabilityPanelIcon, { children: _jsx(Bluetooth, {}) }), _jsx(NativeCapabilityPanelTitle, { children: "Bluetooth LE" }), _jsx(CapabilityBadge, { capability: "bluetooth" }), _jsx(NativeCapabilityPanelAction, { children: connected ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-muted-foreground rounded-pill text-11 inline-flex max-w-40 items-center border px-2 py-0.5 font-medium", children: _jsx("span", { className: "truncate", children: deviceName }) }), _jsx(LiveIndicator, {}), _jsxs(Button, { size: "sm", variant: "outline", disabled: bluetooth.disconnecting, onClick: () => void bluetooth.disconnect(), children: [bluetooth.disconnecting ? _jsx(Spinner, {}) : null, bluetooth.disconnecting ? 'Disconnecting…' : 'Disconnect'] })] })) : (_jsxs(_Fragment, { children: [_jsx(Input, { value: uuidInput, onChange: (event) => setUuidInput(event.target.value), onKeyDown: (event) => {
|
|
437
437
|
if (event.key === 'Enter' && !busy) {
|
|
438
438
|
void bluetooth.request(uuidInput);
|
|
439
439
|
}
|
|
440
|
-
}, placeholder: "Service UUID (optional)", "aria-label": "Service UUID", disabled: busy, className: "h-8 w-44 font-mono
|
|
440
|
+
}, placeholder: "Service UUID (optional)", "aria-label": "Service UUID", disabled: busy, className: "text-ui-caption md:text-ui-caption h-8 w-44 font-mono" }), _jsxs(Button, { size: "sm", disabled: busy, onClick: () => void bluetooth.request(uuidInput), children: [busy ? _jsx(Spinner, {}) : null, bluetooth.status === 'requesting'
|
|
441
441
|
? 'Scanning…'
|
|
442
442
|
: bluetooth.status === 'connecting'
|
|
443
443
|
? 'Connecting…'
|
|
444
|
-
: 'Scan'] })] })) })] }), _jsx(NativeCapabilityPanelContent, { children: connected ? (_jsxs("div", { className: "animate-in fade-in space-y-4 duration-300 motion-reduce:animate-none", children: [bluetooth.services.length === 0 ? (_jsx(DeviceList, { children: _jsx(DeviceListEmpty, { icon: _jsx(Bluetooth, {}), children: "No GATT services discovered" }) })) : (bluetooth.services.map((service) => (_jsxs("section", { "data-slot": "bluetooth-service", className: "space-y-1.5", children: [_jsx("div", { className: "text-muted-foreground font-mono
|
|
444
|
+
: 'Scan'] })] })) })] }), _jsx(NativeCapabilityPanelContent, { children: connected ? (_jsxs("div", { className: "animate-in fade-in space-y-4 duration-300 motion-reduce:animate-none", children: [bluetooth.services.length === 0 ? (_jsx(DeviceList, { children: _jsx(DeviceListEmpty, { icon: _jsx(Bluetooth, {}), children: "No GATT services discovered" }) })) : (bluetooth.services.map((service) => (_jsxs("section", { "data-slot": "bluetooth-service", className: "space-y-1.5", children: [_jsx("div", { className: "text-muted-foreground text-11 font-mono font-medium uppercase tracking-wider", children: middleTruncate(service.uuid) }), _jsx(DeviceList, { children: service.characteristics.length === 0 ? (_jsx(DeviceListEmpty, { children: "No characteristics" })) : (service.characteristics.map((characteristic) => {
|
|
445
445
|
const key = characteristicKey(characteristic);
|
|
446
446
|
const subscribed = bluetooth.subscribedUuids.includes(key);
|
|
447
447
|
const unknown = characteristic.properties.length === 0;
|
|
@@ -459,12 +459,12 @@ function BluetoothPanel({ className, serviceUuid, onValue, ...props }) {
|
|
|
459
459
|
if (event.key === 'Enter') {
|
|
460
460
|
void bluetooth.writeHex(characteristic, writeValues[key] ?? '');
|
|
461
461
|
}
|
|
462
|
-
}, placeholder: "01 A0 FF", "aria-label": `Hex value for ${shortUuid(characteristic.uuid)}`, className: "h-7 w-24 font-mono
|
|
462
|
+
}, placeholder: "01 A0 FF", "aria-label": `Hex value for ${shortUuid(characteristic.uuid)}`, className: "text-ui-caption md:text-ui-caption h-7 w-24 font-mono" }), _jsx(Button, { variant: "ghost", size: "xs", onClick: () => void bluetooth.writeHex(characteristic, writeValues[key] ?? ''), children: "Write" })] })) : null, canRead ? (_jsx(Button, { variant: "ghost", size: "xs", onClick: () => void bluetooth.read(characteristic), children: "Read" })) : null, canNotify ? (_jsx(Button, { variant: "outline", size: "xs", onClick: () => void (subscribed
|
|
463
463
|
? bluetooth.unsubscribe(characteristic)
|
|
464
464
|
: bluetooth.subscribe(characteristic)), children: subscribed ? 'Stop' : 'Notify' })) : null] }) }, key));
|
|
465
|
-
})) })] }, service.uuid)))), bluetooth.error ? (_jsx("p", { className: "text-status-error text-
|
|
465
|
+
})) })] }, service.uuid)))), bluetooth.error ? (_jsx("p", { className: "text-status-error text-ui-caption", children: bluetooth.error.message })) : null, _jsx(StreamLog, { entries: bluetooth.entries, maxHeight: 200, emptyLabel: "Waiting for characteristic data" })] })) : (_jsx("div", { className: "animate-in fade-in flex flex-col items-center gap-3 py-6 text-center duration-300 motion-reduce:animate-none", children: busy ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { className: "text-muted-foreground" }), _jsx("p", { className: "text-muted-foreground text-ui-caption", children: bluetooth.status === 'requesting'
|
|
466
466
|
? 'Waiting for the device chooser…'
|
|
467
|
-
: 'Connecting to device…' })] })) : bluetooth.status === 'error' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-
|
|
468
|
-
'The Bluetooth request could not complete.' })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground bg-background shadow-xs flex size-10 items-center justify-center
|
|
467
|
+
: 'Connecting to device…' })] })) : bluetooth.status === 'error' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-ui-body font-medium", children: "Bluetooth request failed" }), _jsx("p", { className: "text-muted-foreground text-ui-caption max-w-64", children: bluetooth.error?.message ??
|
|
468
|
+
'The Bluetooth request could not complete.' })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground bg-background shadow-xs rounded-container flex size-10 items-center justify-center border [&_svg]:size-5", children: _jsx(Bluetooth, {}) }), _jsx("p", { className: "text-ui-body font-medium", children: "Not connected" }), _jsx("p", { className: "text-muted-foreground text-ui-caption", children: "Scan for a nearby BLE device." })] })) })) })] }));
|
|
469
469
|
}
|
|
470
470
|
export { BluetoothPanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera-preview.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/camera-preview.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAsB9B,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,UAAU,GACV,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,CAAA;AAEX,MAAM,WAAW,wBAAwB;IACvC,gEAAgE;IAChE,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CACtD;AAuBD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B;;;;;;2BA+C9C,MAAM;;uBA2EvB,MAAM;;EA2Bd;AAED,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACrE,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iCAAiC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,mEAAmE;IACnE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IACjC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CACtD;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,WAAW,EACX,QAAe,EACf,SAAiB,EACjB,UAAU,EACV,cAAc,EACd,GAAG,KAAK,EACT,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"camera-preview.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/camera-preview.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAsB9B,MAAM,MAAM,oBAAoB,GAC5B,MAAM,GACN,UAAU,GACV,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,CAAA;AAEX,MAAM,WAAW,wBAAwB;IACvC,gEAAgE;IAChE,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CACtD;AAuBD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B;;;;;;2BA+C9C,MAAM;;uBA2EvB,MAAM;;EA2Bd;AAED,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACrE,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iCAAiC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,mEAAmE;IACnE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IACjC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CACtD;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,WAAW,EACX,QAAe,EACf,SAAiB,EACjB,UAAU,EACV,cAAc,EACd,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAqMpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -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 { NativeCapabilityBridgeError, enumerateMoldableMediaDevices, getMoldableCameraStream, getMoldableMediaPermissionStatus, requestMoldableMediaPermission, stopMoldableMediaStream, } from '../../lib/native-capabilities';
|
|
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 { NativeCapabilityBridgeError, enumerateMoldableMediaDevices, getMoldableCameraStream, getMoldableMediaPermissionStatus, requestMoldableMediaPermission, stopMoldableMediaStream, } from '../../lib/native-capabilities/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 NativeCapabilityBridgeError) {
|
|
13
13
|
return error.code === 'permission_denied';
|
|
@@ -222,7 +222,7 @@ function CameraPreview({ className, constraints, mirrored = true, autoStart = fa
|
|
|
222
222
|
const settings = active
|
|
223
223
|
? camera.stream?.getVideoTracks()[0]?.getSettings()
|
|
224
224
|
: undefined;
|
|
225
|
-
return (_jsxs("div", { "data-slot": "camera-preview", "data-status": camera.status, className: cn('group relative isolate aspect-video w-full overflow-hidden
|
|
225
|
+
return (_jsxs("div", { "data-slot": "camera-preview", "data-status": camera.status, className: cn('rounded-container group relative isolate aspect-video w-full overflow-hidden border', active ? 'bg-black' : 'bg-muted/30', className), ...props, children: [_jsx("video", { ref: videoRef, muted: true, playsInline: true, className: cn('absolute inset-0 size-full object-cover', mirrored && '-scale-x-100', !active && 'invisible') }), _jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 z-30 bg-white transition-opacity duration-150", style: { opacity: flash ? 0.9 : 0 } }), active ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute left-3 top-3 z-20", children: _jsx(LiveIndicator, { variant: "rec", label: camera.status === 'muted' ? 'Paused' : 'Live' }) }), settings?.width && settings.height ? (_jsxs("div", { className: "rounded-pill text-11 absolute right-3 top-3 z-20 border border-white/15 bg-black/60 px-2 py-0.5 font-mono tabular-nums text-white/90 backdrop-blur-sm", children: [settings.width, "\u00D7", settings.height] })) : null, _jsxs("div", { className: "absolute inset-x-0 bottom-0 z-20 flex items-end justify-between gap-3 bg-gradient-to-t from-black/70 via-black/25 to-transparent p-3 pt-10 opacity-0 transition-opacity duration-200 focus-within:opacity-100 group-hover:opacity-100", children: [_jsx("div", { className: "min-w-0", children: camera.devices.length > 1 ? (_jsxs(Select, { value: camera.deviceId ?? undefined, onValueChange: camera.selectDevice, children: [_jsx(SelectTrigger, { size: "sm", className: "text-ui-caption h-7 w-auto max-w-56 border-white/15 bg-white/10 text-white backdrop-blur-md hover:bg-white/15 [&_svg]:text-white/70", children: _jsx(SelectValue, { placeholder: "Camera" }) }), _jsx(SelectContent, { children: camera.devices.map((device, index) => (_jsx(SelectItem, { value: device.deviceId, children: device.label || `Camera ${index + 1}` }, device.deviceId))) })] })) : null }), _jsxs("div", { className: "flex items-center gap-2", children: [onSnapshot ? (_jsx("button", { type: "button", onClick: capture, "aria-label": "Take snapshot", className: "rounded-pill size-9 border-2 border-white/40 bg-white shadow-md transition-transform duration-150 hover:scale-105 active:scale-95 motion-reduce:transition-none" })) : null, _jsx(Button, { variant: "secondary", size: "icon-sm", "aria-label": "Stop camera", onClick: camera.stop, className: "border border-white/15 bg-white/10 text-white backdrop-blur-md hover:bg-white/20", children: _jsx(Square, { className: "fill-current" }) })] })] })] })) : (_jsx("div", { className: "animate-in fade-in absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 p-6 text-center duration-300 motion-reduce:animate-none", children: camera.status === 'starting' ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { className: "text-muted-foreground" }), _jsx("p", { className: "text-muted-foreground text-ui-caption", children: "Starting camera\u2026" })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground bg-background shadow-xs rounded-container flex size-10 items-center justify-center border [&_svg]:size-5", children: camera.status === 'idle' ? _jsx(Camera, {}) : _jsx(CameraOff, {}) }), camera.status === 'idle' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-muted-foreground text-ui-body", children: "Camera is off" }), _jsxs(Button, { size: "sm", onClick: () => void camera.start(), children: [_jsx(Camera, {}), " Start camera"] })] })) : camera.status === 'denied' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-ui-body font-medium", children: "Camera access denied" }), _jsx("p", { className: "text-muted-foreground text-ui-caption max-w-64", children: "Enable camera access for Moldable in System Settings, then try again." }), _jsxs(Button, { size: "sm", variant: "outline", onClick: () => void camera.start(), children: [_jsx(RefreshCw, {}), " Try again"] })] })) : (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-ui-body font-medium", children: "Camera unavailable" }), _jsx("p", { className: "text-muted-foreground text-ui-caption max-w-64", children: camera.error?.message ??
|
|
226
226
|
'The camera could not be started.' }), _jsxs(Button, { size: "sm", variant: "outline", onClick: () => void camera.start(), children: [_jsx(RefreshCw, {}), " Try again"] })] }))] })) }))] }));
|
|
227
227
|
}
|
|
228
228
|
export { CameraPreview };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { NativeCapabilityId } from '../../lib/native-capabilities';
|
|
3
|
-
import { type MoldableCapabilityStatus } from './use-capability';
|
|
2
|
+
import type { NativeCapabilityId } from '../../lib/native-capabilities/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',
|
|
@@ -17,10 +17,10 @@ const STATUS_DOT = {
|
|
|
17
17
|
unavailable: 'bg-status-stopped',
|
|
18
18
|
};
|
|
19
19
|
function CapabilityDot({ status, className, ...props }) {
|
|
20
|
-
return (_jsx("span", { "data-slot": "capability-dot", "data-status": status, "aria-hidden": true, className: cn('size-1.5 shrink-0
|
|
20
|
+
return (_jsx("span", { "data-slot": "capability-dot", "data-status": status, "aria-hidden": true, className: cn('rounded-pill size-1.5 shrink-0', STATUS_DOT[status], className), ...props }));
|
|
21
21
|
}
|
|
22
22
|
function CapabilityBadgeBase({ status, label, className, ...props }) {
|
|
23
|
-
return (_jsxs("span", { "data-slot": "capability-badge", "data-status": status, className: cn('text-muted-foreground inline-flex w-fit shrink-0 items-center gap-1.5 whitespace-nowrap
|
|
23
|
+
return (_jsxs("span", { "data-slot": "capability-badge", "data-status": status, className: cn('text-muted-foreground rounded-pill text-11 inline-flex w-fit shrink-0 items-center gap-1.5 whitespace-nowrap border px-2 py-0.5 font-medium', className), ...props, children: [_jsx(CapabilityDot, { status: status }), label ?? STATUS_LABEL[status]] }));
|
|
24
24
|
}
|
|
25
25
|
function ManagedCapabilityBadge({ capability, ...props }) {
|
|
26
26
|
const { status } = useMoldableCapability(capability);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type NativeCapabilityId } from '../../lib/native-capabilities';
|
|
2
|
+
import { type NativeCapabilityId } from '../../lib/native-capabilities/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?: NativeCapabilityId[];
|
|
@@ -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_CAPABILITY_IDS, } from '../../lib/native-capabilities';
|
|
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_CAPABILITY_IDS, } from '../../lib/native-capabilities/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,
|
|
@@ -91,7 +91,7 @@ function CapabilityMatrix({ capabilities, className, ...props }) {
|
|
|
91
91
|
: descriptor
|
|
92
92
|
? descriptor.support
|
|
93
93
|
: 'unavailable';
|
|
94
|
-
return (_jsx("div", { "data-slot": "capability-matrix-cell", "data-capability": id, "data-status": status, className: "animate-in fade-in slide-in-from-bottom-1 bg-card rounded-
|
|
95
|
-
}), unavailable ? (_jsx("p", { "data-slot": "capability-matrix-note", className: "text-muted-foreground/70 col-span-full text-center
|
|
94
|
+
return (_jsx("div", { "data-slot": "capability-matrix-cell", "data-capability": id, "data-status": status, className: "animate-in fade-in slide-in-from-bottom-1 bg-card rounded-container border p-3 duration-300 [animation-fill-mode:backwards] motion-reduce:animate-none", style: { animationDelay: `${index * 25}ms` }, children: checking ? (_jsxs("div", { className: "space-y-2", children: [_jsx(Skeleton, { className: "h-3.5 w-2/3" }), _jsx(Skeleton, { className: "h-3 w-1/2" })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(Icon, { className: "text-muted-foreground size-3.5 shrink-0" }), _jsx("span", { className: "text-ui-caption truncate font-medium", children: humanizeCapabilityId(id) }), _jsx(CapabilityDot, { status: status, className: "ml-auto" })] }), _jsxs("div", { className: "mt-1.5 flex items-center justify-between gap-2", children: [_jsx("span", { className: "text-muted-foreground text-11", children: SUPPORT_LABEL[status] }), descriptor ? (_jsx("span", { className: "text-muted-foreground/70 text-11 truncate font-mono", children: descriptor.transport.name })) : null] })] })) }, id));
|
|
95
|
+
}), unavailable ? (_jsx("p", { "data-slot": "capability-matrix-note", className: "text-muted-foreground/70 text-ui-caption col-span-full text-center", children: "Native capabilities require the Moldable desktop app." })) : null] }));
|
|
96
96
|
}
|
|
97
97
|
export { CapabilityMatrix };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button } from '../ui/button';
|
|
2
|
+
import { Button } from '../ui/button.js';
|
|
3
3
|
/**
|
|
4
4
|
* Clipboard state machine behind `ClipboardCopyButton`. The shared helpers
|
|
5
5
|
* enforce app access when embedded and use the plain web Clipboard API only
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Check, Copy } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { readMoldableClipboardText, writeMoldableClipboardText, } from '../../lib/native-capabilities';
|
|
6
|
-
import { Button } from '../ui/button';
|
|
5
|
+
import { readMoldableClipboardText, writeMoldableClipboardText, } from '../../lib/native-capabilities/index.js';
|
|
6
|
+
import { Button } from '../ui/button.js';
|
|
7
7
|
/**
|
|
8
8
|
* Clipboard state machine behind `ClipboardCopyButton`. The shared helpers
|
|
9
9
|
* enforce app access when embedded and use the plain web Clipboard API only
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from '../../lib/utils';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
4
|
function DeviceList({ className, ...props }) {
|
|
5
|
-
return (_jsx("div", { "data-slot": "device-list", role: "list", className: cn('divide-border divide-y overflow-hidden
|
|
5
|
+
return (_jsx("div", { "data-slot": "device-list", role: "list", className: cn('divide-border rounded-container divide-y overflow-hidden border', className), ...props }));
|
|
6
6
|
}
|
|
7
7
|
function DeviceListItem({ icon, name, description, connected = false, action, className, children, ...props }) {
|
|
8
8
|
return (_jsxs("div", { "data-slot": "device-list-item", role: "listitem", className: cn('animate-in fade-in slide-in-from-bottom-1 flex items-center gap-3 px-3 py-2.5 duration-300 motion-reduce:animate-none', props.onClick &&
|
|
9
|
-
'hover:bg-muted/50 focus-visible:bg-muted/50 cursor-pointer outline-none transition-colors', className), ...props, children: [icon ? (_jsx("div", { "data-slot": "device-list-item-icon", className: "text-muted-foreground bg-muted/50 flex size-8 shrink-0 items-center justify-center
|
|
9
|
+
'hover:bg-muted/50 focus-visible:bg-muted/50 cursor-pointer outline-none transition-colors', className), ...props, children: [icon ? (_jsx("div", { "data-slot": "device-list-item-icon", className: "text-muted-foreground bg-muted/50 rounded-control flex size-8 shrink-0 items-center justify-center border [&_svg:not([class*='size-'])]:size-4", children: icon })) : null, _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { "data-slot": "device-list-item-name", className: "text-ui-body truncate font-medium", children: name }), connected ? (_jsxs("span", { "data-slot": "device-list-item-connected", className: "text-status-running text-11 inline-flex shrink-0 items-center gap-1 font-medium uppercase tracking-wide", children: [_jsx("span", { className: "bg-status-running rounded-pill size-1.5" }), "Connected"] })) : null] }), description ? (_jsx("div", { "data-slot": "device-list-item-description", className: "text-muted-foreground text-ui-caption mt-0.5 truncate font-mono", children: description })) : null, children] }), action ? (_jsx("div", { "data-slot": "device-list-item-action", className: "flex shrink-0 items-center gap-1.5", children: action })) : null] }));
|
|
10
10
|
}
|
|
11
11
|
function DeviceListEmpty({ icon, className, children, ...props }) {
|
|
12
|
-
return (_jsxs("div", { "data-slot": "device-list-empty", className: cn('text-muted-foreground flex flex-col items-center gap-2 px-4 py-8 text-center
|
|
12
|
+
return (_jsxs("div", { "data-slot": "device-list-empty", className: cn('text-muted-foreground text-ui-body flex flex-col items-center gap-2 px-4 py-8 text-center', className), ...props, children: [icon ? (_jsx("div", { className: "opacity-60 [&_svg:not([class*='size-'])]:size-5", children: icon })) : null, children] }));
|
|
13
13
|
}
|
|
14
14
|
export { DeviceList, DeviceListItem, DeviceListEmpty };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableDisplay } from '../../lib/native-capabilities';
|
|
2
|
+
import { type MoldableDisplay } from '../../lib/native-capabilities/index.js';
|
|
3
3
|
export type MoldableDisplaysStatus = 'loading' | 'ready' | 'unavailable';
|
|
4
4
|
/**
|
|
5
5
|
* Display arrangement state behind `DisplayMap`. One-shot query by design —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-map.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/display-map.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,+BAA+B,CAAA;AAgBtC,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAA;AAExE;;;GAGG;AACH,wBAAgB,mBAAmB;;;;;EAiClC;AAgCD,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAClE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAA;CAC5D;AAED;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"display-map.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/display-map.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,+BAA+B,CAAA;AAgBtC,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAA;AAExE;;;GAGG;AACH,wBAAgB,mBAAmB;;;;;EAiClC;AAgCD,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAClE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAA;CAC5D;AAED;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CA6K5E;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Monitor, RefreshCw } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { getMoldableDisplays, } from '../../lib/native-capabilities';
|
|
6
|
-
import { cn } from '../../lib/utils';
|
|
7
|
-
import { Button } from '../ui/button';
|
|
8
|
-
import { Spinner } from '../ui/spinner';
|
|
9
|
-
import { CapabilityBadge } from './capability-badge';
|
|
10
|
-
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelFooter, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel';
|
|
11
|
-
import { Readout, ReadoutItem } from './readout';
|
|
5
|
+
import { getMoldableDisplays, } from '../../lib/native-capabilities/index.js';
|
|
6
|
+
import { cn } from '../../lib/utils.js';
|
|
7
|
+
import { Button } from '../ui/button.js';
|
|
8
|
+
import { Spinner } from '../ui/spinner.js';
|
|
9
|
+
import { CapabilityBadge } from './capability-badge.js';
|
|
10
|
+
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelFooter, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel.js';
|
|
11
|
+
import { Readout, ReadoutItem } from './readout.js';
|
|
12
12
|
/**
|
|
13
13
|
* Display arrangement state behind `DisplayMap`. One-shot query by design —
|
|
14
14
|
* the host does not expose display change events.
|
|
@@ -94,12 +94,12 @@ function DisplayMap({ className, onSelectDisplay, ...props }) {
|
|
|
94
94
|
return (_jsxs(NativeCapabilityPanel, { "data-slot": "display-map", "data-status": status, className: className, ...props, children: [_jsxs(NativeCapabilityPanelHeader, { children: [_jsx(NativeCapabilityPanelIcon, { children: _jsx(Monitor, {}) }), _jsx(NativeCapabilityPanelTitle, { children: "Displays" }), _jsx(CapabilityBadge, { capability: "displays" }), _jsx(NativeCapabilityPanelAction, { children: _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Refresh displays", onClick: () => {
|
|
95
95
|
setSelected(null);
|
|
96
96
|
refresh();
|
|
97
|
-
}, children: _jsx(RefreshCw, {}) }) })] }), _jsx(NativeCapabilityPanelContent, { children: status === 'ready' && displays.length > 0 ? (_jsxs("div", { className: "animate-in fade-in space-y-4 duration-300 motion-reduce:animate-none", children: [_jsx("div", { className: "bg-muted/20 flex justify-center overflow-hidden
|
|
97
|
+
}, children: _jsx(RefreshCw, {}) }) })] }), _jsx(NativeCapabilityPanelContent, { children: status === 'ready' && displays.length > 0 ? (_jsxs("div", { className: "animate-in fade-in space-y-4 duration-300 motion-reduce:animate-none", children: [_jsx("div", { className: "bg-muted/20 rounded-container flex justify-center overflow-hidden border p-4", children: _jsx("div", { "data-slot": "display-map-canvas", className: "relative", style: {
|
|
98
98
|
aspectRatio: `${bounds.width} / ${bounds.height}`,
|
|
99
99
|
width: `min(100%, ${mapWidth}px)`,
|
|
100
100
|
}, children: displays.map((display, index) => {
|
|
101
101
|
const isSelected = index === selectedIndex;
|
|
102
|
-
return (_jsxs("button", { type: "button", "data-slot": "display-map-display", "data-primary": display.primary || undefined, "data-selected": isSelected || undefined, "aria-label": `Select ${displayName(display, index)}`, onClick: () => select(index), onMouseEnter: () => select(index), onFocus: () => select(index), className: cn('animate-in fade-in zoom-in-95 absolute flex flex-col items-start justify-end gap-0.5 overflow-hidden
|
|
102
|
+
return (_jsxs("button", { type: "button", "data-slot": "display-map-display", "data-primary": display.primary || undefined, "data-selected": isSelected || undefined, "aria-label": `Select ${displayName(display, index)}`, onClick: () => select(index), onMouseEnter: () => select(index), onFocus: () => select(index), className: cn('animate-in fade-in zoom-in-95 rounded-control absolute flex flex-col items-start justify-end gap-0.5 overflow-hidden border p-1.5 text-left duration-300 motion-reduce:animate-none', isSelected
|
|
103
103
|
? 'bg-primary/10 border-primary'
|
|
104
104
|
: 'bg-muted/40 hover:bg-muted/70', !isSelected && display.primary && 'border-primary'), style: {
|
|
105
105
|
left: `${((display.position.x - bounds.minX) / bounds.width) * 100}%`,
|
|
@@ -108,7 +108,7 @@ function DisplayMap({ className, onSelectDisplay, ...props }) {
|
|
|
108
108
|
height: `${(display.size.height / bounds.height) * 100}%`,
|
|
109
109
|
animationDelay: `${index * 75}ms`,
|
|
110
110
|
animationFillMode: 'backwards',
|
|
111
|
-
}, children: [display.primary ? (_jsx("span", { className: "border-primary/40 bg-primary/10 text-primary absolute right-1 top-1
|
|
112
|
-
}) }) }), selectedDisplay ? (_jsxs(Readout, { className: "grid-cols-2 sm:grid-cols-4", children: [_jsx(ReadoutItem, { label: "Name", value: displayName(selectedDisplay, selectedIndex ?? 0) }), _jsx(ReadoutItem, { label: "Resolution", value: `${selectedDisplay.size.width}×${selectedDisplay.size.height}` }), _jsx(ReadoutItem, { label: "Position", value: `${selectedDisplay.position.x}, ${selectedDisplay.position.y}` }), _jsx(ReadoutItem, { label: "Scale factor", value: `${selectedDisplay.scaleFactor}×` })] })) : null] })) : (_jsx("div", { className: "animate-in fade-in flex flex-col items-center gap-3 py-6 text-center duration-300 motion-reduce:animate-none", children: status === 'loading' ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { className: "text-muted-foreground" }), _jsx("p", { className: "text-muted-foreground text-
|
|
111
|
+
}, children: [display.primary ? (_jsx("span", { className: "border-primary/40 bg-primary/10 text-primary rounded-pill text-11 absolute right-1 top-1 border px-1 py-px font-medium leading-none", children: "Primary" })) : null, _jsx("span", { className: "text-11 w-full truncate font-medium leading-tight", children: displayName(display, index) }), _jsxs("span", { className: "text-muted-foreground text-11 font-mono tabular-nums leading-none", children: [display.size.width, "\u00D7", display.size.height] })] }, `${display.position.x},${display.position.y},${index}`));
|
|
112
|
+
}) }) }), selectedDisplay ? (_jsxs(Readout, { className: "grid-cols-2 sm:grid-cols-4", children: [_jsx(ReadoutItem, { label: "Name", value: displayName(selectedDisplay, selectedIndex ?? 0) }), _jsx(ReadoutItem, { label: "Resolution", value: `${selectedDisplay.size.width}×${selectedDisplay.size.height}` }), _jsx(ReadoutItem, { label: "Position", value: `${selectedDisplay.position.x}, ${selectedDisplay.position.y}` }), _jsx(ReadoutItem, { label: "Scale factor", value: `${selectedDisplay.scaleFactor}×` })] })) : null] })) : (_jsx("div", { className: "animate-in fade-in flex flex-col items-center gap-3 py-6 text-center duration-300 motion-reduce:animate-none", children: status === 'loading' ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { className: "text-muted-foreground" }), _jsx("p", { className: "text-muted-foreground text-ui-caption", children: "Reading display arrangement\u2026" })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground bg-background shadow-xs rounded-container flex size-10 items-center justify-center border [&_svg]:size-5", children: _jsx(Monitor, {}) }), status === 'unavailable' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-ui-body font-medium", children: "Displays unavailable" }), _jsx("p", { className: "text-muted-foreground text-ui-caption max-w-64", children: "Display metadata is only available inside Moldable." })] })) : (_jsx("p", { className: "text-muted-foreground text-ui-caption", children: "No displays reported" }))] })) })) }), _jsx(NativeCapabilityPanelFooter, { children: _jsxs("span", { className: "truncate", children: [displays.length, " ", displays.length === 1 ? 'display' : 'displays'] }) })] }));
|
|
113
113
|
}
|
|
114
114
|
export { DisplayMap };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableHapticAvailability, type MoldableHapticPattern } from '../../lib/native-capabilities';
|
|
3
|
-
import { Button } from '../ui/button';
|
|
2
|
+
import { type MoldableHapticAvailability, type MoldableHapticPattern } from '../../lib/native-capabilities/index.js';
|
|
3
|
+
import { Button } from '../ui/button.js';
|
|
4
4
|
/**
|
|
5
5
|
* Haptic feedback state behind `HapticButton`. `perform` never throws — it
|
|
6
6
|
* resolves `false` when the host rejects or is unavailable.
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Vibrate } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { getMoldableHapticAvailability, performMoldableHapticFeedback, } from '../../lib/native-capabilities';
|
|
6
|
-
import { cn } from '../../lib/utils';
|
|
7
|
-
import { Button } from '../ui/button';
|
|
5
|
+
import { getMoldableHapticAvailability, performMoldableHapticFeedback, } from '../../lib/native-capabilities/index.js';
|
|
6
|
+
import { cn } from '../../lib/utils.js';
|
|
7
|
+
import { Button } from '../ui/button.js';
|
|
8
8
|
const EMPTY_PATTERNS = [];
|
|
9
9
|
/**
|
|
10
10
|
* Haptic feedback state behind `HapticButton`. `perform` never throws — it
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableHidDevice, type MoldableHidDeviceFilter, type MoldableHidInputReportEvent } from '../../lib/native-capabilities';
|
|
2
|
+
import { type MoldableHidDevice, type MoldableHidDeviceFilter, type MoldableHidInputReportEvent } from '../../lib/native-capabilities/index.js';
|
|
3
3
|
export type MoldableHidStatus = 'idle' | 'requesting' | 'error';
|
|
4
4
|
export interface UseMoldableHidOptions {
|
|
5
5
|
onInputReport?: (event: MoldableHidInputReportEvent) => void;
|
|
@@ -14,7 +14,7 @@ export declare function useMoldableHid(options?: UseMoldableHidOptions): {
|
|
|
14
14
|
status: MoldableHidStatus;
|
|
15
15
|
error: Error | null;
|
|
16
16
|
openIds: string[];
|
|
17
|
-
entries: import("./stream-log").StreamLogEntry[];
|
|
17
|
+
entries: import("./stream-log.js").StreamLogEntry[];
|
|
18
18
|
deviceId: (device: MoldableHidDevice) => string;
|
|
19
19
|
refresh: () => Promise<void>;
|
|
20
20
|
request: (filters?: readonly MoldableHidDeviceFilter[]) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hid-panel.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/hid-panel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAWjC,MAAM,+BAA+B,CAAA;AAsBtC,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,CAAA;AA0D/D,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAA;CAC7D;AAOD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B;;;;;;uBAe1B,iBAAiB,KAAG,MAAM;;wBAyC9C,SAAS,uBAAuB,EAAE;mBA4BnC,iBAAiB;oBA+CjB,iBAAiB;yBAoBjB,iBAAiB,YAAY,MAAM,QAAQ,YAAY;gCAuBvD,iBAAiB,YAAY,MAAM,QAAQ,YAAY;mCAuBvD,iBAAiB,YAAY,MAAM;qBAsBnC,iBAAiB;;EAoDnC;AAED,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACtE,qEAAqE;IACrE,OAAO,CAAC,EAAE,SAAS,uBAAuB,EAAE,CAAA;IAC5C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAA;CAC7D;AAyGD;;;GAGG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,OAAO,EACP,aAAa,EACb,GAAG,KAAK,EACT,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"hid-panel.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/hid-panel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAWjC,MAAM,+BAA+B,CAAA;AAsBtC,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,CAAA;AA0D/D,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAA;CAC7D;AAOD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B;;;;;;uBAe1B,iBAAiB,KAAG,MAAM;;wBAyC9C,SAAS,uBAAuB,EAAE;mBA4BnC,iBAAiB;oBA+CjB,iBAAiB;yBAoBjB,iBAAiB,YAAY,MAAM,QAAQ,YAAY;gCAuBvD,iBAAiB,YAAY,MAAM,QAAQ,YAAY;mCAuBvD,iBAAiB,YAAY,MAAM;qBAsBnC,iBAAiB;;EAoDnC;AAED,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACtE,qEAAqE;IACrE,OAAO,CAAC,EAAE,SAAS,uBAAuB,EAAE,CAAA;IAC5C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAA;CAC7D;AAyGD;;;GAGG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,OAAO,EACP,aAAa,EACb,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAkHrB;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|