@moldable-ai/ui 0.2.18 → 0.2.20
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-manifest.d.ts +6 -0
- package/dist/catalog/catalog-manifest.d.ts.map +1 -0
- package/dist/catalog/catalog-manifest.js +105 -0
- package/dist/catalog/catalog-types.d.ts +54 -0
- package/dist/catalog/catalog-types.d.ts.map +1 -0
- package/dist/catalog/catalog-types.js +14 -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 +39 -0
- package/dist/catalog/core-catalog.d.ts +6 -0
- package/dist/catalog/core-catalog.d.ts.map +1 -0
- package/dist/catalog/core-catalog.js +105 -0
- package/dist/catalog/index.d.ts +5 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +4 -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 +67 -17
- package/dist/components/chat/chat-panel.d.ts.map +1 -1
- package/dist/components/chat/chat-panel.js +250 -159
- 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 +3 -2
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +3 -2
- package/dist/components/chat/model-effort-power-effects.d.ts +7 -0
- package/dist/components/chat/model-effort-power-effects.d.ts.map +1 -0
- package/dist/components/chat/model-effort-power-effects.js +54 -0
- package/dist/components/chat/model-effort-selector.d.ts +26 -0
- package/dist/components/chat/model-effort-selector.d.ts.map +1 -0
- package/dist/components/chat/model-effort-selector.js +179 -0
- package/dist/components/chat/model-effort-ultra-effects.d.ts +5 -0
- package/dist/components/chat/model-effort-ultra-effects.d.ts.map +1 -0
- package/dist/components/chat/model-effort-ultra-effects.js +56 -0
- 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/hardware/bluetooth-panel-helpers.d.ts +9 -0
- package/dist/components/hardware/bluetooth-panel-helpers.d.ts.map +1 -0
- package/dist/components/hardware/bluetooth-panel-helpers.js +37 -0
- package/dist/components/hardware/bluetooth-panel.d.ts +56 -0
- package/dist/components/hardware/bluetooth-panel.d.ts.map +1 -0
- package/dist/components/hardware/bluetooth-panel.js +470 -0
- package/dist/components/hardware/camera-preview.d.ts +39 -0
- package/dist/components/hardware/camera-preview.d.ts.map +1 -0
- package/dist/components/hardware/camera-preview.js +228 -0
- package/dist/components/hardware/capability-badge.d.ts +23 -0
- package/dist/components/hardware/capability-badge.d.ts.map +1 -0
- package/dist/components/hardware/capability-badge.js +39 -0
- package/dist/components/hardware/capability-matrix.d.ts +14 -0
- package/dist/components/hardware/capability-matrix.d.ts.map +1 -0
- package/dist/components/hardware/capability-matrix.js +97 -0
- package/dist/components/hardware/clipboard-button.d.ts +26 -0
- package/dist/components/hardware/clipboard-button.d.ts.map +1 -0
- package/dist/components/hardware/clipboard-button.js +114 -0
- package/dist/components/hardware/device-io-controls.d.ts +4 -0
- package/dist/components/hardware/device-io-controls.d.ts.map +1 -0
- package/dist/components/hardware/device-io-controls.js +28 -0
- package/dist/components/hardware/device-list.d.ts +20 -0
- package/dist/components/hardware/device-list.d.ts.map +1 -0
- package/dist/components/hardware/device-list.js +14 -0
- package/dist/components/hardware/display-map.d.ts +23 -0
- package/dist/components/hardware/display-map.d.ts.map +1 -0
- package/dist/components/hardware/display-map.js +114 -0
- package/dist/components/hardware/haptic-button.d.ts +26 -0
- package/dist/components/hardware/haptic-button.d.ts.map +1 -0
- package/dist/components/hardware/haptic-button.js +94 -0
- package/dist/components/hardware/hardware-panel.d.ts +11 -0
- package/dist/components/hardware/hardware-panel.d.ts.map +1 -0
- package/dist/components/hardware/hardware-panel.js +28 -0
- package/dist/components/hardware/hid-panel.d.ts +40 -0
- package/dist/components/hardware/hid-panel.d.ts.map +1 -0
- package/dist/components/hardware/hid-panel.js +373 -0
- package/dist/components/hardware/index.d.ts +27 -0
- package/dist/components/hardware/index.d.ts.map +1 -0
- package/dist/components/hardware/index.js +26 -0
- package/dist/components/hardware/live-indicator.d.ts +15 -0
- package/dist/components/hardware/live-indicator.d.ts.map +1 -0
- package/dist/components/hardware/live-indicator.js +26 -0
- package/dist/components/hardware/local-auth-button.d.ts +33 -0
- package/dist/components/hardware/local-auth-button.d.ts.map +1 -0
- package/dist/components/hardware/local-auth-button.js +115 -0
- package/dist/components/hardware/location-panel.d.ts +29 -0
- package/dist/components/hardware/location-panel.d.ts.map +1 -0
- package/dist/components/hardware/location-panel.js +154 -0
- package/dist/components/hardware/microphone-meter.d.ts +35 -0
- package/dist/components/hardware/microphone-meter.d.ts.map +1 -0
- package/dist/components/hardware/microphone-meter.js +244 -0
- package/dist/components/hardware/midi-monitor.d.ts +54 -0
- package/dist/components/hardware/midi-monitor.d.ts.map +1 -0
- package/dist/components/hardware/midi-monitor.js +534 -0
- package/dist/components/hardware/notification-panel.d.ts +24 -0
- package/dist/components/hardware/notification-panel.d.ts.map +1 -0
- package/dist/components/hardware/notification-panel.js +124 -0
- package/dist/components/hardware/power-blocker-controller.d.ts +19 -0
- package/dist/components/hardware/power-blocker-controller.d.ts.map +1 -0
- package/dist/components/hardware/power-blocker-controller.js +83 -0
- package/dist/components/hardware/power-panel.d.ts +67 -0
- package/dist/components/hardware/power-panel.d.ts.map +1 -0
- package/dist/components/hardware/power-panel.js +309 -0
- package/dist/components/hardware/readout.d.ts +10 -0
- package/dist/components/hardware/readout.d.ts.map +1 -0
- package/dist/components/hardware/readout.js +11 -0
- package/dist/components/hardware/screen-share-preview.d.ts +36 -0
- package/dist/components/hardware/screen-share-preview.d.ts.map +1 -0
- package/dist/components/hardware/screen-share-preview.js +191 -0
- package/dist/components/hardware/secure-storage-panel.d.ts +36 -0
- package/dist/components/hardware/secure-storage-panel.d.ts.map +1 -0
- package/dist/components/hardware/secure-storage-panel.js +193 -0
- package/dist/components/hardware/serial-console.d.ts +64 -0
- package/dist/components/hardware/serial-console.d.ts.map +1 -0
- package/dist/components/hardware/serial-console.js +399 -0
- package/dist/components/hardware/shortcut-recorder.d.ts +35 -0
- package/dist/components/hardware/shortcut-recorder.d.ts.map +1 -0
- package/dist/components/hardware/shortcut-recorder.js +217 -0
- package/dist/components/hardware/stream-log.d.ts +35 -0
- package/dist/components/hardware/stream-log.d.ts.map +1 -0
- package/dist/components/hardware/stream-log.js +65 -0
- package/dist/components/hardware/system-audio-monitor.d.ts +34 -0
- package/dist/components/hardware/system-audio-monitor.d.ts.map +1 -0
- package/dist/components/hardware/system-audio-monitor.js +275 -0
- package/dist/components/hardware/usb-panel.d.ts +54 -0
- package/dist/components/hardware/usb-panel.d.ts.map +1 -0
- package/dist/components/hardware/usb-panel.js +363 -0
- package/dist/components/hardware/use-capability.d.ts +20 -0
- package/dist/components/hardware/use-capability.d.ts.map +1 -0
- package/dist/components/hardware/use-capability.js +61 -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/app-frame.d.ts +22 -0
- package/dist/components/ui/app-frame.d.ts.map +1 -0
- package/dist/components/ui/app-frame.js +56 -0
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button.js +1 -1
- 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/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/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.js +1 -1
- 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 +234 -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 +19 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +19 -0
- 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 +24 -0
- package/dist/components/ui/list.d.ts.map +1 -0
- package/dist/components/ui/list.js +224 -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.d.ts +11 -0
- package/dist/components/ui/message-scroller.d.ts.map +1 -0
- package/dist/components/ui/message-scroller.js +37 -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.js +1 -1
- 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 +61 -0
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/slider.d.ts +4 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +2 -2
- 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 +28 -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.js +1 -1
- package/dist/components/ui/toolbar.d.ts +20 -0
- package/dist/components/ui/toolbar.d.ts.map +1 -0
- package/dist/components/ui/toolbar.js +52 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/lib/frame-lifecycle.d.ts +28 -0
- package/dist/lib/frame-lifecycle.d.ts.map +1 -1
- package/dist/lib/frame-lifecycle.js +84 -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/native-hardware/bluetooth-access.d.ts +14 -0
- package/dist/lib/native-hardware/bluetooth-access.d.ts.map +1 -0
- package/dist/lib/native-hardware/bluetooth-access.js +40 -0
- package/dist/lib/native-hardware/bluetooth-connection.d.ts +19 -0
- package/dist/lib/native-hardware/bluetooth-connection.d.ts.map +1 -0
- package/dist/lib/native-hardware/bluetooth-connection.js +88 -0
- package/dist/lib/native-hardware/bluetooth-gatt.d.ts +7 -0
- package/dist/lib/native-hardware/bluetooth-gatt.d.ts.map +1 -0
- package/dist/lib/native-hardware/bluetooth-gatt.js +77 -0
- package/dist/lib/native-hardware/bluetooth-internal.d.ts +10 -0
- package/dist/lib/native-hardware/bluetooth-internal.d.ts.map +1 -0
- package/dist/lib/native-hardware/bluetooth-internal.js +105 -0
- package/dist/lib/native-hardware/bluetooth-native-fallback.d.ts +33 -0
- package/dist/lib/native-hardware/bluetooth-native-fallback.d.ts.map +1 -0
- package/dist/lib/native-hardware/bluetooth-native-fallback.js +214 -0
- package/dist/lib/native-hardware/bluetooth-types.d.ts +85 -0
- package/dist/lib/native-hardware/bluetooth-types.d.ts.map +1 -0
- package/dist/lib/native-hardware/bluetooth-types.js +2 -0
- package/dist/lib/native-hardware/bluetooth.d.ts +7 -0
- package/dist/lib/native-hardware/bluetooth.d.ts.map +1 -0
- package/dist/lib/native-hardware/bluetooth.js +4 -0
- package/dist/lib/native-hardware/bridge.d.ts +23 -0
- package/dist/lib/native-hardware/bridge.d.ts.map +1 -0
- package/dist/lib/native-hardware/bridge.js +266 -0
- package/dist/lib/native-hardware/capabilities.d.ts +7 -0
- package/dist/lib/native-hardware/capabilities.d.ts.map +1 -0
- package/dist/lib/native-hardware/capabilities.js +95 -0
- package/dist/lib/native-hardware/clipboard.d.ts +11 -0
- package/dist/lib/native-hardware/clipboard.d.ts.map +1 -0
- package/dist/lib/native-hardware/clipboard.js +55 -0
- package/dist/lib/native-hardware/device-io-errors.d.ts +11 -0
- package/dist/lib/native-hardware/device-io-errors.d.ts.map +1 -0
- package/dist/lib/native-hardware/device-io-errors.js +82 -0
- package/dist/lib/native-hardware/displays.d.ts +38 -0
- package/dist/lib/native-hardware/displays.d.ts.map +1 -0
- package/dist/lib/native-hardware/displays.js +12 -0
- package/dist/lib/native-hardware/global-shortcuts.d.ts +86 -0
- package/dist/lib/native-hardware/global-shortcuts.d.ts.map +1 -0
- package/dist/lib/native-hardware/global-shortcuts.js +351 -0
- package/dist/lib/native-hardware/haptics.d.ts +25 -0
- package/dist/lib/native-hardware/haptics.d.ts.map +1 -0
- package/dist/lib/native-hardware/haptics.js +18 -0
- package/dist/lib/native-hardware/hid-native.d.ts +26 -0
- package/dist/lib/native-hardware/hid-native.d.ts.map +1 -0
- package/dist/lib/native-hardware/hid-native.js +229 -0
- package/dist/lib/native-hardware/hid.d.ts +52 -0
- package/dist/lib/native-hardware/hid.d.ts.map +1 -0
- package/dist/lib/native-hardware/hid.js +160 -0
- package/dist/lib/native-hardware/index.d.ts +38 -0
- package/dist/lib/native-hardware/index.d.ts.map +1 -0
- package/dist/lib/native-hardware/index.js +20 -0
- package/dist/lib/native-hardware/local-authentication.d.ts +32 -0
- package/dist/lib/native-hardware/local-authentication.d.ts.map +1 -0
- package/dist/lib/native-hardware/local-authentication.js +46 -0
- package/dist/lib/native-hardware/location.d.ts +49 -0
- package/dist/lib/native-hardware/location.d.ts.map +1 -0
- package/dist/lib/native-hardware/location.js +114 -0
- package/dist/lib/native-hardware/media-permissions.d.ts +28 -0
- package/dist/lib/native-hardware/media-permissions.d.ts.map +1 -0
- package/dist/lib/native-hardware/media-permissions.js +37 -0
- package/dist/lib/native-hardware/media.d.ts +17 -0
- package/dist/lib/native-hardware/media.d.ts.map +1 -0
- package/dist/lib/native-hardware/media.js +99 -0
- package/dist/lib/native-hardware/midi-access.d.ts +13 -0
- package/dist/lib/native-hardware/midi-access.d.ts.map +1 -0
- package/dist/lib/native-hardware/midi-access.js +66 -0
- package/dist/lib/native-hardware/midi-internal.d.ts +12 -0
- package/dist/lib/native-hardware/midi-internal.d.ts.map +1 -0
- package/dist/lib/native-hardware/midi-internal.js +88 -0
- package/dist/lib/native-hardware/midi-native-fallback.d.ts +27 -0
- package/dist/lib/native-hardware/midi-native-fallback.d.ts.map +1 -0
- package/dist/lib/native-hardware/midi-native-fallback.js +127 -0
- package/dist/lib/native-hardware/midi-ports.d.ts +6 -0
- package/dist/lib/native-hardware/midi-ports.d.ts.map +1 -0
- package/dist/lib/native-hardware/midi-ports.js +115 -0
- package/dist/lib/native-hardware/midi-types.d.ts +25 -0
- package/dist/lib/native-hardware/midi-types.d.ts.map +1 -0
- package/dist/lib/native-hardware/midi-types.js +1 -0
- package/dist/lib/native-hardware/midi.d.ts +6 -0
- package/dist/lib/native-hardware/midi.d.ts.map +1 -0
- package/dist/lib/native-hardware/midi.js +3 -0
- package/dist/lib/native-hardware/native-device-io.d.ts +28 -0
- package/dist/lib/native-hardware/native-device-io.d.ts.map +1 -0
- package/dist/lib/native-hardware/native-device-io.js +91 -0
- package/dist/lib/native-hardware/native-device-lifecycle.d.ts +13 -0
- package/dist/lib/native-hardware/native-device-lifecycle.d.ts.map +1 -0
- package/dist/lib/native-hardware/native-device-lifecycle.js +40 -0
- package/dist/lib/native-hardware/notifications.d.ts +38 -0
- package/dist/lib/native-hardware/notifications.d.ts.map +1 -0
- package/dist/lib/native-hardware/notifications.js +50 -0
- package/dist/lib/native-hardware/power-session.d.ts +113 -0
- package/dist/lib/native-hardware/power-session.d.ts.map +1 -0
- package/dist/lib/native-hardware/power-session.js +264 -0
- package/dist/lib/native-hardware/secure-storage.d.ts +36 -0
- package/dist/lib/native-hardware/secure-storage.d.ts.map +1 -0
- package/dist/lib/native-hardware/secure-storage.js +64 -0
- package/dist/lib/native-hardware/serial-native.d.ts +23 -0
- package/dist/lib/native-hardware/serial-native.d.ts.map +1 -0
- package/dist/lib/native-hardware/serial-native.js +181 -0
- package/dist/lib/native-hardware/serial.d.ts +76 -0
- package/dist/lib/native-hardware/serial.d.ts.map +1 -0
- package/dist/lib/native-hardware/serial.js +212 -0
- package/dist/lib/native-hardware/system-audio.d.ts +127 -0
- package/dist/lib/native-hardware/system-audio.d.ts.map +1 -0
- package/dist/lib/native-hardware/system-audio.js +330 -0
- package/dist/lib/native-hardware/types.d.ts +62 -0
- package/dist/lib/native-hardware/types.d.ts.map +1 -0
- package/dist/lib/native-hardware/types.js +27 -0
- package/dist/lib/native-hardware/usb-native.d.ts +39 -0
- package/dist/lib/native-hardware/usb-native.d.ts.map +1 -0
- package/dist/lib/native-hardware/usb-native.js +217 -0
- package/dist/lib/native-hardware/usb.d.ts +85 -0
- package/dist/lib/native-hardware/usb.d.ts.map +1 -0
- package/dist/lib/native-hardware/usb.js +222 -0
- package/docs/README.md +37 -0
- package/docs/accessibility.md +32 -0
- package/docs/app-anatomy.md +72 -0
- package/docs/component-catalog.md +59 -0
- package/docs/component-guide-template.md +37 -0
- package/docs/design-tokens.md +172 -0
- package/docs/foundations.md +56 -0
- package/docs/native-integration.md +33 -0
- package/docs/standalone-app-windows.md +128 -0
- package/package.json +9 -3
- package/src/components/ui/alert.md +55 -0
- package/src/components/ui/app-frame.md +33 -0
- package/src/components/ui/badge.md +57 -0
- package/src/components/ui/button.md +76 -0
- package/src/components/ui/color-well.md +11 -0
- package/src/components/ui/combobox.md +43 -0
- package/src/components/ui/date-field.md +32 -0
- package/src/components/ui/edge-fade.md +7 -0
- package/src/components/ui/empty.md +82 -0
- package/src/components/ui/field.md +77 -0
- package/src/components/ui/grid.md +105 -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 +107 -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/resizable.md +66 -0
- package/src/components/ui/scroll-area.md +68 -0
- package/src/components/ui/search-field.md +33 -0
- package/src/components/ui/segmented-control.md +39 -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 +35 -0
- package/src/components/ui/tabs.md +66 -0
- package/src/components/ui/text.md +17 -0
- package/src/components/ui/toggle-group.md +80 -0
- package/src/components/ui/toggle.md +73 -0
- package/src/components/ui/toolbar.md +21 -0
- package/src/styles/index.css +868 -3
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type CatalogCase, type CatalogCaseFilter, type CatalogManifest, type CatalogSectionDefinition, type CatalogStoryDefinition } from './catalog-types';
|
|
2
|
+
export declare function createCatalogStory(story: CatalogStoryDefinition): CatalogStoryDefinition;
|
|
3
|
+
export declare function createCatalogSection(section: CatalogSectionDefinition): CatalogSectionDefinition;
|
|
4
|
+
export declare function createCatalogManifest(manifest: CatalogManifest): CatalogManifest;
|
|
5
|
+
export declare function buildCatalogCases(manifest: CatalogManifest, filter?: CatalogCaseFilter): CatalogCase[];
|
|
6
|
+
//# sourceMappingURL=catalog-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-manifest.d.ts","sourceRoot":"","sources":["../../src/catalog/catalog-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,WAAW,EAEhB,KAAK,iBAAiB,EAGtB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAG5B,MAAM,iBAAiB,CAAA;AA8BxB,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,sBAAsB,GAC5B,sBAAsB,CAGxB;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,wBAAwB,GAChC,wBAAwB,CAG1B;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,eAAe,GACxB,eAAe,CAuBjB;AA4BD,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,eAAe,EACzB,MAAM,GAAE,iBAAsB,GAC7B,WAAW,EAAE,CA4Df"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { catalogDensities, catalogThemes, catalogViewports, } from './catalog-types';
|
|
2
|
+
const catalogIdPattern = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
|
|
3
|
+
function assertCatalogId(id, kind) {
|
|
4
|
+
if (!catalogIdPattern.test(id)) {
|
|
5
|
+
throw new Error(`Catalog ${kind} id "${id}" must be a lowercase kebab-case identifier.`);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
function uniqueAxes(values, storyId, axis) {
|
|
9
|
+
if (values.length === 0) {
|
|
10
|
+
throw new Error(`Catalog story "${storyId}" has no ${axis} cases.`);
|
|
11
|
+
}
|
|
12
|
+
if (new Set(values).size !== values.length) {
|
|
13
|
+
throw new Error(`Catalog story "${storyId}" contains duplicate ${axis} cases.`);
|
|
14
|
+
}
|
|
15
|
+
return values;
|
|
16
|
+
}
|
|
17
|
+
export function createCatalogStory(story) {
|
|
18
|
+
assertCatalogId(story.id, 'story');
|
|
19
|
+
return story;
|
|
20
|
+
}
|
|
21
|
+
export function createCatalogSection(section) {
|
|
22
|
+
assertCatalogId(section.id, 'section');
|
|
23
|
+
return section;
|
|
24
|
+
}
|
|
25
|
+
export function createCatalogManifest(manifest) {
|
|
26
|
+
const sectionIds = new Set();
|
|
27
|
+
for (const section of manifest.sections) {
|
|
28
|
+
assertCatalogId(section.id, 'section');
|
|
29
|
+
if (sectionIds.has(section.id)) {
|
|
30
|
+
throw new Error(`Duplicate catalog section id "${section.id}".`);
|
|
31
|
+
}
|
|
32
|
+
sectionIds.add(section.id);
|
|
33
|
+
const storyIds = new Set();
|
|
34
|
+
for (const story of section.stories) {
|
|
35
|
+
assertCatalogId(story.id, 'story');
|
|
36
|
+
if (storyIds.has(story.id)) {
|
|
37
|
+
throw new Error(`Duplicate story id "${story.id}" in section "${section.id}".`);
|
|
38
|
+
}
|
|
39
|
+
storyIds.add(story.id);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return manifest;
|
|
43
|
+
}
|
|
44
|
+
function createCaseId(context) {
|
|
45
|
+
return [
|
|
46
|
+
context.sectionId,
|
|
47
|
+
context.storyId,
|
|
48
|
+
context.theme,
|
|
49
|
+
context.density,
|
|
50
|
+
context.viewport,
|
|
51
|
+
context.interaction,
|
|
52
|
+
].join('/');
|
|
53
|
+
}
|
|
54
|
+
function matchesFilter(catalogCase, filter) {
|
|
55
|
+
return ((filter.sectionId === undefined ||
|
|
56
|
+
catalogCase.sectionId === filter.sectionId) &&
|
|
57
|
+
(filter.storyId === undefined ||
|
|
58
|
+
catalogCase.storyId === filter.storyId) &&
|
|
59
|
+
(filter.theme === undefined || catalogCase.theme === filter.theme) &&
|
|
60
|
+
(filter.density === undefined || catalogCase.density === filter.density) &&
|
|
61
|
+
(filter.viewport === undefined ||
|
|
62
|
+
catalogCase.viewport === filter.viewport) &&
|
|
63
|
+
(filter.interaction === undefined ||
|
|
64
|
+
catalogCase.interaction === filter.interaction));
|
|
65
|
+
}
|
|
66
|
+
export function buildCatalogCases(manifest, filter = {}) {
|
|
67
|
+
createCatalogManifest(manifest);
|
|
68
|
+
const cases = [];
|
|
69
|
+
for (const section of manifest.sections) {
|
|
70
|
+
for (const story of section.stories) {
|
|
71
|
+
const themes = uniqueAxes(story.themes ?? catalogThemes, story.id, 'theme');
|
|
72
|
+
const densities = uniqueAxes(story.densities ?? catalogDensities, story.id, 'density');
|
|
73
|
+
const viewports = uniqueAxes(story.viewports ?? catalogViewports, story.id, 'viewport');
|
|
74
|
+
const interactions = uniqueAxes(story.interactions ?? ['rest'], story.id, 'interaction');
|
|
75
|
+
for (const theme of themes) {
|
|
76
|
+
for (const density of densities) {
|
|
77
|
+
for (const viewport of viewports) {
|
|
78
|
+
for (const interaction of interactions) {
|
|
79
|
+
const context = {
|
|
80
|
+
sectionId: section.id,
|
|
81
|
+
storyId: story.id,
|
|
82
|
+
theme,
|
|
83
|
+
density,
|
|
84
|
+
viewport,
|
|
85
|
+
interaction,
|
|
86
|
+
};
|
|
87
|
+
const catalogCase = {
|
|
88
|
+
...context,
|
|
89
|
+
caseId: createCaseId(context),
|
|
90
|
+
sectionTitle: section.title,
|
|
91
|
+
storyTitle: story.title,
|
|
92
|
+
storyDescription: story.description,
|
|
93
|
+
render: story.render,
|
|
94
|
+
};
|
|
95
|
+
if (matchesFilter(catalogCase, filter)) {
|
|
96
|
+
cases.push(catalogCase);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return cases;
|
|
105
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export declare const catalogThemes: readonly ["light", "dark"];
|
|
3
|
+
export declare const catalogDensities: readonly ["regular", "compact"];
|
|
4
|
+
export declare const catalogViewports: readonly ["wide", "narrow"];
|
|
5
|
+
export declare const catalogInteractions: readonly ["rest", "hover", "focus-visible", "pressed", "selected", "disabled", "invalid", "loading", "empty"];
|
|
6
|
+
export type CatalogTheme = (typeof catalogThemes)[number];
|
|
7
|
+
export type CatalogDensity = (typeof catalogDensities)[number];
|
|
8
|
+
export type CatalogViewport = (typeof catalogViewports)[number];
|
|
9
|
+
export type CatalogInteraction = (typeof catalogInteractions)[number];
|
|
10
|
+
export interface CatalogCaseContext {
|
|
11
|
+
caseId: string;
|
|
12
|
+
sectionId: string;
|
|
13
|
+
storyId: string;
|
|
14
|
+
theme: CatalogTheme;
|
|
15
|
+
density: CatalogDensity;
|
|
16
|
+
viewport: CatalogViewport;
|
|
17
|
+
interaction: CatalogInteraction;
|
|
18
|
+
}
|
|
19
|
+
export interface CatalogStoryDefinition {
|
|
20
|
+
id: string;
|
|
21
|
+
title: string;
|
|
22
|
+
description?: React.ReactNode;
|
|
23
|
+
themes?: readonly CatalogTheme[];
|
|
24
|
+
densities?: readonly CatalogDensity[];
|
|
25
|
+
viewports?: readonly CatalogViewport[];
|
|
26
|
+
interactions?: readonly CatalogInteraction[];
|
|
27
|
+
render: (context: CatalogCaseContext) => React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export interface CatalogSectionDefinition {
|
|
30
|
+
id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
description?: React.ReactNode;
|
|
33
|
+
stories: readonly CatalogStoryDefinition[];
|
|
34
|
+
}
|
|
35
|
+
export interface CatalogManifest {
|
|
36
|
+
title: string;
|
|
37
|
+
description?: React.ReactNode;
|
|
38
|
+
sections: readonly CatalogSectionDefinition[];
|
|
39
|
+
}
|
|
40
|
+
export interface CatalogCase extends CatalogCaseContext {
|
|
41
|
+
sectionTitle: string;
|
|
42
|
+
storyTitle: string;
|
|
43
|
+
storyDescription?: React.ReactNode;
|
|
44
|
+
render: CatalogStoryDefinition['render'];
|
|
45
|
+
}
|
|
46
|
+
export interface CatalogCaseFilter {
|
|
47
|
+
sectionId?: string;
|
|
48
|
+
storyId?: string;
|
|
49
|
+
theme?: CatalogTheme;
|
|
50
|
+
density?: CatalogDensity;
|
|
51
|
+
viewport?: CatalogViewport;
|
|
52
|
+
interaction?: CatalogInteraction;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=catalog-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-types.d.ts","sourceRoot":"","sources":["../../src/catalog/catalog-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,eAAO,MAAM,aAAa,4BAA6B,CAAA;AACvD,eAAO,MAAM,gBAAgB,iCAAkC,CAAA;AAC/D,eAAO,MAAM,gBAAgB,6BAA8B,CAAA;AAC3D,eAAO,MAAM,mBAAmB,+GAUtB,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AACzD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC9D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAC/D,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAErE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,YAAY,CAAA;IACnB,OAAO,EAAE,cAAc,CAAA;IACvB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAA;CAChC;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,SAAS,YAAY,EAAE,CAAA;IAChC,SAAS,CAAC,EAAE,SAAS,cAAc,EAAE,CAAA;IACrC,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAA;IACtC,YAAY,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;IAC5C,MAAM,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,KAAK,CAAC,SAAS,CAAA;CACzD;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,OAAO,EAAE,SAAS,sBAAsB,EAAE,CAAA;CAC3C;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAA;CAC9C;AAED,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAClC,MAAM,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAA;CACzC;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,WAAW,CAAC,EAAE,kBAAkB,CAAA;CACjC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const catalogThemes = ['light', 'dark'];
|
|
2
|
+
export const catalogDensities = ['regular', 'compact'];
|
|
3
|
+
export const catalogViewports = ['wide', 'narrow'];
|
|
4
|
+
export const catalogInteractions = [
|
|
5
|
+
'rest',
|
|
6
|
+
'hover',
|
|
7
|
+
'focus-visible',
|
|
8
|
+
'pressed',
|
|
9
|
+
'selected',
|
|
10
|
+
'disabled',
|
|
11
|
+
'invalid',
|
|
12
|
+
'loading',
|
|
13
|
+
'empty',
|
|
14
|
+
];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { CatalogCase, CatalogCaseFilter, CatalogManifest } from './catalog-types';
|
|
3
|
+
export interface ComponentCatalogProps extends Omit<React.ComponentProps<'main'>, 'children'> {
|
|
4
|
+
manifest: CatalogManifest;
|
|
5
|
+
filter?: CatalogCaseFilter;
|
|
6
|
+
showCaseLabels?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface CatalogCaseFrameProps extends Omit<React.ComponentProps<'article'>, 'children'> {
|
|
9
|
+
catalogCase: CatalogCase;
|
|
10
|
+
showLabel?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function CatalogCaseFrame({ catalogCase, showLabel, className, ...props }: CatalogCaseFrameProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function ComponentCatalog({ manifest, filter, showCaseLabels, className, ...props }: ComponentCatalogProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=component-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-catalog.d.ts","sourceRoot":"","sources":["../../src/catalog/component-catalog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EACjB,eAAe,EAChB,MAAM,iBAAiB,CAAA;AAExB,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IACtD,QAAQ,EAAE,eAAe,CAAA;IACzB,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC;IACzD,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAWD,wBAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,SAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAyCvB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,MAAM,EACN,cAAqB,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,qBAAqB,2CA0GvB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from '../lib/utils';
|
|
4
|
+
import { buildCatalogCases } from './catalog-manifest';
|
|
5
|
+
function caseLabel(catalogCase) {
|
|
6
|
+
return [
|
|
7
|
+
catalogCase.theme,
|
|
8
|
+
catalogCase.density,
|
|
9
|
+
catalogCase.viewport,
|
|
10
|
+
catalogCase.interaction,
|
|
11
|
+
].join(' · ');
|
|
12
|
+
}
|
|
13
|
+
export function CatalogCaseFrame({ catalogCase, showLabel = true, className, ...props }) {
|
|
14
|
+
const isDark = catalogCase.theme === 'dark';
|
|
15
|
+
return (_jsxs("article", { "data-slot": "catalog-case", "data-catalog-case": catalogCase.caseId, "data-theme": catalogCase.theme, "data-density": catalogCase.density, "data-viewport": catalogCase.viewport, "data-interaction": catalogCase.interaction, "aria-label": `${catalogCase.storyTitle}: ${caseLabel(catalogCase)}`, className: cn('bg-background text-foreground isolate overflow-hidden rounded-lg border border-border shadow-sm', catalogCase.viewport === 'narrow'
|
|
16
|
+
? 'w-full max-w-80'
|
|
17
|
+
: 'w-full max-w-3xl', isDark && 'dark', className), ...props, children: [showLabel ? (_jsx("header", { "data-slot": "catalog-case-label", className: "border-b border-border bg-muted/40 px-3 py-2 font-mono text-[11px] leading-4 text-muted-foreground", children: caseLabel(catalogCase) })) : null, _jsx("div", { "data-slot": "catalog-case-stage", className: cn('min-h-24 bg-background text-foreground', catalogCase.density === 'compact' ? 'p-2' : 'p-4'), children: catalogCase.render(catalogCase) })] }));
|
|
18
|
+
}
|
|
19
|
+
export function ComponentCatalog({ manifest, filter, showCaseLabels = true, className, ...props }) {
|
|
20
|
+
const cases = buildCatalogCases(manifest, filter);
|
|
21
|
+
const groupedCases = new Map();
|
|
22
|
+
for (const catalogCase of cases) {
|
|
23
|
+
const key = `${catalogCase.sectionId}/${catalogCase.storyId}`;
|
|
24
|
+
const storyCases = groupedCases.get(key) ?? [];
|
|
25
|
+
storyCases.push(catalogCase);
|
|
26
|
+
groupedCases.set(key, storyCases);
|
|
27
|
+
}
|
|
28
|
+
return (_jsxs("main", { "data-slot": "component-catalog", className: cn('min-h-full bg-muted/20 p-4 text-foreground sm:p-6', className), ...props, children: [_jsxs("header", { className: "mx-auto mb-8 max-w-7xl", children: [_jsx("h1", { className: "text-2xl font-semibold tracking-tight", children: manifest.title }), manifest.description ? (_jsx("div", { className: "mt-2 max-w-3xl text-sm text-muted-foreground", children: manifest.description })) : null] }), _jsx("div", { className: "mx-auto grid max-w-7xl gap-10", children: manifest.sections.map((section) => {
|
|
29
|
+
const storyGroups = section.stories
|
|
30
|
+
.map((story) => ({
|
|
31
|
+
story,
|
|
32
|
+
cases: groupedCases.get(`${section.id}/${story.id}`) ?? [],
|
|
33
|
+
}))
|
|
34
|
+
.filter((group) => group.cases.length > 0);
|
|
35
|
+
if (storyGroups.length === 0)
|
|
36
|
+
return null;
|
|
37
|
+
return (_jsxs("section", { "data-slot": "catalog-section", "data-catalog-section": section.id, "aria-labelledby": `catalog-section-${section.id}`, children: [_jsxs("div", { className: "mb-4", children: [_jsx("h2", { id: `catalog-section-${section.id}`, className: "text-lg font-semibold tracking-tight", children: section.title }), section.description ? (_jsx("div", { className: "mt-1 max-w-3xl text-sm text-muted-foreground", children: section.description })) : null] }), _jsx("div", { className: "grid gap-8", children: storyGroups.map(({ story, cases: storyCases }) => (_jsxs("section", { "data-slot": "catalog-story", "data-catalog-story": story.id, "aria-labelledby": `catalog-story-${section.id}-${story.id}`, children: [_jsxs("div", { className: "mb-3", children: [_jsx("h3", { id: `catalog-story-${section.id}-${story.id}`, className: "text-sm font-medium", children: story.title }), story.description ? (_jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: story.description })) : null] }), _jsx("div", { "data-slot": "catalog-case-grid", className: "grid items-start gap-4 xl:grid-cols-2", children: storyCases.map((catalogCase) => (_jsx(CatalogCaseFrame, { catalogCase: catalogCase, showLabel: showCaseLabels }, catalogCase.caseId))) })] }, story.id))) })] }, section.id));
|
|
38
|
+
}) })] }));
|
|
39
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A small smoke catalog that proves the renderer and semantic token surface.
|
|
3
|
+
* Product teams should compose a broader manifest from their own public API.
|
|
4
|
+
*/
|
|
5
|
+
export declare const coreComponentCatalog: import("./catalog-types").CatalogManifest;
|
|
6
|
+
//# sourceMappingURL=core-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-catalog.d.ts","sourceRoot":"","sources":["../../src/catalog/core-catalog.tsx"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,2CAkO/B,CAAA"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AppFrame, AppFrameContent, AppFrameTitlebar, AppFrameToolbar, } from '../components/ui/app-frame';
|
|
3
|
+
import { Badge } from '../components/ui/badge';
|
|
4
|
+
import { Button } from '../components/ui/button';
|
|
5
|
+
import { DateField } from '../components/ui/date-field';
|
|
6
|
+
import { Grid, GridItem, GridItemContent, GridItemDescription, GridItemTitle, } from '../components/ui/grid';
|
|
7
|
+
import { IconButton } from '../components/ui/icon-button';
|
|
8
|
+
import { Input } from '../components/ui/input';
|
|
9
|
+
import { List, ListItem, ListItemContent, ListItemDescription, ListItemTitle, } from '../components/ui/list';
|
|
10
|
+
import { SearchField } from '../components/ui/search-field';
|
|
11
|
+
import { SegmentedControl, SegmentedControlItem, } from '../components/ui/segmented-control';
|
|
12
|
+
import { Status } from '../components/ui/status';
|
|
13
|
+
import { createCatalogManifest } from './catalog-manifest';
|
|
14
|
+
import { PlusIcon } from 'lucide-react';
|
|
15
|
+
/**
|
|
16
|
+
* A small smoke catalog that proves the renderer and semantic token surface.
|
|
17
|
+
* Product teams should compose a broader manifest from their own public API.
|
|
18
|
+
*/
|
|
19
|
+
export const coreComponentCatalog = createCatalogManifest({
|
|
20
|
+
title: 'Moldable UI component catalog',
|
|
21
|
+
description: 'Deterministic component cases for review and visual regression coverage.',
|
|
22
|
+
sections: [
|
|
23
|
+
{
|
|
24
|
+
id: 'window-foundations',
|
|
25
|
+
title: 'Window foundations',
|
|
26
|
+
stories: [
|
|
27
|
+
{
|
|
28
|
+
id: 'app-frame',
|
|
29
|
+
title: 'App frame',
|
|
30
|
+
interactions: ['rest', 'empty'],
|
|
31
|
+
render: ({ interaction }) => (_jsxs(AppFrame, { mode: "window", className: "h-56 rounded-container border", children: [_jsx(AppFrameTitlebar, { children: _jsx(AppFrameToolbar, { children: _jsx("strong", { className: "text-sm", children: "Calendar" }) }) }), _jsx(AppFrameContent, { className: "grid place-items-center p-4", children: _jsx("span", { className: "text-sm text-muted-foreground", children: interaction === 'empty'
|
|
32
|
+
? 'No events yet'
|
|
33
|
+
: 'App-owned canvas' }) })] })),
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'controls',
|
|
39
|
+
title: 'Controls',
|
|
40
|
+
stories: [
|
|
41
|
+
{
|
|
42
|
+
id: 'button',
|
|
43
|
+
title: 'Button',
|
|
44
|
+
interactions: ['rest', 'focus-visible', 'disabled'],
|
|
45
|
+
render: ({ interaction }) => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Button, { autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', children: "Continue" }), _jsx(Button, { variant: "outline", disabled: interaction === 'disabled', children: "Cancel" })] })),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 'icon-button',
|
|
49
|
+
title: 'Icon button',
|
|
50
|
+
interactions: ['rest', 'focus-visible', 'disabled', 'loading'],
|
|
51
|
+
render: ({ interaction }) => (_jsx(IconButton, { label: "New item", autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', loading: interaction === 'loading', variant: "ghost", children: _jsx(PlusIcon, {}) })),
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: 'segmented-control',
|
|
55
|
+
title: 'Segmented control',
|
|
56
|
+
interactions: ['rest', 'focus-visible', 'disabled'],
|
|
57
|
+
render: ({ interaction }) => (_jsxs(SegmentedControl, { "aria-label": "Calendar view", defaultValue: "month", disabled: interaction === 'disabled', children: [_jsx(SegmentedControlItem, { value: "week", autoFocus: interaction === 'focus-visible', children: "Week" }), _jsx(SegmentedControlItem, { value: "month", children: "Month" })] })),
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'text-field',
|
|
61
|
+
title: 'Text field',
|
|
62
|
+
interactions: ['rest', 'focus-visible', 'disabled', 'invalid'],
|
|
63
|
+
render: ({ interaction }) => (_jsxs("div", { className: "grid max-w-sm gap-1.5", children: [_jsx("label", { htmlFor: `catalog-input-${interaction}`, className: "text-sm", children: "Project name" }), _jsx(Input, { id: `catalog-input-${interaction}`, defaultValue: "Personal dashboard", autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined })] })),
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'search-and-date-fields',
|
|
67
|
+
title: 'Search and date fields',
|
|
68
|
+
interactions: ['rest', 'focus-visible', 'disabled', 'invalid'],
|
|
69
|
+
render: ({ interaction }) => (_jsxs("div", { className: "grid max-w-sm gap-2", children: [_jsx(SearchField, { "aria-label": "Search events", placeholder: "Search", defaultValue: interaction === 'rest' ? 'Planning' : '', autoFocus: interaction === 'focus-visible', disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined }), _jsx(DateField, { "aria-label": "Due date", defaultValue: "2026-07-26", disabled: interaction === 'disabled', "aria-invalid": interaction === 'invalid' || undefined })] })),
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: 'collections',
|
|
75
|
+
title: 'Collections',
|
|
76
|
+
stories: [
|
|
77
|
+
{
|
|
78
|
+
id: 'selectable-list',
|
|
79
|
+
title: 'Selectable list',
|
|
80
|
+
viewports: ['narrow'],
|
|
81
|
+
interactions: ['rest', 'focus-visible', 'selected', 'disabled'],
|
|
82
|
+
render: ({ interaction }) => (_jsxs(List, { "aria-label": "Documents", selectionMode: "single", defaultSelectedValues: interaction === 'selected' ? ['brief'] : undefined, children: [_jsx(ListItem, { value: "brief", autoFocus: interaction === 'focus-visible', children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Project brief" }), _jsx(ListItemDescription, { children: "Edited recently" })] }) }), _jsx(ListItem, { value: "archive", disabled: interaction === 'disabled', children: _jsxs(ListItemContent, { children: [_jsx(ListItemTitle, { children: "Archive" }), _jsx(ListItemDescription, { children: "Local documents" })] }) })] })),
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'selectable-grid',
|
|
86
|
+
title: 'Selectable grid',
|
|
87
|
+
interactions: ['rest', 'focus-visible', 'selected', 'disabled'],
|
|
88
|
+
render: ({ interaction, viewport }) => (_jsxs(Grid, { "aria-label": "Projects", columns: viewport === 'narrow' ? 1 : 2, selectionMode: "single", defaultSelectedValues: interaction === 'selected' ? ['personal'] : undefined, children: [_jsx(GridItem, { value: "personal", autoFocus: interaction === 'focus-visible', children: _jsxs(GridItemContent, { children: [_jsx(GridItemTitle, { children: "Personal" }), _jsx(GridItemDescription, { children: "8 items" })] }) }), _jsx(GridItem, { value: "work", disabled: interaction === 'disabled', children: _jsxs(GridItemContent, { children: [_jsx(GridItemTitle, { children: "Work" }), _jsx(GridItemDescription, { children: "12 items" })] }) })] })),
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 'feedback',
|
|
94
|
+
title: 'Feedback',
|
|
95
|
+
stories: [
|
|
96
|
+
{
|
|
97
|
+
id: 'status-and-badges',
|
|
98
|
+
title: 'Status and badges',
|
|
99
|
+
viewports: ['narrow'],
|
|
100
|
+
render: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Status, { variant: "running", children: "Running" }), _jsx(Badge, { variant: "secondary", children: "Draft" }), _jsx(Badge, { variant: "outline", children: "Local" })] })),
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { buildCatalogCases, createCatalogManifest, createCatalogSection, createCatalogStory, } from './catalog-manifest';
|
|
2
|
+
export { CatalogCaseFrame, ComponentCatalog, type CatalogCaseFrameProps, type ComponentCatalogProps, } from './component-catalog';
|
|
3
|
+
export { coreComponentCatalog } from './core-catalog';
|
|
4
|
+
export { catalogDensities, catalogInteractions, catalogThemes, catalogViewports, type CatalogCase, type CatalogCaseContext, type CatalogCaseFilter, type CatalogDensity, type CatalogInteraction, type CatalogManifest, type CatalogSectionDefinition, type CatalogStoryDefinition, type CatalogTheme, type CatalogViewport, } from './catalog-types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/catalog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC3B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { buildCatalogCases, createCatalogManifest, createCatalogSection, createCatalogStory, } from './catalog-manifest';
|
|
2
|
+
export { CatalogCaseFrame, ComponentCatalog, } from './component-catalog';
|
|
3
|
+
export { coreComponentCatalog } from './core-catalog';
|
|
4
|
+
export { catalogDensities, catalogInteractions, catalogThemes, catalogViewports, } from './catalog-types';
|
|
@@ -11,6 +11,7 @@ interface AppErrorBoundaryState {
|
|
|
11
11
|
source: AppErrorSource;
|
|
12
12
|
componentStack: string | null;
|
|
13
13
|
}
|
|
14
|
+
export declare function isBenignRuntimeRejection(value: unknown): boolean;
|
|
14
15
|
export declare class AppErrorBoundary extends Component<AppErrorBoundaryProps, AppErrorBoundaryState> {
|
|
15
16
|
state: AppErrorBoundaryState;
|
|
16
17
|
static getDerivedStateFromError(error: Error): Partial<AppErrorBoundaryState>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-error-boundary.d.ts","sourceRoot":"","sources":["../../src/components/app-error-boundary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAA;AAWzE,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,SAAS,CAAA;IACnB,YAAY,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IAC3B,aAAa,CAAC,EAAE,cAAc,CAAA;CAC/B;AAED,UAAU,qBAAqB;IAC7B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,cAAc,CAAA;IACtB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;
|
|
1
|
+
{"version":3,"file":"app-error-boundary.d.ts","sourceRoot":"","sources":["../../src/components/app-error-boundary.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAA;AAWzE,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,SAAS,CAAA;IACnB,YAAY,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IAC3B,aAAa,CAAC,EAAE,cAAc,CAAA;CAC/B;AAED,UAAU,qBAAqB;IAC7B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,MAAM,EAAE,cAAc,CAAA;IACtB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;AAaD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAWhE;AA0CD,qBAAa,gBAAiB,SAAQ,SAAS,CAC7C,qBAAqB,EACrB,qBAAqB,CACtB;IACC,KAAK,EAAE,qBAAqB,CAAA;IAE5B,MAAM,CAAC,wBAAwB,CAC7B,KAAK,EAAE,KAAK,GACX,OAAO,CAAC,qBAAqB,CAAC;gBAIrB,KAAK,EAAE,qBAAqB;IASxC,iBAAiB,IAAI,IAAI;IAgBzB,oBAAoB,IAAI,IAAI;IAU5B,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI;IAWtD,OAAO,CAAC,iBAAiB,CAMxB;IAED,OAAO,CAAC,wBAAwB,CAa/B;IAED,OAAO,CAAC,MAAM,CAEb;IAED,OAAO,CAAC,WAAW,CAYlB;IAED,MAAM;CA8CP"}
|
|
@@ -15,6 +15,14 @@ function toError(value) {
|
|
|
15
15
|
return new Error(String(value));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
export function isBenignRuntimeRejection(value) {
|
|
19
|
+
const error = toError(value);
|
|
20
|
+
const source = `${error.message}\n${error.stack ?? ''}`;
|
|
21
|
+
const fromViteClient = source.includes('/@vite/client');
|
|
22
|
+
const isHmrSocketClosure = /WebSocket closed without (?:being )?opened/i.test(error.message) ||
|
|
23
|
+
/WebSocket closed before (?:the )?connection was established/i.test(error.message);
|
|
24
|
+
return fromViteClient && isHmrSocketClosure;
|
|
25
|
+
}
|
|
18
26
|
function formatError(error, source, componentStack) {
|
|
19
27
|
const parts = [`${error.name}: ${error.message}`];
|
|
20
28
|
if (error.stack) {
|
|
@@ -79,6 +87,11 @@ export class AppErrorBoundary extends Component {
|
|
|
79
87
|
reportClientErrorToMoldable(this.props.appName, error, 'window', null);
|
|
80
88
|
};
|
|
81
89
|
handleUnhandledRejection = (event) => {
|
|
90
|
+
if (isBenignRuntimeRejection(event.reason)) {
|
|
91
|
+
event.preventDefault();
|
|
92
|
+
console.info(`${this.props.appName} development connection restarted; waiting for Vite to reconnect.`);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
82
95
|
const error = toError(event.reason);
|
|
83
96
|
console.error(`${this.props.appName} unhandled promise rejection:`, error);
|
|
84
97
|
this.setState({ error, source: 'promise', componentStack: null });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type ChatImageLightboxProps = {
|
|
2
|
+
src: string;
|
|
3
|
+
alt: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
imageClassName?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function ChatImageLightbox({ src, alt, className, imageClassName, }: ChatImageLightboxProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=chat-image-lightbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-image-lightbox.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-image-lightbox.tsx"],"names":[],"mappings":"AAMA,KAAK,sBAAsB,GAAG;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,GAAG,EACH,GAAG,EACH,SAAS,EACT,cAAc,GACf,EAAE,sBAAsB,2CA6BxB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { Dialog, DialogContent, DialogTitle } from '../ui/dialog';
|
|
6
|
+
export function ChatImageLightbox({ src, alt, className, imageClassName, }) {
|
|
7
|
+
const [open, setOpen] = useState(false);
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: cn('focus-visible:ring-ring cursor-zoom-in overflow-hidden focus-visible:outline-none focus-visible:ring-2', className), onClick: () => setOpen(true), "aria-label": `View ${alt}`, children: _jsx("img", { src: src, alt: alt, className: imageClassName, draggable: false }) }), _jsx(Dialog, { open: open, onOpenChange: setOpen, children: _jsxs(DialogContent, { className: "h-[min(88vh,900px)] max-w-[min(92vw,1200px)] overflow-hidden border-0 bg-black/95 p-3 shadow-2xl [&_[data-slot=dialog-close]]:focus:outline-none [&_[data-slot=dialog-close]]:focus:ring-0 [&_[data-slot=dialog-close]]:focus:ring-offset-0 [&_[data-slot=dialog-close]]:focus-visible:outline-none [&_[data-slot=dialog-close]]:focus-visible:ring-0", children: [_jsx(DialogTitle, { className: "sr-only", children: alt }), _jsx("img", { src: src, alt: alt, className: "size-full object-contain", draggable: false })] }) })] }));
|
|
9
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export type ChatMessagePart = {
|
|
2
2
|
type: 'text';
|
|
3
3
|
text: string;
|
|
4
|
+
} | {
|
|
5
|
+
type: 'error';
|
|
6
|
+
text: string;
|
|
4
7
|
} | {
|
|
5
8
|
type: 'reasoning';
|
|
6
9
|
text: string;
|
|
@@ -10,6 +13,7 @@ export type ChatMessagePart = {
|
|
|
10
13
|
filename?: string;
|
|
11
14
|
url: string;
|
|
12
15
|
previewUrl?: string;
|
|
16
|
+
presentation?: 'thumbnail' | 'full';
|
|
13
17
|
} | {
|
|
14
18
|
type: 'tool-invocation';
|
|
15
19
|
toolCallId?: string;
|
|
@@ -24,6 +28,17 @@ export type ChatMessagePart = {
|
|
|
24
28
|
};
|
|
25
29
|
export type ChatMessage = {
|
|
26
30
|
id: string;
|
|
31
|
+
/** Stable persisted row identity. Semantic message IDs may be duplicated. */
|
|
32
|
+
storeSequence?: number;
|
|
33
|
+
/** Host-computed hash for targeted compare-and-swap replacement. */
|
|
34
|
+
storeHash?: string;
|
|
35
|
+
/** Opaque reference for a large persisted row omitted from a bounded page. */
|
|
36
|
+
contentRef?: {
|
|
37
|
+
hash: string;
|
|
38
|
+
serializedBytes: number;
|
|
39
|
+
mediaType?: string;
|
|
40
|
+
omitted: true;
|
|
41
|
+
};
|
|
27
42
|
role: 'user' | 'assistant' | 'system';
|
|
28
43
|
content?: string;
|
|
29
44
|
parts?: ChatMessagePart[];
|
|
@@ -33,12 +48,15 @@ export type ChatMessage = {
|
|
|
33
48
|
completedAtMs?: number;
|
|
34
49
|
};
|
|
35
50
|
};
|
|
51
|
+
export declare function getChatMessageRenderKey(message: ChatMessage, legacyIndex: number): string;
|
|
36
52
|
type MessageProps = {
|
|
37
53
|
message: ChatMessage;
|
|
38
54
|
isLast?: boolean;
|
|
39
55
|
isStreaming?: boolean;
|
|
56
|
+
animateEntry?: boolean;
|
|
57
|
+
onRetryError?: () => void;
|
|
40
58
|
};
|
|
41
|
-
declare function PureMessage({ message, isLast, isStreaming, }: MessageProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
declare function PureMessage({ message, isLast, isStreaming, animateEntry, onRetryError, }: MessageProps): import("react/jsx-runtime").JSX.Element;
|
|
42
60
|
export declare const Message: import("react").MemoExoticComponent<typeof PureMessage>;
|
|
43
61
|
export declare function ThinkingMessage(): import("react/jsx-runtime").JSX.Element;
|
|
44
62
|
export declare function CompactingMessage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-message.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat-message.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-message.tsx"],"names":[],"mappings":"AAqCA,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IACE,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,WAAW,GAAG,MAAM,CAAA;CACpC,GACD;IACE,IAAI,EAAE,iBAAiB,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,QAAQ,CAAC,EAAE;QACT,EAAE,EAAE,MAAM,CAAA;QACV,QAAQ,CAAC,EAAE,OAAO,CAAA;KACnB,CAAA;CACF,CAAA;AAEL,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,UAAU,CAAC,EAAE;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,eAAe,EAAE,MAAM,CAAA;QACvB,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,EAAE,IAAI,CAAA;KACd,CAAA;IACD,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAA;IACrC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,eAAe,EAAE,CAAA;IACzB,IAAI,CAAC,EAAE;QACL,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,aAAa,CAAC,EAAE,MAAM,CAAA;KACvB,CAAA;CACF,CAAA;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,MAAM,GAClB,MAAM,CAIR;AAED,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,WAAW,CAAA;IACpB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;CAC1B,CAAA;AAwwBD,iBAAS,WAAW,CAAC,EACnB,OAAO,EACP,MAAc,EACd,WAAmB,EACnB,YAAmB,EACnB,YAAY,GACb,EAAE,YAAY,2CAwmBd;AAED,eAAO,MAAM,OAAO,yDAAoB,CAAA;AAExC,wBAAgB,eAAe,4CAc9B;AAED,wBAAgB,iBAAiB,4CAkBhC"}
|