@mission-studio/puck 1.0.20 → 1.0.21
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-X6VGLL5Y.mjs → chunk-MWW5LYLN.mjs} +182 -222
- package/dist/{chunk-A2J2E524.mjs → chunk-WFLVAZV2.mjs} +67 -3
- package/dist/config/server.js +166 -181
- package/dist/config/server.mjs +50 -25
- package/dist/config-entry.js +53 -31
- package/dist/config-entry.mjs +5 -5
- package/dist/index.js +53 -31
- package/dist/index.mjs +5 -5
- package/dist/renderer.d.mts +9 -4
- package/dist/renderer.d.ts +9 -4
- package/dist/renderer.js +53 -31
- package/dist/renderer.mjs +5 -5
- package/package.json +1 -1
package/dist/renderer.js
CHANGED
|
@@ -275,25 +275,38 @@ function Heading({
|
|
|
275
275
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Tag, { id, style, children: resolvedText });
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
// components/page/Paragraph.
|
|
279
|
-
var
|
|
280
|
-
var sizeMap = {
|
|
278
|
+
// components/page/primitives/Paragraph.ts
|
|
279
|
+
var paragraphSizeMap = {
|
|
281
280
|
sm: "0.875rem",
|
|
282
281
|
base: "1rem",
|
|
283
282
|
lg: "1.125rem",
|
|
284
283
|
xl: "1.25rem"
|
|
285
284
|
};
|
|
286
|
-
var
|
|
285
|
+
var paragraphWeightMap = {
|
|
287
286
|
normal: 400,
|
|
288
287
|
medium: 500,
|
|
289
288
|
semibold: 600
|
|
290
289
|
};
|
|
291
|
-
var
|
|
290
|
+
var paragraphLineHeightMap = {
|
|
292
291
|
tight: "1.4",
|
|
293
292
|
normal: "1.6",
|
|
294
293
|
relaxed: "1.75",
|
|
295
294
|
loose: "2"
|
|
296
295
|
};
|
|
296
|
+
function getParagraphStyle(props) {
|
|
297
|
+
return {
|
|
298
|
+
fontSize: paragraphSizeMap[props.size],
|
|
299
|
+
fontWeight: paragraphWeightMap[props.weight],
|
|
300
|
+
color: props.color,
|
|
301
|
+
textAlign: props.align,
|
|
302
|
+
lineHeight: paragraphLineHeightMap[props.lineHeight],
|
|
303
|
+
maxWidth: props.maxWidth || void 0,
|
|
304
|
+
margin: 0
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// components/page/next/Paragraph.tsx
|
|
309
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
297
310
|
function isThemeableValue2(value) {
|
|
298
311
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
299
312
|
}
|
|
@@ -324,23 +337,32 @@ function Paragraph({
|
|
|
324
337
|
return "";
|
|
325
338
|
})();
|
|
326
339
|
const resolvedColor = (() => {
|
|
327
|
-
if (!color)
|
|
328
|
-
|
|
340
|
+
if (!color)
|
|
341
|
+
return hexToRgba(
|
|
342
|
+
resolveColor2("foreground").color,
|
|
343
|
+
resolveColor2("foreground").opacity
|
|
344
|
+
);
|
|
345
|
+
if (typeof color === "string") return color;
|
|
329
346
|
if (isThemeableValue2(color)) {
|
|
330
|
-
return color.useTheme ?
|
|
347
|
+
return color.useTheme ? hexToRgba(
|
|
348
|
+
resolveColor2(color.themeKey).color,
|
|
349
|
+
resolveColor2(color.themeKey).opacity
|
|
350
|
+
) : hexToRgba(color.value.color, color.value.opacity);
|
|
331
351
|
}
|
|
332
|
-
if ("color" in color) return color;
|
|
333
|
-
return
|
|
352
|
+
if ("color" in color) return hexToRgba(color.color, color.opacity);
|
|
353
|
+
return hexToRgba(
|
|
354
|
+
resolveColor2("foreground").color,
|
|
355
|
+
resolveColor2("foreground").opacity
|
|
356
|
+
);
|
|
334
357
|
})();
|
|
335
|
-
const style = {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
color:
|
|
339
|
-
|
|
340
|
-
lineHeight
|
|
341
|
-
maxWidth
|
|
342
|
-
|
|
343
|
-
};
|
|
358
|
+
const style = getParagraphStyle({
|
|
359
|
+
size,
|
|
360
|
+
weight,
|
|
361
|
+
color: resolvedColor,
|
|
362
|
+
align,
|
|
363
|
+
lineHeight,
|
|
364
|
+
maxWidth
|
|
365
|
+
});
|
|
344
366
|
if (!resolvedText) return null;
|
|
345
367
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { id, style, children: resolvedText });
|
|
346
368
|
}
|
|
@@ -1001,7 +1023,7 @@ function VideoEmbed({
|
|
|
1001
1023
|
|
|
1002
1024
|
// components/page/Icon.tsx
|
|
1003
1025
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1004
|
-
var
|
|
1026
|
+
var sizeMap = {
|
|
1005
1027
|
sm: { size: "16px", strokeWidth: 2 },
|
|
1006
1028
|
md: { size: "24px", strokeWidth: 2 },
|
|
1007
1029
|
lg: { size: "32px", strokeWidth: 1.5 },
|
|
@@ -1219,7 +1241,7 @@ function Icon({
|
|
|
1219
1241
|
return resolveColor2("primary");
|
|
1220
1242
|
})();
|
|
1221
1243
|
const IconComponent = icons[name.toLowerCase()] || icons.check;
|
|
1222
|
-
const { size: iconSize, strokeWidth } =
|
|
1244
|
+
const { size: iconSize, strokeWidth } = sizeMap[size];
|
|
1223
1245
|
const colorValue = hexToRgba(resolvedColor.color, resolvedColor.opacity);
|
|
1224
1246
|
const wrapperStyle = {
|
|
1225
1247
|
display: "flex",
|
|
@@ -1563,7 +1585,7 @@ function Divider({
|
|
|
1563
1585
|
|
|
1564
1586
|
// components/page/Spacer.tsx
|
|
1565
1587
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1566
|
-
var
|
|
1588
|
+
var sizeMap2 = {
|
|
1567
1589
|
xs: "8px",
|
|
1568
1590
|
sm: "16px",
|
|
1569
1591
|
md: "24px",
|
|
@@ -1574,7 +1596,7 @@ var sizeMap3 = {
|
|
|
1574
1596
|
};
|
|
1575
1597
|
function Spacer({ size = "md", id }) {
|
|
1576
1598
|
const style = {
|
|
1577
|
-
height:
|
|
1599
|
+
height: sizeMap2[size],
|
|
1578
1600
|
width: "100%"
|
|
1579
1601
|
};
|
|
1580
1602
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id, style, "aria-hidden": "true" });
|
|
@@ -1587,7 +1609,7 @@ var alignmentMap = {
|
|
|
1587
1609
|
center: "text-center",
|
|
1588
1610
|
right: "text-right"
|
|
1589
1611
|
};
|
|
1590
|
-
var
|
|
1612
|
+
var sizeMap3 = {
|
|
1591
1613
|
small: "text-2xl",
|
|
1592
1614
|
"medium-small": "text-3xl",
|
|
1593
1615
|
medium: "text-4xl",
|
|
@@ -1676,7 +1698,7 @@ function TextBlock({
|
|
|
1676
1698
|
resolvedTitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1677
1699
|
"h2",
|
|
1678
1700
|
{
|
|
1679
|
-
className: cn("font-bold",
|
|
1701
|
+
className: cn("font-bold", sizeMap3[textSize]),
|
|
1680
1702
|
style: gradientStyle,
|
|
1681
1703
|
children: resolvedTitle
|
|
1682
1704
|
}
|
|
@@ -1730,7 +1752,7 @@ function CustomImage({
|
|
|
1730
1752
|
// components/page/FeaturesList.tsx
|
|
1731
1753
|
var import_lucide_react = require("lucide-react");
|
|
1732
1754
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1733
|
-
var
|
|
1755
|
+
var sizeMap4 = {
|
|
1734
1756
|
small: { icon: 24, title: "text-base", desc: "text-sm" },
|
|
1735
1757
|
medium: { icon: 32, title: "text-lg", desc: "text-base" },
|
|
1736
1758
|
large: { icon: 48, title: "text-xl", desc: "text-lg" }
|
|
@@ -1742,7 +1764,7 @@ function FeaturesList({
|
|
|
1742
1764
|
iconColor = "#000000",
|
|
1743
1765
|
anchorLink
|
|
1744
1766
|
}) {
|
|
1745
|
-
const sizeConfig =
|
|
1767
|
+
const sizeConfig = sizeMap4[size];
|
|
1746
1768
|
const getIcon = (iconName) => {
|
|
1747
1769
|
const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
|
|
1748
1770
|
return import_lucide_react.icons[formatted] || null;
|
|
@@ -1799,7 +1821,7 @@ function FeaturesList({
|
|
|
1799
1821
|
// components/page/FeatureGrid.tsx
|
|
1800
1822
|
var import_lucide_react2 = require("lucide-react");
|
|
1801
1823
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1802
|
-
var
|
|
1824
|
+
var sizeMap5 = {
|
|
1803
1825
|
small: { icon: 24, title: "text-base", desc: "text-sm" },
|
|
1804
1826
|
medium: { icon: 32, title: "text-lg", desc: "text-base" },
|
|
1805
1827
|
large: { icon: 48, title: "text-xl", desc: "text-lg" }
|
|
@@ -1815,7 +1837,7 @@ function FeatureGrid({
|
|
|
1815
1837
|
textColor = "#000000",
|
|
1816
1838
|
anchorLink
|
|
1817
1839
|
}) {
|
|
1818
|
-
const sizeConfig =
|
|
1840
|
+
const sizeConfig = sizeMap5[size];
|
|
1819
1841
|
const getIcon = (iconName) => {
|
|
1820
1842
|
const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
|
|
1821
1843
|
return import_lucide_react2.icons[formatted] || null;
|
|
@@ -2082,7 +2104,7 @@ var widthMap3 = {
|
|
|
2082
2104
|
medium: "max-w-lg",
|
|
2083
2105
|
large: "max-w-2xl"
|
|
2084
2106
|
};
|
|
2085
|
-
var
|
|
2107
|
+
var sizeMap6 = {
|
|
2086
2108
|
small: "px-3 py-1.5 text-sm",
|
|
2087
2109
|
medium: "px-4 py-2 text-base",
|
|
2088
2110
|
large: "px-6 py-3 text-lg"
|
|
@@ -2127,7 +2149,7 @@ function Popup({
|
|
|
2127
2149
|
onClick: handleOpen,
|
|
2128
2150
|
className: cn(
|
|
2129
2151
|
"flex items-center gap-2 rounded-full font-medium",
|
|
2130
|
-
|
|
2152
|
+
sizeMap6[size]
|
|
2131
2153
|
),
|
|
2132
2154
|
style: { backgroundColor: buttonColor, color: textColor },
|
|
2133
2155
|
children: [
|
package/dist/renderer.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Heading
|
|
3
|
-
|
|
2
|
+
Heading,
|
|
3
|
+
Paragraph
|
|
4
|
+
} from "./chunk-WFLVAZV2.mjs";
|
|
4
5
|
import {
|
|
5
6
|
Button,
|
|
6
7
|
Card,
|
|
@@ -14,7 +15,6 @@ import {
|
|
|
14
15
|
Icon,
|
|
15
16
|
Image,
|
|
16
17
|
ImageCarousel,
|
|
17
|
-
Paragraph,
|
|
18
18
|
Popup,
|
|
19
19
|
Section,
|
|
20
20
|
Spacer,
|
|
@@ -22,15 +22,15 @@ import {
|
|
|
22
22
|
Topbar,
|
|
23
23
|
VideoEmbed,
|
|
24
24
|
availableIcons
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-MWW5LYLN.mjs";
|
|
26
26
|
import {
|
|
27
27
|
ThemeProvider,
|
|
28
28
|
useTheme
|
|
29
29
|
} from "./chunk-PJXZC564.mjs";
|
|
30
|
+
import "./chunk-QSWQDR6M.mjs";
|
|
30
31
|
import {
|
|
31
32
|
DEFAULT_THEME
|
|
32
33
|
} from "./chunk-C6V3YUPF.mjs";
|
|
33
|
-
import "./chunk-QSWQDR6M.mjs";
|
|
34
34
|
export {
|
|
35
35
|
Button,
|
|
36
36
|
Card,
|