@palmyit/elements 0.1.7 → 0.1.8

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.
Files changed (70) hide show
  1. package/dist/definitions.d.ts +23 -20
  2. package/dist/definitions.js +692 -686
  3. package/dist/elements/button/definition.d.ts +38 -0
  4. package/dist/elements/button/template.d.ts +2 -0
  5. package/dist/elements/checkbox/definition.d.ts +10 -0
  6. package/dist/elements/checkbox/template.d.ts +2 -0
  7. package/dist/elements/container/definition.d.ts +39 -0
  8. package/dist/elements/container/template.d.ts +2 -0
  9. package/dist/elements/divider/definition.d.ts +10 -0
  10. package/dist/elements/divider/template.d.ts +2 -0
  11. package/dist/elements/icon/definition.d.ts +18 -0
  12. package/dist/elements/icon/template.d.ts +2 -0
  13. package/dist/{schema/PImage/pImage.definition.d.ts → elements/image/definition.d.ts} +8 -8
  14. package/dist/elements/image/template.d.ts +2 -0
  15. package/dist/elements/list/definition.d.ts +11 -0
  16. package/dist/elements/list/template.d.ts +2 -0
  17. package/dist/elements/page/definition.d.ts +22 -0
  18. package/dist/elements/page/template.d.ts +2 -0
  19. package/dist/elements/radio/definition.d.ts +13 -0
  20. package/dist/elements/radio/template.d.ts +2 -0
  21. package/dist/elements/rich-text/definition.d.ts +8 -0
  22. package/dist/elements/rich-text/template.d.ts +2 -0
  23. package/dist/elements/section/definition.d.ts +39 -0
  24. package/dist/elements/section/template.d.ts +2 -0
  25. package/dist/elements/select/definition.d.ts +13 -0
  26. package/dist/elements/select/template.d.ts +2 -0
  27. package/dist/{schema/PTable/pTable.definition.d.ts → elements/table/definition.d.ts} +2 -2
  28. package/dist/elements/table/template.d.ts +2 -0
  29. package/dist/{schema/PText/pText.definition.d.ts → elements/text/definition.d.ts} +9 -9
  30. package/dist/elements/text/template.d.ts +2 -0
  31. package/dist/elements/text-area/definition.d.ts +10 -0
  32. package/dist/elements/text-area/template.d.ts +2 -0
  33. package/dist/elements/text-field/definition.d.ts +10 -0
  34. package/dist/elements/text-field/template.d.ts +2 -0
  35. package/dist/elements/video/definition.d.ts +10 -0
  36. package/dist/elements/video/template.d.ts +2 -0
  37. package/dist/manifest.json +2 -2
  38. package/dist/plmt-elements.css +2 -1
  39. package/dist/render/styleToClasses.d.ts +35 -0
  40. package/dist/render/styleTokens.d.ts +57 -0
  41. package/dist/render/types.d.ts +6 -0
  42. package/dist/schema/Fields/BackgroundField/backgroundValue.d.ts +4 -3
  43. package/dist/schema/backgroundStyleDefinitions.d.ts +1 -6
  44. package/dist/schema/elementRegistry.d.ts +14 -14
  45. package/dist/schema/elementStyleDefinitions.d.ts +1 -1
  46. package/dist/schema/style/elementStyle.d.ts +2 -2
  47. package/dist/schema/style/page-styles.d.ts +2 -2
  48. package/dist/schema/styleTokensSchema.d.ts +274 -0
  49. package/dist/styleToClasses-CZSWp6Ez.js +683 -0
  50. package/dist/templates/elementSpec.d.ts +2 -7
  51. package/dist/templates/helpers.d.ts +9 -1
  52. package/dist/templates.d.ts +3 -1
  53. package/dist/templates.js +252 -172
  54. package/package.json +3 -1
  55. package/dist/schema/PButton/pButton.definition.d.ts +0 -38
  56. package/dist/schema/PCheckbox/pCheckbox.definition.d.ts +0 -10
  57. package/dist/schema/PContainer/pContainer.definition.d.ts +0 -39
  58. package/dist/schema/PDivider/pDivider.definition.d.ts +0 -10
  59. package/dist/schema/PIcon/pIcon.definition.d.ts +0 -18
  60. package/dist/schema/PList/pList.definition.d.ts +0 -11
  61. package/dist/schema/PPage/pPage.definition.d.ts +0 -22
  62. package/dist/schema/PRadio/pRadio.definition.d.ts +0 -13
  63. package/dist/schema/PRichText/pRichText.definition.d.ts +0 -8
  64. package/dist/schema/PSection/pSection.definition.d.ts +0 -39
  65. package/dist/schema/PSelect/pSelect.definition.d.ts +0 -13
  66. package/dist/schema/PTextArea/pTextArea.definition.d.ts +0 -10
  67. package/dist/schema/PTextField/pTextField.definition.d.ts +0 -10
  68. package/dist/schema/PVideo/pVideo.definition.d.ts +0 -10
  69. /package/dist/{schema/PRichText → elements/rich-text}/richTextMarks.d.ts +0 -0
  70. /package/dist/{schema/PRichText → elements/rich-text}/richTextOptions.d.ts +0 -0
@@ -1,52 +1,245 @@
1
- import { z as e } from "zod";
1
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, o as u, p as ee, r as te, s as ne, t as re, u as ie } from "./styleToClasses-CZSWp6Ez.js";
2
+ import { z as d } from "zod";
2
3
  // src/schema/elementConfiguration.ts
