@moldable-ai/ui 0.2.19 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog/catalog-coverage.d.ts +15 -0
- package/dist/catalog/catalog-coverage.d.ts.map +1 -0
- package/dist/catalog/catalog-coverage.js +44 -0
- package/dist/catalog/catalog-manifest.d.ts +6 -0
- package/dist/catalog/catalog-manifest.d.ts.map +1 -0
- package/dist/catalog/catalog-manifest.js +117 -0
- package/dist/catalog/catalog-types.d.ts +64 -0
- package/dist/catalog/catalog-types.d.ts.map +1 -0
- package/dist/catalog/catalog-types.js +20 -0
- package/dist/catalog/component-catalog.d.ts +14 -0
- package/dist/catalog/component-catalog.d.ts.map +1 -0
- package/dist/catalog/component-catalog.js +49 -0
- package/dist/catalog/core-catalog-exclusions.d.ts +8 -0
- package/dist/catalog/core-catalog-exclusions.d.ts.map +1 -0
- package/dist/catalog/core-catalog-exclusions.js +151 -0
- package/dist/catalog/core-catalog.d.ts +2 -0
- package/dist/catalog/core-catalog.d.ts.map +1 -0
- package/dist/catalog/core-catalog.js +19 -0
- package/dist/catalog/core-collection-stories.d.ts +3 -0
- package/dist/catalog/core-collection-stories.d.ts.map +1 -0
- package/dist/catalog/core-collection-stories.js +42 -0
- package/dist/catalog/core-control-stories.d.ts +3 -0
- package/dist/catalog/core-control-stories.d.ts.map +1 -0
- package/dist/catalog/core-control-stories.js +94 -0
- package/dist/catalog/core-feedback-stories.d.ts +3 -0
- package/dist/catalog/core-feedback-stories.d.ts.map +1 -0
- package/dist/catalog/core-feedback-stories.js +50 -0
- package/dist/catalog/core-foundation-stories.d.ts +3 -0
- package/dist/catalog/core-foundation-stories.d.ts.map +1 -0
- package/dist/catalog/core-foundation-stories.js +53 -0
- package/dist/catalog/core-navigation-stories.d.ts +3 -0
- package/dist/catalog/core-navigation-stories.d.ts.map +1 -0
- package/dist/catalog/core-navigation-stories.js +25 -0
- package/dist/catalog/core-overlay-stories.d.ts +3 -0
- package/dist/catalog/core-overlay-stories.d.ts.map +1 -0
- package/dist/catalog/core-overlay-stories.js +20 -0
- package/dist/catalog/index.d.ts +7 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +6 -0
- package/dist/components/app-error-boundary.d.ts +1 -0
- package/dist/components/app-error-boundary.d.ts.map +1 -1
- package/dist/components/app-error-boundary.js +13 -0
- package/dist/components/chat/chat-image-lightbox.d.ts +9 -0
- package/dist/components/chat/chat-image-lightbox.d.ts.map +1 -0
- package/dist/components/chat/chat-image-lightbox.js +9 -0
- package/dist/components/chat/chat-message.d.ts +19 -1
- package/dist/components/chat/chat-message.d.ts.map +1 -1
- package/dist/components/chat/chat-message.js +66 -16
- package/dist/components/chat/chat-messages.d.ts +5 -2
- package/dist/components/chat/chat-messages.d.ts.map +1 -1
- package/dist/components/chat/chat-messages.js +61 -6
- package/dist/components/chat/chat-panel.d.ts +49 -6
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +196 -163
- package/dist/components/chat/conversation-history.d.ts +39 -5
- package/dist/components/chat/conversation-history.d.ts.map +1 -1
- package/dist/components/chat/conversation-history.js +192 -26
- package/dist/components/chat/index.d.ts +2 -2
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/tool-handlers.d.ts.map +1 -1
- package/dist/components/chat/tool-handlers.js +40 -2
- package/dist/components/chat/vertical-scroll-fade.d.ts +6 -0
- package/dist/components/chat/vertical-scroll-fade.d.ts.map +1 -0
- package/dist/components/chat/vertical-scroll-fade.js +12 -0
- package/dist/components/native-capabilities/bluetooth-panel-helpers.d.ts +9 -0
- package/dist/components/native-capabilities/bluetooth-panel-helpers.d.ts.map +1 -0
- package/dist/components/native-capabilities/bluetooth-panel-helpers.js +37 -0
- package/dist/components/native-capabilities/bluetooth-panel.d.ts +56 -0
- package/dist/components/native-capabilities/bluetooth-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/bluetooth-panel.js +470 -0
- package/dist/components/native-capabilities/camera-preview.d.ts +39 -0
- package/dist/components/native-capabilities/camera-preview.d.ts.map +1 -0
- package/dist/components/native-capabilities/camera-preview.js +228 -0
- package/dist/components/native-capabilities/capability-badge.d.ts +23 -0
- package/dist/components/native-capabilities/capability-badge.d.ts.map +1 -0
- package/dist/components/native-capabilities/capability-badge.js +39 -0
- package/dist/components/native-capabilities/capability-matrix.d.ts +14 -0
- package/dist/components/native-capabilities/capability-matrix.d.ts.map +1 -0
- package/dist/components/native-capabilities/capability-matrix.js +97 -0
- package/dist/components/native-capabilities/clipboard-button.d.ts +26 -0
- package/dist/components/native-capabilities/clipboard-button.d.ts.map +1 -0
- package/dist/components/native-capabilities/clipboard-button.js +99 -0
- package/dist/components/native-capabilities/device-io-controls.d.ts +4 -0
- package/dist/components/native-capabilities/device-io-controls.d.ts.map +1 -0
- package/dist/components/native-capabilities/device-io-controls.js +28 -0
- package/dist/components/native-capabilities/device-list.d.ts +20 -0
- package/dist/components/native-capabilities/device-list.d.ts.map +1 -0
- package/dist/components/native-capabilities/device-list.js +14 -0
- package/dist/components/native-capabilities/display-map.d.ts +23 -0
- package/dist/components/native-capabilities/display-map.d.ts.map +1 -0
- package/dist/components/native-capabilities/display-map.js +114 -0
- package/dist/components/native-capabilities/haptic-button.d.ts +26 -0
- package/dist/components/native-capabilities/haptic-button.d.ts.map +1 -0
- package/dist/components/native-capabilities/haptic-button.js +94 -0
- package/dist/components/native-capabilities/hid-panel.d.ts +40 -0
- package/dist/components/native-capabilities/hid-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/hid-panel.js +373 -0
- package/dist/components/native-capabilities/index.d.ts +27 -0
- package/dist/components/native-capabilities/index.d.ts.map +1 -0
- package/dist/components/native-capabilities/index.js +26 -0
- package/dist/components/native-capabilities/live-indicator.d.ts +15 -0
- package/dist/components/native-capabilities/live-indicator.d.ts.map +1 -0
- package/dist/components/native-capabilities/live-indicator.js +26 -0
- package/dist/components/native-capabilities/local-auth-button.d.ts +33 -0
- package/dist/components/native-capabilities/local-auth-button.d.ts.map +1 -0
- package/dist/components/native-capabilities/local-auth-button.js +115 -0
- package/dist/components/native-capabilities/location-panel.d.ts +29 -0
- package/dist/components/native-capabilities/location-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/location-panel.js +146 -0
- package/dist/components/native-capabilities/microphone-meter.d.ts +35 -0
- package/dist/components/native-capabilities/microphone-meter.d.ts.map +1 -0
- package/dist/components/native-capabilities/microphone-meter.js +244 -0
- package/dist/components/native-capabilities/midi-monitor.d.ts +54 -0
- package/dist/components/native-capabilities/midi-monitor.d.ts.map +1 -0
- package/dist/components/native-capabilities/midi-monitor.js +534 -0
- package/dist/components/native-capabilities/native-capability-panel.d.ts +11 -0
- package/dist/components/native-capabilities/native-capability-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/native-capability-panel.js +28 -0
- package/dist/components/native-capabilities/notification-panel.d.ts +24 -0
- package/dist/components/native-capabilities/notification-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/notification-panel.js +124 -0
- package/dist/components/native-capabilities/power-blocker-controller.d.ts +19 -0
- package/dist/components/native-capabilities/power-blocker-controller.d.ts.map +1 -0
- package/dist/components/native-capabilities/power-blocker-controller.js +83 -0
- package/dist/components/native-capabilities/power-panel.d.ts +67 -0
- package/dist/components/native-capabilities/power-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/power-panel.js +309 -0
- package/dist/components/native-capabilities/readout.d.ts +10 -0
- package/dist/components/native-capabilities/readout.d.ts.map +1 -0
- package/dist/components/native-capabilities/readout.js +11 -0
- package/dist/components/native-capabilities/screen-share-preview.d.ts +36 -0
- package/dist/components/native-capabilities/screen-share-preview.d.ts.map +1 -0
- package/dist/components/native-capabilities/screen-share-preview.js +191 -0
- package/dist/components/native-capabilities/secure-storage-panel.d.ts +36 -0
- package/dist/components/native-capabilities/secure-storage-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/secure-storage-panel.js +193 -0
- package/dist/components/native-capabilities/serial-console.d.ts +64 -0
- package/dist/components/native-capabilities/serial-console.d.ts.map +1 -0
- package/dist/components/native-capabilities/serial-console.js +399 -0
- package/dist/components/native-capabilities/shortcut-recorder.d.ts +35 -0
- package/dist/components/native-capabilities/shortcut-recorder.d.ts.map +1 -0
- package/dist/components/native-capabilities/shortcut-recorder.js +217 -0
- package/dist/components/native-capabilities/stream-log.d.ts +35 -0
- package/dist/components/native-capabilities/stream-log.d.ts.map +1 -0
- package/dist/components/native-capabilities/stream-log.js +65 -0
- package/dist/components/native-capabilities/system-audio-monitor.d.ts +34 -0
- package/dist/components/native-capabilities/system-audio-monitor.d.ts.map +1 -0
- package/dist/components/native-capabilities/system-audio-monitor.js +275 -0
- package/dist/components/native-capabilities/usb-panel.d.ts +54 -0
- package/dist/components/native-capabilities/usb-panel.d.ts.map +1 -0
- package/dist/components/native-capabilities/usb-panel.js +363 -0
- package/dist/components/native-capabilities/use-capability.d.ts +20 -0
- package/dist/components/native-capabilities/use-capability.d.ts.map +1 -0
- package/dist/components/native-capabilities/use-capability.js +61 -0
- package/dist/components/ui/alert-dialog.d.ts +7 -3
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +9 -5
- package/dist/components/ui/alert.d.ts +19 -3
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +25 -8
- package/dist/components/ui/app-frame.d.ts +28 -0
- package/dist/components/ui/app-frame.d.ts.map +1 -0
- package/dist/components/ui/app-frame.js +95 -0
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/collapsible.d.ts +9 -1
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +13 -2
- package/dist/components/ui/collection-navigation.d.ts +8 -0
- package/dist/components/ui/collection-navigation.d.ts.map +1 -0
- package/dist/components/ui/collection-navigation.js +19 -0
- package/dist/components/ui/color-well.d.ts +13 -0
- package/dist/components/ui/color-well.d.ts.map +1 -0
- package/dist/components/ui/color-well.js +30 -0
- package/dist/components/ui/command.d.ts +5 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +13 -1
- package/dist/components/ui/confirm-dialog.d.ts +19 -0
- package/dist/components/ui/confirm-dialog.d.ts.map +1 -0
- package/dist/components/ui/confirm-dialog.js +45 -0
- package/dist/components/ui/date-field.d.ts +19 -0
- package/dist/components/ui/date-field.d.ts.map +1 -0
- package/dist/components/ui/date-field.js +54 -0
- package/dist/components/ui/date-picker.d.ts +24 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/date-picker.js +92 -0
- package/dist/components/ui/dialog.d.ts +4 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +8 -5
- package/dist/components/ui/edge-fade.d.ts +11 -0
- package/dist/components/ui/edge-fade.d.ts.map +1 -0
- package/dist/components/ui/edge-fade.js +41 -0
- package/dist/components/ui/empty.d.ts +7 -2
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js +20 -7
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/grid.d.ts +24 -0
- package/dist/components/ui/grid.d.ts.map +1 -0
- package/dist/components/ui/grid.js +258 -0
- package/dist/components/ui/icon-button.d.ts +15 -0
- package/dist/components/ui/icon-button.d.ts.map +1 -0
- package/dist/components/ui/icon-button.js +15 -0
- package/dist/components/ui/index.d.ts +23 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +23 -0
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/inspector.d.ts +15 -0
- package/dist/components/ui/inspector.d.ts.map +1 -0
- package/dist/components/ui/inspector.js +26 -0
- package/dist/components/ui/kbd.d.ts +1 -1
- package/dist/components/ui/list.d.ts +28 -0
- package/dist/components/ui/list.d.ts.map +1 -0
- package/dist/components/ui/list.js +235 -0
- package/dist/components/ui/material.d.ts +34 -0
- package/dist/components/ui/material.d.ts.map +1 -0
- package/dist/components/ui/material.js +34 -0
- package/dist/components/ui/message-scroller-controller.d.ts +162 -0
- package/dist/components/ui/message-scroller-controller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-controller.js +888 -0
- package/dist/components/ui/message-scroller-layout-stability.d.ts +33 -0
- package/dist/components/ui/message-scroller-layout-stability.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-layout-stability.js +153 -0
- package/dist/components/ui/message-scroller-policy.d.ts +74 -0
- package/dist/components/ui/message-scroller-policy.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-policy.js +129 -0
- package/dist/components/ui/message-scroller-primitive.d.ts +55 -0
- package/dist/components/ui/message-scroller-primitive.d.ts.map +1 -0
- package/dist/components/ui/message-scroller-primitive.js +226 -0
- package/dist/components/ui/message-scroller.d.ts +11 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.js +25 -0
- package/dist/components/ui/navigation-button-group.d.ts +16 -0
- package/dist/components/ui/navigation-button-group.d.ts.map +1 -0
- package/dist/components/ui/navigation-button-group.js +9 -0
- package/dist/components/ui/notification-dot.d.ts +4 -0
- package/dist/components/ui/notification-dot.d.ts.map +1 -0
- package/dist/components/ui/notification-dot.js +7 -0
- package/dist/components/ui/number-input.d.ts +16 -0
- package/dist/components/ui/number-input.d.ts.map +1 -0
- package/dist/components/ui/number-input.js +56 -0
- package/dist/components/ui/panel.d.ts +18 -0
- package/dist/components/ui/panel.d.ts.map +1 -0
- package/dist/components/ui/panel.js +40 -0
- package/dist/components/ui/popover.d.ts +9 -2
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +14 -4
- package/dist/components/ui/scroll-area.d.ts +8 -2
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +6 -3
- package/dist/components/ui/search-field.d.ts +19 -0
- package/dist/components/ui/search-field.d.ts.map +1 -0
- package/dist/components/ui/search-field.js +64 -0
- package/dist/components/ui/segmented-control.d.ts +21 -0
- package/dist/components/ui/segmented-control.d.ts.map +1 -0
- package/dist/components/ui/segmented-control.js +62 -0
- package/dist/components/ui/sheet.d.ts +4 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +12 -9
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/sonner.d.ts +4 -3
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +7 -6
- package/dist/components/ui/split-view.d.ts +11 -0
- package/dist/components/ui/split-view.d.ts.map +1 -0
- package/dist/components/ui/split-view.js +13 -0
- package/dist/components/ui/status.d.ts +13 -0
- package/dist/components/ui/status.d.ts.map +1 -0
- package/dist/components/ui/status.js +36 -0
- package/dist/components/ui/table.d.ts +11 -2
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +33 -6
- package/dist/components/ui/text.d.ts +17 -0
- package/dist/components/ui/text.d.ts.map +1 -0
- package/dist/components/ui/text.js +55 -0
- package/dist/components/ui/toggle.d.ts +12 -4
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +13 -2
- package/dist/components/ui/toolbar.d.ts +27 -0
- package/dist/components/ui/toolbar.d.ts.map +1 -0
- package/dist/components/ui/toolbar.js +71 -0
- package/dist/components/ui/tooltip.d.ts +8 -3
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +11 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/lib/frame-lifecycle.d.ts +29 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +85 -0
- package/dist/lib/native-capabilities/access.d.ts +13 -0
- package/dist/lib/native-capabilities/access.d.ts.map +1 -0
- package/dist/lib/native-capabilities/access.js +53 -0
- package/dist/lib/native-capabilities/bluetooth-access.d.ts +14 -0
- package/dist/lib/native-capabilities/bluetooth-access.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-access.js +43 -0
- package/dist/lib/native-capabilities/bluetooth-connection.d.ts +19 -0
- package/dist/lib/native-capabilities/bluetooth-connection.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-connection.js +88 -0
- package/dist/lib/native-capabilities/bluetooth-gatt.d.ts +7 -0
- package/dist/lib/native-capabilities/bluetooth-gatt.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-gatt.js +77 -0
- package/dist/lib/native-capabilities/bluetooth-internal.d.ts +10 -0
- package/dist/lib/native-capabilities/bluetooth-internal.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-internal.js +105 -0
- package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts +33 -0
- package/dist/lib/native-capabilities/bluetooth-native-fallback.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-native-fallback.js +214 -0
- package/dist/lib/native-capabilities/bluetooth-types.d.ts +85 -0
- package/dist/lib/native-capabilities/bluetooth-types.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth-types.js +2 -0
- package/dist/lib/native-capabilities/bluetooth.d.ts +7 -0
- package/dist/lib/native-capabilities/bluetooth.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bluetooth.js +4 -0
- package/dist/lib/native-capabilities/bridge.d.ts +23 -0
- package/dist/lib/native-capabilities/bridge.d.ts.map +1 -0
- package/dist/lib/native-capabilities/bridge.js +266 -0
- package/dist/lib/native-capabilities/capabilities.d.ts +7 -0
- package/dist/lib/native-capabilities/capabilities.d.ts.map +1 -0
- package/dist/lib/native-capabilities/capabilities.js +95 -0
- package/dist/lib/native-capabilities/clipboard.d.ts +11 -0
- package/dist/lib/native-capabilities/clipboard.d.ts.map +1 -0
- package/dist/lib/native-capabilities/clipboard.js +58 -0
- package/dist/lib/native-capabilities/device-io-errors.d.ts +11 -0
- package/dist/lib/native-capabilities/device-io-errors.d.ts.map +1 -0
- package/dist/lib/native-capabilities/device-io-errors.js +82 -0
- package/dist/lib/native-capabilities/displays.d.ts +38 -0
- package/dist/lib/native-capabilities/displays.d.ts.map +1 -0
- package/dist/lib/native-capabilities/displays.js +12 -0
- package/dist/lib/native-capabilities/global-shortcuts.d.ts +86 -0
- package/dist/lib/native-capabilities/global-shortcuts.d.ts.map +1 -0
- package/dist/lib/native-capabilities/global-shortcuts.js +351 -0
- package/dist/lib/native-capabilities/haptics.d.ts +25 -0
- package/dist/lib/native-capabilities/haptics.d.ts.map +1 -0
- package/dist/lib/native-capabilities/haptics.js +18 -0
- package/dist/lib/native-capabilities/hid-native.d.ts +26 -0
- package/dist/lib/native-capabilities/hid-native.d.ts.map +1 -0
- package/dist/lib/native-capabilities/hid-native.js +229 -0
- package/dist/lib/native-capabilities/hid.d.ts +52 -0
- package/dist/lib/native-capabilities/hid.d.ts.map +1 -0
- package/dist/lib/native-capabilities/hid.js +163 -0
- package/dist/lib/native-capabilities/index.d.ts +40 -0
- package/dist/lib/native-capabilities/index.d.ts.map +1 -0
- package/dist/lib/native-capabilities/index.js +21 -0
- package/dist/lib/native-capabilities/local-authentication.d.ts +32 -0
- package/dist/lib/native-capabilities/local-authentication.d.ts.map +1 -0
- package/dist/lib/native-capabilities/local-authentication.js +46 -0
- package/dist/lib/native-capabilities/location.d.ts +49 -0
- package/dist/lib/native-capabilities/location.d.ts.map +1 -0
- package/dist/lib/native-capabilities/location.js +114 -0
- package/dist/lib/native-capabilities/media-permissions.d.ts +28 -0
- package/dist/lib/native-capabilities/media-permissions.d.ts.map +1 -0
- package/dist/lib/native-capabilities/media-permissions.js +37 -0
- package/dist/lib/native-capabilities/media.d.ts +17 -0
- package/dist/lib/native-capabilities/media.d.ts.map +1 -0
- package/dist/lib/native-capabilities/media.js +104 -0
- package/dist/lib/native-capabilities/midi-access.d.ts +13 -0
- package/dist/lib/native-capabilities/midi-access.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-access.js +68 -0
- package/dist/lib/native-capabilities/midi-internal.d.ts +12 -0
- package/dist/lib/native-capabilities/midi-internal.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-internal.js +88 -0
- package/dist/lib/native-capabilities/midi-native-fallback.d.ts +27 -0
- package/dist/lib/native-capabilities/midi-native-fallback.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-native-fallback.js +127 -0
- package/dist/lib/native-capabilities/midi-ports.d.ts +6 -0
- package/dist/lib/native-capabilities/midi-ports.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-ports.js +115 -0
- package/dist/lib/native-capabilities/midi-types.d.ts +25 -0
- package/dist/lib/native-capabilities/midi-types.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi-types.js +1 -0
- package/dist/lib/native-capabilities/midi.d.ts +6 -0
- package/dist/lib/native-capabilities/midi.d.ts.map +1 -0
- package/dist/lib/native-capabilities/midi.js +3 -0
- package/dist/lib/native-capabilities/native-device-io.d.ts +28 -0
- package/dist/lib/native-capabilities/native-device-io.d.ts.map +1 -0
- package/dist/lib/native-capabilities/native-device-io.js +91 -0
- package/dist/lib/native-capabilities/native-device-lifecycle.d.ts +13 -0
- package/dist/lib/native-capabilities/native-device-lifecycle.d.ts.map +1 -0
- package/dist/lib/native-capabilities/native-device-lifecycle.js +40 -0
- package/dist/lib/native-capabilities/notifications.d.ts +38 -0
- package/dist/lib/native-capabilities/notifications.d.ts.map +1 -0
- package/dist/lib/native-capabilities/notifications.js +50 -0
- package/dist/lib/native-capabilities/power-session.d.ts +113 -0
- package/dist/lib/native-capabilities/power-session.d.ts.map +1 -0
- package/dist/lib/native-capabilities/power-session.js +264 -0
- package/dist/lib/native-capabilities/secure-storage.d.ts +36 -0
- package/dist/lib/native-capabilities/secure-storage.d.ts.map +1 -0
- package/dist/lib/native-capabilities/secure-storage.js +64 -0
- package/dist/lib/native-capabilities/serial-native.d.ts +23 -0
- package/dist/lib/native-capabilities/serial-native.d.ts.map +1 -0
- package/dist/lib/native-capabilities/serial-native.js +181 -0
- package/dist/lib/native-capabilities/serial.d.ts +76 -0
- package/dist/lib/native-capabilities/serial.d.ts.map +1 -0
- package/dist/lib/native-capabilities/serial.js +215 -0
- package/dist/lib/native-capabilities/system-audio.d.ts +127 -0
- package/dist/lib/native-capabilities/system-audio.d.ts.map +1 -0
- package/dist/lib/native-capabilities/system-audio.js +330 -0
- package/dist/lib/native-capabilities/types.d.ts +62 -0
- package/dist/lib/native-capabilities/types.d.ts.map +1 -0
- package/dist/lib/native-capabilities/types.js +27 -0
- package/dist/lib/native-capabilities/usb-native.d.ts +39 -0
- package/dist/lib/native-capabilities/usb-native.d.ts.map +1 -0
- package/dist/lib/native-capabilities/usb-native.js +217 -0
- package/dist/lib/native-capabilities/usb.d.ts +85 -0
- package/dist/lib/native-capabilities/usb.d.ts.map +1 -0
- package/dist/lib/native-capabilities/usb.js +225 -0
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +2 -1
- package/docs/README.md +39 -0
- package/docs/accessibility.md +32 -0
- package/docs/adaptive-materials.md +79 -0
- package/docs/app-anatomy.md +74 -0
- package/docs/component-catalog.md +82 -0
- package/docs/component-guide-template.md +37 -0
- package/docs/design-tokens.md +185 -0
- package/docs/foundations.md +58 -0
- package/docs/native-integration.md +33 -0
- package/docs/standalone-app-windows.md +136 -0
- package/package.json +8 -3
- package/src/components/ui/alert-dialog.md +31 -0
- package/src/components/ui/alert.md +77 -0
- package/src/components/ui/app-frame.md +38 -0
- package/src/components/ui/badge.md +57 -0
- package/src/components/ui/button.md +76 -0
- package/src/components/ui/collapsible.md +52 -0
- package/src/components/ui/color-well.md +11 -0
- package/src/components/ui/combobox.md +42 -0
- package/src/components/ui/command.md +54 -0
- package/src/components/ui/date-field.md +32 -0
- package/src/components/ui/date-picker.md +55 -0
- package/src/components/ui/dialog.md +40 -0
- package/src/components/ui/edge-fade.md +7 -0
- package/src/components/ui/empty.md +87 -0
- package/src/components/ui/field.md +77 -0
- package/src/components/ui/grid.md +109 -0
- package/src/components/ui/icon-button.md +36 -0
- package/src/components/ui/inspector.md +11 -0
- package/src/components/ui/item.md +87 -0
- package/src/components/ui/list.md +140 -0
- package/src/components/ui/material.md +51 -0
- package/src/components/ui/navigation-button-group.md +46 -0
- package/src/components/ui/notification-dot.md +7 -0
- package/src/components/ui/number-input.md +19 -0
- package/src/components/ui/panel.md +11 -0
- package/src/components/ui/popover.md +31 -0
- package/src/components/ui/resizable.md +66 -0
- package/src/components/ui/scroll-area.md +72 -0
- package/src/components/ui/search-field.md +33 -0
- package/src/components/ui/segmented-control.md +36 -0
- package/src/components/ui/sheet.md +30 -0
- package/src/components/ui/sidebar.md +113 -0
- package/src/components/ui/sonner.md +37 -0
- package/src/components/ui/split-view.md +15 -0
- package/src/components/ui/status.md +12 -0
- package/src/components/ui/table.md +37 -0
- package/src/components/ui/tabs.md +66 -0
- package/src/components/ui/text.md +17 -0
- package/src/components/ui/toggle-button.md +48 -0
- package/src/components/ui/toggle-group.md +80 -0
- package/src/components/ui/toggle.md +73 -0
- package/src/components/ui/toolbar.md +26 -0
- package/src/components/ui/tooltip.md +31 -0
- package/src/styles/index.css +704 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Panel
|
|
2
|
+
|
|
3
|
+
Semantic app panes with fixed chrome and independently scrolling content.
|
|
4
|
+
|
|
5
|
+
`PanelGroup` lays out panes horizontally or vertically. `Panel` owns the
|
|
6
|
+
surface; `PanelHeader`, `PanelContent`, and `PanelFooter` define its regions.
|
|
7
|
+
Use `surface="sidebar"` for source/navigation panes and reserve `Card` for
|
|
8
|
+
bounded content groups inside a pane.
|
|
9
|
+
|
|
10
|
+
The group and its containing shell need a definite height. Long content belongs
|
|
11
|
+
in `PanelContent`, and chat-safe padding belongs on that scrolling region.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Popover
|
|
2
|
+
|
|
3
|
+
Use `Popover` for a small, interactive surface anchored to a control. Use
|
|
4
|
+
`Tooltip` for terse non-interactive help, `HoverCard` for a preview, and
|
|
5
|
+
`Dialog` for a blocking task.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
<Popover>
|
|
9
|
+
<PopoverTrigger asChild>
|
|
10
|
+
<Button variant="outline">View options</Button>
|
|
11
|
+
</PopoverTrigger>
|
|
12
|
+
<PopoverContent size="sm" material="regular">
|
|
13
|
+
<PopoverHeader>
|
|
14
|
+
<PopoverTitle>View options</PopoverTitle>
|
|
15
|
+
<PopoverDescription>Choose what appears in the list.</PopoverDescription>
|
|
16
|
+
</PopoverHeader>
|
|
17
|
+
{/* interactive controls */}
|
|
18
|
+
</PopoverContent>
|
|
19
|
+
</Popover>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Sizes are `content`, `sm`, `default`, and `lg`. Content is capped to the
|
|
23
|
+
collision-aware available width and height and scrolls when necessary.
|
|
24
|
+
`material="regular"` is the standard temporary overlay. Use `clear` only above
|
|
25
|
+
media or a richly colored canvas where the stronger sampled effect has a clear
|
|
26
|
+
layering purpose.
|
|
27
|
+
|
|
28
|
+
`PopoverClose`, `PopoverPortal`, and `PopoverArrow` are available when the
|
|
29
|
+
composition needs them. Provide an accessible name on an icon-only close
|
|
30
|
+
action. Keep required instructions and critical actions discoverable without
|
|
31
|
+
hover.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Resizable
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
The resizable primitives create user-adjustable panes for technical and object-heavy workspaces. Use them when two or more views need to stay visible, such as navigation/editor/inspector or query/results.
|
|
6
|
+
|
|
7
|
+
Use a stable flex split when resizing does not materially help. Use `Sidebar` for application navigation that needs collapse and narrow-screen sheet behavior.
|
|
8
|
+
|
|
9
|
+
## Usage patterns
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import {
|
|
13
|
+
ResizableHandle,
|
|
14
|
+
ResizablePanel,
|
|
15
|
+
ResizablePanelGroup,
|
|
16
|
+
} from '@moldable-ai/ui'
|
|
17
|
+
|
|
18
|
+
;<ResizablePanelGroup orientation="horizontal" className="h-full min-h-0">
|
|
19
|
+
<ResizablePanel defaultSize="24%" minSize="14%">
|
|
20
|
+
<nav className="h-full min-h-0 overflow-y-auto pb-[calc(var(--chat-safe-padding,0px)+1rem)]">
|
|
21
|
+
{/* Object browser */}
|
|
22
|
+
</nav>
|
|
23
|
+
</ResizablePanel>
|
|
24
|
+
<ResizableHandle withHandle />
|
|
25
|
+
<ResizablePanel minSize="35%">
|
|
26
|
+
<section className="h-full min-h-0 overflow-hidden">
|
|
27
|
+
{/* Workspace */}
|
|
28
|
+
</section>
|
|
29
|
+
</ResizablePanel>
|
|
30
|
+
</ResizablePanelGroup>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Use `orientation="vertical"` for editor/results splits. Each panel should establish its own overflow behavior; the panel group itself should remain bounded by a full-height parent.
|
|
34
|
+
|
|
35
|
+
## API summary
|
|
36
|
+
|
|
37
|
+
- `ResizablePanelGroup`: wraps `react-resizable-panels` `Group`; `orientation` is `"horizontal"` or `"vertical"` and defaults upstream to horizontal.
|
|
38
|
+
- `ResizablePanel`: wraps `Panel` and accepts its sizing, collapse, callback, id, and ref props.
|
|
39
|
+
- `ResizablePanel` also accepts `groupResizeBehavior` for compatibility, but the current wrapper intentionally does not forward or act on it.
|
|
40
|
+
- `ResizableHandle`: wraps `Separator`; `withHandle` adds a visible grip.
|
|
41
|
+
- All parts accept `className` where supported by their underlying primitive.
|
|
42
|
+
|
|
43
|
+
Refer to the installed `react-resizable-panels` version for precise size units and imperative ref APIs; keep all panels on the same convention.
|
|
44
|
+
|
|
45
|
+
## Do
|
|
46
|
+
|
|
47
|
+
- Give the group and all ancestors a stable `h-full min-h-0`.
|
|
48
|
+
- Set sensible default and minimum sizes based on the content’s real scan width.
|
|
49
|
+
- Use `withHandle` when a one-pixel divider would be difficult to discover.
|
|
50
|
+
- Keep each pane’s toolbar fixed and its content intentionally scrollable.
|
|
51
|
+
- Preserve keyboard focus indication on separators.
|
|
52
|
+
- Collapse or replace secondary panes at narrow widths when necessary.
|
|
53
|
+
|
|
54
|
+
## Don't
|
|
55
|
+
|
|
56
|
+
- Do not make every surface resizable.
|
|
57
|
+
- Do not allow a pane to shrink until labels, editors, or controls become unusable.
|
|
58
|
+
- Do not put document scrolling on the panel group or `body`.
|
|
59
|
+
- Do not animate pane size for decoration.
|
|
60
|
+
- Do not assume resizable desktop panes automatically become a good narrow layout.
|
|
61
|
+
|
|
62
|
+
## Moldable considerations
|
|
63
|
+
|
|
64
|
+
Resizable layouts are the default fit for database, code, file, debugging, and inspector-style apps. Keep pane toolbars around `h-8` or `h-9`, use mono text for code/data, and avoid nested card shells.
|
|
65
|
+
|
|
66
|
+
Every independently scrolling pane that reaches the bottom needs its own `--chat-safe-padding`. A bottom control dock may require additional space beyond the standard pane padding. When selection changes in any pane, keep the other panes, app commands, and desktop chat context synchronized.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Scroll Area
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
`ScrollArea` provides a styled vertical scrollbar while preserving a native-feeling scroll viewport. Use it for bounded lists, object browsers, menus, and panes where consistent scrollbar appearance is useful.
|
|
6
|
+
|
|
7
|
+
For simple content, a native `overflow-y-auto` region is often sufficient. The important design decision is which pane scrolls, not whether every pane uses a custom scrollbar.
|
|
8
|
+
|
|
9
|
+
## Usage patterns
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { ScrollArea } from '@moldable-ai/ui'
|
|
13
|
+
|
|
14
|
+
;<ScrollArea className="h-full min-h-0" safeBottom>
|
|
15
|
+
<div className="px-3 pt-3">{/* Long list */}</div>
|
|
16
|
+
</ScrollArea>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
For a grouped list:
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
<ScrollArea className="h-full px-5 pt-3">
|
|
23
|
+
<div className="mx-auto w-full max-w-[44rem] space-y-8 pb-[calc(var(--chat-safe-padding,0px)+6rem)]">
|
|
24
|
+
{/* Groups */}
|
|
25
|
+
</div>
|
|
26
|
+
</ScrollArea>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The current `ScrollArea` composition installs a vertical scrollbar by default.
|
|
30
|
+
Set `scrollbars` to `horizontal`, `both`, or `none` for another explicit
|
|
31
|
+
configuration.
|
|
32
|
+
|
|
33
|
+
## API summary
|
|
34
|
+
|
|
35
|
+
- `ScrollArea`: Radix Scroll Area root with a full-size viewport, vertical `ScrollBar`, and corner.
|
|
36
|
+
- Accepts Radix root props, forwarded `ref`, and `className`.
|
|
37
|
+
- `scrollbars`: `vertical`, `horizontal`, `both`, or `none`.
|
|
38
|
+
- `viewportClassName`: styles the actual scrolling viewport.
|
|
39
|
+
- `safeBottom`: adds the shared chat-safe padding to the viewport exactly once.
|
|
40
|
+
- `ScrollBar`: exported scrollbar primitive with `orientation="vertical" | "horizontal"`; defaults to vertical.
|
|
41
|
+
- The root’s direct children are rendered inside the viewport.
|
|
42
|
+
- The viewport supplies focus-visible outline and ring treatment.
|
|
43
|
+
|
|
44
|
+
## Do
|
|
45
|
+
|
|
46
|
+
- Give the scroll area a definite height through its own class and full-height ancestors.
|
|
47
|
+
- Put padding on an inner content wrapper when it should scroll with the content.
|
|
48
|
+
- Add `min-h-0` to flex or grid ancestors.
|
|
49
|
+
- Enable `safeBottom` on every owning scroll region that reaches the webview bottom.
|
|
50
|
+
- Keep sticky headers inside the same scrolling context as their content.
|
|
51
|
+
- Test keyboard, wheel, trackpad, and scrollbar-thumb interaction.
|
|
52
|
+
|
|
53
|
+
## Don't
|
|
54
|
+
|
|
55
|
+
- Do not rely on document/body scrolling for a full Moldable app.
|
|
56
|
+
- Do not nest scroll areas unless each axis or pane has a clear purpose.
|
|
57
|
+
- Do not put fixed controls inside the moving content when they must remain reachable.
|
|
58
|
+
- Do not hide focus outlines.
|
|
59
|
+
- Do not assume padding on a sibling pane protects this viewport from desktop chat.
|
|
60
|
+
- Do not add `ScrollBar` as a child of `ScrollArea`; children belong to its
|
|
61
|
+
viewport. Use the `scrollbars` prop.
|
|
62
|
+
|
|
63
|
+
## Moldable considerations
|
|
64
|
+
|
|
65
|
+
Choose padding based on the surface:
|
|
66
|
+
|
|
67
|
+
- General full-view content: `pb-[calc(var(--chat-safe-padding,0px)+6rem)]`
|
|
68
|
+
- Long document/editor content: `pb-[calc(var(--chat-safe-padding,0px)+8rem)]`
|
|
69
|
+
- Tables and inspectors: `pb-[var(--chat-safe-padding,0px)]`
|
|
70
|
+
- Side panes and object browsers: `pb-[calc(var(--chat-safe-padding,0px)+1rem)]`
|
|
71
|
+
|
|
72
|
+
Increase it when a fixed action dock also occupies the bottom. Empty, error, and loading states rendered in a scroll area need the same clearance as normal content.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Search Field
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
`SearchField` is a native search input with consistent icon, density, loading, clear, invalid, disabled, and focus states. It supports controlled and uncontrolled values without replacing browser text-entry behavior.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { SearchField } from '@moldable-ai/ui'
|
|
11
|
+
|
|
12
|
+
;<SearchField
|
|
13
|
+
aria-label="Search projects"
|
|
14
|
+
value={query}
|
|
15
|
+
onValueChange={setQuery}
|
|
16
|
+
placeholder="Search projects"
|
|
17
|
+
density="compact"
|
|
18
|
+
loading={isSearching}
|
|
19
|
+
/>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Use `value`/`onValueChange` for a controlled field or `defaultValue` for an uncontrolled field. `variant` is `default` or `filled`; `density` is `compact`, `default`, or `comfortable`. `clearable` defaults to true. Escape and the clear action empty a non-empty field, refocus it, and call `onClear`.
|
|
23
|
+
|
|
24
|
+
## Quality bar
|
|
25
|
+
|
|
26
|
+
- Provide a visible label or an accessible `aria-label`.
|
|
27
|
+
- Keep placeholder text short; it is a hint, not the field’s name.
|
|
28
|
+
- Debounce network-backed filtering outside the component and use `loading` while results update.
|
|
29
|
+
- Keep keyboard focus in the field after clearing.
|
|
30
|
+
- Announce result counts or no-results changes in the results region when that feedback matters.
|
|
31
|
+
- Do not add a second clear button, bind Escape to close a parent view while the field contains text, or replace native editing shortcuts.
|
|
32
|
+
|
|
33
|
+
Search fields in narrow toolbars should use compact density and a useful minimum width. A global app or command search may be surfaced by the host, but local collection filtering remains app-owned.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Segmented Control
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
`SegmentedControl` switches between a small set of mutually exclusive modes. It uses radio-group semantics, so one option is selected and arrow keys move selection without requiring custom keyboard code.
|
|
6
|
+
|
|
7
|
+
Use it for choices such as list/grid, week/month, or preview/edit. Use `Tabs` when each option labels a corresponding content panel, and use `RadioGroup` for form choices that need longer supporting text.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { SegmentedControl, SegmentedControlItem } from '@moldable-ai/ui'
|
|
13
|
+
|
|
14
|
+
;<SegmentedControl
|
|
15
|
+
aria-label="Calendar view"
|
|
16
|
+
value={view}
|
|
17
|
+
onValueChange={setView}
|
|
18
|
+
density="compact"
|
|
19
|
+
>
|
|
20
|
+
<SegmentedControlItem value="week">Week</SegmentedControlItem>
|
|
21
|
+
<SegmentedControlItem value="month">Month</SegmentedControlItem>
|
|
22
|
+
</SegmentedControl>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The root supports controlled `value`/`onValueChange` and uncontrolled `defaultValue`. `variant` is `muted` or `outline`; `density` is `compact`, `default`, or `comfortable`; `fullWidth` lets each item share the available width.
|
|
26
|
+
|
|
27
|
+
## Quality bar
|
|
28
|
+
|
|
29
|
+
- Keep two to five literal, parallel labels in one group.
|
|
30
|
+
- Give the group an `aria-label` or `aria-labelledby`.
|
|
31
|
+
- Keep icon-only items exceptional. When used, set `iconOnly` and give every item an `aria-label`.
|
|
32
|
+
- Let the radio-group implementation own focus, arrow-key movement, and selected semantics.
|
|
33
|
+
- Use `fullWidth` only when equal-width choices improve scanning in a narrow pane.
|
|
34
|
+
- Do not use a segmented control for commands, independent toggles, or navigation between unrelated destinations.
|
|
35
|
+
|
|
36
|
+
In a standalone app window, keep compact segments in a title toolbar or near the content they change. Do not imitate host window controls or place app actions inside a host-owned control inset.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Sheet
|
|
2
|
+
|
|
3
|
+
`Sheet` presents a secondary region from an edge while preserving the current
|
|
4
|
+
workspace. It is appropriate for narrow-window navigation, filters, or an
|
|
5
|
+
inspector that cannot remain beside the canvas.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
<Sheet>
|
|
9
|
+
<SheetTrigger asChild>
|
|
10
|
+
<Button variant="outline">Filters</Button>
|
|
11
|
+
</SheetTrigger>
|
|
12
|
+
<SheetContent side="right" size="default">
|
|
13
|
+
<SheetHeader>
|
|
14
|
+
<SheetTitle>Filters</SheetTitle>
|
|
15
|
+
<SheetDescription>Limit the visible results.</SheetDescription>
|
|
16
|
+
</SheetHeader>
|
|
17
|
+
<SheetBody>{/* scrolling controls */}</SheetBody>
|
|
18
|
+
<SheetFooter>{/* persistent actions */}</SheetFooter>
|
|
19
|
+
</SheetContent>
|
|
20
|
+
</Sheet>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Side sheets support `sm`, `default`, and `lg`. All sides respect host window
|
|
24
|
+
insets; their bottom edge also clears the embedded chat safe area. `SheetBody`
|
|
25
|
+
is the only flexing scroll owner, leaving its header, close action, and footer
|
|
26
|
+
reachable.
|
|
27
|
+
|
|
28
|
+
Use `Dialog` when the task is centered and blocking, `Drawer` for touch-first
|
|
29
|
+
presentation, and `Inspector` when contextual properties should remain visible
|
|
30
|
+
beside the canvas. Do not use a sheet as permanent desktop navigation.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Sidebar
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
The sidebar primitives build persistent app navigation or an object browser that can collapse on desktop and become a sheet on narrow screens. Use them when users need to switch repeatedly among sections, collections, or saved objects while keeping a working surface visible.
|
|
6
|
+
|
|
7
|
+
Do not add a sidebar to a focused single-workflow app. A list-to-detail layout may need only a stable list pane, while technical workspaces may be better served by `ResizablePanelGroup`.
|
|
8
|
+
|
|
9
|
+
## Usage patterns
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { Inbox } from 'lucide-react'
|
|
13
|
+
import {
|
|
14
|
+
Sidebar,
|
|
15
|
+
SidebarContent,
|
|
16
|
+
SidebarGroup,
|
|
17
|
+
SidebarGroupContent,
|
|
18
|
+
SidebarGroupLabel,
|
|
19
|
+
SidebarInset,
|
|
20
|
+
SidebarMenu,
|
|
21
|
+
SidebarMenuButton,
|
|
22
|
+
SidebarMenuItem,
|
|
23
|
+
SidebarProvider,
|
|
24
|
+
SidebarTrigger,
|
|
25
|
+
} from '@moldable-ai/ui'
|
|
26
|
+
|
|
27
|
+
;<SidebarProvider className="h-full min-h-0">
|
|
28
|
+
<Sidebar collapsible="icon">
|
|
29
|
+
<SidebarContent className="pb-[calc(var(--chat-safe-padding,0px)+1rem)]">
|
|
30
|
+
<SidebarGroup>
|
|
31
|
+
<SidebarGroupLabel>Mailboxes</SidebarGroupLabel>
|
|
32
|
+
<SidebarGroupContent>
|
|
33
|
+
<SidebarMenu>
|
|
34
|
+
<SidebarMenuItem>
|
|
35
|
+
<SidebarMenuButton
|
|
36
|
+
isActive
|
|
37
|
+
tooltip="Inbox"
|
|
38
|
+
className="cursor-pointer"
|
|
39
|
+
>
|
|
40
|
+
<Inbox />
|
|
41
|
+
<span>Inbox</span>
|
|
42
|
+
</SidebarMenuButton>
|
|
43
|
+
</SidebarMenuItem>
|
|
44
|
+
</SidebarMenu>
|
|
45
|
+
</SidebarGroupContent>
|
|
46
|
+
</SidebarGroup>
|
|
47
|
+
</SidebarContent>
|
|
48
|
+
</Sidebar>
|
|
49
|
+
<SidebarInset className="h-full min-h-0 overflow-hidden">
|
|
50
|
+
<header className="border-border/70 flex h-9 shrink-0 items-center border-b px-2">
|
|
51
|
+
<SidebarTrigger className="cursor-pointer" />
|
|
52
|
+
</header>
|
|
53
|
+
{/* Main pane */}
|
|
54
|
+
</SidebarInset>
|
|
55
|
+
</SidebarProvider>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Keep each menu item’s icon and last text span direct children of `SidebarMenuButton`; the component uses that shape for icon sizing and text truncation.
|
|
59
|
+
|
|
60
|
+
## API summary
|
|
61
|
+
|
|
62
|
+
### State and shell
|
|
63
|
+
|
|
64
|
+
- `SidebarProvider`: required context. Supports uncontrolled `defaultOpen`, controlled `open`/`onOpenChange`, and CSS variable overrides through `style`.
|
|
65
|
+
- `useSidebar()`: returns `state`, `open`, `setOpen`, `openMobile`, `setOpenMobile`, `isMobile`, and `toggleSidebar`.
|
|
66
|
+
- `Sidebar`: `side="left" | "right"`, `variant="sidebar" | "floating" | "inset"`, and `collapsible="offcanvas" | "icon" | "none"`.
|
|
67
|
+
- `SidebarInset`: main content surface paired with the sidebar.
|
|
68
|
+
- `SidebarTrigger`: compact toggle button.
|
|
69
|
+
- `SidebarRail`: pointer target along the sidebar edge.
|
|
70
|
+
|
|
71
|
+
### Structure
|
|
72
|
+
|
|
73
|
+
- `SidebarHeader`, `SidebarFooter`, `SidebarContent`, and `SidebarSeparator` divide the vertical shell.
|
|
74
|
+
- `SidebarInput` is a compact search/filter input.
|
|
75
|
+
- `SidebarGroup`, `SidebarGroupLabel`, `SidebarGroupAction`, and `SidebarGroupContent` organize sections.
|
|
76
|
+
|
|
77
|
+
### Menus
|
|
78
|
+
|
|
79
|
+
- `SidebarMenu` and `SidebarMenuItem` provide list structure.
|
|
80
|
+
- `SidebarMenuButton`: `isActive`, `variant="default" | "outline"`, `size="default" | "sm" | "lg"`, optional `asChild`, and `tooltip`.
|
|
81
|
+
- `SidebarMenuAction`: optional `asChild` and `showOnHover`.
|
|
82
|
+
- `SidebarMenuBadge`: compact trailing count.
|
|
83
|
+
- `SidebarMenuSkeleton`: optional `showIcon`.
|
|
84
|
+
- `SidebarMenuSub`, `SidebarMenuSubItem`, and `SidebarMenuSubButton`: one nested level; sub-button size is `sm` or `md`.
|
|
85
|
+
|
|
86
|
+
The provider persists expanded state in the `sidebar_state` cookie and handles Command/Ctrl+B. Collapsed-menu tooltips are built into `SidebarMenuButton` when `tooltip` is provided.
|
|
87
|
+
|
|
88
|
+
## Do
|
|
89
|
+
|
|
90
|
+
- Put the provider around both sidebar and inset.
|
|
91
|
+
- Use one clear active item and update it with navigation state.
|
|
92
|
+
- Add tooltips to icon-collapsible menu buttons.
|
|
93
|
+
- Give group and menu actions accessible names; make hover actions visible on focus.
|
|
94
|
+
- Keep labels in a truncatable span and counts/actions in stable trailing positions.
|
|
95
|
+
- Use `SidebarContent` as the intentional scrolling region.
|
|
96
|
+
- Test expanded, collapsed, off-canvas, and narrow-sheet states.
|
|
97
|
+
|
|
98
|
+
## Don't
|
|
99
|
+
|
|
100
|
+
- Do not restate the app name as a large sidebar or content heading.
|
|
101
|
+
- Do not add more than one meaningful nesting level.
|
|
102
|
+
- Do not use the sidebar as a dumping ground for every command.
|
|
103
|
+
- Do not place the only access to an action in a hover-only control.
|
|
104
|
+
- Do not assume desktop width is always available inside a webview pane.
|
|
105
|
+
- Do not add an app-local chat or assistant section.
|
|
106
|
+
|
|
107
|
+
## Moldable considerations
|
|
108
|
+
|
|
109
|
+
Override the shell for the embedded full-height environment with `h-full min-h-0` and keep the main inset `overflow-hidden`. Add chat-safe bottom padding to `SidebarContent`, because object browsers and navigation lists can extend behind desktop chat independently of the main pane.
|
|
110
|
+
|
|
111
|
+
The built-in Command/Ctrl+B shortcut must not conflict with editor-local bold formatting or another essential command in the same context. If it does, control sidebar state elsewhere or revisit the shortcut at the package level.
|
|
112
|
+
|
|
113
|
+
Use semantic `sidebar-*` tokens already provided by the component. In an object browser, post the active connection, collection, or selected object to desktop chat instructions and expose frequent switches through app commands.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Toasts
|
|
2
|
+
|
|
3
|
+
Mount one `Toaster` near the app root and call the shared `toast` API from
|
|
4
|
+
actions, mutations, and background work.
|
|
5
|
+
|
|
6
|
+
```tsx
|
|
7
|
+
import { Toaster, toast } from '@moldable-ai/ui'
|
|
8
|
+
|
|
9
|
+
function App() {
|
|
10
|
+
return (
|
|
11
|
+
<>
|
|
12
|
+
<Workspace />
|
|
13
|
+
<Toaster position="bottom-center" />
|
|
14
|
+
</>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async function save() {
|
|
19
|
+
await toast.promise(saveDocument(), {
|
|
20
|
+
loading: 'Saving…',
|
|
21
|
+
success: 'Saved',
|
|
22
|
+
error: 'Could not save',
|
|
23
|
+
})
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Recipes
|
|
28
|
+
|
|
29
|
+
- Use a success toast only when the result is not already obvious in the
|
|
30
|
+
canvas.
|
|
31
|
+
- Keep loading, success, and error text stable for a single promise.
|
|
32
|
+
- Put undo in the toast action for reversible destructive work.
|
|
33
|
+
- Use an alert or inline field message when the user must resolve the problem
|
|
34
|
+
before continuing.
|
|
35
|
+
- Keep one `Toaster` per app window. A host shell must not absorb app-owned
|
|
36
|
+
notifications.
|
|
37
|
+
- Toast text must describe the result, not expose transport or server details.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# SplitView
|
|
2
|
+
|
|
3
|
+
Semantic naming over resizable panel primitives.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
<SplitView orientation="horizontal">
|
|
7
|
+
<SplitViewPane defaultSize="30%">…</SplitViewPane>
|
|
8
|
+
<SplitViewHandle />
|
|
9
|
+
<SplitViewPane>…</SplitViewPane>
|
|
10
|
+
</SplitView>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Use when pane resizing is part of the workflow. Provide sensible minimum and
|
|
14
|
+
default sizes, preserve important content, and persist sizes only when that
|
|
15
|
+
improves repeated work. Use `PanelGroup` for non-resizable layouts.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Status
|
|
2
|
+
|
|
3
|
+
Compact dot-and-label feedback for state.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
<Status variant="running" animated>Recording</Status>
|
|
7
|
+
<Status variant="success">Synced</Status>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Use `running` or `pending` animation only for active work. Use `Badge` for
|
|
11
|
+
categories and labels. Keep a text label when the meaning is important; color
|
|
12
|
+
alone is insufficient.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Table
|
|
2
|
+
|
|
3
|
+
Structured, comparable data with shared density and row-selection behavior.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
<Table density="compact">
|
|
7
|
+
<TableHeader>
|
|
8
|
+
<TableRow>
|
|
9
|
+
<TableHead>Name</TableHead>
|
|
10
|
+
<TableHead>Status</TableHead>
|
|
11
|
+
</TableRow>
|
|
12
|
+
</TableHeader>
|
|
13
|
+
<TableBody>
|
|
14
|
+
{rows.map((row) => (
|
|
15
|
+
<TableRow
|
|
16
|
+
key={row.id}
|
|
17
|
+
selected={selection.has(row.id)}
|
|
18
|
+
onSelectionChange={(selected) => updateSelection(row.id, selected)}
|
|
19
|
+
>
|
|
20
|
+
<TableCell>{row.name}</TableCell>
|
|
21
|
+
<TableCell>{row.status}</TableCell>
|
|
22
|
+
</TableRow>
|
|
23
|
+
))}
|
|
24
|
+
</TableBody>
|
|
25
|
+
</Table>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Use `compact` for inspector-like datasets, `default` for general work, and
|
|
29
|
+
`comfortable` where scanning matters more than density.
|
|
30
|
+
|
|
31
|
+
When a row is selectable, selection is controlled by the caller and can be
|
|
32
|
+
toggled with pointer, Enter, or Space. Independent buttons, links, form
|
|
33
|
+
controls, and editable descendants keep their own pointer and keyboard
|
|
34
|
+
behavior without toggling the containing row. Call `event.preventDefault()` in
|
|
35
|
+
a row event handler only when an app needs to cancel the built-in row response.
|
|
36
|
+
For rich grid navigation, column sorting, or cell editing, use a dedicated data
|
|
37
|
+
grid rather than layering those interactions onto a basic table.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Tabs
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Tabs switch between peer views of the same object or workspace without changing the overall context. Use them for compact modes such as Notes/Transcript, Query/Results, or Details/Activity.
|
|
6
|
+
|
|
7
|
+
Use navigation when each destination is a distinct location. Use `ToggleGroup` for display controls that do not own tab panels.
|
|
8
|
+
|
|
9
|
+
## Usage patterns
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@moldable-ai/ui'
|
|
13
|
+
|
|
14
|
+
;<Tabs defaultValue="notes" className="h-full min-h-0">
|
|
15
|
+
<TabsList aria-label="Meeting view">
|
|
16
|
+
<TabsTrigger value="notes">Notes</TabsTrigger>
|
|
17
|
+
<TabsTrigger value="transcript">Transcript</TabsTrigger>
|
|
18
|
+
</TabsList>
|
|
19
|
+
<TabsContent value="notes" className="min-h-0 overflow-y-auto">
|
|
20
|
+
{/* Notes */}
|
|
21
|
+
</TabsContent>
|
|
22
|
+
<TabsContent value="transcript" className="min-h-0 overflow-y-auto">
|
|
23
|
+
{/* Transcript */}
|
|
24
|
+
</TabsContent>
|
|
25
|
+
</Tabs>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Use the `line` variant in dense app chrome where a filled segmented control would be too prominent:
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
<TabsList variant="line">
|
|
32
|
+
<TabsTrigger value="schema">Schema</TabsTrigger>
|
|
33
|
+
<TabsTrigger value="data">Data</TabsTrigger>
|
|
34
|
+
</TabsList>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## API summary
|
|
38
|
+
|
|
39
|
+
- `Tabs`: Radix Tabs root; supports controlled `value`/`onValueChange`, `defaultValue`, `orientation`, activation direction, and other root props. Orientation defaults to `horizontal`.
|
|
40
|
+
- `TabsList`: `variant="default"` or `"line"`. Defaults to `default`.
|
|
41
|
+
- `TabsTrigger`: requires a `value` matching a content panel; supports `disabled`.
|
|
42
|
+
- `TabsContent`: requires a matching `value`.
|
|
43
|
+
- `tabsListVariants` is exported for compatible composition.
|
|
44
|
+
- Components accept the corresponding Radix primitive props and `className`.
|
|
45
|
+
|
|
46
|
+
## Do
|
|
47
|
+
|
|
48
|
+
- Use short, parallel labels.
|
|
49
|
+
- Keep the number of tabs small enough to fit without ambiguous truncation.
|
|
50
|
+
- Use controlled state when the active tab affects URL state, commands, or desktop chat context.
|
|
51
|
+
- Put scrolling on the active content pane with `min-h-0`, not on the whole app.
|
|
52
|
+
- Preserve keyboard navigation and focus states supplied by Radix.
|
|
53
|
+
|
|
54
|
+
## Don't
|
|
55
|
+
|
|
56
|
+
- Do not use tabs as a substitute for primary navigation or a command toolbar.
|
|
57
|
+
- Do not mix actions such as “Add” or “Refresh” into the tab list.
|
|
58
|
+
- Do not put unrelated workflows behind peer tabs.
|
|
59
|
+
- Do not change tab labels or order unpredictably.
|
|
60
|
+
- Do not rely on a subtle color change alone; retain the active background or line indicator.
|
|
61
|
+
|
|
62
|
+
## Moldable considerations
|
|
63
|
+
|
|
64
|
+
Tabs belong in compact chrome, not a large page header. In document and paneled layouts, keep their bar around `h-8` or `h-9`. When a tab panel scrolls to the bottom of the webview, add `pb-[calc(var(--chat-safe-padding,0px)+1rem)]` or the larger padding appropriate to an editor or dock.
|
|
65
|
+
|
|
66
|
+
Changing tabs should update app commands and chat instructions when it materially changes the active object or mode. Do not create an “AI chat” tab; Moldable’s desktop chat is the conversational surface.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Text
|
|
2
|
+
|
|
3
|
+
Semantic typography for app content and chrome.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
<Text as="h1" variant="heading1">Library</Text>
|
|
9
|
+
<Text variant="small" color="secondary">12 local items</Text>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Use the `as` prop for correct HTML semantics and `variant` for visual hierarchy.
|
|
13
|
+
`truncate` is appropriate only when the full value remains available through
|
|
14
|
+
context or a tooltip. Use mono variants for identifiers, code, and numeric
|
|
15
|
+
readouts—not body copy.
|
|
16
|
+
|
|
17
|
+
Do not recreate the type scale with arbitrary font sizes.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# ToggleButton
|
|
2
|
+
|
|
3
|
+
`ToggleButton` is a single pressed/unpressed action. It is a semantic facade
|
|
4
|
+
over `Toggle`, so both share one Radix interaction model and one style source.
|
|
5
|
+
|
|
6
|
+
```tsx
|
|
7
|
+
<ToggleButton pressed={showGrid} onPressedChange={setShowGrid}>
|
|
8
|
+
Show grid
|
|
9
|
+
</ToggleButton>
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
For an icon-only toggle, opt in explicitly and provide its accessible name:
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
<ToggleButton
|
|
16
|
+
iconOnly
|
|
17
|
+
aria-label="Pin inspector"
|
|
18
|
+
pressed={pinned}
|
|
19
|
+
onPressedChange={setPinned}
|
|
20
|
+
>
|
|
21
|
+
<PinIcon />
|
|
22
|
+
</ToggleButton>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Variants and sizes
|
|
26
|
+
|
|
27
|
+
- `variant`: `default`, `outline`, or `filled`.
|
|
28
|
+
- `size`: `xs`, `sm`, `default`, or `lg`.
|
|
29
|
+
- `iconOnly` makes the control square and requires `aria-label`.
|
|
30
|
+
|
|
31
|
+
## Choosing the right control
|
|
32
|
+
|
|
33
|
+
- Use `Button` for a momentary action.
|
|
34
|
+
- Use `ToggleButton` for one independent visible mode or tool.
|
|
35
|
+
- Use `SegmentedControl` for exactly one choice from a small set.
|
|
36
|
+
- Use `Switch` for a persistent setting that takes effect immediately.
|
|
37
|
+
|
|
38
|
+
## Keyboard and accessibility
|
|
39
|
+
|
|
40
|
+
Radix supplies button and `aria-pressed` semantics. Space and Enter toggle the
|
|
41
|
+
state. A visible text label or `aria-label` must identify the action; state
|
|
42
|
+
must not be communicated through color alone.
|
|
43
|
+
|
|
44
|
+
## Don't
|
|
45
|
+
|
|
46
|
+
- Do not use a toggle for a one-time command.
|
|
47
|
+
- Do not group unrelated toggles into a segmented control.
|
|
48
|
+
- Do not put a checkbox inside a toggle button.
|