@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { callNativeHardwareBridge, } from './bridge';
|
|
1
|
+
import { callNativeHardwareBridge, } from './bridge.js';
|
|
2
2
|
export const NATIVE_NOTIFICATION_REQUEST_TYPE = 'moldable:native-notifications';
|
|
3
3
|
export const NATIVE_NOTIFICATION_RESULT_TYPE = 'moldable:native-notifications-result';
|
|
4
4
|
export const NATIVE_NOTIFICATION_MAX_TITLE_LENGTH = 256;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type NativeHardwareBridgeOptions } from './bridge';
|
|
2
|
-
import type { NativeHardwareRequestEnvelope, NativeHardwareResultEnvelope } from './types';
|
|
1
|
+
import { type NativeHardwareBridgeOptions } from './bridge.js';
|
|
2
|
+
import type { NativeHardwareRequestEnvelope, NativeHardwareResultEnvelope } from './types.js';
|
|
3
3
|
export declare const NATIVE_POWER_SESSION_REQUEST_TYPE: "moldable:native-power-session";
|
|
4
4
|
export declare const NATIVE_POWER_SESSION_RESULT_TYPE: "moldable:native-power-session-result";
|
|
5
5
|
export declare const NATIVE_POWER_SESSION_EVENT_TYPE: "moldable:native-power-session-event";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NativeHardwareBridgeError, callNativeHardwareBridge, resolveNativeHardwareParentOrigin, } from './bridge';
|
|
1
|
+
import { NativeHardwareBridgeError, callNativeHardwareBridge, resolveNativeHardwareParentOrigin, } from './bridge.js';
|
|
2
2
|
export const NATIVE_POWER_SESSION_REQUEST_TYPE = 'moldable:native-power-session';
|
|
3
3
|
export const NATIVE_POWER_SESSION_RESULT_TYPE = 'moldable:native-power-session-result';
|
|
4
4
|
export const NATIVE_POWER_SESSION_EVENT_TYPE = 'moldable:native-power-session-event';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type NativeHardwareBridgeOptions } from './bridge';
|
|
1
|
+
import { type NativeHardwareBridgeOptions } from './bridge.js';
|
|
2
2
|
export declare const NATIVE_SECURE_STORAGE_REQUEST_TYPE: "moldable:native-secure-storage";
|
|
3
3
|
export declare const NATIVE_SECURE_STORAGE_RESULT_TYPE: "moldable:native-secure-storage-result";
|
|
4
4
|
export declare const SECURE_STORAGE_MAX_KEY_LENGTH = 128;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { callNativeHardwareBridge, } from './bridge';
|
|
1
|
+
import { callNativeHardwareBridge, } from './bridge.js';
|
|
2
2
|
export const NATIVE_SECURE_STORAGE_REQUEST_TYPE = 'moldable:native-secure-storage';
|
|
3
3
|
export const NATIVE_SECURE_STORAGE_RESULT_TYPE = 'moldable:native-secure-storage-result';
|
|
4
4
|
export const SECURE_STORAGE_MAX_KEY_LENGTH = 128;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type MoldableNativeDeviceDescriptor } from './native-device-io';
|
|
2
|
-
import type { MoldableSerialInputSignals, MoldableSerialOpenOptions, MoldableSerialOutputSignals, MoldableSerialPort, MoldableSerialPortInfo } from './serial';
|
|
1
|
+
import { type MoldableNativeDeviceDescriptor } from './native-device-io.js';
|
|
2
|
+
import type { MoldableSerialInputSignals, MoldableSerialOpenOptions, MoldableSerialOutputSignals, MoldableSerialPort, MoldableSerialPortInfo } from './serial.js';
|
|
3
3
|
export declare class NativeMoldableSerialPort extends EventTarget implements MoldableSerialPort {
|
|
4
4
|
readonly descriptor: MoldableNativeDeviceDescriptor;
|
|
5
5
|
readable: ReadableStream<Uint8Array> | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NativeHardwareBridgeError } from './bridge';
|
|
2
|
-
import { bytesFromNativeDeviceResult, bytesWrittenFromNativeDeviceResult, closeMoldableNativeDevice, executeMoldableNativeDeviceOperation, openMoldableNativeDevice, } from './native-device-io';
|
|
3
|
-
import { NativeDeviceLifecycle, isNativeDeviceDisconnect, } from './native-device-lifecycle';
|
|
1
|
+
import { NativeHardwareBridgeError } from './bridge.js';
|
|
2
|
+
import { bytesFromNativeDeviceResult, bytesWrittenFromNativeDeviceResult, closeMoldableNativeDevice, executeMoldableNativeDeviceOperation, openMoldableNativeDevice, } from './native-device-io.js';
|
|
3
|
+
import { NativeDeviceLifecycle, isNativeDeviceDisconnect, } from './native-device-lifecycle.js';
|
|
4
4
|
export class NativeMoldableSerialPort extends EventTarget {
|
|
5
5
|
descriptor;
|
|
6
6
|
readable = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NativeHardwareBridgeError } from './bridge';
|
|
2
|
-
import { abortedDeviceIoError, awaitDeviceIoWithAbort, deviceIoError, unsupportedDeviceIoError, } from './device-io-errors';
|
|
3
|
-
import { listMoldableNativeDevices } from './native-device-io';
|
|
4
|
-
import { NativeMoldableSerialPort } from './serial-native';
|
|
1
|
+
import { NativeHardwareBridgeError } from './bridge.js';
|
|
2
|
+
import { abortedDeviceIoError, awaitDeviceIoWithAbort, deviceIoError, unsupportedDeviceIoError, } from './device-io-errors.js';
|
|
3
|
+
import { listMoldableNativeDevices } from './native-device-io.js';
|
|
4
|
+
import { NativeMoldableSerialPort } from './serial-native.js';
|
|
5
5
|
function assertNativeSerialFiltersSupported(options) {
|
|
6
6
|
if (options.allowedBluetoothServiceClassIds?.length ||
|
|
7
7
|
options.filters?.some((filter) => filter.bluetoothServiceClassId !== undefined)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type NativeHardwareBridgeOptions } from './bridge';
|
|
1
|
+
import { type NativeHardwareBridgeOptions } from './bridge.js';
|
|
2
2
|
export declare const NATIVE_SYSTEM_AUDIO_MAX_REPLAY_FRAMES = 500;
|
|
3
3
|
export declare const NATIVE_SYSTEM_AUDIO_PERMISSION_REQUEST_TIMEOUT_MS = 125000;
|
|
4
4
|
export type MoldableSystemAudioCaptureMode = 'systemAudio' | 'systemMicrophone';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NativeHardwareBridgeError, callNativeHardwareBridge, resolveNativeHardwareParentOrigin, } from './bridge';
|
|
1
|
+
import { NativeHardwareBridgeError, callNativeHardwareBridge, resolveNativeHardwareParentOrigin, } from './bridge.js';
|
|
2
2
|
const NATIVE_SYSTEM_AUDIO_REQUEST_TYPE = 'moldable:system-audio-request';
|
|
3
3
|
const NATIVE_SYSTEM_AUDIO_RESULT_TYPE = 'moldable:system-audio-response';
|
|
4
4
|
const NATIVE_SYSTEM_AUDIO_EVENT_TYPE = 'moldable:system-audio-event';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type MoldableNativeDeviceDescriptor } from './native-device-io';
|
|
2
|
-
import type { MoldableUsbControlTransferParameters, MoldableUsbDevice, MoldableUsbInTransferResult, MoldableUsbOpenOptions, MoldableUsbOperationOptions, MoldableUsbOutTransferResult } from './usb';
|
|
1
|
+
import { type MoldableNativeDeviceDescriptor } from './native-device-io.js';
|
|
2
|
+
import type { MoldableUsbControlTransferParameters, MoldableUsbDevice, MoldableUsbInTransferResult, MoldableUsbOpenOptions, MoldableUsbOperationOptions, MoldableUsbOutTransferResult } from './usb.js';
|
|
3
3
|
export declare class NativeMoldableUsbDevice extends EventTarget implements MoldableUsbDevice {
|
|
4
4
|
readonly descriptor: MoldableNativeDeviceDescriptor;
|
|
5
5
|
readonly vendorId: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NativeHardwareBridgeError } from './bridge';
|
|
2
|
-
import { bytesFromNativeDeviceResult, bytesWrittenFromNativeDeviceResult, closeMoldableNativeDevice, executeMoldableNativeDeviceOperation, openMoldableNativeDevice, } from './native-device-io';
|
|
3
|
-
import { NativeDeviceLifecycle, isNativeDeviceDisconnect, } from './native-device-lifecycle';
|
|
1
|
+
import { NativeHardwareBridgeError } from './bridge.js';
|
|
2
|
+
import { bytesFromNativeDeviceResult, bytesWrittenFromNativeDeviceResult, closeMoldableNativeDevice, executeMoldableNativeDeviceOperation, openMoldableNativeDevice, } from './native-device-io.js';
|
|
3
|
+
import { NativeDeviceLifecycle, isNativeDeviceDisconnect, } from './native-device-lifecycle.js';
|
|
4
4
|
const DEFAULT_TIMEOUT_MS = 10_000;
|
|
5
5
|
export class NativeMoldableUsbDevice extends EventTarget {
|
|
6
6
|
descriptor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { NativeHardwareBridgeError } from './bridge';
|
|
2
|
-
import { awaitDeviceIoWithAbort, deviceIoError, unsupportedDeviceIoError, } from './device-io-errors';
|
|
3
|
-
import { listMoldableNativeDevices } from './native-device-io';
|
|
4
|
-
import { NativeMoldableUsbDevice, isNativeMoldableUsbDevice, } from './usb-native';
|
|
1
|
+
import { NativeHardwareBridgeError } from './bridge.js';
|
|
2
|
+
import { awaitDeviceIoWithAbort, deviceIoError, unsupportedDeviceIoError, } from './device-io-errors.js';
|
|
3
|
+
import { listMoldableNativeDevices } from './native-device-io.js';
|
|
4
|
+
import { NativeMoldableUsbDevice, isNativeMoldableUsbDevice, } from './usb-native.js';
|
|
5
5
|
function assertNativeUsbFiltersSupported(filters) {
|
|
6
6
|
if (filters?.some((filter) => filter.classCode !== undefined ||
|
|
7
7
|
filter.subclassCode !== undefined ||
|
package/dist/lib/theme.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, useCallback, useContext, useEffect, useState, } from 'react';
|
|
4
|
-
import { TooltipProvider } from '../components/ui/tooltip';
|
|
4
|
+
import { TooltipProvider } from '../components/ui/tooltip.js';
|
|
5
5
|
const ThemeContext = createContext(null);
|
|
6
6
|
const STORAGE_KEY = 'moldable-theme';
|
|
7
7
|
function getSystemTheme() {
|
package/docs/README.md
CHANGED
|
@@ -12,6 +12,7 @@ feels at home on macOS without imitating private platform implementation.
|
|
|
12
12
|
- [App anatomy](./app-anatomy.md)
|
|
13
13
|
- [Standalone app windows](./standalone-app-windows.md)
|
|
14
14
|
- [Component catalog](./component-catalog.md)
|
|
15
|
+
- [Visual and accessibility regression](./visual-regression.md)
|
|
15
16
|
- [Accessibility](./accessibility.md)
|
|
16
17
|
- [Native integration](./native-integration.md)
|
|
17
18
|
- [Component guide template](./component-guide-template.md)
|
package/docs/design-tokens.md
CHANGED
|
@@ -28,6 +28,11 @@ The default UI font is the platform sans-serif stack. Monospaced text uses the
|
|
|
28
28
|
platform monospace stack. Prefer `Text` for normal interface copy; the token
|
|
29
29
|
utilities are useful for display-scale titles and highly composed canvases.
|
|
30
30
|
|
|
31
|
+
The native UI scale is deliberately small: `--text-11` for captions and
|
|
32
|
+
metadata, `--text-13` for body and control text, `--text-16` for emphasized
|
|
33
|
+
titles, `--text-18` for secondary headings, and `--text-24` for primary
|
|
34
|
+
headings. Long-form Markdown keeps its prose scale.
|
|
35
|
+
|
|
31
36
|
| Role | CSS token | Tailwind utility | Use |
|
|
32
37
|
| ------- | ------------------ | ----------------- | ---------------------------------- |
|
|
33
38
|
| Display | `--type-display-*` | `text-ui-display` | One dominant app or document title |
|
|
@@ -109,15 +114,32 @@ disabled, and invalid states. Disabled wins over pointer states. Focus remains
|
|
|
109
114
|
visible when combined with selected or invalid. Selection is durable state;
|
|
110
115
|
hover is not a substitute for it.
|
|
111
116
|
|
|
117
|
+
Focus rings use the neutral translucent `--ring` token at one pixel. Never use
|
|
118
|
+
plain `focus:` ring utilities or accent colors for keyboard focus.
|
|
119
|
+
|
|
112
120
|
Do not use state-layer colors as arbitrary fills. Prefer the shared component
|
|
113
121
|
when one exists.
|
|
114
122
|
|
|
115
123
|
## Shape and materials
|
|
116
124
|
|
|
117
|
-
Use `rounded-control`, `rounded-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
125
|
+
Use `rounded-control`, `rounded-checkbox`, `rounded-popover`, `rounded-card`,
|
|
126
|
+
`rounded-group`, `rounded-panel`, `rounded-dialog`, and `rounded-pill` to keep
|
|
127
|
+
geometry tied to its role. The 4px checkbox role keeps a 16px checkbox
|
|
128
|
+
visually square while ordinary controls retain their softer 10px corners.
|
|
129
|
+
`rounded-container` and `rounded-overlay` remain compatibility aliases for
|
|
130
|
+
card and popover geometry. `rounded-window` is host-informed and normally only
|
|
131
|
+
useful in previews; the native host owns the actual window shape. Increased
|
|
132
|
+
contrast reduces authored radii and uses inset borders instead of drop
|
|
133
|
+
shadows.
|
|
134
|
+
|
|
135
|
+
## Data series
|
|
136
|
+
|
|
137
|
+
Charts consume `--chart-1` through `--chart-5` (and the matching
|
|
138
|
+
`chart-1`…`chart-5` Tailwind aliases). The defaults intentionally reuse the
|
|
139
|
+
info, success, pending, neutral, and accent support families so data graphics
|
|
140
|
+
stay theme-aware and do not inherit Moldable's legacy brand orange. Apps may
|
|
141
|
+
override the complete series palette at a theme boundary, but chart
|
|
142
|
+
components and stories should never embed raw series colors.
|
|
121
143
|
|
|
122
144
|
Adaptive material has two semantic variants. Each includes fill, fallback,
|
|
123
145
|
border, highlight, blur, and saturation tokens:
|
|
@@ -125,8 +147,8 @@ border, highlight, blur, and saturation tokens:
|
|
|
125
147
|
- `--material-regular-*` supports normal toolbar and control chrome.
|
|
126
148
|
- `--material-clear-*` supports compact controls over media or a richly
|
|
127
149
|
colored canvas.
|
|
128
|
-
- `shadow-panel`, `shadow-overlay`, and `shadow-window`
|
|
129
|
-
independently from translucency.
|
|
150
|
+
- `shadow-panel`, `shadow-overlay`, `shadow-dialog`, and `shadow-window`
|
|
151
|
+
provide elevation independently from translucency.
|
|
130
152
|
|
|
131
153
|
Use `Material` and `MaterialGroup` instead of assembling those tokens in app
|
|
132
154
|
markup. `MaterialGroup` owns one sampled layer for a related control cluster;
|
package/docs/foundations.md
CHANGED
|
@@ -54,5 +54,7 @@ springy, and do not animate layout merely to make a screen feel active.
|
|
|
54
54
|
|
|
55
55
|
## Focus
|
|
56
56
|
|
|
57
|
-
Keyboard focus
|
|
58
|
-
focus
|
|
57
|
+
Keyboard focus uses a thin, neutral system-chrome ring. Apply it only through
|
|
58
|
+
`focus-visible`; pointer and programmatic focus must not paint a ring. Dialogs
|
|
59
|
+
focus their content container on open so the first Tab reaches the first
|
|
60
|
+
control with the keyboard indicator.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Visual and accessibility regression
|
|
2
|
+
|
|
3
|
+
The phase 1 runner exercises every authored story in the core component
|
|
4
|
+
catalog. It does not start the desktop shell or any Moldable-managed app.
|
|
5
|
+
|
|
6
|
+
## What runs
|
|
7
|
+
|
|
8
|
+
`visual-host/` is a small Vite entry that renders one story at a time:
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
?story=controls/button&theme=dark&width=360
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Unique bare story ids are also accepted. Optional
|
|
15
|
+
`transparency=reduced` and `contrast=increased` parameters set the same
|
|
16
|
+
manual accessibility attributes used by the catalog. The host bundles Inter
|
|
17
|
+
and Roboto Mono, waits for `document.fonts.ready`, and disables animations,
|
|
18
|
+
transitions, scrolling, and the caret under `data-motion="reduced"`.
|
|
19
|
+
|
|
20
|
+
The Playwright runner builds and serves that static host, blocks non-host
|
|
21
|
+
network requests, freezes time and randomness, and tests Chromium at:
|
|
22
|
+
|
|
23
|
+
- light and dark themes;
|
|
24
|
+
- 360 × 720 and 960 × 720 viewports;
|
|
25
|
+
- rest plus the browser-driven states declared by an exemplar story.
|
|
26
|
+
|
|
27
|
+
A story opts into browser-driven states with `liveStates` and marks exactly
|
|
28
|
+
one element:
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
<Button data-state-target="hover focus pressed">Continue</Button>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Playwright performs real hover, focus, and held-pointer interactions on that
|
|
35
|
+
element. Button, segmented control, and toggle stories are the phase 1
|
|
36
|
+
exemplars.
|
|
37
|
+
|
|
38
|
+
Every captured case also receives an axe WCAG 2 A/AA and WCAG 2.1 A/AA scan.
|
|
39
|
+
Serious and critical violations fail. Per-story suppressions belong in
|
|
40
|
+
`visual-tests/visual-matrix.ts` and must include a reason. Global
|
|
41
|
+
suppressions are intentionally unsupported.
|
|
42
|
+
|
|
43
|
+
## Local commands
|
|
44
|
+
|
|
45
|
+
Install the pinned Chromium build once:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pnpm -C packages/ui exec playwright install chromium
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Run against committed baselines:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pnpm -C packages/ui test:visual
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Create or intentionally update baselines after reviewing the UI change:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pnpm -C packages/ui test:visual:update
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Baseline PNGs live in `visual-tests/baselines/`. Failures emit actual,
|
|
64
|
+
expected, diff, and trace artifacts in the gitignored `.visual-results/`
|
|
65
|
+
directory.
|
|
66
|
+
|
|
67
|
+
## Determinism and skips
|
|
68
|
+
|
|
69
|
+
Stories must use fixed inputs and no live data, network, wall-clock timers, or
|
|
70
|
+
unseeded randomness. Add an unavoidable phase 1 skip to
|
|
71
|
+
`deterministicStorySkips` in `visual-tests/visual-matrix.ts` with a specific
|
|
72
|
+
reason. Skips are reported in the runner summary; silent conditional skips
|
|
73
|
+
are not allowed.
|
|
74
|
+
|
|
75
|
+
## CI
|
|
76
|
+
|
|
77
|
+
The `ui-regression` CI job installs Chromium and its Linux dependencies,
|
|
78
|
+
builds only `@moldable-ai/ui`, then runs the combined visual and axe suite.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moldable-ai/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"description": "Shared UI components for Moldable applications",
|
|
5
5
|
"author": "Desiderata LLC",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -37,16 +37,22 @@
|
|
|
37
37
|
"dist",
|
|
38
38
|
"docs",
|
|
39
39
|
"src/components/ui/*.md",
|
|
40
|
+
"src/lib/*.md",
|
|
40
41
|
"src/styles",
|
|
41
42
|
"LICENSE"
|
|
42
43
|
],
|
|
43
44
|
"scripts": {
|
|
44
|
-
"build": "tsc",
|
|
45
|
+
"build": "tsc && node ./scripts/rewrite-relative-imports.mjs",
|
|
46
|
+
"build:visual-host": "vite build --config vite.visual.config.ts",
|
|
45
47
|
"dev": "tsc --watch",
|
|
46
48
|
"lint": "eslint . --ext .ts,.tsx --max-warnings 0",
|
|
47
49
|
"format": "prettier --write . --ignore-path ../../.prettierignore",
|
|
48
|
-
"check-types": "tsc --noEmit",
|
|
49
|
-
"test": "vitest run"
|
|
50
|
+
"check-types": "tsc --noEmit && tsc --noEmit -p tsconfig.visual.json",
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"test:visual": "pnpm build:visual-host && playwright test --config playwright.visual.config.ts",
|
|
53
|
+
"test:visual:update": "pnpm build:visual-host && playwright test --config playwright.visual.config.ts --update-snapshots",
|
|
54
|
+
"filmstrip:orb-spawn": "node scripts/render-orb-spawn-filmstrip.mjs",
|
|
55
|
+
"visual:serve": "vite preview --config vite.visual.config.ts --host 127.0.0.1 --port 4179 --strictPort"
|
|
50
56
|
},
|
|
51
57
|
"dependencies": {
|
|
52
58
|
"@base-ui/react": "^1.1.0",
|
|
@@ -105,14 +111,19 @@
|
|
|
105
111
|
"zod": "^4.3.5"
|
|
106
112
|
},
|
|
107
113
|
"devDependencies": {
|
|
114
|
+
"@axe-core/playwright": "^4.12.1",
|
|
115
|
+
"@fontsource/inter": "^5.3.0",
|
|
116
|
+
"@fontsource/roboto-mono": "^5.3.0",
|
|
108
117
|
"@moldable-ai/eslint-config": "workspace:*",
|
|
109
118
|
"@moldable-ai/prettier-config": "workspace:*",
|
|
110
119
|
"@moldable-ai/typescript-config": "workspace:*",
|
|
120
|
+
"@playwright/test": "^1.62.0",
|
|
111
121
|
"@types/node": "^24.0.3",
|
|
112
122
|
"@types/react": "^19.1.6",
|
|
113
123
|
"@types/react-dom": "^19.1.6",
|
|
114
124
|
"jsdom": "^26.1.0",
|
|
115
125
|
"typescript": "^5.8.3",
|
|
126
|
+
"vite": "^6.4.3",
|
|
116
127
|
"vitest": "^4.1.8"
|
|
117
128
|
},
|
|
118
129
|
"peerDependencies": {
|
|
@@ -25,6 +25,33 @@ shown. The default error deliberately avoids exposing internal details.
|
|
|
25
25
|
host safe area. Use `AlertDialogBody` when explanation or affected-item content
|
|
26
26
|
can grow. Keep the consequence visible while the action is pending.
|
|
27
27
|
|
|
28
|
+
For composed alert dialogs, put `loading` on `AlertDialogAction` while its
|
|
29
|
+
request is in flight. This forwards the standard `Button` busy state, blocks
|
|
30
|
+
duplicate activation, and preserves the action label width and accessible name.
|
|
31
|
+
Use `pending` with `pendingLabel` when maintaining the confirmation-specific
|
|
32
|
+
status-label pattern; `ConfirmDialog` manages that state automatically. Disable
|
|
33
|
+
the surrounding form only when its other controls must not change during the
|
|
34
|
+
request.
|
|
35
|
+
|
|
36
|
+
Mark one confirming action with `primary` to enable Command+Enter on macOS or
|
|
37
|
+
Control+Enter on other platforms. The shortcut does not run without a marked
|
|
38
|
+
action, while that action is loading or disabled, during key composition or
|
|
39
|
+
repeat, or when a focused control consumes the event with `preventDefault()`.
|
|
40
|
+
Plain Enter remains native and Escape remains the Radix cancel behavior.
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
<AlertDialogFooter>
|
|
44
|
+
<span className="text-muted-foreground mr-auto inline-flex items-center gap-1 text-xs">
|
|
45
|
+
Confirm <Kbd>⌘</Kbd>
|
|
46
|
+
<Kbd>Enter</Kbd>
|
|
47
|
+
</span>
|
|
48
|
+
<AlertDialogCancel>Cancel</AlertDialogCancel>
|
|
49
|
+
<AlertDialogAction primary loading={isDeleting}>
|
|
50
|
+
Delete recording
|
|
51
|
+
</AlertDialogAction>
|
|
52
|
+
</AlertDialogFooter>
|
|
53
|
+
```
|
|
54
|
+
|
|
28
55
|
Use concrete labels such as “Delete recording,” not “OK.” Put the safe,
|
|
29
56
|
reversible action first in keyboard order and the confirming action last. Do
|
|
30
57
|
not use an alert dialog for ordinary navigation, long forms, or success
|
|
@@ -25,9 +25,15 @@ import { RefreshCw } from 'lucide-react'
|
|
|
25
25
|
>
|
|
26
26
|
<RefreshCw />
|
|
27
27
|
</Button>
|
|
28
|
+
|
|
29
|
+
<Button type="submit" loading={isSaving}>
|
|
30
|
+
Save changes
|
|
31
|
+
</Button>
|
|
28
32
|
```
|
|
29
33
|
|
|
30
|
-
Keep toolbar actions compact (`xs`, `sm`, `icon-xs`, or `icon-sm`). Reserve `default` or `lg` for the primary action in a form, setup state, or focused control dock.
|
|
34
|
+
Keep toolbar actions compact (`xs`, `sm`, `icon-xs`, or `icon-sm`). Reserve `default` or `lg` for the primary action in a form, setup state, or focused control dock. Set `loading` while that button's async action is in flight. The button blocks pointer and keyboard activation, exposes `aria-busy`, keeps its accessible label mounted, and centers a width-stable spinner.
|
|
35
|
+
|
|
36
|
+
Use `loading` for the action that started the request. Disable the whole form only when editing during the request would be unsafe or would invalidate the submitted payload; do not disable unrelated controls merely to communicate progress.
|
|
31
37
|
|
|
32
38
|
For links that should look like buttons:
|
|
33
39
|
|
|
@@ -42,13 +48,14 @@ For links that should look like buttons:
|
|
|
42
48
|
- `variant`: `default`, `destructive`, `outline`, `secondary`, `ghost`, or `link`. Defaults to `default`.
|
|
43
49
|
- `size`: `default`, `xs`, `sm`, `lg`, `icon`, `icon-xs`, `icon-sm`, or `icon-lg`. Defaults to `default`.
|
|
44
50
|
- `asChild`: renders a Radix `Slot` so the child owns the element and semantics.
|
|
51
|
+
- `loading`: blocks activation, applies disabled behavior and `aria-busy`, and overlays the shared `Spinner` without unmounting or resizing the label. Defaults to `false`.
|
|
45
52
|
- Accepts native button props, including `type`, `disabled`, `aria-*`, and event handlers.
|
|
46
53
|
- `buttonVariants` is exported for cases that need the same visual treatment on another component.
|
|
47
54
|
|
|
48
55
|
## Do
|
|
49
56
|
|
|
50
57
|
- Set `type="button"` unless the control intentionally submits a form.
|
|
51
|
-
- Add `cursor-pointer`; use the real `disabled` attribute for unavailable
|
|
58
|
+
- Add `cursor-pointer`; use the real `disabled` attribute for unavailable actions and `loading` for an in-flight action.
|
|
52
59
|
- Give icon-only buttons an `aria-label` and a tooltip.
|
|
53
60
|
- Use a specific Lucide icon that names the action.
|
|
54
61
|
- Put one visually primary action in a local action group.
|
|
@@ -60,7 +67,7 @@ For links that should look like buttons:
|
|
|
60
67
|
- Do not rely on color alone to explain a destructive or selected action.
|
|
61
68
|
- Do not use raw color classes, decorative gradients, or oversized call-to-action styling.
|
|
62
69
|
- Do not use `Sparkles` as a generic AI marker.
|
|
63
|
-
- Do not
|
|
70
|
+
- Do not use `disabled` alone as the progress signal; use `loading` so progress is announced and the label width stays stable.
|
|
64
71
|
- Do not hide essential actions behind hover-only icon buttons.
|
|
65
72
|
|
|
66
73
|
## Moldable considerations
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Confirm dialog
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
`ConfirmDialog` asks for explicit confirmation before a consequential action
|
|
6
|
+
and owns the pending and error states of an asynchronous confirmation.
|
|
7
|
+
|
|
8
|
+
Use it for destructive or difficult-to-reverse actions, security-sensitive
|
|
9
|
+
changes, and operations with a meaningful external effect. Do not interrupt
|
|
10
|
+
routine, reversible actions; use undo or inline feedback instead. Use the
|
|
11
|
+
lower-level `AlertDialog` family when the body needs custom media or layout.
|
|
12
|
+
|
|
13
|
+
## Usage patterns
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Button, ConfirmDialog } from '@moldable-ai/ui'
|
|
17
|
+
|
|
18
|
+
function DeleteRecordingDialog() {
|
|
19
|
+
return (
|
|
20
|
+
<ConfirmDialog
|
|
21
|
+
title="Delete recording?"
|
|
22
|
+
description="The audio and transcript will be permanently removed."
|
|
23
|
+
trigger={<Button variant="destructive">Delete recording</Button>}
|
|
24
|
+
confirmLabel="Delete"
|
|
25
|
+
pendingLabel="Deleting…"
|
|
26
|
+
variant="destructive"
|
|
27
|
+
size="sm"
|
|
28
|
+
onConfirm={() => deleteRecording(recordingId)}
|
|
29
|
+
onConfirmError={reportDeleteError}
|
|
30
|
+
getErrorMessage={() => 'The recording could not be deleted.'}
|
|
31
|
+
/>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
For a controlled dialog, pass `open` and `onOpenChange`. Omit `trigger` when
|
|
37
|
+
another event owns opening.
|
|
38
|
+
|
|
39
|
+
## Anatomy
|
|
40
|
+
|
|
41
|
+
`ConfirmDialog` composes `AlertDialog` with a required title and description,
|
|
42
|
+
a cancel action, and one primary confirm action. It shows a shared spinner and
|
|
43
|
+
`pendingLabel` while `onConfirm` is unresolved, then closes only after success.
|
|
44
|
+
Rejected confirmation remains open and renders an alert message.
|
|
45
|
+
|
|
46
|
+
## API summary
|
|
47
|
+
|
|
48
|
+
- `title`, `description`, and `onConfirm` are required.
|
|
49
|
+
- `trigger` accepts one React element.
|
|
50
|
+
- `confirmLabel`, `pendingLabel`, and `cancelLabel` accept React content and
|
|
51
|
+
default to “Confirm”, “Working…”, and “Cancel”.
|
|
52
|
+
- `variant` is `"default" | "destructive"` and defaults to `"default"`.
|
|
53
|
+
- `size` is `"sm" | "default" | "lg"` and defaults to `"default"`.
|
|
54
|
+
- `open`, `defaultOpen`, and `onOpenChange` support controlled or uncontrolled
|
|
55
|
+
disclosure.
|
|
56
|
+
- `onConfirmError` receives the rejected value. `getErrorMessage` maps it to
|
|
57
|
+
rendered React content.
|
|
58
|
+
|
|
59
|
+
## States and interaction
|
|
60
|
+
|
|
61
|
+
While `onConfirm` is pending, both actions are disabled, repeated confirmation
|
|
62
|
+
is ignored, and close requests are blocked. Success closes the dialog and calls
|
|
63
|
+
`onOpenChange(false)`. Failure clears pending state, keeps the dialog open,
|
|
64
|
+
shows the mapped error or default message, and calls `onConfirmError`.
|
|
65
|
+
|
|
66
|
+
The surface uses `bg-background`, `border-separator`, `rounded-dialog`, and
|
|
67
|
+
`shadow-dialog`. Description copy uses `text-text-secondary`; failed and
|
|
68
|
+
destructive states use the semantic destructive role. Do not add raw danger
|
|
69
|
+
colors or custom dialog elevation.
|
|
70
|
+
|
|
71
|
+
## Keyboard and accessibility
|
|
72
|
+
|
|
73
|
+
The component inherits alert-dialog semantics and focus containment. The
|
|
74
|
+
dialog content receives initial focus; Enter activates the marked primary
|
|
75
|
+
action when appropriate, and pending state prevents dismissal. Write a
|
|
76
|
+
specific title and describe the consequence, not merely “Are you sure?”.
|
|
77
|
+
Error copy is announced with `role="alert"`.
|
|
78
|
+
|
|
79
|
+
## Do
|
|
80
|
+
|
|
81
|
+
- Name the action and the affected object in the title or description.
|
|
82
|
+
- Use `variant="destructive"` only for destructive confirmation.
|
|
83
|
+
- Return the action promise from `onConfirm`.
|
|
84
|
+
- Map technical failures to concise, actionable copy with `getErrorMessage`.
|
|
85
|
+
|
|
86
|
+
## Don't
|
|
87
|
+
|
|
88
|
+
- Do not confirm harmless, reversible, or high-frequency actions.
|
|
89
|
+
- Do not close optimistically before `onConfirm` succeeds.
|
|
90
|
+
- Do not perform the action from both the trigger and `onConfirm`.
|
|
91
|
+
- Do not expose raw exception text to users.
|
|
92
|
+
|
|
93
|
+
## Testing
|
|
94
|
+
|
|
95
|
+
Exercise controlled and uncontrolled opening, success, rejection, repeated
|
|
96
|
+
activation while pending, attempted dismissal while pending, destructive
|
|
97
|
+
styling, all three sizes, and keyboard confirmation.
|