3
- var t = e.string().trim().min(1);
4
- function n(e) {
4
+ var f = d.string().trim().min(1);
5
+ function p(e) {
5
6
  return e;
6
7
  }
7
- var r = /^[#0-9a-z%.,\s()-]+$/i, i = /url|var|image|expression|attr/i;
8
- function a(e) {
8
+ var ae = /^[#0-9a-z%.,\s()-]+$/i, oe = /url|var|image|expression|attr/i;
9
+ function m(e) {
9
10
  let t = e.trim();
10
- return t !== "" && t.length <= 200 && r.test(t) && !i.test(t);
11
- }
12
- function o(e) {
13
- if (a(e.value)) return `${e.kind}-gradient(${e.value.trim()})`;
14
- }
15
- // src/schema/backgroundStyleDefinitions.ts
16
- var s = e.strictObject({
17
- hex: e.string().regex(/^#[0-9A-Fa-f]{6}$/, "Expected a #RRGGBB color"),
18
- opacity: e.number().int().min(0).max(100)
19
- }), c = e.strictObject({
20
- kind: e.enum(["linear", "radial"]),
21
- value: e.string().refine(a, "Expected gradient arguments such as 135deg, #2563EB, #7C3AED")
11
+ return t !== "" && t.length <= 200 && ae.test(t) && !oe.test(t);
12
+ }
13
+ function se(e) {
14
+ if (m(e.value)) return `${e.kind}-gradient(${e.value.trim()})`;
15
+ }
16
+ // src/schema/style/page-styles.ts
17
+ var ce = /^#[0-9A-Fa-f]{6}$/;
18
+ function le(e) {
19
+ return ce.test(e) ? [
20
+ Number.parseInt(e.slice(1, 3), 16),
21
+ Number.parseInt(e.slice(3, 5), 16),
22
+ Number.parseInt(e.slice(5, 7), 16)
23
+ ] : null;
24
+ }
25
+ function ue(e) {
26
+ if (ee(e)) return l(e);
27
+ let t = le(e.hex);
28
+ if (!t || !Number.isFinite(e.opacity)) return;
29
+ if (e.opacity === 100) return e.hex.toUpperCase();
30
+ let n = Math.min(100, Math.max(0, e.opacity)) / 100, [r, i, a] = t;
31
+ return `rgba(${r}, ${i}, ${a}, ${n})`;
32
+ }
33
+ function de(e) {
34
+ if (!(!Number.isFinite(e) || e <= 0)) return `${e}px`;
35
+ }
36
+ // src/schema/style/backgroundStyle.ts
37
+ function fe(e) {
38
+ if (e.backgroundType === "gradient") return "transparent";
39
+ if (e.backgroundColor) return ee(e.backgroundColor) ? l(e.backgroundColor) : ue(e.backgroundColor);
40
+ }
41
+ function pe(e) {
42
+ if (e.backgroundType !== "gradient") return "none";
43
+ if (e.backgroundGradient) return se(e.backgroundGradient);
44
+ }
45
+ function me(e, t) {
46
+ return e.backgroundType ? {
47
+ [`${t}-background-color`]: fe(e),
48
+ [`${t}-background-image`]: pe(e)
49
+ } : {};
50
+ }
51
+ // src/schema/style/elementStyle.ts
52
+ var h = [
53
+ "none",
54
+ "solid",
55
+ "dashed",
56
+ "dotted",
57
+ "double"
58
+ ], he = [
59
+ "row",
60
+ "column",
61
+ "row-reverse",
62
+ "column-reverse"
63
+ ], ge = [
64
+ "nowrap",
65
+ "wrap",
66
+ "wrap-reverse"
67
+ ], _e = [
68
+ "flex-start",
69
+ "center",
70
+ "flex-end",
71
+ "space-between",
72
+ "space-around",
73
+ "space-evenly"
74
+ ], ve = [
75
+ "stretch",
76
+ "flex-start",
77
+ "center",
78
+ "flex-end",
79
+ "baseline"
80
+ ], ye = ["stretch", ..._e], g = {
81
+ layout: "block",
82
+ flexDirection: "row",
83
+ flexWrap: "nowrap",
84
+ justifyContent: "flex-start",
85
+ alignItems: "stretch",
86
+ alignContent: "stretch",
87
+ rowGap: "0",
88
+ columnGap: "0",
89
+ backgroundType: "color",
90
+ backgroundColor: {
91
+ hex: "#FFFFFF",
92
+ opacity: 0
93
+ },
94
+ overflow: "show",
95
+ overflowVertical: !0,
96
+ overflowHorizontal: !0,
97
+ width: "auto",
98
+ height: "auto",
99
+ minWidth: "auto",
100
+ minHeight: "auto",
101
+ maxWidth: "auto",
102
+ maxHeight: "auto",
103
+ paddingTop: "auto",
104
+ paddingBottom: "auto",
105
+ paddingLeft: "auto",
106
+ paddingRight: "auto",
107
+ marginTop: "0",
108
+ marginBottom: "0",
109
+ marginLeft: "0",
110
+ marginRight: "0",
111
+ borderRadiusTopLeft: "0",
112
+ borderRadiusTopRight: "0",
113
+ borderRadiusBottomRight: "0",
114
+ borderRadiusBottomLeft: "0",
115
+ borderWidth: "0",
116
+ borderStyle: "solid",
117
+ borderColor: {
118
+ hex: "#000000",
119
+ opacity: 100
120
+ }
121
+ }, _ = /^(auto|0|-?\d+(\.\d+)?(px|rem|em|%))$/i, be = /^(0|\d+(\.\d+)?(px|rem|em))$/i;
122
+ function v(e) {
123
+ let t = e.trim();
124
+ if (_.test(t)) return t;
125
+ }
126
+ function y(e) {
127
+ let t = v(e);
128
+ if (t != null) return t.toLowerCase() === "auto" ? "0" : t;
129
+ }
130
+ function xe(e) {
131
+ let t = v(e);
132
+ return t?.toLowerCase() === "auto" ? "none" : t;
133
+ }
134
+ function Se(e) {
135
+ let t = e.trim();
136
+ return be.test(t) ? t : void 0;
137
+ }
138
+ function Ce(e, t) {
139
+ return e === "hide" ? "hidden" : t ? "auto" : "hidden";
140
+ }
141
+ var we = [
142
+ "marginTop",
143
+ "marginBottom",
144
+ "marginLeft",
145
+ "marginRight"
146
+ ];
147
+ function Te(e) {
148
+ return e.trim().toLowerCase() === "auto";
149
+ }
150
+ function b(e, t) {
151
+ return we.every((t) => Te(e[t])) ? "0" : v(e[t]);
152
+ }
153
+ function Ee(e) {
154
+ return e.layout !== "grid" || e.gridColumns == null ? "none" : `repeat(${e.gridColumns}, minmax(0, 1fr))`;
155
+ }
156
+ function De(e, t) {
157
+ let n = {
158
+ ...g,
159
+ ...e
160
+ }, r = `--palmyit-${t}`;
161
+ return {
162
+ [`${r}-display`]: n.layout,
163
+ [`${r}-grid-template-columns`]: Ee(n),
164
+ [`${r}-flex-direction`]: n.flexDirection,
165
+ [`${r}-flex-wrap`]: n.flexWrap,
166
+ [`${r}-justify-content`]: n.justifyContent,
167
+ [`${r}-align-items`]: n.alignItems,
168
+ [`${r}-align-content`]: n.alignContent,
169
+ [`${r}-row-gap`]: y(n.rowGap),
170
+ [`${r}-column-gap`]: y(n.columnGap),
171
+ [`${r}-overflow-x`]: Ce(n.overflow, n.overflowHorizontal),
172
+ [`${r}-overflow-y`]: Ce(n.overflow, n.overflowVertical),
173
+ [`${r}-width`]: v(n.width),
174
+ [`${r}-height`]: v(n.height),
175
+ [`${r}-min-width`]: v(n.minWidth),
176
+ [`${r}-min-height`]: v(n.minHeight),
177
+ [`${r}-max-width`]: xe(n.maxWidth),
178
+ [`${r}-max-height`]: xe(n.maxHeight),
179
+ [`${r}-padding-top`]: y(n.paddingTop),
180
+ [`${r}-padding-bottom`]: y(n.paddingBottom),
181
+ [`${r}-padding-left`]: y(n.paddingLeft),
182
+ [`${r}-padding-right`]: y(n.paddingRight),
183
+ [`${r}-margin-top`]: b(n, "marginTop"),
184
+ [`${r}-margin-bottom`]: b(n, "marginBottom"),
185
+ [`${r}-margin-left`]: b(n, "marginLeft"),
186
+ [`${r}-margin-right`]: b(n, "marginRight"),
187
+ [`${r}-border-top-left-radius`]: y(n.borderRadiusTopLeft),
188
+ [`${r}-border-top-right-radius`]: y(n.borderRadiusTopRight),
189
+ [`${r}-border-bottom-right-radius`]: y(n.borderRadiusBottomRight),
190
+ [`${r}-border-bottom-left-radius`]: y(n.borderRadiusBottomLeft),
191
+ [`${r}-border-width`]: Se(n.borderWidth),
192
+ [`${r}-border-style`]: n.borderStyle,
193
+ [`${r}-border-color`]: ue(n.borderColor),
194
+ ...me(n, r)
195
+ };
196
+ }
197
+ // src/schema/styleTokensSchema.ts
198
+ var Oe = d.enum(ie), ke = d.enum(t), Ae = d.enum(c), je = d.enum(r), Me = d.enum(ne), Ne = d.enum(i), x = d.string().trim().regex(_, "Expected auto, 0, or a px, rem, em, or % length"), S = d.union([
199
+ Oe,
200
+ Ae,
201
+ x
202
+ ]), Pe = d.union([ke, x]), Fe = d.union([
203
+ je,
204
+ d.number().min(1).max(200),
205
+ x
206
+ ]), Ie = d.union([Me, x]), Le = d.union([Ne, x]), Re = d.strictObject({
207
+ hex: d.string().regex(/^#[0-9A-Fa-f]{6}$/, "Expected a #RRGGBB color"),
208
+ opacity: d.number().int().min(0).max(100)
209
+ }), ze = new Set(n), Be = d.strictObject({
210
+ name: d.enum(u),
211
+ opacity: d.number().int().refine((e) => ze.has(e), "Expected a Tailwind opacity step such as 0, 10, 50, or 100")
212
+ }), C = d.union([Be, Re]), Ve = d.strictObject({
213
+ kind: d.enum(["linear", "radial"]),
214
+ value: d.string().refine(m, "Expected gradient arguments such as 135deg, #2563EB, #7C3AED")
22
215
  });
23
- function l(t, { defaults: n, typeAttribute: r } = {}) {
216
+ function w(e, { defaults: t, typeAttribute: n } = {}) {
24
217
  return [
25
218
  {
26
219
  key: "backgroundType",
27
- ...r ? { attribute: r } : {},
28
- value: e.enum(["color", "gradient"]),
29
- defaultValue: n?.backgroundType,
220
+ ...n ? { attribute: n } : {},
221
+ value: d.enum(["color", "gradient"]),
222
+ defaultValue: t?.backgroundType,
30
223
  label: "Background type"
31
224
  },
32
225
  {
33
226
  key: "backgroundColor",
34
- variable: `${t}-background-color`,
35
- value: s,
36
- defaultValue: n?.backgroundColor,
227
+ variable: `${e}-background-color`,
228
+ value: C,
229
+ defaultValue: t?.backgroundColor,
37
230
  label: "Background color"
38
231
  },
39
232
  {
40
233
  key: "backgroundGradient",
41
- variable: `${t}-background-image`,
42
- value: c,
43
- defaultValue: n?.backgroundGradient,
234
+ variable: `${e}-background-image`,
235
+ value: Ve,
236
+ defaultValue: t?.backgroundGradient,
44
237
  label: "Background gradient"
45
238
  }
46
239
  ];
47
240
  }
48
241
  // src/schema/device/devices.ts
49
- var u = [
242
+ var T = [
50
243
  {
51
244
  name: "Desktop",
52
245
  icon: "Monitor",
@@ -79,26 +272,26 @@ var u = [
79
272
  height: 360
80
273
  }
81
274
  }
82
- ], ee = u.map(({ portrait: e, icon: t, name: n }) => ({
275
+ ], He = T.map(({ portrait: e, icon: t, name: n }) => ({
83
276
  ...e,
84
277
  icon: t,
85
278
  label: n
86
279
  }));
87
- function te(e) {
88
- return u.find((t) => t.portrait.width === e || t.landscape?.width === e) ?? u[0];
280
+ function Ue(e) {
281
+ return T.find((t) => t.portrait.width === e || t.landscape?.width === e) ?? T[0];
89
282
  }
90
- function ne(e) {
91
- return te(e).landscape?.width === e ? "landscape" : "portrait";
283
+ function We(e) {
284
+ return Ue(e).landscape?.width === e ? "landscape" : "portrait";
92
285
  }
93
286
  // src/schema/deviceVisibility.ts
94
- var d = {
287
+ var E = {
95
288
  Desktop: "showOnDesktop",
96
289
  Tablet: "showOnTablet",
97
290
  Mobile: "showOnMobile"
98
- }, f = {
291
+ }, Ge = {
99
292
  Tablet: "showOnTabletLandscape",
100
293
  Mobile: "showOnMobileLandscape"
101
- }, re = [...Object.values(d), ...Object.values(f)], p = u.flatMap(({ name: e, landscape: t }) => t ? [{
294
+ }, Ke = [...Object.values(E), ...Object.values(Ge)], qe = T.flatMap(({ name: e, landscape: t }) => t ? [{
102
295
  device: e,
103
296
  orientation: "portrait"
104
297
  }, {
@@ -108,37 +301,37 @@ var d = {
108
301
  device: e,
109
302
  orientation: "portrait"
110
303
  }]);
111
- function m(e, t) {
112
- return (t === "landscape" ? f[e] : void 0) ?? d[e];
304
+ function Je(e, t) {
305
+ return (t === "landscape" ? Ge[e] : void 0) ?? E[e];
113
306
  }
114
- function h(e, t, n = "portrait") {
115
- let r = e[m(t, n)];
116
- return r === void 0 ? e[d[t]] !== !1 : r;
307
+ function D(e, t, n = "portrait") {
308
+ let r = e[Je(t, n)];
309
+ return r === void 0 ? e[E[t]] !== !1 : r;
117
310
  }
118
- function ie(e) {
119
- return p.filter(({ device: t, orientation: n }) => h(e, t, n)).length;
311
+ function Ye(e) {
312
+ return qe.filter(({ device: t, orientation: n }) => D(e, t, n)).length;
120
313
  }
121
314
  // src/schema/styleItems.ts
122
- var ae = e.strictObject({
123
- key: e.string(),
124
- variable: e.string().optional(),
125
- variables: e.record(e.string(), e.string()).optional(),
126
- attribute: e.string().optional(),
127
- value: e.unknown()
128
- }), oe = [
315
+ var Xe = d.strictObject({
316
+ key: d.string(),
317
+ variable: d.string().optional(),
318
+ variables: d.record(d.string(), d.string()).optional(),
319
+ attribute: d.string().optional(),
320
+ value: d.unknown()
321
+ }), Ze = [
129
322
  "variable",
130
323
  "variables",
131
324
  "attribute"
132
325
  ];
133
- function se(e) {
326
+ function Qe(e) {
134
327
  let t = {};
135
328
  for (let n of e) n.defaultValue !== void 0 && (t[n.key] = n.defaultValue);
136
329
  return t;
137
330
  }
138
- function ce(e, t) {
139
- return oe.find((n) => JSON.stringify(e[n]) !== JSON.stringify(t[n]));
331
+ function $e(e, t) {
332
+ return Ze.find((n) => JSON.stringify(e[n]) !== JSON.stringify(t[n]));
140
333
  }
141
- function le(e, t, n) {
334
+ function et(e, t, n) {
142
335
  if (!t) return {
143
336
  field: "key",
144
337
  message: `Unknown style key "${e.key}"`
@@ -147,28 +340,28 @@ function le(e, t, n) {
147
340
  field: "key",
148
341
  message: `Style key "${e.key}" appears twice`
149
342
  };
150
- let r = ce(e, t);
343
+ let r = $e(e, t);
151
344
  if (r) return {
152
345
  field: r,
153
346
  message: `Style "${e.key}" ${r} does not match the element configuration`
154
347
  };
155
348
  }
156
- function g(e) {
157
- return de(e, () => se(e));
349
+ function O(e) {
350
+ return nt(e, () => Qe(e));
158
351
  }
159
- function ue(e) {
160
- return de(e, () => ({}));
161
- }
162
- function de(t, n) {
163
- let r = new Map(t.map((e) => [e.key, e]));
164
- return e.array(ae).default([]).transform((e, t) => {
165
- let i = n(), a = /* @__PURE__ */ new Set();
166
- return e.forEach((e, n) => {
167
- let o = r.get(e.key), s = le(e, o, a);
352
+ function tt(e) {
353
+ return nt(e, () => ({}));
354
+ }
355
+ function nt(e, t) {
356
+ let n = new Map(e.map((e) => [e.key, e]));
357
+ return d.array(Xe).default([]).transform((e, r) => {
358
+ let i = t(), a = /* @__PURE__ */ new Set();
359
+ return e.forEach((e, t) => {
360
+ let o = n.get(e.key), s = et(e, o, a);
168
361
  if (s || !o) {
169
- t.addIssue({
362
+ r.addIssue({
170
363
  code: "custom",
171
- path: [n, s?.field ?? "key"],
364
+ path: [t, s?.field ?? "key"],
172
365
  message: s?.message ?? ""
173
366
  });
174
367
  return;
@@ -178,40 +371,40 @@ function de(t, n) {
178
371
  if (c.success) i[e.key] = c.data;
179
372
  else {
180
373
  let e = c.error.issues[0]?.message ?? "Invalid value";
181
- t.addIssue({
374
+ r.addIssue({
182
375
  code: "custom",
183
- path: [n, "value"],
376
+ path: [t, "value"],
184
377
  message: e
185
378
  });
186
379
  }
187
380
  }), i;
188
381
  });
189
382
  }
190
- function fe(e, t) {
191
- let n = Object.fromEntries(oe.filter((t) => e[t] !== void 0).map((t) => [t, e[t]]));
383
+ function rt(e, t) {
384
+ let n = Object.fromEntries(Ze.filter((t) => e[t] !== void 0).map((t) => [t, e[t]]));
192
385
  return {
193
386
  key: e.key,
194
387
  ...n,
195
388
  value: t
196
389
  };
197
390
  }
198
- function _(e, t = "") {
391
+ function k(e, t = "") {
199
392
  return Object.fromEntries(e.flatMap(({ key: e, label: n }) => n === void 0 ? [] : [[`${t}${e}`, n]]));
200
393
  }
201
- function v(e, t) {
202
- return me({
203
- ...se(t),
394
+ function A(e, t) {
395
+ return at({
396
+ ...Qe(t),
204
397
  ...e
205
398
  }, t);
206
399
  }
207
- function pe(e, t) {
208
- return me(e ?? {}, t);
400
+ function it(e, t) {
401
+ return at(e ?? {}, t);
209
402
  }
210
- function me(e, t) {
211
- return t.filter((t) => e[t.key] !== void 0).map((t) => fe(t, e[t.key]));
403
+ function at(e, t) {
404
+ return t.filter((t) => e[t.key] !== void 0).map((t) => rt(t, e[t.key]));
212
405
  }
213
406
  // src/schema/deviceSettings.ts
214
- var y = [
407
+ var j = [
215
408
  {
216
409
  prop: "tabletStyle",
217
410
  device: "Tablet"
@@ -228,87 +421,87 @@ var y = [
228
421
  prop: "mobileLandscapeStyle",
229
422
  device: "Landscape mobile"
230
423
  }
231
- ], he = {
424
+ ], ot = {
232
425
  showOnDesktop: "Show on desktop",
233
426
  showOnTablet: "Show on portrait tablet",
234
427
  showOnTabletLandscape: "Show on landscape tablet",
235
428
  showOnMobile: "Show on portrait mobile",
236
429
  showOnMobileLandscape: "Show on landscape mobile"
237
- }, ge = Object.fromEntries(re.map((t) => [t, e.boolean().optional()]));
238
- function _e(t) {
239
- let n = t ? Object.fromEntries(y.map(({ prop: e }) => [e, ue(t).optional()])) : {};
240
- return e.strictObject({
241
- ...ge,
242
- ...n
243
- }).refine((e) => ie(e) > 0, {
430
+ }, st = Object.fromEntries(Ke.map((e) => [e, d.boolean().optional()]));
431
+ function ct(e) {
432
+ let t = e ? Object.fromEntries(j.map(({ prop: t }) => [t, tt(e).optional()])) : {};
433
+ return d.strictObject({
434
+ ...st,
435
+ ...t
436
+ }).refine((e) => Ye(e) > 0, {
244
437
  path: ["showOnDesktop"],
245
438
  message: "Show the element on at least one device"
246
439
  });
247
440
  }
248
- function ve(e, t, n) {
441
+ function lt(e, t, n) {
249
442
  return Object.fromEntries(Object.entries(e).filter(([e]) => t.has(e) === n));
250
443
  }
251
- function ye(t, n) {
252
- let r = new Set(Object.keys(n.shape));
253
- return e.record(e.string(), e.unknown()).transform((i, a) => {
254
- let o = t.safeParse(ve(i, r, !1)), s = n.safeParse(ve(i, r, !0));
255
- for (let e of [...o.error?.issues ?? [], ...s.error?.issues ?? []]) a.addIssue({
444
+ function ut(e, t) {
445
+ let n = new Set(Object.keys(t.shape));
446
+ return d.record(d.string(), d.unknown()).transform((r, i) => {
447
+ let a = e.safeParse(lt(r, n, !1)), o = t.safeParse(lt(r, n, !0));
448
+ for (let e of [...a.error?.issues ?? [], ...o.error?.issues ?? []]) i.addIssue({
256
449
  code: "custom",
257
450
  path: e.path,
258
451
  message: e.message
259
452
  });
260
- return !o.success || !s.success ? e.NEVER : {
261
- ...o.data,
262
- ...be(s.data)
453
+ return !a.success || !o.success ? d.NEVER : {
454
+ ...a.data,
455
+ ...dt(o.data)
263
456
  };
264
457
  });
265
458
  }
266
- function be(e) {
267
- return Object.fromEntries(Object.entries(e).filter(([, e]) => !xe(e)));
459
+ function dt(e) {
460
+ return Object.fromEntries(Object.entries(e).filter(([, e]) => !ft(e)));
268
461
  }
269
- function xe(e) {
462
+ function ft(e) {
270
463
  return e === void 0 || typeof e == "object" && !!e && Object.keys(e).length === 0;
271
464
  }
272
- function Se(e) {
273
- return Object.fromEntries(p.flatMap(({ device: t, orientation: n }) => {
274
- let r = h(e, t, n);
275
- return (n === "portrait" ? !r : r !== h(e, t, "portrait")) ? [[m(t, n), r]] : [];
465
+ function pt(e) {
466
+ return Object.fromEntries(qe.flatMap(({ device: t, orientation: n }) => {
467
+ let r = D(e, t, n);
468
+ return (n === "portrait" ? !r : r !== D(e, t, "portrait")) ? [[Je(t, n), r]] : [];
276
469
  }));
277
470
  }
278
- function Ce(e, t) {
279
- return Object.fromEntries(y.flatMap(({ prop: n }) => {
280
- let r = pe(e[n], t);
471
+ function mt(e, t) {
472
+ return Object.fromEntries(j.flatMap(({ prop: n }) => {
473
+ let r = it(e[n], t);
281
474
  return r.length > 0 ? [[n, r]] : [];
282
475
  }));
283
476
  }
284
- function we(e) {
477
+ function ht(e) {
285
478
  return `${e.charAt(0).toLowerCase()}${e.slice(1)}`;
286
479
  }
287
- function Te(e) {
288
- return Object.fromEntries(y.flatMap(({ prop: t, device: n }) => Object.entries(_(e, `${t}.`)).map(([e, t]) => [e, `${n} ${we(t)}`])));
480
+ function gt(e) {
481
+ return Object.fromEntries(j.flatMap(({ prop: t, device: n }) => Object.entries(k(e, `${t}.`)).map(([e, t]) => [e, `${n} ${ht(t)}`])));
289
482
  }
290
- function b(e, t) {
483
+ function M(e, t) {
291
484
  return {
292
485
  ...e,
293
- attributes: ye(e.attributes, _e(t)),
486
+ attributes: ut(e.attributes, ct(t)),
294
487
  toDocumentAttributes: (n) => ({
295
488
  ...e.toDocumentAttributes(n),
296
- ...Se(n),
297
- ...t ? Ce(n, t) : {}
489
+ ...pt(n),
490
+ ...t ? mt(n, t) : {}
298
491
  }),
299
492
  history: {
300
493
  summary: e.history.summary,
301
494
  attributes: {
302
495
  ...e.history.attributes,
303
- ...he,
304
- ...t ? Te(t) : {}
496
+ ...ot,
497
+ ...t ? gt(t) : {}
305
498
  }
306
499
  }
307
500
  };
308
501
  }
309
502
  // src/schema/addressSchema.ts
310
- var Ee = "Enter an https:// address or a path that starts with /";
311
- function De(e) {
503
+ var _t = "Enter an https:// address or a path that starts with /";
504
+ function vt(e) {
312
505
  if (e.startsWith("/")) return !e.startsWith("//") && !e.startsWith("/\\");
313
506
  try {
314
507
  let { protocol: t } = new URL(e);
@@ -317,217 +510,33 @@ function De(e) {
317
510
  return !1;
318
511
  }
319
512
  }
320
- var x = e.string().trim().min(1, Ee).refine(De, Ee), Oe = ["_self", "_blank"], S = {
513
+ var N = d.string().trim().min(1, _t).refine(vt, _t), yt = ["_self", "_blank"], P = {
321
514
  href: "",
322
515
  target: "_self",
323
516
  description: ""
324
- }, C = {
325
- href: e.string().trim().pipe(e.union([e.literal(""), x])).default(S.href),
326
- target: e.enum(Oe).default(S.target),
327
- description: e.string().trim().default(S.description)
328
- }, w = {
517
+ }, F = {
518
+ href: d.string().trim().pipe(d.union([d.literal(""), N])).default(P.href),
519
+ target: d.enum(yt).default(P.target),
520
+ description: d.string().trim().default(P.description)
521
+ }, I = {
329
522
  href: "Link address",
330
523
  target: "Link target",
331
524
  description: "Link description"
332
525
  };
333
- function T({ href: e, target: t, description: n }) {
526
+ function L({ href: e, target: t, description: n }) {
334
527
  return e === "" ? {} : {
335
528
  href: e,
336
- ...t === S.target ? {} : { target: t },
529
+ ...t === P.target ? {} : { target: t },
337
530
  ...n === "" ? {} : { description: n }
338
531
  };
339
532
  }
340
- // src/schema/PRichText/richTextMarks.ts
341
- var ke = /^[A-Za-z0-9][A-Za-z0-9 ]*$/;
342
- function E(e) {
343
- return typeof e == "string" && ke.test(e);
344
- }
345
- // src/schema/style/page-styles.ts
346
- var Ae = /^#[0-9A-Fa-f]{6}$/;
347
- function je(e) {
348
- return Ae.test(e) ? [
349
- Number.parseInt(e.slice(1, 3), 16),
350
- Number.parseInt(e.slice(3, 5), 16),
351
- Number.parseInt(e.slice(5, 7), 16)
352
- ] : null;
353
- }
354
- function D(e) {
355
- let t = je(e.hex);
356
- if (!t || !Number.isFinite(e.opacity)) return;
357
- if (e.opacity === 100) return e.hex.toUpperCase();
358
- let n = Math.min(100, Math.max(0, e.opacity)) / 100, [r, i, a] = t;
359
- return `rgba(${r}, ${i}, ${a}, ${n})`;
360
- }
361
- function Me(e) {
362
- if (!(!Number.isFinite(e) || e <= 0)) return `${e}px`;
363
- }
364
- // src/schema/style/backgroundStyle.ts
365
- function Ne(e) {
366
- if (e.backgroundType === "gradient") return "transparent";
367
- if (e.backgroundColor) return D(e.backgroundColor);
368
- }
369
- function Pe(e) {
370
- if (e.backgroundType !== "gradient") return "none";
371
- if (e.backgroundGradient) return o(e.backgroundGradient);
372
- }
373
- function Fe(e, t) {
374
- return e.backgroundType ? {
375
- [`${t}-background-color`]: Ne(e),
376
- [`${t}-background-image`]: Pe(e)
377
- } : {};
378
- }
379
- // src/schema/style/elementStyle.ts
380
- var O = [
381
- "none",
382
- "solid",
383
- "dashed",
384
- "dotted",
385
- "double"
386
- ], Ie = [
387
- "row",
388
- "column",
389
- "row-reverse",
390
- "column-reverse"
391
- ], Le = [
392
- "nowrap",
393
- "wrap",
394
- "wrap-reverse"
395
- ], k = [
396
- "flex-start",
397
- "center",
398
- "flex-end",
399
- "space-between",
400
- "space-around",
401
- "space-evenly"
402
- ], Re = [
403
- "stretch",
404
- "flex-start",
405
- "center",
406
- "flex-end",
407
- "baseline"
408
- ], ze = ["stretch", ...k], A = {
409
- layout: "block",
410
- flexDirection: "row",
411
- flexWrap: "nowrap",
412
- justifyContent: "flex-start",
413
- alignItems: "stretch",
414
- alignContent: "stretch",
415
- rowGap: "0",
416
- columnGap: "0",
417
- backgroundType: "color",
418
- backgroundColor: {
419
- hex: "#FFFFFF",
420
- opacity: 0
421
- },
422
- backgroundGradient: {
423
- kind: "linear",
424
- value: "135deg, #2563EB, #7C3AED"
425
- },
426
- overflow: "show",
427
- overflowVertical: !0,
428
- overflowHorizontal: !0,
429
- width: "auto",
430
- height: "auto",
431
- minWidth: "auto",
432
- minHeight: "auto",
433
- maxWidth: "auto",
434
- maxHeight: "auto",
435
- paddingTop: "auto",
436
- paddingBottom: "auto",
437
- paddingLeft: "auto",
438
- paddingRight: "auto",
439
- marginTop: "0",
440
- marginBottom: "0",
441
- marginLeft: "0",
442
- marginRight: "0",
443
- borderRadiusTopLeft: "0",
444
- borderRadiusTopRight: "0",
445
- borderRadiusBottomRight: "0",
446
- borderRadiusBottomLeft: "0",
447
- borderWidth: "0",
448
- borderStyle: "solid",
449
- borderColor: {
450
- hex: "#000000",
451
- opacity: 100
452
- }
453
- }, Be = /^(auto|0|-?\d+(\.\d+)?(px|rem|em|%))$/i, Ve = /^(0|\d+(\.\d+)?(px|rem|em))$/i;
454
- function j(e) {
455
- let t = e.trim();
456
- if (Be.test(t)) return t;
457
- }
458
- function M(e) {
459
- let t = j(e);
460
- if (t != null) return t.toLowerCase() === "auto" ? "0" : t;
461
- }
462
- function N(e) {
463
- let t = j(e);
464
- return t?.toLowerCase() === "auto" ? "none" : t;
465
- }
466
- function He(e) {
467
- let t = e.trim();
468
- return Ve.test(t) ? t : void 0;
469
- }
470
- function Ue(e, t) {
471
- return e === "hide" ? "hidden" : t ? "auto" : "hidden";
472
- }
473
- var We = [
474
- "marginTop",
475
- "marginBottom",
476
- "marginLeft",
477
- "marginRight"
478
- ];
479
- function Ge(e) {
480
- return e.trim().toLowerCase() === "auto";
481
- }
482
- function P(e, t) {
483
- return We.every((t) => Ge(e[t])) ? "0" : j(e[t]);
484
- }
485
- function Ke(e) {
486
- return e.layout !== "grid" || e.gridColumns == null ? "none" : `repeat(${e.gridColumns}, minmax(0, 1fr))`;
487
- }
488
- function qe(e, t) {
489
- let n = {
490
- ...A,
491
- ...e
492
- }, r = `--palmyit-${t}`;
493
- return {
494
- [`${r}-display`]: n.layout,
495
- [`${r}-grid-template-columns`]: Ke(n),
496
- [`${r}-flex-direction`]: n.flexDirection,
497
- [`${r}-flex-wrap`]: n.flexWrap,
498
- [`${r}-justify-content`]: n.justifyContent,
499
- [`${r}-align-items`]: n.alignItems,
500
- [`${r}-align-content`]: n.alignContent,
501
- [`${r}-row-gap`]: M(n.rowGap),
502
- [`${r}-column-gap`]: M(n.columnGap),
503
- [`${r}-overflow-x`]: Ue(n.overflow, n.overflowHorizontal),
504
- [`${r}-overflow-y`]: Ue(n.overflow, n.overflowVertical),
505
- [`${r}-width`]: j(n.width),
506
- [`${r}-height`]: j(n.height),
507
- [`${r}-min-width`]: j(n.minWidth),
508
- [`${r}-min-height`]: j(n.minHeight),
509
- [`${r}-max-width`]: N(n.maxWidth),
510
- [`${r}-max-height`]: N(n.maxHeight),
511
- [`${r}-padding-top`]: M(n.paddingTop),
512
- [`${r}-padding-bottom`]: M(n.paddingBottom),
513
- [`${r}-padding-left`]: M(n.paddingLeft),
514
- [`${r}-padding-right`]: M(n.paddingRight),
515
- [`${r}-margin-top`]: P(n, "marginTop"),
516
- [`${r}-margin-bottom`]: P(n, "marginBottom"),
517
- [`${r}-margin-left`]: P(n, "marginLeft"),
518
- [`${r}-margin-right`]: P(n, "marginRight"),
519
- [`${r}-border-top-left-radius`]: M(n.borderRadiusTopLeft),
520
- [`${r}-border-top-right-radius`]: M(n.borderRadiusTopRight),
521
- [`${r}-border-bottom-right-radius`]: M(n.borderRadiusBottomRight),
522
- [`${r}-border-bottom-left-radius`]: M(n.borderRadiusBottomLeft),
523
- [`${r}-border-width`]: He(n.borderWidth),
524
- [`${r}-border-style`]: n.borderStyle,
525
- [`${r}-border-color`]: D(n.borderColor),
526
- ...Fe(n, r)
527
- };
533
+ // src/elements/rich-text/richTextMarks.ts
534
+ var bt = /^[A-Za-z0-9][A-Za-z0-9 ]*$/;
535
+ function xt(e) {
536
+ return typeof e == "string" && bt.test(e);
528
537
  }
529
538
  // src/schema/elementStyleDefinitions.ts
530
- var F = e.string().trim().regex(Be, "Expected auto, 0, or a px, rem, em, or % length"), I = [
539
+ var R = [
531
540
  [
532
541
  "width",
533
542
  "width",
@@ -619,23 +628,23 @@ var F = e.string().trim().regex(Be, "Expected auto, 0, or a px, rem, em, or % le
619
628
  "Radius bottom left"
620
629
  ]
621
630
  ];
622
- function Je(t) {
623
- let n = `--palmyit-${t}`, r = {
631
+ function St(e) {
632
+ let t = `--palmyit-${e}`, n = {
624
633
  key: "gridColumns",
625
- variable: `${n}-grid-template-columns`,
626
- value: e.union([
627
- e.literal(2),
628
- e.literal(3),
629
- e.literal(4)
634
+ variable: `${t}-grid-template-columns`,
635
+ value: d.union([
636
+ d.literal(2),
637
+ d.literal(3),
638
+ d.literal(4)
630
639
  ]),
631
640
  label: "Grid columns"
632
641
  };
633
642
  return [
634
643
  {
635
644
  key: "layout",
636
- variable: `${n}-display`,
645
+ variable: `${t}-display`,
637
646
  attribute: "data-layout",
638
- value: e.enum([
647
+ value: d.enum([
639
648
  "block",
640
649
  "flex",
641
650
  "grid"
@@ -643,139 +652,139 @@ function Je(t) {
643
652
  defaultValue: "block",
644
653
  label: "Layout"
645
654
  },
646
- r,
647
- ...Ye(t)
655
+ n,
656
+ ...Ct(e)
648
657
  ];
649
658
  }
650
- function Ye(t) {
651
- let n = `--palmyit-${t}`;
659
+ function Ct(e) {
660
+ let t = `--palmyit-${e}`;
652
661
  return [
653
662
  {
654
663
  key: "flexDirection",
655
- variable: `${n}-flex-direction`,
656
- value: e.enum(Ie),
657
- defaultValue: A.flexDirection,
664
+ variable: `${t}-flex-direction`,
665
+ value: d.enum(he),
666
+ defaultValue: g.flexDirection,
658
667
  label: "Direction"
659
668
  },
660
669
  {
661
670
  key: "flexWrap",
662
- variable: `${n}-flex-wrap`,
663
- value: e.enum(Le),
664
- defaultValue: A.flexWrap,
671
+ variable: `${t}-flex-wrap`,
672
+ value: d.enum(ge),
673
+ defaultValue: g.flexWrap,
665
674
  label: "Wrap"
666
675
  },
667
676
  {
668
677
  key: "justifyContent",
669
- variable: `${n}-justify-content`,
670
- value: e.enum(k),
671
- defaultValue: A.justifyContent,
678
+ variable: `${t}-justify-content`,
679
+ value: d.enum(_e),
680
+ defaultValue: g.justifyContent,
672
681
  label: "Justify"
673
682
  },
674
683
  {
675
684
  key: "alignItems",
676
- variable: `${n}-align-items`,
677
- value: e.enum(Re),
678
- defaultValue: A.alignItems,
685
+ variable: `${t}-align-items`,
686
+ value: d.enum(ve),
687
+ defaultValue: g.alignItems,
679
688
  label: "Align items"
680
689
  },
681
690
  {
682
691
  key: "alignContent",
683
- variable: `${n}-align-content`,
684
- value: e.enum(ze),
685
- defaultValue: A.alignContent,
692
+ variable: `${t}-align-content`,
693
+ value: d.enum(ye),
694
+ defaultValue: g.alignContent,
686
695
  label: "Align content"
687
696
  },
688
697
  {
689
698
  key: "rowGap",
690
- variable: `${n}-row-gap`,
691
- value: F,
692
- defaultValue: A.rowGap,
699
+ variable: `${t}-row-gap`,
700
+ value: S,
701
+ defaultValue: g.rowGap,
693
702
  label: "Row gap"
694
703
  },
695
704
  {
696
705
  key: "columnGap",
697
- variable: `${n}-column-gap`,
698
- value: F,
699
- defaultValue: A.columnGap,
706
+ variable: `${t}-column-gap`,
707
+ value: S,
708
+ defaultValue: g.columnGap,
700
709
  label: "Column gap"
701
710
  }
702
711
  ];
703
712
  }
704
- function Xe(t, n) {
705
- let r = `--palmyit-${t}`;
713
+ function wt(e, t) {
714
+ let n = `--palmyit-${e}`;
706
715
  return [
707
716
  {
708
717
  key: "overflow",
709
718
  variables: {
710
- x: `${r}-overflow-x`,
711
- y: `${r}-overflow-y`
719
+ x: `${n}-overflow-x`,
720
+ y: `${n}-overflow-y`
712
721
  },
713
- value: e.enum(["show", "hide"]),
714
- defaultValue: n.overflow,
722
+ value: d.enum(["show", "hide"]),
723
+ defaultValue: t.overflow,
715
724
  label: "Overflowing contents"
716
725
  },
717
726
  {
718
727
  key: "overflowHorizontal",
719
- variable: `${r}-overflow-x`,
720
- value: e.boolean(),
721
- defaultValue: n.overflowHorizontal,
728
+ variable: `${n}-overflow-x`,
729
+ value: d.boolean(),
730
+ defaultValue: t.overflowHorizontal,
722
731
  label: "Horizontal overflow"
723
732
  },
724
733
  {
725
734
  key: "overflowVertical",
726
- variable: `${r}-overflow-y`,
727
- value: e.boolean(),
728
- defaultValue: n.overflowVertical,
735
+ variable: `${n}-overflow-y`,
736
+ value: d.boolean(),
737
+ defaultValue: t.overflowVertical,
729
738
  label: "Vertical overflow"
730
739
  }
731
740
  ];
732
741
  }
733
- function Ze(e, t) {
734
- return I.map(([n, r, i]) => ({
742
+ function Tt(e, t) {
743
+ return R.map(([n, r, i]) => ({
735
744
  key: n,
736
745
  variable: `--palmyit-${e}-${r}`,
737
- value: F,
746
+ value: S,
738
747
  defaultValue: t[n],
739
748
  label: i
740
749
  }));
741
750
  }
742
- function Qe(t, n) {
743
- let r = `--palmyit-${t}`;
751
+ function Et(e, t) {
752
+ let n = `--palmyit-${e}`;
744
753
  return [
745
754
  {
746
755
  key: "borderWidth",
747
- variable: `${r}-border-width`,
748
- value: F,
749
- defaultValue: n.borderWidth,
756
+ variable: `${n}-border-width`,
757
+ value: Pe,
758
+ defaultValue: t.borderWidth,
750
759
  label: "Border width"
751
760
  },
752
761
  {
753
762
  key: "borderStyle",
754
- variable: `${r}-border-style`,
755
- value: e.enum(O),
756
- defaultValue: n.borderStyle,
763
+ variable: `${n}-border-style`,
764
+ value: d.enum(h),
765
+ defaultValue: t.borderStyle,
757
766
  label: "Border style"
758
767
  },
759
768
  {
760
769
  key: "borderColor",
761
- variable: `${r}-border-color`,
762
- value: s,
763
- defaultValue: n.borderColor,
770
+ variable: `${n}-border-color`,
771
+ value: C,
772
+ defaultValue: t.borderColor,
764
773
  label: "Border color"
765
774
  }
766
775
  ];
767
776
  }
768
- function $e(e, t) {
777
+ function Dt(e, t) {
769
778
  return [
770
- ...Je(e),
771
- ...Xe(e, t),
772
- ...Ze(e, t),
773
- ...Qe(e, t),
774
- ...l(`--palmyit-${e}`, { defaults: t })
779
+ ...St(e),
780
+ ...wt(e, t),
781
+ ...Tt(e, t),
782
+ ...Et(e, t),
783
+ ...w(`--palmyit-${e}`, { defaults: t })
775
784
  ];
776
785
  }
777
- function et(e, t) {
778
- return g(e).transform((e) => ({
786
+ function Ot(e, t) {
787
+ return O(e).transform((e) => ({
779
788
  ...t,
780
789
  ...e
781
790
  })).superRefine((e, t) => {
@@ -787,98 +796,98 @@ function et(e, t) {
787
796
  });
788
797
  }
789
798
  // src/schema/Fields/IconPicker/iconCatalog.ts
790
- var tt = /^MdOutline[A-Z0-9]/, nt = "";
791
- function L(e) {
792
- return tt.test(e);
799
+ var kt = /^MdOutline[A-Z0-9]/, At = "";
800
+ function z(e) {
801
+ return kt.test(e);
793
802
  }
794
- function rt(e) {
803
+ function jt(e) {
795
804
  return e.replace(/^MdOutline/, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2");
796
805
  }
797
- // src/schema/PButton/pButton.definition.ts
798
- var it = {
806
+ // src/elements/button/definition.ts
807
+ var Mt = {
799
808
  name: "Button",
800
809
  startIcon: "",
801
810
  endIcon: "",
802
- ...S,
811
+ ...P,
803
812
  style: {}
804
- }, at = e.string().refine((e) => e === "" || L(e), "Expected an outlined Material icon name such as MdOutlineHome").default("");
805
- function ot(e, t) {
813
+ }, Nt = d.string().refine((e) => e === "" || z(e), "Expected an outlined Material icon name such as MdOutlineHome").default("");
814
+ function Pt(e, t) {
806
815
  return t === "" ? {} : { [e]: t };
807
816
  }
808
- var R = "--palmyit-button", z = [
809
- ...l(R, { typeAttribute: "data-background" }),
817
+ var B = "--palmyit-button", V = [
818
+ ...w(B, { typeAttribute: "data-background" }),
810
819
  {
811
820
  key: "borderWidth",
812
- variable: `${R}-border-width`,
813
- value: F,
821
+ variable: `${B}-border-width`,
822
+ value: Pe,
814
823
  label: "Border width"
815
824
  },
816
825
  {
817
826
  key: "borderStyle",
818
- variable: `${R}-border-style`,
819
- value: e.enum(O),
827
+ variable: `${B}-border-style`,
828
+ value: d.enum(h),
820
829
  label: "Border style"
821
830
  },
822
831
  {
823
832
  key: "borderColor",
824
- variable: `${R}-border-color`,
825
- value: s,
833
+ variable: `${B}-border-color`,
834
+ value: C,
826
835
  label: "Border color"
827
836
  },
828
- ...I.map(([e, t, n]) => ({
837
+ ...R.map(([e, t, n]) => ({
829
838
  key: e,
830
- variable: `${R}-${t}`,
831
- value: F,
839
+ variable: `${B}-${t}`,
840
+ value: S,
832
841
  label: n
833
842
  })),
834
843
  {
835
844
  key: "textColor",
836
- variable: `${R}-text-color`,
837
- value: s,
845
+ variable: `${B}-text-color`,
846
+ value: C,
838
847
  label: "Text color"
839
848
  },
840
849
  {
841
850
  key: "textFont",
842
- variable: `${R}-font-family`,
843
- value: e.string().refine(E, "Expected a Google Fonts family name"),
851
+ variable: `${B}-font-family`,
852
+ value: d.string().refine(xt, "Expected a Google Fonts family name"),
844
853
  label: "Font"
845
854
  },
846
855
  {
847
856
  key: "textSize",
848
- variable: `${R}-font-size`,
849
- value: F,
857
+ variable: `${B}-font-size`,
858
+ value: Fe,
850
859
  label: "Text size"
851
860
  },
852
861
  {
853
862
  key: "iconGap",
854
- variable: `${R}-gap`,
855
- value: F,
863
+ variable: `${B}-gap`,
864
+ value: S,
856
865
  label: "Icon gap"
857
866
  }
858
- ], st = b(n({
867
+ ], Ft = M(p({
859
868
  type: "PButton",
860
869
  label: "Button",
861
870
  allowedChildren: [],
862
871
  templates: [],
863
- attributes: e.strictObject({
864
- id: t,
865
- name: e.string().trim().min(1, "Enter a button label").default(it.name),
866
- startIcon: at,
867
- endIcon: at,
868
- ...C,
869
- style: g(z).transform((e) => e)
872
+ attributes: d.strictObject({
873
+ id: f,
874
+ name: d.string().trim().min(1, "Enter a button label").default(Mt.name),
875
+ startIcon: Nt,
876
+ endIcon: Nt,
877
+ ...F,
878
+ style: O(V).transform((e) => e)
870
879
  }),
871
880
  toDocumentAttributes: ({ id: e, name: t, startIcon: n, endIcon: r, href: i, target: a, description: o, style: s }) => ({
872
881
  id: e,
873
882
  name: t,
874
- ...ot("startIcon", n),
875
- ...ot("endIcon", r),
876
- ...T({
883
+ ...Pt("startIcon", n),
884
+ ...Pt("endIcon", r),
885
+ ...L({
877
886
  href: i,
878
887
  target: a,
879
888
  description: o
880
889
  }),
881
- style: v(s, z)
890
+ style: A(s, V)
882
891
  }),
883
892
  history: {
884
893
  summary: ({ name: e }) => e,
@@ -886,22 +895,22 @@ var R = "--palmyit-button", z = [
886
895
  name: "Label",
887
896
  startIcon: "Start icon",
888
897
  endIcon: "End icon",
889
- ...w,
890
- ..._(z, "style.")
898
+ ...I,
899
+ ...k(V, "style.")
891
900
  }
892
901
  }
893
- }), z), B = {
902
+ }), V), H = {
894
903
  label: "Checkbox",
895
904
  checked: !1
896
- }, ct = b(n({
905
+ }, It = M(p({
897
906
  type: "PCheckbox",
898
907
  label: "Checkbox input",
899
908
  allowedChildren: [],
900
909
  templates: [],
901
- attributes: e.strictObject({
902
- id: t,
903
- label: e.string().trim().min(1, "Enter a label").default(B.label),
904
- checked: e.boolean().default(B.checked)
910
+ attributes: d.strictObject({
911
+ id: f,
912
+ label: d.string().trim().min(1, "Enter a label").default(H.label),
913
+ checked: d.boolean().default(H.checked)
905
914
  }),
906
915
  toDocumentAttributes: ({ id: e, label: t, checked: n }) => ({
907
916
  id: e,
@@ -917,29 +926,29 @@ var R = "--palmyit-button", z = [
917
926
  }
918
927
  }));
919
928
  // src/schema/layoutElementConfiguration.ts
920
- function V({ type: r, label: i, kind: a, defaultStyle: o, allowedChildren: s, templates: c }) {
921
- let l = $e(a, o);
922
- return b(n({
923
- type: r,
924
- label: i,
925
- allowedChildren: s,
926
- templates: c,
927
- attributes: e.strictObject({
928
- id: t,
929
- style: et(l, o)
929
+ function U({ type: e, label: t, kind: n, defaultStyle: r, allowedChildren: i, templates: a }) {
930
+ let o = Dt(n, r);
931
+ return M(p({
932
+ type: e,
933
+ label: t,
934
+ allowedChildren: i,
935
+ templates: a,
936
+ attributes: d.strictObject({
937
+ id: f,
938
+ style: Ot(o, r)
930
939
  }),
931
940
  toDocumentAttributes: ({ id: e, style: t }) => ({
932
941
  id: e,
933
- style: v(t, l)
942
+ style: A(t, o)
934
943
  }),
935
944
  history: {
936
- summary: () => i,
937
- attributes: _(l, "style.")
945
+ summary: () => t,
946
+ attributes: k(o, "style.")
938
947
  }
939
- }), l);
948
+ }), o);
940
949
  }
941
950
  // src/schema/layoutChildren.ts
942
- var H = [
951
+ var W = [
943
952
  "PContainer",
944
953
  "PButton",
945
954
  "PText",
@@ -955,26 +964,26 @@ var H = [
955
964
  "PCheckbox",
956
965
  "PRadio",
957
966
  "PSelect"
958
- ], lt = { ...A }, ut = V({
967
+ ], Lt = { ...g }, Rt = U({
959
968
  type: "PContainer",
960
969
  label: "Container",
961
970
  kind: "container",
962
- defaultStyle: lt,
963
- allowedChildren: H,
971
+ defaultStyle: Lt,
972
+ allowedChildren: W,
964
973
  templates: []
965
- }), dt = [
974
+ }), zt = [
966
975
  "1",
967
976
  "2",
968
977
  "3",
969
978
  "4"
970
- ], ft = { size: "4" }, pt = b(n({
979
+ ], Bt = { size: "4" }, Vt = M(p({
971
980
  type: "PDivider",
972
981
  label: "Divider",
973
982
  allowedChildren: [],
974
983
  templates: [],
975
- attributes: e.strictObject({
976
- id: t,
977
- size: e.enum(dt).default(ft.size)
984
+ attributes: d.strictObject({
985
+ id: f,
986
+ size: d.enum(zt).default(Bt.size)
978
987
  }),
979
988
  toDocumentAttributes: ({ id: e, size: t }) => ({
980
989
  id: e,
@@ -984,20 +993,20 @@ var H = [
984
993
  summary: () => "",
985
994
  attributes: { size: "Width" }
986
995
  }
987
- })), U = {
996
+ })), G = {
988
997
  icon: "MdOutlineStarBorder",
989
998
  label: "Icon",
990
- ...S
991
- }, mt = b(n({
999
+ ...P
1000
+ }, Ht = M(p({
992
1001
  type: "PIcon",
993
1002
  label: "Icon",
994
1003
  allowedChildren: [],
995
1004
  templates: [],
996
- attributes: e.strictObject({
997
- id: t,
998
- icon: e.string().refine(L, "Choose an outlined Material icon such as MdOutlineHome").default(U.icon),
999
- label: e.string().trim().default(U.label),
1000
- ...C
1005
+ attributes: d.strictObject({
1006
+ id: f,
1007
+ icon: d.string().refine(z, "Choose an outlined Material icon such as MdOutlineHome").default(G.icon),
1008
+ label: d.string().trim().default(G.label),
1009
+ ...F
1001
1010
  }).refine(({ href: e, label: t }) => e === "" || t !== "", {
1002
1011
  path: ["label"],
1003
1012
  message: "Describe a linked icon so the link has a name"
@@ -1006,79 +1015,79 @@ var H = [
1006
1015
  id: e,
1007
1016
  icon: t,
1008
1017
  label: n,
1009
- ...T({
1018
+ ...L({
1010
1019
  href: r,
1011
1020
  target: i,
1012
1021
  description: a
1013
1022
  })
1014
1023
  }),
1015
1024
  history: {
1016
- summary: ({ icon: e, label: t }) => t || rt(e),
1025
+ summary: ({ icon: e, label: t }) => t || jt(e),
1017
1026
  attributes: {
1018
1027
  icon: "Icon",
1019
1028
  label: "Description",
1020
- ...w
1029
+ ...I
1021
1030
  }
1022
1031
  }
1023
- })), ht = [
1032
+ })), Ut = [
1024
1033
  "width",
1025
1034
  "height",
1026
1035
  "minWidth",
1027
1036
  "minHeight",
1028
1037
  "maxWidth",
1029
1038
  "maxHeight"
1030
- ], gt = [
1039
+ ], Wt = [
1031
1040
  "borderRadiusTopLeft",
1032
1041
  "borderRadiusTopRight",
1033
1042
  "borderRadiusBottomRight",
1034
1043
  "borderRadiusBottomLeft"
1035
- ], _t = [...ht, ...gt], W = {
1044
+ ], Gt = [...Ut, ...Wt], Kt = {
1036
1045
  src: "/image-placeholder.svg",
1037
1046
  alt: "Image",
1038
1047
  style: {},
1039
- ...S
1040
- }, G = "--palmyit-image";
1041
- function vt(e) {
1042
- return I.filter(([t]) => e.includes(t)).map(([e, t, n]) => ({
1048
+ ...P
1049
+ }, K = "--palmyit-image";
1050
+ function qt(e) {
1051
+ return R.filter(([t]) => e.includes(t)).map(([e, t, n]) => ({
1043
1052
  key: e,
1044
- variable: `${G}-${t}`,
1045
- value: F,
1053
+ variable: `${K}-${t}`,
1054
+ value: S,
1046
1055
  label: n
1047
1056
  }));
1048
1057
  }
1049
- var K = [
1050
- ...vt(ht),
1051
- ...l(G, { typeAttribute: "data-background" }),
1058
+ var q = [
1059
+ ...qt(Ut),
1060
+ ...w(K, { typeAttribute: "data-background" }),
1052
1061
  {
1053
1062
  key: "borderWidth",
1054
- variable: `${G}-border-width`,
1055
- value: F,
1063
+ variable: `${K}-border-width`,
1064
+ value: Pe,
1056
1065
  label: "Border width"
1057
1066
  },
1058
1067
  {
1059
1068
  key: "borderStyle",
1060
- variable: `${G}-border-style`,
1061
- value: e.enum(O),
1069
+ variable: `${K}-border-style`,
1070
+ value: d.enum(h),
1062
1071
  label: "Border style"
1063
1072
  },
1064
1073
  {
1065
1074
  key: "borderColor",
1066
- variable: `${G}-border-color`,
1067
- value: s,
1075
+ variable: `${K}-border-color`,
1076
+ value: C,
1068
1077
  label: "Border color"
1069
1078
  },
1070
- ...vt(gt)
1071
- ], yt = b(n({
1079
+ ...qt(Wt)
1080
+ ], Jt = M(p({
1072
1081
  type: "PImage",
1073
1082
  label: "Image",
1074
1083
  allowedChildren: [],
1075
1084
  templates: [],
1076
- attributes: e.strictObject({
1077
- id: t,
1078
- src: x.default(W.src),
1079
- alt: e.string().trim().default(W.alt),
1080
- style: g(K).transform((e) => e),
1081
- ...C
1085
+ attributes: d.strictObject({
1086
+ id: f,
1087
+ src: N.default(Kt.src),
1088
+ alt: d.string().trim().default(Kt.alt),
1089
+ style: O(q).transform((e) => e),
1090
+ ...F
1082
1091
  }).refine(({ href: e, alt: t }) => e === "" || t !== "", {
1083
1092
  path: ["alt"],
1084
1093
  message: "Describe a linked image so the link has a name"
@@ -1087,8 +1096,8 @@ var K = [
1087
1096
  id: e,
1088
1097
  src: t,
1089
1098
  alt: n,
1090
- style: v(r, K),
1091
- ...T({
1099
+ style: A(r, q),
1100
+ ...L({
1092
1101
  href: i,
1093
1102
  target: a,
1094
1103
  description: o
@@ -1099,85 +1108,82 @@ var K = [
1099
1108
  attributes: {
1100
1109
  src: "Image address",
1101
1110
  alt: "Description",
1102
- ...w,
1103
- ..._(K, "style.")
1111
+ ...I,
1112
+ ...k(q, "style.")
1104
1113
  }
1105
1114
  }
1106
- }), K);
1115
+ }), q);
1107
1116
  // src/schema/textItems.ts
1108
- function q(t, n) {
1109
- return e.array(e.strictObject({ text: e.string().trim().min(1, n) })).min(1, t);
1117
+ function J(e, t) {
1118
+ return d.array(d.strictObject({ text: d.string().trim().min(1, t) })).min(1, e);
1110
1119
  }
1111
- function J(e) {
1120
+ function Y(e) {
1112
1121
  return e.map(({ text: e }) => ({ text: e }));
1113
1122
  }
1114
- // src/schema/PList/pList.definition.ts
1115
- var bt = { items: [
1123
+ // src/elements/list/definition.ts
1124
+ var Yt = { items: [
1116
1125
  { text: "First item" },
1117
1126
  { text: "Second item" },
1118
1127
  { text: "Third item" }
1119
- ] }, xt = b(n({
1128
+ ] }, Xt = M(p({
1120
1129
  type: "PList",
1121
1130
  label: "List",
1122
1131
  allowedChildren: [],
1123
1132
  templates: [],
1124
- attributes: e.strictObject({
1125
- id: t,
1126
- items: q("Add a list item", "Enter item text").default(bt.items)
1133
+ attributes: d.strictObject({
1134
+ id: f,
1135
+ items: J("Add a list item", "Enter item text").default(Yt.items)
1127
1136
  }),
1128
1137
  toDocumentAttributes: ({ id: e, items: t }) => ({
1129
1138
  id: e,
1130
- items: J(t)
1139
+ items: Y(t)
1131
1140
  }),
1132
1141
  history: {
1133
1142
  summary: ({ items: e }) => e[0]?.text ?? "",
1134
1143
  attributes: { items: "Items" }
1135
1144
  }
1136
- })), St = /^\/([a-z0-9]+(-[a-z0-9]+)*)?$/, Ct = e.strictObject({
1137
- hex: e.string().regex(/^#[0-9A-Fa-f]{6}$/, "Expected a #RRGGBB color"),
1138
- opacity: e.number().int().min(0).max(100)
1139
- }), Y = {
1145
+ })), Zt = /^\/([a-z0-9]+(-[a-z0-9]+)*)?$/, X = {
1140
1146
  backgroundColor: {
1141
- hex: "#FFFFFF",
1147
+ name: "white",
1142
1148
  opacity: 100
1143
1149
  },
1144
1150
  textColor: {
1145
- hex: "#0F172A",
1151
+ name: "slate-900",
1146
1152
  opacity: 100
1147
1153
  },
1148
- textSize: 14
1149
- }, X = [
1154
+ textSize: "sm"
1155
+ }, Z = [
1150
1156
  {
1151
1157
  key: "backgroundColor",
1152
1158
  variable: "--palmyit-page-background-color",
1153
- value: Ct,
1154
- defaultValue: Y.backgroundColor,
1159
+ value: C,
1160
+ defaultValue: X.backgroundColor,
1155
1161
  label: "Background color"
1156
1162
  },
1157
1163
  {
1158
1164
  key: "textColor",
1159
1165
  variable: "--palmyit-page-text-color",
1160
- value: Ct,
1161
- defaultValue: Y.textColor,
1166
+ value: C,
1167
+ defaultValue: X.textColor,
1162
1168
  label: "Text color"
1163
1169
  },
1164
1170
  {
1165
1171
  key: "textSize",
1166
1172
  variable: "--palmyit-page-font-size",
1167
- value: e.number().min(1).max(200),
1168
- defaultValue: Y.textSize,
1173
+ value: Fe,
1174
+ defaultValue: X.textSize,
1169
1175
  label: "Text size"
1170
1176
  }
1171
- ], wt = X.map(({ key: e }) => e), Tt = n({
1177
+ ], Qt = Z.map(({ key: e }) => e), $t = p({
1172
1178
  type: "PPage",
1173
1179
  label: "Page",
1174
1180
  allowedChildren: ["PSection"],
1175
1181
  templates: [],
1176
- attributes: e.strictObject({
1177
- id: t,
1178
- url: e.string().regex(St, "Expected / or a lowercase path such as /about-us"),
1179
- title: e.string().default(""),
1180
- style: g(X)
1182
+ attributes: d.strictObject({
1183
+ id: f,
1184
+ url: d.string().regex(Zt, "Expected / or a lowercase path such as /about-us"),
1185
+ title: d.string().default(""),
1186
+ style: O(Z)
1181
1187
  }).transform(({ id: e, url: t, title: n, style: r }) => ({
1182
1188
  pageId: e,
1183
1189
  url: t,
@@ -1188,33 +1194,33 @@ var bt = { items: [
1188
1194
  id: e,
1189
1195
  url: t,
1190
1196
  title: n,
1191
- style: v(r, X)
1197
+ style: A(r, Z)
1192
1198
  }),
1193
1199
  history: {
1194
1200
  summary: ({ title: e, url: t }) => e || t,
1195
1201
  attributes: {
1196
1202
  title: "Title",
1197
1203
  url: "URL",
1198
- ..._(X)
1204
+ ...k(Z)
1199
1205
  }
1200
1206
  }
1201
- }), Et = {
1207
+ }), en = {
1202
1208
  legend: "Choose one",
1203
1209
  options: [{ text: "Option 1" }, { text: "Option 2" }]
1204
- }, Dt = b(n({
1210
+ }, tn = M(p({
1205
1211
  type: "PRadio",
1206
1212
  label: "Radio input",
1207
1213
  allowedChildren: [],
1208
1214
  templates: [],
1209
- attributes: e.strictObject({
1210
- id: t,
1211
- legend: e.string().trim().min(1, "Enter a question").default(Et.legend),
1212
- options: q("Add an option", "Enter option text").default(Et.options)
1215
+ attributes: d.strictObject({
1216
+ id: f,
1217
+ legend: d.string().trim().min(1, "Enter a question").default(en.legend),
1218
+ options: J("Add an option", "Enter option text").default(en.options)
1213
1219
  }),
1214
1220
  toDocumentAttributes: ({ id: e, legend: t, options: n }) => ({
1215
1221
  id: e,
1216
1222
  legend: t,
1217
- options: J(n)
1223
+ options: Y(n)
1218
1224
  }),
1219
1225
  history: {
1220
1226
  summary: ({ legend: e }) => e,
@@ -1223,30 +1229,30 @@ var bt = { items: [
1223
1229
  options: "Options"
1224
1230
  }
1225
1231
  }
1226
- })), Ot = { ...A }, kt = V({
1232
+ })), nn = { ...g }, rn = U({
1227
1233
  type: "PSection",
1228
1234
  label: "Section",
1229
1235
  kind: "section",
1230
- defaultStyle: Ot,
1231
- allowedChildren: H,
1236
+ defaultStyle: nn,
1237
+ allowedChildren: W,
1232
1238
  templates: []
1233
- }), At = {
1239
+ }), an = {
1234
1240
  label: "Select",
1235
1241
  options: [{ text: "Option 1" }, { text: "Option 2" }]
1236
- }, jt = b(n({
1242
+ }, on = M(p({
1237
1243
  type: "PSelect",
1238
1244
  label: "Select",
1239
1245
  allowedChildren: [],
1240
1246
  templates: [],
1241
- attributes: e.strictObject({
1242
- id: t,
1243
- label: e.string().trim().min(1, "Enter a label").default(At.label),
1244
- options: q("Add an option", "Enter option text").default(At.options)
1247
+ attributes: d.strictObject({
1248
+ id: f,
1249
+ label: d.string().trim().min(1, "Enter a label").default(an.label),
1250
+ options: J("Add an option", "Enter option text").default(an.options)
1245
1251
  }),
1246
1252
  toDocumentAttributes: ({ id: e, label: t, options: n }) => ({
1247
1253
  id: e,
1248
1254
  label: t,
1249
- options: J(n)
1255
+ options: Y(n)
1250
1256
  }),
1251
1257
  history: {
1252
1258
  summary: ({ label: e }) => e,
@@ -1255,7 +1261,7 @@ var bt = { items: [
1255
1261
  options: "Options"
1256
1262
  }
1257
1263
  }
1258
- })), Mt = {
1264
+ })), sn = {
1259
1265
  headers: [
1260
1266
  { text: "Column 1" },
1261
1267
  { text: "Column 2" },
@@ -1271,18 +1277,18 @@ var bt = { items: [
1271
1277
  "Cell 6"
1272
1278
  ] }]
1273
1279
  };
1274
- function Nt(e, t) {
1280
+ function cn(e, t) {
1275
1281
  return t.map(({ cells: t }) => ({ cells: Array.from({ length: e }, (e, n) => t[n] ?? "") }));
1276
1282
  }
1277
- var Pt = e.strictObject({ cells: e.array(e.string()) }), Ft = b(n({
1283
+ var ln = d.strictObject({ cells: d.array(d.string()) }), un = M(p({
1278
1284
  type: "PTable",
1279
1285
  label: "Table",
1280
1286
  allowedChildren: [],
1281
1287
  templates: [],
1282
- attributes: e.strictObject({
1283
- id: t,
1284
- headers: q("Add a column", "Enter a column heading").default(Mt.headers),
1285
- rows: e.array(Pt).default(Mt.rows)
1288
+ attributes: d.strictObject({
1289
+ id: f,
1290
+ headers: J("Add a column", "Enter a column heading").default(sn.headers),
1291
+ rows: d.array(ln).default(sn.rows)
1286
1292
  }).superRefine(({ headers: e, rows: t }, n) => {
1287
1293
  t.forEach(({ cells: t }, r) => {
1288
1294
  t.length !== e.length && n.addIssue({
@@ -1298,7 +1304,7 @@ var Pt = e.strictObject({ cells: e.array(e.string()) }), Ft = b(n({
1298
1304
  }),
1299
1305
  toDocumentAttributes: ({ id: e, headers: t, rows: n }) => ({
1300
1306
  id: e,
1301
- headers: J(t),
1307
+ headers: Y(t),
1302
1308
  rows: n.map(({ cells: e }) => ({ cells: [...e] }))
1303
1309
  }),
1304
1310
  history: {
@@ -1308,52 +1314,52 @@ var Pt = e.strictObject({ cells: e.array(e.string()) }), Ft = b(n({
1308
1314
  rows: "Rows"
1309
1315
  }
1310
1316
  }
1311
- })), It = /<[^>]*>/g;
1312
- function Lt(e) {
1317
+ })), dn = /<[^>]*>/g;
1318
+ function fn(e) {
1313
1319
  let t = e.trim();
1314
1320
  return t.includes("<") ? t : `<p>${t}</p>`;
1315
1321
  }
1316
- function Rt(e) {
1317
- return e.replace(It, " ").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/\s+/g, " ").trim();
1322
+ function pn(e) {
1323
+ return e.replace(dn, " ").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/\s+/g, " ").trim();
1318
1324
  }
1319
- // src/schema/PRichText/pRichText.definition.ts
1320
- var zt = { text: "<p>Add your main text here. Double-click to edit and customize your content to make it selectable.</p>" }, Bt = b(n({
1325
+ // src/elements/rich-text/definition.ts
1326
+ var mn = { text: "<p>Add your main text here. Double-click to edit and customize your content to make it selectable.</p>" }, hn = M(p({
1321
1327
  type: "PRichText",
1322
1328
  label: "Rich text",
1323
1329
  allowedChildren: [],
1324
1330
  templates: [],
1325
- attributes: e.strictObject({
1326
- id: t,
1327
- text: e.string().transform(Lt).refine((e) => Rt(e).trim().length > 0, "Enter text").default(zt.text)
1331
+ attributes: d.strictObject({
1332
+ id: f,
1333
+ text: d.string().transform(fn).refine((e) => pn(e).trim().length > 0, "Enter text").default(mn.text)
1328
1334
  }),
1329
1335
  toDocumentAttributes: ({ id: e, text: t }) => ({
1330
1336
  id: e,
1331
- text: Lt(t)
1337
+ text: fn(t)
1332
1338
  }),
1333
1339
  history: {
1334
- summary: ({ text: e }) => Rt(e),
1340
+ summary: ({ text: e }) => pn(e),
1335
1341
  attributes: { text: "Text" }
1336
1342
  }
1337
- })), Vt = [
1343
+ })), gn = [
1338
1344
  "normal",
1339
1345
  "italic",
1340
1346
  "oblique"
1341
- ], Ht = [
1347
+ ], _n = [
1342
1348
  "none",
1343
1349
  "underline",
1344
1350
  "overline",
1345
1351
  "line-through"
1346
- ], Ut = [
1352
+ ], vn = [
1347
1353
  "left",
1348
1354
  "center",
1349
1355
  "right",
1350
1356
  "justify"
1351
- ], Wt = [
1357
+ ], yn = [
1352
1358
  "none",
1353
1359
  "capitalize",
1354
1360
  "uppercase",
1355
1361
  "lowercase"
1356
- ], Gt = [
1362
+ ], bn = [
1357
1363
  "100",
1358
1364
  "200",
1359
1365
  "300",
@@ -1363,122 +1369,122 @@ var zt = { text: "<p>Add your main text here. Double-click to edit and customize
1363
1369
  "700",
1364
1370
  "800",
1365
1371
  "900"
1366
- ], Kt = {
1372
+ ], xn = {
1367
1373
  text: "Text",
1368
- ...S,
1374
+ ...P,
1369
1375
  style: {}
1370
- }, qt = "--palmyit-text";
1371
- function Jt(t) {
1376
+ }, Sn = "--palmyit-text";
1377
+ function Cn(e) {
1372
1378
  return [
1373
1379
  {
1374
1380
  key: "textFont",
1375
- variable: `${t}-font-family`,
1376
- value: e.string().refine(E, "Expected a Google Fonts family name"),
1381
+ variable: `${e}-font-family`,
1382
+ value: d.string().refine(xt, "Expected a Google Fonts family name"),
1377
1383
  label: "Font family"
1378
1384
  },
1379
1385
  {
1380
1386
  key: "fontStyle",
1381
- variable: `${t}-font-style`,
1382
- value: e.enum(Vt),
1387
+ variable: `${e}-font-style`,
1388
+ value: d.enum(gn),
1383
1389
  label: "Text style"
1384
1390
  },
1385
1391
  {
1386
1392
  key: "textSize",
1387
- variable: `${t}-font-size`,
1388
- value: F,
1393
+ variable: `${e}-font-size`,
1394
+ value: Fe,
1389
1395
  label: "Text size"
1390
1396
  },
1391
1397
  {
1392
1398
  key: "textColor",
1393
- variable: `${t}-color`,
1394
- value: s,
1399
+ variable: `${e}-color`,
1400
+ value: C,
1395
1401
  label: "Text color"
1396
1402
  },
1397
1403
  {
1398
1404
  key: "lineHeight",
1399
- variable: `${t}-line-height`,
1400
- value: F,
1405
+ variable: `${e}-line-height`,
1406
+ value: Ie,
1401
1407
  label: "Height"
1402
1408
  },
1403
1409
  {
1404
1410
  key: "letterSpacing",
1405
- variable: `${t}-letter-spacing`,
1406
- value: F,
1411
+ variable: `${e}-letter-spacing`,
1412
+ value: Le,
1407
1413
  label: "Letter spacing"
1408
1414
  },
1409
1415
  {
1410
1416
  key: "wordSpacing",
1411
- variable: `${t}-word-spacing`,
1412
- value: F,
1417
+ variable: `${e}-word-spacing`,
1418
+ value: S,
1413
1419
  label: "Word spacing"
1414
1420
  },
1415
1421
  {
1416
1422
  key: "textDecoration",
1417
- variable: `${t}-text-decoration`,
1418
- value: e.enum(Ht),
1423
+ variable: `${e}-text-decoration`,
1424
+ value: d.enum(_n),
1419
1425
  label: "Text decoration"
1420
1426
  },
1421
1427
  {
1422
1428
  key: "textAlign",
1423
- variable: `${t}-text-align`,
1424
- value: e.enum(Ut),
1429
+ variable: `${e}-text-align`,
1430
+ value: d.enum(vn),
1425
1431
  label: "Text align"
1426
1432
  },
1427
1433
  {
1428
1434
  key: "textTransform",
1429
- variable: `${t}-text-transform`,
1430
- value: e.enum(Wt),
1435
+ variable: `${e}-text-transform`,
1436
+ value: d.enum(yn),
1431
1437
  label: "Text transform"
1432
1438
  },
1433
1439
  {
1434
1440
  key: "fontWeight",
1435
- variable: `${t}-font-weight`,
1436
- value: e.enum(Gt),
1441
+ variable: `${e}-font-weight`,
1442
+ value: d.enum(bn),
1437
1443
  label: "Text weight"
1438
1444
  }
1439
1445
  ];
1440
1446
  }
1441
- var Z = Jt(qt), Yt = b(n({
1447
+ var Q = Cn(Sn), wn = M(p({
1442
1448
  type: "PText",
1443
1449
  label: "Text",
1444
1450
  allowedChildren: [],
1445
1451
  templates: [],
1446
- attributes: e.strictObject({
1447
- id: t,
1448
- text: e.string().trim().min(1, "Enter text").default(Kt.text),
1449
- ...C,
1450
- style: g(Z).transform((e) => e)
1452
+ attributes: d.strictObject({
1453
+ id: f,
1454
+ text: d.string().trim().min(1, "Enter text").default(xn.text),
1455
+ ...F,
1456
+ style: O(Q).transform((e) => e)
1451
1457
  }),
1452
1458
  toDocumentAttributes: ({ id: e, text: t, href: n, target: r, description: i, style: a }) => ({
1453
1459
  id: e,
1454
1460
  text: t,
1455
- ...T({
1461
+ ...L({
1456
1462
  href: n,
1457
1463
  target: r,
1458
1464
  description: i
1459
1465
  }),
1460
- style: v(a, Z)
1466
+ style: A(a, Q)
1461
1467
  }),
1462
1468
  history: {
1463
1469
  summary: ({ text: e }) => e,
1464
1470
  attributes: {
1465
1471
  text: "Text",
1466
- ...w,
1467
- ..._(Z, "style.")
1472
+ ...I,
1473
+ ...k(Q, "style.")
1468
1474
  }
1469
1475
  }
1470
- }), Z), Xt = {
1476
+ }), Q), Tn = {
1471
1477
  label: "Text area",
1472
1478
  placeholder: ""
1473
- }, Zt = b(n({
1479
+ }, En = M(p({
1474
1480
  type: "PTextArea",
1475
1481
  label: "Text area",
1476
1482
  allowedChildren: [],
1477
1483
  templates: [],
1478
- attributes: e.strictObject({
1479
- id: t,
1480
- label: e.string().trim().min(1, "Enter a label").default(Xt.label),
1481
- placeholder: e.string().default(Xt.placeholder)
1484
+ attributes: d.strictObject({
1485
+ id: f,
1486
+ label: d.string().trim().min(1, "Enter a label").default(Tn.label),
1487
+ placeholder: d.string().default(Tn.placeholder)
1482
1488
  }),
1483
1489
  toDocumentAttributes: ({ id: e, label: t, placeholder: n }) => ({
1484
1490
  id: e,
@@ -1492,18 +1498,18 @@ var Z = Jt(qt), Yt = b(n({
1492
1498
  placeholder: "Placeholder"
1493
1499
  }
1494
1500
  }
1495
- })), Qt = {
1501
+ })), Dn = {
1496
1502
  label: "Text field",
1497
1503
  placeholder: ""
1498
- }, $t = b(n({
1504
+ }, On = M(p({
1499
1505
  type: "PTextField",
1500
1506
  label: "Text field",
1501
1507
  allowedChildren: [],
1502
1508
  templates: [],
1503
- attributes: e.strictObject({
1504
- id: t,
1505
- label: e.string().trim().min(1, "Enter a label").default(Qt.label),
1506
- placeholder: e.string().default(Qt.placeholder)
1509
+ attributes: d.strictObject({
1510
+ id: f,
1511
+ label: d.string().trim().min(1, "Enter a label").default(Dn.label),
1512
+ placeholder: d.string().default(Dn.placeholder)
1507
1513
  }),
1508
1514
  toDocumentAttributes: ({ id: e, label: t, placeholder: n }) => ({
1509
1515
  id: e,
@@ -1517,18 +1523,18 @@ var Z = Jt(qt), Yt = b(n({
1517
1523
  placeholder: "Placeholder"
1518
1524
  }
1519
1525
  }
1520
- })), en = {
1526
+ })), kn = {
1521
1527
  src: "",
1522
1528
  title: "Video"
1523
- }, tn = b(n({
1529
+ }, An = M(p({
1524
1530
  type: "PVideo",
1525
1531
  label: "Video",
1526
1532
  allowedChildren: [],
1527
1533
  templates: [],
1528
- attributes: e.strictObject({
1529
- id: t,
1530
- src: e.union([e.literal(""), x]).default(en.src),
1531
- title: e.string().trim().min(1, "Enter a video title").default(en.title)
1534
+ attributes: d.strictObject({
1535
+ id: f,
1536
+ src: d.union([d.literal(""), N]).default(kn.src),
1537
+ title: d.string().trim().min(1, "Enter a video title").default(kn.title)
1532
1538
  }),
1533
1539
  toDocumentAttributes: ({ id: e, src: t, title: n }) => ({
1534
1540
  id: e,
@@ -1542,67 +1548,67 @@ var Z = Jt(qt), Yt = b(n({
1542
1548
  title: "Title"
1543
1549
  }
1544
1550
  }
1545
- })), Q = {
1546
- PPage: Tt,
1547
- PSection: kt,
1548
- PContainer: ut,
1549
- PButton: st,
1550
- PText: Yt,
1551
- PRichText: Bt,
1552
- PImage: yt,
1553
- PVideo: tn,
1554
- PList: xt,
1555
- PIcon: mt,
1556
- PDivider: pt,
1557
- PTextField: $t,
1558
- PTextArea: Zt,
1559
- PCheckbox: ct,
1560
- PRadio: Dt,
1561
- PSelect: jt,
1562
- PTable: Ft
1551
+ })), $ = {
1552
+ PPage: $t,
1553
+ PSection: rn,
1554
+ PContainer: Rt,
1555
+ PButton: Ft,
1556
+ PText: wn,
1557
+ PRichText: hn,
1558
+ PImage: Jt,
1559
+ PVideo: An,
1560
+ PList: Xt,
1561
+ PIcon: Ht,
1562
+ PDivider: Vt,
1563
+ PTextField: On,
1564
+ PTextArea: En,
1565
+ PCheckbox: It,
1566
+ PRadio: tn,
1567
+ PSelect: on,
1568
+ PTable: un
1563
1569
  };
1564
- function nn(e) {
1565
- return typeof e == "string" && Object.hasOwn(Q, e);
1570
+ function jn(e) {
1571
+ return typeof e == "string" && Object.hasOwn($, e);
1566
1572
  }
1567
1573
  // src/schema/elementTemplates.ts
1568
- function rn(e) {
1574
+ function Mn(e) {
1569
1575
  return typeof e == "object" && !!e && !Array.isArray(e);
1570
1576
  }
1571
- function an(e) {
1577
+ function Nn(e) {
1572
1578
  try {
1573
1579
  let t = JSON.parse(e);
1574
- return rn(t) ? t : void 0;
1580
+ return Mn(t) ? t : void 0;
1575
1581
  } catch {
1576
1582
  return;
1577
1583
  }
1578
1584
  }
1579
- function on(e) {
1585
+ function Pn(e) {
1580
1586
  return Array.isArray(e) ? e : [];
1581
1587
  }
1582
- function sn(e, t) {
1583
- let n = new Map(on(e).map((e) => [e.key, e]));
1584
- for (let e of on(t)) n.set(e.key, {
1588
+ function Fn(e, t) {
1589
+ let n = new Map(Pn(e).map((e) => [e.key, e]));
1590
+ for (let e of Pn(t)) n.set(e.key, {
1585
1591
  ...n.get(e.key),
1586
1592
  ...e
1587
1593
  });
1588
1594
  return [...n.values()];
1589
1595
  }
1590
- function cn(e, t) {
1596
+ function In(e, t) {
1591
1597
  let n = {
1592
1598
  ...e,
1593
1599
  ...t,
1594
1600
  id: e.id
1595
1601
  };
1596
- return "style" in t && (n.style = sn(e.style, t.style)), n;
1602
+ return "style" in t && (n.style = Fn(e.style, t.style)), n;
1597
1603
  }
1598
- function ln(e, t) {
1604
+ function Ln(e, t) {
1599
1605
  if (!Array.isArray(t)) return {
1600
1606
  ok: !1,
1601
1607
  message: "Expected a list of children"
1602
1608
  };
1603
1609
  let n = [];
1604
1610
  for (let r of t) {
1605
- let t = un(e, r);
1611
+ let t = Rn(e, r);
1606
1612
  if (!t.ok) return t;
1607
1613
  n.push(t.item);
1608
1614
  }
@@ -1611,21 +1617,21 @@ function ln(e, t) {
1611
1617
  content: n
1612
1618
  };
1613
1619
  }
1614
- function un(e, t) {
1615
- if (!rn(t)) return {
1620
+ function Rn(e, t) {
1621
+ if (!Mn(t)) return {
1616
1622
  ok: !1,
1617
1623
  message: "Expected an element object"
1618
1624
  };
1619
1625
  let n = t.type;
1620
- if (!nn(n)) return {
1626
+ if (!jn(n)) return {
1621
1627
  ok: !1,
1622
1628
  message: `Unknown element type "${String(n)}"`
1623
1629
  };
1624
- if (!Q[e].allowedChildren.includes(n)) return {
1630
+ if (!$[e].allowedChildren.includes(n)) return {
1625
1631
  ok: !1,
1626
1632
  message: `${n} is not allowed inside ${e}`
1627
1633
  };
1628
- let { children: r, type: i, ...a } = t, o = Q[n];
1634
+ let { children: r, type: i, ...a } = t, o = $[n];
1629
1635
  if (r !== void 0 && o.allowedChildren.length === 0) return {
1630
1636
  ok: !1,
1631
1637
  message: `${n} cannot have children`
@@ -1646,7 +1652,7 @@ function un(e, t) {
1646
1652
  let l = r === void 0 ? {
1647
1653
  ok: !0,
1648
1654
  content: []
1649
- } : ln(n, r);
1655
+ } : Ln(n, r);
1650
1656
  return l.ok ? {
1651
1657
  ok: !0,
1652
1658
  item: {
@@ -1658,19 +1664,19 @@ function un(e, t) {
1658
1664
  }
1659
1665
  } : l;
1660
1666
  }
1661
- function dn(e, t, n) {
1667
+ function zn(e, t, n) {
1662
1668
  let r = (e) => ({
1663
1669
  ok: !1,
1664
1670
  message: `Template "${n.name}": ${e}`
1665
- }), i = an(n.shortcode);
1671
+ }), i = Nn(n.shortcode);
1666
1672
  if (!i) return r("Expected a JSON object");
1667
- let { children: a, type: o, ...s } = i, c = e.toDocumentAttributes(t), l = e.attributes.safeParse(cn(c, s));
1673
+ let { children: a, type: o, ...s } = i, c = e.toDocumentAttributes(t), l = e.attributes.safeParse(In(c, s));
1668
1674
  if (!l.success) return r(l.error.issues[0]?.message ?? "Invalid template");
1669
1675
  if (a === void 0) return {
1670
1676
  ok: !0,
1671
1677
  props: l.data
1672
1678
  };
1673
- let u = ln(e.type, a);
1679
+ let u = Ln(e.type, a);
1674
1680
  return u.ok ? {
1675
1681
  ok: !0,
1676
1682
  props: l.data,
@@ -1678,28 +1684,28 @@ function dn(e, t, n) {
1678
1684
  } : r(u.message);
1679
1685
  }
1680
1686
  // src/schema/Fields/ColorField/color-value.ts
1681
- var fn = /^#[0-9A-Fa-f]{6}$/, pn = /^#[0-9A-Fa-f]{8}$/;
1682
- function mn(e) {
1687
+ var Bn = /^#[0-9A-Fa-f]{6}$/, Vn = /^#[0-9A-Fa-f]{8}$/;
1688
+ function Hn(e) {
1683
1689
  return Math.min(100, Math.max(0, Math.round(e)));
1684
1690
  }
1685
- function hn(e) {
1691
+ function Un(e) {
1686
1692
  let t = e.hex.toUpperCase();
1687
- if (!fn.test(t)) return "#000000FF";
1688
- let n = mn(e.opacity);
1693
+ if (!Bn.test(t)) return "#000000FF";
1694
+ let n = Hn(e.opacity);
1689
1695
  return `${t}${Math.round(n / 100 * 255).toString(16).padStart(2, "0").toUpperCase()}`;
1690
1696
  }
1691
- function gn(e) {
1697
+ function Wn(e) {
1692
1698
  let t = e.trim().toUpperCase();
1693
- return fn.test(t) ? {
1699
+ return Bn.test(t) ? {
1694
1700
  hex: t,
1695
1701
  opacity: 100
1696
- } : pn.test(t) ? {
1702
+ } : Vn.test(t) ? {
1697
1703
  hex: t.slice(0, 7),
1698
- opacity: mn(Number.parseInt(t.slice(7, 9), 16) / 255 * 100)
1704
+ opacity: Hn(Number.parseInt(t.slice(7, 9), 16) / 255 * 100)
1699
1705
  } : null;
1700
1706
  }
1701
1707
  // src/schema/device/deviceStyle.ts
1702
- var _n = {
1708
+ var Gn = {
1703
1709
  Desktop: {
1704
1710
  portrait: "style",
1705
1711
  landscape: "style"
@@ -1713,25 +1719,25 @@ var _n = {
1713
1719
  landscape: "mobileLandscapeStyle"
1714
1720
  }
1715
1721
  };
1716
- function vn(e, t = "portrait") {
1717
- return _n[e][t];
1722
+ function Kn(e, t = "portrait") {
1723
+ return Gn[e][t];
1718
1724
  }
1719
- function $(e, t, n = "portrait") {
1720
- let r = vn(t, n);
1725
+ function qn(e, t, n = "portrait") {
1726
+ let r = Kn(t, n);
1721
1727
  return r === "style" ? {} : e[r] ?? {};
1722
1728
  }
1723
- function yn(e, t) {
1729
+ function Jn(e, t) {
1724
1730
  return JSON.stringify(e) === JSON.stringify(t);
1725
1731
  }
1726
- function bn(e, t) {
1727
- return Object.fromEntries(Object.entries(t).filter(([t, n]) => n !== void 0 && !yn(n, e[t])));
1732
+ function Yn(e, t) {
1733
+ return Object.fromEntries(Object.entries(t).filter(([t, n]) => n !== void 0 && !Jn(n, e[t])));
1728
1734
  }
1729
- function xn(e, t, n = "portrait") {
1730
- let r = n === "landscape" ? $(e, t, "landscape") : {};
1735
+ function Xn(e, t, n = "portrait") {
1736
+ let r = n === "landscape" ? qn(e, t, "landscape") : {};
1731
1737
  return {
1732
1738
  ...e.style,
1733
- ...$(e, t, "portrait"),
1739
+ ...qn(e, t, "portrait"),
1734
1740
  ...r
1735
1741
  };
1736
1742
  }
1737
- export { O as BORDER_LINE_STYLES, p as DEVICE_CHOICES, ze as FLEX_ALIGN_CONTENTS, Re as FLEX_ALIGN_ITEMS, Ie as FLEX_DIRECTIONS, k as FLEX_JUSTIFY_CONTENTS, Le as FLEX_WRAPS, Vt as FONT_STYLES, Gt as FONT_WEIGHTS, _t as IMAGE_LENGTH_KEYS, G as IMAGE_PREFIX, f as LANDSCAPE_VISIBILITY_PROP_BY_DEVICE, Be as LENGTH_PATTERN, nt as NO_ICON, Ut as TEXT_ALIGNS, Ht as TEXT_DECORATIONS, qt as TEXT_PREFIX, Wt as TEXT_TRANSFORMS, re as VISIBILITY_PROPS, d as VISIBILITY_PROP_BY_DEVICE, x as addressSchema, dn as applyElementTemplate, l as backgroundStyleDefinitions, Fe as backgroundStyleToCssVariables, u as builderDevices, ee as builderViewports, bn as changedStyle, s as colorValue, D as colorValueToCss, it as defaultButtonProps, B as defaultCheckboxProps, lt as defaultContainerStyle, ft as defaultDividerProps, A as defaultElementStyle, U as defaultIconProps, W as defaultImageProps, S as defaultLinkSettings, bt as defaultListProps, Y as defaultPageStyle, Et as defaultRadioProps, zt as defaultRichTextProps, Ot as defaultSectionStyle, At as defaultSelectProps, Mt as defaultTableProps, Xt as defaultTextAreaProps, Qt as defaultTextFieldProps, Kt as defaultTextProps, en as defaultVideoProps, n as defineElement, V as defineLayoutElement, te as deviceForWidth, $ as deviceOverride, vn as deviceStyleProp, t as elementIdSchema, Q as elementRegistry, $e as elementStyleDefinitions, et as elementStyleSchema, qe as elementStyleToCssVariables, Nt as fitRowsToHeaders, gn as fromHexAlpha, o as gradientToCss, nn as isElementType, E as isFontFamily, L as isOutlineIconName, a as isSafeGradientArgs, h as isShownOn, rt as labelForIcon, H as layoutChildren, I as lengthKeys, F as lengthValue, w as linkHistoryLabels, C as linkSettingsShape, Lt as normalizeRichText, ne as orientationForWidth, st as pButtonDefinition, ct as pCheckboxDefinition, ut as pContainerDefinition, pt as pDividerDefinition, mt as pIconDefinition, yt as pImageDefinition, xt as pListDefinition, Tt as pPageDefinition, Dt as pRadioDefinition, Bt as pRichTextDefinition, kt as pSectionDefinition, jt as pSelectDefinition, Ft as pTableDefinition, Zt as pTextAreaDefinition, Yt as pTextDefinition, $t as pTextFieldDefinition, tn as pVideoDefinition, wt as pageStyleKeys, xn as resolveDeviceStyle, Rt as richTextToPlainText, M as sanitizeAutoAsZero, He as sanitizeBorderWidth, j as sanitizeLength, N as sanitizeMaxLength, ie as shownDeviceCount, g as styleItemsSchema, _ as styleLabels, ue as styleOverrideItemsSchema, q as textItemsSchema, Me as textSizeToCss, Jt as textStyleDefinitions, hn as toHexAlpha, T as toLinkAttributes, v as toStyleItems, pe as toStyleOverrideItems, J as toTextItems, m as visibilityProp, b as withDeviceSettings };
1743
+ export { h as BORDER_LINE_STYLES, u as COLOR_NAMES, qe as DEVICE_CHOICES, ye as FLEX_ALIGN_CONTENTS, ve as FLEX_ALIGN_ITEMS, he as FLEX_DIRECTIONS, _e as FLEX_JUSTIFY_CONTENTS, ge as FLEX_WRAPS, gn as FONT_STYLES, bn as FONT_WEIGHTS, Gt as IMAGE_LENGTH_KEYS, K as IMAGE_PREFIX, Ge as LANDSCAPE_VISIBILITY_PROP_BY_DEVICE, _ as LENGTH_PATTERN, At as NO_ICON, n as OPACITY_STEPS, ie as SPACING_TOKENS, vn as TEXT_ALIGNS, _n as TEXT_DECORATIONS, Sn as TEXT_PREFIX, r as TEXT_SIZE_TOKENS, yn as TEXT_TRANSFORMS, Ke as VISIBILITY_PROPS, E as VISIBILITY_PROP_BY_DEVICE, N as addressSchema, zn as applyElementTemplate, w as backgroundStyleDefinitions, me as backgroundStyleToCssVariables, T as builderDevices, He as builderViewports, Yn as changedStyle, C as colorValue, ue as colorValueToCss, Mt as defaultButtonProps, H as defaultCheckboxProps, Lt as defaultContainerStyle, Bt as defaultDividerProps, g as defaultElementStyle, G as defaultIconProps, Kt as defaultImageProps, P as defaultLinkSettings, Yt as defaultListProps, X as defaultPageStyle, en as defaultRadioProps, mn as defaultRichTextProps, nn as defaultSectionStyle, an as defaultSelectProps, sn as defaultTableProps, Tn as defaultTextAreaProps, Dn as defaultTextFieldProps, xn as defaultTextProps, kn as defaultVideoProps, p as defineElement, U as defineLayoutElement, Ue as deviceForWidth, qn as deviceOverride, Kn as deviceStyleProp, f as elementIdSchema, $ as elementRegistry, Dt as elementStyleDefinitions, Ot as elementStyleSchema, De as elementStyleToCssVariables, cn as fitRowsToHeaders, Wn as fromHexAlpha, se as gradientToCss, jn as isElementType, xt as isFontFamily, z as isOutlineIconName, ee as isPaletteColor, m as isSafeGradientArgs, D as isShownOn, jt as labelForIcon, W as layoutChildren, R as lengthKeys, S as lengthValue, I as linkHistoryLabels, F as linkSettingsShape, fn as normalizeRichText, We as orientationForWidth, Ft as pButtonDefinition, It as pCheckboxDefinition, Rt as pContainerDefinition, Vt as pDividerDefinition, Ht as pIconDefinition, Jt as pImageDefinition, Xt as pListDefinition, $t as pPageDefinition, tn as pRadioDefinition, hn as pRichTextDefinition, rn as pSectionDefinition, on as pSelectDefinition, un as pTableDefinition, En as pTextAreaDefinition, wn as pTextDefinition, On as pTextFieldDefinition, An as pVideoDefinition, Qt as pageStyleKeys, re as pageTokensToVarValues, Xn as resolveDeviceStyle, pn as richTextToPlainText, y as sanitizeAutoAsZero, Se as sanitizeBorderWidth, v as sanitizeLength, xe as sanitizeMaxLength, Ye as shownDeviceCount, O as styleItemsSchema, k as styleLabels, tt as styleOverrideItemsSchema, te as styleToClasses, J as textItemsSchema, de as textSizeToCss, Cn as textStyleDefinitions, Un as toHexAlpha, L as toLinkAttributes, o as toPaletteColor, a as toSpacingToken, A as toStyleItems, it as toStyleOverrideItems, Y as toTextItems, e as toTextSizeToken, s as unresolvedStyleForVars, Je as visibilityProp, M as withDeviceSettings };