@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
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Gamepad2, RefreshCw, Trash2 } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { NativeCapabilityBridgeError, closeMoldableHidDevice, forgetMoldableHidDevice, getMoldableHidDevices, listenForMoldableHidInputReports, openMoldableHidDevice, receiveMoldableHidFeatureReport, requestMoldableHidDevices, sendMoldableHidFeatureReport, sendMoldableHidReport, } from '../../lib/native-capabilities';
|
|
6
|
-
import { Button } from '../ui/button';
|
|
7
|
-
import { Input } from '../ui/input';
|
|
8
|
-
import { Spinner } from '../ui/spinner';
|
|
9
|
-
import { CapabilityBadge } from './capability-badge';
|
|
10
|
-
import { formatHexBytes, parseHexBytes, parseIntegerInput, } from './device-io-controls';
|
|
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, closeMoldableHidDevice, forgetMoldableHidDevice, getMoldableHidDevices, listenForMoldableHidInputReports, openMoldableHidDevice, receiveMoldableHidFeatureReport, requestMoldableHidDevices, sendMoldableHidFeatureReport, sendMoldableHidReport, } 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 { CapabilityBadge } from './capability-badge.js';
|
|
10
|
+
import { formatHexBytes, parseHexBytes, parseIntegerInput, } from './device-io-controls.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
|
function toError(cause) {
|
|
17
17
|
return cause instanceof Error ? cause : new Error(String(cause));
|
|
@@ -333,7 +333,7 @@ function HidReportControls({ device, hid }) {
|
|
|
333
333
|
setBusy(false);
|
|
334
334
|
}
|
|
335
335
|
};
|
|
336
|
-
return (_jsxs("div", { "data-slot": "hid-report-controls", className: "bg-muted/30 mt-2 space-y-2
|
|
336
|
+
return (_jsxs("div", { "data-slot": "hid-report-controls", className: "bg-muted/30 rounded-control mt-2 space-y-2 border p-2.5", children: [_jsxs("div", { className: "grid gap-2 sm:grid-cols-[8rem_1fr]", children: [_jsx(Input, { "aria-label": "HID report ID", value: reportId, onChange: (event) => setReportId(event.target.value), placeholder: "Report ID", className: "text-ui-caption h-8 font-mono" }), _jsx(Input, { "aria-label": "HID report payload", value: payload, onChange: (event) => setPayload(event.target.value), placeholder: "Hex payload, for example 01 A0 FF", className: "text-ui-caption h-8 font-mono" })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [_jsx(Button, { size: "xs", variant: "outline", disabled: busy, onClick: () => void run(async () => {
|
|
337
337
|
const id = parsedReportId();
|
|
338
338
|
const data = parseHexBytes(payload);
|
|
339
339
|
const sent = await hid.sendReport(device, id, data);
|
|
@@ -353,7 +353,7 @@ function HidReportControls({ device, hid }) {
|
|
|
353
353
|
return data
|
|
354
354
|
? `Feature IN ${id} · ${formatHexBytes(data)}`
|
|
355
355
|
: `Feature IN ${id} failed`;
|
|
356
|
-
}), children: "Feature IN" }), _jsx("span", { className: "text-muted-foreground ml-auto truncate font-mono
|
|
356
|
+
}), children: "Feature IN" }), _jsx("span", { className: "text-muted-foreground text-11 ml-auto truncate font-mono", children: busy ? 'Working…' : result })] })] }));
|
|
357
357
|
}
|
|
358
358
|
/**
|
|
359
359
|
* HID device panel: chooser access, granted-device list with open/close, and
|
|
@@ -363,11 +363,11 @@ function HidDevicePanel({ className, filters, onInputReport, ...props }) {
|
|
|
363
363
|
const hid = useMoldableHid({ onInputReport });
|
|
364
364
|
const requesting = hid.status === 'requesting';
|
|
365
365
|
const anyOpen = hid.openIds.length > 0;
|
|
366
|
-
return (_jsxs(NativeCapabilityPanel, { "data-slot": "hid-device-panel", "data-status": hid.status, className: className, ...props, children: [_jsxs(NativeCapabilityPanelHeader, { children: [_jsx(NativeCapabilityPanelIcon, { children: _jsx(Gamepad2, {}) }), _jsx(NativeCapabilityPanelTitle, { children: "HID" }), _jsx(CapabilityBadge, { capability: "hid" }), _jsxs(NativeCapabilityPanelAction, { children: [_jsxs(Button, { size: "sm", disabled: requesting, onClick: () => void hid.request(filters), children: [requesting ? _jsx(Spinner, {}) : null, requesting ? 'Requesting…' : 'Request device'] }), _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Refresh devices", onClick: () => void hid.refresh(), children: _jsx(RefreshCw, {}) })] })] }), _jsxs(NativeCapabilityPanelContent, { className: "space-y-4", children: [_jsx(DeviceList, { children: hid.devices.length === 0 ? (_jsxs(DeviceListEmpty, { icon: _jsx(Gamepad2, {}), children: [_jsx("p", { className: "text-foreground text-
|
|
366
|
+
return (_jsxs(NativeCapabilityPanel, { "data-slot": "hid-device-panel", "data-status": hid.status, className: className, ...props, children: [_jsxs(NativeCapabilityPanelHeader, { children: [_jsx(NativeCapabilityPanelIcon, { children: _jsx(Gamepad2, {}) }), _jsx(NativeCapabilityPanelTitle, { children: "HID" }), _jsx(CapabilityBadge, { capability: "hid" }), _jsxs(NativeCapabilityPanelAction, { children: [_jsxs(Button, { size: "sm", disabled: requesting, onClick: () => void hid.request(filters), children: [requesting ? _jsx(Spinner, {}) : null, requesting ? 'Requesting…' : 'Request device'] }), _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Refresh devices", onClick: () => void hid.refresh(), children: _jsx(RefreshCw, {}) })] })] }), _jsxs(NativeCapabilityPanelContent, { className: "space-y-4", children: [_jsx(DeviceList, { children: hid.devices.length === 0 ? (_jsxs(DeviceListEmpty, { icon: _jsx(Gamepad2, {}), children: [_jsx("p", { className: "text-foreground text-ui-body font-medium", children: "No HID devices" }), _jsx("p", { className: "text-ui-caption", children: "Request a device to grant this app access." })] })) : (hid.devices.map((device) => {
|
|
367
367
|
const id = hid.deviceId(device);
|
|
368
368
|
const open = hid.openIds.includes(id);
|
|
369
369
|
const usage = describeHidUsage(device);
|
|
370
370
|
return (_jsx(DeviceListItem, { icon: _jsx(Gamepad2, {}), name: device.productName || 'HID device', description: `${formatHexId(device.vendorId)}:${formatHexId(device.productId)}${usage ? ` · ${usage}` : ''}`, connected: open, action: _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Button, { variant: "outline", size: "xs", onClick: () => void (open ? hid.close(device) : hid.open(device)), children: open ? 'Close' : 'Open' }), _jsx(Button, { size: "icon-xs", variant: "ghost", "aria-label": `Forget ${device.productName || 'HID device'}`, onClick: () => void hid.forget(device), children: _jsx(Trash2, {}) })] }), children: open ? (_jsx(HidReportControls, { device: device, hid: hid })) : null }, id));
|
|
371
|
-
})) }), hid.error ? (_jsx("p", { className: "text-status-error text-
|
|
371
|
+
})) }), hid.error ? (_jsx("p", { className: "text-status-error text-ui-caption", children: hid.error.message })) : null, _jsxs("div", { className: "space-y-1.5", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-11 font-medium uppercase tracking-wider", children: "Input reports" }), anyOpen ? _jsx(LiveIndicator, {}) : null] }), _jsx(StreamLog, { entries: hid.entries, maxHeight: 200, emptyLabel: "Waiting for input reports" })] })] })] }));
|
|
372
372
|
}
|
|
373
373
|
export { HidDevicePanel };
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export * from './bluetooth-panel';
|
|
2
|
-
export * from './camera-preview';
|
|
3
|
-
export * from './capability-badge';
|
|
4
|
-
export * from './capability-matrix';
|
|
5
|
-
export * from './clipboard-button';
|
|
6
|
-
export * from './device-list';
|
|
7
|
-
export * from './display-map';
|
|
8
|
-
export * from './haptic-button';
|
|
9
|
-
export * from './native-capability-panel';
|
|
10
|
-
export * from './hid-panel';
|
|
11
|
-
export * from './live-indicator';
|
|
12
|
-
export * from './local-auth-button';
|
|
13
|
-
export * from './location-panel';
|
|
14
|
-
export * from './microphone-meter';
|
|
15
|
-
export * from './midi-monitor';
|
|
16
|
-
export * from './notification-panel';
|
|
17
|
-
export * from './power-panel';
|
|
18
|
-
export * from './readout';
|
|
19
|
-
export * from './screen-share-preview';
|
|
20
|
-
export * from './secure-storage-panel';
|
|
21
|
-
export * from './serial-console';
|
|
22
|
-
export * from './shortcut-recorder';
|
|
23
|
-
export * from './stream-log';
|
|
24
|
-
export * from './system-audio-monitor';
|
|
25
|
-
export * from './usb-panel';
|
|
26
|
-
export * from './use-capability';
|
|
1
|
+
export * from './bluetooth-panel.js';
|
|
2
|
+
export * from './camera-preview.js';
|
|
3
|
+
export * from './capability-badge.js';
|
|
4
|
+
export * from './capability-matrix.js';
|
|
5
|
+
export * from './clipboard-button.js';
|
|
6
|
+
export * from './device-list.js';
|
|
7
|
+
export * from './display-map.js';
|
|
8
|
+
export * from './haptic-button.js';
|
|
9
|
+
export * from './native-capability-panel.js';
|
|
10
|
+
export * from './hid-panel.js';
|
|
11
|
+
export * from './live-indicator.js';
|
|
12
|
+
export * from './local-auth-button.js';
|
|
13
|
+
export * from './location-panel.js';
|
|
14
|
+
export * from './microphone-meter.js';
|
|
15
|
+
export * from './midi-monitor.js';
|
|
16
|
+
export * from './notification-panel.js';
|
|
17
|
+
export * from './power-panel.js';
|
|
18
|
+
export * from './readout.js';
|
|
19
|
+
export * from './screen-share-preview.js';
|
|
20
|
+
export * from './secure-storage-panel.js';
|
|
21
|
+
export * from './serial-console.js';
|
|
22
|
+
export * from './shortcut-recorder.js';
|
|
23
|
+
export * from './stream-log.js';
|
|
24
|
+
export * from './system-audio-monitor.js';
|
|
25
|
+
export * from './usb-panel.js';
|
|
26
|
+
export * from './use-capability.js';
|
|
27
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export * from './bluetooth-panel';
|
|
2
|
-
export * from './camera-preview';
|
|
3
|
-
export * from './capability-badge';
|
|
4
|
-
export * from './capability-matrix';
|
|
5
|
-
export * from './clipboard-button';
|
|
6
|
-
export * from './device-list';
|
|
7
|
-
export * from './display-map';
|
|
8
|
-
export * from './haptic-button';
|
|
9
|
-
export * from './native-capability-panel';
|
|
10
|
-
export * from './hid-panel';
|
|
11
|
-
export * from './live-indicator';
|
|
12
|
-
export * from './local-auth-button';
|
|
13
|
-
export * from './location-panel';
|
|
14
|
-
export * from './microphone-meter';
|
|
15
|
-
export * from './midi-monitor';
|
|
16
|
-
export * from './notification-panel';
|
|
17
|
-
export * from './power-panel';
|
|
18
|
-
export * from './readout';
|
|
19
|
-
export * from './screen-share-preview';
|
|
20
|
-
export * from './secure-storage-panel';
|
|
21
|
-
export * from './serial-console';
|
|
22
|
-
export * from './shortcut-recorder';
|
|
23
|
-
export * from './stream-log';
|
|
24
|
-
export * from './system-audio-monitor';
|
|
25
|
-
export * from './usb-panel';
|
|
26
|
-
export * from './use-capability';
|
|
1
|
+
export * from './bluetooth-panel.js';
|
|
2
|
+
export * from './camera-preview.js';
|
|
3
|
+
export * from './capability-badge.js';
|
|
4
|
+
export * from './capability-matrix.js';
|
|
5
|
+
export * from './clipboard-button.js';
|
|
6
|
+
export * from './device-list.js';
|
|
7
|
+
export * from './display-map.js';
|
|
8
|
+
export * from './haptic-button.js';
|
|
9
|
+
export * from './native-capability-panel.js';
|
|
10
|
+
export * from './hid-panel.js';
|
|
11
|
+
export * from './live-indicator.js';
|
|
12
|
+
export * from './local-auth-button.js';
|
|
13
|
+
export * from './location-panel.js';
|
|
14
|
+
export * from './microphone-meter.js';
|
|
15
|
+
export * from './midi-monitor.js';
|
|
16
|
+
export * from './notification-panel.js';
|
|
17
|
+
export * from './power-panel.js';
|
|
18
|
+
export * from './readout.js';
|
|
19
|
+
export * from './screen-share-preview.js';
|
|
20
|
+
export * from './secure-storage-panel.js';
|
|
21
|
+
export * from './serial-console.js';
|
|
22
|
+
export * from './shortcut-recorder.js';
|
|
23
|
+
export * from './stream-log.js';
|
|
24
|
+
export * from './system-audio-monitor.js';
|
|
25
|
+
export * from './usb-panel.js';
|
|
26
|
+
export * from './use-capability.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
import { cva } from 'class-variance-authority';
|
|
5
|
-
const liveIndicatorVariants = cva('inline-flex w-fit shrink-0 items-center gap-1.5 rounded-
|
|
5
|
+
const liveIndicatorVariants = cva('inline-flex w-fit shrink-0 items-center gap-1.5 rounded-pill border px-2 py-0.5 text-11 font-semibold uppercase tracking-widest', {
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
live: 'border-border bg-background/80 text-foreground backdrop-blur-sm',
|
|
@@ -21,6 +21,6 @@ const DOT_CLASS = {
|
|
|
21
21
|
*/
|
|
22
22
|
function LiveIndicator({ label, variant = 'live', className, ...props }) {
|
|
23
23
|
const tone = variant ?? 'live';
|
|
24
|
-
return (_jsxs("span", { "data-slot": "live-indicator", "data-variant": tone, className: cn(liveIndicatorVariants({ variant: tone }), className), ...props, children: [_jsxs("span", { className: "relative flex size-1.5 shrink-0", children: [_jsx("span", { className: cn('absolute inline-flex h-full w-full animate-ping
|
|
24
|
+
return (_jsxs("span", { "data-slot": "live-indicator", "data-variant": tone, className: cn(liveIndicatorVariants({ variant: tone }), className), ...props, children: [_jsxs("span", { className: "relative flex size-1.5 shrink-0", children: [_jsx("span", { className: cn('rounded-pill absolute inline-flex h-full w-full animate-ping opacity-75 motion-reduce:animate-none', DOT_CLASS[tone]) }), _jsx("span", { className: cn('rounded-pill relative inline-flex size-1.5', DOT_CLASS[tone]) })] }), label ?? (tone === 'rec' ? 'Rec' : 'Live')] }));
|
|
25
25
|
}
|
|
26
26
|
export { LiveIndicator };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableLocalAuthenticationAvailability, type MoldableLocalAuthenticationPolicy, type MoldableLocalAuthenticationResult } from '../../lib/native-capabilities';
|
|
3
|
-
import { Button } from '../ui/button';
|
|
2
|
+
import { type MoldableLocalAuthenticationAvailability, type MoldableLocalAuthenticationPolicy, type MoldableLocalAuthenticationResult } from '../../lib/native-capabilities/index.js';
|
|
3
|
+
import { Button } from '../ui/button.js';
|
|
4
4
|
export type MoldableLocalAuthStatus = 'idle' | 'authenticating' | 'success' | 'failed';
|
|
5
5
|
/**
|
|
6
6
|
* Local (device-owner / biometric) authentication state machine behind
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Check, Fingerprint, ShieldX } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { authenticateMoldableLocalUser, getMoldableLocalAuthenticationAvailability, } from '../../lib/native-capabilities';
|
|
6
|
-
import { cn } from '../../lib/utils';
|
|
7
|
-
import { Button } from '../ui/button';
|
|
8
|
-
import { Spinner } from '../ui/spinner';
|
|
5
|
+
import { authenticateMoldableLocalUser, getMoldableLocalAuthenticationAvailability, } 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
9
|
const DEFAULT_REASON = 'Confirm your identity';
|
|
10
10
|
/**
|
|
11
11
|
* Local (device-owner / biometric) authentication state machine behind
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableLocationAuthorizationState, type MoldableLocationOptions, type MoldableLocationResult } from '../../lib/native-capabilities';
|
|
2
|
+
import { type MoldableLocationAuthorizationState, type MoldableLocationOptions, type MoldableLocationResult } from '../../lib/native-capabilities/index.js';
|
|
3
3
|
export type MoldableLocationStatus = 'idle' | 'locating' | 'success' | 'denied' | 'error';
|
|
4
4
|
/**
|
|
5
5
|
* One-shot location state machine behind `LocationPanel`. Use directly to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location-panel.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/location-panel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAK5B,MAAM,+BAA+B,CAAA;AAetC,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,UAAU,GACV,SAAS,GACT,QAAQ,GACR,OAAO,CAAA;AAEX;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,uBAA4B;;;;;;EAyDxE;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAIpE;AAMD,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACrE,iEAAiE;IACjE,OAAO,CAAC,EAAE,uBAAuB,CAAA;IACjC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAA;CACxD;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,UAAkB,EAClB,UAAU,EACV,GAAG,KAAK,EACT,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"location-panel.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/location-panel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAK5B,MAAM,+BAA+B,CAAA;AAetC,MAAM,MAAM,sBAAsB,GAC9B,MAAM,GACN,UAAU,GACV,SAAS,GACT,QAAQ,GACR,OAAO,CAAA;AAEX;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,uBAA4B;;;;;;EAyDxE;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAIpE;AAMD,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACrE,iEAAiE;IACjE,OAAO,CAAC,EAAE,uBAAuB,CAAA;IACjC,8BAA8B;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,sBAAsB,KAAK,IAAI,CAAA;CACxD;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,OAAO,EACP,UAAkB,EAClB,UAAU,EACV,GAAG,KAAK,EACT,EAAE,kBAAkB,2CA8MpB;AAED,OAAO,EAAE,aAAa,EAAE,gBAAgB,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 { Check, Copy, LocateFixed, MapPin } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { NativeCapabilityBridgeError, getMoldableCurrentPosition, getMoldableLocationAuthorizationStatus, writeMoldableClipboardText, } from '../../lib/native-capabilities';
|
|
6
|
-
import { Button } from '../ui/button';
|
|
7
|
-
import { Spinner } from '../ui/spinner';
|
|
8
|
-
import { CapabilityBadge } from './capability-badge';
|
|
9
|
-
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelFooter, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel';
|
|
10
|
-
import { Readout, ReadoutItem } from './readout';
|
|
5
|
+
import { NativeCapabilityBridgeError, getMoldableCurrentPosition, getMoldableLocationAuthorizationStatus, writeMoldableClipboardText, } from '../../lib/native-capabilities/index.js';
|
|
6
|
+
import { Button } from '../ui/button.js';
|
|
7
|
+
import { Spinner } from '../ui/spinner.js';
|
|
8
|
+
import { CapabilityBadge } from './capability-badge.js';
|
|
9
|
+
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelFooter, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel.js';
|
|
10
|
+
import { Readout, ReadoutItem } from './readout.js';
|
|
11
11
|
/**
|
|
12
12
|
* One-shot location state machine behind `LocationPanel`. Use directly to
|
|
13
13
|
* build custom location UI on the same authorization/error handling.
|
|
@@ -131,7 +131,7 @@ function LocationPanel({ className, options, autoLocate = false, onLocation, ...
|
|
|
131
131
|
}, 1500);
|
|
132
132
|
};
|
|
133
133
|
const locating = location.status === 'locating';
|
|
134
|
-
return (_jsxs(NativeCapabilityPanel, { "data-slot": "location-panel", "data-status": location.status, className: className, ...props, children: [_jsxs(NativeCapabilityPanelHeader, { children: [_jsx(NativeCapabilityPanelIcon, { children: _jsx(MapPin, {}) }), _jsx(NativeCapabilityPanelTitle, { children: "Location" }), _jsx(CapabilityBadge, { capability: "location" }), _jsx(NativeCapabilityPanelAction, { children: _jsxs(Button, { size: "sm", variant: position ? 'outline' : 'default', disabled: locating, onClick: () => void runLocate(), children: [locating ? _jsx(Spinner, {}) : _jsx(LocateFixed, {}), locating ? 'Locating…' : position ? 'Update' : 'Locate'] }) })] }), _jsx(NativeCapabilityPanelContent, { children: position ? (_jsxs("div", { className: "animate-in fade-in space-y-4 duration-300 motion-reduce:animate-none", children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "
|
|
134
|
+
return (_jsxs(NativeCapabilityPanel, { "data-slot": "location-panel", "data-status": location.status, className: className, ...props, children: [_jsxs(NativeCapabilityPanelHeader, { children: [_jsx(NativeCapabilityPanelIcon, { children: _jsx(MapPin, {}) }), _jsx(NativeCapabilityPanelTitle, { children: "Location" }), _jsx(CapabilityBadge, { capability: "location" }), _jsx(NativeCapabilityPanelAction, { children: _jsxs(Button, { size: "sm", variant: position ? 'outline' : 'default', disabled: locating, onClick: () => void runLocate(), children: [locating ? _jsx(Spinner, {}) : _jsx(LocateFixed, {}), locating ? 'Locating…' : position ? 'Update' : 'Locate'] }) })] }), _jsx(NativeCapabilityPanelContent, { children: position ? (_jsxs("div", { className: "animate-in fade-in space-y-4 duration-300 motion-reduce:animate-none", children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsxs("div", { className: "text-ui-heading sm:text-ui-display font-mono font-medium tabular-nums tracking-tight", children: [formatCoordinate(position.coords.latitude, 'lat'), _jsx("span", { className: "text-muted-foreground/50 mx-2", children: "\u00B7" }), formatCoordinate(position.coords.longitude, 'lng')] }), _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": copied
|
|
135
135
|
? 'Coordinates copied'
|
|
136
136
|
: copyError
|
|
137
137
|
? 'Copy coordinates failed; try again'
|
|
@@ -139,7 +139,7 @@ function LocationPanel({ className, options, autoLocate = false, onLocation, ...
|
|
|
139
139
|
? null
|
|
140
140
|
: Math.round(position.coords.altitude), unit: "m" }), _jsx(ReadoutItem, { label: "Speed", value: position.coords.speed === null
|
|
141
141
|
? null
|
|
142
|
-
: position.coords.speed.toFixed(1), unit: "m/s" })] })] })) : (_jsx("div", { className: "flex flex-col items-center gap-3 py-6 text-center", children: locating ? (_jsxs(_Fragment, { children: [_jsxs("span", { className: "relative flex size-10 items-center justify-center", children: [_jsx("span", { className: "border-primary/30 absolute inline-flex size-10 animate-ping
|
|
142
|
+
: position.coords.speed.toFixed(1), unit: "m/s" })] })] })) : (_jsx("div", { className: "flex flex-col items-center gap-3 py-6 text-center", children: locating ? (_jsxs(_Fragment, { children: [_jsxs("span", { className: "relative flex size-10 items-center justify-center", children: [_jsx("span", { className: "border-primary/30 rounded-pill absolute inline-flex size-10 animate-ping border motion-reduce:animate-none" }), _jsx("span", { className: "text-muted-foreground bg-background shadow-xs rounded-pill relative flex size-10 items-center justify-center border [&_svg]:size-4", children: _jsx(LocateFixed, {}) })] }), _jsx("p", { className: "text-muted-foreground text-ui-caption", children: "Getting your position\u2026" })] })) : location.status === 'denied' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-ui-body font-medium", children: "Location access denied" }), _jsx("p", { className: "text-muted-foreground text-ui-caption max-w-64", children: "Enable Location Services for Moldable in System Settings, then try again." })] })) : location.status === 'error' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-ui-body font-medium", children: "Couldn't get a fix" }), _jsx("p", { className: "text-muted-foreground text-ui-caption max-w-64", children: location.error?.message ?? 'Location request failed.' })] })) : (_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(MapPin, {}) }), _jsx("p", { className: "text-muted-foreground text-ui-caption", children: "No position yet" })] })) })) }), _jsxs(NativeCapabilityPanelFooter, { children: [_jsx("span", { className: "truncate", children: location.authorization
|
|
143
143
|
? `Authorization ${location.authorization.authorization}${location.authorization.servicesEnabled ? '' : ' · services off'}`
|
|
144
144
|
: 'Authorization unknown' }), position ? (_jsx("span", { className: "ml-auto shrink-0 font-mono tabular-nums", children: formatClock(position.timestamp) })) : null] })] }));
|
|
145
145
|
}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Mic, MicOff, RefreshCw, Square } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { NativeCapabilityBridgeError, enumerateMoldableMediaDevices, getMoldableMediaPermissionStatus, getMoldableMicrophoneStream, requestMoldableMediaPermission, stopMoldableMediaStream, } from '../../lib/native-capabilities';
|
|
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 { LiveIndicator } from './live-indicator';
|
|
11
|
-
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelFooter, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel';
|
|
5
|
+
import { NativeCapabilityBridgeError, enumerateMoldableMediaDevices, getMoldableMediaPermissionStatus, getMoldableMicrophoneStream, requestMoldableMediaPermission, stopMoldableMediaStream, } from '../../lib/native-capabilities/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 { LiveIndicator } from './live-indicator.js';
|
|
11
|
+
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelFooter, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel.js';
|
|
12
12
|
function isPermissionDenied(error) {
|
|
13
13
|
if (error instanceof NativeCapabilityBridgeError) {
|
|
14
14
|
return error.code === 'permission_denied';
|
|
@@ -234,9 +234,9 @@ function MicrophoneMeter({ className, constraints, autoStart = false, onStreamCh
|
|
|
234
234
|
microphone.stop();
|
|
235
235
|
else
|
|
236
236
|
void microphone.start();
|
|
237
|
-
}, children: [starting ? (_jsx(Spinner, {})) : live ? (_jsx(Square, { className: "fill-current" })) : (_jsx(Mic, {})), starting ? 'Starting…' : live ? 'Stop' : 'Start'] }) })] }), _jsx(NativeCapabilityPanelContent, { children: live ? (_jsxs("div", { className: "animate-in fade-in space-y-3 duration-300 motion-reduce:animate-none", children: [_jsxs("div", { className: "bg-muted/30 relative overflow-hidden
|
|
237
|
+
}, children: [starting ? (_jsx(Spinner, {})) : live ? (_jsx(Square, { className: "fill-current" })) : (_jsx(Mic, {})), starting ? 'Starting…' : live ? 'Stop' : 'Start'] }) })] }), _jsx(NativeCapabilityPanelContent, { children: live ? (_jsxs("div", { className: "animate-in fade-in space-y-3 duration-300 motion-reduce:animate-none", children: [_jsxs("div", { className: "bg-muted/30 rounded-container relative overflow-hidden border p-3", children: [_jsx("div", { className: "absolute left-2.5 top-2.5 z-10", children: _jsx(LiveIndicator, { label: microphone.status === 'muted' ? 'Muted' : undefined }) }), _jsx("div", { "aria-hidden": true, className: "flex h-24 items-stretch gap-[3px]", children: Array.from({ length: BAR_COUNT }, (_, index) => (_jsxs("div", { className: "relative min-w-0 flex-1 overflow-hidden", children: [_jsx("div", { className: "bg-muted-foreground/15 absolute inset-0" }), _jsx("div", { ref: (node) => {
|
|
238
238
|
barsRef.current[index] = node;
|
|
239
|
-
}, className: "bg-primary absolute inset-0 origin-bottom transition-transform duration-75 ease-out motion-reduce:transition-none", style: { transform: `scaleY(${BAR_REST_SCALE})` } })] }, index))) })] }), microphone.devices.length > 1 ? (_jsxs(Select, { value: microphone.deviceId ?? undefined, onValueChange: microphone.selectDevice, children: [_jsx(SelectTrigger, { size: "sm", className: "w-full", children: _jsx(SelectValue, { placeholder: "Microphone" }) }), _jsx(SelectContent, { children: microphone.devices.map((device, index) => (_jsx(SelectItem, { value: device.deviceId, children: device.label || `Microphone ${index + 1}` }, device.deviceId))) })] })) : null] })) : (_jsx("div", { className: "animate-in fade-in flex flex-col items-center justify-center gap-3 py-6 text-center duration-300 motion-reduce:animate-none", children: starting ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { className: "text-muted-foreground" }), _jsx("p", { className: "text-muted-foreground text-
|
|
239
|
+
}, className: "bg-primary absolute inset-0 origin-bottom transition-transform duration-75 ease-out motion-reduce:transition-none", style: { transform: `scaleY(${BAR_REST_SCALE})` } })] }, index))) })] }), microphone.devices.length > 1 ? (_jsxs(Select, { value: microphone.deviceId ?? undefined, onValueChange: microphone.selectDevice, children: [_jsx(SelectTrigger, { size: "sm", className: "w-full", children: _jsx(SelectValue, { placeholder: "Microphone" }) }), _jsx(SelectContent, { children: microphone.devices.map((device, index) => (_jsx(SelectItem, { value: device.deviceId, children: device.label || `Microphone ${index + 1}` }, device.deviceId))) })] })) : null] })) : (_jsx("div", { className: "animate-in fade-in flex flex-col items-center justify-center gap-3 py-6 text-center duration-300 motion-reduce:animate-none", children: starting ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { className: "text-muted-foreground" }), _jsx("p", { className: "text-muted-foreground text-ui-caption", children: "Starting microphone\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: microphone.status === 'idle' ? _jsx(Mic, {}) : _jsx(MicOff, {}) }), microphone.status === 'idle' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-muted-foreground text-ui-body", children: "Microphone is off" }), _jsxs(Button, { size: "sm", onClick: () => void microphone.start(), children: [_jsx(Mic, {}), " Start microphone"] })] })) : microphone.status === 'denied' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-ui-body font-medium", children: "Microphone access denied" }), _jsx("p", { className: "text-muted-foreground text-ui-caption max-w-64", children: "Enable microphone access for Moldable in System Settings, then try again." }), _jsxs(Button, { size: "sm", variant: "outline", onClick: () => void microphone.start(), children: [_jsx(RefreshCw, {}), " Try again"] })] })) : (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-ui-body font-medium", children: "Microphone unavailable" }), _jsx("p", { className: "text-muted-foreground text-ui-caption max-w-64", children: microphone.error?.message ??
|
|
240
240
|
'The microphone could not be started.' }), _jsxs(Button, { size: "sm", variant: "outline", onClick: () => void microphone.start(), children: [_jsx(RefreshCw, {}), " Try again"] })] }))] })) })) }), _jsxs(NativeCapabilityPanelFooter, { children: [_jsx("span", { className: "font-mono tabular-nums", children: settings?.sampleRate
|
|
241
241
|
? `${settings.sampleRate.toLocaleString()} Hz`
|
|
242
242
|
: '— Hz' }), _jsx("span", { className: "ml-auto shrink-0 font-mono tabular-nums", children: settings?.channelCount ? `${settings.channelCount} ch` : '— ch' })] })] }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableMIDITransport } from '../../lib/native-capabilities';
|
|
2
|
+
import { type MoldableMIDITransport } from '../../lib/native-capabilities/index.js';
|
|
3
3
|
export type MoldableMidiStatus = 'idle' | 'connecting' | 'connected' | 'error';
|
|
4
4
|
/**
|
|
5
5
|
* Human-readable summary of a raw MIDI message: note on/off with pitch name,
|
|
@@ -28,7 +28,7 @@ export declare function useMoldableMidi(options?: UseMoldableMidiOptions): {
|
|
|
28
28
|
openInputIds: string[];
|
|
29
29
|
sysexEnabled: boolean;
|
|
30
30
|
error: Error | null;
|
|
31
|
-
entries: import("./stream-log").StreamLogEntry[];
|
|
31
|
+
entries: import("./stream-log.js").StreamLogEntry[];
|
|
32
32
|
connect: (connectOptions?: {
|
|
33
33
|
sysex?: boolean;
|
|
34
34
|
}) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"midi-monitor.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/midi-monitor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,qBAAqB,EAQ3B,MAAM,+BAA+B,CAAA;AAiBtC,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAA;AAgC9E;;;GAGG;AACH,iBAAS,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,EAAE,GAAG,MAAM,CAmB9D;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACvD;AAwBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B;;;;;;;;;+BAgDzC;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;;wBAmCC,OAAO,GAAG,QAAQ;oBAuClD,MAAM;qBAwCuB,MAAM;yBA+F7B,MAAM;oCAoDX,MAAM,SACV,QAAQ,CAAC,MAAM,CAAC;;EAqJ3B;AAkDD,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACnE,uDAAuD;IACvD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACvD;AAED;;;GAGG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,KAAa,EACb,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"midi-monitor.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/midi-monitor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,qBAAqB,EAQ3B,MAAM,+BAA+B,CAAA;AAiBtC,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAA;AAgC9E;;;GAGG;AACH,iBAAS,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,EAAE,GAAG,MAAM,CAmB9D;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACvD;AAwBD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B;;;;;;;;;+BAgDzC;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;;wBAmCC,OAAO,GAAG,QAAQ;oBAuClD,MAAM;qBAwCuB,MAAM;yBA+F7B,MAAM;oCAoDX,MAAM,SACV,QAAQ,CAAC,MAAM,CAAC;;EAqJ3B;AAkDD,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACnE,uDAAuD;IACvD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACvD;AAED;;;GAGG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,KAAa,EACb,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAiKlB;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Music, Plus, Unplug } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { getMoldableMIDIInputs, getMoldableMIDIOutputs, observeMoldableMIDIState, openMoldableMIDIInput, openMoldableMIDIOutput, requestMoldableMIDIWithFallback, } from '../../lib/native-capabilities';
|
|
6
|
-
import { Badge } from '../ui/badge';
|
|
7
|
-
import { Button } from '../ui/button';
|
|
8
|
-
import { Spinner } from '../ui/spinner';
|
|
9
|
-
import { CapabilityBadge } from './capability-badge';
|
|
10
|
-
import { DeviceList, DeviceListEmpty, DeviceListItem } from './device-list';
|
|
11
|
-
import { LiveIndicator } from './live-indicator';
|
|
12
|
-
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel';
|
|
13
|
-
import { StreamLog, useStreamLog } from './stream-log';
|
|
5
|
+
import { getMoldableMIDIInputs, getMoldableMIDIOutputs, observeMoldableMIDIState, openMoldableMIDIInput, openMoldableMIDIOutput, requestMoldableMIDIWithFallback, } from '../../lib/native-capabilities/index.js';
|
|
6
|
+
import { Badge } from '../ui/badge.js';
|
|
7
|
+
import { Button } from '../ui/button.js';
|
|
8
|
+
import { Spinner } from '../ui/spinner.js';
|
|
9
|
+
import { CapabilityBadge } from './capability-badge.js';
|
|
10
|
+
import { DeviceList, DeviceListEmpty, DeviceListItem } from './device-list.js';
|
|
11
|
+
import { LiveIndicator } from './live-indicator.js';
|
|
12
|
+
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel.js';
|
|
13
|
+
import { StreamLog, useStreamLog } from './stream-log.js';
|
|
14
14
|
const NOTE_NAMES = [
|
|
15
15
|
'C',
|
|
16
16
|
'C#',
|
|
@@ -513,7 +513,7 @@ export function useMoldableMidi(options = {}) {
|
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
function MidiPortSection({ label, ports, emptyLabel, onRequestPort, renderAction, isConnected, }) {
|
|
516
|
-
return (_jsxs("section", { "data-slot": "midi-port-section", className: "space-y-1.5", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-
|
|
516
|
+
return (_jsxs("section", { "data-slot": "midi-port-section", className: "space-y-1.5", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-11 font-medium uppercase tracking-wider", children: label }), onRequestPort ? (_jsxs(Button, { variant: "ghost", size: "xs", onClick: onRequestPort, children: [_jsx(Plus, {}), " Add"] })) : null] }), _jsx(DeviceList, { children: ports.length === 0 ? (_jsx(DeviceListEmpty, { children: emptyLabel })) : (ports.map((port) => (_jsx(DeviceListItem, { name: port.name, description: port.manufacturer, connected: isConnected?.(port) ?? false, action: renderAction(port) }, port.id)))) })] }));
|
|
517
517
|
}
|
|
518
518
|
/**
|
|
519
519
|
* MIDI monitor panel: connect either transport, monitor inputs, fire a test
|
|
@@ -529,6 +529,6 @@ function MidiMonitor({ className, sysex = false, onMessage, ...props }) {
|
|
|
529
529
|
return (_jsx(Button, { variant: "outline", size: "xs", onClick: () => void (open
|
|
530
530
|
? midi.closeInput(port.id)
|
|
531
531
|
: midi.openInput(port.id)), children: open ? 'Stop' : 'Monitor' }));
|
|
532
|
-
} }), _jsx(MidiPortSection, { label: "Outputs", ports: midi.outputs, emptyLabel: "No outputs", onRequestPort: native ? () => void midi.requestPort('output') : undefined, renderAction: (port) => (_jsxs("div", { className: "flex items-center gap-1.5", children: [midi.sysexEnabled ? (_jsx(Button, { variant: "ghost", size: "xs", onClick: () => void midi.sendSystemExclusive(port.id), children: "Send SysEx" })) : null, _jsx(Button, { variant: "outline", size: "xs", onClick: () => void midi.sendNote(port.id, 48 + Math.floor(Math.random() * 25), 96), children: "Send note" })] })) }), midi.error ? (_jsx("p", { className: "text-status-error text-
|
|
532
|
+
} }), _jsx(MidiPortSection, { label: "Outputs", ports: midi.outputs, emptyLabel: "No outputs", onRequestPort: native ? () => void midi.requestPort('output') : undefined, renderAction: (port) => (_jsxs("div", { className: "flex items-center gap-1.5", children: [midi.sysexEnabled ? (_jsx(Button, { variant: "ghost", size: "xs", onClick: () => void midi.sendSystemExclusive(port.id), children: "Send SysEx" })) : null, _jsx(Button, { variant: "outline", size: "xs", onClick: () => void midi.sendNote(port.id, 48 + Math.floor(Math.random() * 25), 96), children: "Send note" })] })) }), midi.error ? (_jsx("p", { className: "text-status-error text-ui-caption", children: midi.error.message })) : null, _jsxs("div", { className: "space-y-1.5", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-11 font-medium uppercase tracking-wider", children: "Messages" }), midi.openInputIds.length > 0 ? _jsx(LiveIndicator, {}) : null] }), _jsx(StreamLog, { entries: midi.entries, maxHeight: 200, emptyLabel: "Waiting for MIDI messages" })] })] })) : (_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: connecting ? (_jsxs(_Fragment, { children: [_jsx(Spinner, { className: "text-muted-foreground" }), _jsx("p", { className: "text-muted-foreground text-ui-caption", children: "Requesting MIDI access\u2026" })] })) : midi.status === 'error' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-ui-body font-medium", children: "MIDI access failed" }), _jsx("p", { className: "text-muted-foreground text-ui-caption max-w-64", children: midi.error?.message ?? 'The MIDI request failed.' })] })) : (_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(Music, {}) }), _jsx("p", { className: "text-muted-foreground text-ui-caption", children: "Connect to list MIDI inputs and outputs." })] })) })) })] }));
|
|
533
533
|
}
|
|
534
534
|
export { MidiMonitor, formatMidiMessage };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from '../../lib/utils';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
4
|
function NativeCapabilityPanel({ className, ...props }) {
|
|
5
|
-
return (_jsx("div", { "data-slot": "native-capability-panel", className: cn('bg-card text-card-foreground shadow-xs flex flex-col overflow-hidden
|
|
5
|
+
return (_jsx("div", { "data-slot": "native-capability-panel", className: cn('bg-card text-card-foreground shadow-xs rounded-container flex flex-col overflow-hidden border', className), ...props }));
|
|
6
6
|
}
|
|
7
7
|
function NativeCapabilityPanelHeader({ className, ...props }) {
|
|
8
8
|
return (_jsx("div", { "data-slot": "native-capability-panel-header", className: cn('flex items-center gap-2.5 border-b px-4 py-3', className), ...props }));
|
|
9
9
|
}
|
|
10
10
|
function NativeCapabilityPanelIcon({ className, ...props }) {
|
|
11
|
-
return (_jsx("div", { "data-slot": "native-capability-panel-icon", className: cn("text-muted-foreground bg-muted/50 flex size-7 shrink-0 items-center justify-center
|
|
11
|
+
return (_jsx("div", { "data-slot": "native-capability-panel-icon", className: cn("text-muted-foreground bg-muted/50 rounded-control flex size-7 shrink-0 items-center justify-center border [&_svg:not([class*='size-'])]:size-3.5", className), ...props }));
|
|
12
12
|
}
|
|
13
13
|
function NativeCapabilityPanelTitle({ className, ...props }) {
|
|
14
|
-
return (_jsx("div", { "data-slot": "native-capability-panel-title", className: cn('text-
|
|
14
|
+
return (_jsx("div", { "data-slot": "native-capability-panel-title", className: cn('text-ui-body font-medium leading-none', className), ...props }));
|
|
15
15
|
}
|
|
16
16
|
function NativeCapabilityPanelDescription({ className, ...props }) {
|
|
17
|
-
return (_jsx("div", { "data-slot": "native-capability-panel-description", className: cn('text-muted-foreground mt-1
|
|
17
|
+
return (_jsx("div", { "data-slot": "native-capability-panel-description", className: cn('text-muted-foreground text-ui-caption mt-1', className), ...props }));
|
|
18
18
|
}
|
|
19
19
|
function NativeCapabilityPanelAction({ className, ...props }) {
|
|
20
20
|
return (_jsx("div", { "data-slot": "native-capability-panel-action", className: cn('ml-auto flex shrink-0 items-center gap-2', className), ...props }));
|
|
@@ -23,6 +23,6 @@ function NativeCapabilityPanelContent({ className, ...props }) {
|
|
|
23
23
|
return (_jsx("div", { "data-slot": "native-capability-panel-content", className: cn('flex-1 p-4', className), ...props }));
|
|
24
24
|
}
|
|
25
25
|
function NativeCapabilityPanelFooter({ className, ...props }) {
|
|
26
|
-
return (_jsx("div", { "data-slot": "native-capability-panel-footer", className: cn('text-muted-foreground bg-muted/30 flex items-center gap-2 border-t px-4 py-2
|
|
26
|
+
return (_jsx("div", { "data-slot": "native-capability-panel-footer", className: cn('text-muted-foreground bg-muted/30 text-ui-caption flex items-center gap-2 border-t px-4 py-2', className), ...props }));
|
|
27
27
|
}
|
|
28
28
|
export { NativeCapabilityPanel, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, NativeCapabilityPanelDescription, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelFooter, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldableNotificationOptions } from '../../lib/native-capabilities';
|
|
2
|
+
import { type MoldableNotificationOptions } from '../../lib/native-capabilities/index.js';
|
|
3
3
|
export type MoldableNotificationPermissionState = 'granted' | 'denied' | 'prompt' | 'unknown';
|
|
4
4
|
export type MoldableNotificationSendStatus = 'idle' | 'sending' | 'sent' | 'error';
|
|
5
5
|
/**
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Bell, Send } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
-
import { NATIVE_NOTIFICATION_MAX_BODY_LENGTH, NATIVE_NOTIFICATION_MAX_TAG_LENGTH, NATIVE_NOTIFICATION_MAX_TITLE_LENGTH, getMoldableNotificationPermission, requestMoldableNotificationPermission, sendMoldableNotification, } from '../../lib/native-capabilities';
|
|
6
|
-
import { Button } from '../ui/button';
|
|
7
|
-
import { Input } from '../ui/input';
|
|
8
|
-
import { Spinner } from '../ui/spinner';
|
|
9
|
-
import { Switch } from '../ui/switch';
|
|
10
|
-
import { CapabilityBadge } from './capability-badge';
|
|
11
|
-
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelFooter, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel';
|
|
12
|
-
import { useMoldableCapability, } from './use-capability';
|
|
5
|
+
import { NATIVE_NOTIFICATION_MAX_BODY_LENGTH, NATIVE_NOTIFICATION_MAX_TAG_LENGTH, NATIVE_NOTIFICATION_MAX_TITLE_LENGTH, getMoldableNotificationPermission, requestMoldableNotificationPermission, sendMoldableNotification, } 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 { Switch } from '../ui/switch.js';
|
|
10
|
+
import { CapabilityBadge } from './capability-badge.js';
|
|
11
|
+
import { NativeCapabilityPanel, NativeCapabilityPanelAction, NativeCapabilityPanelContent, NativeCapabilityPanelFooter, NativeCapabilityPanelHeader, NativeCapabilityPanelIcon, NativeCapabilityPanelTitle, } from './native-capability-panel.js';
|
|
12
|
+
import { useMoldableCapability, } from './use-capability.js';
|
|
13
13
|
/**
|
|
14
14
|
* Notification state machine behind `NotificationsPanel`: permission loading,
|
|
15
15
|
* explicit permission requests, and sends with the library's length limits
|
|
@@ -117,7 +117,7 @@ function NotificationsPanel({ className, ...props }) {
|
|
|
117
117
|
const chip = notifications.permission === 'unknown'
|
|
118
118
|
? null
|
|
119
119
|
: PERMISSION_CHIP[notifications.permission];
|
|
120
|
-
return (_jsxs(NativeCapabilityPanel, { "data-slot": "notifications-panel", "data-status": notifications.status, "data-permission": notifications.permission, className: className, ...props, children: [_jsxs(NativeCapabilityPanelHeader, { children: [_jsx(NativeCapabilityPanelIcon, { children: _jsx(Bell, {}) }), _jsx(NativeCapabilityPanelTitle, { children: "Notifications" }), _jsx(CapabilityBadge, { capability: "notifications" }), _jsx(NativeCapabilityPanelAction, { children: notifications.permission === 'prompt' ? (_jsxs(Button, { size: "sm", variant: "outline", disabled: requesting, onClick: () => void requestPermission(), children: [requesting ? _jsx(Spinner, {}) : null, "Allow"] })) : chip ? (_jsx(CapabilityBadge, { status: chip.status, label: chip.label })) : null })] }), _jsxs(NativeCapabilityPanelContent, { className: "space-y-3", children: [_jsxs("div", { className: "grid gap-2", children: [_jsx(Input, { value: title, maxLength: NATIVE_NOTIFICATION_MAX_TITLE_LENGTH, placeholder: "Title", "aria-label": "Notification title", onChange: (event) => setTitle(event.target.value) }), _jsx(Input, { value: body, maxLength: NATIVE_NOTIFICATION_MAX_BODY_LENGTH, placeholder: "Body (optional)", "aria-label": "Notification body", onChange: (event) => setBody(event.target.value) })] }), _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("label", { className: "text-muted-foreground flex items-center gap-2
|
|
120
|
+
return (_jsxs(NativeCapabilityPanel, { "data-slot": "notifications-panel", "data-status": notifications.status, "data-permission": notifications.permission, className: className, ...props, children: [_jsxs(NativeCapabilityPanelHeader, { children: [_jsx(NativeCapabilityPanelIcon, { children: _jsx(Bell, {}) }), _jsx(NativeCapabilityPanelTitle, { children: "Notifications" }), _jsx(CapabilityBadge, { capability: "notifications" }), _jsx(NativeCapabilityPanelAction, { children: notifications.permission === 'prompt' ? (_jsxs(Button, { size: "sm", variant: "outline", disabled: requesting, onClick: () => void requestPermission(), children: [requesting ? _jsx(Spinner, {}) : null, "Allow"] })) : chip ? (_jsx(CapabilityBadge, { status: chip.status, label: chip.label })) : null })] }), _jsxs(NativeCapabilityPanelContent, { className: "space-y-3", children: [_jsxs("div", { className: "grid gap-2", children: [_jsx(Input, { value: title, maxLength: NATIVE_NOTIFICATION_MAX_TITLE_LENGTH, placeholder: "Title", "aria-label": "Notification title", onChange: (event) => setTitle(event.target.value) }), _jsx(Input, { value: body, maxLength: NATIVE_NOTIFICATION_MAX_BODY_LENGTH, placeholder: "Body (optional)", "aria-label": "Notification body", onChange: (event) => setBody(event.target.value) })] }), _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsxs("label", { className: "text-muted-foreground text-ui-caption flex items-center gap-2", children: [_jsx(Switch, { size: "sm", checked: silent, onCheckedChange: setSilent }), "Silent"] }), _jsxs(Button, { size: "sm", disabled: !canSend, onClick: () => void sendNotification(), children: [sending ? _jsx(Spinner, {}) : _jsx(Send, {}), "Send notification"] })] }), notifications.status === 'sent' && notifications.sentAt !== null ? (_jsxs("p", { className: "text-success animate-in fade-in text-ui-caption font-mono tabular-nums duration-300 motion-reduce:animate-none", children: ["Delivered ", formatClock(notifications.sentAt)] })) : notifications.status === 'error' ? (_jsx("p", { className: "text-status-error text-ui-caption", children: notifications.error?.message ??
|
|
121
121
|
'The notification could not be sent.' })) : null] }), _jsx(NativeCapabilityPanelFooter, { children: _jsx("span", { className: "truncate", children: capability.descriptor?.reason ??
|
|
122
122
|
'Notifications appear via the OS notification center.' }) })] }));
|
|
123
123
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MoldableSleepBlocker, type MoldableSleepBlockerType } from '../../lib/native-capabilities';
|
|
1
|
+
import { type MoldableSleepBlocker, type MoldableSleepBlockerType } from '../../lib/native-capabilities/index.js';
|
|
2
2
|
type StartSleepBlocker = (type: MoldableSleepBlockerType) => Promise<MoldableSleepBlocker>;
|
|
3
3
|
declare const BLOCKER_TYPES: readonly ["prevent-display-sleep", "prevent-app-suspension"];
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { type MoldablePowerSessionEvent, type MoldablePowerState, type MoldableSleepBlockerType, type MoldableSystemIdleState, type MoldableThermalState } from '../../lib/native-capabilities';
|
|
2
|
+
import { type MoldablePowerSessionEvent, type MoldablePowerState, type MoldableSleepBlockerType, type MoldableSystemIdleState, type MoldableThermalState } from '../../lib/native-capabilities/index.js';
|
|
3
3
|
export interface MoldablePowerSessionLogEntry {
|
|
4
4
|
/** Monotonic id, stable across the rolling window. */
|
|
5
5
|
id: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"power-panel.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/power-panel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAO1B,MAAM,+BAA+B,CAAA;AAuBtC,MAAM,WAAW,4BAA4B;IAC3C,sDAAsD;IACtD,EAAE,EAAE,MAAM,CAAA;IACV,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,yBAAyB,CAAA;CACjC;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,uBAAuB,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAMD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B;;;;;;;;;;;wBA0HrD,wBAAwB;;mBAwEhC,MAAM,CACT,wBAAwB,EACxB;QACE,MAAM,EAAE,OAAO,CAAA;QACf,IAAI,EAAE,OAAO,CAAA;QACb,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;QAC3B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAC3B,CACF;EAEJ;AA0DD,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IACrE,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AA2DD;;;;GAIG;AACH,iBAAS,YAAY,CAAC,EACpB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAgBnB;AAsCD,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAClE,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"power-panel.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/power-panel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAO1B,MAAM,+BAA+B,CAAA;AAuBtC,MAAM,WAAW,4BAA4B;IAC3C,sDAAsD;IACtD,EAAE,EAAE,MAAM,CAAA;IACV,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,yBAAyB,CAAA;CACjC;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,uBAAuB,CAAA;IAC9B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAMD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B;;;;;;;;;;;wBA0HrD,wBAAwB;;mBAwEhC,MAAM,CACT,wBAAwB,EACxB;QACE,MAAM,EAAE,OAAO,CAAA;QACf,IAAI,EAAE,OAAO,CAAA;QACb,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;QAC3B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAC3B,CACF;EAEJ;AA0DD,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IACrE,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AA2DD;;;;GAIG;AACH,iBAAS,YAAY,CAAC,EACpB,OAAO,EACP,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAgBnB;AAsCD,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAClE,wEAAwE;IACxE,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CA4J3E;AAED,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAA"}
|