@golemui/gui-lit 0.15.1 → 0.16.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.15.1 (2026-05-27)
2
+
3
+ This was a version bump only for gui-lit to align it with other projects, there were no code changes.
4
+
1
5
  ## 0.15.0 (2026-05-26)
2
6
 
3
7
  ### 🚀 Features
@@ -4,7 +4,7 @@ import { consume as F, provide as C } from "@lit/context";
4
4
  import { LitElement as x, nothing as m, html as f } from "lit";
5
5
  import { property as D, state as c, query as I, customElement as L } from "lit/decorators.js";
6
6
  import { Subject as R, debounceTime as V } from "rxjs";
7
- import { d as k } from "./list-CtFsv7GB.js";
7
+ import { d as k } from "./list-CVDHuXKS.js";
8
8
  import "./errors-QjKhr6mA.js";
9
9
  var O = Object.defineProperty, j = Object.getOwnPropertyDescriptor, l = (e, t, i, s) => {
10
10
  for (var n = s > 1 ? void 0 : s ? j(t, i) : t, d = e.length - 1, o; d >= 0; d--)
@@ -31,7 +31,7 @@ let a = class extends x {
31
31
  super.connectedCallback(), document.addEventListener("click", this.onDocumentClick), this.classList.add("gui-dropdown", "gui-field"), this.adapter.context = this.formContext, this.adapter.init(this.widget), this._filteredItems = this.adapter.templateData.items, this.subscriptions.push(
32
32
  this.adapter.templateDataChanged$.subscribe(() => {
33
33
  const e = this.adapter.templateData;
34
- e.items && this._listItems.length === 0 && this._filteredItems.length === 0 && (this._filteredItems = e.items, this._listItems = e.items), this.requestUpdate();
34
+ e.items && this._listItems?.length === 0 && this._filteredItems?.length === 0 && (this._filteredItems = e.items, this._listItems = e.items), this.requestUpdate();
35
35
  }),
36
36
  this.debouncer.pipe(V(this.adapter.templateData.inputDebounce ?? 500)).subscribe((e) => {
37
37
  this._filterItems(e);
package/index.js CHANGED
@@ -7,7 +7,7 @@ const He = {
7
7
  LAYOUTS: "LAYOUTS",
8
8
  DISPLAYS: "DISPLAYS"
9
9
  };
10
- function Lt(e) {
10
+ function Mt(e) {
11
11
  return function(t, n = () => !0) {
12
12
  return {
13
13
  kind: "leaf",
@@ -70,14 +70,14 @@ function g(e) {
70
70
  ...e.getChildren ? { getChildren: e.getChildren } : {}
71
71
  };
72
72
  Qe(e.itemType, o);
73
- const s = Lt(e.itemType);
73
+ const s = Mt(e.itemType);
74
74
  return { gsl: s, gslByUid: (a, u) => s(u, ((c) => c.uid === a)) };
75
75
  }
76
- function Mt(e) {
76
+ function Lt(e) {
77
77
  return e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (t) => t.toUpperCase()) : "";
78
78
  }
79
79
  function S(e, t) {
80
- return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: Mt(e.path) };
80
+ return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: Lt(e.path) };
81
81
  }
82
82
  function N(e, t) {
83
83
  return e.placeholder != null || t.suppressAutomaticPlaceholders || !e.path ? e : { ...e, placeholder: e.path };
@@ -110,7 +110,7 @@ const Dt = (e, t) => ({
110
110
  "TAGS"
111
111
  ]),
112
112
  ACTIONS: /* @__PURE__ */ new Set(["ACTIONS", "CUSTOM_ACTION"]),
113
- DISPLAYS: /* @__PURE__ */ new Set(["DISPLAYS", "ALERTS", "CUSTOM_DISPLAY"]),
113
+ DISPLAYS: /* @__PURE__ */ new Set(["DISPLAYS", "ALERTS", "MARKDOWN_TEXTS", "CUSTOM_DISPLAY"]),
114
114
  LAYOUTS: /* @__PURE__ */ new Set(["LAYOUTS", "TABS", "ACCORDION", "CUSTOM_LAYOUT"])
115
115
  };
116
116
  function Rt(e, t) {
@@ -494,18 +494,18 @@ class tn {
494
494
  leafSelectors: k.leafSelectors.filter((T) => T.targetState == null),
495
495
  sensibleDefaults: k.sensibleDefaults
496
496
  };
497
- let L = this.merger.merge(h, p, Te);
498
- d.afterMerge && (L = d.afterMerge(L, {
497
+ let M = this.merger.merge(h, p, Te);
498
+ d.afterMerge && (M = d.afterMerge(M, {
499
499
  eventRegistry: s,
500
500
  formConfig: i,
501
501
  eventIdGenerator: a
502
- })), L = this.eventWiring.wireInputLayoutEvents(
503
- L,
502
+ })), M = this.eventWiring.wireInputLayoutEvents(
503
+ M,
504
504
  s,
505
505
  a
506
506
  );
507
507
  const { cleanedResult: ze, stateData: ue } = this.stateExpansion.extractFromMergeResult(
508
- L,
508
+ M,
509
509
  ke
510
510
  );
511
511
  let C;
@@ -602,9 +602,9 @@ function v(e) {
602
602
  include: k,
603
603
  exclude: ke,
604
604
  validator: Te,
605
- ...L
605
+ ...M
606
606
  } = e;
607
- return L;
607
+ return M;
608
608
  }
609
609
  function O(e, t) {
610
610
  return typeof e == "function" ? e : { type: t, ...e ?? {} };
@@ -1539,7 +1539,7 @@ class rt extends Error {
1539
1539
  }
1540
1540
  }
1541
1541
  const Nn = {};
1542
- function M(e) {
1542
+ function L(e) {
1543
1543
  return Nn;
1544
1544
  }
1545
1545
  function pe(e, t) {
@@ -1569,7 +1569,7 @@ function y(e, t, n) {
1569
1569
  configurable: !0
1570
1570
  });
1571
1571
  }
1572
- function Ln(...e) {
1572
+ function Mn(...e) {
1573
1573
  const t = {};
1574
1574
  for (const n of e) {
1575
1575
  const r = Object.getOwnPropertyDescriptors(n);
@@ -1577,7 +1577,7 @@ function Ln(...e) {
1577
1577
  }
1578
1578
  return Object.defineProperties({}, t);
1579
1579
  }
1580
- function Mn(e) {
1580
+ function Ln(e) {
1581
1581
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
1582
1582
  }
1583
1583
  const ot = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
@@ -1705,7 +1705,7 @@ const ee = (e) => (t, n, r, o) => {
1705
1705
  if (i instanceof Promise)
1706
1706
  throw new j();
1707
1707
  if (i.issues.length) {
1708
- const a = new (o?.Err ?? e)(i.issues.map((u) => D(u, s, M())));
1708
+ const a = new (o?.Err ?? e)(i.issues.map((u) => D(u, s, L())));
1709
1709
  throw ot(a, o?.callee), a;
1710
1710
  }
1711
1711
  return i.value;
@@ -1713,7 +1713,7 @@ const ee = (e) => (t, n, r, o) => {
1713
1713
  const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1714
1714
  let i = t._zod.run({ value: n, issues: [] }, s);
1715
1715
  if (i instanceof Promise && (i = await i), i.issues.length) {
1716
- const a = new (o?.Err ?? e)(i.issues.map((u) => D(u, s, M())));
1716
+ const a = new (o?.Err ?? e)(i.issues.map((u) => D(u, s, L())));
1717
1717
  throw ot(a, o?.callee), a;
1718
1718
  }
1719
1719
  return i.value;
@@ -1723,14 +1723,14 @@ const ee = (e) => (t, n, r, o) => {
1723
1723
  throw new j();
1724
1724
  return s.issues.length ? {
1725
1725
  success: !1,
1726
- error: new (e ?? ut)(s.issues.map((i) => D(i, o, M())))
1726
+ error: new (e ?? ut)(s.issues.map((i) => D(i, o, L())))
1727
1727
  } : { success: !0, data: s.value };
1728
1728
  }, ct = /* @__PURE__ */ ne(Q), re = (e) => async (t, n, r) => {
1729
1729
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1730
1730
  let s = t._zod.run({ value: n, issues: [] }, o);
1731
1731
  return s instanceof Promise && (s = await s), s.issues.length ? {
1732
1732
  success: !1,
1733
- error: new e(s.issues.map((i) => D(i, o, M())))
1733
+ error: new e(s.issues.map((i) => D(i, o, L())))
1734
1734
  } : { success: !0, data: s.value };
1735
1735
  }, lt = /* @__PURE__ */ re(Q), Un = (e) => (t, n, r) => {
1736
1736
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
@@ -2219,9 +2219,9 @@ const sr = (e) => {
2219
2219
  ...s ? { received: s } : {}
2220
2220
  }), n;
2221
2221
  };
2222
- }), Lr = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
2222
+ }), Mr = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
2223
2223
  mr.init(e, t), ft.init(e, t);
2224
- }), Mr = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
2224
+ }), Lr = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
2225
2225
  _.init(e, t), e._zod.pattern = ur, e._zod.parse = (n, r) => {
2226
2226
  if (t.coerce)
2227
2227
  try {
@@ -2273,7 +2273,7 @@ function Ne(e, t, n, r) {
2273
2273
  code: "invalid_union",
2274
2274
  input: t.value,
2275
2275
  inst: n,
2276
- errors: e.map((s) => s.issues.map((i) => D(i, r, M())))
2276
+ errors: e.map((s) => s.issues.map((i) => D(i, r, L())))
2277
2277
  }), t);
2278
2278
  }
2279
2279
  const Rr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
@@ -2310,7 +2310,7 @@ const Rr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2310
2310
  }), Fr = /* @__PURE__ */ l("$ZodIntersection", (e, t) => {
2311
2311
  _.init(e, t), e._zod.parse = (n, r) => {
2312
2312
  const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
2313
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, c]) => Le(n, u, c)) : Le(n, s, i);
2313
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, c]) => Me(n, u, c)) : Me(n, s, i);
2314
2314
  };
