@charisol/plexo-sdk 2.0.14 → 2.0.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.
@@ -1,4 +1,4 @@
1
- import { n as e } from "./lint-BWdiaRwp.js";
1
+ import { n as e } from "./lint-CV3DmM0X.js";
2
2
  //#region src/v2/strata/merge.ts
3
3
  function t(e) {
4
4
  return Array.isArray(e) ? `[${e.map(t).join(",")}]` : e && typeof e == "object" ? `{${Object.keys(e).sort().map((n) => `${JSON.stringify(n)}:${t(e[n])}`).join(",")}}` : JSON.stringify(e);
@@ -398,10 +398,26 @@ function pe(e) {
398
398
  let t = !1, n = /* @__PURE__ */ new Set(), r = e.tokens.filter((e) => n.has(e.key) ? (t = !0, !1) : (n.add(e.key), !0)).map((e) => J(String(e.value)).length && e.unit && e.unit !== "null" ? (t = !0, {
399
399
  ...e,
400
400
  unit: null
401
- }) : e), i = new Map(r.map((e) => [e.key, e]));
401
+ }) : e), i = r.find((e) => e.key === "--semantic-shadow-focus");
402
+ if (i && !/^\s*var\(/.test(String(i.value))) {
403
+ let e = r.some((e) => e.key === "--shadow-focus");
404
+ r = [...r.map((e) => e.key === "--semantic-shadow-focus" ? {
405
+ ...e,
406
+ value: "var(--shadow-focus)"
407
+ } : e), ...e ? [] : [{
408
+ key: "--shadow-focus",
409
+ name: "Shadow Focus",
410
+ value: i.value,
411
+ type: "shadow",
412
+ unit: null,
413
+ layer: "brand",
414
+ comment: "Focus ring glow, in the brand colour"
415
+ }]], t = !0;
416
+ }
417
+ let a = new Map(r.map((e) => [e.key, e]));
402
418
  r = r.map((e) => {
403
419
  if (e.layer === "brand" && J(String(e.value)).length) {
404
- let n = X(String(e.value), i);
420
+ let n = X(String(e.value), a);
405
421
  if (n !== e.value && !J(n).length) return t = !0, {
406
422
  ...e,
407
423
  value: n
@@ -409,17 +425,17 @@ function pe(e) {
409
425
  }
410
426
  return e;
411
427
  });
412
- let a = new Set(r.map((e) => e.key)), o = r.find((e) => e.key === "--font-family-sans");
413
- for (let e of [...r]) for (let n of J(String(e.value))) a.has(n) || (n === "--font-family-heading" || n === "--font-family-body") && o && (a.add(n), t = !0, r = [...r, {
428
+ let o = new Set(r.map((e) => e.key)), s = r.find((e) => e.key === "--font-family-sans");
429
+ for (let e of [...r]) for (let n of J(String(e.value))) o.has(n) || (n === "--font-family-heading" || n === "--font-family-body") && s && (o.add(n), t = !0, r = [...r, {
414
430
  key: n,
415
431
  name: n === "--font-family-heading" ? "Font Family Heading" : "Font Family Body",
416
- value: o.value,
432
+ value: s.value,
417
433
  type: "font family",
418
434
  unit: null,
419
435
  layer: "brand",
420
436
  comment: n === "--font-family-heading" ? "Heading font" : "Body font"
421
437
  }]);
422
- let s = e.components, c = e.components.map((e) => {
438
+ let c = e.components, l = e.components.map((e) => {
423
439
  let t = Q(e.nodes), n = fe(e.props, r);
424
440
  return !t.changed && n === e.props ? e : {
425
441
  ...e,
@@ -427,19 +443,19 @@ function pe(e) {
427
443
  ...n ? { props: n } : {}
428
444
  };
429
445
  });
430
- c.some((t, n) => t !== e.components[n]) && (s = c, t = !0);
431
- let l = e.fonts;
432
- if (l !== void 0) {
433
- let e = T(l);
434
- JSON.stringify(e) !== JSON.stringify(l) && (l = e, t = !0);
446
+ l.some((t, n) => t !== e.components[n]) && (c = l, t = !0);
447
+ let u = e.fonts;
448
+ if (u !== void 0) {
449
+ let e = T(u);
450
+ JSON.stringify(e) !== JSON.stringify(u) && (u = e, t = !0);
435
451
  }
436
452
  if (!t) return e;
437
- let u = {
453
+ let d = {
438
454
  ...e,
439
455
  tokens: r,
440
- components: s
456
+ components: c
441
457
  };
442
- return l?.length ? u.fonts = l : delete u.fonts, u;
458
+ return u?.length ? d.fonts = u : delete d.fonts, d;
443
459
  }
444
460
  //#endregion
445
461
  export { p as A, O as C, T as D, A as E, h as F, te as I, v as L, b as M, g as N, d as O, m as P, D as S, w as T, C as _, H as a, k as b, G as c, U as d, W as f, ne as g, re as h, B as i, x as j, l as k, ce as l, R as m, pe as n, I as o, F as p, z as r, L as s, ue as t, K as u, S as v, N as w, j as x, P as y };