@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.
- package/dist/{client-C4x8S8h9.js → client-4pKkAJ3Y.js} +1 -1
- package/dist/{lint-BWdiaRwp.js → lint-CV3DmM0X.js} +30 -14
- package/dist/plexo-sdk.css +1 -1
- package/dist/{v1-CMpjMZtt.js → v1-BVrQQ-IP.js} +1823 -1765
- package/dist/v2/compile/build.d.ts +1 -1
- package/dist/v2/compile/index.d.ts +1 -0
- package/dist/v2/components/canvas/WorkspaceLayer.d.ts +7 -0
- package/dist/v2/components/canvas/canvasDrop.d.ts +16 -0
- package/dist/v2/context/EditorContext.d.ts +12 -0
- package/dist/v2/context/WorkspaceContext.d.ts +3 -0
- package/dist/v2/email/compile.d.ts +1 -1
- package/dist/v2/index.d.ts +1 -0
- package/dist/v2/workspace.d.ts +16 -0
- package/dist/v2-compile.js +17 -17
- package/dist/v2-strata.js +1 -1
- package/dist/v2.js +3686 -3405
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "./lint-
|
|
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 =
|
|
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),
|
|
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
|
|
413
|
-
for (let e of [...r]) for (let n of J(String(e.value)))
|
|
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:
|
|
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
|
|
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
|
-
|
|
431
|
-
let
|
|
432
|
-
if (
|
|
433
|
-
let e = T(
|
|
434
|
-
JSON.stringify(e) !== JSON.stringify(
|
|
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
|
|
453
|
+
let d = {
|
|
438
454
|
...e,
|
|
439
455
|
tokens: r,
|
|
440
|
-
components:
|
|
456
|
+
components: c
|
|
441
457
|
};
|
|
442
|
-
return
|
|
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 };
|