@mission-studio/puck 1.0.21 → 1.0.24

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 (33) hide show
  1. package/dist/Popup-Dg78fu78.d.mts +260 -0
  2. package/dist/Popup-L7kcJo05.d.ts +260 -0
  3. package/dist/ResponsiveToggleField-65CqZEK-.d.mts +10 -0
  4. package/dist/ResponsiveToggleField-QCve94L_.d.ts +10 -0
  5. package/dist/chunk-MYS3PLMF.mjs +463 -0
  6. package/dist/chunk-TRPKXVMO.mjs +695 -0
  7. package/dist/{chunk-MWW5LYLN.mjs → chunk-YIPEC4L4.mjs} +709 -1075
  8. package/dist/components/page/astro/index.d.mts +54 -0
  9. package/dist/components/page/astro/index.d.ts +54 -0
  10. package/dist/components/page/astro/index.js +2056 -0
  11. package/dist/components/page/astro/index.mjs +51 -0
  12. package/dist/config/server.js +630 -700
  13. package/dist/config/server.mjs +33 -83
  14. package/dist/config-entry.js +592 -478
  15. package/dist/config-entry.mjs +11 -11
  16. package/dist/{ResponsiveToggleField-CfBKL5oY.d.ts → defaults-j55hBQHu.d.mts} +2 -8
  17. package/dist/{ResponsiveToggleField-BihXsGIJ.d.mts → defaults-z8Ft2j5r.d.ts} +2 -8
  18. package/dist/editor.d.mts +5 -4
  19. package/dist/editor.d.ts +5 -4
  20. package/dist/index.d.mts +5 -3
  21. package/dist/index.d.ts +5 -3
  22. package/dist/index.js +388 -274
  23. package/dist/index.mjs +11 -11
  24. package/dist/renderer.d.mts +9 -250
  25. package/dist/renderer.d.ts +9 -250
  26. package/dist/renderer.js +388 -274
  27. package/dist/renderer.mjs +11 -11
  28. package/dist/resolve/index.d.mts +1 -1
  29. package/dist/resolve/index.d.ts +1 -1
  30. package/dist/{types-D-CIduaE.d.mts → types-HQ6hIbYr.d.mts} +1 -1
  31. package/dist/{types-D-CIduaE.d.ts → types-HQ6hIbYr.d.ts} +1 -1
  32. package/package.json +6 -1
  33. package/dist/chunk-WFLVAZV2.mjs +0 -142
