@moldable-ai/ui 0.2.19 → 0.2.21
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 +15 -0
- package/dist/catalog/catalog-coverage.d.ts.map +1 -0
- package/dist/catalog/catalog-coverage.js +44 -0
- package/dist/catalog/catalog-manifest.d.ts +6 -0
- package/dist/catalog/catalog-manifest.d.ts.map +1 -0
- package/dist/catalog/catalog-manifest.js +117 -0
- package/dist/catalog/catalog-types.d.ts +64 -0
- package/dist/catalog/catalog-types.d.ts.map +1 -0
- package/dist/catalog/catalog-types.js +20 -0
- package/dist/catalog/component-catalog.d.ts +14 -0
- package/dist/catalog/component-catalog.d.ts.map +1 -0
- package/dist/catalog/component-catalog.js +49 -0
- package/dist/catalog/core-catalog-exclusions.d.ts +8 -0
- package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -0
- package/dist/catalog/core-catalog-exclusions.js +151 -0
- package/dist/catalog/core-catalog.d.ts +2 -0
- package/dist/catalog/core-catalog.d.ts.map +1 -0
- package/dist/catalog/core-catalog.js +19 -0
- package/dist/catalog/core-collection-stories.d.ts +3 -0
- package/dist/catalog/core-collection-stories.d.ts.map +1 -0
- package/dist/catalog/core-collection-stories.js +42 -0
- package/dist/catalog/core-control-stories.d.ts +3 -0
- package/dist/catalog/core-control-stories.d.ts.map +1 -0
- package/dist/catalog/core-control-stories.js +94 -0
- package/dist/catalog/core-feedback-stories.d.ts +3 -0
- package/dist/catalog/core-feedback-stories.d.ts.map +1 -0
- package/dist/catalog/core-feedback-stories.js +50 -0
- package/dist/catalog/core-foundation-stories.d.ts +3 -0
- package/dist/catalog/core-foundation-stories.d.ts.map +1 -0
- package/dist/catalog/core-foundation-stories.js +53 -0
- package/dist/catalog/core-navigation-stories.d.ts +3 -0
- package/dist/catalog/core-navigation-stories.d.ts.map +1 -0
- package/dist/catalog/core-navigation-stories.js +25 -0
- package/dist/catalog/core-overlay-stories.d.ts +3 -0
- package/dist/catalog/core-overlay-stories.d.ts.map +1 -0
- package/dist/catalog/core-overlay-stories.js +20 -0
- package/dist/catalog/index.d.ts +7 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +6 -0
- package/dist/components/app-error-boundary.d.ts +1 -0
- package/dist/components/app-error-boundary.d.ts.map +1 -1
- package/dist/components/app-error-boundary.js +13 -0
- package/dist/components/chat/chat-image-lightbox.d.ts +9 -0
- package/dist/components/chat/chat-image-lightbox.d.ts.map +1 -0
- package/dist/components/chat/chat-image-lightbox.js +9 -0
- package/dist/components/chat/chat-message.d.ts +19 -1
- package/dist/components/chat/chat-message.d.ts.map +1 -1
- package/dist/components/chat/chat-message.js +66 -16
- package/dist/components/chat/chat-messages.d.ts +5 -2
- package/dist/components/chat/chat-messages.d.ts.map +1 -1
- package/dist/components/chat/chat-messages.js +61 -6
- package/dist/components/chat/chat-panel.d.ts +49 -6
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +196 -163
- package/dist/components/chat/conversation-history.d.ts +39 -5
- package/dist/components/chat/conversation-history.d.ts.map +1 -1
- package/dist/components/chat/conversation-history.js +192 -26
- package/dist/components/chat/index.d.ts +2 -2
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/tool-handlers.d.ts.map +1 -1
- package/dist/components/chat/tool-handlers.js +40 -2
- package/dist/components/chat/vertical-scroll-fade.d.ts +6 -0
- package/dist/components/chat/vertical-scroll-fade.d.ts.map +1 -0
- package/dist/components/chat/vertical-scroll-fade.js +12 -0
- package/dist/components/native-capabilities/bluetooth-panel-helpers.d.ts +9 -0
- package/dist/components/native-capabilities/bluetooth-panel-helpers.d.ts.map +1 -0
- package/dist/components/native-capabilities/bluetooth-panel-helpers.js +37 -0
- package/dist/components/native-capabilities/bluetooth-panel.d.ts +56 -0
- package/dist/components/native-capabilities/bluetooth-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/bluetooth-panel.js +470 -0
- package/dist/components/native-capabilities/camera-preview.d.ts +39 -0
- package/dist/components/native-capabilities/camera-preview.d.ts.map +1 -0
- package/dist/components/native-capabilities/camera-preview.js +228 -0
- package/dist/components/native-capabilities/capability-badge.d.ts +23 -0
- package/dist/components/native-capabilities/capability-badge.d.ts.map +1 -0
- package/dist/components/native-capabilities/capability-badge.js +39 -0
- package/dist/components/native-capabilities/capability-matrix.d.ts +14 -0
- package/dist/components/native-capabilities/capability-matrix.d.ts.map +1 -0
- package/dist/components/native-capabilities/capability-matrix.js +97 -0
- package/dist/components/native-capabilities/clipboard-button.d.ts +26 -0
- package/dist/components/native-capabilities/clipboard-button.d.ts.map +1 -0
- package/dist/components/native-capabilities/clipboard-button.js +99 -0
- package/dist/components/native-capabilities/device-io-controls.d.ts +4 -0
- package/dist/components/native-capabilities/device-io-controls.d.ts.map +1 -0
- package/dist/components/native-capabilities/device-io-controls.js +28 -0
- package/dist/components/native-capabilities/device-list.d.ts +20 -0
- package/dist/components/native-capabilities/device-list.d.ts.map +1 -0
- package/dist/components/native-capabilities/device-list.js +14 -0
- package/dist/components/native-capabilities/display-map.d.ts +23 -0
- package/dist/components/native-capabilities/display-map.d.ts.map +1 -0
- package/dist/components/native-capabilities/display-map.js +114 -0
- package/dist/components/native-capabilities/haptic-button.d.ts +26 -0
- package/dist/components/native-capabilities/haptic-button.d.ts.map +1 -0
- package/dist/components/native-capabilities/haptic-button.js +94 -0
- package/dist/components/native-capabilities/hid-panel.d.ts +40 -0
- package/dist/components/native-capabilities/hid-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/hid-panel.js +373 -0
- package/dist/components/native-capabilities/index.d.ts +27 -0
- package/dist/components/native-capabilities/index.d.ts.map +1 -0
- package/dist/components/native-capabilities/index.js +26 -0
- package/dist/components/native-capabilities/live-indicator.d.ts +15 -0
- package/dist/components/native-capabilities/live-indicator.d.ts.map +1 -0
- package/dist/components/native-capabilities/live-indicator.js +26 -0
- package/dist/components/native-capabilities/local-auth-button.d.ts +33 -0
- package/dist/components/native-capabilities/local-auth-button.d.ts.map +1 -0
- package/dist/components/native-capabilities/local-auth-button.js +115 -0
- package/dist/components/native-capabilities/location-panel.d.ts +29 -0
- package/dist/components/native-capabilities/location-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/location-panel.js +146 -0
- package/dist/components/native-capabilities/microphone-meter.d.ts +35 -0
- package/dist/components/native-capabilities/microphone-meter.d.ts.map +1 -0
- package/dist/components/native-capabilities/microphone-meter.js +244 -0
- package/dist/components/native-capabilities/midi-monitor.d.ts +54 -0
- package/dist/components/native-capabilities/midi-monitor.d.ts.map +1 -0
- package/dist/components/native-capabilities/midi-monitor.js +534 -0
- package/dist/components/native-capabilities/native-capability-panel.d.ts +11 -0
- package/dist/components/native-capabilities/native-capability-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/native-capability-panel.js +28 -0
- package/dist/components/native-capabilities/notification-panel.d.ts +24 -0
- package/dist/components/native-capabilities/notification-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/notification-panel.js +124 -0
- package/dist/components/native-capabilities/power-blocker-controller.d.ts +19 -0
- package/dist/components/native-capabilities/power-blocker-controller.d.ts.map +1 -0
- package/dist/components/native-capabilities/power-blocker-controller.js +83 -0
- package/dist/components/native-capabilities/power-panel.d.ts +67 -0
- package/dist/components/native-capabilities/power-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/power-panel.js +309 -0
- package/dist/components/native-capabilities/readout.d.ts +10 -0
- package/dist/components/native-capabilities/readout.d.ts.map +1 -0
- package/dist/components/native-capabilities/readout.js +11 -0
- package/dist/components/native-capabilities/screen-share-preview.d.ts +36 -0
- package/dist/components/native-capabilities/screen-share-preview.d.ts.map +1 -0
- package/dist/components/native-capabilities/screen-share-preview.js +191 -0
- package/dist/components/native-capabilities/secure-storage-panel.d.ts +36 -0
- package/dist/components/native-capabilities/secure-storage-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/secure-storage-panel.js +193 -0
- package/dist/components/native-capabilities/serial-console.d.ts +64 -0
- package/dist/components/native-capabilities/serial-console.d.ts.map +1 -0
- package/dist/components/native-capabilities/serial-console.js +399 -0
- package/dist/components/native-capabilities/shortcut-recorder.d.ts +35 -0
- package/dist/components/native-capabilities/shortcut-recorder.d.ts.map +1 -0
- package/dist/components/native-capabilities/shortcut-recorder.js +217 -0
- package/dist/components/native-capabilities/stream-log.d.ts +35 -0
- package/dist/components/native-capabilities/stream-log.d.ts.map +1 -0
- package/dist/components/native-capabilities/stream-log.js +65 -0
- package/dist/components/native-capabilities/system-audio-monitor.d.ts +34 -0
- package/dist/components/native-capabilities/system-audio-monitor.d.ts.map +1 -0
- package/dist/components/native-capabilities/system-audio-monitor.js +275 -0
- package/dist/components/native-capabilities/usb-panel.d.ts +54 -0
- package/dist/components/native-capabilities/usb-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/usb-panel.js +363 -0
- package/dist/components/native-capabilities/use-capability.d.ts +20 -0
- package/dist/components/native-capabilities/use-capability.d.ts.map +1 -0
- package/dist/components/native-capabilities/use-capability.js +61 -0
- package/dist/components/ui/alert-dialog.d.ts +7 -3
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +9 -5
- package/dist/components/ui/alert.d.ts +19 -3
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +25 -8
- package/dist/components/ui/app-frame.d.ts +28 -0
- package/dist/components/ui/app-frame.d.ts.map +1 -0
- package/dist/components/ui/app-frame.js +95 -0
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/collapsible.d.ts +9 -1
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +13 -2
- package/dist/components/ui/collection-navigation.d.ts +8 -0
- package/dist/components/ui/collection-navigation.d.ts.map +1 -0
- package/dist/components/ui/collection-navigation.js +19 -0
- package/dist/components/ui/color-well.d.ts +13 -0
- package/dist/components/ui/color-well.d.ts.map +1 -0
- package/dist/components/ui/color-well.js +30 -0
- package/dist/components/ui/command.d.ts +5 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +13 -1
- package/dist/components/ui/confirm-dialog.d.ts +19 -0
- package/dist/components/ui/confirm-dialog.d.ts.map +1 -0
- package/dist/components/ui/confirm-dialog.js +45 -0
- package/dist/components/ui/date-field.d.ts +19 -0
- package/dist/components/ui/date-field.d.ts.map +1 -0
- package/dist/components/ui/date-field.js +54 -0
- package/dist/components/ui/date-picker.d.ts +24 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/date-picker.js +92 -0
- package/dist/components/ui/dialog.d.ts +4 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +8 -5
- package/dist/components/ui/edge-fade.d.ts +11 -0
- package/dist/components/ui/edge-fade.d.ts.map +1 -0
- package/dist/components/ui/edge-fade.js +41 -0
- package/dist/components/ui/empty.d.ts +7 -2
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +20 -7
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/grid.d.ts +24 -0
- package/dist/components/ui/grid.d.ts.map +1 -0
- package/dist/components/ui/grid.js +258 -0
- package/dist/components/ui/icon-button.d.ts +15 -0
- package/dist/components/ui/icon-button.d.ts.map +1 -0
- package/dist/components/ui/icon-button.js +15 -0
- package/dist/components/ui/index.d.ts +23 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +23 -0
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/inspector.d.ts +15 -0
- package/dist/components/ui/inspector.d.ts.map +1 -0
- package/dist/components/ui/inspector.js +26 -0
- package/dist/components/ui/kbd.d.ts +1 -1
- package/dist/components/ui/list.d.ts +28 -0
- package/dist/components/ui/list.d.ts.map +1 -0
- package/dist/components/ui/list.js +235 -0
- package/dist/components/ui/material.d.ts +34 -0
- package/dist/components/ui/material.d.ts.map +1 -0
- package/dist/components/ui/material.js +34 -0
- package/dist/components/ui/message-scroller-controller.d.ts +162 -0
- package/dist/components/ui/message-scroller-controller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-controller.js +888 -0
- package/dist/components/ui/message-scroller-layout-stability.d.ts +33 -0
- package/dist/components/ui/message-scroller-layout-stability.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-layout-stability.js +153 -0
- package/dist/components/ui/message-scroller-policy.d.ts +74 -0
- package/dist/components/ui/message-scroller-policy.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-policy.js +129 -0
- package/dist/components/ui/message-scroller-primitive.d.ts +55 -0
- package/dist/components/ui/message-scroller-primitive.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-primitive.js +226 -0
- package/dist/components/ui/message-scroller.d.ts +11 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.js +25 -0
- package/dist/components/ui/navigation-button-group.d.ts +16 -0
- package/dist/components/ui/navigation-button-group.d.ts.map +1 -0
- package/dist/components/ui/navigation-button-group.js +9 -0
- package/dist/components/ui/notification-dot.d.ts +4 -0
- package/dist/components/ui/notification-dot.d.ts.map +1 -0
- package/dist/components/ui/notification-dot.js +7 -0
- package/dist/components/ui/number-input.d.ts +16 -0
- package/dist/components/ui/number-input.d.ts.map +1 -0
- package/dist/components/ui/number-input.js +56 -0
- package/dist/components/ui/panel.d.ts +18 -0
- package/dist/components/ui/panel.d.ts.map +1 -0
- package/dist/components/ui/panel.js +40 -0
- package/dist/components/ui/popover.d.ts +9 -2
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +14 -4
- package/dist/components/ui/scroll-area.d.ts +8 -2
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +6 -3
- package/dist/components/ui/search-field.d.ts +19 -0
- package/dist/components/ui/search-field.d.ts.map +1 -0
- package/dist/components/ui/search-field.js +64 -0
- package/dist/components/ui/segmented-control.d.ts +21 -0
- package/dist/components/ui/segmented-control.d.ts.map +1 -0
- package/dist/components/ui/segmented-control.js +62 -0
- package/dist/components/ui/sheet.d.ts +4 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +12 -9
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/sonner.d.ts +4 -3
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +7 -6
- package/dist/components/ui/split-view.d.ts +11 -0
- package/dist/components/ui/split-view.d.ts.map +1 -0
- package/dist/components/ui/split-view.js +13 -0
- package/dist/components/ui/status.d.ts +13 -0
- package/dist/components/ui/status.d.ts.map +1 -0
- package/dist/components/ui/status.js +36 -0
- package/dist/components/ui/table.d.ts +11 -2
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +33 -6
- package/dist/components/ui/text.d.ts +17 -0
- package/dist/components/ui/text.d.ts.map +1 -0
- package/dist/components/ui/text.js +55 -0
- package/dist/components/ui/toggle.d.ts +12 -4
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +13 -2
- package/dist/components/ui/toolbar.d.ts +27 -0
- package/dist/components/ui/toolbar.d.ts.map +1 -0
- package/dist/components/ui/toolbar.js +71 -0
- package/dist/components/ui/tooltip.d.ts +8 -3
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +11 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/lib/frame-lifecycle.d.ts +29 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +85 -0
- package/dist/lib/native-capabilities/access.d.ts +13 -0
- package/dist/lib/native-capabilities/access.d.ts.map +1 -0
- package/dist/lib/native-capabilities/access.js +53 -0
- package/dist/lib/native-capabilities/bluetooth-access.d.ts +14 -0
- package/dist/lib/native-capabilities/bluetooth-access.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-access.js +43 -0
- package/dist/lib/native-capabilities/bluetooth-connection.d.ts +19 -0
- package/dist/lib/native-capabilities/bluetooth-connection.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-connection.js +88 -0
- package/dist/lib/native-capabilities/bluetooth-gatt.d.ts +7 -0
- package/dist/lib/native-capabilities/bluetooth-gatt.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-gatt.js +77 -0
- package/dist/lib/native-capabilities/bluetooth-internal.d.ts +10 -0
- package/dist/lib/native-capabilities/bluetooth-internal.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-internal.js +105 -0
- package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts +33 -0
- package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-native-fallback.js +214 -0
- package/dist/lib/native-capabilities/bluetooth-types.d.ts +85 -0
- package/dist/lib/native-capabilities/bluetooth-types.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-types.js +2 -0
- package/dist/lib/native-capabilities/bluetooth.d.ts +7 -0
- package/dist/lib/native-capabilities/bluetooth.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth.js +4 -0
- package/dist/lib/native-capabilities/bridge.d.ts +23 -0
- package/dist/lib/native-capabilities/bridge.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bridge.js +266 -0
- package/dist/lib/native-capabilities/capabilities.d.ts +7 -0
- package/dist/lib/native-capabilities/capabilities.d.ts.map +1 -0
- package/dist/lib/native-capabilities/capabilities.js +95 -0
- package/dist/lib/native-capabilities/clipboard.d.ts +11 -0
- package/dist/lib/native-capabilities/clipboard.d.ts.map +1 -0
- package/dist/lib/native-capabilities/clipboard.js +58 -0
- package/dist/lib/native-capabilities/device-io-errors.d.ts +11 -0
- package/dist/lib/native-capabilities/device-io-errors.d.ts.map +1 -0
- package/dist/lib/native-capabilities/device-io-errors.js +82 -0
- package/dist/lib/native-capabilities/displays.d.ts +38 -0
- package/dist/lib/native-capabilities/displays.d.ts.map +1 -0
- package/dist/lib/native-capabilities/displays.js +12 -0
- package/dist/lib/native-capabilities/global-shortcuts.d.ts +86 -0
- package/dist/lib/native-capabilities/global-shortcuts.d.ts.map +1 -0
- package/dist/lib/native-capabilities/global-shortcuts.js +351 -0
- package/dist/lib/native-capabilities/haptics.d.ts +25 -0
- package/dist/lib/native-capabilities/haptics.d.ts.map +1 -0
- package/dist/lib/native-capabilities/haptics.js +18 -0
- package/dist/lib/native-capabilities/hid-native.d.ts +26 -0
- package/dist/lib/native-capabilities/hid-native.d.ts.map +1 -0
- package/dist/lib/native-capabilities/hid-native.js +229 -0
- package/dist/lib/native-capabilities/hid.d.ts +52 -0
- package/dist/lib/native-capabilities/hid.d.ts.map +1 -0
- package/dist/lib/native-capabilities/hid.js +163 -0
- package/dist/lib/native-capabilities/index.d.ts +40 -0
- package/dist/lib/native-capabilities/index.d.ts.map +1 -0
- package/dist/lib/native-capabilities/index.js +21 -0
- package/dist/lib/native-capabilities/local-authentication.d.ts +32 -0
- package/dist/lib/native-capabilities/local-authentication.d.ts.map +1 -0
- package/dist/lib/native-capabilities/local-authentication.js +46 -0
- package/dist/lib/native-capabilities/location.d.ts +49 -0
- package/dist/lib/native-capabilities/location.d.ts.map +1 -0
- package/dist/lib/native-capabilities/location.js +114 -0
- package/dist/lib/native-capabilities/media-permissions.d.ts +28 -0
- package/dist/lib/native-capabilities/media-permissions.d.ts.map +1 -0
- package/dist/lib/native-capabilities/media-permissions.js +37 -0
- package/dist/lib/native-capabilities/media.d.ts +17 -0
- package/dist/lib/native-capabilities/media.d.ts.map +1 -0
- package/dist/lib/native-capabilities/media.js +104 -0
- package/dist/lib/native-capabilities/midi-access.d.ts +13 -0
- package/dist/lib/native-capabilities/midi-access.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-access.js +68 -0
- package/dist/lib/native-capabilities/midi-internal.d.ts +12 -0
- package/dist/lib/native-capabilities/midi-internal.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-internal.js +88 -0
- package/dist/lib/native-capabilities/midi-native-fallback.d.ts +27 -0
- package/dist/lib/native-capabilities/midi-native-fallback.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-native-fallback.js +127 -0
- package/dist/lib/native-capabilities/midi-ports.d.ts +6 -0
- package/dist/lib/native-capabilities/midi-ports.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-ports.js +115 -0
- package/dist/lib/native-capabilities/midi-types.d.ts +25 -0
- package/dist/lib/native-capabilities/midi-types.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-types.js +1 -0
- package/dist/lib/native-capabilities/midi.d.ts +6 -0
- package/dist/lib/native-capabilities/midi.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi.js +3 -0
- package/dist/lib/native-capabilities/native-device-io.d.ts +28 -0
- package/dist/lib/native-capabilities/native-device-io.d.ts.map +1 -0
- package/dist/lib/native-capabilities/native-device-io.js +91 -0
- package/dist/lib/native-capabilities/native-device-lifecycle.d.ts +13 -0
- package/dist/lib/native-capabilities/native-device-lifecycle.d.ts.map +1 -0
- package/dist/lib/native-capabilities/native-device-lifecycle.js +40 -0
- package/dist/lib/native-capabilities/notifications.d.ts +38 -0
- package/dist/lib/native-capabilities/notifications.d.ts.map +1 -0
- package/dist/lib/native-capabilities/notifications.js +50 -0
- package/dist/lib/native-capabilities/power-session.d.ts +113 -0
- package/dist/lib/native-capabilities/power-session.d.ts.map +1 -0
- package/dist/lib/native-capabilities/power-session.js +264 -0
- package/dist/lib/native-capabilities/secure-storage.d.ts +36 -0
- package/dist/lib/native-capabilities/secure-storage.d.ts.map +1 -0
- package/dist/lib/native-capabilities/secure-storage.js +64 -0
- package/dist/lib/native-capabilities/serial-native.d.ts +23 -0
- package/dist/lib/native-capabilities/serial-native.d.ts.map +1 -0
- package/dist/lib/native-capabilities/serial-native.js +181 -0
- package/dist/lib/native-capabilities/serial.d.ts +76 -0
- package/dist/lib/native-capabilities/serial.d.ts.map +1 -0
- package/dist/lib/native-capabilities/serial.js +215 -0
- package/dist/lib/native-capabilities/system-audio.d.ts +127 -0
- package/dist/lib/native-capabilities/system-audio.d.ts.map +1 -0
- package/dist/lib/native-capabilities/system-audio.js +330 -0
- package/dist/lib/native-capabilities/types.d.ts +62 -0
- package/dist/lib/native-capabilities/types.d.ts.map +1 -0
- package/dist/lib/native-capabilities/types.js +27 -0
- package/dist/lib/native-capabilities/usb-native.d.ts +39 -0
- package/dist/lib/native-capabilities/usb-native.d.ts.map +1 -0
- package/dist/lib/native-capabilities/usb-native.js +217 -0
- package/dist/lib/native-capabilities/usb.d.ts +85 -0
- package/dist/lib/native-capabilities/usb.d.ts.map +1 -0
- package/dist/lib/native-capabilities/usb.js +225 -0
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +2 -1
- package/docs/README.md +39 -0
- package/docs/accessibility.md +32 -0
- package/docs/adaptive-materials.md +79 -0
- package/docs/app-anatomy.md +74 -0
- package/docs/component-catalog.md +82 -0
- package/docs/component-guide-template.md +37 -0
- package/docs/design-tokens.md +185 -0
- package/docs/foundations.md +58 -0
- package/docs/native-integration.md +33 -0
- package/docs/standalone-app-windows.md +136 -0
- package/package.json +8 -3
- package/src/components/ui/alert-dialog.md +31 -0
- package/src/components/ui/alert.md +77 -0
- package/src/components/ui/app-frame.md +38 -0
- package/src/components/ui/badge.md +57 -0
- package/src/components/ui/button.md +76 -0
- package/src/components/ui/collapsible.md +52 -0
- package/src/components/ui/color-well.md +11 -0
- package/src/components/ui/combobox.md +42 -0
- package/src/components/ui/command.md +54 -0
- package/src/components/ui/date-field.md +32 -0
- package/src/components/ui/date-picker.md +55 -0
- package/src/components/ui/dialog.md +40 -0
- package/src/components/ui/edge-fade.md +7 -0
- package/src/components/ui/empty.md +87 -0
- package/src/components/ui/field.md +77 -0
- package/src/components/ui/grid.md +109 -0
- package/src/components/ui/icon-button.md +36 -0
- package/src/components/ui/inspector.md +11 -0
- package/src/components/ui/item.md +87 -0
- package/src/components/ui/list.md +140 -0
- package/src/components/ui/material.md +51 -0
- package/src/components/ui/navigation-button-group.md +46 -0
- package/src/components/ui/notification-dot.md +7 -0
- package/src/components/ui/number-input.md +19 -0
- package/src/components/ui/panel.md +11 -0
- package/src/components/ui/popover.md +31 -0
- package/src/components/ui/resizable.md +66 -0
- package/src/components/ui/scroll-area.md +72 -0
- package/src/components/ui/search-field.md +33 -0
- package/src/components/ui/segmented-control.md +36 -0
- package/src/components/ui/sheet.md +30 -0
- package/src/components/ui/sidebar.md +113 -0
- package/src/components/ui/sonner.md +37 -0
- package/src/components/ui/split-view.md +15 -0
- package/src/components/ui/status.md +12 -0
- package/src/components/ui/table.md +37 -0
- package/src/components/ui/tabs.md +66 -0
- package/src/components/ui/text.md +17 -0
- package/src/components/ui/toggle-button.md +48 -0
- package/src/components/ui/toggle-group.md +80 -0
- package/src/components/ui/toggle.md +73 -0
- package/src/components/ui/toolbar.md +26 -0
- package/src/components/ui/tooltip.md +31 -0
- package/src/styles/index.css +704 -3
|
@@ -0,0 +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,2CAwMpB;AAED,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Check, Copy, LocateFixed, MapPin } from 'lucide-react';
|
|
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';
|
|
11
|
+
/**
|
|
12
|
+
* One-shot location state machine behind `LocationPanel`. Use directly to
|
|
13
|
+
* build custom location UI on the same authorization/error handling.
|
|
14
|
+
*/
|
|
15
|
+
export function useMoldableLocation(options = {}) {
|
|
16
|
+
const [status, setStatus] = useState('idle');
|
|
17
|
+
const [position, setPosition] = useState(null);
|
|
18
|
+
const [authorization, setAuthorization] = useState(null);
|
|
19
|
+
const [error, setError] = useState(null);
|
|
20
|
+
const optionsRef = useRef(options);
|
|
21
|
+
const tokenRef = useRef(0);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
optionsRef.current = options;
|
|
24
|
+
}, [options]);
|
|
25
|
+
const locate = useCallback(async () => {
|
|
26
|
+
const token = ++tokenRef.current;
|
|
27
|
+
setStatus('locating');
|
|
28
|
+
setPosition(null);
|
|
29
|
+
setAuthorization(null);
|
|
30
|
+
setError(null);
|
|
31
|
+
void getMoldableLocationAuthorizationStatus()
|
|
32
|
+
.then((state) => {
|
|
33
|
+
if (tokenRef.current === token)
|
|
34
|
+
setAuthorization(state);
|
|
35
|
+
})
|
|
36
|
+
.catch(() => {
|
|
37
|
+
// Authorization detail is best-effort outside Moldable.
|
|
38
|
+
});
|
|
39
|
+
try {
|
|
40
|
+
const result = await getMoldableCurrentPosition({
|
|
41
|
+
enableHighAccuracy: true,
|
|
42
|
+
timeout: 10_000,
|
|
43
|
+
...optionsRef.current,
|
|
44
|
+
});
|
|
45
|
+
if (tokenRef.current !== token)
|
|
46
|
+
return;
|
|
47
|
+
setPosition(result);
|
|
48
|
+
setStatus('success');
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
catch (cause) {
|
|
52
|
+
if (tokenRef.current !== token)
|
|
53
|
+
return null;
|
|
54
|
+
setError(cause instanceof Error ? cause : new Error(String(cause)));
|
|
55
|
+
setStatus(cause instanceof NativeCapabilityBridgeError &&
|
|
56
|
+
cause.code === 'permission_denied'
|
|
57
|
+
? 'denied'
|
|
58
|
+
: 'error');
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}, []);
|
|
62
|
+
useEffect(() => () => {
|
|
63
|
+
tokenRef.current++;
|
|
64
|
+
}, []);
|
|
65
|
+
return { status, position, authorization, error, locate };
|
|
66
|
+
}
|
|
67
|
+
function formatCoordinate(value, axis) {
|
|
68
|
+
const hemisphere = axis === 'lat' ? (value >= 0 ? 'N' : 'S') : value >= 0 ? 'E' : 'W';
|
|
69
|
+
return `${Math.abs(value).toFixed(5)}° ${hemisphere}`;
|
|
70
|
+
}
|
|
71
|
+
function formatClock(timestamp) {
|
|
72
|
+
return new Date(timestamp).toLocaleTimeString(undefined, { hour12: false });
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Current-position panel: authorization state, one-shot fix, mono coordinate
|
|
76
|
+
* readout with copy, accuracy/altitude/speed details.
|
|
77
|
+
*/
|
|
78
|
+
function LocationPanel({ className, options, autoLocate = false, onLocation, ...props }) {
|
|
79
|
+
const location = useMoldableLocation(options);
|
|
80
|
+
const [copied, setCopied] = useState(false);
|
|
81
|
+
const [copyError, setCopyError] = useState(null);
|
|
82
|
+
const autoLocatedRef = useRef(false);
|
|
83
|
+
const copyTokenRef = useRef(0);
|
|
84
|
+
const copyTimeoutRef = useRef(null);
|
|
85
|
+
const { locate } = location;
|
|
86
|
+
const runLocate = useCallback(async () => {
|
|
87
|
+
const result = await locate();
|
|
88
|
+
if (result)
|
|
89
|
+
onLocation?.(result);
|
|
90
|
+
}, [locate, onLocation]);
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (autoLocate && !autoLocatedRef.current) {
|
|
93
|
+
autoLocatedRef.current = true;
|
|
94
|
+
void runLocate();
|
|
95
|
+
}
|
|
96
|
+
}, [autoLocate, runLocate]);
|
|
97
|
+
const { position } = location;
|
|
98
|
+
useEffect(() => () => {
|
|
99
|
+
copyTokenRef.current++;
|
|
100
|
+
if (copyTimeoutRef.current !== null) {
|
|
101
|
+
window.clearTimeout(copyTimeoutRef.current);
|
|
102
|
+
}
|
|
103
|
+
}, []);
|
|
104
|
+
const copyCoordinates = async () => {
|
|
105
|
+
if (!position)
|
|
106
|
+
return;
|
|
107
|
+
const token = ++copyTokenRef.current;
|
|
108
|
+
const text = `${position.coords.latitude}, ${position.coords.longitude}`;
|
|
109
|
+
setCopied(false);
|
|
110
|
+
setCopyError(null);
|
|
111
|
+
try {
|
|
112
|
+
await writeMoldableClipboardText(text);
|
|
113
|
+
}
|
|
114
|
+
catch (cause) {
|
|
115
|
+
if (copyTokenRef.current !== token)
|
|
116
|
+
return;
|
|
117
|
+
setCopyError(cause instanceof Error
|
|
118
|
+
? cause
|
|
119
|
+
: new Error('Could not copy coordinates.'));
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (copyTokenRef.current !== token)
|
|
123
|
+
return;
|
|
124
|
+
setCopied(true);
|
|
125
|
+
if (copyTimeoutRef.current !== null) {
|
|
126
|
+
window.clearTimeout(copyTimeoutRef.current);
|
|
127
|
+
}
|
|
128
|
+
copyTimeoutRef.current = window.setTimeout(() => {
|
|
129
|
+
setCopied(false);
|
|
130
|
+
copyTimeoutRef.current = null;
|
|
131
|
+
}, 1500);
|
|
132
|
+
};
|
|
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: "font-mono text-xl font-medium tabular-nums tracking-tight sm:text-2xl", 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
|
+
? 'Coordinates copied'
|
|
136
|
+
: copyError
|
|
137
|
+
? 'Copy coordinates failed; try again'
|
|
138
|
+
: 'Copy coordinates', "data-copy-status": copied ? 'success' : copyError ? 'error' : 'idle', title: copyError?.message, onClick: () => void copyCoordinates(), children: copied ? _jsx(Check, { className: "text-success" }) : _jsx(Copy, {}) })] }), _jsxs(Readout, { children: [_jsx(ReadoutItem, { label: "Accuracy", value: `± ${Math.round(position.coords.accuracy)}`, unit: "m" }), _jsx(ReadoutItem, { label: "Altitude", value: position.coords.altitude === null
|
|
139
|
+
? null
|
|
140
|
+
: Math.round(position.coords.altitude), unit: "m" }), _jsx(ReadoutItem, { label: "Speed", value: position.coords.speed === null
|
|
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 rounded-full border motion-reduce:animate-none" }), _jsx("span", { className: "text-muted-foreground bg-background shadow-xs relative flex size-10 items-center justify-center rounded-full border [&_svg]:size-4", children: _jsx(LocateFixed, {}) })] }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Getting your position\u2026" })] })) : location.status === 'denied' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-sm font-medium", children: "Location access denied" }), _jsx("p", { className: "text-muted-foreground max-w-64 text-xs", children: "Enable Location Services for Moldable in System Settings, then try again." })] })) : location.status === 'error' ? (_jsxs(_Fragment, { children: [_jsx("p", { className: "text-sm font-medium", children: "Couldn't get a fix" }), _jsx("p", { className: "text-muted-foreground max-w-64 text-xs", children: location.error?.message ?? 'Location request failed.' })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground bg-background shadow-xs flex size-10 items-center justify-center rounded-lg border [&_svg]:size-5", children: _jsx(MapPin, {}) }), _jsx("p", { className: "text-muted-foreground text-xs", children: "No position yet" })] })) })) }), _jsxs(NativeCapabilityPanelFooter, { children: [_jsx("span", { className: "truncate", children: location.authorization
|
|
143
|
+
? `Authorization ${location.authorization.authorization}${location.authorization.servicesEnabled ? '' : ' · services off'}`
|
|
144
|
+
: 'Authorization unknown' }), position ? (_jsx("span", { className: "ml-auto shrink-0 font-mono tabular-nums", children: formatClock(position.timestamp) })) : null] })] }));
|
|
145
|
+
}
|
|
146
|
+
export { LocationPanel, formatCoordinate };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type MoldableMicrophoneStatus = 'idle' | 'starting' | 'live' | 'muted' | 'denied' | 'error';
|
|
3
|
+
export interface UseMoldableMicrophoneOptions {
|
|
4
|
+
/** Extra audio constraints merged over the processing defaults. */
|
|
5
|
+
constraints?: MediaTrackConstraints;
|
|
6
|
+
onStreamChange?: (stream: MediaStream | null) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Microphone state machine behind `MicrophoneMeter`. Use directly to build
|
|
10
|
+
* custom audio UI on the same permission/device/stream handling.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useMoldableMicrophone(options?: UseMoldableMicrophoneOptions): {
|
|
13
|
+
status: MoldableMicrophoneStatus;
|
|
14
|
+
stream: MediaStream | null;
|
|
15
|
+
devices: MediaDeviceInfo[];
|
|
16
|
+
deviceId: string | null;
|
|
17
|
+
error: Error | null;
|
|
18
|
+
start: (nextDeviceId?: string) => Promise<void>;
|
|
19
|
+
stop: () => void;
|
|
20
|
+
selectDevice: (id: string) => void;
|
|
21
|
+
refreshDevices: () => Promise<void>;
|
|
22
|
+
};
|
|
23
|
+
export interface MicrophoneMeterProps extends React.ComponentProps<'div'> {
|
|
24
|
+
constraints?: MediaTrackConstraints;
|
|
25
|
+
/** Start the microphone on mount. */
|
|
26
|
+
autoStart?: boolean;
|
|
27
|
+
onStreamChange?: (stream: MediaStream | null) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Microphone panel: permission flow, device switching, and a live frequency
|
|
31
|
+
* visualizer driven by an `AnalyserNode` without re-rendering per frame.
|
|
32
|
+
*/
|
|
33
|
+
declare function MicrophoneMeter({ className, constraints, autoStart, onStreamChange, ...props }: MicrophoneMeterProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export { MicrophoneMeter };
|
|
35
|
+
//# sourceMappingURL=microphone-meter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"microphone-meter.d.ts","sourceRoot":"","sources":["../../../src/components/native-capabilities/microphone-meter.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA+B9B,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN,UAAU,GACV,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,CAAA;AAEX,MAAM,WAAW,4BAA4B;IAC3C,mEAAmE;IACnE,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CACtD;AAuBD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,4BAAiC;;;;;;2BAgDlB,MAAM;;uBA4EvB,MAAM;;EA2Bd;AAKD,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACvE,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,qCAAqC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;CACtD;AAED;;;GAGG;AACH,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,WAAW,EACX,SAAiB,EACjB,cAAc,EACd,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAiNtB;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Mic, MicOff, RefreshCw, Square } from 'lucide-react';
|
|
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';
|
|
12
|
+
function isPermissionDenied(error) {
|
|
13
|
+
if (error instanceof NativeCapabilityBridgeError) {
|
|
14
|
+
return error.code === 'permission_denied';
|
|
15
|
+
}
|
|
16
|
+
return (error instanceof DOMException &&
|
|
17
|
+
(error.name === 'NotAllowedError' || error.name === 'SecurityError'));
|
|
18
|
+
}
|
|
19
|
+
function assertMediaPermissionGranted(status) {
|
|
20
|
+
if (status.status !== 'denied' && status.status !== 'restricted')
|
|
21
|
+
return;
|
|
22
|
+
throw new NativeCapabilityBridgeError({
|
|
23
|
+
code: 'permission_denied',
|
|
24
|
+
message: status.detail ?? 'Microphone access was denied.',
|
|
25
|
+
retryable: false,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Microphone state machine behind `MicrophoneMeter`. Use directly to build
|
|
30
|
+
* custom audio UI on the same permission/device/stream handling.
|
|
31
|
+
*/
|
|
32
|
+
export function useMoldableMicrophone(options = {}) {
|
|
33
|
+
const [status, setStatus] = useState('idle');
|
|
34
|
+
const [stream, setStream] = useState(null);
|
|
35
|
+
const [devices, setDevices] = useState([]);
|
|
36
|
+
const [deviceId, setDeviceIdState] = useState(null);
|
|
37
|
+
const [error, setError] = useState(null);
|
|
38
|
+
const streamRef = useRef(null);
|
|
39
|
+
const deviceIdRef = useRef(null);
|
|
40
|
+
const tokenRef = useRef(0);
|
|
41
|
+
const constraintsRef = useRef(options.constraints);
|
|
42
|
+
const onStreamChangeRef = useRef(options.onStreamChange);
|
|
43
|
+
const detachTrackListenersRef = useRef(null);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
constraintsRef.current = options.constraints;
|
|
46
|
+
onStreamChangeRef.current = options.onStreamChange;
|
|
47
|
+
}, [options.constraints, options.onStreamChange]);
|
|
48
|
+
const dropStream = useCallback((updateState = true) => {
|
|
49
|
+
detachTrackListenersRef.current?.();
|
|
50
|
+
detachTrackListenersRef.current = null;
|
|
51
|
+
const previousStream = streamRef.current;
|
|
52
|
+
if (!previousStream)
|
|
53
|
+
return false;
|
|
54
|
+
streamRef.current = null;
|
|
55
|
+
stopMoldableMediaStream(previousStream);
|
|
56
|
+
if (updateState)
|
|
57
|
+
setStream(null);
|
|
58
|
+
onStreamChangeRef.current?.(null);
|
|
59
|
+
return true;
|
|
60
|
+
}, []);
|
|
61
|
+
const stop = useCallback(() => {
|
|
62
|
+
tokenRef.current++;
|
|
63
|
+
dropStream();
|
|
64
|
+
setStatus('idle');
|
|
65
|
+
}, [dropStream]);
|
|
66
|
+
const refreshDevices = useCallback(async () => {
|
|
67
|
+
try {
|
|
68
|
+
const all = await enumerateMoldableMediaDevices('microphone');
|
|
69
|
+
setDevices(all.filter((device) => device.kind === 'audioinput'));
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
// Device labels are best-effort; enumeration can fail outside Moldable.
|
|
73
|
+
}
|
|
74
|
+
}, []);
|
|
75
|
+
const start = useCallback(async (nextDeviceId) => {
|
|
76
|
+
const token = ++tokenRef.current;
|
|
77
|
+
dropStream();
|
|
78
|
+
setStatus('starting');
|
|
79
|
+
setError(null);
|
|
80
|
+
try {
|
|
81
|
+
// Nudge the native permission first so macOS prompts before the
|
|
82
|
+
// webview does. Outside Moldable this fails and the browser prompt
|
|
83
|
+
// covers it on getUserMedia.
|
|
84
|
+
try {
|
|
85
|
+
const permission = await getMoldableMediaPermissionStatus('microphone');
|
|
86
|
+
assertMediaPermissionGranted(permission);
|
|
87
|
+
if (permission.status === 'not-determined' && permission.canRequest) {
|
|
88
|
+
assertMediaPermissionGranted(await requestMoldableMediaPermission('microphone'));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (cause) {
|
|
92
|
+
if (isPermissionDenied(cause))
|
|
93
|
+
throw cause;
|
|
94
|
+
// Not in Moldable — proceed straight to the stream request.
|
|
95
|
+
}
|
|
96
|
+
if (tokenRef.current !== token)
|
|
97
|
+
return;
|
|
98
|
+
const target = nextDeviceId ?? deviceIdRef.current;
|
|
99
|
+
const media = await getMoldableMicrophoneStream({
|
|
100
|
+
echoCancellation: true,
|
|
101
|
+
noiseSuppression: true,
|
|
102
|
+
...constraintsRef.current,
|
|
103
|
+
...(target ? { deviceId: { exact: target } } : {}),
|
|
104
|
+
});
|
|
105
|
+
if (tokenRef.current !== token) {
|
|
106
|
+
stopMoldableMediaStream(media);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
streamRef.current = media;
|
|
110
|
+
const [track] = media.getAudioTracks();
|
|
111
|
+
if (track) {
|
|
112
|
+
const handleEnded = () => {
|
|
113
|
+
if (tokenRef.current !== token)
|
|
114
|
+
return;
|
|
115
|
+
tokenRef.current++;
|
|
116
|
+
dropStream();
|
|
117
|
+
setStatus('idle');
|
|
118
|
+
};
|
|
119
|
+
const handleMute = () => {
|
|
120
|
+
if (tokenRef.current === token)
|
|
121
|
+
setStatus('muted');
|
|
122
|
+
};
|
|
123
|
+
const handleUnmute = () => {
|
|
124
|
+
if (tokenRef.current === token)
|
|
125
|
+
setStatus('live');
|
|
126
|
+
};
|
|
127
|
+
track.addEventListener('ended', handleEnded, { once: true });
|
|
128
|
+
track.addEventListener('mute', handleMute);
|
|
129
|
+
track.addEventListener('unmute', handleUnmute);
|
|
130
|
+
detachTrackListenersRef.current = () => {
|
|
131
|
+
track.removeEventListener('ended', handleEnded);
|
|
132
|
+
track.removeEventListener('mute', handleMute);
|
|
133
|
+
track.removeEventListener('unmute', handleUnmute);
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
setStream(media);
|
|
137
|
+
if (nextDeviceId !== undefined) {
|
|
138
|
+
deviceIdRef.current = nextDeviceId;
|
|
139
|
+
setDeviceIdState(nextDeviceId);
|
|
140
|
+
}
|
|
141
|
+
setStatus('live');
|
|
142
|
+
onStreamChangeRef.current?.(media);
|
|
143
|
+
void refreshDevices();
|
|
144
|
+
}
|
|
145
|
+
catch (cause) {
|
|
146
|
+
if (tokenRef.current !== token)
|
|
147
|
+
return;
|
|
148
|
+
setError(cause instanceof Error ? cause : new Error(String(cause)));
|
|
149
|
+
setStatus(isPermissionDenied(cause) ? 'denied' : 'error');
|
|
150
|
+
}
|
|
151
|
+
}, [dropStream, refreshDevices]);
|
|
152
|
+
const selectDevice = useCallback((id) => {
|
|
153
|
+
deviceIdRef.current = id;
|
|
154
|
+
setDeviceIdState(id);
|
|
155
|
+
if (streamRef.current)
|
|
156
|
+
void start(id);
|
|
157
|
+
}, [start]);
|
|
158
|
+
useEffect(() => () => {
|
|
159
|
+
tokenRef.current++;
|
|
160
|
+
dropStream(false);
|
|
161
|
+
}, [dropStream]);
|
|
162
|
+
return {
|
|
163
|
+
status,
|
|
164
|
+
stream,
|
|
165
|
+
devices,
|
|
166
|
+
deviceId,
|
|
167
|
+
error,
|
|
168
|
+
start,
|
|
169
|
+
stop,
|
|
170
|
+
selectDevice,
|
|
171
|
+
refreshDevices,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
const BAR_COUNT = 56;
|
|
175
|
+
const BAR_REST_SCALE = 0.06;
|
|
176
|
+
/**
|
|
177
|
+
* Microphone panel: permission flow, device switching, and a live frequency
|
|
178
|
+
* visualizer driven by an `AnalyserNode` without re-rendering per frame.
|
|
179
|
+
*/
|
|
180
|
+
function MicrophoneMeter({ className, constraints, autoStart = false, onStreamChange, ...props }) {
|
|
181
|
+
const microphone = useMoldableMicrophone({ constraints, onStreamChange });
|
|
182
|
+
const barsRef = useRef([]);
|
|
183
|
+
const autoStartedRef = useRef(false);
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
if (autoStart && !autoStartedRef.current) {
|
|
186
|
+
autoStartedRef.current = true;
|
|
187
|
+
void microphone.start();
|
|
188
|
+
}
|
|
189
|
+
}, [autoStart, microphone]);
|
|
190
|
+
const { stream } = microphone;
|
|
191
|
+
useEffect(() => {
|
|
192
|
+
if (!stream || typeof AudioContext === 'undefined')
|
|
193
|
+
return;
|
|
194
|
+
const bars = barsRef.current;
|
|
195
|
+
const context = new AudioContext();
|
|
196
|
+
const analyser = context.createAnalyser();
|
|
197
|
+
analyser.fftSize = 256;
|
|
198
|
+
analyser.smoothingTimeConstant = 0.7;
|
|
199
|
+
const source = context.createMediaStreamSource(stream);
|
|
200
|
+
source.connect(analyser);
|
|
201
|
+
const bins = new Uint8Array(analyser.frequencyBinCount);
|
|
202
|
+
const step = analyser.frequencyBinCount / BAR_COUNT;
|
|
203
|
+
let frame = 0;
|
|
204
|
+
const draw = () => {
|
|
205
|
+
analyser.getByteFrequencyData(bins);
|
|
206
|
+
for (let index = 0; index < BAR_COUNT; index++) {
|
|
207
|
+
const bar = bars[index];
|
|
208
|
+
if (!bar)
|
|
209
|
+
continue;
|
|
210
|
+
const value = bins[Math.floor(index * step)] ?? 0;
|
|
211
|
+
const scale = Math.max(BAR_REST_SCALE, value / 255);
|
|
212
|
+
bar.style.transform = `scaleY(${scale.toFixed(3)})`;
|
|
213
|
+
}
|
|
214
|
+
frame = requestAnimationFrame(draw);
|
|
215
|
+
};
|
|
216
|
+
frame = requestAnimationFrame(draw);
|
|
217
|
+
return () => {
|
|
218
|
+
cancelAnimationFrame(frame);
|
|
219
|
+
source.disconnect();
|
|
220
|
+
void context.close().catch(() => {
|
|
221
|
+
// The context may already be closed by the browser.
|
|
222
|
+
});
|
|
223
|
+
for (const bar of bars) {
|
|
224
|
+
if (bar)
|
|
225
|
+
bar.style.transform = `scaleY(${BAR_REST_SCALE})`;
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
}, [stream]);
|
|
229
|
+
const live = microphone.status === 'live' || microphone.status === 'muted';
|
|
230
|
+
const starting = microphone.status === 'starting';
|
|
231
|
+
const settings = live ? stream?.getAudioTracks()[0]?.getSettings() : undefined;
|
|
232
|
+
return (_jsxs(NativeCapabilityPanel, { "data-slot": "microphone-meter", "data-status": microphone.status, className: className, ...props, children: [_jsxs(NativeCapabilityPanelHeader, { children: [_jsx(NativeCapabilityPanelIcon, { children: _jsx(Mic, {}) }), _jsx(NativeCapabilityPanelTitle, { children: "Microphone" }), _jsx(CapabilityBadge, { capability: "microphone" }), _jsx(NativeCapabilityPanelAction, { children: _jsxs(Button, { size: "sm", variant: live ? 'outline' : 'default', disabled: starting, onClick: () => {
|
|
233
|
+
if (live)
|
|
234
|
+
microphone.stop();
|
|
235
|
+
else
|
|
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 rounded-lg 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
|
+
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-xs", children: "Starting microphone\u2026" })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground bg-background shadow-xs flex size-10 items-center justify-center rounded-lg 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-sm", 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-sm font-medium", children: "Microphone access denied" }), _jsx("p", { className: "text-muted-foreground max-w-64 text-xs", 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-sm font-medium", children: "Microphone unavailable" }), _jsx("p", { className: "text-muted-foreground max-w-64 text-xs", children: microphone.error?.message ??
|
|
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
|
+
? `${settings.sampleRate.toLocaleString()} Hz`
|
|
242
|
+
: '— Hz' }), _jsx("span", { className: "ml-auto shrink-0 font-mono tabular-nums", children: settings?.channelCount ? `${settings.channelCount} ch` : '— ch' })] })] }));
|
|
243
|
+
}
|
|
244
|
+
export { MicrophoneMeter };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type MoldableMIDITransport } from '../../lib/native-capabilities';
|
|
3
|
+
export type MoldableMidiStatus = 'idle' | 'connecting' | 'connected' | 'error';
|
|
4
|
+
/**
|
|
5
|
+
* Human-readable summary of a raw MIDI message: note on/off with pitch name,
|
|
6
|
+
* control change, program change, and pitch bend; anything else as hex.
|
|
7
|
+
*/
|
|
8
|
+
declare function formatMidiMessage(data: Uint8Array | number[]): string;
|
|
9
|
+
export interface MoldableMidiPortInfo {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
manufacturer?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface UseMoldableMidiOptions {
|
|
15
|
+
onMessage?: (data: Uint8Array, portId: string) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* MIDI state machine behind `MidiMonitor`. Handles both transports returned
|
|
19
|
+
* by `requestMoldableMIDIWithFallback`: Web MIDI (full port enumeration and
|
|
20
|
+
* state observation) and the desktop bridge (host-owned per-port chooser via
|
|
21
|
+
* `requestPort`).
|
|
22
|
+
*/
|
|
23
|
+
export declare function useMoldableMidi(options?: UseMoldableMidiOptions): {
|
|
24
|
+
status: MoldableMidiStatus;
|
|
25
|
+
access: MoldableMIDITransport | null;
|
|
26
|
+
inputs: MoldableMidiPortInfo[];
|
|
27
|
+
outputs: MoldableMidiPortInfo[];
|
|
28
|
+
openInputIds: string[];
|
|
29
|
+
sysexEnabled: boolean;
|
|
30
|
+
error: Error | null;
|
|
31
|
+
entries: import("./stream-log").StreamLogEntry[];
|
|
32
|
+
connect: (connectOptions?: {
|
|
33
|
+
sysex?: boolean;
|
|
34
|
+
}) => Promise<void>;
|
|
35
|
+
disconnect: () => Promise<void>;
|
|
36
|
+
requestPort: (kind: "input" | "output") => Promise<void>;
|
|
37
|
+
openInput: (id: string) => Promise<void>;
|
|
38
|
+
closeInput: (id: string) => Promise<void>;
|
|
39
|
+
sendNote: (outputId: string, note?: number, velocity?: number) => Promise<void>;
|
|
40
|
+
sendSystemExclusive: (outputId: string, data?: Iterable<number>) => Promise<void>;
|
|
41
|
+
clearEntries: () => void;
|
|
42
|
+
};
|
|
43
|
+
export interface MidiMonitorProps extends React.ComponentProps<'div'> {
|
|
44
|
+
/** Request System Exclusive access when connecting. */
|
|
45
|
+
sysex?: boolean;
|
|
46
|
+
onMessage?: (data: Uint8Array, portId: string) => void;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* MIDI monitor panel: connect either transport, monitor inputs, fire a test
|
|
50
|
+
* note at outputs, and read a live parsed-message log.
|
|
51
|
+
*/
|
|
52
|
+
declare function MidiMonitor({ className, sysex, onMessage, ...props }: MidiMonitorProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
export { MidiMonitor, formatMidiMessage };
|
|
54
|
+
//# sourceMappingURL=midi-monitor.d.ts.map
|
|
@@ -0,0 +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,2CA+JlB;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAA"}
|