@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/renderer.d.mts
CHANGED
|
@@ -6,15 +6,22 @@ import { R as ResponsiveVisibility } from './ResponsiveToggleField-BihXsGIJ.mjs'
|
|
|
6
6
|
export { D as DEFAULT_THEME, T as ThemeProvider, u as useTheme } from './ResponsiveToggleField-BihXsGIJ.mjs';
|
|
7
7
|
import { PuckContext } from '@measured/puck';
|
|
8
8
|
|
|
9
|
+
type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
10
|
+
type HeadingSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
|
|
11
|
+
type HeadingWeight = "normal" | "medium" | "semibold" | "bold" | "extrabold";
|
|
12
|
+
type HeadingAlign = "left" | "center" | "right";
|
|
13
|
+
type HeadingLetterSpacing = "tight" | "normal" | "wide";
|
|
14
|
+
type HeadingLineHeight = "tight" | "normal" | "relaxed";
|
|
15
|
+
|
|
9
16
|
type HeadingProps = {
|
|
10
17
|
text?: EntryBoundValue<string> | string;
|
|
11
|
-
level?:
|
|
12
|
-
size?:
|
|
13
|
-
weight?:
|
|
18
|
+
level?: HeadingLevel;
|
|
19
|
+
size?: HeadingSize;
|
|
20
|
+
weight?: HeadingWeight;
|
|
14
21
|
color?: ThemeableColorValue | ColorValue | string;
|
|
15
|
-
align?:
|
|
16
|
-
letterSpacing?:
|
|
17
|
-
lineHeight?:
|
|
22
|
+
align?: HeadingAlign;
|
|
23
|
+
letterSpacing?: HeadingLetterSpacing;
|
|
24
|
+
lineHeight?: HeadingLineHeight;
|
|
18
25
|
id?: string;
|
|
19
26
|
puck?: unknown;
|
|
20
27
|
editMode?: boolean;
|
package/dist/renderer.d.ts
CHANGED
|
@@ -6,15 +6,22 @@ import { R as ResponsiveVisibility } from './ResponsiveToggleField-CfBKL5oY.js';
|
|
|
6
6
|
export { D as DEFAULT_THEME, T as ThemeProvider, u as useTheme } from './ResponsiveToggleField-CfBKL5oY.js';
|
|
7
7
|
import { PuckContext } from '@measured/puck';
|
|
8
8
|
|
|
9
|
+
type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
10
|
+
type HeadingSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
|
|
11
|
+
type HeadingWeight = "normal" | "medium" | "semibold" | "bold" | "extrabold";
|
|
12
|
+
type HeadingAlign = "left" | "center" | "right";
|
|
13
|
+
type HeadingLetterSpacing = "tight" | "normal" | "wide";
|
|
14
|
+
type HeadingLineHeight = "tight" | "normal" | "relaxed";
|
|
15
|
+
|
|
9
16
|
type HeadingProps = {
|
|
10
17
|
text?: EntryBoundValue<string> | string;
|
|
11
|
-
level?:
|
|
12
|
-
size?:
|
|
13
|
-
weight?:
|
|
18
|
+
level?: HeadingLevel;
|
|
19
|
+
size?: HeadingSize;
|
|
20
|
+
weight?: HeadingWeight;
|
|
14
21
|
color?: ThemeableColorValue | ColorValue | string;
|
|
15
|
-
align?:
|
|
16
|
-
letterSpacing?:
|
|
17
|
-
lineHeight?:
|
|
22
|
+
align?: HeadingAlign;
|
|
23
|
+
letterSpacing?: HeadingLetterSpacing;
|
|
24
|
+
lineHeight?: HeadingLineHeight;
|
|
18
25
|
id?: string;
|
|
19
26
|
puck?: unknown;
|
|
20
27
|
editMode?: boolean;
|
package/dist/renderer.js
CHANGED
|
@@ -171,9 +171,8 @@ function cn(...inputs) {
|
|
|
171
171
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
// components/page/Heading.
|
|
175
|
-
var
|
|
176
|
-
var sizeMap = {
|
|
174
|
+
// components/page/primitives/Heading.ts
|
|
175
|
+
var headingSizeMap = {
|
|
177
176
|
xs: "0.875rem",
|
|
178
177
|
sm: "1rem",
|
|
179
178
|
md: "1.25rem",
|
|
@@ -183,23 +182,37 @@ var sizeMap = {
|
|
|
183
182
|
"3xl": "3rem",
|
|
184
183
|
"4xl": "4rem"
|
|
185
184
|
};
|
|
186
|
-
var
|
|
185
|
+
var headingWeightMap = {
|
|
187
186
|
normal: 400,
|
|
188
187
|
medium: 500,
|
|
189
188
|
semibold: 600,
|
|
190
189
|
bold: 700,
|
|
191
190
|
extrabold: 800
|
|
192
191
|
};
|
|
193
|
-
var
|
|
192
|
+
var headingLetterSpacingMap = {
|
|
194
193
|
tight: "-0.025em",
|
|
195
194
|
normal: "0",
|
|
196
195
|
wide: "0.05em"
|
|
197
196
|
};
|
|
198
|
-
var
|
|
197
|
+
var headingLineHeightMap = {
|
|
199
198
|
tight: "1.1",
|
|
200
199
|
normal: "1.4",
|
|
201
200
|
relaxed: "1.6"
|
|
202
201
|
};
|
|
202
|
+
function getHeadingStyle(props) {
|
|
203
|
+
return {
|
|
204
|
+
fontSize: headingSizeMap[props.size],
|
|
205
|
+
fontWeight: headingWeightMap[props.weight],
|
|
206
|
+
color: props.color,
|
|
207
|
+
textAlign: props.align,
|
|
208
|
+
letterSpacing: headingLetterSpacingMap[props.letterSpacing],
|
|
209
|
+
lineHeight: headingLineHeightMap[props.lineHeight],
|
|
210
|
+
margin: 0
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// components/page/next/Heading.tsx
|
|
215
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
203
216
|
function isThemeableValue(value) {
|
|
204
217
|
return typeof value === "object" && value !== null && "useTheme" in value;
|
|
205
218
|
}
|
|
@@ -231,42 +244,51 @@ function Heading({
|
|
|
231
244
|
return "";
|
|
232
245
|
})();
|
|
233
246
|
const resolvedColor = (() => {
|
|
234
|
-
if (!color)
|
|
235
|
-
|
|
247
|
+
if (!color)
|
|
248
|
+
return hexToRgba(
|
|
249
|
+
resolveColor2("foreground").color,
|
|
250
|
+
resolveColor2("foreground").opacity
|
|
251
|
+
);
|
|
252
|
+
if (typeof color === "string") return color;
|
|
236
253
|
if (isThemeableValue(color)) {
|
|
237
|
-
return color.useTheme ?
|
|
254
|
+
return color.useTheme ? hexToRgba(
|
|
255
|
+
resolveColor2(color.themeKey).color,
|
|
256
|
+
resolveColor2(color.themeKey).opacity
|
|
257
|
+
) : hexToRgba(color.value.color, color.value.opacity);
|
|
238
258
|
}
|
|
239
|
-
if ("color" in color) return color;
|
|
240
|
-
return
|
|
259
|
+
if ("color" in color) return hexToRgba(color.color, color.opacity);
|
|
260
|
+
return hexToRgba(
|
|
261
|
+
resolveColor2("foreground").color,
|
|
262
|
+
resolveColor2("foreground").opacity
|
|
263
|
+
);
|
|
241
264
|
})();
|
|
242
265
|
const Tag = level;
|
|
243
|
-
const style = {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
color:
|
|
247
|
-
|
|
248
|
-
letterSpacing
|
|
249
|
-
lineHeight
|
|
250
|
-
|
|
251
|
-
};
|
|
266
|
+
const style = getHeadingStyle({
|
|
267
|
+
size,
|
|
268
|
+
weight,
|
|
269
|
+
color: resolvedColor,
|
|
270
|
+
align,
|
|
271
|
+
letterSpacing,
|
|
272
|
+
lineHeight
|
|
273
|
+
});
|
|
252
274
|
if (!resolvedText) return null;
|
|
253
275
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Tag, { id, style, children: resolvedText });
|
|
254
276
|
}
|
|
255
277
|
|
|
256
278
|
// components/page/Paragraph.tsx
|
|
257
279
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
258
|
-
var
|
|
280
|
+
var sizeMap = {
|
|
259
281
|
sm: "0.875rem",
|
|
260
282
|
base: "1rem",
|
|
261
283
|
lg: "1.125rem",
|
|
262
284
|
xl: "1.25rem"
|
|
263
285
|
};
|
|
264
|
-
var
|
|
286
|
+
var weightMap = {
|
|
265
287
|
normal: 400,
|
|
266
288
|
medium: 500,
|
|
267
289
|
semibold: 600
|
|
268
290
|
};
|
|
269
|
-
var
|
|
291
|
+
var lineHeightMap = {
|
|
270
292
|
tight: "1.4",
|
|
271
293
|
normal: "1.6",
|
|
272
294
|
relaxed: "1.75",
|
|
@@ -311,11 +333,11 @@ function Paragraph({
|
|
|
311
333
|
return resolveColor2("foreground");
|
|
312
334
|
})();
|
|
313
335
|
const style = {
|
|
314
|
-
fontSize:
|
|
315
|
-
fontWeight:
|
|
336
|
+
fontSize: sizeMap[size],
|
|
337
|
+
fontWeight: weightMap[weight],
|
|
316
338
|
color: hexToRgba(resolvedColor.color, resolvedColor.opacity),
|
|
317
339
|
textAlign: align,
|
|
318
|
-
lineHeight:
|
|
340
|
+
lineHeight: lineHeightMap[lineHeight],
|
|
319
341
|
maxWidth: maxWidth || void 0,
|
|
320
342
|
margin: 0
|
|
321
343
|
};
|
|
@@ -979,7 +1001,7 @@ function VideoEmbed({
|
|
|
979
1001
|
|
|
980
1002
|
// components/page/Icon.tsx
|
|
981
1003
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
982
|
-
var
|
|
1004
|
+
var sizeMap2 = {
|
|
983
1005
|
sm: { size: "16px", strokeWidth: 2 },
|
|
984
1006
|
md: { size: "24px", strokeWidth: 2 },
|
|
985
1007
|
lg: { size: "32px", strokeWidth: 1.5 },
|
|
@@ -1197,7 +1219,7 @@ function Icon({
|
|
|
1197
1219
|
return resolveColor2("primary");
|
|
1198
1220
|
})();
|
|
1199
1221
|
const IconComponent = icons[name.toLowerCase()] || icons.check;
|
|
1200
|
-
const { size: iconSize, strokeWidth } =
|
|
1222
|
+
const { size: iconSize, strokeWidth } = sizeMap2[size];
|
|
1201
1223
|
const colorValue = hexToRgba(resolvedColor.color, resolvedColor.opacity);
|
|
1202
1224
|
const wrapperStyle = {
|
|
1203
1225
|
display: "flex",
|
|
@@ -1541,7 +1563,7 @@ function Divider({
|
|
|
1541
1563
|
|
|
1542
1564
|
// components/page/Spacer.tsx
|
|
1543
1565
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1544
|
-
var
|
|
1566
|
+
var sizeMap3 = {
|
|
1545
1567
|
xs: "8px",
|
|
1546
1568
|
sm: "16px",
|
|
1547
1569
|
md: "24px",
|
|
@@ -1552,7 +1574,7 @@ var sizeMap4 = {
|
|
|
1552
1574
|
};
|
|
1553
1575
|
function Spacer({ size = "md", id }) {
|
|
1554
1576
|
const style = {
|
|
1555
|
-
height:
|
|
1577
|
+
height: sizeMap3[size],
|
|
1556
1578
|
width: "100%"
|
|
1557
1579
|
};
|
|
1558
1580
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id, style, "aria-hidden": "true" });
|
|
@@ -1565,7 +1587,7 @@ var alignmentMap = {
|
|
|
1565
1587
|
center: "text-center",
|
|
1566
1588
|
right: "text-right"
|
|
1567
1589
|
};
|
|
1568
|
-
var
|
|
1590
|
+
var sizeMap4 = {
|
|
1569
1591
|
small: "text-2xl",
|
|
1570
1592
|
"medium-small": "text-3xl",
|
|
1571
1593
|
medium: "text-4xl",
|
|
@@ -1654,7 +1676,7 @@ function TextBlock({
|
|
|
1654
1676
|
resolvedTitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1655
1677
|
"h2",
|
|
1656
1678
|
{
|
|
1657
|
-
className: cn("font-bold",
|
|
1679
|
+
className: cn("font-bold", sizeMap4[textSize]),
|
|
1658
1680
|
style: gradientStyle,
|
|
1659
1681
|
children: resolvedTitle
|
|
1660
1682
|
}
|
|
@@ -1708,7 +1730,7 @@ function CustomImage({
|
|
|
1708
1730
|
// components/page/FeaturesList.tsx
|
|
1709
1731
|
var import_lucide_react = require("lucide-react");
|
|
1710
1732
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1711
|
-
var
|
|
1733
|
+
var sizeMap5 = {
|
|
1712
1734
|
small: { icon: 24, title: "text-base", desc: "text-sm" },
|
|
1713
1735
|
medium: { icon: 32, title: "text-lg", desc: "text-base" },
|
|
1714
1736
|
large: { icon: 48, title: "text-xl", desc: "text-lg" }
|
|
@@ -1720,7 +1742,7 @@ function FeaturesList({
|
|
|
1720
1742
|
iconColor = "#000000",
|
|
1721
1743
|
anchorLink
|
|
1722
1744
|
}) {
|
|
1723
|
-
const sizeConfig =
|
|
1745
|
+
const sizeConfig = sizeMap5[size];
|
|
1724
1746
|
const getIcon = (iconName) => {
|
|
1725
1747
|
const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
|
|
1726
1748
|
return import_lucide_react.icons[formatted] || null;
|
|
@@ -1777,7 +1799,7 @@ function FeaturesList({
|
|
|
1777
1799
|
// components/page/FeatureGrid.tsx
|
|
1778
1800
|
var import_lucide_react2 = require("lucide-react");
|
|
1779
1801
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1780
|
-
var
|
|
1802
|
+
var sizeMap6 = {
|
|
1781
1803
|
small: { icon: 24, title: "text-base", desc: "text-sm" },
|
|
1782
1804
|
medium: { icon: 32, title: "text-lg", desc: "text-base" },
|
|
1783
1805
|
large: { icon: 48, title: "text-xl", desc: "text-lg" }
|
|
@@ -1793,7 +1815,7 @@ function FeatureGrid({
|
|
|
1793
1815
|
textColor = "#000000",
|
|
1794
1816
|
anchorLink
|
|
1795
1817
|
}) {
|
|
1796
|
-
const sizeConfig =
|
|
1818
|
+
const sizeConfig = sizeMap6[size];
|
|
1797
1819
|
const getIcon = (iconName) => {
|
|
1798
1820
|
const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
|
|
1799
1821
|
return import_lucide_react2.icons[formatted] || null;
|
|
@@ -2060,7 +2082,7 @@ var widthMap3 = {
|
|
|
2060
2082
|
medium: "max-w-lg",
|
|
2061
2083
|
large: "max-w-2xl"
|
|
2062
2084
|
};
|
|
2063
|
-
var
|
|
2085
|
+
var sizeMap7 = {
|
|
2064
2086
|
small: "px-3 py-1.5 text-sm",
|
|
2065
2087
|
medium: "px-4 py-2 text-base",
|
|
2066
2088
|
large: "px-6 py-3 text-lg"
|
|
@@ -2105,7 +2127,7 @@ function Popup({
|
|
|
2105
2127
|
onClick: handleOpen,
|
|
2106
2128
|
className: cn(
|
|
2107
2129
|
"flex items-center gap-2 rounded-full font-medium",
|
|
2108
|
-
|
|
2130
|
+
sizeMap7[size]
|
|
2109
2131
|
),
|
|
2110
2132
|
style: { backgroundColor: buttonColor, color: textColor },
|
|
2111
2133
|
children: [
|
package/dist/renderer.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Heading
|
|
3
|
+
} from "./chunk-A2J2E524.mjs";
|
|
1
4
|
import {
|
|
2
5
|
Button,
|
|
3
6
|
Card,
|
|
@@ -8,7 +11,6 @@ import {
|
|
|
8
11
|
FeatureGrid,
|
|
9
12
|
FeaturesList,
|
|
10
13
|
Footer,
|
|
11
|
-
Heading,
|
|
12
14
|
Icon,
|
|
13
15
|
Image,
|
|
14
16
|
ImageCarousel,
|
|
@@ -20,15 +22,15 @@ import {
|
|
|
20
22
|
Topbar,
|
|
21
23
|
VideoEmbed,
|
|
22
24
|
availableIcons
|
|
23
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-X6VGLL5Y.mjs";
|
|
24
26
|
import {
|
|
25
27
|
ThemeProvider,
|
|
26
28
|
useTheme
|
|
27
29
|
} from "./chunk-PJXZC564.mjs";
|
|
28
|
-
import "./chunk-QSWQDR6M.mjs";
|
|
29
30
|
import {
|
|
30
31
|
DEFAULT_THEME
|
|
31
32
|
} from "./chunk-C6V3YUPF.mjs";
|
|
33
|
+
import "./chunk-QSWQDR6M.mjs";
|
|
32
34
|
export {
|
|
33
35
|
Button,
|
|
34
36
|
Card,
|