@melony/ui-kit 0.1.26 → 0.1.28
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/{chunk-X7KTTWFW.js → chunk-3JCAOTZB.js} +2 -2
- package/dist/{chunk-X7KTTWFW.js.map → chunk-3JCAOTZB.js.map} +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.js +1 -1
- package/dist/{types-BZ5194td.d.ts → types-tSkCU6PC.d.ts} +38 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/server.ts"],"names":[],"mappings":";AAOO,IAAM,EAAA,GAAK;AAAA;AAAA;AAAA;AAAA,EAIhB,IAAA,EAAM,CACJ,IAAA,EACA,KAAA,GAAuB,EAAC,EACxB,QAAA,GAA0B,EAAC,MACZ;AAAA,IACf,IAAA;AAAA,IACA,KAAA;AAAA,IACA;AAAA,GACF,CAAA;AAAA;AAAA;AAAA;AAAA,EAKA,KAAA,EAAO,CAAC,IAAA,MAA2B;AAAA,IACjC,IAAA,EAAM,IAAA;AAAA,IACN,IAAA,EAAM;AAAA,GACR,CAAA;AAAA,EAEA,MAAA,EAAQ,CAAC,KAAA,EAA6B,QAAA,GAAqB,OACzD,EAAA,CAAG,IAAA,CAAK,QAAA,EAAU,KAAA,EAAO,QAAQ,CAAA;AAAA,EAEnC,IAAA,EAAM,CAAC,KAAA,EAAe,KAAA,GAAqC,EAAC,KAC1D,EAAA,CAAG,IAAA,CAAK,MAAA,EAAQ,EAAE,KAAA,EAAO,GAAG,OAAO,CAAA;AAAA,EAErC,QAAA,EAAU,CAAC,KAAA,EAAe,KAAA,GAAyC,EAAC,KAClE,EAAA,CAAG,IAAA,CAAK,UAAA,EAAY,EAAE,KAAA,EAAO,GAAG,OAAO,CAAA;AAAA,EAEzC,SAAS,CAAC,KAAA,EAAe,KAA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,CAAC,KAAA,GAA+B,OACvC,EAAA,CAAG,IAAA,CAAK,WAAW,KAAK,CAAA;AAAA,EAE1B,OAAA,EAAS,CAAC,KAAA,GAA+B,EAAC,EAAG,QAAA,GAAqB,EAAC,KACjE,EAAA,CAAG,IAAA,CAAK,SAAA,EAAW,KAAA,EAAO,QAAQ,CAAA;AAAA,EAEpC,KAAA,EAAO,CAAC,KAAA,GAA6B,EAAC,EAAG,QAAA,GAAqB,EAAC,KAC7D,EAAA,CAAG,IAAA,CAAK,OAAA,EAAS,KAAA,EAAO,QAAQ,CAAA;AAAA,EAClC,MAAA,EAAQ,CAAC,KAAA,GAA8B,EAAC,EAAG,QAAA,GAAqB,EAAC,KAC/D,EAAA,CAAG,IAAA,CAAK,QAAA,EAAU,KAAA,EAAO,QAAQ,CAAA;AAAA,EACnC,aAAA,EAAe,CAAC,SAAA,EAAmB,KAAA,GAA8C,EAAC,KAChF,EAAA,CAAG,IAAA,CAAK,eAAA,EAAiB,EAAE,SAAA,EAAW,GAAG,OAAO;AACpD","file":"chunk-3JCAOTZB.js","sourcesContent":["import { UIContract, UINode, UIEvent } from \"./types\";\n\nexport * from \"./types\";\n\n/**\n * Helper to create UI events in Melony actions.\n */\nexport const ui = {\n /**\n * Creates a UI node.\n */\n node: <T extends keyof UIContract>(\n type: T,\n props: UIContract[T] = {} as any,\n children: UINode<any>[] = []\n ): UINode<T> => ({\n type,\n props,\n children,\n }),\n\n /**\n * Wraps a UI node in an event.\n */\n event: (node: UINode): UIEvent => ({\n type: \"ui\",\n data: node,\n }),\n\n button: (props: UIContract[\"button\"], children: UINode[] = []) =>\n ui.node(\"button\", props, children),\n\n text: (value: string, props: Partial<UIContract[\"text\"]> = {}) =>\n ui.node(\"text\", { value, ...props }),\n\n markdown: (value: string, props: Partial<UIContract[\"markdown\"]> = {}) =>\n ui.node(\"markdown\", { value, ...props }),\n\n heading: (value: string, level: UIContract[\"heading\"][\"level\"] = 1, props: Partial<UIContract[\"heading\"]> = {}) =>\n ui.node(\"heading\", { value, level, ...props }),\n\n row: (props: UIContract[\"row\"] = {}, children: UINode[] = []) =>\n ui.node(\"row\", props, children),\n\n col: (props: UIContract[\"col\"] = {}, children: UINode[] = []) =>\n ui.node(\"col\", props, children),\n\n box: (props: UIContract[\"box\"] = {}, children: UINode[] = []) =>\n ui.node(\"box\", props, children),\n\n input: (name: string, label?: string, props: Partial<UIContract[\"input\"]> = {}) =>\n ui.node(\"input\", { name, label, ...props }),\n\n textarea: (name: string, props: Partial<UIContract[\"textarea\"]> = {}) =>\n ui.node(\"textarea\", { name, ...props }),\n\n select: (name: string, options: UIContract[\"select\"][\"options\"], label?: string, props: Partial<UIContract[\"select\"]> = {}) =>\n ui.node(\"select\", { name, options, label, ...props }),\n\n checkbox: (name: string, label?: string, props: Partial<UIContract[\"checkbox\"]> = {}) =>\n ui.node(\"checkbox\", { name, label, ...props }),\n\n form: (props: UIContract[\"form\"] = {}, children: UINode[] = []) =>\n ui.node(\"form\", props, children),\n\n icon: (name: string, props: Partial<UIContract[\"icon\"]> = {}) =>\n ui.node(\"icon\", { name, ...props }),\n\n image: (src: string, alt?: string, props: Partial<UIContract[\"image\"]> = {}) =>\n ui.node(\"image\", { src, alt, ...props }),\n\n spacer: (props: UIContract[\"spacer\"] = {}) =>\n ui.node(\"spacer\", props),\n\n divider: (props: UIContract[\"divider\"] = {}) =>\n ui.node(\"divider\", props),\n\n popover: (props: UIContract[\"popover\"] = {}, children: UINode[] = []) =>\n ui.node(\"popover\", props, children),\n\n float: (props: UIContract[\"float\"] = {}, children: UINode[] = []) =>\n ui.node(\"float\", props, children),\n sticky: (props: UIContract[\"sticky\"] = {}, children: UINode[] = []) =>\n ui.node(\"sticky\", props, children),\n streamingText: (eventType: string, props: Partial<UIContract[\"streamingText\"]> = {}) =>\n ui.node(\"streamingText\", { eventType, ...props }),\n};\n"]}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as UIContract, k as UINode } from './types-
|
|
2
|
-
export { a as UIAlign, e as UIColor, l as UIEvent, b as UIJustify, d as UIOrientation, i as UIRadius, h as UIShadow, U as UISize, f as UISpacing, g as UIWidth, c as UIWrap } from './types-
|
|
1
|
+
import { j as UIContract, k as UINode } from './types-tSkCU6PC.js';
|
|
2
|
+
export { a as UIAlign, e as UIColor, l as UIEvent, b as UIJustify, d as UIOrientation, i as UIRadius, h as UIShadow, U as UISize, f as UISpacing, g as UIWidth, c as UIWrap } from './types-tSkCU6PC.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React, { ReactNode } from 'react';
|
|
5
5
|
import 'melony';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ui } from './server.js';
|
|
2
|
-
export { a as UIAlign, e as UIColor, j as UIContract, l as UIEvent, b as UIJustify, k as UINode, d as UIOrientation, i as UIRadius, h as UIShadow, U as UISize, f as UISpacing, g as UIWidth, c as UIWrap } from './types-
|
|
2
|
+
export { a as UIAlign, e as UIColor, j as UIContract, l as UIEvent, b as UIJustify, k as UINode, d as UIOrientation, i as UIRadius, h as UIShadow, U as UISize, f as UISpacing, g as UIWidth, c as UIWrap } from './types-tSkCU6PC.js';
|
|
3
3
|
export { MelonyComponents, MelonyRenderer, MelonyRendererProps, MelonyUIContextValue, MelonyUIProvider, MelonyUIProviderProps, useMelonyUI } from './client.js';
|
|
4
4
|
import 'melony';
|
|
5
5
|
import 'react/jsx-runtime';
|
package/dist/index.js
CHANGED
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as UIContract, k as UINode, l as UIEvent } from './types-
|
|
2
|
-
export { a as UIAlign, e as UIColor, b as UIJustify, d as UIOrientation, i as UIRadius, h as UIShadow, U as UISize, f as UISpacing, g as UIWidth, c as UIWrap } from './types-
|
|
1
|
+
import { j as UIContract, k as UINode, l as UIEvent } from './types-tSkCU6PC.js';
|
|
2
|
+
export { a as UIAlign, e as UIColor, b as UIJustify, d as UIOrientation, i as UIRadius, h as UIShadow, U as UISize, f as UISpacing, g as UIWidth, c as UIWrap } from './types-tSkCU6PC.js';
|
|
3
3
|
import 'melony';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/server.js
CHANGED
|
@@ -16,6 +16,7 @@ type UIRadius = "none" | "sm" | "md" | "lg" | "full" | (string & {});
|
|
|
16
16
|
*/
|
|
17
17
|
interface UIContract {
|
|
18
18
|
row: {
|
|
19
|
+
id?: string;
|
|
19
20
|
align?: UIAlign;
|
|
20
21
|
justify?: UIJustify;
|
|
21
22
|
wrap?: UIWrap;
|
|
@@ -28,6 +29,7 @@ interface UIContract {
|
|
|
28
29
|
overflow?: "hidden" | "visible" | "scroll" | "auto";
|
|
29
30
|
};
|
|
30
31
|
col: {
|
|
32
|
+
id?: string;
|
|
31
33
|
align?: UIAlign;
|
|
32
34
|
justify?: UIJustify;
|
|
33
35
|
gap?: UISpacing;
|
|
@@ -39,9 +41,10 @@ interface UIContract {
|
|
|
39
41
|
group?: boolean;
|
|
40
42
|
flex?: number;
|
|
41
43
|
overflow?: "hidden" | "visible" | "scroll" | "auto";
|
|
42
|
-
maxWidth?: number;
|
|
44
|
+
maxWidth?: number | string;
|
|
43
45
|
};
|
|
44
46
|
box: {
|
|
47
|
+
id?: string;
|
|
45
48
|
padding?: UISpacing;
|
|
46
49
|
paddingVertical?: UISpacing;
|
|
47
50
|
paddingHorizontal?: UISpacing;
|
|
@@ -53,7 +56,7 @@ interface UIContract {
|
|
|
53
56
|
borderColor?: UIColor;
|
|
54
57
|
radius?: UIRadius;
|
|
55
58
|
width?: UIWidth;
|
|
56
|
-
maxWidth?: number;
|
|
59
|
+
maxWidth?: number | string;
|
|
57
60
|
height?: "auto" | "full";
|
|
58
61
|
shadow?: UIShadow;
|
|
59
62
|
group?: boolean;
|
|
@@ -62,15 +65,18 @@ interface UIContract {
|
|
|
62
65
|
onClickAction?: Event;
|
|
63
66
|
};
|
|
64
67
|
spacer: {
|
|
68
|
+
id?: string;
|
|
65
69
|
size?: UISpacing;
|
|
66
70
|
direction?: UIOrientation;
|
|
67
71
|
};
|
|
68
72
|
divider: {
|
|
73
|
+
id?: string;
|
|
69
74
|
orientation?: UIOrientation;
|
|
70
75
|
color?: UIColor;
|
|
71
76
|
margin?: UISpacing;
|
|
72
77
|
};
|
|
73
78
|
text: {
|
|
79
|
+
id?: string;
|
|
74
80
|
value: string;
|
|
75
81
|
size?: UISpacing;
|
|
76
82
|
weight?: "normal" | "medium" | "semibold" | "bold";
|
|
@@ -79,12 +85,14 @@ interface UIContract {
|
|
|
79
85
|
className?: string;
|
|
80
86
|
};
|
|
81
87
|
heading: {
|
|
88
|
+
id?: string;
|
|
82
89
|
value: string;
|
|
83
90
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
84
91
|
color?: UIColor;
|
|
85
92
|
align?: UIAlign;
|
|
86
93
|
};
|
|
87
94
|
markdown: {
|
|
95
|
+
id?: string;
|
|
88
96
|
value: string;
|
|
89
97
|
size?: UISpacing;
|
|
90
98
|
color?: UIColor;
|
|
@@ -92,6 +100,7 @@ interface UIContract {
|
|
|
92
100
|
className?: string;
|
|
93
101
|
};
|
|
94
102
|
image: {
|
|
103
|
+
id?: string;
|
|
95
104
|
src: string;
|
|
96
105
|
alt?: string;
|
|
97
106
|
width?: UIWidth;
|
|
@@ -100,6 +109,7 @@ interface UIContract {
|
|
|
100
109
|
objectFit?: "cover" | "contain" | "fill";
|
|
101
110
|
};
|
|
102
111
|
video: {
|
|
112
|
+
id?: string;
|
|
103
113
|
src: string;
|
|
104
114
|
poster?: string;
|
|
105
115
|
autoPlay?: boolean;
|
|
@@ -112,15 +122,18 @@ interface UIContract {
|
|
|
112
122
|
radius?: UIRadius;
|
|
113
123
|
};
|
|
114
124
|
icon: {
|
|
125
|
+
id?: string;
|
|
115
126
|
name: string;
|
|
116
127
|
size?: UISize | number;
|
|
117
128
|
color?: UIColor;
|
|
118
129
|
};
|
|
119
130
|
form: {
|
|
131
|
+
id?: string;
|
|
120
132
|
onSubmitAction?: Event | ((data: any) => Event);
|
|
121
133
|
gap?: UISpacing;
|
|
122
134
|
};
|
|
123
135
|
input: {
|
|
136
|
+
id?: string;
|
|
124
137
|
name: string;
|
|
125
138
|
label?: string;
|
|
126
139
|
placeholder?: string;
|
|
@@ -132,11 +145,14 @@ interface UIContract {
|
|
|
132
145
|
width?: UIWidth;
|
|
133
146
|
};
|
|
134
147
|
textarea: {
|
|
148
|
+
id?: string;
|
|
135
149
|
name: string;
|
|
136
150
|
placeholder?: string;
|
|
137
151
|
defaultValue?: string;
|
|
138
152
|
rows?: number;
|
|
139
153
|
onChangeAction?: Event;
|
|
154
|
+
onSubmitAction?: Event;
|
|
155
|
+
submitOnEnter?: boolean;
|
|
140
156
|
disabled?: boolean;
|
|
141
157
|
required?: boolean;
|
|
142
158
|
width?: UIWidth;
|
|
@@ -146,6 +162,7 @@ interface UIContract {
|
|
|
146
162
|
radius?: UIRadius;
|
|
147
163
|
};
|
|
148
164
|
select: {
|
|
165
|
+
id?: string;
|
|
149
166
|
name: string;
|
|
150
167
|
label?: string;
|
|
151
168
|
options: Array<{
|
|
@@ -160,6 +177,7 @@ interface UIContract {
|
|
|
160
177
|
width?: UIWidth;
|
|
161
178
|
};
|
|
162
179
|
checkbox: {
|
|
180
|
+
id?: string;
|
|
163
181
|
name: string;
|
|
164
182
|
label?: string;
|
|
165
183
|
checked?: boolean;
|
|
@@ -167,10 +185,12 @@ interface UIContract {
|
|
|
167
185
|
disabled?: boolean;
|
|
168
186
|
};
|
|
169
187
|
hidden: {
|
|
188
|
+
id?: string;
|
|
170
189
|
name: string;
|
|
171
190
|
value: string;
|
|
172
191
|
};
|
|
173
192
|
radioGroup: {
|
|
193
|
+
id?: string;
|
|
174
194
|
name: string;
|
|
175
195
|
options: Array<{
|
|
176
196
|
label: string;
|
|
@@ -184,6 +204,7 @@ interface UIContract {
|
|
|
184
204
|
disabled?: boolean;
|
|
185
205
|
};
|
|
186
206
|
label: {
|
|
207
|
+
id?: string;
|
|
187
208
|
value: string;
|
|
188
209
|
htmlFor?: string;
|
|
189
210
|
required?: boolean;
|
|
@@ -191,6 +212,7 @@ interface UIContract {
|
|
|
191
212
|
color?: UIColor;
|
|
192
213
|
};
|
|
193
214
|
colorPicker: {
|
|
215
|
+
id?: string;
|
|
194
216
|
name: string;
|
|
195
217
|
label?: string;
|
|
196
218
|
defaultValue?: string;
|
|
@@ -198,6 +220,7 @@ interface UIContract {
|
|
|
198
220
|
disabled?: boolean;
|
|
199
221
|
};
|
|
200
222
|
upload: {
|
|
223
|
+
id?: string;
|
|
201
224
|
label?: string;
|
|
202
225
|
multiple?: boolean;
|
|
203
226
|
accept?: string;
|
|
@@ -210,6 +233,7 @@ interface UIContract {
|
|
|
210
233
|
disabled?: boolean;
|
|
211
234
|
};
|
|
212
235
|
button: {
|
|
236
|
+
id?: string;
|
|
213
237
|
type?: "button" | "submit" | "reset";
|
|
214
238
|
variant?: "primary" | "secondary" | "success" | "danger" | "outline" | "ghost" | "link";
|
|
215
239
|
size?: UISize;
|
|
@@ -220,6 +244,7 @@ interface UIContract {
|
|
|
220
244
|
truncate?: boolean;
|
|
221
245
|
};
|
|
222
246
|
popover: {
|
|
247
|
+
id?: string;
|
|
223
248
|
side?: "top" | "right" | "bottom" | "left";
|
|
224
249
|
align?: "start" | "center" | "end";
|
|
225
250
|
sideOffset?: number;
|
|
@@ -228,12 +253,14 @@ interface UIContract {
|
|
|
228
253
|
trigger?: UINode;
|
|
229
254
|
};
|
|
230
255
|
float: {
|
|
256
|
+
id?: string;
|
|
231
257
|
position?: "top-left" | "top-right" | "top-center" | "bottom-left" | "bottom-right" | "bottom-center" | "center" | "left-center" | "right-center";
|
|
232
258
|
offsetX?: UISpacing;
|
|
233
259
|
offsetY?: UISpacing;
|
|
234
260
|
showOnHover?: boolean;
|
|
235
261
|
};
|
|
236
262
|
sticky: {
|
|
263
|
+
id?: string;
|
|
237
264
|
top?: UISpacing | number;
|
|
238
265
|
bottom?: UISpacing | number;
|
|
239
266
|
left?: UISpacing | number;
|
|
@@ -242,9 +269,10 @@ interface UIContract {
|
|
|
242
269
|
background?: UIColor;
|
|
243
270
|
padding?: UISpacing;
|
|
244
271
|
width?: UIWidth;
|
|
245
|
-
maxWidth?: number;
|
|
272
|
+
maxWidth?: number | string;
|
|
246
273
|
};
|
|
247
274
|
streamingText: {
|
|
275
|
+
id?: string;
|
|
248
276
|
eventType: string;
|
|
249
277
|
size?: UISpacing;
|
|
250
278
|
weight?: "normal" | "medium" | "semibold" | "bold";
|
|
@@ -254,11 +282,13 @@ interface UIContract {
|
|
|
254
282
|
markdown?: boolean;
|
|
255
283
|
};
|
|
256
284
|
badge: {
|
|
285
|
+
id?: string;
|
|
257
286
|
label: string;
|
|
258
287
|
variant?: "primary" | "secondary" | "danger" | "success" | "warning" | "outline";
|
|
259
288
|
size?: UISize;
|
|
260
289
|
};
|
|
261
290
|
card: {
|
|
291
|
+
id?: string;
|
|
262
292
|
title?: string;
|
|
263
293
|
subtitle?: string;
|
|
264
294
|
background?: UIColor;
|
|
@@ -267,6 +297,7 @@ interface UIContract {
|
|
|
267
297
|
shadow?: UIShadow;
|
|
268
298
|
};
|
|
269
299
|
chart: {
|
|
300
|
+
id?: string;
|
|
270
301
|
data: Array<{
|
|
271
302
|
label: string;
|
|
272
303
|
value: number;
|
|
@@ -280,6 +311,7 @@ interface UIContract {
|
|
|
280
311
|
showTooltips?: boolean;
|
|
281
312
|
};
|
|
282
313
|
dropdown: {
|
|
314
|
+
id?: string;
|
|
283
315
|
items?: Array<{
|
|
284
316
|
label: string;
|
|
285
317
|
icon?: string;
|
|
@@ -287,11 +319,13 @@ interface UIContract {
|
|
|
287
319
|
}>;
|
|
288
320
|
};
|
|
289
321
|
list: {
|
|
322
|
+
id?: string;
|
|
290
323
|
padding?: UISpacing;
|
|
291
324
|
gap?: UISpacing;
|
|
292
325
|
width?: UIWidth;
|
|
293
326
|
};
|
|
294
327
|
listItem: {
|
|
328
|
+
id?: string;
|
|
295
329
|
onClickAction?: Event;
|
|
296
330
|
gap?: UISpacing;
|
|
297
331
|
padding?: UISpacing;
|
|
@@ -301,6 +335,7 @@ interface UIContract {
|
|
|
301
335
|
truncate?: boolean;
|
|
302
336
|
};
|
|
303
337
|
thread: {
|
|
338
|
+
id?: string;
|
|
304
339
|
placeholder?: string;
|
|
305
340
|
messages?: Array<{
|
|
306
341
|
role: string;
|