aeon-ui-engine 1.3.5 → 1.4.0

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/package.json +1 -1
  3. package/packages/cli/README.md +13 -1
  4. package/packages/cli/dist/bin.js +23 -5
  5. package/packages/cli/dist/chunk-5L47SLNV.js +247 -0
  6. package/packages/cli/dist/index.d.ts +17 -1
  7. package/packages/cli/dist/index.js +5 -3
  8. package/packages/cli/src/bin.ts +21 -3
  9. package/packages/cli/src/index.ts +1 -0
  10. package/packages/cli/src/migrate.ts +170 -0
  11. package/packages/core/dist/index.d.ts +35 -7
  12. package/packages/core/dist/index.js +102 -2
  13. package/packages/core/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  14. package/packages/core/src/anatomy.ts +39 -3
  15. package/packages/core/src/identicon.test.ts +39 -0
  16. package/packages/core/src/identicon.ts +79 -0
  17. package/packages/core/src/index.ts +1 -0
  18. package/packages/panda/panda.config.ts +4 -0
  19. package/packages/panda/src/recipes/composer.ts +58 -4
  20. package/packages/panda/src/recipes/file-upload.ts +100 -0
  21. package/packages/panda/src/recipes/index.ts +2 -0
  22. package/packages/panda/src/recipes/range-slider.ts +59 -0
  23. package/packages/panda/src/recipes/thread.ts +77 -2
  24. package/packages/panda/styled-system/recipes/aeon-composer.d.ts +1 -1
  25. package/packages/panda/styled-system/recipes/aeon-composer.mjs +12 -0
  26. package/packages/panda/styled-system/recipes/aeon-file-upload.d.ts +31 -0
  27. package/packages/panda/styled-system/recipes/aeon-file-upload.mjs +61 -0
  28. package/packages/panda/styled-system/recipes/aeon-range-slider.d.ts +31 -0
  29. package/packages/panda/styled-system/recipes/aeon-range-slider.mjs +49 -0
  30. package/packages/panda/styled-system/recipes/aeon-thread.d.ts +1 -1
  31. package/packages/panda/styled-system/recipes/aeon-thread.mjs +20 -0
  32. package/packages/panda/styled-system/recipes/index.d.ts +2 -0
  33. package/packages/panda/styled-system/recipes/index.mjs +2 -0
  34. package/packages/panda/styled-system/styles.css +292 -0
  35. package/packages/primitives/dist/chunk-CV4UXXZF.js +44 -0
  36. package/packages/primitives/dist/chunk-IZKQSCYU.js +164 -0
  37. package/packages/primitives/dist/index.d.ts +2 -0
  38. package/packages/primitives/dist/index.js +22 -6
  39. package/packages/primitives/dist/machines/file-upload.d.ts +39 -0
  40. package/packages/primitives/dist/machines/file-upload.js +8 -0
  41. package/packages/primitives/dist/machines/range-slider.d.ts +129 -0
  42. package/packages/primitives/dist/machines/range-slider.js +12 -0
  43. package/packages/primitives/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  44. package/packages/primitives/src/__tests__/file-upload.test.ts +25 -0
  45. package/packages/primitives/src/__tests__/range-slider.test.ts +39 -0
  46. package/packages/primitives/src/index.ts +2 -0
  47. package/packages/primitives/src/machines/file-upload.ts +55 -0
  48. package/packages/primitives/src/machines/range-slider.ts +209 -0
  49. package/packages/react/dist/index.d.ts +117 -25
  50. package/packages/react/dist/index.js +1731 -1006
  51. package/packages/react/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  52. package/packages/react/src/button/index.tsx +50 -15
  53. package/packages/react/src/composer/index.tsx +58 -3
  54. package/packages/react/src/file-upload/index.tsx +322 -0
  55. package/packages/react/src/index.ts +3 -0
  56. package/packages/react/src/prompt/index.tsx +45 -0
  57. package/packages/react/src/range-slider/index.tsx +322 -0
  58. package/packages/react/src/thread/index.tsx +74 -3
  59. package/packages/react/src/utils/slot.tsx +47 -0
  60. package/packages/schemas/dist/index.d.ts +4 -0
  61. package/packages/schemas/dist/index.js +67 -1
  62. package/packages/schemas/json/button.json +6 -0
  63. package/packages/schemas/json/catalog.json +333 -0
  64. package/packages/schemas/json/fileUpload.json +168 -0
  65. package/packages/schemas/json/rangeSlider.json +157 -0
  66. package/packages/schemas/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  67. package/packages/schemas/registry/catalog.json +18 -0
  68. package/packages/schemas/registry/components/button.json +6 -0
  69. package/packages/schemas/registry/components/fileUpload.json +168 -0
  70. package/packages/schemas/registry/components/rangeSlider.json +157 -0
  71. package/packages/schemas/registry/machines/fileUpload.json +182 -0
  72. package/packages/schemas/registry/machines/rangeSlider.json +201 -0
  73. package/packages/schemas/scripts/emit.ts +4 -0
  74. package/packages/schemas/src/components.ts +70 -0
  75. package/packages/schemas/tsconfig.json +1 -1
  76. package/packages/ui/dist/index.d.ts +100 -46
  77. package/packages/ui/dist/index.js +463 -341
  78. package/packages/ui/src/composer.tsx +37 -11
  79. package/packages/ui/src/file-upload.tsx +36 -0
  80. package/packages/ui/src/index.ts +2 -0
  81. package/packages/ui/src/prompt.tsx +3 -0
  82. package/packages/ui/src/range-slider.tsx +24 -0
  83. package/packages/ui/src/thread.tsx +40 -0
  84. package/packages/cli/dist/chunk-IW5NT2Z2.js +0 -103
