@assistant-wi/core 0.0.10 → 0.0.11
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-KeJx8f_d.mjs → index-CmnEBvxT.mjs} +10 -10
- package/dist/index-Iczub9lN.js +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-error.d.ts +5 -0
- package/dist/ui/ui-error.test.d.ts +1 -0
- package/dist/ui/ui-text.d.ts +1 -1
- package/package.json +1 -1
- package/dist/index-CuC3Zv7t.js +0 -1
|
@@ -30,7 +30,7 @@ function p(t, n) {
|
|
|
30
30
|
configurable: !1
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function c(...t) {
|
|
34
34
|
return i(
|
|
35
35
|
{
|
|
36
36
|
type: "block",
|
|
@@ -54,10 +54,10 @@ function u(...t) {
|
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
function b(...t) {
|
|
57
|
-
return
|
|
57
|
+
return c(...t).row();
|
|
58
58
|
}
|
|
59
59
|
function g(...t) {
|
|
60
|
-
return
|
|
60
|
+
return c(...t).col();
|
|
61
61
|
}
|
|
62
62
|
function y(t) {
|
|
63
63
|
return i({
|
|
@@ -105,13 +105,13 @@ function v(t) {
|
|
|
105
105
|
const r = Math.max(1, Math.floor(o || 0)), s = Math.ceil(a.length / r);
|
|
106
106
|
e.totalPages = s, e.pagination = (l) => {
|
|
107
107
|
if (s === 0) return { items: [], hasMore: !1 };
|
|
108
|
-
const d = Math.max(1, Math.floor(l || 0)),
|
|
108
|
+
const d = Math.max(1, Math.floor(l || 0)), u = Math.min(d, s);
|
|
109
109
|
return {
|
|
110
110
|
items: a.slice(
|
|
111
|
-
(
|
|
112
|
-
|
|
111
|
+
(u - 1) * r,
|
|
112
|
+
u * r
|
|
113
113
|
),
|
|
114
|
-
hasMore:
|
|
114
|
+
hasMore: u < s
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
117
|
}
|
|
@@ -122,7 +122,7 @@ function w(t) {
|
|
|
122
122
|
{
|
|
123
123
|
type: "text",
|
|
124
124
|
text: t,
|
|
125
|
-
animation:
|
|
125
|
+
animation: null,
|
|
126
126
|
color: "primary",
|
|
127
127
|
weight: "normal",
|
|
128
128
|
size: "md"
|
|
@@ -146,7 +146,7 @@ function w(t) {
|
|
|
146
146
|
}
|
|
147
147
|
const P = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
148
148
|
__proto__: null,
|
|
149
|
-
block:
|
|
149
|
+
block: c,
|
|
150
150
|
button: y,
|
|
151
151
|
col: g,
|
|
152
152
|
form: h,
|
|
@@ -156,7 +156,7 @@ const P = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
156
156
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
157
157
|
export {
|
|
158
158
|
y as a,
|
|
159
|
-
|
|
159
|
+
c as b,
|
|
160
160
|
g as c,
|
|
161
161
|
h as f,
|
|
162
162
|
P as i,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(t,a,e){const n={};return h(n,t,a),w(n,t),v(n,t,e),n}function h(t,a,e){for(const n of e)Object.defineProperty(t,n,{value:o=>(a[n]=o,t),enumerable:!1,writable:!1,configurable:!1})}function v(t,a,e){if(!e)return;const n=e(a);for(const o of Object.keys(n))Object.defineProperty(t,o,{value:(...r)=>(n[o]?.(...r),t),enumerable:!1,writable:!1,configurable:!1})}function w(t,a){Object.defineProperty(t,"build",{value:()=>a,enumerable:!1,writable:!1,configurable:!1})}function c(...t){return i({type:"block",nodes:t,width:"auto",align:"start",justify:"start"},["direction","gap","nodes","width","align","justify"],e=>({row(){e.direction="row"},col(){e.direction="col"},addNode(n){e.nodes.push(n)}}))}function l(...t){return c(...t).row()}function d(...t){return c(...t).col()}function f(t){return i({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 m(...t){return i({type:"form",nodes:t,submitTitle:"Submit"},["title","description","submitTitle","onSubmit","nodes"],e=>({addNode(n){e.nodes.push(n)}}))}function p(t){return i({type:"list",pagination:t??(()=>({items:[],hasMore:!1}))},["pagination","title","totalPages"],e=>({staticPagination(n,o){const r=Math.max(1,Math.floor(o||0)),u=Math.ceil(n.length/r);e.totalPages=u,e.pagination=g=>{if(u===0)return{items:[],hasMore:!1};const y=Math.max(1,Math.floor(g||0)),s=Math.min(y,u);return{items:n.slice((s-1)*r,s*r),hasMore:s<u}}}}))}function b(t){return i({type:"text",text:t,animation:null,color:"primary",weight:"normal",size:"md"},["text","color","weight","size","animation"],e=>({primary(){e.color="primary"},muted(){e.color="muted"},shimmering(n={}){e.animation={type:"shimmering",...n}}}))}const P=Object.freeze(Object.defineProperty({__proto__:null,block:c,button:f,col:d,form:m,list:p,row:l,text:b},Symbol.toStringTag,{value:"Module"}));exports.block=c;exports.button=f;exports.col=d;exports.form=m;exports.index=P;exports.list=p;exports.row=l;exports.text=b;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DMcbwFzr.js"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DMcbwFzr.js"),i=require("./index-Iczub9lN.js");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 t=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../index-Iczub9lN.js");exports.block=t.block;exports.button=t.button;exports.col=t.col;exports.form=t.form;exports.list=t.list;exports.row=t.row;exports.text=t.text;
|
package/dist/ui/index.es.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/ui/ui-text.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface UIText {
|
|
|
4
4
|
color?: 'primary' | 'muted';
|
|
5
5
|
weight?: 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold';
|
|
6
6
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
7
|
-
animation?:
|
|
7
|
+
animation?: null | UITextAnimationShimmering;
|
|
8
8
|
}
|
|
9
9
|
export type UITextAnimationShimmering = {
|
|
10
10
|
type: 'shimmering';
|
package/package.json
CHANGED
package/dist/index-CuC3Zv7t.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function i(t,o,e){const n={};return h(n,t,o),w(n,t),v(n,t,e),n}function h(t,o,e){for(const n of e)Object.defineProperty(t,n,{value:a=>(o[n]=a,t),enumerable:!1,writable:!1,configurable:!1})}function v(t,o,e){if(!e)return;const n=e(o);for(const a of Object.keys(n))Object.defineProperty(t,a,{value:(...r)=>(n[a]?.(...r),t),enumerable:!1,writable:!1,configurable:!1})}function w(t,o){Object.defineProperty(t,"build",{value:()=>o,enumerable:!1,writable:!1,configurable:!1})}function s(...t){return i({type:"block",nodes:t,width:"auto",align:"start",justify:"start"},["direction","gap","nodes","width","align","justify"],e=>({row(){e.direction="row"},col(){e.direction="col"},addNode(n){e.nodes.push(n)}}))}function l(...t){return s(...t).row()}function d(...t){return s(...t).col()}function f(t){return i({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 m(...t){return i({type:"form",nodes:t,submitTitle:"Submit"},["title","description","submitTitle","onSubmit","nodes"],e=>({addNode(n){e.nodes.push(n)}}))}function p(t){return i({type:"list",pagination:t??(()=>({items:[],hasMore:!1}))},["pagination","title","totalPages"],e=>({staticPagination(n,a){const r=Math.max(1,Math.floor(a||0)),c=Math.ceil(n.length/r);e.totalPages=c,e.pagination=g=>{if(c===0)return{items:[],hasMore:!1};const y=Math.max(1,Math.floor(g||0)),u=Math.min(y,c);return{items:n.slice((u-1)*r,u*r),hasMore:u<c}}}}))}function b(t){return i({type:"text",text:t,animation:"none",color:"primary",weight:"normal",size:"md"},["text","color","weight","size","animation"],e=>({primary(){e.color="primary"},muted(){e.color="muted"},shimmering(n={}){e.animation={type:"shimmering",...n}}}))}const P=Object.freeze(Object.defineProperty({__proto__:null,block:s,button:f,col:d,form:m,list:p,row:l,text:b},Symbol.toStringTag,{value:"Module"}));exports.block=s;exports.button=f;exports.col=d;exports.form=m;exports.index=P;exports.list=p;exports.row=l;exports.text=b;
|