@mission-studio/puck 1.0.3 → 1.0.15

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/index.d.ts CHANGED
@@ -1,287 +1,6 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as EntryBoundValue, T as ThemeableColorValue, C as ColorValue, R as ResponsiveVisibility } from './ResponsiveToggleField-CVhKzDAT.js';
3
- export { B as BorderRadiusPreset, d as ColorPreset, D as DEFAULT_THEME, F as FontFamilyPreset, f as FontSizePreset, g as FontWeightPreset, P as PageTheme, S as ShadowPreset, i as SpacingPreset, j as ThemeBorderKey, k as ThemeBorders, b as ThemeColorKey, l as ThemeColors, m as ThemeProvider, n as ThemeShadowKey, o as ThemeShadows, p as ThemeSpacing, q as ThemeSpacingKey, r as ThemeTypography, s as ThemeableBorderRadiusValue, t as ThemeableShadowValue, u as ThemeableSpacingValue, v as allColorPresets, w as borderRadiusScale, x as fontFamilies, y as fontSizes, z as fontWeights, A as getBorderRadiusCSS, G as getClosestBorderRadiusValue, H as getClosestSpacingValue, I as getFontSizeCSS, J as getShadowCSS, K as neutralColors, L as shadowPresets, M as spacingScale, N as useTheme } from './ResponsiveToggleField-CVhKzDAT.js';
4
- import { ReactNode } from 'react';
5
- import { PuckContext } from '@measured/puck';
6
-
7
- type HeadingProps = {
8
- text?: EntryBoundValue<string> | string;
9
- level?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
10
- size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
11
- weight?: "normal" | "medium" | "semibold" | "bold" | "extrabold";
12
- color?: ThemeableColorValue | ColorValue | string;
13
- align?: "left" | "center" | "right";
14
- letterSpacing?: "tight" | "normal" | "wide";
15
- lineHeight?: "tight" | "normal" | "relaxed";
16
- id?: string;
17
- puck?: unknown;
18
- editMode?: boolean;
19
- };
20
- declare function Heading({ text, level, size, weight, color, align, letterSpacing, lineHeight, id, }: HeadingProps): react_jsx_runtime.JSX.Element | null;
21
-
22
- type ParagraphProps = {
23
- text?: EntryBoundValue<string> | string;
24
- size?: "sm" | "base" | "lg" | "xl";
25
- weight?: "normal" | "medium" | "semibold";
26
- color?: ThemeableColorValue | ColorValue | string;
27
- align?: "left" | "center" | "right" | "justify";
28
- lineHeight?: "tight" | "normal" | "relaxed" | "loose";
29
- maxWidth?: string;
30
- id?: string;
31
- puck?: unknown;
32
- editMode?: boolean;
33
- };
34
- declare function Paragraph({ text, size, weight, color, align, lineHeight, maxWidth, id, }: ParagraphProps): react_jsx_runtime.JSX.Element | null;
35
-
36
- type ButtonProps = {
37
- text?: EntryBoundValue<string> | string;
38
- href?: string;
39
- target?: "_self" | "_blank";
40
- variant?: "solid" | "outline" | "ghost" | "link";
41
- size?: "sm" | "md" | "lg" | "xl";
42
- color?: ThemeableColorValue | ColorValue | string;
43
- textColor?: ThemeableColorValue | ColorValue | string;
44
- borderRadius?: "none" | "sm" | "md" | "lg" | "full";
45
- fullWidth?: boolean;
46
- align?: "left" | "center" | "right";
47
- id?: string;
48
- puck?: unknown;
49
- editMode?: boolean;
50
- };
51
- declare function Button({ text, href, target, variant, size, color, textColor, borderRadius, fullWidth, align, id, }: ButtonProps): react_jsx_runtime.JSX.Element;
52
-
53
- type ImageProps = {
54
- src?: EntryBoundValue<string> | string;
55
- alt?: string;
56
- width?: "auto" | "full" | "sm" | "md" | "lg" | "xl";
57
- aspectRatio?: "auto" | "1:1" | "4:3" | "16:9" | "21:9";
58
- objectFit?: "contain" | "cover" | "fill" | "none";
59
- borderRadius?: "none" | "sm" | "md" | "lg" | "xl" | "full";
60
- shadow?: "none" | "sm" | "md" | "lg" | "xl";
61
- align?: "left" | "center" | "right";
62
- caption?: EntryBoundValue<string> | string;
63
- captionColor?: ThemeableColorValue | ColorValue | string;
64
- id?: string;
65
- puck?: unknown;
66
- editMode?: boolean;
67
- };
68
- declare function Image({ src, alt, width, aspectRatio, objectFit, borderRadius, shadow, align, caption, captionColor, id, }: ImageProps): react_jsx_runtime.JSX.Element;
69
-
70
- type CarouselImage = {
71
- src: string;
72
- alt?: string;
73
- };
74
- type ImageCarouselProps = {
75
- images?: CarouselImage[];
76
- aspectRatio?: "16:9" | "4:3" | "1:1" | "21:9";
77
- borderRadius?: "none" | "sm" | "md" | "lg";
78
- showDots?: boolean;
79
- showArrows?: boolean;
80
- arrowColor?: ThemeableColorValue | ColorValue | string;
81
- dotColor?: ThemeableColorValue | ColorValue | string;
82
- autoPlay?: boolean;
83
- autoPlayInterval?: number;
84
- id?: string;
85
- puck?: unknown;
86
- editMode?: boolean;
87
- };
88
- declare function ImageCarousel({ images, aspectRatio, borderRadius, showDots, showArrows, arrowColor, dotColor, id, }: ImageCarouselProps): react_jsx_runtime.JSX.Element;
89
-
90
- type VideoEmbedProps = {
91
- url?: EntryBoundValue<string> | string;
92
- aspectRatio?: "16:9" | "4:3" | "1:1" | "21:9";
93
- borderRadius?: "none" | "sm" | "md" | "lg";
94
- autoplay?: boolean;
95
- muted?: boolean;
96
- loop?: boolean;
97
- align?: "left" | "center" | "right";
98
- maxWidth?: "sm" | "md" | "lg" | "xl" | "full";
99
- id?: string;
100
- puck?: unknown;
101
- editMode?: boolean;
102
- };
103
- declare function VideoEmbed({ url, aspectRatio, borderRadius, autoplay, muted, loop, align, maxWidth, id, }: VideoEmbedProps): react_jsx_runtime.JSX.Element;
104
-
105
- type IconProps = {
106
- name?: string;
107
- size?: "sm" | "md" | "lg" | "xl" | "2xl";
108
- color?: ThemeableColorValue | ColorValue | string;
109
- align?: "left" | "center" | "right";
110
- id?: string;
111
- puck?: unknown;
112
- editMode?: boolean;
113
- };
114
- declare function Icon({ name, size, color, align, id, }: IconProps): react_jsx_runtime.JSX.Element;
115
- declare const availableIcons: string[];
116
-
117
- type PuckProps = {
118
- puck?: PuckContext;
119
- editMode?: boolean;
120
- id?: string;
121
- };
122
-
123
- type SectionProps = {
124
- children?: ReactNode;
125
- verticalPadding?: number;
126
- horizontalPadding?: number;
127
- gap?: number;
128
- backgroundColor?: ThemeableColorValue | ColorValue | string;
129
- backgroundImage?: string;
130
- shadow?: string;
131
- borderRadius?: number;
132
- contentMaxWidth?: string;
133
- anchorLink?: string;
134
- visibility?: ResponsiveVisibility;
135
- } & PuckProps;
136
- declare function Section({ children: _children, verticalPadding, horizontalPadding, gap, backgroundColor, backgroundImage, shadow, borderRadius, contentMaxWidth, anchorLink, visibility, puck, }: SectionProps): react_jsx_runtime.JSX.Element;
137
-
138
- type ContainerProps = {
139
- maxWidth?: "sm" | "md" | "lg" | "xl" | "2xl" | "full";
140
- padding?: "none" | "sm" | "md" | "lg" | "xl";
141
- paddingX?: "none" | "sm" | "md" | "lg" | "xl";
142
- paddingY?: "none" | "sm" | "md" | "lg" | "xl";
143
- backgroundColor?: ThemeableColorValue | ColorValue | string;
144
- centered?: boolean;
145
- } & PuckProps;
146
- declare function Container({ maxWidth, padding, paddingX, paddingY, backgroundColor, centered, id, puck, }: ContainerProps): react_jsx_runtime.JSX.Element;
147
-
148
- type ColumnsProps = {
149
- columns?: 2 | 3 | 4;
150
- gap?: "none" | "sm" | "md" | "lg" | "xl";
151
- verticalAlign?: "top" | "center" | "bottom" | "stretch";
152
- stackOnMobile?: boolean;
153
- } & PuckProps;
154
- declare function Columns({ columns, gap, verticalAlign, stackOnMobile, id, puck, }: ColumnsProps): react_jsx_runtime.JSX.Element;
155
-
156
- type CardProps = {
157
- backgroundColor?: ThemeableColorValue | ColorValue | string;
158
- borderColor?: ThemeableColorValue | ColorValue | string;
159
- borderWidth?: "none" | "thin" | "medium" | "thick";
160
- borderRadius?: "none" | "sm" | "md" | "lg" | "xl";
161
- shadow?: "none" | "sm" | "md" | "lg" | "xl";
162
- padding?: "none" | "sm" | "md" | "lg" | "xl";
163
- } & PuckProps;
164
- declare function Card({ backgroundColor, borderColor, borderWidth, borderRadius, shadow, padding, id, puck, }: CardProps): react_jsx_runtime.JSX.Element;
165
-
166
- type DividerProps = {
167
- style?: "solid" | "dashed" | "dotted";
168
- thickness?: "thin" | "medium" | "thick";
169
- color?: ThemeableColorValue | ColorValue | string;
170
- width?: "full" | "3/4" | "1/2" | "1/4";
171
- align?: "left" | "center" | "right";
172
- spacing?: "sm" | "md" | "lg" | "xl";
173
- id?: string;
174
- puck?: unknown;
175
- editMode?: boolean;
176
- };
177
- declare function Divider({ style: lineStyle, thickness, color, width, align, spacing, id, }: DividerProps): react_jsx_runtime.JSX.Element;
178
-
179
- type SpacerProps = {
180
- size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
181
- id?: string;
182
- puck?: unknown;
183
- editMode?: boolean;
184
- };
185
- declare function Spacer({ size, id }: SpacerProps): react_jsx_runtime.JSX.Element;
186
-
187
- type TextBlockProps = {
188
- title?: EntryBoundValue<string> | string;
189
- subtitle?: EntryBoundValue<string> | string;
190
- body?: EntryBoundValue<string> | string;
191
- alignment?: "left" | "center" | "right";
192
- textSize?: "small" | "medium-small" | "medium" | "large" | "xlarge";
193
- textColor?: ThemeableColorValue | ColorValue | string;
194
- subtitleBodyColor?: ThemeableColorValue | ColorValue | string;
195
- useGradientText?: boolean;
196
- gradientColor1?: ThemeableColorValue | ColorValue | string;
197
- gradientColor2?: ThemeableColorValue | ColorValue | string;
198
- anchorLink?: string;
199
- puck?: unknown;
200
- editMode?: boolean;
201
- id?: string;
202
- };
203
- declare function TextBlock({ title, subtitle, body, alignment, textSize, textColor, subtitleBodyColor, useGradientText, gradientColor1, gradientColor2, anchorLink, }: TextBlockProps): react_jsx_runtime.JSX.Element;
204
-
205
- type CustomImageProps = {
206
- image?: string;
207
- alt?: string;
208
- maxWidth?: number;
209
- alignment?: "left" | "center" | "right";
210
- fitContent?: boolean;
211
- } & PuckProps;
212
- declare function CustomImage({ image, alt, maxWidth, alignment, fitContent, }: CustomImageProps): react_jsx_runtime.JSX.Element;
213
-
214
- type Feature$1 = {
215
- icon?: string;
216
- image?: string;
217
- title?: string;
218
- description?: string;
219
- };
220
- type FeaturesListProps = {
221
- features?: Feature$1[];
222
- align?: "left" | "center" | "right";
223
- size?: "small" | "medium" | "large";
224
- iconColor?: string;
225
- anchorLink?: string;
226
- } & Record<string, unknown>;
227
- declare function FeaturesList({ features, align, size, iconColor, anchorLink, }: FeaturesListProps): react_jsx_runtime.JSX.Element;
228
-
229
- type Feature = {
230
- icon?: string;
231
- image?: string;
232
- title?: string;
233
- description?: string;
234
- };
235
- type FeatureGridProps = {
236
- heading?: string;
237
- description?: string;
238
- features?: Feature[];
239
- columns?: 2 | 3 | 4;
240
- align?: "left" | "center" | "right";
241
- size?: "small" | "medium" | "large";
242
- iconColor?: string;
243
- textColor?: string;
244
- anchorLink?: string;
245
- } & Record<string, unknown>;
246
- declare function FeatureGrid({ heading, description, features, columns, align, size, iconColor, textColor, anchorLink, }: FeatureGridProps): react_jsx_runtime.JSX.Element;
247
-
248
- type FooterProps = {
249
- logo?: string;
250
- copyright?: string;
251
- backgroundColor?: string;
252
- textColor?: string;
253
- facebookUrl?: string;
254
- instagramUrl?: string;
255
- twitterUrl?: string;
256
- tiktokUrl?: string;
257
- } & Record<string, unknown> & PuckProps;
258
- declare function Footer({ logo, copyright, backgroundColor, textColor, facebookUrl, instagramUrl, twitterUrl, puck, }: FooterProps): react_jsx_runtime.JSX.Element;
259
-
260
- type NavItem = {
261
- name: string;
262
- url: string;
263
- linkType?: "internal" | "external" | "scrollTo";
264
- };
265
- type TopbarProps = {
266
- logo?: string;
267
- logoUrl?: string;
268
- navItems?: NavItem[];
269
- backgroundColor?: string;
270
- textColor?: string;
271
- maxWidth?: string;
272
- } & Record<string, unknown> & PuckProps;
273
- declare function Topbar({ logo, logoUrl, navItems, backgroundColor, textColor, maxWidth, puck, }: TopbarProps): react_jsx_runtime.JSX.Element;
274
-
275
- type PopupProps = {
276
- ctaText?: string;
277
- buttonColor?: string;
278
- textColor?: string;
279
- icon?: string;
280
- iconPosition?: "left" | "right";
281
- size?: "small" | "medium" | "large";
282
- width?: "small" | "medium" | "large";
283
- textLink?: boolean;
284
- } & Record<string, unknown> & PuckProps;
285
- declare function Popup({ ctaText, buttonColor, textColor, icon, iconPosition, size, width, textLink, puck, }: PopupProps): react_jsx_runtime.JSX.Element;
286
-
287
- export { Button, type ButtonProps, Card, type CardProps, type CarouselImage, Columns, type ColumnsProps, Container, type ContainerProps, CustomImage, type CustomImageProps, Divider, type DividerProps, FeatureGrid, type FeatureGridProps, FeaturesList, type FeaturesListProps, Footer, type FooterProps, Heading, type HeadingProps, Icon, type IconProps, Image, ImageCarousel, type ImageCarouselProps, type ImageProps, Paragraph, type ParagraphProps, Popup, type PopupProps, Section, type SectionProps, Spacer, type SpacerProps, TextBlock, type TextBlockProps, ThemeableColorValue, Topbar, type TopbarProps, VideoEmbed, type VideoEmbedProps, availableIcons };
1
+ export { Button, ButtonProps, Card, CardProps, CarouselImage, Columns, ColumnsProps, Container, ContainerProps, CustomImage, CustomImageProps, Divider, DividerProps, FeatureGrid, FeatureGridProps, FeaturesList, FeaturesListProps, Footer, FooterProps, Heading, HeadingProps, Icon, IconProps, Image, ImageCarousel, ImageCarouselProps, ImageProps, Paragraph, ParagraphProps, Popup, PopupProps, Section, SectionProps, Spacer, SpacerProps, TextBlock, TextBlockProps, Topbar, TopbarProps, VideoEmbed, VideoEmbedProps, availableIcons } from './renderer.js';
2
+ export { D as DEFAULT_THEME, P as PageTheme, T as ThemeBorderKey, a as ThemeBorders, b as ThemeColorKey, c as ThemeColors, d as ThemeProvider, e as ThemeShadowKey, f as ThemeShadows, g as ThemeSpacing, h as ThemeSpacingKey, i as ThemeTypography, j as ThemeableBorderRadiusValue, k as ThemeableColorValue, l as ThemeableShadowValue, m as ThemeableSpacingValue, u as useTheme } from './ResponsiveToggleField-BGofgB3u.js';
3
+ export { B as BorderRadiusPreset, C as ColorPreset, F as FontFamilyPreset, a as FontSizePreset, b as FontWeightPreset, S as ShadowPreset, c as SpacingPreset, d as allColorPresets, e as borderRadiusScale, f as fontFamilies, g as fontSizes, h as fontWeights, i as getBorderRadiusCSS, j as getClosestBorderRadiusValue, k as getClosestSpacingValue, l as getFontSizeCSS, m as getShadowCSS, n as neutralColors, s as shadowPresets, o as spacingScale } from './typography-DwjKOx3F.js';
4
+ import 'react/jsx-runtime';
5
+ import 'react';
6
+ import '@measured/puck';
package/dist/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __export = (target, all) => {
9
7
  for (var name in all)
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
17
15
  }
