@mission-studio/puck 1.0.23 → 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.
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mission-studio/puck",
3
- "version": "1.0.23",
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",
@@ -1,61 +0,0 @@
1
- import {
2
- getHeadingStyle,
3
- getParagraphStyle
4
- } from "./chunk-MWW5LYLN.mjs";
5
-
6
- // components/page/astro/Heading.tsx
7
- import { jsx } from "react/jsx-runtime";
8
- function Heading({
9
- text,
10
- level = "h2",
11
- size = "2xl",
12
- weight = "bold",
13
- color = "rgba(0, 0, 0, 1)",
14
- align = "left",
15
- letterSpacing = "normal",
16
- lineHeight = "tight",
17
- id
18
- }) {
19
- const resolvedText = text || "";
20
- const Tag = level;
21
- const style = getHeadingStyle({
22
- size,
23
- weight,
24
- color,
25
- align,
26
- letterSpacing,
27
- lineHeight
28
- });
29
- if (!resolvedText) return null;
30
- return /* @__PURE__ */ jsx(Tag, { id, style, children: resolvedText });
31
- }
32
-
33
- // components/page/astro/Paragraph.tsx
34
- import { jsx as jsx2 } from "react/jsx-runtime";
35
- function Paragraph({
36
- text,
37
- size = "base",
38
- weight = "normal",
39
- color = "rgba(0, 0, 0, 1)",
40
- align = "left",
41
- lineHeight = "normal",
42
- maxWidth,
43
- id
44
- }) {
45
- const resolvedText = text || "";
46
- const style = getParagraphStyle({
47
- size,
48
- weight,
49
- color,
50
- align,
51
- lineHeight,
52
- maxWidth
53
- });
54
- if (!resolvedText) return null;
55
- return /* @__PURE__ */ jsx2("p", { id, style, children: resolvedText });
56
- }
57
-
58
- export {
59
- Heading,
60
- Paragraph
61
- };
@@ -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
- };