@palmyit/elements 0.1.3 → 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 (80) hide show
  1. package/README.md +2 -2
  2. package/dist/definitions.d.ts +54 -0
  3. package/dist/definitions.js +1743 -0
  4. package/dist/elements/button/definition.d.ts +38 -0
  5. package/dist/elements/button/template.d.ts +2 -0
  6. package/dist/elements/checkbox/definition.d.ts +10 -0
  7. package/dist/elements/checkbox/template.d.ts +2 -0
  8. package/dist/elements/container/definition.d.ts +39 -0
  9. package/dist/elements/container/template.d.ts +2 -0
  10. package/dist/elements/divider/definition.d.ts +10 -0
  11. package/dist/elements/divider/template.d.ts +2 -0
  12. package/dist/elements/icon/definition.d.ts +18 -0
  13. package/dist/elements/icon/template.d.ts +2 -0
  14. package/dist/elements/image/definition.d.ts +33 -0
  15. package/dist/elements/image/template.d.ts +2 -0
  16. package/dist/elements/list/definition.d.ts +11 -0
  17. package/dist/elements/list/template.d.ts +2 -0
  18. package/dist/elements/page/definition.d.ts +22 -0
  19. package/dist/elements/page/template.d.ts +2 -0
  20. package/dist/elements/radio/definition.d.ts +13 -0
  21. package/dist/elements/radio/template.d.ts +2 -0
  22. package/dist/elements/rich-text/definition.d.ts +8 -0
  23. package/dist/elements/rich-text/richTextMarks.d.ts +4 -0
  24. package/dist/elements/rich-text/richTextOptions.d.ts +2 -0
  25. package/dist/elements/rich-text/template.d.ts +2 -0
  26. package/dist/elements/section/definition.d.ts +39 -0
  27. package/dist/elements/section/template.d.ts +2 -0
  28. package/dist/elements/select/definition.d.ts +13 -0
  29. package/dist/elements/select/template.d.ts +2 -0
  30. package/dist/elements/table/definition.d.ts +20 -0
  31. package/dist/elements/table/template.d.ts +2 -0
  32. package/dist/elements/text/definition.d.ts +46 -0
  33. package/dist/elements/text/template.d.ts +2 -0
  34. package/dist/elements/text-area/definition.d.ts +10 -0
  35. package/dist/elements/text-area/template.d.ts +2 -0
  36. package/dist/elements/text-field/definition.d.ts +10 -0
  37. package/dist/elements/text-field/template.d.ts +2 -0
  38. package/dist/elements/video/definition.d.ts +10 -0
  39. package/dist/elements/video/template.d.ts +2 -0
  40. package/dist/manifest.json +3 -3
  41. package/dist/plmt-elements.css +2 -1
  42. package/dist/plmt-elements.js +0 -115
  43. package/dist/registry.d.ts +9 -0
  44. package/dist/render/renderHtml.d.ts +5 -0
  45. package/dist/render/styleToClasses.d.ts +35 -0
  46. package/dist/render/styleToVars.d.ts +2 -0
  47. package/dist/render/styleTokens.d.ts +57 -0
  48. package/dist/render/tags.d.ts +42 -0
  49. package/dist/render/toDom.d.ts +3 -0
  50. package/dist/render/types.d.ts +20 -0
  51. package/dist/schema/Fields/BackgroundField/backgroundValue.d.ts +16 -0
  52. package/dist/schema/Fields/ColorField/color-value.d.ts +6 -0
  53. package/dist/schema/Fields/ColorField/index.d.ts +1 -0
  54. package/dist/schema/Fields/FontStyleField.d.ts +2 -0
  55. package/dist/schema/Fields/IconPicker/iconCatalog.d.ts +3 -0
  56. package/dist/schema/addressSchema.d.ts +3 -0
  57. package/dist/schema/backgroundStyleDefinitions.d.ts +10 -0
  58. package/dist/schema/device/deviceStyle.d.ts +13 -0
  59. package/dist/schema/device/devices.d.ts +21 -0
  60. package/dist/schema/deviceSettings.d.ts +13 -0
  61. package/dist/schema/deviceVisibility.d.ts +19 -0
  62. package/dist/schema/elementConfiguration.d.ts +38 -0
  63. package/dist/schema/elementRegistry.d.ts +40 -0
  64. package/dist/schema/elementStyleDefinitions.d.ts +24 -0
  65. package/dist/schema/elementTemplates.d.ts +26 -0
  66. package/dist/schema/layoutChildren.d.ts +2 -0
  67. package/dist/schema/layoutElementConfiguration.d.ts +17 -0
  68. package/dist/schema/linkSettings.d.ts +26 -0
  69. package/dist/schema/style/backgroundStyle.d.ts +5 -0
  70. package/dist/schema/style/elementStyle.d.ts +62 -0
  71. package/dist/schema/style/page-styles.d.ts +3 -0
  72. package/dist/schema/styleItems.d.ts +53 -0
  73. package/dist/schema/styleTokensSchema.d.ts +274 -0
  74. package/dist/schema/textItems.d.ts +10 -0
  75. package/dist/styleToClasses-CZSWp6Ez.js +683 -0
  76. package/dist/templates/elementSpec.d.ts +10 -0
  77. package/dist/templates/helpers.d.ts +17 -0
  78. package/dist/templates.d.ts +13 -0
  79. package/dist/templates.js +349 -0
  80. package/package.json +31 -5
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Element markup templates and HTML render helpers.
3
+ * Import from `@palmyit/elements/templates`.
4
+ */
5
+ export type { ElementAttribute, CssVariables, ElementSpec, ElementSpecOptions, } from './render/types';
6
+ export { escapeHtml, sanitizeRichTextHtml, renderHtml } from './render/renderHtml';
7
+ export { toDom } from './render/toDom';
8
+ export { styleToCssVariables } from './render/styleToVars';
9
+ export { styleToClasses, styleObjectToClasses, unresolvedStyleForVars, pageTokensToVarValues, type DeviceStyleProps, } from './render/styleToClasses';
10
+ export { SPACING_TOKENS, TEXT_SIZE_TOKENS, COLOR_NAMES, OPACITY_STEPS, toSpacingToken, toTextSizeToken, toPaletteColor, isPaletteColor, type SpacingToken, type TextSizeToken, type ColorName, type PaletteColor, type StyleColor, } from './render/styleTokens';
11
+ export { tags, type ShortcodeTag } from './render/tags';
12
+ export { elementSpec, toElementTree, type ShortcodeNode, } from './templates/elementSpec';
13
+ export { spec, linked, hostAttrs, withStyle, pageStyleVars, nodeId, cssPrefix } from './templates/helpers';
@@ -0,0 +1,349 @@
1
+ import { _ as e, c as t, d as n, g as r, h as i, i as a, m as o, n as s, o as ee, p as c, r as l, t as u, u as d } from "./styleToClasses-CZSWp6Ez.js";
2
+ // src/render/renderHtml.ts
3
+ var f = /* @__PURE__ */ new Set([
4
+ "img",
5
+ "input",
6
+ "hr",
7
+ "br",
8
+ "meta",
9
+ "link"
10
+ ]);
11
+ function p(e) {
12
+ return String(e).replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&#39;");
13
+ }
14
+ function m(e) {
15
+ return e.replaceAll(/<(script|style|iframe|object|embed)\b[^>]*>[\s\S]*?<\/\1\s*>/gi, "").replaceAll(/\s+on[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi, "").replaceAll(/\s+(href|src)\s*=\s*(["'])\s*javascript:[\s\S]*?\2/gi, "");
16
+ }
17
+ function h(e) {
18
+ if (typeof e == "string") return p(e);
19
+ let t = Object.entries(e.attrs).flatMap(([e, t]) => t === void 0 || t === !1 ? [] : t === !0 ? [e] : [`${e}="${p(t)}"`]), n = Object.entries(e.styleVars).flatMap(([e, t]) => t === void 0 ? [] : [`${e}:${t}`]).join(";");
20
+ n && t.push(`style="${p(n)}"`);
21
+ let r = `<${e.tag}${t.length ? ` ${t.join(" ")}` : ""}>`;
22
+ return f.has(e.tag) ? `${r.slice(0, -1)}>` : `${r}${Array.isArray(e.children) ? e.children.map(h).join("") : e.children?.html ?? ""}</${e.tag}>`;
23
+ }
24
+ // src/render/toDom.ts
25
+ function g(e) {
26
+ if (typeof e == "string") return document.createTextNode(e);
27
+ let t = document.createElement(e.tag);
28
+ for (let [n, r] of Object.entries(e.attrs)) r !== void 0 && r !== !1 && (r === !0 ? t.setAttribute(n, "") : t.setAttribute(n, String(r)));
29
+ let n = Object.entries(e.styleVars).flatMap(([e, t]) => t === void 0 ? [] : [`${e}:${t}`]).join(";");
30
+ if (n && t.setAttribute("style", n), Array.isArray(e.children)) for (let n of e.children) t.append(g(n));
31
+ else e.children?.html && (t.innerHTML = e.children.html);
32
+ return t;
33
+ }
34
+ // src/render/styleToVars.ts
35
+ var _ = /^#[0-9A-Fa-f]{6}$/;
36
+ function v(e) {
37
+ if (c(e)) return o(e);
38
+ if (!e || typeof e != "object" || !("hex" in e) || !("opacity" in e)) return;
39
+ let { hex: t, opacity: n } = e;
40
+ if (!_.test(t) || !Number.isFinite(n)) return;
41
+ if (n === 100) return t.toUpperCase();
42
+ let r = Math.min(100, Math.max(0, n)) / 100;
43
+ return `rgba(${Number.parseInt(t.slice(1, 3), 16)}, ${Number.parseInt(t.slice(3, 5), 16)}, ${Number.parseInt(t.slice(5, 7), 16)}, ${r})`;
44
+ }
45
+ var y = {
46
+ textFont: "font-family",
47
+ textColor: "color",
48
+ textSize: "font-size",
49
+ fontStyle: "font-style",
50
+ backgroundColor: "background-color",
51
+ backgroundGradient: "background-image",
52
+ borderRadiusTopLeft: "border-top-left-radius",
53
+ borderRadiusTopRight: "border-top-right-radius",
54
+ borderRadiusBottomLeft: "border-bottom-left-radius",
55
+ borderRadiusBottomRight: "border-bottom-right-radius",
56
+ gridColumns: "grid-template-columns"
57
+ }, b = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
58
+ function x(e, t) {
59
+ return t && typeof t == "object" && ("hex" in t || "name" in t) && "opacity" in t ? v(t) : e === "backgroundGradient" && t && typeof t == "object" && "kind" in t && "value" in t ? `${String(t.kind)}-gradient(${String(t.value)})` : e === "gridColumns" && typeof t == "number" ? `repeat(${t}, minmax(0, 1fr))` : e === "textSize" && typeof t == "number" ? Number.isFinite(t) && t > 0 ? `${t}px` : void 0 : e === "textSize" && typeof t == "string" && t.endsWith("rem") ? t : [
60
+ "string",
61
+ "number",
62
+ "boolean"
63
+ ].includes(typeof t) ? String(t) : void 0;
64
+ }
65
+ function S(e, t) {
66
+ return e ? Object.fromEntries(Object.entries(e).flatMap(([e, n]) => {
67
+ let r = x(e, n);
68
+ return r === void 0 ? [] : [[`--palmyit-${t}-${y[e] ?? b(e)}`, r]];
69
+ })) : {};
70
+ }
71
+ // src/render/tags.ts
72
+ var C = {
73
+ PPage: "plmt-page",
74
+ PSection: "plmt-section",
75
+ PContainer: "plmt-container",
76
+ PButton: "plmt-button",
77
+ PText: "plmt-text",
78
+ PRichText: "plmt-rich-text",
79
+ PImage: "plmt-image",
80
+ PVideo: "plmt-video",
81
+ PList: "plmt-list",
82
+ PIcon: "plmt-icon",
83
+ PDivider: "plmt-divider",
84
+ PTable: "plmt-table",
85
+ PTextField: "plmt-text-field",
86
+ PTextArea: "plmt-text-area",
87
+ PCheckbox: "plmt-checkbox",
88
+ PRadio: "plmt-radio",
89
+ PSelect: "plmt-select"
90
+ };
91
+ // src/templates/helpers.ts
92
+ function w(e, t = {}, n, r = {}) {
93
+ return n === void 0 ? {
94
+ tag: e,
95
+ attrs: t,
96
+ styleVars: r
97
+ } : {
98
+ tag: e,
99
+ attrs: t,
100
+ styleVars: r,
101
+ children: n
102
+ };
103
+ }
104
+ function T(e, t) {
105
+ let n = String(e.href ?? "");
106
+ if (!n) return t;
107
+ let r = String(e.target ?? "_self");
108
+ return [w("a", {
109
+ href: n,
110
+ target: r,
111
+ rel: r === "_blank" ? "noopener noreferrer" : void 0,
112
+ "aria-description": String(e.description ?? "") || void 0
113
+ }, t)];
114
+ }
115
+ function E(e) {
116
+ return e.slice(1).replaceAll(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
117
+ }
118
+ function D(e) {
119
+ return String(e.id ?? e.pageId ?? "");
120
+ }
121
+ function O(e) {
122
+ return {
123
+ style: e.style,
124
+ tabletStyle: e.tabletStyle,
125
+ mobileStyle: e.mobileStyle,
126
+ tabletLandscapeStyle: e.tabletLandscapeStyle,
127
+ mobileLandscapeStyle: e.mobileLandscapeStyle
128
+ };
129
+ }
130
+ function k(e, t, n) {
131
+ let r = e.style ?? {}, i = {
132
+ class: [t, ...n ? l(n, O(e)) : []].filter(Boolean).join(" "),
133
+ "data-plmt-id": D(e)
134
+ };
135
+ return typeof r.layout == "string" && (i["data-layout"] = r.layout), typeof r.backgroundType == "string" && (i["data-background"] = r.backgroundType), i;
136
+ }
137
+ function A(e, t) {
138
+ return {
139
+ attrs: k(t, C[e], e),
140
+ vars: S(a(e, t.style), E(e))
141
+ };
142
+ }
143
+ function j(e) {
144
+ return S(u({
145
+ backgroundColor: e.backgroundColor,
146
+ textColor: e.textColor,
147
+ textSize: e.textSize
148
+ }), "page");
149
+ }
150
+ // src/elements/page/template.ts
151
+ function M(e, t) {
152
+ let n = e.props;
153
+ return w("main", {
154
+ class: C.PPage,
155
+ "data-plmt-id": String(n.pageId),
156
+ title: String(n.title ?? ""),
157
+ "data-url": String(n.url ?? "")
158
+ }, t?.children ?? [], j(n));
159
+ }
160
+ // src/elements/section/template.ts
161
+ function N(e, t) {
162
+ let n = A(e.type, e.props);
163
+ return w("section", n.attrs, t?.children ?? [], n.vars);
164
+ }
165
+ // src/elements/container/template.ts
166
+ function P(e, t) {
167
+ let n = A(e.type, e.props);
168
+ return w("div", n.attrs, t?.children ?? [], n.vars);
169
+ }
170
+ // src/elements/button/template.ts
171
+ function F(e, t = "") {
172
+ let n = {
173
+ class: C.PIcon,
174
+ "data-name": e || void 0
175
+ };
176
+ return t.trim() ? (n.role = "img", n["aria-label"] = t) : n["aria-hidden"] = "true", w("span", n);
177
+ }
178
+ function I(e, t) {
179
+ let n = e.props, r = A(e.type, n), i = [];
180
+ n.startIcon && i.push(F(String(n.startIcon))), i.push(String(n.name ?? "")), n.endIcon && i.push(F(String(n.endIcon)));
181
+ let a = String(n.href ?? "");
182
+ if (a) {
183
+ let e = String(n.target ?? "_self");
184
+ return w("a", {
185
+ ...r.attrs,
186
+ href: a,
187
+ target: e,
188
+ rel: e === "_blank" ? "noopener noreferrer" : void 0,
189
+ "aria-description": String(n.description ?? "") || void 0
190
+ }, i, r.vars);
191
+ }
192
+ return w("button", {
193
+ ...r.attrs,
194
+ type: "button"
195
+ }, i, r.vars);
196
+ }
197
+ // src/elements/text/template.ts
198
+ function L(e, t) {
199
+ let n = e.props, r = A(e.type, n);
200
+ return w("p", r.attrs, T(n, [String(n.text ?? "")]), r.vars);
201
+ }
202
+ // src/elements/rich-text/template.ts
203
+ function R(e, t) {
204
+ let n = e.props, r = A(e.type, n);
205
+ return w("div", r.attrs, { html: m(String(n.text ?? "")) }, r.vars);
206
+ }
207
+ // src/elements/icon/template.ts
208
+ function z(e, t) {
209
+ let n = e.props, r = A(e.type, n), i = String(n.label ?? ""), a = String(n.icon ?? ""), o = i.trim() ? {
210
+ role: "img",
211
+ "aria-label": i
212
+ } : { "aria-hidden": "true" }, s = T(n, []);
213
+ return w("span", {
214
+ ...r.attrs,
215
+ "data-name": a || void 0,
216
+ ...o
217
+ }, s.length ? s : void 0, r.vars);
218
+ }
219
+ // src/elements/image/template.ts
220
+ function B(e, t) {
221
+ let n = e.props, r = A(e.type, n), i = w("img", {
222
+ class: String(n.href ?? "") ? void 0 : C.PImage,
223
+ src: String(n.src),
224
+ alt: String(n.alt ?? ""),
225
+ ...String(n.href ?? "") ? {} : {
226
+ "data-plmt-id": r.attrs["data-plmt-id"],
227
+ "data-background": r.attrs["data-background"]
228
+ }
229
+ }, void 0, String(n.href ?? "") ? {} : r.vars), a = String(n.href ?? "");
230
+ if (!a) return i;
231
+ let o = String(n.target ?? "_self");
232
+ return w("a", {
233
+ class: C.PImage,
234
+ "data-plmt-id": r.attrs["data-plmt-id"],
235
+ "data-background": r.attrs["data-background"],
236
+ href: a,
237
+ target: o,
238
+ rel: o === "_blank" ? "noopener noreferrer" : void 0,
239
+ "aria-description": String(n.description ?? "") || void 0
240
+ }, [w("img", {
241
+ src: String(n.src),
242
+ alt: String(n.alt ?? "")
243
+ })], r.vars);
244
+ }
245
+ // src/elements/video/template.ts
246
+ function V(e, t) {
247
+ let n = e.props;
248
+ if (!String(n.src ?? "")) return null;
249
+ let r = A(e.type, n);
250
+ return w("video", {
251
+ ...r.attrs,
252
+ src: String(n.src),
253
+ title: String(n.title ?? ""),
254
+ controls: !0
255
+ }, void 0, r.vars);
256
+ }
257
+ // src/elements/list/template.ts
258
+ function H(e, t) {
259
+ let n = e.props, r = A(e.type, n), i = n.items.map((e) => w("li", {}, [e.text]));
260
+ return w("ul", r.attrs, i, r.vars);
261
+ }
262
+ // src/elements/divider/template.ts
263
+ function U(e, t) {
264
+ let n = e.props, r = A(e.type, n);
265
+ return w("hr", {
266
+ ...r.attrs,
267
+ "data-size": String(n.size ?? "4")
268
+ }, void 0, r.vars);
269
+ }
270
+ // src/elements/table/template.ts
271
+ function W(e, t) {
272
+ let n = e.props, r = A(e.type, n), i = n.headers.map((e) => w("th", {}, [e.text])), a = n.rows.map((e) => w("tr", {}, e.cells.map((e) => w("td", {}, [e]))));
273
+ return w("div", r.attrs, [w("table", {}, [w("thead", {}, [w("tr", {}, i)]), w("tbody", {}, a)])], r.vars);
274
+ }
275
+ // src/elements/text-field/template.ts
276
+ function G(e, t) {
277
+ let n = e.props, r = A(e.type, n), i = D(n);
278
+ return w("div", r.attrs, [w("label", { for: i }, [String(n.label)]), w("input", {
279
+ id: i,
280
+ name: i,
281
+ placeholder: String(n.placeholder ?? "")
282
+ })], r.vars);
283
+ }
284
+ // src/elements/text-area/template.ts
285
+ function K(e, t) {
286
+ let n = e.props, r = A(e.type, n), i = D(n);
287
+ return w("div", r.attrs, [w("label", { for: i }, [String(n.label)]), w("textarea", {
288
+ id: i,
289
+ name: i,
290
+ placeholder: String(n.placeholder ?? "")
291
+ })], r.vars);
292
+ }
293
+ // src/elements/checkbox/template.ts
294
+ function q(e, t) {
295
+ let n = e.props, r = A(e.type, n), i = D(n);
296
+ return w("div", r.attrs, [w("label", {}, [w("input", {
297
+ type: "checkbox",
298
+ name: i,
299
+ checked: n.checked === !0 || void 0
300
+ }), String(n.label)])], r.vars);
301
+ }
302
+ // src/elements/radio/template.ts
303
+ function J(e, t) {
304
+ let n = e.props, r = A(e.type, n), i = D(n), a = n.options.map((e) => w("label", {}, [w("input", {
305
+ type: "radio",
306
+ name: i,
307
+ value: e.text
308
+ }), e.text]));
309
+ return w("fieldset", r.attrs, [w("legend", {}, [String(n.legend)]), ...a], r.vars);
310
+ }
311
+ // src/elements/select/template.ts
312
+ function Y(e, t) {
313
+ let n = e.props, r = A(e.type, n), i = D(n), a = n.options.map((e) => w("option", { value: e.text }, [e.text]));
314
+ return w("div", r.attrs, [w("label", { for: i }, [String(n.label)]), w("select", {
315
+ id: i,
316
+ name: i
317
+ }, a)], r.vars);
318
+ }
319
+ // src/templates/elementSpec.ts
320
+ var X = /* @__PURE__ */ new Set([
321
+ "PPage",
322
+ "PSection",
323
+ "PContainer"
324
+ ]), Z = {
325
+ PPage: M,
326
+ PSection: N,
327
+ PContainer: P,
328
+ PButton: I,
329
+ PText: L,
330
+ PRichText: R,
331
+ PImage: B,
332
+ PVideo: V,
333
+ PList: H,
334
+ PIcon: z,
335
+ PDivider: U,
336
+ PTable: W,
337
+ PTextField: G,
338
+ PTextArea: K,
339
+ PCheckbox: q,
340
+ PRadio: J,
341
+ PSelect: Y
342
+ };
343
+ function Q(e, t) {
344
+ return Z[e.type](e, t);
345
+ }
346
+ function $(e) {
347
+ return X.has(e.type) ? Q(e, { children: (e.children ?? []).map($).filter(Boolean) }) : Q(e);
348
+ }
349
+ export { ee as COLOR_NAMES, t as OPACITY_STEPS, d as SPACING_TOKENS, n as TEXT_SIZE_TOKENS, E as cssPrefix, Q as elementSpec, p as escapeHtml, k as hostAttrs, c as isPaletteColor, T as linked, D as nodeId, j as pageStyleVars, u as pageTokensToVarValues, h as renderHtml, m as sanitizeRichTextHtml, w as spec, s as styleObjectToClasses, l as styleToClasses, S as styleToCssVariables, C as tags, g as toDom, $ as toElementTree, i as toPaletteColor, r as toSpacingToken, e as toTextSizeToken, a as unresolvedStyleForVars, A as withStyle };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@palmyit/elements",
3
- "version": "0.1.3",
4
- "description": "Palmyit plmt-* light-DOM web components for builder and published sites",
3
+ "version": "0.1.8",
4
+ "description": "Palmyit element definitions, semantic HTML templates, and CSS for builder and published sites",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
@@ -18,25 +18,51 @@
18
18
  "test": "vitest run --exclude src/manifest.test.ts",
19
19
  "test:watch": "vitest",
20
20
  "test:manifest": "vitest run src/manifest.test.ts",
21
+ "storybook": "storybook dev -p 6007",
22
+ "build-storybook": "storybook build",
21
23
  "prepublishOnly": "yarn build"
22
24
  },
23
25
  "exports": {
24
26
  ".": "./dist/plmt-elements.js",
27
+ "./definitions": {
28
+ "types": "./dist/definitions.d.ts",
29
+ "import": "./dist/definitions.js",
30
+ "default": "./dist/definitions.js"
31
+ },
32
+ "./templates": {
33
+ "types": "./dist/templates.d.ts",
34
+ "import": "./dist/templates.js",
35
+ "default": "./dist/templates.js"
36
+ },
25
37
  "./plmt-elements.css": "./dist/plmt-elements.css",
26
38
  "./tags.json": "./dist/tags.json",
27
39
  "./manifest.json": "./dist/manifest.json"
28
40
  },
29
- "jsdelivr": "dist/plmt-elements.js",
30
- "unpkg": "dist/plmt-elements.js",
31
- "sideEffects": true,
41
+ "jsdelivr": "dist/plmt-elements.css",
42
+ "unpkg": "dist/plmt-elements.css",
43
+ "sideEffects": [
44
+ "./dist/plmt-elements.js",
45
+ "./dist/plmt-elements.css",
46
+ "**/*.css"
47
+ ],
32
48
  "publishConfig": {
33
49
  "access": "public",
34
50
  "registry": "https://registry.npmjs.org/"
35
51
  },
52
+ "dependencies": {
53
+ "zod": "^4.6.5"
54
+ },
36
55
  "devDependencies": {
56
+ "@storybook/addon-a11y": "^10.6.0",
57
+ "@storybook/addon-docs": "^10.6.0",
58
+ "@storybook/html-vite": "^10.6.0",
59
+ "@tailwindcss/vite": "^4.3.3",
37
60
  "happy-dom": "^20.0.10",
61
+ "storybook": "^10.6.0",
62
+ "tailwindcss": "^4.3.3",
38
63
  "typescript": "~6.0.2",
39
64
  "vite": "^8.3.0",
65
+ "vite-plugin-dts": "^5.0.2",
40
66
  "vitest": "^5.0.0"
41
67
  },
42
68
  "engines": {