@melony/ui-kit 0.1.10 → 0.1.16
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-BDCFD2QU.js → chunk-YQQJGXVQ.js} +3 -3
- package/dist/chunk-YQQJGXVQ.js.map +1 -0
- 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 +3 -3
- package/dist/server.js +1 -1
- package/dist/{types-CcWhFzuN.d.ts → types-CZcmqhkC.d.ts} +4 -2
- package/package.json +1 -1
- package/dist/chunk-BDCFD2QU.js.map +0 -1
|
@@ -22,7 +22,7 @@ var ui = {
|
|
|
22
22
|
col: (props = {}, children = []) => ui.node("col", props, children),
|
|
23
23
|
box: (props = {}, children = []) => ui.node("box", props, children),
|
|
24
24
|
input: (name, label, props = {}) => ui.node("input", { name, label, ...props }),
|
|
25
|
-
textarea: (name,
|
|
25
|
+
textarea: (name, props = {}) => ui.node("textarea", { name, ...props }),
|
|
26
26
|
select: (name, options, label, props = {}) => ui.node("select", { name, options, label, ...props }),
|
|
27
27
|
checkbox: (name, label, props = {}) => ui.node("checkbox", { name, label, ...props }),
|
|
28
28
|
form: (props = {}, children = []) => ui.node("form", props, children),
|
|
@@ -35,5 +35,5 @@ var ui = {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export { ui };
|
|
38
|
-
//# sourceMappingURL=chunk-
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
38
|
+
//# sourceMappingURL=chunk-YQQJGXVQ.js.map
|
|
39
|
+
//# sourceMappingURL=chunk-YQQJGXVQ.js.map
|
|
@@ -0,0 +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,MAC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O,CAAC,KAAA,GAA6B,EAAC,EAAG,QAAA,GAAqB,EAAC,KAC7D,EAAA,CAAG,IAAA,CAAK,OAAA,EAAS,KAAA,EAAO,QAAQ;AACpC","file":"chunk-YQQJGXVQ.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 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};\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-CZcmqhkC.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-CZcmqhkC.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-CZcmqhkC.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-CZcmqhkC.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-CZcmqhkC.js';
|
|
3
3
|
import 'melony';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -21,7 +21,7 @@ declare const ui: {
|
|
|
21
21
|
col: (props?: UIContract["col"], children?: UINode[]) => UINode<"col">;
|
|
22
22
|
box: (props?: UIContract["box"], children?: UINode[]) => UINode<"box">;
|
|
23
23
|
input: (name: string, label?: string, props?: Partial<UIContract["input"]>) => UINode<"input">;
|
|
24
|
-
textarea: (name: string,
|
|
24
|
+
textarea: (name: string, props?: Partial<UIContract["textarea"]>) => UINode<"textarea">;
|
|
25
25
|
select: (name: string, options: UIContract["select"]["options"], label?: string, props?: Partial<UIContract["select"]>) => UINode<"select">;
|
|
26
26
|
checkbox: (name: string, label?: string, props?: Partial<UIContract["checkbox"]>) => UINode<"checkbox">;
|
|
27
27
|
form: (props?: UIContract["form"], children?: UINode[]) => UINode<"form">;
|
package/dist/server.js
CHANGED
|
@@ -124,7 +124,6 @@ interface UIContract {
|
|
|
124
124
|
};
|
|
125
125
|
textarea: {
|
|
126
126
|
name: string;
|
|
127
|
-
label?: string;
|
|
128
127
|
placeholder?: string;
|
|
129
128
|
defaultValue?: string;
|
|
130
129
|
rows?: number;
|
|
@@ -132,6 +131,10 @@ interface UIContract {
|
|
|
132
131
|
disabled?: boolean;
|
|
133
132
|
required?: boolean;
|
|
134
133
|
width?: UIWidth;
|
|
134
|
+
background?: UIColor;
|
|
135
|
+
border?: boolean;
|
|
136
|
+
shadow?: UIShadow;
|
|
137
|
+
radius?: UIRadius;
|
|
135
138
|
};
|
|
136
139
|
select: {
|
|
137
140
|
name: string;
|
|
@@ -199,7 +202,6 @@ interface UIContract {
|
|
|
199
202
|
};
|
|
200
203
|
button: {
|
|
201
204
|
type?: "button" | "submit" | "reset";
|
|
202
|
-
label: string;
|
|
203
205
|
variant?: "primary" | "secondary" | "success" | "danger" | "outline" | "ghost" | "link";
|
|
204
206
|
size?: UISize;
|
|
205
207
|
disabled?: boolean;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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,GA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AAA;AAAA,EAE/C,IAAA,EAAM,CAAC,KAAA,GAA4B,EAAC,EAAG,QAAA,GAAqB,EAAC,KAC3D,EAAA,CAAG,IAAA,CAAK,MAAA,EAAQ,KAAA,EAAO,QAAQ,CAAA;AAAA,EAEjC,IAAA,EAAM,CAAC,IAAA,EAAc,KAAA,GAAqC,EAAC,KACzD,EAAA,CAAG,IAAA,CAAK,MAAA,EAAQ,EAAE,IAAA,EAAM,GAAG,OAAO,CAAA;AAAA,EAEpC,KAAA,EAAO,CAAC,GAAA,EAAa,GAAA,EAAc,QAAsC,EAAC,KACxE,EAAA,CAAG,IAAA,CAAK,SAAS,EAAE,GAAA,EAAK,GAAA,EAAK,GAAG,OAAO,CAAA;AAAA,EAEzC,MAAA,EAAQ,CAAC,KAAA,GAA8B,OACrC,EAAA,CAAG,IAAA,CAAK,UAAU,KAAK,CAAA;AAAA,EAEzB,OAAA,EAAS,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;AACpC","file":"chunk-BDCFD2QU.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 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, label?: string, props: Partial<UIContract[\"textarea\"]> = {}) =>\n ui.node(\"textarea\", { name, label, ...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};\n"]}
|