@levo-so/core 0.3.20 → 0.3.22

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.d.ts CHANGED
@@ -331,11 +331,10 @@ export declare const FieldKind: {
331
331
  group: "group";
332
332
  location: "location";
333
333
  "array-location": "array-location";
334
- richtext: "richtext";
335
334
  "array-json": "array-json";
336
335
  };
337
336
 
338
- export declare const FieldKindList: readonly ["collection", "record", "group", "public-id", "string", "array-string", "number", "array-number", "date", "array-date", "boolean", "array-boolean", "json", "array-json", "file", "array-file", "location", "array-location", "richtext", "identifier"];
337
+ export declare const FieldKindList: readonly ["collection", "record", "group", "public-id", "string", "array-string", "number", "array-number", "date", "array-date", "boolean", "array-boolean", "json", "array-json", "file", "array-file", "location", "array-location", "identifier"];
339
338
 
340
339
  export declare type FieldType = string | number | Date | boolean | null;
341
340
 
package/dist/index.js CHANGED
@@ -31,16 +31,17 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
31
31
  let i = e(n.apiUrl).addon(t), o = (e = a) => {
32
32
  let t = {
33
33
  credentials: "include",
34
- signal: AbortSignal.timeout(e),
35
34
  headers: {}
36
35
  };
37
- return n.workspace && (t.headers = {
36
+ n.workspace && (t.headers = {
38
37
  ...t?.headers || {},
39
38
  "Levo-Workspace": n.workspace
40
39
  }), r && typeof r == "object" && Object.keys(r).length > 0 && (t.headers = {
41
40
  ...t?.headers || {},
42
41
  "Levo-Page-Context": encodeURIComponent(JSON.stringify(r))
43
- }), n.workspace ? i.options(t).query({ workspace: n.workspace }) : i.options(t);
42
+ });
43
+ let o = i.defer((t) => t.options({ signal: AbortSignal.timeout(e) }));
44
+ return n.workspace ? o.options(t).query({ workspace: n.workspace }) : o.options(t);
44
45
  };
45
46
  return {
46
47
  get instance() {
@@ -132,7 +133,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
132
133
  name: e,
133
134
  callback: t
134
135
  }), p = (e, t = {}) => {
135
- let { level: n = e.NODE_ENV === "development" ? d.debug : d.warn } = t, r = /* @__PURE__ */ new Map(), i = (e) => (r.set(e.name, e), () => {
136
+ let { level: n = e.NODE_ENV === "development" ? 0 : 2 } = t, r = /* @__PURE__ */ new Map(), i = (e) => (r.set(e.name, e), () => {
136
137
  r.delete(e.name);
137
138
  }), a = (t, i) => {
138
139
  let a = Array.isArray(i) ? i : [i];
@@ -149,15 +150,14 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
149
150
  console.log(...a);
150
151
  }
151
152
  }, o = (...e) => {
152
- a(d.debug, e);
153
+ a(0, e);
153
154
  }, s = (...e) => {
154
- a(d.info, e);
155
+ a(1, e);
155
156
  }, c = (...e) => {
156
- a(d.warn, e);
157
+ a(2, e);
157
158
  };
158
159
  function l(e, t) {
159
- let n = t === void 0 ? [e] : [e, t];
160
- a(d.error, n);
160
+ a(3, t === void 0 ? [e] : [e, t]);
161
161
  }
162
162
  return {
163
163
  debug: o,
@@ -426,11 +426,6 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
426
426
  o2o: null,
427
427
  m2m: []
428
428
  },
429
- richtext: {
430
- html: "",
431
- text: "",
432
- json: []
433
- },
434
429
  json: {},
435
430
  "array-string": [],
436
431
  "array-number": [],
@@ -519,7 +514,6 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
519
514
  "array-file",
520
515
  "location",
521
516
  "array-location",
522
- "richtext",
523
517
  "identifier"
524
518
  ], j = {
525
519
  identifier: "identifier",
@@ -540,7 +534,6 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
540
534
  group: "group",
541
535
  location: "location",
542
536
  "array-location": "array-location",
543
- richtext: "richtext",
544
537
  "array-json": "array-json"
545
538
  }, M = {
546
539
  ArrayWidget: j.group,
@@ -736,7 +729,6 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
736
729
  "array-file": ["is_empty", "is_not_empty"],
737
730
  location: ["is_empty", "is_not_empty"],
738
731
  "array-location": ["is_empty", "is_not_empty"],
739
- richtext: ["is_empty", "is_not_empty"],
740
732
  json: ["is_empty", "is_not_empty"],
741
733
  "array-json": ["is_empty", "is_not_empty"],
742
734
  collection: [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@levo-so/core",
3
3
  "description": "Levo common utilities",
4
- "version": "0.3.20",
4
+ "version": "0.3.22",
5
5
  "author": "Levo Engineering <devs@theinternetfolks.com>",
6
6
  "dependencies": {
7
7
  "wretch": "2.9.0"
@@ -9,7 +9,7 @@
9
9
  "devDependencies": {
10
10
  "@levo/ts-config": "0.0.0",
11
11
  "typescript": "5.9.3",
12
- "vite": "8.0.8",
12
+ "vite": "8.0.16",
13
13
  "vite-plugin-dts": "4.5.4"
14
14
  },
15
15
  "exports": {