2315
2315
  });
2316
2316
  function me(e, t) {
@@ -2348,7 +2348,7 @@ function me(e, t) {
2348
2348
  }
2349
2349
  return { valid: !1, mergeErrorPath: [] };
2350
2350
  }
2351
- function Le(e, t, n) {
2351
+ function Me(e, t, n) {
2352
2352
  const r = /* @__PURE__ */ new Map();
2353
2353
  let o;
2354
2354
  for (const a of t.issues)
@@ -2384,7 +2384,7 @@ const jr = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2384
2384
  return n.value = o, n;
2385
2385
  };
2386
2386
  });
2387
- function Me(e, t) {
2387
+ function Le(e, t) {
2388
2388
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
2389
2389
  }
2390
2390
  const Se = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
@@ -2394,7 +2394,7 @@ const Se = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
2394
2394
  }), e._zod.parse = (n, r) => {
2395
2395
  if (t.innerType._zod.optin === "optional") {
2396
2396
  const o = t.innerType._zod.run(n, r);
2397
- return o instanceof Promise ? o.then((s) => Me(s, n.value)) : Me(o, n.value);
2397
+ return o instanceof Promise ? o.then((s) => Le(s, n.value)) : Le(o, n.value);
2398
2398
  }
2399
2399
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
2400
2400
  };
