@vuer-ai/vuer-uikit 0.0.96 → 0.0.98
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/README.md +106 -7
- package/cli/dial-cli.js +49 -7
- package/dist/SyncScroll/SyncScroll.cjs +10 -10
- package/dist/SyncScroll/SyncScroll.mjs +3 -3
- package/dist/SyncScroll/index.cjs +10 -10
- package/dist/SyncScroll/index.mjs +3 -3
- package/dist/chunk-3HEZVWRW.mjs +62 -0
- package/dist/chunk-4KWGGESI.cjs +494 -0
- package/dist/{chunk-CCMKL2OA.cjs → chunk-7GWDO25E.cjs} +2 -2
- package/dist/chunk-A5LCX2UQ.cjs +208 -0
- package/dist/chunk-BEJIZ56L.mjs +300 -0
- package/dist/chunk-C7VGRU3O.mjs +283 -0
- package/dist/{chunk-LONOMMFA.cjs → chunk-LJMNHTTG.cjs} +21 -21
- package/dist/chunk-O66RESRR.cjs +285 -0
- package/dist/{chunk-RINTUFYQ.cjs → chunk-RMK6W774.cjs} +24 -19
- package/dist/{chunk-BFQ2WL5U.mjs → chunk-TTYSYGVE.mjs} +2 -2
- package/dist/chunk-VA3PEYFM.mjs +489 -0
- package/dist/chunk-VBBJSIY7.cjs +308 -0
- package/dist/{chunk-AIINOWEH.mjs → chunk-W4JCKCW7.mjs} +5 -5
- package/dist/chunk-WWGF6TBZ.mjs +206 -0
- package/dist/chunk-ZGN4UEJR.cjs +679 -0
- package/dist/chunk-ZQLRMOUW.mjs +661 -0
- package/dist/dial/DialPanel.cjs +24 -24
- package/dist/dial/DialPanel.mjs +23 -23
- package/dist/dial/DialProvider.cjs +3 -3
- package/dist/dial/DialProvider.d.cts +1 -0
- package/dist/dial/DialProvider.d.ts +1 -0
- package/dist/dial/DialProvider.example.cjs +72 -0
- package/dist/dial/DialProvider.example.d.cts +7 -0
- package/dist/dial/DialProvider.example.d.ts +7 -0
- package/dist/dial/DialProvider.example.mjs +68 -0
- package/dist/dial/DialProvider.mjs +1 -1
- package/dist/dial/index.cjs +42 -42
- package/dist/dial/index.mjs +23 -23
- package/dist/dial/wrapped-inputs/ControlledInputs.cjs +27 -27
- package/dist/dial/wrapped-inputs/ControlledInputs.mjs +23 -23
- package/dist/dial/wrapped-inputs/DialInputs.cjs +34 -34
- package/dist/dial/wrapped-inputs/DialInputs.mjs +23 -23
- package/dist/dial/wrapped-inputs/DialVectorInput.cjs +24 -24
- package/dist/dial/wrapped-inputs/DialVectorInput.mjs +23 -23
- package/dist/dial/wrapped-inputs/index.cjs +39 -39
- package/dist/dial/wrapped-inputs/index.mjs +23 -23
- package/dist/highlight-cursor/cursor-provider.cjs +3 -3
- package/dist/highlight-cursor/cursor-provider.mjs +2 -2
- package/dist/highlight-cursor/enhanced-components.cjs +10 -10
- package/dist/highlight-cursor/enhanced-components.mjs +5 -5
- package/dist/highlight-cursor/index.cjs +16 -16
- package/dist/highlight-cursor/index.mjs +6 -6
- package/dist/hooks/index.cjs +5 -5
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.cjs +190 -190
- package/dist/index.mjs +23 -23
- package/dist/ui/UIKitBadge.cjs +6 -6
- package/dist/ui/UIKitBadge.mjs +2 -2
- package/dist/ui/avatar.cjs +1 -1
- package/dist/ui/avatar.mjs +1 -1
- package/dist/ui/badge.cjs +1 -1
- package/dist/ui/badge.d.cts +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.mjs +1 -1
- package/dist/ui/button.cjs +1 -1
- package/dist/ui/button.mjs +1 -1
- package/dist/ui/card.cjs +1 -1
- package/dist/ui/card.mjs +1 -1
- package/dist/ui/checkbox.cjs +1 -1
- package/dist/ui/checkbox.mjs +1 -1
- package/dist/ui/collapsible.cjs +1 -1
- package/dist/ui/collapsible.mjs +1 -1
- package/dist/ui/drawer.cjs +1 -1
- package/dist/ui/drawer.mjs +1 -1
- package/dist/ui/dropdown.cjs +1 -1
- package/dist/ui/dropdown.mjs +1 -1
- package/dist/ui/index.cjs +107 -107
- package/dist/ui/index.mjs +17 -17
- package/dist/ui/inputs/color-input.cjs +1 -1
- package/dist/ui/inputs/color-input.mjs +1 -1
- package/dist/ui/inputs/index.cjs +11 -11
- package/dist/ui/inputs/index.mjs +3 -3
- package/dist/ui/inputs/input-numbers.cjs +1 -1
- package/dist/ui/inputs/input-numbers.mjs +1 -1
- package/dist/ui/inputs/input.cjs +1 -1
- package/dist/ui/inputs/input.d.cts +1 -1
- package/dist/ui/inputs/input.d.ts +1 -1
- package/dist/ui/inputs/input.mjs +1 -1
- package/dist/ui/inputs/number-inputs/CmInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/CmInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/DegInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/DegInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerDegInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerDegInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerRadInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/EulerRadInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/InchInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/InchInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/IntInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/IntInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/KVectorInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/KVectorInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/QuaternionInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/QuaternionInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/RadInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/RadInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/TimeInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/TimeInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/Vec3Input.cjs +1 -1
- package/dist/ui/inputs/number-inputs/Vec3Input.mjs +1 -1
- package/dist/ui/inputs/number-inputs/VectorInput.cjs +1 -1
- package/dist/ui/inputs/number-inputs/VectorInput.mjs +1 -1
- package/dist/ui/inputs/number-inputs/index.cjs +11 -11
- package/dist/ui/inputs/number-inputs/index.mjs +3 -3
- package/dist/ui/inputs/presets-input.cjs +1 -1
- package/dist/ui/inputs/presets-input.mjs +1 -1
- package/dist/ui/label.cjs +1 -1
- package/dist/ui/label.mjs +1 -1
- package/dist/ui/layout.cjs +1 -1
- package/dist/ui/layout.mjs +1 -1
- package/dist/ui/layouts/dock-layout/DockLayoutView.cjs +1 -1
- package/dist/ui/layouts/dock-layout/DockLayoutView.mjs +1 -1
- package/dist/ui/layouts/dock-layout/LayoutSlots.cjs +1 -1
- package/dist/ui/layouts/dock-layout/LayoutSlots.mjs +1 -1
- package/dist/ui/layouts/dock-layout/index.cjs +1 -1
- package/dist/ui/layouts/dock-layout/index.mjs +1 -1
- package/dist/ui/layouts/index.cjs +2 -2
- package/dist/ui/layouts/index.mjs +2 -2
- package/dist/ui/layouts/liquid-layout/LayoutSlots.cjs +1 -1
- package/dist/ui/layouts/liquid-layout/LayoutSlots.mjs +1 -1
- package/dist/ui/layouts/liquid-layout/LiquidLayoutView.cjs +1 -1
- package/dist/ui/layouts/liquid-layout/LiquidLayoutView.mjs +1 -1
- package/dist/ui/layouts/liquid-layout/index.cjs +1 -1
- package/dist/ui/layouts/liquid-layout/index.mjs +1 -1
- package/dist/ui/modal.cjs +1 -1
- package/dist/ui/modal.mjs +1 -1
- package/dist/ui/navigation.cjs +1 -1
- package/dist/ui/navigation.mjs +1 -1
- package/dist/ui/pagination.cjs +1 -1
- package/dist/ui/pagination.mjs +1 -1
- package/dist/ui/panel.cjs +1 -1
- package/dist/ui/panel.mjs +1 -1
- package/dist/ui/popover.cjs +1 -1
- package/dist/ui/popover.mjs +1 -1
- package/dist/ui/radio-group.cjs +1 -1
- package/dist/ui/radio-group.mjs +1 -1
- package/dist/ui/resizable.cjs +1 -1
- package/dist/ui/resizable.mjs +1 -1
- package/dist/ui/select.cjs +1 -1
- package/dist/ui/select.d.cts +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.mjs +1 -1
- package/dist/ui/separator.cjs +1 -1
- package/dist/ui/separator.mjs +1 -1
- package/dist/ui/sheet.cjs +1 -1
- package/dist/ui/sheet.mjs +1 -1
- package/dist/ui/sidebar.cjs +26 -26
- package/dist/ui/sidebar.mjs +2 -2
- package/dist/ui/simple-tree-view.cjs +1 -1
- package/dist/ui/simple-tree-view.mjs +1 -1
- package/dist/ui/skeleton.cjs +1 -1
- package/dist/ui/skeleton.mjs +1 -1
- package/dist/ui/slider.cjs +1 -1
- package/dist/ui/slider.mjs +1 -1
- package/dist/ui/switch.cjs +1 -1
- package/dist/ui/switch.mjs +1 -1
- package/dist/ui/table.cjs +1 -1
- package/dist/ui/table.mjs +1 -1
- package/dist/ui/tabs.cjs +1 -1
- package/dist/ui/tabs.mjs +1 -1
- package/dist/ui/textarea.cjs +1 -1
- package/dist/ui/textarea.d.cts +1 -1
- package/dist/ui/textarea.d.ts +1 -1
- package/dist/ui/textarea.mjs +1 -1
- package/dist/ui/theme/ThemeToggles.cjs +1 -1
- package/dist/ui/theme/ThemeToggles.mjs +1 -1
- package/dist/ui/theme/index.cjs +1 -1
- package/dist/ui/theme/index.mjs +1 -1
- package/dist/ui/toggle-buttons.cjs +1 -1
- package/dist/ui/toggle-buttons.mjs +1 -1
- package/dist/ui/toggle-group.cjs +1 -1
- package/dist/ui/toggle-group.mjs +1 -1
- package/dist/ui/toggle.cjs +1 -1
- package/dist/ui/toggle.mjs +1 -1
- package/dist/ui/toolbar.cjs +1 -1
- package/dist/ui/toolbar.mjs +1 -1
- package/dist/ui/tooltip.cjs +1 -1
- package/dist/ui/tooltip.mjs +1 -1
- package/dist/ui/tree-view/TreeSearchBar.cjs +1 -1
- package/dist/ui/tree-view/TreeSearchBar.mjs +1 -1
- package/dist/ui/tree-view/TreeView.cjs +1 -1
- package/dist/ui/tree-view/TreeView.mjs +1 -1
- package/dist/ui/tree-view/index.cjs +6 -6
- package/dist/ui/tree-view/index.mjs +2 -2
- package/dist/ui/tree-view-legacy.cjs +9 -9
- package/dist/ui/tree-view-legacy.mjs +5 -5
- package/dist/ui/waterfall/CursorOverlay.cjs +1 -1
- package/dist/ui/waterfall/CursorOverlay.mjs +1 -1
- package/dist/ui/waterfall/TimelineEvent.cjs +1 -1
- package/dist/ui/waterfall/TimelineEvent.mjs +1 -1
- package/dist/ui/waterfall/TimelineProcessBar.cjs +1 -1
- package/dist/ui/waterfall/TimelineProcessBar.mjs +1 -1
- package/dist/ui/waterfall/Wedges.cjs +1 -1
- package/dist/ui/waterfall/Wedges.mjs +1 -1
- package/dist/ui/waterfall/index.cjs +8 -8
- package/dist/ui/waterfall/index.mjs +7 -7
- package/package.json +28 -2
- package/src/SyncScroll/README.md +283 -0
- package/src/SyncScroll/SyncScroll.tsx +361 -0
- package/src/SyncScroll/index.ts +22 -0
- package/src/SyncScroll/useSyncScroll.tsx +226 -0
- package/src/cli/dial-cli.ts +1133 -0
- package/src/dial/DialPanel.tsx +208 -0
- package/src/dial/DialProvider.example.tsx +80 -0
- package/src/dial/DialProvider.tsx +138 -0
- package/src/dial/index.ts +26 -0
- package/src/dial/wrapped-inputs/ControlledInputs.tsx +176 -0
- package/src/dial/wrapped-inputs/DialInputs.tsx +401 -0
- package/src/dial/wrapped-inputs/DialVectorInput.tsx +125 -0
- package/src/dial/wrapped-inputs/index.ts +25 -0
- package/src/highlight-cursor/cursor-context.tsx +23 -0
- package/src/highlight-cursor/cursor-provider.tsx +264 -0
- package/src/highlight-cursor/enhanced-components.tsx +16 -0
- package/src/highlight-cursor/index.ts +21 -0
- package/src/highlight-cursor/tabs-cursor-context.tsx +121 -0
- package/src/highlight-cursor/types.ts +40 -0
- package/src/highlight-cursor/with-cursor.tsx +144 -0
- package/src/hooks/clientOnly.tsx +54 -0
- package/src/hooks/cn.ts +33 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/useDocument.tsx +18 -0
- package/src/hooks/useDragSelect.ts +116 -0
- package/src/hooks/useIsMobile.ts +35 -0
- package/src/hooks/useLocalStorage.ts +122 -0
- package/src/hooks/useLocation.tsx +95 -0
- package/src/hooks/useQueryParams.tsx +31 -0
- package/src/hooks/useWindow.tsx +18 -0
- package/src/index.css +5 -0
- package/src/index.ts +5 -0
- package/src/styles/.editorconfig +0 -0
- package/src/styles/theme.css +152 -0
- package/src/styles/toast.css +67 -0
- package/src/styles/variables.css +229 -0
- package/src/ui/UIKitBadge.tsx +171 -0
- package/src/ui/avatar.tsx +221 -0
- package/src/ui/badge.tsx +74 -0
- package/src/ui/button.tsx +143 -0
- package/src/ui/card.tsx +146 -0
- package/src/ui/checkbox.tsx +78 -0
- package/src/ui/collapsible.tsx +43 -0
- package/src/ui/drag-selectable/DragSelectProvider.tsx +178 -0
- package/src/ui/drag-selectable/createSelectable.tsx +43 -0
- package/src/ui/drag-selectable/index.ts +2 -0
- package/src/ui/drawer.tsx +137 -0
- package/src/ui/dropdown.tsx +707 -0
- package/src/ui/icons/MouseCursorIcons.tsx +39 -0
- package/src/ui/icons/cursor.tsx +38 -0
- package/src/ui/icons/index.ts +2 -0
- package/src/ui/index.ts +45 -0
- package/src/ui/inputs/color-input.tsx +61 -0
- package/src/ui/inputs/index.tsx +5 -0
- package/src/ui/inputs/input-numbers.tsx +394 -0
- package/src/ui/inputs/input.tsx +155 -0
- package/src/ui/inputs/number-inputs/CmInput.tsx +26 -0
- package/src/ui/inputs/number-inputs/DegInput.tsx +26 -0
- package/src/ui/inputs/number-inputs/EulerDegInput.tsx +14 -0
- package/src/ui/inputs/number-inputs/EulerInput.tsx +30 -0
- package/src/ui/inputs/number-inputs/EulerRadInput.tsx +14 -0
- package/src/ui/inputs/number-inputs/InchInput.tsx +26 -0
- package/src/ui/inputs/number-inputs/IntInput.tsx +46 -0
- package/src/ui/inputs/number-inputs/KVectorInput.tsx +20 -0
- package/src/ui/inputs/number-inputs/QuaternionInput.tsx +27 -0
- package/src/ui/inputs/number-inputs/RadInput.tsx +26 -0
- package/src/ui/inputs/number-inputs/TimeInput.tsx +26 -0
- package/src/ui/inputs/number-inputs/Vec3Input.tsx +26 -0
- package/src/ui/inputs/number-inputs/VectorInput.tsx +38 -0
- package/src/ui/inputs/number-inputs/index.ts +38 -0
- package/src/ui/inputs/presets-input.tsx +59 -0
- package/src/ui/label.tsx +35 -0
- package/src/ui/layout.tsx +43 -0
- package/src/ui/layouts/dock-layout/DockLayoutView.tsx +128 -0
- package/src/ui/layouts/dock-layout/LayoutSlots.tsx +85 -0
- package/src/ui/layouts/dock-layout/index.tsx +2 -0
- package/src/ui/layouts/index.ts +2 -0
- package/src/ui/layouts/liquid-layout/LayoutSlots.tsx +82 -0
- package/src/ui/layouts/liquid-layout/LiquidLayoutView.tsx +76 -0
- package/src/ui/layouts/liquid-layout/index.ts +1 -0
- package/src/ui/modal.tsx +211 -0
- package/src/ui/navigation.tsx +86 -0
- package/src/ui/pagination.tsx +129 -0
- package/src/ui/panel.tsx +146 -0
- package/src/ui/popover.tsx +112 -0
- package/src/ui/radio-group.tsx +63 -0
- package/src/ui/resizable.tsx +52 -0
- package/src/ui/select.tsx +365 -0
- package/src/ui/separator.tsx +26 -0
- package/src/ui/sheet.tsx +257 -0
- package/src/ui/sidebar.tsx +695 -0
- package/src/ui/simple-tree-view.tsx +604 -0
- package/src/ui/skeleton.tsx +15 -0
- package/src/ui/slider.tsx +204 -0
- package/src/ui/switch.tsx +45 -0
- package/src/ui/table.tsx +99 -0
- package/src/ui/tabs.tsx +192 -0
- package/src/ui/textarea.tsx +55 -0
- package/src/ui/theme/ThemeProvider.tsx +319 -0
- package/src/ui/theme/ThemeToggles.tsx +84 -0
- package/src/ui/theme/index.ts +21 -0
- package/src/ui/theme/themeScript.tsx +179 -0
- package/src/ui/theme/types.ts +61 -0
- package/src/ui/toast.tsx +30 -0
- package/src/ui/toggle-buttons.tsx +290 -0
- package/src/ui/toggle-group.tsx +236 -0
- package/src/ui/toggle.tsx +94 -0
- package/src/ui/toolbar.tsx +54 -0
- package/src/ui/tooltip.tsx +171 -0
- package/src/ui/tree-view/TreeSearchBar.tsx +88 -0
- package/src/ui/tree-view/TreeView.tsx +232 -0
- package/src/ui/tree-view/hooks.tsx +289 -0
- package/src/ui/tree-view/index.ts +4 -0
- package/src/ui/tree-view/types.ts +23 -0
- package/src/ui/tree-view-legacy.tsx +644 -0
- package/src/ui/version-badge.tsx +0 -0
- package/src/ui/waterfall/CursorOverlay.tsx +96 -0
- package/src/ui/waterfall/NavigationControls.tsx +42 -0
- package/src/ui/waterfall/Tick.tsx +51 -0
- package/src/ui/waterfall/TimeRuleEventDot.tsx +19 -0
- package/src/ui/waterfall/TimelineEvent.tsx +60 -0
- package/src/ui/waterfall/TimelineProcessBar.tsx +207 -0
- package/src/ui/waterfall/Wedges.tsx +67 -0
- package/src/ui/waterfall/WheelZoomContext.tsx +128 -0
- package/src/ui/waterfall/hooks/useTimelineState.tsx +134 -0
- package/src/ui/waterfall/hooks/useViewport.tsx +293 -0
- package/src/ui/waterfall/index.tsx +326 -0
- package/src/ui/waterfall/types.ts +20 -0
- package/src/ui/waterfall/utils.ts +91 -0
- package/dist/chunk-W2YAQV5N.mjs +0 -57
- package/dist/{chunk-QLCEHV4Q.mjs → chunk-2OZK5DY5.mjs} +2 -2
- package/dist/{chunk-Z35DNFRZ.cjs → chunk-7IS37C3P.cjs} +2 -2
- package/dist/{chunk-4AOAH77D.mjs → chunk-A2PCEL5S.mjs} +2 -2
- package/dist/{chunk-K4VD5PPY.mjs → chunk-BIUDC66P.mjs} +1 -1
- package/dist/{chunk-RKJR6RZU.cjs → chunk-OYNLQTHW.cjs} +1 -1
- package/dist/{chunk-VE3XLQLO.cjs → chunk-QUFZWF4E.cjs} +2 -2
package/README.md
CHANGED
|
@@ -64,15 +64,18 @@ export default function MyApp() {
|
|
|
64
64
|
|
|
65
65
|
## CLI Tools
|
|
66
66
|
|
|
67
|
-
### dial-cli
|
|
67
|
+
### dial-cli - Dial Schema Generator
|
|
68
68
|
|
|
69
|
-
The vuer-uikit package includes a CLI tool for generating dial metadata from React components with `@dial` annotations.
|
|
69
|
+
The vuer-uikit package includes `dial-cli`, a powerful CLI tool for generating dial metadata from TypeScript/React components with `@dial` annotations.
|
|
70
70
|
|
|
71
71
|
#### Usage
|
|
72
72
|
|
|
73
|
-
After installing `@vuer-ai/vuer-uikit`,
|
|
73
|
+
After installing `@vuer-ai/vuer-uikit`, the `dial-cli` command is available via npx:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
+
# Show version and git hash
|
|
77
|
+
npx dial-cli --version
|
|
78
|
+
|
|
76
79
|
# Generate metadata for a single component
|
|
77
80
|
npx dial-cli MyComponent.tsx
|
|
78
81
|
|
|
@@ -81,6 +84,18 @@ npx dial-cli -o ./metadata MyComponent.tsx
|
|
|
81
84
|
|
|
82
85
|
# Process multiple files
|
|
83
86
|
npx dial-cli Component1.tsx Component2.tsx Component3.tsx
|
|
87
|
+
|
|
88
|
+
# Get detailed help
|
|
89
|
+
npx dial-cli --help
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### Running from Source (Development)
|
|
93
|
+
|
|
94
|
+
You can also run the TypeScript source directly without compilation:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Run directly using tsx
|
|
98
|
+
npx tsx node_modules/@vuer-ai/vuer-uikit/src/cli/dial-cli.ts --version
|
|
84
99
|
```
|
|
85
100
|
|
|
86
101
|
#### @dial Annotations
|
|
@@ -88,25 +103,109 @@ npx dial-cli Component1.tsx Component2.tsx Component3.tsx
|
|
|
88
103
|
The CLI parses JSDoc comments with `@dial` annotations to generate UI metadata:
|
|
89
104
|
|
|
90
105
|
```tsx
|
|
91
|
-
interface
|
|
106
|
+
interface BoxProps {
|
|
92
107
|
/**
|
|
93
|
-
* Position
|
|
94
|
-
* @dial
|
|
108
|
+
* Position in 3D space
|
|
109
|
+
* @dial transform
|
|
110
|
+
* @dial-dtype vector3
|
|
95
111
|
* @dial-mins -10,-10,-10
|
|
96
112
|
* @dial-maxs 10,10,10
|
|
97
113
|
* @dial-steps 0.1,0.1,0.1
|
|
114
|
+
* @dial-icon Move3d
|
|
98
115
|
*/
|
|
99
116
|
position: [number, number, number];
|
|
100
117
|
|
|
101
118
|
/**
|
|
102
119
|
* Visibility toggle
|
|
120
|
+
* @dial visibility
|
|
103
121
|
* @dial-dtype boolean
|
|
122
|
+
* @dial-icon Eye
|
|
104
123
|
*/
|
|
105
124
|
visible: boolean;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Rotation in degrees
|
|
128
|
+
* @dial transform
|
|
129
|
+
* @dial-dtype euler
|
|
130
|
+
* @dial-min 0
|
|
131
|
+
* @dial-max 360
|
|
132
|
+
* @dial-step 1
|
|
133
|
+
*/
|
|
134
|
+
rotation: [number, number, number];
|
|
106
135
|
}
|
|
107
136
|
```
|
|
108
137
|
|
|
109
|
-
|
|
138
|
+
#### Available Annotations
|
|
139
|
+
|
|
140
|
+
**Grouping & Organization:**
|
|
141
|
+
- `@dial <group>` - Group related properties (transform, visibility, geometry, segments)
|
|
142
|
+
- `@dial-ignore` - Exclude property from schema generation
|
|
143
|
+
|
|
144
|
+
**Property Configuration:**
|
|
145
|
+
- `@dial-dtype <type>` - Data type (vector3, euler, boolean, int, string, etc.)
|
|
146
|
+
- `@dial-min <number>` - Minimum value for numeric inputs
|
|
147
|
+
- `@dial-max <number>` - Maximum value for numeric inputs
|
|
148
|
+
- `@dial-step <number>` - Step increment for numeric inputs
|
|
149
|
+
- `@dial-default <value>` - Default value (overrides component default)
|
|
150
|
+
- `@dial-options [...]` - Array of preset values
|
|
151
|
+
- `@dial-icon <name>` - Lucide icon name for the control
|
|
152
|
+
|
|
153
|
+
**Layout & Display:**
|
|
154
|
+
- `@dial-col-<n>` - Display in column layout with n columns
|
|
155
|
+
- `@dial-row-<n>` - Display in row layout with n items per row
|
|
156
|
+
- `@dial-label-<pos>` - Label position (left, right, top, bottom, inline)
|
|
157
|
+
- `@dial-no-wrap` - Prevent line wrapping
|
|
158
|
+
|
|
159
|
+
**Vector Types:**
|
|
160
|
+
- `@dial-mins <n,n,n>` - Comma-separated min values for vector elements
|
|
161
|
+
- `@dial-maxs <n,n,n>` - Comma-separated max values for vector elements
|
|
162
|
+
- `@dial-steps <n,n,n>` - Comma-separated step values for vector elements
|
|
163
|
+
- `@dial-dtypes <t,t,t>` - Comma-separated data types for vector elements
|
|
164
|
+
- `@dial-placeholders <x,y,z>` - Placeholder text for vector inputs
|
|
165
|
+
- `@dial-tooltips <tip1,tip2,tip3>` - Tooltips for vector elements
|
|
166
|
+
|
|
167
|
+
#### Output Files
|
|
168
|
+
|
|
169
|
+
The CLI generates three JSON files for each component:
|
|
170
|
+
|
|
171
|
+
- `*-raw.json` - Raw output from react-docgen-typescript
|
|
172
|
+
- `*-combined.json` - Enhanced metadata with dial schemas and type definitions
|
|
173
|
+
- `*-schemas.json` - Clean dial schemas ready for UI generation
|
|
174
|
+
|
|
175
|
+
#### CLI Options
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
Options:
|
|
179
|
+
-o, --output <dir> Output directory (default: ./metadata)
|
|
180
|
+
-i, --ignore <prop> Properties to exclude (supports patterns)
|
|
181
|
+
-v, --version Show version and git hash
|
|
182
|
+
-h, --help Display help
|
|
183
|
+
--verbose Detailed output
|
|
184
|
+
--quiet Suppress output except errors
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
#### Example Build Script
|
|
188
|
+
|
|
189
|
+
Create a script to automate metadata generation:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
#!/bin/bash
|
|
193
|
+
# generate-dial-metadata.sh
|
|
194
|
+
|
|
195
|
+
echo "Generating dial metadata..."
|
|
196
|
+
|
|
197
|
+
# Show version info
|
|
198
|
+
npx dial-cli --version
|
|
199
|
+
|
|
200
|
+
# Generate metadata for all components
|
|
201
|
+
npx dial-cli \
|
|
202
|
+
--output ./metadata \
|
|
203
|
+
src/components/*.tsx
|
|
204
|
+
|
|
205
|
+
echo "Metadata generation complete!"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
For more examples and documentation, visit [uikit.vuer.ai/dial](https://uikit.vuer.ai/dial)
|
|
110
209
|
|
|
111
210
|
## Customizing your theme
|
|
112
211
|
|
package/cli/dial-cli.js
CHANGED
|
@@ -2,10 +2,44 @@
|
|
|
2
2
|
|
|
3
3
|
// src/cli/dial-cli.ts
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
5
|
-
import { basename, join, resolve } from "path";
|
|
5
|
+
import { basename, dirname, join, resolve } from "path";
|
|
6
6
|
import { parseArgs } from "util";
|
|
7
|
+
import { fileURLToPath } from "url";
|
|
8
|
+
import { execSync } from "child_process";
|
|
7
9
|
import * as docgen from "react-docgen-typescript";
|
|
8
10
|
import * as ts from "typescript";
|
|
11
|
+
function getVersionInfo() {
|
|
12
|
+
try {
|
|
13
|
+
const __filename2 = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname2 = dirname(__filename2);
|
|
15
|
+
const possiblePaths = [
|
|
16
|
+
resolve(__dirname2, "../package.json"),
|
|
17
|
+
// Built version: cli/dial-cli.js -> package.json
|
|
18
|
+
resolve(__dirname2, "../../package.json")
|
|
19
|
+
// Source version: src/cli/dial-cli.ts -> package.json
|
|
20
|
+
];
|
|
21
|
+
let packageJson = null;
|
|
22
|
+
for (const path of possiblePaths) {
|
|
23
|
+
try {
|
|
24
|
+
if (existsSync(path)) {
|
|
25
|
+
packageJson = JSON.parse(readFileSync(path, "utf-8"));
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
} catch {
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const version = packageJson?.version || "unknown";
|
|
32
|
+
let gitHash;
|
|
33
|
+
try {
|
|
34
|
+
gitHash = execSync("git rev-parse --short HEAD", { encoding: "utf-8", cwd: dirname(__dirname2) }).trim();
|
|
35
|
+
} catch {
|
|
36
|
+
gitHash = void 0;
|
|
37
|
+
}
|
|
38
|
+
return { version, gitHash };
|
|
39
|
+
} catch (error) {
|
|
40
|
+
return { version: "unknown" };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
9
43
|
function parseTypeAlias(sourceFile, typeName) {
|
|
10
44
|
let typeDefinition = null;
|
|
11
45
|
function visit(node) {
|
|
@@ -530,7 +564,10 @@ async function processFile(filePath, outputDir, options, flags = {}) {
|
|
|
530
564
|
});
|
|
531
565
|
}
|
|
532
566
|
}
|
|
533
|
-
|
|
567
|
+
function getHelpText() {
|
|
568
|
+
const { version, gitHash } = getVersionInfo();
|
|
569
|
+
const versionString = gitHash ? `v${version} (${gitHash})` : `v${version}`;
|
|
570
|
+
return `
|
|
534
571
|
dial-cli - Generate dial metadata from TypeScript/React components
|
|
535
572
|
|
|
536
573
|
SYNOPSIS
|
|
@@ -658,11 +695,12 @@ SEE ALSO
|
|
|
658
695
|
GitHub: https://github.com/vuer-ai/vuer-uikit
|
|
659
696
|
|
|
660
697
|
VERSION
|
|
661
|
-
dial-cli
|
|
698
|
+
dial-cli ${versionString} (part of @vuer-ai/vuer-uikit)
|
|
662
699
|
|
|
663
700
|
AUTHORS
|
|
664
701
|
Vuer AI Team <team@vuer.ai>
|
|
665
702
|
`;
|
|
703
|
+
}
|
|
666
704
|
async function main() {
|
|
667
705
|
const { values, positionals } = parseArgs({
|
|
668
706
|
args: process.argv.slice(2),
|
|
@@ -696,15 +734,17 @@ async function main() {
|
|
|
696
734
|
allowPositionals: true
|
|
697
735
|
});
|
|
698
736
|
if (values.version) {
|
|
699
|
-
|
|
737
|
+
const { version, gitHash } = getVersionInfo();
|
|
738
|
+
const versionString = gitHash ? `v${version} (${gitHash})` : `v${version}`;
|
|
739
|
+
console.log(`dial-cli ${versionString} (part of @vuer-ai/vuer-uikit)`);
|
|
700
740
|
process.exit(0);
|
|
701
741
|
}
|
|
702
742
|
if (values.help || positionals.length === 0) {
|
|
703
|
-
console.log(
|
|
743
|
+
console.log(getHelpText());
|
|
704
744
|
process.exit(0);
|
|
705
745
|
}
|
|
706
746
|
if (positionals.length === 1 && (positionals[0] === "man" || positionals[0] === "help")) {
|
|
707
|
-
console.log(
|
|
747
|
+
console.log(getHelpText());
|
|
708
748
|
process.exit(0);
|
|
709
749
|
}
|
|
710
750
|
const outputDir = resolve(process.cwd(), values.output);
|
|
@@ -746,7 +786,9 @@ async function main() {
|
|
|
746
786
|
ignoreList
|
|
747
787
|
};
|
|
748
788
|
if (!flags.quiet) {
|
|
749
|
-
|
|
789
|
+
const { version, gitHash } = getVersionInfo();
|
|
790
|
+
const versionString = gitHash ? `v${version} (${gitHash})` : `v${version}`;
|
|
791
|
+
console.log(`\u{1F680} Dial Documentation Generator ${versionString}`);
|
|
750
792
|
console.log(`\u{1F4C2} Output directory: ${outputDir}`);
|
|
751
793
|
if (flags.verbose && ignoreList.length > 0) {
|
|
752
794
|
console.log(`\u{1F6AB} Ignoring properties: ${ignoreList.join(", ")}`);
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkVBBJSIY7_cjs = require('../chunk-VBBJSIY7.cjs');
|
|
4
|
+
require('../chunk-G4FJGNY5.cjs');
|
|
4
5
|
require('../chunk-QN4N4I3Z.cjs');
|
|
5
6
|
require('../chunk-LYZJNEOR.cjs');
|
|
6
7
|
require('../chunk-YZIR6LIY.cjs');
|
|
7
8
|
require('../chunk-RPTRTGC2.cjs');
|
|
8
|
-
require('../chunk-OHIB3TEN.cjs');
|
|
9
9
|
require('../chunk-LBWMTA5T.cjs');
|
|
10
10
|
require('../chunk-Q7E73DVJ.cjs');
|
|
11
11
|
require('../chunk-JR4TVE43.cjs');
|
|
12
12
|
require('../chunk-VXZURKMQ.cjs');
|
|
13
13
|
require('../chunk-6BOWMGFG.cjs');
|
|
14
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-OHIB3TEN.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "SyncDrag", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncDrag; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "SyncDragSlave", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncDragSlave; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "SyncDragSlaveX", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncDragSlaveX; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "SyncDragX", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncDragX; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "SyncDragY", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncDragY; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "SyncScroll", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncScroll; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "SyncScrollSlave", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncScrollSlave; }
|
|
45
45
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { SyncDrag, SyncDragSlave, SyncDragSlaveX, SyncDragX, SyncDragY, SyncScroll, SyncScrollSlave } from '../chunk-
|
|
1
|
+
export { SyncDrag, SyncDragSlave, SyncDragSlaveX, SyncDragX, SyncDragY, SyncScroll, SyncScrollSlave } from '../chunk-BEJIZ56L.mjs';
|
|
2
|
+
import '../chunk-SAGQV2YZ.mjs';
|
|
2
3
|
import '../chunk-F7ZHPSLA.mjs';
|
|
3
4
|
import '../chunk-OEIF3JCH.mjs';
|
|
4
5
|
import '../chunk-VA4LUFKD.mjs';
|
|
5
6
|
import '../chunk-4F2GSF2T.mjs';
|
|
6
|
-
import '../chunk-HMN4IKTG.mjs';
|
|
7
7
|
import '../chunk-IDUVYPN7.mjs';
|
|
8
8
|
import '../chunk-3QT5VABC.mjs';
|
|
9
9
|
import '../chunk-XHJDRQD7.mjs';
|
|
10
10
|
import '../chunk-LQOPO4KU.mjs';
|
|
11
11
|
import '../chunk-IZARTVYN.mjs';
|
|
12
|
-
import '../chunk-
|
|
12
|
+
import '../chunk-HMN4IKTG.mjs';
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-JMCH2AFN.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkVBBJSIY7_cjs = require('../chunk-VBBJSIY7.cjs');
|
|
5
|
+
var chunkG4FJGNY5_cjs = require('../chunk-G4FJGNY5.cjs');
|
|
5
6
|
require('../chunk-QN4N4I3Z.cjs');
|
|
6
7
|
require('../chunk-LYZJNEOR.cjs');
|
|
7
8
|
require('../chunk-YZIR6LIY.cjs');
|
|
8
9
|
require('../chunk-RPTRTGC2.cjs');
|
|
9
|
-
require('../chunk-OHIB3TEN.cjs');
|
|
10
10
|
require('../chunk-LBWMTA5T.cjs');
|
|
11
11
|
require('../chunk-Q7E73DVJ.cjs');
|
|
12
12
|
require('../chunk-JR4TVE43.cjs');
|
|
13
13
|
require('../chunk-VXZURKMQ.cjs');
|
|
14
14
|
require('../chunk-6BOWMGFG.cjs');
|
|
15
|
-
|
|
15
|
+
require('../chunk-OHIB3TEN.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
Object.defineProperty(exports, "SyncDrag", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncDrag; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "SyncDragSlave", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncDragSlave; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "SyncDragSlaveX", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncDragSlaveX; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "SyncDragX", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncDragX; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "SyncDragY", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncDragY; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "SyncScroll", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncScroll; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "SyncScrollSlave", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkVBBJSIY7_cjs.SyncScrollSlave; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "SyncScrollProvider", {
|
|
48
48
|
enumerable: true,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import '../chunk-BNDRHLLZ.mjs';
|
|
2
|
-
export { SyncDrag, SyncDragSlave, SyncDragSlaveX, SyncDragX, SyncDragY, SyncScroll, SyncScrollSlave } from '../chunk-
|
|
2
|
+
export { SyncDrag, SyncDragSlave, SyncDragSlaveX, SyncDragX, SyncDragY, SyncScroll, SyncScrollSlave } from '../chunk-BEJIZ56L.mjs';
|
|
3
|
+
export { SyncScrollProvider, useScrollSlave, useSyncDrag, useSyncScroll } from '../chunk-SAGQV2YZ.mjs';
|
|
3
4
|
import '../chunk-F7ZHPSLA.mjs';
|
|
4
5
|
import '../chunk-OEIF3JCH.mjs';
|
|
5
6
|
import '../chunk-VA4LUFKD.mjs';
|
|
6
7
|
import '../chunk-4F2GSF2T.mjs';
|
|
7
|
-
import '../chunk-HMN4IKTG.mjs';
|
|
8
8
|
import '../chunk-IDUVYPN7.mjs';
|
|
9
9
|
import '../chunk-3QT5VABC.mjs';
|
|
10
10
|
import '../chunk-XHJDRQD7.mjs';
|
|
11
11
|
import '../chunk-LQOPO4KU.mjs';
|
|
12
12
|
import '../chunk-IZARTVYN.mjs';
|
|
13
|
-
|
|
13
|
+
import '../chunk-HMN4IKTG.mjs';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { createContext, useContext, useState, useCallback, useMemo } from 'react';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
// src/dial/DialProvider.tsx
|
|
5
|
+
var DialSchemaContext = createContext(void 0);
|
|
6
|
+
var useDialSchema = () => {
|
|
7
|
+
const context = useContext(DialSchemaContext);
|
|
8
|
+
if (!context) {
|
|
9
|
+
throw new Error("useDialSchema must be used within a DialSchemaProvider");
|
|
10
|
+
}
|
|
11
|
+
return context;
|
|
12
|
+
};
|
|
13
|
+
var DialProvider = ({
|
|
14
|
+
children,
|
|
15
|
+
schemas,
|
|
16
|
+
initialValues = {},
|
|
17
|
+
values: controlledValues,
|
|
18
|
+
onValueChange
|
|
19
|
+
}) => {
|
|
20
|
+
const isControlled = controlledValues !== void 0;
|
|
21
|
+
const [internalValues, setInternalValues] = useState(() => {
|
|
22
|
+
const defaultValues = {};
|
|
23
|
+
schemas.forEach((schema) => {
|
|
24
|
+
defaultValues[schema.name] = initialValues[schema.name] ?? schema.value;
|
|
25
|
+
});
|
|
26
|
+
return defaultValues;
|
|
27
|
+
});
|
|
28
|
+
const values = isControlled ? controlledValues : internalValues;
|
|
29
|
+
const getValue = useCallback(
|
|
30
|
+
(name) => {
|
|
31
|
+
return values[name];
|
|
32
|
+
},
|
|
33
|
+
[values]
|
|
34
|
+
);
|
|
35
|
+
const setValue = useCallback(
|
|
36
|
+
(name, value) => {
|
|
37
|
+
if (isControlled) {
|
|
38
|
+
onValueChange?.(name, value);
|
|
39
|
+
} else {
|
|
40
|
+
setInternalValues((prev) => ({
|
|
41
|
+
...prev,
|
|
42
|
+
[name]: value
|
|
43
|
+
}));
|
|
44
|
+
onValueChange?.(name, value);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
[isControlled, onValueChange]
|
|
48
|
+
);
|
|
49
|
+
const contextValue = useMemo(
|
|
50
|
+
() => ({
|
|
51
|
+
values,
|
|
52
|
+
schemas,
|
|
53
|
+
getValue,
|
|
54
|
+
setValue,
|
|
55
|
+
onValueChange
|
|
56
|
+
}),
|
|
57
|
+
[values, schemas, getValue, setValue, onValueChange]
|
|
58
|
+
);
|
|
59
|
+
return /* @__PURE__ */ jsx(DialSchemaContext.Provider, { value: contextValue, children });
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export { DialProvider, useDialSchema };
|