@assistant-wi/core 0.0.5 → 0.0.7
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/{index-Dbt2oV4y.js → index-CFIfaRxl.js} +11 -11
- package/dist/index-du_6NCi7.cjs +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.es.js +1 -1
- package/dist/ui/ui-block.d.ts +3 -3
- package/dist/ui/ui-form.d.ts +1 -1
- package/package.json +1 -2
- package/dist/index-Oe1iY2v9.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function a(e, o, t) {
|
|
2
2
|
const n = {};
|
|
3
|
-
return c(n, e, o),
|
|
3
|
+
return c(n, e, o), s(n, e), l(n, e, t), n;
|
|
4
4
|
}
|
|
5
5
|
function c(e, o, t) {
|
|
6
6
|
for (const n of t)
|
|
@@ -11,7 +11,7 @@ function c(e, o, t) {
|
|
|
11
11
|
configurable: !1
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function l(e, o, t) {
|
|
15
15
|
if (!t) return;
|
|
16
16
|
const n = t(o);
|
|
17
17
|
for (const r of Object.keys(n))
|
|
@@ -22,7 +22,7 @@ function s(e, o, t) {
|
|
|
22
22
|
configurable: !1
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function s(e, o) {
|
|
26
26
|
Object.defineProperty(e, "build", {
|
|
27
27
|
value: () => o,
|
|
28
28
|
enumerable: !1,
|
|
@@ -30,7 +30,7 @@ function l(e, o) {
|
|
|
30
30
|
configurable: !1
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
function i(e) {
|
|
33
|
+
function i(...e) {
|
|
34
34
|
return a({ type: "block", nodes: e ?? [] }, ["direction", "gap", "nodes"], (t) => ({
|
|
35
35
|
row() {
|
|
36
36
|
t.direction = "row";
|
|
@@ -43,11 +43,11 @@ function i(e) {
|
|
|
43
43
|
}
|
|
44
44
|
}));
|
|
45
45
|
}
|
|
46
|
-
function d(e) {
|
|
47
|
-
return i(e).row();
|
|
46
|
+
function d(...e) {
|
|
47
|
+
return i(...e).row();
|
|
48
48
|
}
|
|
49
|
-
function f(e) {
|
|
50
|
-
return i(e).col();
|
|
49
|
+
function f(...e) {
|
|
50
|
+
return i(...e).col();
|
|
51
51
|
}
|
|
52
52
|
function b(e) {
|
|
53
53
|
return a({
|
|
@@ -71,11 +71,11 @@ function b(e) {
|
|
|
71
71
|
}
|
|
72
72
|
}));
|
|
73
73
|
}
|
|
74
|
-
function p(e) {
|
|
75
|
-
return a(
|
|
74
|
+
function p(...e) {
|
|
75
|
+
return console.log("nodes", e), a(
|
|
76
76
|
{
|
|
77
77
|
type: "form",
|
|
78
|
-
nodes: e
|
|
78
|
+
nodes: e,
|
|
79
79
|
submitTitle: "Submit"
|
|
80
80
|
},
|
|
81
81
|
["title", "description", "submitTitle", "onSubmit"],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function a(t,o,e){const n={};return b(n,t,o),y(n,t),p(n,t,e),n}function b(t,o,e){for(const n of e)Object.defineProperty(t,n,{value:r=>(o[n]=r,t),enumerable:!1,writable:!1,configurable:!1})}function p(t,o,e){if(!e)return;const n=e(o);for(const r of Object.keys(n))Object.defineProperty(t,r,{value:(...f)=>(n[r]?.(...f),t),enumerable:!1,writable:!1,configurable:!1})}function y(t,o){Object.defineProperty(t,"build",{value:()=>o,enumerable:!1,writable:!1,configurable:!1})}function i(...t){return a({type:"block",nodes:t??[]},["direction","gap","nodes"],e=>({row(){e.direction="row"},col(){e.direction="col"},addNode(n){e.nodes.push(n)}}))}function u(...t){return i(...t).row()}function c(...t){return i(...t).col()}function l(t){return a({type:"button",text:t},["text","variant","onClick"],e=>({primary(){e.variant="primary"},secondary(){e.variant="secondary"},outline(){e.variant="outline"},ghost(){e.variant="ghost"},destructive(){e.variant="destructive"}}))}function d(...t){return console.log("nodes",t),a({type:"form",nodes:t,submitTitle:"Submit"},["title","description","submitTitle","onSubmit"],e=>({addNode(n){e.nodes.push(n)}}))}function s(t){return{type:"text",text:t}}const m=Object.freeze(Object.defineProperty({__proto__:null,block:i,button:l,col:c,form:d,row:u,text:s},Symbol.toStringTag,{value:"Module"}));exports.block=i;exports.button=l;exports.col=c;exports.form=d;exports.index=m;exports.row=u;exports.text=s;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DMcbwFzr.cjs"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DMcbwFzr.cjs"),i=require("./index-du_6NCi7.cjs");exports.tool=e.index;exports.ui=i.index;
|
package/dist/index.es.js
CHANGED
package/dist/ui/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../index-du_6NCi7.cjs");exports.block=o.block;exports.button=o.button;exports.col=o.col;exports.form=o.form;exports.row=o.row;exports.text=o.text;
|
package/dist/ui/index.es.js
CHANGED
package/dist/ui/ui-block.d.ts
CHANGED
|
@@ -5,17 +5,17 @@ export interface UIBlock {
|
|
|
5
5
|
direction?: 'row' | 'col' | undefined;
|
|
6
6
|
gap?: number | undefined;
|
|
7
7
|
}
|
|
8
|
-
export declare function block(nodes
|
|
8
|
+
export declare function block(...nodes: UI[]): import('./builder').Builder<UIBlock, ("direction" | "gap" | "nodes")[], {
|
|
9
9
|
row(): void;
|
|
10
10
|
col(): void;
|
|
11
11
|
addNode(node: UI): void;
|
|
12
12
|
}>;
|
|
13
|
-
export declare function row(nodes
|
|
13
|
+
export declare function row(...nodes: UI[]): import('./builder').Builder<UIBlock, ("direction" | "gap" | "nodes")[], {
|
|
14
14
|
row(): void;
|
|
15
15
|
col(): void;
|
|
16
16
|
addNode(node: UI): void;
|
|
17
17
|
}>;
|
|
18
|
-
export declare function col(nodes
|
|
18
|
+
export declare function col(...nodes: UI[]): import('./builder').Builder<UIBlock, ("direction" | "gap" | "nodes")[], {
|
|
19
19
|
row(): void;
|
|
20
20
|
col(): void;
|
|
21
21
|
addNode(node: UI): void;
|
package/dist/ui/ui-form.d.ts
CHANGED
|
@@ -15,6 +15,6 @@ export interface UIFormNode {
|
|
|
15
15
|
value?: string;
|
|
16
16
|
onChange?: (value: string) => void;
|
|
17
17
|
}
|
|
18
|
-
export declare function form(nodes
|
|
18
|
+
export declare function form(...nodes: UIFormNode[]): import('./builder').Builder<UIForm, ("title" | "description" | "submitTitle" | "onSubmit")[], {
|
|
19
19
|
addNode(node: UIFormNode): void;
|
|
20
20
|
}>;
|
package/package.json
CHANGED
package/dist/index-Oe1iY2v9.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function a(t,o,e){const n={};return b(n,t,o),y(n,t),p(n,t,e),n}function b(t,o,e){for(const n of e)Object.defineProperty(t,n,{value:r=>(o[n]=r,t),enumerable:!1,writable:!1,configurable:!1})}function p(t,o,e){if(!e)return;const n=e(o);for(const r of Object.keys(n))Object.defineProperty(t,r,{value:(...f)=>(n[r]?.(...f),t),enumerable:!1,writable:!1,configurable:!1})}function y(t,o){Object.defineProperty(t,"build",{value:()=>o,enumerable:!1,writable:!1,configurable:!1})}function i(t){return a({type:"block",nodes:t??[]},["direction","gap","nodes"],e=>({row(){e.direction="row"},col(){e.direction="col"},addNode(n){e.nodes.push(n)}}))}function u(t){return i(t).row()}function c(t){return i(t).col()}function l(t){return a({type:"button",text:t},["text","variant","onClick"],e=>({primary(){e.variant="primary"},secondary(){e.variant="secondary"},outline(){e.variant="outline"},ghost(){e.variant="ghost"},destructive(){e.variant="destructive"}}))}function d(t){return a({type:"form",nodes:t??[],submitTitle:"Submit"},["title","description","submitTitle","onSubmit"],e=>({addNode(n){e.nodes.push(n)}}))}function s(t){return{type:"text",text:t}}const m=Object.freeze(Object.defineProperty({__proto__:null,block:i,button:l,col:c,form:d,row:u,text:s},Symbol.toStringTag,{value:"Module"}));exports.block=i;exports.button=l;exports.col=c;exports.form=d;exports.index=m;exports.row=u;exports.text=s;
|