@@ -2445,13 +2445,13 @@ const Br = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
2445
2445
  return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
2446
2446
  ...n,
2447
2447
  error: {
2448
- issues: s.issues.map((i) => D(i, r, M()))
2448
+ issues: s.issues.map((i) => D(i, r, L()))
2449
2449
  },
2450
2450
  input: n.value
2451
2451
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
2452
2452
  ...n,
2453
2453
  error: {
2454
- issues: o.issues.map((s) => D(s, r, M()))
2454
+ issues: o.issues.map((s) => D(s, r, L()))
2455
2455
  },
2456
2456
  input: n.value
2457
2457
  }), n.issues = []), n);
@@ -2785,7 +2785,7 @@ function So() {
2785
2785
  }
2786
2786
  // @__NO_SIDE_EFFECTS__
2787
2787
  function ko() {
2788
- return /* @__PURE__ */ x((e) => Mn(e));
2788
+ return /* @__PURE__ */ x((e) => Ln(e));
2789
2789
  }
2790
2790
  // @__NO_SIDE_EFFECTS__
2791
2791
  function To(e, t, n) {
@@ -3119,10 +3119,10 @@ const Oo = (e, t = {}) => (n) => {
3119
3119
  ...a(i) ? i.allOf : [i]
3120
3120
  ];
3121
3121
  n.allOf = u;
3122
- }, Lo = (e, t, n, r) => {
3122
+ }, Mo = (e, t, n, r) => {
3123
3123
  const o = e._zod.def, s = A(o.innerType, t, r), i = t.seen.get(e);
3124
3124
  t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
3125
- }, Mo = (e, t, n, r) => {
3125
+ }, Lo = (e, t, n, r) => {
3126
3126
  const o = e._zod.def;
3127
3127
  A(o.innerType, t, r);
3128
3128
  const s = t.seen.get(e);
@@ -3224,14 +3224,14 @@ const qo = (e, t) => {
3224
3224
  input: X(e, "input"),
3225
3225
  output: X(e, "output")
3226
3226
  }
3227
- }), e.toJSONSchema = Oo(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(Ln(t, {
3227
+ }), e.toJSONSchema = Oo(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(Mn(t, {
3228
3228
  checks: [
3229
3229
  ...t.checks ?? [],
3230
3230
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
3231
3231
  ]
3232
3232
  }), {
3233
3233
  parent: !0
3234
- }), e.with = e.check, e.clone = (n, r) => it(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Xo(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Qo(e, n, r), e.parseAsync = async (n, r) => Ho(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => es(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => ts(e, n, r), e.decode = (n, r) => ns(e, n, r), e.encodeAsync = async (n, r) => rs(e, n, r), e.decodeAsync = async (n, r) => os(e, n, r), e.safeEncode = (n, r) => ss(e, n, r), e.safeDecode = (n, r) => is(e, n, r), e.safeEncodeAsync = async (n, r) => as(e, n, r), e.safeDecodeAsync = async (n, r) => us(e, n, r), e.refine = (n, r) => e.check(Ns(n, r)), e.superRefine = (n) => e.check(Ls(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ x(n)), e.optional = () => xe(e), e.exactOptional = () => vs(e), e.nullable = () => Ue(e), e.nullish = () => xe(Ue(e)), e.nonoptional = (n) => Os(e, n), e.array = () => ps(e), e.or = (n) => ms([e, n]), e.and = (n) => hs(e, n), e.transform = (n) => Ve(e, gs(n)), e.default = (n) => ks(e, n), e.prefault = (n) => zs(e, n), e.catch = (n) => $s(e, n), e.pipe = (n) => Ve(e, n), e.readonly = () => Is(e), e.describe = (n) => {
3234
+ }), e.with = e.check, e.clone = (n, r) => it(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Xo(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Qo(e, n, r), e.parseAsync = async (n, r) => Ho(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => es(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => ts(e, n, r), e.decode = (n, r) => ns(e, n, r), e.encodeAsync = async (n, r) => rs(e, n, r), e.decodeAsync = async (n, r) => os(e, n, r), e.safeEncode = (n, r) => ss(e, n, r), e.safeDecode = (n, r) => is(e, n, r), e.safeEncodeAsync = async (n, r) => as(e, n, r), e.safeDecodeAsync = async (n, r) => us(e, n, r), e.refine = (n, r) => e.check(Ns(n, r)), e.superRefine = (n) => e.check(Ms(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ x(n)), e.optional = () => xe(e), e.exactOptional = () => vs(e), e.nullable = () => Ue(e), e.nullish = () => xe(Ue(e)), e.nonoptional = (n) => Os(e, n), e.array = () => ps(e), e.or = (n) => ms([e, n]), e.and = (n) => hs(e, n), e.transform = (n) => Ve(e, gs(n)), e.default = (n) => ks(e, n), e.prefault = (n) => zs(e, n), e.catch = (n) => $s(e, n), e.pipe = (n) => Ve(e, n), e.readonly = () => Is(e), e.describe = (n) => {
3235
3235
  const r = e.clone();
3236
3236
  return V.add(r, { description: n }), r;
3237
3237
  }, Object.defineProperty(e, "description", {
@@ -3317,7 +3317,7 @@ function vs(e) {
3317
3317
  });
3318
3318
  }
3319
3319
  const ws = /* @__PURE__ */ l("ZodNullable", (e, t) => {
3320
- xr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3320
+ xr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3321
3321
  });
3322
3322
  function Ue(e) {
3323
3323
  return new ws({
@@ -3350,7 +3350,7 @@ function zs(e, t) {
3350
3350
  });
3351
3351
  }
3352
3352
  const As = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
3353
- Jr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3353
+ Jr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3354
3354
  });
3355
3355
  function Os(e, t) {
3356
3356
  return new As({
@@ -3395,7 +3395,7 @@ const Cs = /* @__PURE__ */ l("ZodCustom", (e, t) => {
3395
3395
  function Ns(e, t = {}) {
3396
3396
  return /* @__PURE__ */ _t(Cs, e, t);
3397
3397
  }
3398
- function Ls(e) {
3398
+ function Ms(e) {
3399
3399
  return /* @__PURE__ */ vt(e);
3400
3400
  }
3401
3401
  const R = /* @__PURE__ */ l("ZodMiniType", (e, t) => {
@@ -3417,12 +3417,12 @@ function Je(e) {
3417
3417
  }
3418
3418
  const U = /* @__PURE__ */ l("ZodMiniStringFormat", (e, t) => {
3419
3419
  Z.init(e, t), zt.init(e, t);
3420
- }), Ms = /* @__PURE__ */ l("ZodMiniEmail", (e, t) => {
3420
+ }), Ls = /* @__PURE__ */ l("ZodMiniEmail", (e, t) => {
3421
3421
  Ar.init(e, t), U.init(e, t);
3422
3422
  });
3423
3423
  // @__NO_SIDE_EFFECTS__
3424
3424
  function Ds(e) {
3425
- return /* @__PURE__ */ Hr(Ms, e);
3425
+ return /* @__PURE__ */ Hr(Ls, e);
3426
3426
  }
3427
3427
  const Rs = /* @__PURE__ */ l("ZodMiniUUID", (e, t) => {
3428
3428
  zr.init(e, t), U.init(e, t);
@@ -3467,14 +3467,14 @@ function Be(e) {
3467
3467
  return /* @__PURE__ */ ao(At, e);
3468
3468
  }
3469
3469
  const Gs = /* @__PURE__ */ l("ZodMiniNumberFormat", (e, t) => {
3470
- Lr.init(e, t), At.init(e, t);
3470
+ Mr.init(e, t), At.init(e, t);
3471
3471
  });
3472
3472
  // @__NO_SIDE_EFFECTS__
3473
3473
  function Ks(e) {
3474
3474
  return /* @__PURE__ */ uo(Gs, e);
3475
3475
  }
3476
3476
  const qs = /* @__PURE__ */ l("ZodMiniBoolean", (e, t) => {
3477
- Mr.init(e, t), R.init(e, t);
3477
+ Lr.init(e, t), R.init(e, t);
3478
3478
  });
3479
3479
  // @__NO_SIDE_EFFECTS__
3480
3480
  function Ye(e) {
@@ -3726,8 +3726,8 @@ const li = {
3726
3726
  currency: async () => (await import("./currency.element-ybKzwXEh.js")).CurrencyElement,
3727
3727
  dateInput: async () => (await import("./date.element-p6aB6OGd.js")).DateElement,
3728
3728
  datePicker: async () => (await import("./date-picker.element-CP2_u_ZE.js")).DatePickerElement,
3729
- dropdown: async () => (await import("./dropdown.element-8OaBgk7F.js")).DropdownElement,
3730
- list: async () => (await import("./list.element-G8RNRZXU.js")).ListElement,
3729
+ dropdown: async () => (await import("./dropdown.element-sbd3T145.js")).DropdownElement,
3730
+ list: async () => (await import("./list.element-Bgnx2CN_.js")).ListElement,
3731
3731
  markdown: async () => (await import("./markdown.element-1IF3G5KX.js")).MarkdownElement,
3732
3732
  password: async () => (await import("./password.element-BT65mDsp.js")).PasswordElement,
3733
3733
  textinput: async () => (await import("./textinput.element-zI0iG-Cq.js")).TextinputElement,