@mission-studio/puck 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-A2J2E524.mjs +78 -0
- package/dist/{chunk-723Z3YKC.mjs → chunk-X6VGLL5Y.mjs} +203 -245
- package/dist/config/server.js +122 -137
- package/dist/config/server.mjs +52 -25
- package/dist/config-entry.js +61 -39
- package/dist/config-entry.mjs +5 -3
- package/dist/index.js +60 -38
- package/dist/index.mjs +5 -3
- package/dist/renderer.d.mts +13 -6
- package/dist/renderer.d.ts +13 -6
- package/dist/renderer.js +60 -38
- package/dist/renderer.mjs +5 -3
- package/package.json +1 -1
package/dist/config/server.js
CHANGED
|
@@ -24,9 +24,76 @@ __export(server_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(server_exports);
|
|
26
26
|
|
|
27
|
+
// components/page/primitives/Heading.ts
|
|
28
|
+
var headingSizeMap = {
|
|
29
|
+
xs: "0.875rem",
|
|
30
|
+
sm: "1rem",
|
|
31
|
+
md: "1.25rem",
|
|
32
|
+
lg: "1.5rem",
|
|
33
|
+
xl: "2rem",
|
|
34
|
+
"2xl": "2.5rem",
|
|
35
|
+
"3xl": "3rem",
|
|
36
|
+
"4xl": "4rem"
|
|
37
|
+
};
|
|
38
|
+
var headingWeightMap = {
|
|
39
|
+
normal: 400,
|
|
40
|
+
medium: 500,
|
|
41
|
+
semibold: 600,
|
|
42
|
+
bold: 700,
|
|
43
|
+
extrabold: 800
|
|
44
|
+
};
|
|
45
|
+
var headingLetterSpacingMap = {
|
|
46
|
+
tight: "-0.025em",
|
|
47
|
+
normal: "0",
|
|
48
|
+
wide: "0.05em"
|
|
49
|
+
};
|
|
50
|
+
var headingLineHeightMap = {
|
|
51
|
+
tight: "1.1",
|
|
52
|
+
normal: "1.4",
|
|
53
|
+
relaxed: "1.6"
|
|
54
|
+
};
|
|
55
|
+
function getHeadingStyle(props) {
|
|
56
|
+
return {
|
|
57
|
+
fontSize: headingSizeMap[props.size],
|
|
58
|
+
fontWeight: headingWeightMap[props.weight],
|
|
59
|
+
color: props.color,
|
|
60
|
+
textAlign: props.align,
|
|
61
|
+
letterSpacing: headingLetterSpacingMap[props.letterSpacing],
|
|
62
|
+
lineHeight: headingLineHeightMap[props.lineHeight],
|
|
63
|
+
margin: 0
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// components/page/astro/Heading.tsx
|
|
68
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
69
|
+
function Heading({
|
|
70
|
+
text,
|
|
71
|
+
level = "h2",
|
|
72
|
+
size = "2xl",
|
|
73
|
+
weight = "bold",
|
|
74
|
+
color = "rgba(0, 0, 0, 1)",
|
|
75
|
+
align = "left",
|
|
76
|
+
letterSpacing = "normal",
|
|
77
|
+
lineHeight = "tight",
|
|
78
|
+
id
|
|
79
|
+
}) {
|
|
80
|
+
const resolvedText = text || "";
|
|
81
|
+
const Tag = level;
|
|
82
|
+
const style = getHeadingStyle({
|
|
83
|
+
size,
|
|
84
|
+
weight,
|
|
85
|
+
color,
|
|
86
|
+
align,
|
|
87
|
+
letterSpacing,
|
|
88
|
+
lineHeight
|
|
89
|
+
});
|
|
90
|
+
if (!resolvedText) return null;
|
|
91
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { id, style, children: resolvedText });
|
|
92
|
+
}
|
|
93
|
+
|
|
27
94
|
// entries/context.tsx
|
|
28
95
|
var import_react = require("react");
|
|
29
|
-
var
|
|
96
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
30
97
|
var EntriesContext = (0, import_react.createContext)(null);
|
|
31
98
|
function useEntries() {
|
|
32
99
|
const context = (0, import_react.useContext)(EntriesContext);
|
|
@@ -90,7 +157,7 @@ var DEFAULT_THEME = {
|
|
|
90
157
|
};
|
|
91
158
|
|
|
92
159
|
// theme/context.tsx
|
|
93
|
-
var
|
|
160
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
94
161
|
var ThemeContext = (0, import_react2.createContext)(null);
|
|
95
162
|
function useTheme() {
|
|
96
163
|
const context = (0, import_react2.useContext)(ThemeContext);
|
|
@@ -134,111 +201,29 @@ function cn(...inputs) {
|
|
|
134
201
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
135
202
|
}
|
|
136
203
|
|
|
137
|
-
// components/page/Heading.tsx
|
|
138
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
139
|
-
var sizeMap = {
|
|
140
|
-
xs: "0.875rem",
|
|
141
|
-
sm: "1rem",
|
|
142
|
-
md: "1.25rem",
|
|
143
|
-
lg: "1.5rem",
|
|
144
|
-
xl: "2rem",
|
|
145
|
-
"2xl": "2.5rem",
|
|
146
|
-
"3xl": "3rem",
|
|
147
|
-
"4xl": "4rem"
|
|
148
|
-
};
|
|
149
|
-
var weightMap = {
|
|
150
|
-
normal: 400,
|
|
151
|
-
medium: 500,
|
|
152
|
-
semibold: 600,
|
|
153
|
-
bold: 700,
|
|
154
|
-
extrabold: 800
|
|
155
|
-
};
|
|
156
|
-
var letterSpacingMap = {
|
|
157
|
-
tight: "-0.025em",
|
|
158
|
-
normal: "0",
|
|
159
|
-
wide: "0.05em"
|
|
160
|
-
};
|
|
161
|
-
var lineHeightMap = {
|
|
162
|
-
tight: "1.1",
|
|
163
|
-
normal: "1.4",
|
|
164
|
-
relaxed: "1.6"
|
|
165
|
-
};
|
|
166
|
-
function isThemeableValue(value) {
|
|
167
|
-
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
168
|
-
}
|
|
169
|
-
function isEntryBoundValue(value) {
|
|
170
|
-
return typeof value === "object" && value !== null && "useEntry" in value;
|
|
171
|
-
}
|
|
172
|
-
function Heading({
|
|
173
|
-
text,
|
|
174
|
-
level = "h2",
|
|
175
|
-
size = "2xl",
|
|
176
|
-
weight = "bold",
|
|
177
|
-
color,
|
|
178
|
-
align = "left",
|
|
179
|
-
letterSpacing = "normal",
|
|
180
|
-
lineHeight = "tight",
|
|
181
|
-
id
|
|
182
|
-
}) {
|
|
183
|
-
const { resolveColor: resolveColor2 } = useTheme();
|
|
184
|
-
const { getEntryValue } = useEntries();
|
|
185
|
-
const resolvedText = (() => {
|
|
186
|
-
if (!text) return "";
|
|
187
|
-
if (typeof text === "string") return text;
|
|
188
|
-
if (isEntryBoundValue(text)) {
|
|
189
|
-
if (text.useEntry) {
|
|
190
|
-
return String(getEntryValue(text.entryName, text.fieldKey) ?? "");
|
|
191
|
-
}
|
|
192
|
-
return text.value;
|
|
193
|
-
}
|
|
194
|
-
return "";
|
|
195
|
-
})();
|
|
196
|
-
const resolvedColor = (() => {
|
|
197
|
-
if (!color) return resolveColor2("foreground");
|
|
198
|
-
if (typeof color === "string") return { color, opacity: 100 };
|
|
199
|
-
if (isThemeableValue(color)) {
|
|
200
|
-
return color.useTheme ? resolveColor2(color.themeKey) : color.value;
|
|
201
|
-
}
|
|
202
|
-
if ("color" in color) return color;
|
|
203
|
-
return resolveColor2("foreground");
|
|
204
|
-
})();
|
|
205
|
-
const Tag = level;
|
|
206
|
-
const style = {
|
|
207
|
-
fontSize: sizeMap[size],
|
|
208
|
-
fontWeight: weightMap[weight],
|
|
209
|
-
color: hexToRgba(resolvedColor.color, resolvedColor.opacity),
|
|
210
|
-
textAlign: align,
|
|
211
|
-
letterSpacing: letterSpacingMap[letterSpacing],
|
|
212
|
-
lineHeight: lineHeightMap[lineHeight],
|
|
213
|
-
margin: 0
|
|
214
|
-
};
|
|
215
|
-
if (!resolvedText) return null;
|
|
216
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Tag, { id, style, children: resolvedText });
|
|
217
|
-
}
|
|
218
|
-
|
|
219
204
|
// components/page/Paragraph.tsx
|
|
220
205
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
221
|
-
var
|
|
206
|
+
var sizeMap = {
|
|
222
207
|
sm: "0.875rem",
|
|
223
208
|
base: "1rem",
|
|
224
209
|
lg: "1.125rem",
|
|
225
210
|
xl: "1.25rem"
|
|
226
211
|
};
|
|
227
|
-
var
|
|
212
|
+
var weightMap = {
|
|
228
213
|
normal: 400,
|
|
229
214
|
medium: 500,
|
|
230
215
|
semibold: 600
|
|
231
216
|
};
|
|
232
|
-
var
|
|
217
|
+
var lineHeightMap = {
|
|
233
218
|
tight: "1.4",
|
|
234
219
|
normal: "1.6",
|
|
235
220
|
relaxed: "1.75",
|
|
236
221
|
loose: "2"
|
|
237
222
|
};
|
|
238
|
-
function
|
|
223
|
+
function isThemeableValue(value) {
|
|
239
224
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
240
225
|
}
|
|
241
|
-
function
|
|
226
|
+
function isEntryBoundValue(value) {
|
|
242
227
|
return typeof value === "object" && value !== null && "useEntry" in value;
|
|
243
228
|
}
|
|
244
229
|
function Paragraph({
|
|
@@ -256,7 +241,7 @@ function Paragraph({
|
|
|
256
241
|
const resolvedText = (() => {
|
|
257
242
|
if (!text) return "";
|
|
258
243
|
if (typeof text === "string") return text;
|
|
259
|
-
if (
|
|
244
|
+
if (isEntryBoundValue(text)) {
|
|
260
245
|
if (text.useEntry) {
|
|
261
246
|
return String(getEntryValue(text.entryName, text.fieldKey) ?? "");
|
|
262
247
|
}
|
|
@@ -267,18 +252,18 @@ function Paragraph({
|
|
|
267
252
|
const resolvedColor = (() => {
|
|
268
253
|
if (!color) return resolveColor2("foreground");
|
|
269
254
|
if (typeof color === "string") return { color, opacity: 100 };
|
|
270
|
-
if (
|
|
255
|
+
if (isThemeableValue(color)) {
|
|
271
256
|
return color.useTheme ? resolveColor2(color.themeKey) : color.value;
|
|
272
257
|
}
|
|
273
258
|
if ("color" in color) return color;
|
|
274
259
|
return resolveColor2("foreground");
|
|
275
260
|
})();
|
|
276
261
|
const style = {
|
|
277
|
-
fontSize:
|
|
278
|
-
fontWeight:
|
|
262
|
+
fontSize: sizeMap[size],
|
|
263
|
+
fontWeight: weightMap[weight],
|
|
279
264
|
color: hexToRgba(resolvedColor.color, resolvedColor.opacity),
|
|
280
265
|
textAlign: align,
|
|
281
|
-
lineHeight:
|
|
266
|
+
lineHeight: lineHeightMap[lineHeight],
|
|
282
267
|
maxWidth: maxWidth || void 0,
|
|
283
268
|
margin: 0
|
|
284
269
|
};
|
|
@@ -364,10 +349,10 @@ var radiusMap = {
|
|
|
364
349
|
lg: "16px",
|
|
365
350
|
full: "9999px"
|
|
366
351
|
};
|
|
367
|
-
function
|
|
352
|
+
function isThemeableValue2(value) {
|
|
368
353
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
369
354
|
}
|
|
370
|
-
function
|
|
355
|
+
function isEntryBoundValue2(value) {
|
|
371
356
|
return typeof value === "object" && value !== null && "useEntry" in value;
|
|
372
357
|
}
|
|
373
358
|
function Button({
|
|
@@ -390,7 +375,7 @@ function Button({
|
|
|
390
375
|
const resolvedText = (() => {
|
|
391
376
|
if (!text) return "Button";
|
|
392
377
|
if (typeof text === "string") return text;
|
|
393
|
-
if (
|
|
378
|
+
if (isEntryBoundValue2(text)) {
|
|
394
379
|
if (text.useEntry) {
|
|
395
380
|
return String(getEntryValue(text.entryName, text.fieldKey) ?? "Button");
|
|
396
381
|
}
|
|
@@ -411,7 +396,7 @@ function Button({
|
|
|
411
396
|
const resolvedColor = (() => {
|
|
412
397
|
if (!color) return resolveColor2("primary");
|
|
413
398
|
if (typeof color === "string") return { color, opacity: 100 };
|
|
414
|
-
if (
|
|
399
|
+
if (isThemeableValue2(color)) {
|
|
415
400
|
return color.useTheme ? resolveColor2(color.themeKey) : color.value;
|
|
416
401
|
}
|
|
417
402
|
if ("color" in color) return color;
|
|
@@ -424,7 +409,7 @@ function Button({
|
|
|
424
409
|
}
|
|
425
410
|
if (typeof textColor === "string")
|
|
426
411
|
return { color: textColor, opacity: 100 };
|
|
427
|
-
if (
|
|
412
|
+
if (isThemeableValue2(textColor)) {
|
|
428
413
|
return textColor.useTheme ? resolveColor2(textColor.themeKey) : textColor.value;
|
|
429
414
|
}
|
|
430
415
|
if ("color" in textColor) return textColor;
|
|
@@ -521,10 +506,10 @@ var shadowMap = {
|
|
|
521
506
|
lg: "0 10px 15px rgba(0,0,0,0.1)",
|
|
522
507
|
xl: "0 20px 25px rgba(0,0,0,0.15)"
|
|
523
508
|
};
|
|
524
|
-
function
|
|
509
|
+
function isThemeableValue3(value) {
|
|
525
510
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
526
511
|
}
|
|
527
|
-
function
|
|
512
|
+
function isEntryBoundValue3(value) {
|
|
528
513
|
return typeof value === "object" && value !== null && "useEntry" in value;
|
|
529
514
|
}
|
|
530
515
|
function Image({
|
|
@@ -545,7 +530,7 @@ function Image({
|
|
|
545
530
|
const resolvedSrc = (() => {
|
|
546
531
|
if (!src) return "";
|
|
547
532
|
if (typeof src === "string") return src;
|
|
548
|
-
if (
|
|
533
|
+
if (isEntryBoundValue3(src)) {
|
|
549
534
|
if (src.useEntry) {
|
|
550
535
|
return String(getEntryValue(src.entryName, src.fieldKey) ?? "");
|
|
551
536
|
}
|
|
@@ -556,7 +541,7 @@ function Image({
|
|
|
556
541
|
const resolvedCaption = (() => {
|
|
557
542
|
if (!caption) return "";
|
|
558
543
|
if (typeof caption === "string") return caption;
|
|
559
|
-
if (
|
|
544
|
+
if (isEntryBoundValue3(caption)) {
|
|
560
545
|
if (caption.useEntry) {
|
|
561
546
|
return String(getEntryValue(caption.entryName, caption.fieldKey) ?? "");
|
|
562
547
|
}
|
|
@@ -568,7 +553,7 @@ function Image({
|
|
|
568
553
|
if (!captionColor) return resolveColor2("muted");
|
|
569
554
|
if (typeof captionColor === "string")
|
|
570
555
|
return { color: captionColor, opacity: 100 };
|
|
571
|
-
if (
|
|
556
|
+
if (isThemeableValue3(captionColor)) {
|
|
572
557
|
return captionColor.useTheme ? resolveColor2(captionColor.themeKey) : captionColor.value;
|
|
573
558
|
}
|
|
574
559
|
if ("color" in captionColor) return captionColor;
|
|
@@ -633,7 +618,7 @@ var radiusMap3 = {
|
|
|
633
618
|
md: "8px",
|
|
634
619
|
lg: "16px"
|
|
635
620
|
};
|
|
636
|
-
function
|
|
621
|
+
function isThemeableValue4(value) {
|
|
637
622
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
638
623
|
}
|
|
639
624
|
function ImageCarousel({
|
|
@@ -654,7 +639,7 @@ function ImageCarousel({
|
|
|
654
639
|
if (!arrowColor) return { color: "#FFFFFF", opacity: 100 };
|
|
655
640
|
if (typeof arrowColor === "string")
|
|
656
641
|
return { color: arrowColor, opacity: 100 };
|
|
657
|
-
if (
|
|
642
|
+
if (isThemeableValue4(arrowColor)) {
|
|
658
643
|
return arrowColor.useTheme ? resolveColor2(arrowColor.themeKey) : arrowColor.value;
|
|
659
644
|
}
|
|
660
645
|
if ("color" in arrowColor) return arrowColor;
|
|
@@ -663,7 +648,7 @@ function ImageCarousel({
|
|
|
663
648
|
const resolvedDotColor = (() => {
|
|
664
649
|
if (!dotColor) return resolveColor2("primary");
|
|
665
650
|
if (typeof dotColor === "string") return { color: dotColor, opacity: 100 };
|
|
666
|
-
if (
|
|
651
|
+
if (isThemeableValue4(dotColor)) {
|
|
667
652
|
return dotColor.useTheme ? resolveColor2(dotColor.themeKey) : dotColor.value;
|
|
668
653
|
}
|
|
669
654
|
if ("color" in dotColor) return dotColor;
|
|
@@ -837,7 +822,7 @@ var maxWidthMap = {
|
|
|
837
822
|
xl: "1000px",
|
|
838
823
|
full: "100%"
|
|
839
824
|
};
|
|
840
|
-
function
|
|
825
|
+
function isEntryBoundValue4(value) {
|
|
841
826
|
return typeof value === "object" && value !== null && "useEntry" in value;
|
|
842
827
|
}
|
|
843
828
|
function parseVideoUrl(url) {
|
|
@@ -874,7 +859,7 @@ function VideoEmbed({
|
|
|
874
859
|
const resolvedUrl = (() => {
|
|
875
860
|
if (!url) return "";
|
|
876
861
|
if (typeof url === "string") return url;
|
|
877
|
-
if (
|
|
862
|
+
if (isEntryBoundValue4(url)) {
|
|
878
863
|
if (url.useEntry) {
|
|
879
864
|
return String(getEntryValue(url.entryName, url.fieldKey) ?? "");
|
|
880
865
|
}
|
|
@@ -942,7 +927,7 @@ function VideoEmbed({
|
|
|
942
927
|
|
|
943
928
|
// components/page/Icon.tsx
|
|
944
929
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
945
|
-
var
|
|
930
|
+
var sizeMap2 = {
|
|
946
931
|
sm: { size: "16px", strokeWidth: 2 },
|
|
947
932
|
md: { size: "24px", strokeWidth: 2 },
|
|
948
933
|
lg: { size: "32px", strokeWidth: 1.5 },
|
|
@@ -1139,7 +1124,7 @@ var icons = {
|
|
|
1139
1124
|
}
|
|
1140
1125
|
)
|
|
1141
1126
|
};
|
|
1142
|
-
function
|
|
1127
|
+
function isThemeableValue5(value) {
|
|
1143
1128
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1144
1129
|
}
|
|
1145
1130
|
function Icon({
|
|
@@ -1153,14 +1138,14 @@ function Icon({
|
|
|
1153
1138
|
const resolvedColor = (() => {
|
|
1154
1139
|
if (!color) return resolveColor2("primary");
|
|
1155
1140
|
if (typeof color === "string") return { color, opacity: 100 };
|
|
1156
|
-
if (
|
|
1141
|
+
if (isThemeableValue5(color)) {
|
|
1157
1142
|
return color.useTheme ? resolveColor2(color.themeKey) : color.value;
|
|
1158
1143
|
}
|
|
1159
1144
|
if ("color" in color) return color;
|
|
1160
1145
|
return resolveColor2("primary");
|
|
1161
1146
|
})();
|
|
1162
1147
|
const IconComponent = icons[name.toLowerCase()] || icons.check;
|
|
1163
|
-
const { size: iconSize, strokeWidth } =
|
|
1148
|
+
const { size: iconSize, strokeWidth } = sizeMap2[size];
|
|
1164
1149
|
const colorValue = hexToRgba(resolvedColor.color, resolvedColor.opacity);
|
|
1165
1150
|
const wrapperStyle = {
|
|
1166
1151
|
display: "flex",
|
|
@@ -1215,13 +1200,13 @@ var getShadowCSS = (value) => {
|
|
|
1215
1200
|
|
|
1216
1201
|
// components/page/Section.tsx
|
|
1217
1202
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1218
|
-
function
|
|
1203
|
+
function isThemeableValue6(value) {
|
|
1219
1204
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1220
1205
|
}
|
|
1221
1206
|
function resolveBackgroundColor(bg, resolveColor2) {
|
|
1222
1207
|
if (!bg) return void 0;
|
|
1223
1208
|
if (typeof bg === "string") return bg;
|
|
1224
|
-
if (
|
|
1209
|
+
if (isThemeableValue6(bg)) {
|
|
1225
1210
|
if (bg.useTheme) {
|
|
1226
1211
|
const themeColor = resolveColor2(bg.themeKey);
|
|
1227
1212
|
return hexToRgba(themeColor.color, themeColor.opacity);
|
|
@@ -1299,7 +1284,7 @@ var paddingMap = {
|
|
|
1299
1284
|
lg: "32px",
|
|
1300
1285
|
xl: "48px"
|
|
1301
1286
|
};
|
|
1302
|
-
function
|
|
1287
|
+
function isThemeableValue7(value) {
|
|
1303
1288
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1304
1289
|
}
|
|
1305
1290
|
function Container({
|
|
@@ -1318,7 +1303,7 @@ function Container({
|
|
|
1318
1303
|
if (!backgroundColor) return null;
|
|
1319
1304
|
if (typeof backgroundColor === "string")
|
|
1320
1305
|
return { color: backgroundColor, opacity: 100 };
|
|
1321
|
-
if (
|
|
1306
|
+
if (isThemeableValue7(backgroundColor)) {
|
|
1322
1307
|
return backgroundColor.useTheme ? resolveColor2(backgroundColor.themeKey) : backgroundColor.value;
|
|
1323
1308
|
}
|
|
1324
1309
|
if ("color" in backgroundColor) return backgroundColor;
|
|
@@ -1402,7 +1387,7 @@ var paddingMap2 = {
|
|
|
1402
1387
|
lg: "32px",
|
|
1403
1388
|
xl: "48px"
|
|
1404
1389
|
};
|
|
1405
|
-
function
|
|
1390
|
+
function isThemeableValue8(value) {
|
|
1406
1391
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1407
1392
|
}
|
|
1408
1393
|
function Card({
|
|
@@ -1421,7 +1406,7 @@ function Card({
|
|
|
1421
1406
|
if (!backgroundColor) return resolveColor2("background");
|
|
1422
1407
|
if (typeof backgroundColor === "string")
|
|
1423
1408
|
return { color: backgroundColor, opacity: 100 };
|
|
1424
|
-
if (
|
|
1409
|
+
if (isThemeableValue8(backgroundColor)) {
|
|
1425
1410
|
return backgroundColor.useTheme ? resolveColor2(backgroundColor.themeKey) : backgroundColor.value;
|
|
1426
1411
|
}
|
|
1427
1412
|
if ("color" in backgroundColor) return backgroundColor;
|
|
@@ -1431,7 +1416,7 @@ function Card({
|
|
|
1431
1416
|
if (!borderColor) return resolveColor2("muted");
|
|
1432
1417
|
if (typeof borderColor === "string")
|
|
1433
1418
|
return { color: borderColor, opacity: 100 };
|
|
1434
|
-
if (
|
|
1419
|
+
if (isThemeableValue8(borderColor)) {
|
|
1435
1420
|
return borderColor.useTheme ? resolveColor2(borderColor.themeKey) : borderColor.value;
|
|
1436
1421
|
}
|
|
1437
1422
|
if ("color" in borderColor) return borderColor;
|
|
@@ -1466,7 +1451,7 @@ var spacingMap = {
|
|
|
1466
1451
|
lg: "32px",
|
|
1467
1452
|
xl: "48px"
|
|
1468
1453
|
};
|
|
1469
|
-
function
|
|
1454
|
+
function isThemeableValue9(value) {
|
|
1470
1455
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1471
1456
|
}
|
|
1472
1457
|
function Divider({
|
|
@@ -1482,7 +1467,7 @@ function Divider({
|
|
|
1482
1467
|
const resolvedColor = (() => {
|
|
1483
1468
|
if (!color) return resolveColor2("muted");
|
|
1484
1469
|
if (typeof color === "string") return { color, opacity: 100 };
|
|
1485
|
-
if (
|
|
1470
|
+
if (isThemeableValue9(color)) {
|
|
1486
1471
|
return color.useTheme ? resolveColor2(color.themeKey) : color.value;
|
|
1487
1472
|
}
|
|
1488
1473
|
if ("color" in color) return color;
|
|
@@ -1504,7 +1489,7 @@ function Divider({
|
|
|
1504
1489
|
|
|
1505
1490
|
// components/page/Spacer.tsx
|
|
1506
1491
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1507
|
-
var
|
|
1492
|
+
var sizeMap3 = {
|
|
1508
1493
|
xs: "8px",
|
|
1509
1494
|
sm: "16px",
|
|
1510
1495
|
md: "24px",
|
|
@@ -1515,7 +1500,7 @@ var sizeMap4 = {
|
|
|
1515
1500
|
};
|
|
1516
1501
|
function Spacer({ size = "md", id }) {
|
|
1517
1502
|
const style = {
|
|
1518
|
-
height:
|
|
1503
|
+
height: sizeMap3[size],
|
|
1519
1504
|
width: "100%"
|
|
1520
1505
|
};
|
|
1521
1506
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id, style, "aria-hidden": "true" });
|
|
@@ -1528,23 +1513,23 @@ var alignmentMap = {
|
|
|
1528
1513
|
center: "text-center",
|
|
1529
1514
|
right: "text-right"
|
|
1530
1515
|
};
|
|
1531
|
-
var
|
|
1516
|
+
var sizeMap4 = {
|
|
1532
1517
|
small: "text-2xl",
|
|
1533
1518
|
"medium-small": "text-3xl",
|
|
1534
1519
|
medium: "text-4xl",
|
|
1535
1520
|
large: "text-5xl",
|
|
1536
1521
|
xlarge: "text-6xl"
|
|
1537
1522
|
};
|
|
1538
|
-
function
|
|
1523
|
+
function isThemeableValue10(value) {
|
|
1539
1524
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
1540
1525
|
}
|
|
1541
|
-
function
|
|
1526
|
+
function isEntryBoundValue5(value) {
|
|
1542
1527
|
return typeof value === "object" && value !== null && "useEntry" in value;
|
|
1543
1528
|
}
|
|
1544
1529
|
function resolveColor(color, resolveThemeColor) {
|
|
1545
1530
|
if (!color) return "#000000";
|
|
1546
1531
|
if (typeof color === "string") return color;
|
|
1547
|
-
if (
|
|
1532
|
+
if (isThemeableValue10(color)) {
|
|
1548
1533
|
if (color.useTheme) {
|
|
1549
1534
|
const themeColor = resolveThemeColor(color.themeKey);
|
|
1550
1535
|
return hexToRgba(themeColor.color, themeColor.opacity);
|
|
@@ -1559,7 +1544,7 @@ function resolveColor(color, resolveThemeColor) {
|
|
|
1559
1544
|
function resolveColorHex(color, resolveThemeColor) {
|
|
1560
1545
|
if (!color) return "#000000";
|
|
1561
1546
|
if (typeof color === "string") return color;
|
|
1562
|
-
if (
|
|
1547
|
+
if (isThemeableValue10(color)) {
|
|
1563
1548
|
if (color.useTheme) {
|
|
1564
1549
|
return resolveThemeColor(color.themeKey).color;
|
|
1565
1550
|
}
|
|
@@ -1588,7 +1573,7 @@ function TextBlock({
|
|
|
1588
1573
|
const resolveText = (value) => {
|
|
1589
1574
|
if (!value) return void 0;
|
|
1590
1575
|
if (typeof value === "string") return value;
|
|
1591
|
-
if (
|
|
1576
|
+
if (isEntryBoundValue5(value)) {
|
|
1592
1577
|
if (value.useEntry) {
|
|
1593
1578
|
const entryVal = getEntryValue(value.entryName, value.fieldKey);
|
|
1594
1579
|
return entryVal != null ? String(entryVal) : void 0;
|
|
@@ -1617,7 +1602,7 @@ function TextBlock({
|
|
|
1617
1602
|
resolvedTitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1618
1603
|
"h2",
|
|
1619
1604
|
{
|
|
1620
|
-
className: cn("font-bold",
|
|
1605
|
+
className: cn("font-bold", sizeMap4[textSize]),
|
|
1621
1606
|
style: gradientStyle,
|
|
1622
1607
|
children: resolvedTitle
|
|
1623
1608
|
}
|
|
@@ -1671,7 +1656,7 @@ function CustomImage({
|
|
|
1671
1656
|
// components/page/FeaturesList.tsx
|
|
1672
1657
|
var import_lucide_react = require("lucide-react");
|
|
1673
1658
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1674
|
-
var
|
|
1659
|
+
var sizeMap5 = {
|
|
1675
1660
|
small: { icon: 24, title: "text-base", desc: "text-sm" },
|
|
1676
1661
|
medium: { icon: 32, title: "text-lg", desc: "text-base" },
|
|
1677
1662
|
large: { icon: 48, title: "text-xl", desc: "text-lg" }
|
|
@@ -1683,7 +1668,7 @@ function FeaturesList({
|
|
|
1683
1668
|
iconColor = "#000000",
|
|
1684
1669
|
anchorLink
|
|
1685
1670
|
}) {
|
|
1686
|
-
const sizeConfig =
|
|
1671
|
+
const sizeConfig = sizeMap5[size];
|
|
1687
1672
|
const getIcon = (iconName) => {
|
|
1688
1673
|
const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
|
|
1689
1674
|
return import_lucide_react.icons[formatted] || null;
|
|
@@ -1740,7 +1725,7 @@ function FeaturesList({
|
|
|
1740
1725
|
// components/page/FeatureGrid.tsx
|
|
1741
1726
|
var import_lucide_react2 = require("lucide-react");
|
|
1742
1727
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1743
|
-
var
|
|
1728
|
+
var sizeMap6 = {
|
|
1744
1729
|
small: { icon: 24, title: "text-base", desc: "text-sm" },
|
|
1745
1730
|
medium: { icon: 32, title: "text-lg", desc: "text-base" },
|
|
1746
1731
|
large: { icon: 48, title: "text-xl", desc: "text-lg" }
|
|
@@ -1756,7 +1741,7 @@ function FeatureGrid({
|
|
|
1756
1741
|
textColor = "#000000",
|
|
1757
1742
|
anchorLink
|
|
1758
1743
|
}) {
|
|
1759
|
-
const sizeConfig =
|
|
1744
|
+
const sizeConfig = sizeMap6[size];
|
|
1760
1745
|
const getIcon = (iconName) => {
|
|
1761
1746
|
const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
|
|
1762
1747
|
return import_lucide_react2.icons[formatted] || null;
|
|
@@ -2023,7 +2008,7 @@ var widthMap3 = {
|
|
|
2023
2008
|
medium: "max-w-lg",
|
|
2024
2009
|
large: "max-w-2xl"
|
|
2025
2010
|
};
|
|
2026
|
-
var
|
|
2011
|
+
var sizeMap7 = {
|
|
2027
2012
|
small: "px-3 py-1.5 text-sm",
|
|
2028
2013
|
medium: "px-4 py-2 text-base",
|
|
2029
2014
|
large: "px-6 py-3 text-lg"
|
|
@@ -2068,7 +2053,7 @@ function Popup({
|
|
|
2068
2053
|
onClick: handleOpen,
|
|
2069
2054
|
className: cn(
|
|
2070
2055
|
"flex items-center gap-2 rounded-full font-medium",
|
|
2071
|
-
|
|
2056
|
+
sizeMap7[size]
|
|
2072
2057
|
),
|
|
2073
2058
|
style: { backgroundColor: buttonColor, color: textColor },
|
|
2074
2059
|
children: [
|