@@ -169,6 +169,24 @@
169
169
  "runtime": "useAeonMachine",
170
170
  "description": "Range control via sliderMachine — idle | dragging plus numeric value in context."
171
171
  },
172
+ {
173
+ "id": "rangeSlider",
174
+ "title": "RangeSlider",
175
+ "scope": "rangeSlider",
176
+ "schemaUrl": "https://aeon-ui.com/registry/components/rangeSlider.json",
177
+ "machineUrl": "https://aeon-ui.com/registry/machines/rangeSlider.json",
178
+ "runtime": "useAeonMachine",
179
+ "description": "Two-thumb range via rangeSliderMachine — idle | dragging with values pair and minStepsBetween gap."
180
+ },
181
+ {
182
+ "id": "fileUpload",
183
+ "title": "FileUpload",
184
+ "scope": "fileUpload",
185
+ "schemaUrl": "https://aeon-ui.com/registry/components/fileUpload.json",
186
+ "machineUrl": "https://aeon-ui.com/registry/machines/fileUpload.json",
187
+ "runtime": "useAeonMachine",
188
+ "description": "Drag-drop surface via fileUploadMachine — idle | dragging | rejected. File bytes stay in React callbacks."
189
+ },
172
190
  {
173
191
  "id": "pinInput",
174
192
  "title": "PinInput",
@@ -79,6 +79,10 @@
79
79
  },
80
80
  "disabled": {
81
81
  "type": "boolean"
82
+ },
83
+ "asChild": {
84
+ "type": "boolean",
85
+ "description": "Merge button attrs onto a single child element (Link, a)."
82
86
  }
83
87
  }
84
88
  },
@@ -134,6 +138,7 @@
134
138
  },
135
139
  "default": [
136
140
  "<Button.Root status=\"pending\" aria-busy>Saving…</Button.Root>",
141
+ "<Button.Root asChild variant=\"solid\"><a href=\"/upload\">Upload</a></Button.Root>",
137
142
  "const [snap, send] = useAeonMachine(buttonLifecycleMachine)\n<Button.Root status={snap.value as ButtonStatus} onClick={() => send({ type: 'PRESS' })} />"
138
143
  ]