package/dist/renderer.mjs CHANGED
@@ -1,28 +1,28 @@
1
- import {
2
- Heading,
3
- Paragraph
4
- } from "./chunk-WFLVAZV2.mjs";
5
1
  import {
6
2
  Button,
7
3
  Card,
8
4
  Columns,
9
5
  Container,
10
- CustomImage,
11
6
  Divider,
12
- FeatureGrid,
13
- FeaturesList,
14
- Footer,
7
+ Heading,
15
8
  Icon,
16
9
  Image,
17
10
  ImageCarousel,
18
- Popup,
11
+ Paragraph,
19
12
  Section,
20
- Spacer,
13
+ Spacer
14
+ } from "./chunk-TRPKXVMO.mjs";
15
+ import {
16
+ CustomImage,
17
+ FeatureGrid,
18
+ FeaturesList,
19
+ Footer,
20
+ Popup,
21
21
  TextBlock,
22
22
  Topbar,
23
23
  VideoEmbed,
24
24
  availableIcons
25
- } from "./chunk-MWW5LYLN.mjs";
25
+ } from "./chunk-YIPEC4L4.mjs";
26
26
  import {
27
27
  ThemeProvider,
28
28
  useTheme
@@ -1,5 +1,5 @@
1
1
  import { Data } from '@measured/puck';
2
- import { P as PageTheme, E as Entry } from '../types-D-CIduaE.mjs';
2
+ import { P as PageTheme, E as Entry } from '../types-HQ6hIbYr.mjs';
3
3
 
4
4
  interface ResolvePageDataOptions {
5
5
  theme: PageTheme | null;
@@ -1,5 +1,5 @@
1
1
  import { Data } from '@measured/puck';
2
- import { P as PageTheme, E as Entry } from '../types-D-CIduaE.js';
2
+ import { P as PageTheme, E as Entry } from '../types-HQ6hIbYr.js';
3
3
 
4
4
  interface ResolvePageDataOptions {
5
5
  theme: PageTheme | null;
@@ -108,4 +108,4 @@ type EntryBoundValue<T> = {
108
108
  value: T;
109
109
  };
110
110
 
111
- export type { ColorValue as C, Entry as E, PageTheme as P, ThemeBorderKey as T, ThemeBorders as a, ThemeColorKey as b, ThemeColors as c, ThemeShadowKey as d, ThemeShadows as e, ThemeSpacing as f, ThemeSpacingKey as g, ThemeTypography as h, ThemeableBorderRadiusValue as i, ThemeableColorValue as j, ThemeableShadowValue as k, ThemeableSpacingValue as l, CustomFieldProps as m, EntryBoundValue as n, EntryContent as o };
111
+ export type { CustomFieldProps as C, Entry as E, PageTheme as P, ThemeBorderKey as T, ThemeBorders as a, ThemeColorKey as b, ThemeColors as c, ThemeShadowKey as d, ThemeShadows as e, ThemeSpacing as f, ThemeSpacingKey as g, ThemeTypography as h, ThemeableBorderRadiusValue as i, ThemeableColorValue as j, ThemeableShadowValue as k, ThemeableSpacingValue as l, ColorValue as m, EntryBoundValue as n, EntryContent as o };
@@ -108,4 +108,4 @@ type EntryBoundValue<T> = {
108
108
  value: T;
109
109
  };
110
110
 
111
- export type { ColorValue as C, Entry as E, PageTheme as P, ThemeBorderKey as T, ThemeBorders as a, ThemeColorKey as b, ThemeColors as c, ThemeShadowKey as d, ThemeShadows as e, ThemeSpacing as f, ThemeSpacingKey as g, ThemeTypography as h, ThemeableBorderRadiusValue as i, ThemeableColorValue as j, ThemeableShadowValue as k, ThemeableSpacingValue as l, CustomFieldProps as m, EntryBoundValue as n, EntryContent as o };
111
+ export type { CustomFieldProps as C, Entry as E, PageTheme as P, ThemeBorderKey as T, ThemeBorders as a, ThemeColorKey as b, ThemeColors as c, ThemeShadowKey as d, ThemeShadows as e, ThemeSpacing as f, ThemeSpacingKey as g, ThemeTypography as h, ThemeableBorderRadiusValue as i, ThemeableColorValue as j, ThemeableShadowValue as k, ThemeableSpacingValue as l, ColorValue as m, EntryBoundValue as n, EntryContent as o };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mission-studio/puck",
3
- "version": "1.0.21",
3
+ "version": "1.0.24",
4
4
  "description": "A collection of puck components and configurations for internal use at Mission Studio.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,6 +57,11 @@
57
57
  "import": "./dist/resolve/index.mjs",
58
58
  "require": "./dist/resolve/index.js"
59
59
  },
60
+ "./components/page/astro": {
61
+ "types": "./dist/components/page/astro/index.d.ts",
62
+ "import": "./dist/components/page/astro/index.mjs",
63
+ "require": "./dist/components/page/astro/index.js"
64
+ },
60
65
  "./styles.css": "./dist/styles.css"
61
66
  },
62
67
  "scripts": {
@@ -1,142 +0,0 @@
1
- import {
2
- getHeadingStyle,
3
- getParagraphStyle
4
- } from "./chunk-MWW5LYLN.mjs";
5
- import {
6
- useEntries,
7
- useTheme
8
- } from "./chunk-PJXZC564.mjs";
9
- import {
10
- hexToRgba
11
- } from "./chunk-C6V3YUPF.mjs";
12
-
13
- // components/page/next/Heading.tsx
14
- import { jsx } from "react/jsx-runtime";
15
- function isThemeableValue(value) {
16
- return typeof value === "object" && value !== null && "useTheme" in value;
17
- }
18
- function isEntryBoundValue(value) {
19
- return typeof value === "object" && value !== null && "useEntry" in value;
20
- }
21
- function Heading({
22
- text,
23
- level = "h2",
24
- size = "2xl",
25
- weight = "bold",
26
- color,
27
- align = "left",
28
- letterSpacing = "normal",
29
- lineHeight = "tight",
30
- id
31
- }) {
32
- const { resolveColor } = useTheme();
33
- const { getEntryValue } = useEntries();
34
- const resolvedText = (() => {
35
- if (!text) return "";
36
- if (typeof text === "string") return text;
37
- if (isEntryBoundValue(text)) {
38
- if (text.useEntry) {
39
- return String(getEntryValue(text.entryName, text.fieldKey) ?? "");
40
- }
41
- return text.value;
42
- }
43
- return "";
44
- })();
45
- const resolvedColor = (() => {
46
- if (!color)
47
- return hexToRgba(
48
- resolveColor("foreground").color,
49
- resolveColor("foreground").opacity
50
- );
51
- if (typeof color === "string") return color;
52
- if (isThemeableValue(color)) {
53
- return color.useTheme ? hexToRgba(
54
- resolveColor(color.themeKey).color,
55
- resolveColor(color.themeKey).opacity
56
- ) : hexToRgba(color.value.color, color.value.opacity);
57
- }
58
- if ("color" in color) return hexToRgba(color.color, color.opacity);
59
- return hexToRgba(
60
- resolveColor("foreground").color,
61
- resolveColor("foreground").opacity
62
- );
63
- })();
64
- const Tag = level;
65
- const style = getHeadingStyle({
66
- size,
67
- weight,
68
- color: resolvedColor,
69
- align,
70
- letterSpacing,
71
- lineHeight
72
- });
73
- if (!resolvedText) return null;
74
- return /* @__PURE__ */ jsx(Tag, { id, style, children: resolvedText });
75
- }
76
-
77
- // components/page/next/Paragraph.tsx
78
- import { jsx as jsx2 } from "react/jsx-runtime";
79
- function isThemeableValue2(value) {
80
- return typeof value === "object" && value !== null && "useTheme" in value;
81
- }
82
- function isEntryBoundValue2(value) {
83
- return typeof value === "object" && value !== null && "useEntry" in value;
84
- }
85
- function Paragraph({
86
- text,
87
- size = "base",
88
- weight = "normal",
89
- color,
90
- align = "left",
91
- lineHeight = "normal",
92
- maxWidth,
93
- id
94
- }) {
95
- const { resolveColor } = useTheme();
96
- const { getEntryValue } = useEntries();
97
- const resolvedText = (() => {
98
- if (!text) return "";
99
- if (typeof text === "string") return text;
100
- if (isEntryBoundValue2(text)) {
101
- if (text.useEntry) {
102
- return String(getEntryValue(text.entryName, text.fieldKey) ?? "");
103
- }
104
- return text.value;
105
- }
106
- return "";
107
- })();
108
- const resolvedColor = (() => {
109
- if (!color)
110
- return hexToRgba(
111
- resolveColor("foreground").color,
112
- resolveColor("foreground").opacity
113
- );
114
- if (typeof color === "string") return color;
115
- if (isThemeableValue2(color)) {
116
- return color.useTheme ? hexToRgba(
117
- resolveColor(color.themeKey).color,
118
- resolveColor(color.themeKey).opacity
119
- ) : hexToRgba(color.value.color, color.value.opacity);
120
- }
121
- if ("color" in color) return hexToRgba(color.color, color.opacity);
122
- return hexToRgba(
123
- resolveColor("foreground").color,
124
- resolveColor("foreground").opacity
125
- );
126
- })();
127
- const style = getParagraphStyle({
128
- size,
129
- weight,
130
- color: resolvedColor,
131
- align,
132
- lineHeight,
133
- maxWidth
134
- });
135
- if (!resolvedText) return null;
136
- return /* @__PURE__ */ jsx2("p", { id, style, children: resolvedText });
137
- }
138
-
139
- export {
140
- Heading,
141
- Paragraph
142
- };