@moldable-ai/ui 0.2.22 → 0.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog/catalog-coverage.d.ts +1 -1
- package/dist/catalog/catalog-manifest.d.ts +1 -1
- package/dist/catalog/catalog-manifest.js +1 -1
- package/dist/catalog/component-catalog.d.ts +1 -1
- package/dist/catalog/component-catalog.js +2 -2
- package/dist/catalog/core-catalog-exclusions.d.ts +1 -1
- package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -1
- package/dist/catalog/core-catalog-exclusions.js +1 -150
- package/dist/catalog/core-catalog.d.ts +1 -1
- package/dist/catalog/core-catalog.d.ts.map +1 -1
- package/dist/catalog/core-catalog.js +11 -7
- package/dist/catalog/core-collection-stories.d.ts +1 -1
- package/dist/catalog/core-collection-stories.d.ts.map +1 -1
- package/dist/catalog/core-collection-stories.js +40 -8
- package/dist/catalog/core-control-stories.d.ts +1 -1
- package/dist/catalog/core-control-stories.d.ts.map +1 -1
- package/dist/catalog/core-control-stories.js +48 -20
- package/dist/catalog/core-feedback-stories.d.ts +1 -1
- package/dist/catalog/core-feedback-stories.d.ts.map +1 -1
- package/dist/catalog/core-feedback-stories.js +89 -10
- package/dist/catalog/core-form-stories.d.ts +3 -0
- package/dist/catalog/core-form-stories.d.ts.map +1 -0
- package/dist/catalog/core-form-stories.js +56 -0
- package/dist/catalog/core-foundation-stories.d.ts +1 -1
- package/dist/catalog/core-foundation-stories.js +7 -7
- package/dist/catalog/core-layout-stories.d.ts +3 -0
- package/dist/catalog/core-layout-stories.d.ts.map +1 -0
- package/dist/catalog/core-layout-stories.js +78 -0
- package/dist/catalog/core-navigation-stories.d.ts +1 -1
- package/dist/catalog/core-navigation-stories.d.ts.map +1 -1
- package/dist/catalog/core-navigation-stories.js +25 -3
- package/dist/catalog/core-overlay-stories.d.ts +1 -1
- package/dist/catalog/core-overlay-stories.d.ts.map +1 -1
- package/dist/catalog/core-overlay-stories.js +113 -8
- package/dist/catalog/index.d.ts +6 -6
- package/dist/catalog/index.js +6 -6
- package/dist/components/app-error-boundary.js +2 -2
- package/dist/components/chat/chat-image-lightbox.js +3 -3
- package/dist/components/chat/chat-input.js +5 -5
- package/dist/components/chat/chat-message.js +17 -17
- package/dist/components/chat/chat-messages.d.ts +1 -1
- package/dist/components/chat/chat-messages.js +3 -3
- package/dist/components/chat/chat-panel.d.ts +6 -6
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +33 -33
- package/dist/components/chat/checkpoint-badge.js +3 -3
- package/dist/components/chat/conversation-history.d.ts.map +1 -1
- package/dist/components/chat/conversation-history.js +13 -13
- package/dist/components/chat/index.d.ts +20 -15
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +20 -15
- package/dist/components/chat/markdown.js +1 -1
- package/dist/components/chat/model-effort-selector.js +10 -10
- package/dist/components/chat/model-selector.js +4 -4
- package/dist/components/chat/reasoning-effort-selector.js +4 -4
- package/dist/components/chat/restore-dialog.js +3 -3
- package/dist/components/chat/thinking-timeline.js +2 -2
- package/dist/components/chat/tool-approval.d.ts +1 -1
- package/dist/components/chat/tool-approval.d.ts.map +1 -1
- package/dist/components/chat/tool-approval.js +9 -9
- package/dist/components/chat/tool-handlers.d.ts +2 -2
- package/dist/components/chat/tool-handlers.js +90 -90
- package/dist/components/chat/voice-orb-audio.d.ts +16 -0
- package/dist/components/chat/voice-orb-audio.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-audio.js +110 -0
- package/dist/components/chat/voice-orb-renderer.d.ts +51 -0
- package/dist/components/chat/voice-orb-renderer.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-renderer.js +410 -0
- package/dist/components/chat/voice-orb-shaders.d.ts +3 -0
- package/dist/components/chat/voice-orb-shaders.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-shaders.js +355 -0
- package/dist/components/chat/voice-orb-types.d.ts +24 -0
- package/dist/components/chat/voice-orb-types.d.ts.map +1 -0
- package/dist/components/chat/voice-orb-types.js +73 -0
- package/dist/components/chat/voice-orb.d.ts +20 -0
- package/dist/components/chat/voice-orb.d.ts.map +1 -0
- package/dist/components/chat/voice-orb.js +67 -0
- package/dist/components/code-block.js +1 -1
- package/dist/components/hardware/bluetooth-panel.d.ts +2 -2
- package/dist/components/hardware/bluetooth-panel.js +10 -10
- package/dist/components/hardware/camera-preview.js +6 -6
- package/dist/components/hardware/capability-badge.d.ts +2 -2
- package/dist/components/hardware/capability-badge.js +2 -2
- package/dist/components/hardware/capability-matrix.d.ts +1 -1
- package/dist/components/hardware/capability-matrix.js +5 -5
- package/dist/components/hardware/clipboard-button.d.ts +1 -1
- package/dist/components/hardware/clipboard-button.js +2 -2
- package/dist/components/hardware/device-list.js +1 -1
- package/dist/components/hardware/display-map.d.ts +1 -1
- package/dist/components/hardware/display-map.js +7 -7
- package/dist/components/hardware/haptic-button.d.ts +2 -2
- package/dist/components/hardware/haptic-button.js +3 -3
- package/dist/components/hardware/hardware-panel.js +1 -1
- package/dist/components/hardware/hid-panel.d.ts +2 -2
- package/dist/components/hardware/hid-panel.js +10 -10
- package/dist/components/hardware/index.d.ts +26 -26
- package/dist/components/hardware/index.js +26 -26
- package/dist/components/hardware/live-indicator.js +1 -1
- package/dist/components/hardware/local-auth-button.d.ts +2 -2
- package/dist/components/hardware/local-auth-button.js +4 -4
- package/dist/components/hardware/location-panel.d.ts +1 -1
- package/dist/components/hardware/location-panel.js +6 -6
- package/dist/components/hardware/microphone-meter.js +7 -7
- package/dist/components/hardware/midi-monitor.d.ts +2 -2
- package/dist/components/hardware/midi-monitor.js +9 -9
- package/dist/components/hardware/notification-panel.d.ts +1 -1
- package/dist/components/hardware/notification-panel.js +8 -8
- package/dist/components/hardware/power-blocker-controller.d.ts +1 -1
- package/dist/components/hardware/power-blocker-controller.js +1 -1
- package/dist/components/hardware/power-panel.d.ts +1 -1
- package/dist/components/hardware/power-panel.js +9 -9
- package/dist/components/hardware/readout.js +1 -1
- package/dist/components/hardware/screen-share-preview.js +5 -5
- package/dist/components/hardware/secure-storage-panel.d.ts +1 -1
- package/dist/components/hardware/secure-storage-panel.js +9 -9
- package/dist/components/hardware/serial-console.d.ts +2 -2
- package/dist/components/hardware/serial-console.js +10 -10
- package/dist/components/hardware/shortcut-recorder.d.ts +1 -1
- package/dist/components/hardware/shortcut-recorder.js +4 -4
- package/dist/components/hardware/stream-log.js +1 -1
- package/dist/components/hardware/system-audio-monitor.d.ts +1 -1
- package/dist/components/hardware/system-audio-monitor.js +9 -9
- package/dist/components/hardware/usb-panel.d.ts +5 -5
- package/dist/components/hardware/usb-panel.js +10 -10
- package/dist/components/hardware/use-capability.d.ts +1 -1
- package/dist/components/hardware/use-capability.js +1 -1
- package/dist/components/markdown.js +5 -5
- package/dist/components/native-capabilities/bluetooth-panel.d.ts +2 -2
- package/dist/components/native-capabilities/bluetooth-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/bluetooth-panel.js +17 -17
- package/dist/components/native-capabilities/camera-preview.d.ts.map +1 -1
- package/dist/components/native-capabilities/camera-preview.js +7 -7
- package/dist/components/native-capabilities/capability-badge.d.ts +2 -2
- package/dist/components/native-capabilities/capability-badge.js +4 -4
- package/dist/components/native-capabilities/capability-matrix.d.ts +1 -1
- package/dist/components/native-capabilities/capability-matrix.js +7 -7
- package/dist/components/native-capabilities/clipboard-button.d.ts +1 -1
- package/dist/components/native-capabilities/clipboard-button.js +2 -2
- package/dist/components/native-capabilities/device-list.js +4 -4
- package/dist/components/native-capabilities/display-map.d.ts +1 -1
- package/dist/components/native-capabilities/display-map.d.ts.map +1 -1
- package/dist/components/native-capabilities/display-map.js +11 -11
- package/dist/components/native-capabilities/haptic-button.d.ts +2 -2
- package/dist/components/native-capabilities/haptic-button.js +3 -3
- package/dist/components/native-capabilities/hid-panel.d.ts +2 -2
- package/dist/components/native-capabilities/hid-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/hid-panel.js +14 -14
- package/dist/components/native-capabilities/index.d.ts +26 -26
- package/dist/components/native-capabilities/index.js +26 -26
- package/dist/components/native-capabilities/live-indicator.js +3 -3
- package/dist/components/native-capabilities/local-auth-button.d.ts +2 -2
- package/dist/components/native-capabilities/local-auth-button.js +4 -4
- package/dist/components/native-capabilities/location-panel.d.ts +1 -1
- package/dist/components/native-capabilities/location-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/location-panel.js +8 -8
- package/dist/components/native-capabilities/microphone-meter.js +9 -9
- package/dist/components/native-capabilities/midi-monitor.d.ts +2 -2
- package/dist/components/native-capabilities/midi-monitor.d.ts.map +1 -1
- package/dist/components/native-capabilities/midi-monitor.js +11 -11
- package/dist/components/native-capabilities/native-capability-panel.js +6 -6
- package/dist/components/native-capabilities/notification-panel.d.ts +1 -1
- package/dist/components/native-capabilities/notification-panel.js +9 -9
- package/dist/components/native-capabilities/power-blocker-controller.d.ts +1 -1
- package/dist/components/native-capabilities/power-blocker-controller.js +1 -1
- package/dist/components/native-capabilities/power-panel.d.ts +1 -1
- package/dist/components/native-capabilities/power-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/power-panel.js +12 -12
- package/dist/components/native-capabilities/readout.d.ts.map +1 -1
- package/dist/components/native-capabilities/readout.js +2 -2
- package/dist/components/native-capabilities/screen-share-preview.js +6 -6
- package/dist/components/native-capabilities/secure-storage-panel.d.ts +1 -1
- package/dist/components/native-capabilities/secure-storage-panel.d.ts.map +1 -1
- package/dist/components/native-capabilities/secure-storage-panel.js +11 -11
- package/dist/components/native-capabilities/serial-console.d.ts +2 -2
- package/dist/components/native-capabilities/serial-console.d.ts.map +1 -1
- package/dist/components/native-capabilities/serial-console.js +11 -11
- package/dist/components/native-capabilities/shortcut-recorder.d.ts +1 -1
- package/dist/components/native-capabilities/shortcut-recorder.js +5 -5
- package/dist/components/native-capabilities/stream-log.js +3 -3
- package/dist/components/native-capabilities/system-audio-monitor.d.ts +1 -1
- package/dist/components/native-capabilities/system-audio-monitor.js +12 -12
- package/dist/components/native-capabilities/usb-panel.d.ts +5 -5
- package/dist/components/native-capabilities/usb-panel.js +15 -15
- package/dist/components/native-capabilities/use-capability.d.ts +1 -1
- package/dist/components/native-capabilities/use-capability.js +1 -1
- package/dist/components/rich-media-player.js +3 -3
- package/dist/components/ui/accordion.js +3 -3
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +16 -10
- package/dist/components/ui/alert.d.ts +1 -1
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +11 -11
- package/dist/components/ui/app-frame.d.ts +7 -1
- package/dist/components/ui/app-frame.d.ts.map +1 -1
- package/dist/components/ui/app-frame.js +52 -16
- package/dist/components/ui/avatar.js +5 -5
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/badge.js +4 -4
- package/dist/components/ui/breadcrumb.js +2 -2
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button-group.js +4 -4
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +16 -16
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +15 -15
- package/dist/components/ui/card.js +3 -3
- package/dist/components/ui/carousel.d.ts +1 -1
- package/dist/components/ui/carousel.js +4 -4
- package/dist/components/ui/chart.js +5 -5
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/collapsible.js +3 -3
- package/dist/components/ui/color-well.js +2 -2
- package/dist/components/ui/combobox.js +9 -9
- package/dist/components/ui/command.d.ts +1 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +9 -9
- package/dist/components/ui/confirm-dialog.d.ts +1 -1
- package/dist/components/ui/confirm-dialog.js +2 -2
- package/dist/components/ui/context-menu.d.ts +16 -5
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +92 -16
- package/dist/components/ui/date-field.d.ts.map +1 -1
- package/dist/components/ui/date-field.js +8 -8
- package/dist/components/ui/date-picker.d.ts +2 -2
- package/dist/components/ui/date-picker.js +7 -7
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +16 -8
- package/dist/components/ui/drawer.js +4 -4
- package/dist/components/ui/dropdown-menu.d.ts +15 -5
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +98 -16
- package/dist/components/ui/edge-fade.js +1 -1
- package/dist/components/ui/empty.d.ts +1 -1
- package/dist/components/ui/empty.js +5 -5
- package/dist/components/ui/error-boundary-view.d.ts.map +1 -1
- package/dist/components/ui/error-boundary-view.js +3 -3
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/field.d.ts.map +1 -1
- package/dist/components/ui/field.js +9 -9
- package/dist/components/ui/form.js +4 -4
- package/dist/components/ui/grid.d.ts.map +1 -1
- package/dist/components/ui/grid.js +5 -5
- package/dist/components/ui/hover-card.js +2 -2
- package/dist/components/ui/icon-button.d.ts +1 -1
- package/dist/components/ui/icon-button.js +3 -3
- package/dist/components/ui/index.d.ts +77 -77
- package/dist/components/ui/index.js +77 -77
- package/dist/components/ui/input-group.d.ts +2 -2
- package/dist/components/ui/input-group.js +14 -14
- package/dist/components/ui/input-otp.js +3 -3
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/inspector.d.ts +1 -1
- package/dist/components/ui/inspector.js +6 -6
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/item.js +7 -7
- package/dist/components/ui/kbd.js +2 -2
- package/dist/components/ui/label.js +2 -2
- package/dist/components/ui/list.d.ts.map +1 -1
- package/dist/components/ui/list.js +5 -5
- package/dist/components/ui/material.js +3 -3
- package/dist/components/ui/menu-items.d.ts +28 -0
- package/dist/components/ui/menu-items.d.ts.map +1 -0
- package/dist/components/ui/menu-items.js +111 -0
- package/dist/components/ui/menubar.js +11 -11
- package/dist/components/ui/message-scroller-controller.d.ts +1 -1
- package/dist/components/ui/message-scroller-controller.js +1 -1
- package/dist/components/ui/message-scroller-primitive.d.ts +1 -1
- package/dist/components/ui/message-scroller-primitive.js +1 -1
- package/dist/components/ui/message-scroller.d.ts +2 -2
- package/dist/components/ui/message-scroller.js +3 -3
- package/dist/components/ui/navigation-button-group.d.ts +2 -2
- package/dist/components/ui/navigation-button-group.js +2 -2
- package/dist/components/ui/navigation-menu.js +6 -6
- package/dist/components/ui/notification-dot.js +2 -2
- package/dist/components/ui/number-input.js +8 -8
- package/dist/components/ui/pagination.d.ts +1 -1
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/panel.d.ts +1 -1
- package/dist/components/ui/panel.js +3 -3
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/popover.js +3 -3
- package/dist/components/ui/progress.js +2 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +2 -2
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +15 -4
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +3 -3
- package/dist/components/ui/search-field.js +7 -7
- package/dist/components/ui/segmented-control.js +9 -9
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +6 -6
- package/dist/components/ui/separator.js +1 -1
- package/dist/components/ui/sheet.js +4 -4
- package/dist/components/ui/sidebar.d.ts +5 -5
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +111 -24
- package/dist/components/ui/skeleton.js +2 -2
- package/dist/components/ui/slider.d.ts +3 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +3 -3
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/spinner.js +1 -1
- package/dist/components/ui/split-view.js +1 -1
- package/dist/components/ui/status.d.ts +1 -1
- package/dist/components/ui/status.d.ts.map +1 -1
- package/dist/components/ui/status.js +10 -9
- package/dist/components/ui/switch.js +2 -2
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +7 -7
- package/dist/components/ui/tabs.js +3 -3
- package/dist/components/ui/text.d.ts +2 -2
- package/dist/components/ui/text.js +19 -19
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/toggle-group.d.ts +1 -1
- package/dist/components/ui/toggle-group.js +4 -4
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.js +10 -10
- package/dist/components/ui/toolbar.d.ts +7 -7
- package/dist/components/ui/toolbar.js +7 -7
- package/dist/components/ui/tooltip.d.ts +2 -2
- package/dist/components/ui/tooltip.js +5 -5
- package/dist/index.d.ts +21 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -20
- package/dist/lib/frame-lifecycle.d.ts +27 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +136 -0
- package/dist/lib/host-date-time-picker.d.ts +1 -1
- package/dist/lib/host-date-time-picker.js +1 -1
- package/dist/lib/host-file-dialog.d.ts +1 -1
- package/dist/lib/host-file-dialog.js +1 -1
- package/dist/lib/host-native-menu.d.ts +48 -7
- package/dist/lib/host-native-menu.d.ts.map +1 -1
- package/dist/lib/host-native-menu.js +56 -1
- package/dist/lib/host-services.js +1 -1
- package/dist/lib/host-share.d.ts +1 -1
- package/dist/lib/host-share.js +1 -1
- package/dist/lib/host-web-surface.d.ts +31 -0
- package/dist/lib/host-web-surface.d.ts.map +1 -0
- package/dist/lib/host-web-surface.js +116 -0
- package/dist/lib/native-capabilities/access.d.ts +2 -2
- package/dist/lib/native-capabilities/access.js +2 -2
- package/dist/lib/native-capabilities/bluetooth-access.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-access.js +2 -2
- package/dist/lib/native-capabilities/bluetooth-connection.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-connection.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-gatt.d.ts +1 -1
- package/dist/lib/native-capabilities/bluetooth-gatt.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-internal.d.ts +2 -2
- package/dist/lib/native-capabilities/bluetooth-internal.js +1 -1
- package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts +2 -2
- package/dist/lib/native-capabilities/bluetooth-native-fallback.js +2 -2
- package/dist/lib/native-capabilities/bluetooth.d.ts +6 -6
- package/dist/lib/native-capabilities/bluetooth.js +4 -4
- package/dist/lib/native-capabilities/bridge.d.ts +1 -1
- package/dist/lib/native-capabilities/bridge.js +2 -2
- package/dist/lib/native-capabilities/capabilities.d.ts +1 -1
- package/dist/lib/native-capabilities/capabilities.js +1 -1
- package/dist/lib/native-capabilities/clipboard.js +2 -2
- package/dist/lib/native-capabilities/device-io-errors.d.ts +1 -1
- package/dist/lib/native-capabilities/device-io-errors.js +1 -1
- package/dist/lib/native-capabilities/displays.d.ts +1 -1
- package/dist/lib/native-capabilities/displays.js +1 -1
- package/dist/lib/native-capabilities/global-shortcuts.d.ts +2 -2
- package/dist/lib/native-capabilities/global-shortcuts.js +1 -1
- package/dist/lib/native-capabilities/haptics.d.ts +1 -1
- package/dist/lib/native-capabilities/haptics.js +1 -1
- package/dist/lib/native-capabilities/hid-native.d.ts +2 -2
- package/dist/lib/native-capabilities/hid-native.js +3 -3
- package/dist/lib/native-capabilities/hid.js +5 -5
- package/dist/lib/native-capabilities/index.d.ts +39 -39
- package/dist/lib/native-capabilities/index.js +21 -21
- package/dist/lib/native-capabilities/local-authentication.d.ts +1 -1
- package/dist/lib/native-capabilities/local-authentication.js +1 -1
- package/dist/lib/native-capabilities/location.js +1 -1
- package/dist/lib/native-capabilities/media-permissions.d.ts +1 -1
- package/dist/lib/native-capabilities/media-permissions.js +1 -1
- package/dist/lib/native-capabilities/media.d.ts +1 -1
- package/dist/lib/native-capabilities/media.js +2 -2
- package/dist/lib/native-capabilities/midi-access.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-access.js +3 -3
- package/dist/lib/native-capabilities/midi-internal.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-internal.js +1 -1
- package/dist/lib/native-capabilities/midi-native-fallback.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-native-fallback.js +2 -2
- package/dist/lib/native-capabilities/midi-ports.d.ts +1 -1
- package/dist/lib/native-capabilities/midi-ports.js +1 -1
- package/dist/lib/native-capabilities/midi.d.ts +5 -5
- package/dist/lib/native-capabilities/midi.js +3 -3
- package/dist/lib/native-capabilities/native-device-io.d.ts +1 -1
- package/dist/lib/native-capabilities/native-device-io.js +1 -1
- package/dist/lib/native-capabilities/native-device-lifecycle.js +1 -1
- package/dist/lib/native-capabilities/notifications.d.ts +2 -2
- package/dist/lib/native-capabilities/notifications.js +1 -1
- package/dist/lib/native-capabilities/power-session.d.ts +2 -2
- package/dist/lib/native-capabilities/power-session.js +1 -1
- package/dist/lib/native-capabilities/secure-storage.d.ts +1 -1
- package/dist/lib/native-capabilities/secure-storage.js +1 -1
- package/dist/lib/native-capabilities/serial-native.d.ts +2 -2
- package/dist/lib/native-capabilities/serial-native.js +3 -3
- package/dist/lib/native-capabilities/serial.js +5 -5
- package/dist/lib/native-capabilities/system-audio.d.ts +1 -1
- package/dist/lib/native-capabilities/system-audio.js +1 -1
- package/dist/lib/native-capabilities/usb-native.d.ts +2 -2
- package/dist/lib/native-capabilities/usb-native.js +3 -3
- package/dist/lib/native-capabilities/usb.js +5 -5
- package/dist/lib/native-hardware/bluetooth-access.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-access.js +1 -1
- package/dist/lib/native-hardware/bluetooth-connection.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-connection.js +1 -1
- package/dist/lib/native-hardware/bluetooth-gatt.d.ts +1 -1
- package/dist/lib/native-hardware/bluetooth-gatt.js +1 -1
- package/dist/lib/native-hardware/bluetooth-internal.d.ts +2 -2
- package/dist/lib/native-hardware/bluetooth-internal.js +1 -1
- package/dist/lib/native-hardware/bluetooth-native-fallback.d.ts +2 -2
- package/dist/lib/native-hardware/bluetooth-native-fallback.js +2 -2
- package/dist/lib/native-hardware/bluetooth.d.ts +6 -6
- package/dist/lib/native-hardware/bluetooth.js +4 -4
- package/dist/lib/native-hardware/bridge.d.ts +1 -1
- package/dist/lib/native-hardware/bridge.js +2 -2
- package/dist/lib/native-hardware/capabilities.d.ts +1 -1
- package/dist/lib/native-hardware/capabilities.js +1 -1
- package/dist/lib/native-hardware/clipboard.js +1 -1
- package/dist/lib/native-hardware/device-io-errors.d.ts +1 -1
- package/dist/lib/native-hardware/device-io-errors.js +1 -1
- package/dist/lib/native-hardware/displays.d.ts +1 -1
- package/dist/lib/native-hardware/displays.js +1 -1
- package/dist/lib/native-hardware/global-shortcuts.d.ts +2 -2
- package/dist/lib/native-hardware/global-shortcuts.js +1 -1
- package/dist/lib/native-hardware/haptics.d.ts +1 -1
- package/dist/lib/native-hardware/haptics.js +1 -1
- package/dist/lib/native-hardware/hid-native.d.ts +2 -2
- package/dist/lib/native-hardware/hid-native.js +3 -3
- package/dist/lib/native-hardware/hid.js +4 -4
- package/dist/lib/native-hardware/index.d.ts +37 -37
- package/dist/lib/native-hardware/index.js +20 -20
- package/dist/lib/native-hardware/local-authentication.d.ts +1 -1
- package/dist/lib/native-hardware/local-authentication.js +1 -1
- package/dist/lib/native-hardware/location.js +1 -1
- package/dist/lib/native-hardware/media-permissions.d.ts +1 -1
- package/dist/lib/native-hardware/media-permissions.js +1 -1
- package/dist/lib/native-hardware/media.d.ts +1 -1
- package/dist/lib/native-hardware/media.js +1 -1
- package/dist/lib/native-hardware/midi-access.d.ts +1 -1
- package/dist/lib/native-hardware/midi-access.js +2 -2
- package/dist/lib/native-hardware/midi-internal.d.ts +1 -1
- package/dist/lib/native-hardware/midi-internal.js +1 -1
- package/dist/lib/native-hardware/midi-native-fallback.d.ts +1 -1
- package/dist/lib/native-hardware/midi-native-fallback.js +2 -2
- package/dist/lib/native-hardware/midi-ports.d.ts +1 -1
- package/dist/lib/native-hardware/midi-ports.js +1 -1
- package/dist/lib/native-hardware/midi.d.ts +5 -5
- package/dist/lib/native-hardware/midi.js +3 -3
- package/dist/lib/native-hardware/native-device-io.d.ts +1 -1
- package/dist/lib/native-hardware/native-device-io.js +1 -1
- package/dist/lib/native-hardware/native-device-lifecycle.js +1 -1
- package/dist/lib/native-hardware/notifications.d.ts +2 -2
- package/dist/lib/native-hardware/notifications.js +1 -1
- package/dist/lib/native-hardware/power-session.d.ts +2 -2
- package/dist/lib/native-hardware/power-session.js +1 -1
- package/dist/lib/native-hardware/secure-storage.d.ts +1 -1
- package/dist/lib/native-hardware/secure-storage.js +1 -1
- package/dist/lib/native-hardware/serial-native.d.ts +2 -2
- package/dist/lib/native-hardware/serial-native.js +3 -3
- package/dist/lib/native-hardware/serial.js +4 -4
- package/dist/lib/native-hardware/system-audio.d.ts +1 -1
- package/dist/lib/native-hardware/system-audio.js +1 -1
- package/dist/lib/native-hardware/usb-native.d.ts +2 -2
- package/dist/lib/native-hardware/usb-native.js +3 -3
- package/dist/lib/native-hardware/usb.js +4 -4
- package/dist/lib/theme.js +1 -1
- package/docs/design-tokens.md +28 -6
- package/docs/foundations.md +4 -2
- package/package.json +4 -2
- package/src/components/ui/confirm-dialog.md +97 -0
- package/src/components/ui/context-menu.md +158 -0
- package/src/components/ui/dropdown-menu.md +165 -0
- package/src/components/ui/hover-card.md +90 -0
- package/src/components/ui/select.md +111 -0
- package/src/lib/host-date-time-picker.md +29 -0
- package/src/lib/host-file-dialog.md +76 -0
- package/src/lib/host-native-menu.md +67 -0
- package/src/lib/host-share.md +36 -0
- package/src/lib/host-web-surface.md +66 -0
- package/src/styles/index.css +141 -68
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { cn } from '../../lib/utils';
|
|
6
|
-
import { toggleVariants } from './toggle';
|
|
5
|
+
import { cn } from '../../lib/utils.js';
|
|
6
|
+
import { toggleVariants } from './toggle.js';
|
|
7
7
|
const ToggleGroupContext = React.createContext({
|
|
8
8
|
size: 'default',
|
|
9
9
|
variant: 'default',
|
|
10
10
|
spacing: 0,
|
|
11
11
|
});
|
|
12
12
|
function ToggleGroup({ className, variant, size, spacing = 0, children, ...props }) {
|
|
13
|
-
return (_jsx(ToggleGroupPrimitive.Root, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, style: { '--gap': spacing }, className: cn('group/toggle-group data-[spacing=default]:data-[variant=outline]:shadow-xs flex w-fit items-center gap-[--spacing(var(--gap))]
|
|
13
|
+
return (_jsx(ToggleGroupPrimitive.Root, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, style: { '--gap': spacing }, className: cn('group/toggle-group data-[spacing=default]:data-[variant=outline]:shadow-xs rounded-control flex w-fit items-center gap-[--spacing(var(--gap))]', className), ...props, children: _jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children: children }) }));
|
|
14
14
|
}
|
|
15
15
|
function ToggleGroupItem({ className, children, variant, size, ...props }) {
|
|
16
16
|
const context = React.useContext(ToggleGroupContext);
|
|
17
17
|
return (_jsx(ToggleGroupPrimitive.Item, { "data-slot": "toggle-group-item", "data-variant": context.variant || variant, "data-size": context.size || size, "data-spacing": context.spacing, className: cn(toggleVariants({
|
|
18
18
|
variant: context.variant || variant,
|
|
19
19
|
size: context.size || size,
|
|
20
|
-
}), 'w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10', 'data-[spacing=0]:rounded-
|
|
20
|
+
}), 'w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10', 'data-[spacing=0]:first:rounded-l-control data-[spacing=0]:last:rounded-r-control data-[spacing=0]:rounded-none data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:shadow-none data-[spacing=0]:data-[variant=outline]:first:border-l', className), ...props, children: children }));
|
|
21
21
|
}
|
|
22
22
|
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
4
|
declare const toggleVariants: (props?: ({
|
|
5
5
|
variant?: "default" | "outline" | "filled" | null | undefined;
|
|
6
|
-
size?: "default" | "
|
|
6
|
+
size?: "default" | "sm" | "xs" | "lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
type ToggleProps = React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>;
|
|
9
9
|
declare function Toggle({ className, variant, size, ...props }: ToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
|
-
const toggleVariants = cva("inline-flex cursor-pointer items-center justify-center gap-2 rounded-
|
|
6
|
+
const toggleVariants = cva("inline-flex cursor-pointer items-center justify-center gap-2 rounded-control text-ui-body font-medium hover:bg-control-hover active:bg-control-pressed disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=on]:bg-control-selected data-[state=on]:text-control-selected-foreground data-[state=on]:hover:bg-control-hover data-[state=on]:active:bg-control-pressed [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring focus-visible:ring-1 outline-none transition-[background-color,color,box-shadow] aria-invalid:border-destructive whitespace-nowrap", {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
default: 'bg-transparent',
|
|
@@ -11,10 +11,10 @@ const toggleVariants = cva("inline-flex cursor-pointer items-center justify-cent
|
|
|
11
11
|
filled: 'bg-muted/70 text-foreground shadow-xs',
|
|
12
12
|
},
|
|
13
13
|
size: {
|
|
14
|
-
xs: 'h-
|
|
15
|
-
default: 'h-
|
|
16
|
-
sm: 'h-
|
|
17
|
-
lg: 'h-
|
|
14
|
+
xs: 'h-control-xs min-w-control-xs gap-1 px-1.5 text-ui-caption [&_svg:not([class*="size-"])]:size-3',
|
|
15
|
+
default: 'h-control-md min-w-control-md px-2',
|
|
16
|
+
sm: 'h-control-sm min-w-control-sm px-1.5',
|
|
17
|
+
lg: 'h-control-lg min-w-control-lg px-2.5',
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
defaultVariants: {
|
|
@@ -26,10 +26,10 @@ function Toggle({ className, variant, size, ...props }) {
|
|
|
26
26
|
return (_jsx(TogglePrimitive.Root, { "data-slot": "toggle", className: cn(toggleVariants({ variant, size, className })), ...props }));
|
|
27
27
|
}
|
|
28
28
|
const iconOnlySizeClasses = {
|
|
29
|
-
xs: 'size-
|
|
30
|
-
sm: 'size-
|
|
31
|
-
default: 'size-
|
|
32
|
-
lg: 'size-
|
|
29
|
+
xs: 'size-control-xs min-w-control-xs p-0',
|
|
30
|
+
sm: 'size-control-sm min-w-control-sm p-0',
|
|
31
|
+
default: 'size-control-md min-w-control-md p-0',
|
|
32
|
+
lg: 'size-control-lg min-w-control-lg p-0',
|
|
33
33
|
};
|
|
34
34
|
function ToggleButton({ className, iconOnly = false, size = 'default', ...props }) {
|
|
35
35
|
return (_jsx(Toggle, { "data-slot": "toggle-button", "data-icon-only": iconOnly || undefined, size: size, className: cn(iconOnly && iconOnlySizeClasses[size ?? 'default'], className), ...props }));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { MaterialVariant } from './material';
|
|
3
|
-
import { Separator } from './separator';
|
|
4
|
-
import { Text } from './text';
|
|
2
|
+
import type { MaterialVariant } from './material.js';
|
|
3
|
+
import { Separator } from './separator.js';
|
|
4
|
+
import { Text } from './text.js';
|
|
5
5
|
import { type VariantProps } from 'class-variance-authority';
|
|
6
6
|
declare const toolbarVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "
|
|
8
|
-
material?: "regular" | "
|
|
9
|
-
density?: "
|
|
10
|
-
position?: "
|
|
7
|
+
variant?: "default" | "panel" | "plain" | null | undefined;
|
|
8
|
+
material?: "regular" | "none" | "clear" | null | undefined;
|
|
9
|
+
density?: "compact" | "default" | "comfortable" | null | undefined;
|
|
10
|
+
position?: "top" | "bottom" | "static" | null | undefined;
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
12
|
export interface ToolbarProps extends React.ComponentProps<'header'>, VariantProps<typeof toolbarVariants> {
|
|
13
13
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from '../../lib/utils';
|
|
4
|
-
import { Separator } from './separator';
|
|
5
|
-
import { Text } from './text';
|
|
3
|
+
import { cn } from '../../lib/utils.js';
|
|
4
|
+
import { Separator } from './separator.js';
|
|
5
|
+
import { Text } from './text.js';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
|
-
const toolbarVariants = cva('z-20 flex w-full shrink-0 items-center gap-
|
|
7
|
+
const toolbarVariants = cva('z-20 flex min-h-toolbar w-full shrink-0 items-center gap-control-gap px-control-inline', {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: 'border-border/70 border-b',
|
|
@@ -17,9 +17,9 @@ const toolbarVariants = cva('z-20 flex w-full shrink-0 items-center gap-2 px-3',
|
|
|
17
17
|
none: '',
|
|
18
18
|
},
|
|
19
19
|
density: {
|
|
20
|
-
compact: '
|
|
21
|
-
default: '
|
|
22
|
-
comfortable: '
|
|
20
|
+
compact: 'py-1',
|
|
21
|
+
default: 'py-1.5',
|
|
22
|
+
comfortable: 'py-2',
|
|
23
23
|
},
|
|
24
24
|
position: {
|
|
25
25
|
static: '',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { KbdGroup } from './kbd';
|
|
4
|
-
import { type MaterialVariant } from './material';
|
|
3
|
+
import { KbdGroup } from './kbd.js';
|
|
4
|
+
import { type MaterialVariant } from './material.js';
|
|
5
5
|
declare function TooltipProvider({ delayDuration, skipDelayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
4
|
-
import { cn } from '../../lib/utils';
|
|
5
|
-
import { KbdGroup } from './kbd';
|
|
6
|
-
import { Material } from './material';
|
|
4
|
+
import { cn } from '../../lib/utils.js';
|
|
5
|
+
import { KbdGroup } from './kbd.js';
|
|
6
|
+
import { Material } from './material.js';
|
|
7
7
|
function TooltipProvider({ delayDuration = 500, skipDelayDuration = 300, ...props }) {
|
|
8
8
|
return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, skipDelayDuration: skipDelayDuration, ...props }));
|
|
9
9
|
}
|
|
@@ -14,9 +14,9 @@ function TooltipTrigger({ ...props }) {
|
|
|
14
14
|
return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
15
15
|
}
|
|
16
16
|
function TooltipContent({ className, material = 'regular', sideOffset = 0, children, ...props }) {
|
|
17
|
-
return (_jsx(TooltipPrimitive.Portal, { children: _jsx(Material, { variant: material, elevation: "overlay", asChild: true, children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', 'data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1', 'origin-(--radix-tooltip-content-transform-origin) z-50 flex w-fit max-w-80 items-center text-balance px-2.5 py-1.5
|
|
17
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsx(Material, { variant: material, elevation: "overlay", asChild: true, children: _jsxs(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95', 'data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1', 'origin-(--radix-tooltip-content-transform-origin) text-ui-caption z-50 flex w-fit max-w-80 items-center text-balance px-2.5 py-1.5 duration-[var(--motion-duration-fast)]', className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "fill-surface-overlay z-50" })] }) }) }));
|
|
18
18
|
}
|
|
19
19
|
function TooltipShortcut({ className, ...props }) {
|
|
20
|
-
return (_jsx(KbdGroup, { "data-slot": "tooltip-shortcut", className: cn('ml-2
|
|
20
|
+
return (_jsx(KbdGroup, { "data-slot": "tooltip-shortcut", className: cn('text-11 ml-2 opacity-70', className), ...props }));
|
|
21
21
|
}
|
|
22
22
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipShortcut, TooltipTrigger, };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
export { cn } from './lib/utils';
|
|
2
|
-
export { ThemeProvider, useTheme, themeScript, type Theme } from './lib/theme';
|
|
3
|
-
export { WorkspaceProvider, useWorkspace, WORKSPACE_HEADER, } from './lib/workspace';
|
|
4
|
-
export { useMoldableCommands, useMoldableCommand, useMoldableAppCommands, useMoldableNavigationPop, useMoldableNavigationState, isInMoldable, sendToMoldable, pushMoldableNavigation, popMoldableNavigation, resetMoldableNavigation, downloadFile, publishMoldableArtifact, setMoldableWindowFullscreen, type AppCommand, type CommandAction, type CommandsResponse, type CommandMessage, type MoldableNavigationEntry, type MoldableNavigationPopMessage, type MoldableNavigationStateMessage, type DownloadFileOptions, type MoldableArtifactFile, type MoldableArtifactPublishOptions, type MoldableArtifactPublishResult, type MoldableWindowFullscreenMode, type MoldableWindowFullscreenOptions, type MoldableWindowFullscreenResult, type MoldableWindowFullscreenMessage, type MoldableWindowFullscreenResultMessage, } from './lib/commands';
|
|
5
|
-
export * from './lib/native-capabilities';
|
|
6
|
-
export * from './components/ui';
|
|
7
|
-
export * from './components/native-capabilities';
|
|
8
|
-
export { TODAY_KIND_RANK, TODAY_KIND_TTL_MS, makeTodayItem, type TodayItem, type TodayItemKind, type TodaySurface, type TodayAction, type TodayResponse, type ResumeState, type HydratedTodayItem, type HydratedResume, } from './lib/today';
|
|
9
|
-
export { useIsMobile } from './hooks/use-mobile';
|
|
10
|
-
export { Markdown } from './components/markdown';
|
|
11
|
-
export { RichMediaPlayer, type RichMediaPlayerProps, } from './components/rich-media-player';
|
|
12
|
-
export { CodeBlock } from './components/code-block';
|
|
13
|
-
export { AppErrorBoundary, type AppErrorSource, } from './components/app-error-boundary';
|
|
14
|
-
export { getMoldableHostServices, installMoldableFrameLifecycle, type MoldableHostServiceCapabilities, type MoldableHostServicesAdvertisement, } from './lib/frame-lifecycle';
|
|
15
|
-
export { HostServiceRequestError, isHostServiceAvailable, requestHostService, type HostServiceRequestOptions, type HostServiceResponseStatus, } from './lib/host-services';
|
|
16
|
-
export { pickDateTimeWithHost, useHostDateTimePicker, type HostDateTimePicker, type HostDateTimePickerAnchorRect, type HostDateTimePickerMode, type HostDateTimePickerOptions, type HostDateTimePickerResult, } from './lib/host-date-time-picker';
|
|
17
|
-
export { shareWithHost, useHostShare, type HostShare, type HostShareAnchorRect, type HostShareItem, type HostShareOptions, type HostShareResult, } from './lib/host-share';
|
|
18
|
-
export { HOST_NATIVE_MENU_MAX_DEPTH, HOST_NATIVE_MENU_MAX_ITEMS, HOST_NATIVE_MENU_MAX_SUBLABEL_LENGTH, HOST_NATIVE_MENU_MAX_TITLE_LENGTH, openNativeMenuWithHost, useHostNativeMenu, type HostNativeMenu, type HostNativeMenuAnchorRect, type HostNativeMenuOptions, type HostNativeMenuPoint, type HostNativeMenuResult, type NativeMenuItem, type NativeMenuItemKind, type NativeMenuShortcut, } from './lib/host-native-menu';
|
|
19
|
-
export { openFileDialogWithHost, saveFileDialogWithHost, useHostFileDialog, type HostFileDialog, type HostFileDialogDefaultLocation, type HostFileDialogFilter, type HostOpenFileDialogOptions, type HostOpenFileDialogProperties, type HostOpenFileDialogResult, type HostSaveFileDialogOptions, type HostSaveFileDialogResult, } from './lib/host-file-dialog';
|
|
20
|
-
export
|
|
1
|
+
export { cn } from './lib/utils.js';
|
|
2
|
+
export { ThemeProvider, useTheme, themeScript, type Theme } from './lib/theme.js';
|
|
3
|
+
export { WorkspaceProvider, useWorkspace, WORKSPACE_HEADER, } from './lib/workspace.js';
|
|
4
|
+
export { useMoldableCommands, useMoldableCommand, useMoldableAppCommands, useMoldableNavigationPop, useMoldableNavigationState, isInMoldable, sendToMoldable, pushMoldableNavigation, popMoldableNavigation, resetMoldableNavigation, downloadFile, publishMoldableArtifact, setMoldableWindowFullscreen, type AppCommand, type CommandAction, type CommandsResponse, type CommandMessage, type MoldableNavigationEntry, type MoldableNavigationPopMessage, type MoldableNavigationStateMessage, type DownloadFileOptions, type MoldableArtifactFile, type MoldableArtifactPublishOptions, type MoldableArtifactPublishResult, type MoldableWindowFullscreenMode, type MoldableWindowFullscreenOptions, type MoldableWindowFullscreenResult, type MoldableWindowFullscreenMessage, type MoldableWindowFullscreenResultMessage, } from './lib/commands.js';
|
|
5
|
+
export * from './lib/native-capabilities/index.js';
|
|
6
|
+
export * from './components/ui/index.js';
|
|
7
|
+
export * from './components/native-capabilities/index.js';
|
|
8
|
+
export { TODAY_KIND_RANK, TODAY_KIND_TTL_MS, makeTodayItem, type TodayItem, type TodayItemKind, type TodaySurface, type TodayAction, type TodayResponse, type ResumeState, type HydratedTodayItem, type HydratedResume, } from './lib/today.js';
|
|
9
|
+
export { useIsMobile } from './hooks/use-mobile.js';
|
|
10
|
+
export { Markdown } from './components/markdown.js';
|
|
11
|
+
export { RichMediaPlayer, type RichMediaPlayerProps, } from './components/rich-media-player.js';
|
|
12
|
+
export { CodeBlock } from './components/code-block.js';
|
|
13
|
+
export { AppErrorBoundary, type AppErrorSource, } from './components/app-error-boundary.js';
|
|
14
|
+
export { getMoldableHostServices, installMoldableFrameLifecycle, type MoldableHostServiceCapabilities, type MoldableHostServicesAdvertisement, } from './lib/frame-lifecycle.js';
|
|
15
|
+
export { HostServiceRequestError, isHostServiceAvailable, requestHostService, type HostServiceRequestOptions, type HostServiceResponseStatus, } from './lib/host-services.js';
|
|
16
|
+
export { pickDateTimeWithHost, useHostDateTimePicker, type HostDateTimePicker, type HostDateTimePickerAnchorRect, type HostDateTimePickerMode, type HostDateTimePickerOptions, type HostDateTimePickerResult, } from './lib/host-date-time-picker.js';
|
|
17
|
+
export { shareWithHost, useHostShare, type HostShare, type HostShareAnchorRect, type HostShareItem, type HostShareOptions, type HostShareResult, } from './lib/host-share.js';
|
|
18
|
+
export { HOST_NATIVE_MENU_MAX_DEPTH, HOST_NATIVE_MENU_MAX_ITEMS, HOST_NATIVE_MENU_MAX_SUBLABEL_LENGTH, HOST_NATIVE_MENU_MAX_TITLE_LENGTH, openNativeMenuWithHost, useHostNativeMenu, type HostNativeMenu, type HostNativeMenuAnchorRect, type HostNativeMenuOptions, type HostNativeMenuPoint, type HostNativeMenuResult, type NativeMenuItem, type NativeMenuItemKind, type NativeMenuShortcut, } from './lib/host-native-menu.js';
|
|
19
|
+
export { openFileDialogWithHost, saveFileDialogWithHost, useHostFileDialog, type HostFileDialog, type HostFileDialogDefaultLocation, type HostFileDialogFilter, type HostOpenFileDialogOptions, type HostOpenFileDialogProperties, type HostOpenFileDialogResult, type HostSaveFileDialogOptions, type HostSaveFileDialogResult, } from './lib/host-file-dialog.js';
|
|
20
|
+
export { useHostWebSurface, type HostWebSurface, type HostWebSurfaceBounds, type HostWebSurfaceNavigationState, type HostWebSurfaceNavigationSubscriber, } from './lib/host-web-surface.js';
|
|
21
|
+
export * from './components/chat/index.js';
|
|
21
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAGhC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAA;AAG9E,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,GACjB,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,YAAY,EACZ,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACZ,uBAAuB,EACvB,2BAA2B,EAC3B,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,u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B,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EACjC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,GAC9B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,aAAa,EACb,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,oCAAoC,EACpC,iCAAiC,EACjC,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,GAC9B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EACL,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,kCAAkC,GACxC,MAAM,wBAAwB,CAAA;AAG/B,cAAc,mBAAmB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
// Export utilities
|
|
2
|
-
export { cn } from './lib/utils';
|
|
2
|
+
export { cn } from './lib/utils.js';
|
|
3
3
|
// Export theme
|
|
4
|
-
export { ThemeProvider, useTheme, themeScript } from './lib/theme';
|
|
4
|
+
export { ThemeProvider, useTheme, themeScript } from './lib/theme.js';
|
|
5
5
|
// Export workspace
|
|
6
|
-
export { WorkspaceProvider, useWorkspace, WORKSPACE_HEADER, } from './lib/workspace';
|
|
6
|
+
export { WorkspaceProvider, useWorkspace, WORKSPACE_HEADER, } from './lib/workspace.js';
|
|
7
7
|
// Export commands
|
|
8
|
-
export { useMoldableCommands, useMoldableCommand, useMoldableAppCommands, useMoldableNavigationPop, useMoldableNavigationState, isInMoldable, sendToMoldable, pushMoldableNavigation, popMoldableNavigation, resetMoldableNavigation, downloadFile, publishMoldableArtifact, setMoldableWindowFullscreen, } from './lib/commands';
|
|
8
|
+
export { useMoldableCommands, useMoldableCommand, useMoldableAppCommands, useMoldableNavigationPop, useMoldableNavigationState, isInMoldable, sendToMoldable, pushMoldableNavigation, popMoldableNavigation, resetMoldableNavigation, downloadFile, publishMoldableArtifact, setMoldableWindowFullscreen, } from './lib/commands.js';
|
|
9
9
|
// Export typed desktop/native capability APIs
|
|
10
|
-
export * from './lib/native-capabilities';
|
|
10
|
+
export * from './lib/native-capabilities/index.js';
|
|
11
11
|
// Export UI components
|
|
12
|
-
export * from './components/ui';
|
|
12
|
+
export * from './components/ui/index.js';
|
|
13
13
|
// Export native capability components (polished wrappers over lib/native-capabilities)
|
|
14
|
-
export * from './components/native-capabilities';
|
|
14
|
+
export * from './components/native-capabilities/index.js';
|
|
15
15
|
// Export Today contract
|
|
16
|
-
export { TODAY_KIND_RANK, TODAY_KIND_TTL_MS, makeTodayItem, } from './lib/today';
|
|
16
|
+
export { TODAY_KIND_RANK, TODAY_KIND_TTL_MS, makeTodayItem, } from './lib/today.js';
|
|
17
17
|
// Export hooks
|
|
18
|
-
export { useIsMobile } from './hooks/use-mobile';
|
|
18
|
+
export { useIsMobile } from './hooks/use-mobile.js';
|
|
19
19
|
// Export Markdown
|
|
20
|
-
export { Markdown } from './components/markdown';
|
|
21
|
-
export { RichMediaPlayer, } from './components/rich-media-player';
|
|
20
|
+
export { Markdown } from './components/markdown.js';
|
|
21
|
+
export { RichMediaPlayer, } from './components/rich-media-player.js';
|
|
22
22
|
// Export CodeBlock
|
|
23
|
-
export { CodeBlock } from './components/code-block';
|
|
23
|
+
export { CodeBlock } from './components/code-block.js';
|
|
24
24
|
// Export app error boundary
|
|
25
|
-
export { AppErrorBoundary, } from './components/app-error-boundary';
|
|
25
|
+
export { AppErrorBoundary, } from './components/app-error-boundary.js';
|
|
26
26
|
// Export Moldable frame lifecycle
|
|
27
|
-
export { getMoldableHostServices, installMoldableFrameLifecycle, } from './lib/frame-lifecycle';
|
|
27
|
+
export { getMoldableHostServices, installMoldableFrameLifecycle, } from './lib/frame-lifecycle.js';
|
|
28
28
|
// Export the host-owned native service envelope
|
|
29
|
-
export { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './lib/host-services';
|
|
30
|
-
export { pickDateTimeWithHost, useHostDateTimePicker, } from './lib/host-date-time-picker';
|
|
31
|
-
export { shareWithHost, useHostShare, } from './lib/host-share';
|
|
32
|
-
export { HOST_NATIVE_MENU_MAX_DEPTH, HOST_NATIVE_MENU_MAX_ITEMS, HOST_NATIVE_MENU_MAX_SUBLABEL_LENGTH, HOST_NATIVE_MENU_MAX_TITLE_LENGTH, openNativeMenuWithHost, useHostNativeMenu, } from './lib/host-native-menu';
|
|
33
|
-
export { openFileDialogWithHost, saveFileDialogWithHost, useHostFileDialog, } from './lib/host-file-dialog';
|
|
29
|
+
export { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './lib/host-services.js';
|
|
30
|
+
export { pickDateTimeWithHost, useHostDateTimePicker, } from './lib/host-date-time-picker.js';
|
|
31
|
+
export { shareWithHost, useHostShare, } from './lib/host-share.js';
|
|
32
|
+
export { HOST_NATIVE_MENU_MAX_DEPTH, HOST_NATIVE_MENU_MAX_ITEMS, HOST_NATIVE_MENU_MAX_SUBLABEL_LENGTH, HOST_NATIVE_MENU_MAX_TITLE_LENGTH, openNativeMenuWithHost, useHostNativeMenu, } from './lib/host-native-menu.js';
|
|
33
|
+
export { openFileDialogWithHost, saveFileDialogWithHost, useHostFileDialog, } from './lib/host-file-dialog.js';
|
|
34
|
+
export { useHostWebSurface, } from './lib/host-web-surface.js';
|
|
34
35
|
// Export chat components
|
|
35
|
-
export * from './components/chat';
|
|
36
|
+
export * from './components/chat/index.js';
|
|
@@ -30,6 +30,11 @@ export interface MoldableHostContextMessage {
|
|
|
30
30
|
titlebar?: 'host' | 'app';
|
|
31
31
|
platform?: 'macos' | 'windows' | 'linux' | 'unknown';
|
|
32
32
|
windowId?: string;
|
|
33
|
+
nativeMaterial?: {
|
|
34
|
+
regions?: {
|
|
35
|
+
sidebar?: unknown;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
33
38
|
safeInsets?: {
|
|
34
39
|
top?: unknown;
|
|
35
40
|
inlineStart?: unknown;
|
|
@@ -46,8 +51,30 @@ export interface MoldableHostContextMessage {
|
|
|
46
51
|
};
|
|
47
52
|
hostServices?: unknown;
|
|
48
53
|
}
|
|
54
|
+
export declare const MOLDABLE_NAVIGATION_CHORD_ALLOWLIST: readonly [{
|
|
55
|
+
readonly chord: "back";
|
|
56
|
+
readonly code: "BracketLeft";
|
|
57
|
+
readonly metaKey: true;
|
|
58
|
+
readonly altKey: false;
|
|
59
|
+
readonly ctrlKey: false;
|
|
60
|
+
readonly shiftKey: false;
|
|
61
|
+
}];
|
|
62
|
+
export declare const MOLDABLE_MATERIAL_REGION_CHANGE_EVENT = "moldable:material-region-change";
|
|
63
|
+
export declare const MOLDABLE_MATERIAL_REGION_MESSAGE_TYPE = "moldable:material-region";
|
|
64
|
+
export declare const MOLDABLE_MATERIAL_REGION_ACK_TYPE = "moldable:material-region-ack";
|
|
65
|
+
export declare const MOLDABLE_SIDEBAR_REGION_WIDTH_PROPERTY = "--moldable-material-region-sidebar-width";
|
|
66
|
+
export interface MoldableMaterialRegionAck {
|
|
67
|
+
type: typeof MOLDABLE_MATERIAL_REGION_ACK_TYPE;
|
|
68
|
+
regionId: string;
|
|
69
|
+
role: 'sidebar';
|
|
70
|
+
side: 'leading';
|
|
71
|
+
active: boolean;
|
|
72
|
+
width?: number;
|
|
73
|
+
}
|
|
49
74
|
export declare function getMoldableHostServices(): MoldableHostServicesAdvertisement | undefined;
|
|
75
|
+
export declare function applyMoldableMaterialRegionAck(value: unknown): boolean;
|
|
50
76
|
export declare function applyMoldableChatSafePadding(safePadding: unknown): boolean;
|
|
51
77
|
export declare function applyMoldableHostContext(message: MoldableHostContextMessage): void;
|
|
78
|
+
export declare function installMoldableNavigationChordLifecycle(): () => void;
|
|
52
79
|
export declare function installMoldableFrameLifecycle(): void;
|
|
53
80
|
//# sourceMappingURL=frame-lifecycle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-lifecycle.d.ts","sourceRoot":"","sources":["../../src/lib/frame-lifecycle.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,qBAAqB,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,eAAe,CAAC,CAAA;KAC/C,CAAA;IACD,cAAc,CAAC,EAAE;QACf,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC,CAAA;KAC3C,CAAA;IACD,UAAU,CAAC,EAAE;QACX,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,UAAU,CAAC,EAAE;QACX,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;KAC9B,CAAA;CACF,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAAA;AAEvD,MAAM,WAAW,iCAAiC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+
shiftKey: false,
|
|
9
|
+
},
|
|
10
|
+
];
|
|
1
11
|
let frameLifecycleInstalled = false;
|
|
2
12
|
let advertisedHostServices;
|
|
13
|
+
let sidebarMaterialPreviousBodyBackgroundColor = null;
|
|
14
|
+
export const MOLDABLE_MATERIAL_REGION_CHANGE_EVENT = 'moldable:material-region-change';
|
|
15
|
+
export const MOLDABLE_MATERIAL_REGION_MESSAGE_TYPE = 'moldable:material-region';
|
|
16
|
+
export const MOLDABLE_MATERIAL_REGION_ACK_TYPE = 'moldable:material-region-ack';
|
|
17
|
+
export const MOLDABLE_SIDEBAR_REGION_WIDTH_PROPERTY = '--moldable-material-region-sidebar-width';
|
|
3
18
|
function normalizeHostServices(value) {
|
|
4
19
|
if (typeof value !== 'object' ||
|
|
5
20
|
value === null ||
|
|
@@ -24,6 +39,79 @@ function normalizeHostServices(value) {
|
|
|
24
39
|
export function getMoldableHostServices() {
|
|
25
40
|
return advertisedHostServices;
|
|
26
41
|
}
|
|
42
|
+
function clearSidebarMaterialRegion() {
|
|
43
|
+
const root = document.documentElement;
|
|
44
|
+
const hadActiveRegion = root.dataset.moldableMaterialRegionSidebar === 'active';
|
|
45
|
+
delete root.dataset.moldableMaterialRegionSidebar;
|
|
46
|
+
delete root.dataset.moldableMaterialRegionSidebarId;
|
|
47
|
+
root.style.removeProperty(MOLDABLE_SIDEBAR_REGION_WIDTH_PROPERTY);
|
|
48
|
+
if (sidebarMaterialPreviousBodyBackgroundColor !== null) {
|
|
49
|
+
if (sidebarMaterialPreviousBodyBackgroundColor) {
|
|
50
|
+
document.body.style.backgroundColor =
|
|
51
|
+
sidebarMaterialPreviousBodyBackgroundColor;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
document.body.style.removeProperty('background-color');
|
|
55
|
+
}
|
|
56
|
+
sidebarMaterialPreviousBodyBackgroundColor = null;
|
|
57
|
+
}
|
|
58
|
+
if (hadActiveRegion) {
|
|
59
|
+
window.dispatchEvent(new CustomEvent(MOLDABLE_MATERIAL_REGION_CHANGE_EVENT, {
|
|
60
|
+
detail: { role: 'sidebar', active: false },
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export function applyMoldableMaterialRegionAck(value) {
|
|
65
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
const ack = value;
|
|
69
|
+
if (ack.type !== MOLDABLE_MATERIAL_REGION_ACK_TYPE ||
|
|
70
|
+
typeof ack.regionId !== 'string' ||
|
|
71
|
+
ack.regionId.length === 0 ||
|
|
72
|
+
ack.regionId.length > 128 ||
|
|
73
|
+
ack.role !== 'sidebar' ||
|
|
74
|
+
ack.side !== 'leading' ||
|
|
75
|
+
typeof ack.active !== 'boolean') {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
if (!ack.active) {
|
|
79
|
+
const activeRegionId = document.documentElement.dataset.moldableMaterialRegionSidebarId;
|
|
80
|
+
if (activeRegionId && activeRegionId !== ack.regionId)
|
|
81
|
+
return false;
|
|
82
|
+
clearSidebarMaterialRegion();
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
if (document.documentElement.dataset.moldableNativeMaterialSidebar !==
|
|
86
|
+
'available' ||
|
|
87
|
+
typeof ack.width !== 'number' ||
|
|
88
|
+
!Number.isFinite(ack.width) ||
|
|
89
|
+
ack.width < 120 ||
|
|
90
|
+
ack.width > 600) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
const normalizedAck = {
|
|
94
|
+
type: MOLDABLE_MATERIAL_REGION_ACK_TYPE,
|
|
95
|
+
regionId: ack.regionId,
|
|
96
|
+
role: 'sidebar',
|
|
97
|
+
side: 'leading',
|
|
98
|
+
active: true,
|
|
99
|
+
width: ack.width,
|
|
100
|
+
};
|
|
101
|
+
const root = document.documentElement;
|
|
102
|
+
root.dataset.moldableMaterialRegionSidebar = 'active';
|
|
103
|
+
root.dataset.moldableMaterialRegionSidebarId = normalizedAck.regionId;
|
|
104
|
+
root.style.setProperty(MOLDABLE_SIDEBAR_REGION_WIDTH_PROPERTY, `${normalizedAck.width}px`);
|
|
105
|
+
if (sidebarMaterialPreviousBodyBackgroundColor === null) {
|
|
106
|
+
sidebarMaterialPreviousBodyBackgroundColor =
|
|
107
|
+
document.body.style.backgroundColor;
|
|
108
|
+
}
|
|
109
|
+
document.body.style.backgroundColor = 'transparent';
|
|
110
|
+
window.dispatchEvent(new CustomEvent(MOLDABLE_MATERIAL_REGION_CHANGE_EVENT, {
|
|
111
|
+
detail: normalizedAck,
|
|
112
|
+
}));
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
27
115
|
export function applyMoldableChatSafePadding(safePadding) {
|
|
28
116
|
if (typeof document === 'undefined')
|
|
29
117
|
return false;
|
|
@@ -59,6 +147,15 @@ export function applyMoldableHostContext(message) {
|
|
|
59
147
|
root.dataset.moldablePlatform = message.platform;
|
|
60
148
|
if (message.windowId)
|
|
61
149
|
root.dataset.moldableWindowId = message.windowId;
|
|
150
|
+
const sidebarMaterialAvailable = message.displayMode === 'window' &&
|
|
151
|
+
message.nativeMaterial?.regions?.sidebar === true;
|
|
152
|
+
if (sidebarMaterialAvailable) {
|
|
153
|
+
root.dataset.moldableNativeMaterialSidebar = 'available';
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
delete root.dataset.moldableNativeMaterialSidebar;
|
|
157
|
+
clearSidebarMaterialRegion();
|
|
158
|
+
}
|
|
62
159
|
const insets = message.safeInsets;
|
|
63
160
|
if (insets) {
|
|
64
161
|
applyBoundedLength('--window-safe-area-top', insets.top);
|
|
@@ -107,6 +204,9 @@ function installHostStateLifecycle() {
|
|
|
107
204
|
applyMoldableHostContext(message);
|
|
108
205
|
}
|
|
109
206
|
}
|
|
207
|
+
else if (event.data.type === MOLDABLE_MATERIAL_REGION_ACK_TYPE) {
|
|
208
|
+
applyMoldableMaterialRegionAck(event.data);
|
|
209
|
+
}
|
|
110
210
|
});
|
|
111
211
|
}
|
|
112
212
|
function postMoldableFrameMessage(message) {
|
|
@@ -114,6 +214,41 @@ function postMoldableFrameMessage(message) {
|
|
|
114
214
|
return;
|
|
115
215
|
window.parent.postMessage(message, '*');
|
|
116
216
|
}
|
|
217
|
+
function isEditableKeyTarget(target) {
|
|
218
|
+
if (!(target instanceof Element))
|
|
219
|
+
return false;
|
|
220
|
+
if (target.closest('input, textarea, select'))
|
|
221
|
+
return true;
|
|
222
|
+
if (target instanceof HTMLElement && target.isContentEditable)
|
|
223
|
+
return true;
|
|
224
|
+
const contentEditable = target.closest('[contenteditable]');
|
|
225
|
+
const contentEditableValue = contentEditable
|
|
226
|
+
?.getAttribute('contenteditable')
|
|
227
|
+
?.toLowerCase();
|
|
228
|
+
return (contentEditableValue === '' ||
|
|
229
|
+
contentEditableValue === 'true' ||
|
|
230
|
+
contentEditableValue === 'plaintext-only');
|
|
231
|
+
}
|
|
232
|
+
export function installMoldableNavigationChordLifecycle() {
|
|
233
|
+
const handleKeyDown = (event) => {
|
|
234
|
+
if (event.defaultPrevented || isEditableKeyTarget(event.target))
|
|
235
|
+
return;
|
|
236
|
+
const match = MOLDABLE_NAVIGATION_CHORD_ALLOWLIST.find((candidate) => event.code === candidate.code &&
|
|
237
|
+
event.metaKey === candidate.metaKey &&
|
|
238
|
+
event.altKey === candidate.altKey &&
|
|
239
|
+
event.ctrlKey === candidate.ctrlKey &&
|
|
240
|
+
event.shiftKey === candidate.shiftKey);
|
|
241
|
+
if (!match)
|
|
242
|
+
return;
|
|
243
|
+
event.preventDefault();
|
|
244
|
+
postMoldableFrameMessage({
|
|
245
|
+
type: 'moldable:navigation-chord',
|
|
246
|
+
chord: match.chord,
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
document.addEventListener('keydown', handleKeyDown, true);
|
|
250
|
+
return () => document.removeEventListener('keydown', handleKeyDown, true);
|
|
251
|
+
}
|
|
117
252
|
function reportAppReady(reason) {
|
|
118
253
|
postMoldableFrameMessage({ type: 'moldable:app-ready', reason });
|
|
119
254
|
}
|
|
@@ -148,6 +283,7 @@ export function installMoldableFrameLifecycle() {
|
|
|
148
283
|
return;
|
|
149
284
|
frameLifecycleInstalled = true;
|
|
150
285
|
installHostStateLifecycle();
|
|
286
|
+
installMoldableNavigationChordLifecycle();
|
|
151
287
|
installViteHmrLifecycle();
|
|
152
288
|
scheduleRenderReady();
|
|
153
289
|
if (document.readyState === 'complete') {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from 'react';
|
|
2
|
-
import { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './host-services';
|
|
2
|
+
import { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './host-services.js';
|
|
3
3
|
const HOST_CONTEXT_CHANGE_EVENT = 'moldable:host-context-change';
|
|
4
4
|
const DATE_TIME_PICKER_SERVICE_NAME = 'dateTimePicker';
|
|
5
5
|
const MAX_ISO_VALUE_LENGTH = 128;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HostServiceRequestOptions } from './host-services';
|
|
1
|
+
import { type HostServiceRequestOptions } from './host-services.js';
|
|
2
2
|
export type HostFileDialogDefaultLocation = 'documents' | 'downloads' | 'desktop' | 'home' | 'appData';
|
|
3
3
|
export interface HostFileDialogFilter {
|
|
4
4
|
name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useState } from 'react';
|
|
2
|
-
import { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './host-services';
|
|
2
|
+
import { HostServiceRequestError, isHostServiceAvailable, requestHostService, } from './host-services.js';
|
|
3
3
|
const HOST_CONTEXT_CHANGE_EVENT = 'moldable:host-context-change';
|
|
4
4
|
const FILE_DIALOG_SERVICE_NAME = 'fileDialog';
|
|
5
5
|
const MAX_TEXT_LENGTH = 512;
|