18
16
  return to;
19
17
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
19
 
30
20
  // index.ts
@@ -332,8 +322,15 @@ function Paragraph({
332
322
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { id, style, children: resolvedText });
333
323
  }
334
324
 
335
- // components/page/Button.tsx
336
- var import_google = require("@next/third-parties/google");
325
+ // hooks/useGtmEvent.ts
326
+ function useGtmEvent() {
327
+ return (eventName, data) => {
328
+ if (typeof window === "undefined") return;
329
+ if (typeof window.gtag === "function") {
330
+ window.gtag("event", eventName, data || {});
331
+ }
332
+ };
333
+ }
337
334
 
338
335
  // hooks/useUtmParams.ts
339
336
  var import_react3 = require("react");
@@ -425,6 +422,7 @@ function Button({
425
422
  const { resolveColor: resolveColor2 } = useTheme();
426
423
  const { getEntryValue } = useEntries();
427
424
  const utm = useUtmParams();
425
+ const sendEvent = useGtmEvent();
428
426
  const resolvedText = (() => {
429
427
  if (!text) return "Button";
430
428
  if (typeof text === "string") return text;
@@ -437,14 +435,13 @@ function Button({
437
435
  return "Button";
438
436
  })();
439
437
  const handleClick = () => {
440
- (0, import_google.sendGTMEvent)({
441
- event: "button_click",
442
- value: {
443
- text: resolvedText,
444
- href: href || void 0,
445
- variant,
446
- ...utm
447
- }
438
+ const sessionId = typeof window !== "undefined" ? sessionStorage.getItem("session_id") : null;
439
+ sendEvent("button_click", {
440
+ text: resolvedText,
441
+ href: href || void 0,
442
+ variant,
443
+ session_id: sessionId,
444
+ ...utm
448
445
  });
449
446
  };
450
447
  const resolvedColor = (() => {
@@ -659,7 +656,6 @@ function Image({
659
656
 
660
657
  // components/page/ImageCarousel.tsx
661
658
  var import_react4 = require("react");
662
- var import_google2 = require("@next/third-parties/google");
663
659
  var import_jsx_runtime7 = require("react/jsx-runtime");
664
660
  var aspectRatioMap2 = {
665
661
  "16:9": "16 / 9",
@@ -689,6 +685,7 @@ function ImageCarousel({
689
685
  const [currentIndex, setCurrentIndex] = (0, import_react4.useState)(0);
690
686
  const { resolveColor: resolveColor2 } = useTheme();
691
687
  const utm = useUtmParams();
688
+ const sendEvent = useGtmEvent();
692
689
  const resolvedArrowColor = (() => {
693
690
  if (!arrowColor) return { color: "#FFFFFF", opacity: 100 };
694
691
  if (typeof arrowColor === "string")
@@ -711,39 +708,30 @@ function ImageCarousel({
711
708
  const goToPrevious = () => {
712
709
  const newIndex = currentIndex === 0 ? images.length - 1 : currentIndex - 1;
713
710
  setCurrentIndex(newIndex);
714
- (0, import_google2.sendGTMEvent)({
715
- event: "carousel_navigate",
716
- value: {
717
- direction: "previous",
718
- slideIndex: newIndex,
719
- totalSlides: images.length,
720
- ...utm
721
- }
711
+ sendEvent("carousel_navigate", {
712
+ direction: "previous",
713
+ slideIndex: newIndex,
714
+ totalSlides: images.length,
715
+ ...utm
722
716
  });
723
717
  };
724
718
  const goToNext = () => {
725
719
  const newIndex = currentIndex === images.length - 1 ? 0 : currentIndex + 1;
726
720
  setCurrentIndex(newIndex);
727
- (0, import_google2.sendGTMEvent)({
728
- event: "carousel_navigate",
729
- value: {
730
- direction: "next",
731
- slideIndex: newIndex,
732
- totalSlides: images.length,
733
- ...utm
734
- }
721
+ sendEvent("carousel_navigate", {
722
+ direction: "next",
723
+ slideIndex: newIndex,
724
+ totalSlides: images.length,
725
+ ...utm
735
726
  });
736
727
  };
737
728
  const goToSlide = (index) => {
738
729
  setCurrentIndex(index);
739
- (0, import_google2.sendGTMEvent)({
740
- event: "carousel_navigate",
741
- value: {
742
- direction: "direct",
743
- slideIndex: index,
744
- totalSlides: images.length,
745
- ...utm
746
- }
730
+ sendEvent("carousel_navigate", {
731
+ direction: "direct",
732
+ slideIndex: index,
733
+ totalSlides: images.length,
734
+ ...utm
747
735
  });
748
736
  };
749
737
  if (images.length === 0) {
@@ -1873,7 +1861,6 @@ function FeatureGrid({
1873
1861
 
1874
1862
  // components/page/Footer.tsx
1875
1863
  var import_lucide_react3 = require("lucide-react");
1876
- var import_google3 = require("@next/third-parties/google");
1877
1864
  var import_jsx_runtime20 = require("react/jsx-runtime");
1878
1865
  function Footer({
1879
1866
  logo,
@@ -1887,6 +1874,7 @@ function Footer({
1887
1874
  }) {
1888
1875
  const DropZone = puck?.renderDropZone;
1889
1876
  const utm = useUtmParams();
1877
+ const sendEvent = useGtmEvent();
1890
1878
  const getSocialPlatform = (url) => {
1891
1879
  if (url.includes("facebook")) return "facebook";
1892
1880
  if (url.includes("instagram")) return "instagram";
@@ -1895,13 +1883,10 @@ function Footer({
1895
1883
  };
1896
1884
  const handleSocialClick = (url) => {
1897
1885
  const platform = getSocialPlatform(url);
1898
- (0, import_google3.sendGTMEvent)({
1899
- event: "social_click",
1900
- value: {
1901
- platform,
1902
- url,
1903
- ...utm
1904
- }
1886
+ sendEvent("social_click", {
1887
+ platform,
1888
+ url,
1889
+ ...utm
1905
1890
  });
1906
1891
  };
1907
1892
  const socialLinks = [
@@ -1939,9 +1924,7 @@ function Footer({
1939
1924
 
1940
1925
  // components/page/Topbar.tsx
1941
1926
  var import_react5 = require("react");
1942
- var import_link = __toESM(require("next/link"));
1943
1927
  var import_lucide_react4 = require("lucide-react");
1944
- var import_google4 = require("@next/third-parties/google");
1945
1928
  var import_jsx_runtime21 = require("react/jsx-runtime");
1946
1929
  function Topbar({
1947
1930
  logo,
@@ -1955,26 +1938,21 @@ function Topbar({
1955
1938
  const DropZone = puck?.renderDropZone;
1956
1939
  const [mobileMenuOpen, setMobileMenuOpen] = (0, import_react5.useState)(false);
1957
1940
  const utm = useUtmParams();
1941
+ const sendEvent = useGtmEvent();
1958
1942
  const handleNavClick = (item) => {
1959
- (0, import_google4.sendGTMEvent)({
1960
- event: "nav_click",
1961
- value: {
1962
- name: item.name,
1963
- url: item.url,
1964
- linkType: item.linkType || "internal",
1965
- ...utm
1966
- }
1943
+ sendEvent("nav_click", {
1944
+ name: item.name,
1945
+ url: item.url,
1946
+ linkType: item.linkType || "internal",
1947
+ ...utm
1967
1948
  });
1968
1949
  };
1969
1950
  const handleMobileMenuToggle = () => {
1970
1951
  const newState = !mobileMenuOpen;
1971
1952
  setMobileMenuOpen(newState);
1972
- (0, import_google4.sendGTMEvent)({
1973
- event: "mobile_menu_toggle",
1974
- value: {
1975
- open: newState,
1976
- ...utm
1977
- }
1953
+ sendEvent("mobile_menu_toggle", {
1954
+ open: newState,
1955
+ ...utm
1978
1956
  });
1979
1957
  };
1980
1958
  const renderLink = (item, index) => {
@@ -2006,7 +1984,7 @@ function Topbar({
2006
1984
  );
2007
1985
  }
2008
1986
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2009
- import_link.default,
1987
+ "a",
2010
1988
  {
2011
1989
  href: item.url,
2012
1990
  className,
@@ -2029,18 +2007,15 @@ function Topbar({
2029
2007
  style: { maxWidth },
2030
2008
  children: [
2031
2009
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2032
- import_link.default,
2010
+ "a",
2033
2011
  {
2034
2012
  href: logoUrl,
2035
2013
  className: "flex-shrink-0",
2036
- onClick: () => (0, import_google4.sendGTMEvent)({
2037
- event: "nav_click",
2038
- value: {
2039
- name: "logo",
2040
- url: logoUrl,
2041
- linkType: "internal",
2042
- ...utm
2043
- }
2014
+ onClick: () => sendEvent("nav_click", {
2015
+ name: "logo",
2016
+ url: logoUrl,
2017
+ linkType: "internal",
2018
+ ...utm
2044
2019
  }),
2045
2020
  children: logo ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: logo, alt: "Logo", className: "h-8" }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xl font-bold", children: "Logo" })
2046
2021
  }
@@ -2072,7 +2047,6 @@ function Topbar({
2072
2047
  // components/page/Popup.tsx
2073
2048
  var import_react6 = require("react");
2074
2049
  var import_lucide_react5 = require("lucide-react");
2075
- var import_google5 = require("@next/third-parties/google");
2076
2050
  var import_jsx_runtime22 = require("react/jsx-runtime");
2077
2051
  function Icon2({ name, ...props }) {
2078
2052
  const formatted = name.charAt(0).toUpperCase() + name.slice(1);
@@ -2103,23 +2077,18 @@ function Popup({
2103
2077
  }) {
2104
2078
  const [isOpen, setIsOpen] = (0, import_react6.useState)(false);
2105
2079
  const utm = useUtmParams();
2080
+ const sendEvent = useGtmEvent();
2106
2081
  const handleOpen = () => {
2107
2082
  setIsOpen(true);
2108
- (0, import_google5.sendGTMEvent)({
2109
- event: "popup_open",
2110
- value: {
2111
- ctaText,
2112
- type: textLink ? "link" : "button",
2113
- ...utm
2114
- }
2083
+ sendEvent("popup_open", {
2084
+ ctaText,
2085
+ type: textLink ? "link" : "button",
2086
+ ...utm
2115
2087
  });
2116
2088
  };
2117
2089
  const handleClose = () => {
2118
2090
  setIsOpen(false);
2119
- (0, import_google5.sendGTMEvent)({
2120
- event: "popup_close",
2121
- value: { ctaText, ...utm }
2122
- });
2091
+ sendEvent("popup_close", { ctaText, ...utm });
2123
2092
  };
2124
2093
  const trigger = textLink ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2125
2094
  "button",
package/dist/index.mjs CHANGED
@@ -1,3 +1,18 @@
1
+ import {
2
+ allColorPresets,
3
+ neutralColors
4
+ } from "./chunk-UJTTHDZA.mjs";
5
+ import {
6
+ borderRadiusScale,
7
+ fontFamilies,
8
+ fontSizes,
9
+ fontWeights,
10
+ getBorderRadiusCSS,
11
+ getClosestBorderRadiusValue,
12
+ getClosestSpacingValue,
13
+ getFontSizeCSS,
14
+ spacingScale
15
+ } from "./chunk-A3QDUUOF.mjs";
1
16
  import {
2
17
  Button,
3
18
  Card,
@@ -20,27 +35,15 @@ import {
20
35
  Topbar,
21
36
  VideoEmbed,
22
37
  availableIcons
23
- } from "./chunk-F47J7QDM.mjs";
24
- import {
25
- allColorPresets,
26
- neutralColors
27
- } from "./chunk-UJTTHDZA.mjs";
38
+ } from "./chunk-HHHD5TX2.mjs";
28
39
  import {
29
40
  DEFAULT_THEME,
30
41
  ThemeProvider,
31
- borderRadiusScale,
32
- fontFamilies,
33
- fontSizes,
34
- fontWeights,
35
- getBorderRadiusCSS,
36
- getClosestBorderRadiusValue,
37
- getClosestSpacingValue,
38
- getFontSizeCSS,
39
42
  getShadowCSS,
40
43
  shadowPresets,
41
- spacingScale,
42
44
  useTheme
43
- } from "./chunk-TTKY3YGP.mjs";
45
+ } from "./chunk-XRKFMCSS.mjs";
46
+ import "./chunk-QSWQDR6M.mjs";
44
47
  export {
45
48
  Button,
46
49
  Card,