139
144
  }
@@ -164,6 +169,7 @@
164
169
  },
165
170
  "examples": [
166
171
  "<Button.Root status=\"pending\" aria-busy>Saving…</Button.Root>",
172
+ "<Button.Root asChild variant=\"solid\"><a href=\"/upload\">Upload</a></Button.Root>",
167
173
  "const [snap, send] = useAeonMachine(buttonLifecycleMachine)\n<Button.Root status={snap.value as ButtonStatus} onClick={() => send({ type: 'PRESS' })} />"
168
174
  ]
169
175
  }
@@ -0,0 +1,168 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aeon-ui.com/schemas/fileUpload.json",
4
+ "title": "FileUpload",
5
+ "description": "Drag-drop surface via fileUploadMachine — idle | dragging | rejected. File bytes stay in React callbacks.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "component",
10
+ "scope"
11
+ ],
12
+ "properties": {
13
+ "component": {
14
+ "const": "FileUpload"
15
+ },
16
+ "scope": {
17
+ "const": "fileUpload"
18
+ },
19
+ "parts": {
20
+ "type": "array",
21
+ "description": "Anatomy part keys — map to data-aeon-part",
22
+ "items": {
23
+ "type": "string",
24
+ "enum": [
25
+ "root",
26
+ "dropzone",
27
+ "input",
28
+ "label",
29
+ "hint",
30
+ "preview",
31
+ "clearTrigger",
32
+ "rejectionMessage"
33
+ ]
34
+ },
35
+ "uniqueItems": true
36
+ },
37
+ "states": {
38
+ "type": "array",
39
+ "description": "Allowed data-aeon-state values (stable states only)",
40
+ "items": {
41
+ "type": "string",
42
+ "enum": [
43
+ "idle",
44
+ "dragging",
45
+ "rejected"
46
+ ]
47
+ },
48
+ "uniqueItems": true
49
+ },
50
+ "props": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "properties": {}
54
+ },
55
+ "slots": {
56
+ "type": "object",
57
+ "description": "Named composition slots / compound parts",
58
+ "additionalProperties": {
59
+ "type": "string"
60
+ },
61
+ "properties": {
62
+ "Root": {
63
+ "const": "fileUpload.root",
64
+ "description": "fileUpload.root"
65
+ },
66
+ "Dropzone": {
67
+ "const": "fileUpload.dropzone",
68
+ "description": "fileUpload.dropzone"
69
+ },
70
+ "Input": {
71
+ "const": "fileUpload.input",
72
+ "description": "fileUpload.input"
73
+ },
74
+ "Label": {
75
+ "const": "fileUpload.label",
76
+ "description": "fileUpload.label"
77
+ },
78
+ "Hint": {
79
+ "const": "fileUpload.hint",
80
+ "description": "fileUpload.hint"
81
+ },
82
+ "Preview": {
83
+ "const": "fileUpload.preview",
84
+ "description": "fileUpload.preview"
85
+ },
86
+ "ClearTrigger": {
87
+ "const": "fileUpload.clearTrigger",
88
+ "description": "fileUpload.clearTrigger"
89
+ },
90
+ "RejectionMessage": {
91
+ "const": "fileUpload.rejectionMessage",
92
+ "description": "fileUpload.rejectionMessage"
93
+ }
94
+ }
95
+ },
96
+ "machine": {
97
+ "type": [
98
+ "string",
99
+ "null"
100
+ ],
101
+ "description": "XState machine export from @aeon-ui/primitives, or null if prop/React driven",
102
+ "const": "fileUploadMachine"
103
+ },
104
+ "runtime": {
105
+ "type": "string",
106
+ "description": "How headless state is driven at runtime",
107
+ "const": "useAeonMachine"
108
+ },
109
+ "events": {
110
+ "type": "array",
111
+ "items": {
112
+ "type": "string",
113
+ "enum": [
114
+ "DRAG_OVER",
115
+ "DRAG_LEAVE",
116
+ "DROP_ACCEPT",
117
+ "DROP_REJECT",
118
+ "RESET"
119
+ ]
120
+ }
121
+ },
122
+ "examples": {
123
+ "type": "array",
124
+ "items": {
125
+ "type": "string"
126
+ },
127
+ "default": []
128
+ }
129
+ },
130
+ "x-aeon": {
131
+ "scope": "fileUpload",
132
+ "parts": [
133
+ "root",
134
+ "dropzone",
135
+ "input",
136
+ "label",
137
+ "hint",
138
+ "preview",
139
+ "clearTrigger",
140
+ "rejectionMessage"
141
+ ],
142
+ "states": [
143
+ "idle",
144
+ "dragging",
145
+ "rejected"
146
+ ],
147
+ "machine": "fileUploadMachine",
148
+ "runtime": "useAeonMachine",
149
+ "events": [
150
+ "DRAG_OVER",
151
+ "DRAG_LEAVE",
152
+ "DROP_ACCEPT",
153
+ "DROP_REJECT",
154
+ "RESET"
155
+ ],
156
+ "slots": {
157
+ "Root": "fileUpload.root",
158
+ "Dropzone": "fileUpload.dropzone",
159
+ "Input": "fileUpload.input",
160
+ "Label": "fileUpload.label",
161
+ "Hint": "fileUpload.hint",
162
+ "Preview": "fileUpload.preview",
163
+ "ClearTrigger": "fileUpload.clearTrigger",
164
+ "RejectionMessage": "fileUpload.rejectionMessage"
165
+ },
166
+ "examples": []
167
+ }
168
+ }
@@ -0,0 +1,157 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aeon-ui.com/schemas/rangeSlider.json",
4
+ "title": "RangeSlider",
5
+ "description": "Two-thumb range via rangeSliderMachine — idle | dragging with values pair and minStepsBetween gap.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "component",
10
+ "scope"
11
+ ],
12
+ "properties": {
13
+ "component": {
14
+ "const": "RangeSlider"
15
+ },
16
+ "scope": {
17
+ "const": "rangeSlider"
18
+ },
19
+ "parts": {
20
+ "type": "array",
21
+ "description": "Anatomy part keys — map to data-aeon-part",
22
+ "items": {
23
+ "type": "string",
24
+ "enum": [
25
+ "root",
26
+ "track",
27
+ "range",
28
+ "thumb",
29
+ "valueText"
30
+ ]
31
+ },
32
+ "uniqueItems": true
33
+ },
34
+ "states": {
35
+ "type": "array",
36
+ "description": "Allowed data-aeon-state values (stable states only)",
37
+ "items": {
38
+ "type": "string",
39
+ "enum": [
40
+ "idle",
41
+ "dragging"
42
+ ]
43
+ },
44
+ "uniqueItems": true
45
+ },
46
+ "props": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "properties": {}
50
+ },
51
+ "slots": {
52
+ "type": "object",
53
+ "description": "Named composition slots / compound parts",
54
+ "additionalProperties": {
55
+ "type": "string"
56
+ },
57
+ "properties": {
58
+ "Root": {
59
+ "const": "rangeSlider.root",
60
+ "description": "rangeSlider.root"
61
+ },
62
+ "Track": {
63
+ "const": "rangeSlider.track",
64
+ "description": "rangeSlider.track"
65
+ },
66
+ "Range": {
67
+ "const": "rangeSlider.range",
68
+ "description": "rangeSlider.range"
69
+ },
70
+ "Thumb": {
71
+ "const": "rangeSlider.thumb",
72
+ "description": "rangeSlider.thumb"
73
+ },
74
+ "ValueText": {
75
+ "const": "rangeSlider.valueText",
76
+ "description": "rangeSlider.valueText"
77
+ }
78
+ }
79
+ },
80
+ "machine": {
81
+ "type": [
82
+ "string",
83
+ "null"
84
+ ],
85
+ "description": "XState machine export from @aeon-ui/primitives, or null if prop/React driven",
86
+ "const": "rangeSliderMachine"
87
+ },
88
+ "runtime": {
89
+ "type": "string",
90
+ "description": "How headless state is driven at runtime",
91
+ "const": "useAeonMachine"
92
+ },
93
+ "events": {
94
+ "type": "array",
95
+ "items": {
96
+ "type": "string",
97
+ "enum": [
98
+ "SET_VALUES",
99
+ "SET_BOUNDS",
100
+ "SET_DISABLED",
101
+ "POINTER_DOWN",
102
+ "POINTER_MOVE",
103
+ "POINTER_UP",
104
+ "STEP",
105
+ "HOME",
106
+ "END"
107
+ ]
108
+ }
109
+ },
110
+ "examples": {
111
+ "type": "array",
112
+ "items": {
113
+ "type": "string"
114
+ },
115
+ "default": [
116
+ "<RangeSlider.Root defaultValue={[20, 80]} minStepsBetween={1}>\n <RangeSlider.Track /><RangeSlider.Range />\n <RangeSlider.Thumb index={0} /><RangeSlider.Thumb index={1} />\n</RangeSlider.Root>"
117
+ ]
118
+ }
119
+ },
120
+ "x-aeon": {
121
+ "scope": "rangeSlider",
122
+ "parts": [
123
+ "root",
124
+ "track",
125
+ "range",
126
+ "thumb",
127
+ "valueText"
128
+ ],
129
+ "states": [
130
+ "idle",
131
+ "dragging"
132
+ ],
133
+ "machine": "rangeSliderMachine",
134
+ "runtime": "useAeonMachine",
135
+ "events": [
136
+ "SET_VALUES",
137
+ "SET_BOUNDS",
138
+ "SET_DISABLED",
139
+ "POINTER_DOWN",
140
+ "POINTER_MOVE",
141
+ "POINTER_UP",
142
+ "STEP",
143
+ "HOME",
144
+ "END"
145
+ ],
146
+ "slots": {
147
+ "Root": "rangeSlider.root",
148
+ "Track": "rangeSlider.track",
149
+ "Range": "rangeSlider.range",
150
+ "Thumb": "rangeSlider.thumb",
151
+ "ValueText": "rangeSlider.valueText"
152
+ },
153
+ "examples": [
154
+ "<RangeSlider.Root defaultValue={[20, 80]} minStepsBetween={1}>\n <RangeSlider.Track /><RangeSlider.Range />\n <RangeSlider.Thumb index={0} /><RangeSlider.Thumb index={1} />\n</RangeSlider.Root>"
155
+ ]
156
+ }
157
+ }
@@ -0,0 +1,182 @@
1
+ {
2
+ "id": "fileUpload",
3
+ "initial": "idle",
4
+ "events": [
5
+ "DRAG_OVER",
6
+ "DROP_REJECT",
7
+ "RESET",
8
+ "DRAG_LEAVE",
9
+ "DROP_ACCEPT"
10
+ ],
11
+ "tree": {
12
+ "key": "fileUpload",
13
+ "id": "fileUpload",
14
+ "type": "compound",
15
+ "events": [
16
+ "DRAG_OVER",
17
+ "DROP_REJECT",
18
+ "RESET",
19
+ "DRAG_LEAVE",
20
+ "DROP_ACCEPT"
21
+ ],
22
+ "transitions": [],
23
+ "children": [
24
+ {
25
+ "key": "idle",
26
+ "id": "fileUpload.idle",
27
+ "type": "atomic",
28
+ "events": [
29
+ "DRAG_OVER",
30
+ "DROP_REJECT",
31
+ "RESET"
32
+ ],
33
+ "transitions": [
34
+ {
35
+ "event": "DRAG_OVER",
36
+ "target": [
37
+ "dragging"
38
+ ],
39
+ "guarded": false
40
+ },
41
+ {
42
+ "event": "DROP_REJECT",
43
+ "target": [
44
+ "rejected"
45
+ ],
46
+ "guarded": false
47
+ },
48
+ {
49
+ "event": "RESET",
50
+ "target": [
51
+ "idle"
52
+ ],
53
+ "guarded": false
54
+ }
55
+ ],
56
+ "children": []
57
+ },
58
+ {
59
+ "key": "dragging",
60
+ "id": "fileUpload.dragging",
61
+ "type": "atomic",
62
+ "events": [
63
+ "DRAG_OVER",
64
+ "DRAG_LEAVE",
65
+ "DROP_ACCEPT",
66
+ "DROP_REJECT"
67
+ ],
68
+ "transitions": [
69
+ {
70
+ "event": "DRAG_OVER",
71
+ "target": [
72
+ "dragging"
73
+ ],
74
+ "guarded": false
75
+ },
76
+ {
77
+ "event": "DRAG_LEAVE",
78
+ "target": [
79
+ "idle"
80
+ ],
81
+ "guarded": false
82
+ },
83
+ {
84
+ "event": "DROP_ACCEPT",
85
+ "target": [
86
+ "idle"
87
+ ],
88
+ "guarded": false
89
+ },
90
+ {
91
+ "event": "DROP_REJECT",
92
+ "target": [
93
+ "rejected"
94
+ ],
95
+ "guarded": false
96
+ }
97
+ ],
98
+ "children": []
99
+ },
100
+ {
101
+ "key": "rejected",
102
+ "id": "fileUpload.rejected",
103
+ "type": "atomic",
104
+ "events": [
105
+ "DRAG_OVER",
106
+ "DROP_ACCEPT",
107
+ "DROP_REJECT",
108
+ "RESET"
109
+ ],
110
+ "transitions": [
111
+ {
112
+ "event": "DRAG_OVER",
113
+ "target": [
114
+ "dragging"
115
+ ],
116
+ "guarded": false
117
+ },
118
+ {
119
+ "event": "DROP_ACCEPT",
120
+ "target": [
121
+ "idle"
122
+ ],
123
+ "guarded": false
124
+ },
125
+ {
126
+ "event": "DROP_REJECT",
127
+ "target": [
128
+ "rejected"
129
+ ],
130
+ "guarded": false
131
+ },
132
+ {
133
+ "event": "RESET",
134
+ "target": [
135
+ "idle"
136
+ ],
137
+ "guarded": false
138
+ }
139
+ ],
140
+ "children": []
141
+ }
142
+ ]
143
+ },
144
+ "states": {
145
+ "fileUpload": {
146
+ "events": [
147
+ "DRAG_OVER",
148
+ "DROP_REJECT",
149
+ "RESET",
150
+ "DRAG_LEAVE",
151
+ "DROP_ACCEPT"
152
+ ],
153
+ "type": "compound"
154
+ },
155
+ "fileUpload.idle": {
156
+ "events": [
157
+ "DRAG_OVER",
158
+ "DROP_REJECT",
159
+ "RESET"
160
+ ],
161
+ "type": "atomic"
162
+ },
163
+ "fileUpload.dragging": {
164
+ "events": [
165
+ "DRAG_OVER",
166
+ "DRAG_LEAVE",
167
+ "DROP_ACCEPT",
168
+ "DROP_REJECT"
169
+ ],
170
+ "type": "atomic"
171
+ },
172
+ "fileUpload.rejected": {
173
+ "events": [
174
+ "DRAG_OVER",
175
+ "DROP_ACCEPT",
176
+ "DROP_REJECT",
177
+ "RESET"
178
+ ],
179
+ "type": "atomic"
180
+ }
181
+ }
182
+ }