aeon-ui-engine 1.3.5 → 1.5.1
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/CHANGELOG.md +52 -0
- package/CONSUMER.md +67 -27
- package/INTEGRATION.md +1 -1
- package/README.md +17 -8
- package/package.json +4 -1
- package/packages/cli/README.md +13 -1
- package/packages/cli/dist/bin.js +50 -6
- package/packages/cli/dist/chunk-JMNRJCWF.js +301 -0
- package/packages/cli/dist/index.d.ts +31 -1
- package/packages/cli/dist/index.js +7 -3
- package/packages/cli/src/bin.ts +50 -4
- package/packages/cli/src/index.ts +2 -0
- package/packages/cli/src/init.ts +10 -4
- package/packages/cli/src/link.ts +61 -0
- package/packages/cli/src/migrate.ts +170 -0
- package/packages/core/dist/index.d.ts +35 -7
- package/packages/core/dist/index.js +102 -2
- package/packages/core/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/core/src/anatomy.ts +39 -3
- package/packages/core/src/identicon.test.ts +39 -0
- package/packages/core/src/identicon.ts +79 -0
- package/packages/core/src/index.ts +1 -0
- package/packages/panda/panda.config.ts +4 -0
- package/packages/panda/src/recipes/composer.ts +58 -4
- package/packages/panda/src/recipes/file-upload.ts +100 -0
- package/packages/panda/src/recipes/index.ts +2 -0
- package/packages/panda/src/recipes/range-slider.ts +59 -0
- package/packages/panda/src/recipes/thread.ts +77 -2
- package/packages/panda/styled-system/recipes/aeon-composer.d.ts +1 -1
- package/packages/panda/styled-system/recipes/aeon-composer.mjs +12 -0
- package/packages/panda/styled-system/recipes/aeon-file-upload.d.ts +31 -0
- package/packages/panda/styled-system/recipes/aeon-file-upload.mjs +61 -0
- package/packages/panda/styled-system/recipes/aeon-range-slider.d.ts +31 -0
- package/packages/panda/styled-system/recipes/aeon-range-slider.mjs +49 -0
- package/packages/panda/styled-system/recipes/aeon-thread.d.ts +1 -1
- package/packages/panda/styled-system/recipes/aeon-thread.mjs +20 -0
- package/packages/panda/styled-system/recipes/index.d.ts +2 -0
- package/packages/panda/styled-system/recipes/index.mjs +2 -0
- package/packages/panda/styled-system/styles.css +292 -0
- package/packages/primitives/dist/chunk-CV4UXXZF.js +44 -0
- package/packages/primitives/dist/chunk-IZKQSCYU.js +164 -0
- package/packages/primitives/dist/{chunk-PB3LFHXU.js → chunk-VUPWYBGU.js} +14 -0
- package/packages/primitives/dist/index.d.ts +2 -0
- package/packages/primitives/dist/index.js +23 -7
- package/packages/primitives/dist/machines/file-upload.d.ts +39 -0
- package/packages/primitives/dist/machines/file-upload.js +8 -0
- package/packages/primitives/dist/machines/range-slider.d.ts +129 -0
- package/packages/primitives/dist/machines/range-slider.js +12 -0
- package/packages/primitives/dist/machines/slider.d.ts +22 -0
- package/packages/primitives/dist/machines/slider.js +1 -1
- package/packages/primitives/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/primitives/src/__tests__/file-upload.test.ts +25 -0
- package/packages/primitives/src/__tests__/range-slider.test.ts +39 -0
- package/packages/primitives/src/index.ts +2 -0
- package/packages/primitives/src/machines/file-upload.ts +55 -0
- package/packages/primitives/src/machines/range-slider.ts +209 -0
- package/packages/primitives/src/machines/slider.ts +17 -0
- package/packages/react/dist/index.d.ts +132 -26
- package/packages/react/dist/index.js +1822 -1029
- package/packages/react/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/react/src/button/index.tsx +50 -15
- package/packages/react/src/composer/index.tsx +58 -3
- package/packages/react/src/file-upload/index.tsx +322 -0
- package/packages/react/src/floating/FloatingPositioner.tsx +8 -0
- package/packages/react/src/hooks/use-anchor-position.ts +88 -17
- package/packages/react/src/index.ts +3 -0
- package/packages/react/src/menu/index.tsx +37 -3
- package/packages/react/src/popover/index.tsx +7 -1
- package/packages/react/src/prompt/index.tsx +45 -0
- package/packages/react/src/range-slider/index.tsx +322 -0
- package/packages/react/src/slider/index.tsx +54 -14
- package/packages/react/src/thread/index.tsx +74 -3
- package/packages/react/src/tooltip/index.tsx +7 -1
- package/packages/react/src/utils/slot.tsx +47 -0
- package/packages/schemas/dist/index.d.ts +4 -0
- package/packages/schemas/dist/index.js +67 -1
- package/packages/schemas/json/button.json +6 -0
- package/packages/schemas/json/catalog.json +333 -0
- package/packages/schemas/json/fileUpload.json +168 -0
- package/packages/schemas/json/rangeSlider.json +157 -0
- package/packages/schemas/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/schemas/prompts/cursorrules.md +3 -1
- package/packages/schemas/prompts/statecharts.md +1 -1
- package/packages/schemas/registry/catalog.json +18 -0
- package/packages/schemas/registry/components/button.json +6 -0
- package/packages/schemas/registry/components/fileUpload.json +168 -0
- package/packages/schemas/registry/components/rangeSlider.json +157 -0
- package/packages/schemas/registry/machines/fileUpload.json +182 -0
- package/packages/schemas/registry/machines/rangeSlider.json +201 -0
- package/packages/schemas/scripts/emit.ts +4 -0
- package/packages/schemas/src/components.ts +70 -0
- package/packages/schemas/src/prompts.ts +3 -1
- package/packages/schemas/tsconfig.json +1 -1
- package/packages/ui/dist/index.d.ts +100 -46
- package/packages/ui/dist/index.js +463 -341
- package/packages/ui/src/composer.tsx +37 -11
- package/packages/ui/src/file-upload.tsx +36 -0
- package/packages/ui/src/index.ts +2 -0
- package/packages/ui/src/prompt.tsx +3 -0
- package/packages/ui/src/range-slider.tsx +24 -0
- package/packages/ui/src/thread.tsx +40 -0
- package/scripts/link-scoped-packages.mjs +206 -0
- package/scripts/vite-aliases.mjs +6 -8
- package/packages/cli/dist/chunk-IW5NT2Z2.js +0 -103
|
@@ -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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.1.8","results":[[":src/index.test.ts",{"duration":
|
|
1
|
+
{"version":"4.1.8","results":[[":src/index.test.ts",{"duration":5.161209000000014,"failed":false}],[":src/aeon-to-schema.test.ts",{"duration":5.569166999999993,"failed":false}]]}
|
|
@@ -35,7 +35,9 @@ When generating Aeon UI, constrain props/parts/states to @aeon-ui/schemas catalo
|
|
|
35
35
|
Import headless from @aeon-ui/react or styled from @aeon-ui/ui.
|
|
36
36
|
Install: npm install aeon-ui-engine react react-dom xstate @xstate/react
|
|
37
37
|
CSS: import 'aeon-ui-engine/aeon.css'
|
|
38
|
-
|
|
38
|
+
Link: postinstall + npx aeon-ui link (node_modules/@aeon-ui/*)
|
|
39
|
+
Next.js: transpilePackages for @aeon-ui/* + "use client"; Vite plugin optional
|
|
40
|
+
Vue/Solid/Svelte: thin adapters only — React is the full catalog
|
|
39
41
|
|
|
40
42
|
## Async region statechart
|
|
41
43
|
States: idle → loading → (success | empty | failure); REFRESH from success/empty/failure; STALE flag while success.
|
|
@@ -34,7 +34,7 @@ Rule: Hidden input stays in sync with snapshot for forms.
|
|
|
34
34
|
|
|
35
35
|
## Slider statechart
|
|
36
36
|
Machine: sliderMachine — idle | dragging; value/min/max/step in context.
|
|
37
|
-
Events: SET_VALUE, STEP, POINTER_DOWN, POINTER_UP, HOME, END.
|
|
37
|
+
Events: SET_VALUE, STEP, POINTER_DOWN, POINTER_UP, HOME, END, SET_BOUNDS, SET_DISABLED.
|
|
38
38
|
Rule: Disabled blocks SET_VALUE / drag; project idle vs dragging on data-aeon-state.
|
|
39
39
|
|
|
40
40
|
## Content region statechart
|
|
@@ -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
|
+
}
|