@delmaredigital/payload-puck 0.1.3 → 0.2.0

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.
@@ -371,6 +371,7 @@ var init_HeaderActions = __esm({
371
371
  ]
372
372
  }
373
373
  ),
374
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-gray-400 font-mono", children: "v0.2.0" }),
374
375
  documentStatus && (() => {
375
376
  const isPublished = documentStatus === "published";
376
377
  const hasUnpublishedChanges = documentStatus === "draft" && wasPublished;
@@ -896,25 +897,23 @@ function responsiveValueToCSS(value, converter, uniqueId) {
896
897
  mediaQueryCSS: ""
897
898
  };
898
899
  }
899
- const mediaQueries = [];
900
- let baseStyles = {};
900
+ const cssRules = [];
901
901
  BREAKPOINTS.forEach((bp) => {
902
902
  const bpValue = value[bp.key];
903
903
  if (bpValue === void 0) return;
904
904
  const cssProps = converter(bpValue);
905
905
  if (!cssProps) return;
906
+ const styleString = cssPropertiesToString(cssProps);
907
+ if (!styleString) return;
906
908
  if (bp.key === "xs") {
907
- baseStyles = cssProps;
909
+ cssRules.push(`.${uniqueId} { ${styleString} }`);
908
910
  } else {
909
- const styleString = cssPropertiesToString(cssProps);
910
- if (styleString) {
911
- mediaQueries.push(
912
- `@media (min-width: ${bp.minWidth}px) { .${uniqueId} { ${styleString} } }`
913
- );
914
- }
911
+ cssRules.push(
912
+ `@media (min-width: ${bp.minWidth}px) { .${uniqueId} { ${styleString} } }`
913
+ );
915
914
  }
916
915
  });
917
- return { baseStyles, mediaQueryCSS: mediaQueries.join("\n") };
916
+ return { baseStyles: {}, mediaQueryCSS: cssRules.join("\n") };
918
917
  }
919
918
  function visibilityValueToCSS(visibility, uniqueId) {
920
919
  if (!visibility) return "";
@@ -1947,16 +1946,13 @@ var init_Container_server = __esm({
1947
1946
  idCounter = 0;
1948
1947
  defaultProps = {
1949
1948
  content: [],
1950
- background: null,
1951
- customPadding: null,
1949
+ visibility: null,
1952
1950
  dimensions: null,
1951
+ background: null,
1953
1952
  border: null,
1953
+ padding: null,
1954
1954
  margin: null,
1955
- animation: null,
1956
- innerBackground: null,
1957
- innerPadding: null,
1958
- innerBorder: null,
1959
- visibility: null
1955
+ animation: null
1960
1956
  };
1961
1957
  ContainerConfig = {
1962
1958
  label: "Container",
@@ -1966,84 +1962,86 @@ var init_Container_server = __esm({
1966
1962
  defaultProps,
1967
1963
  render: ({
1968
1964
  content: Content2,
1969
- background,
1970
- customPadding,
1965
+ visibility,
1971
1966
  dimensions,
1967
+ background,
1972
1968
  border,
1969
+ padding,
1973
1970
  margin,
1974
- animation,
1975
- innerBackground,
1976
- innerPadding,
1977
- innerBorder,
1978
- visibility
1971
+ animation
1979
1972
  }) => {
1980
1973
  const uniqueId = generateUniqueId();
1981
- const outerClass = `puck-container-outer-${uniqueId}`;
1982
- const innerClass = `puck-container-inner-${uniqueId}`;
1974
+ const containerClass = `puck-container-${uniqueId}`;
1983
1975
  const mediaQueries = [];
1984
- const outerBackgroundStyles = backgroundValueToCSS(background);
1985
- const outerStyles = {
1986
- ...outerBackgroundStyles
1987
- };
1988
- const outerPaddingResult = responsiveValueToCSS(
1989
- customPadding,
1990
- (v) => ({ padding: paddingValueToCSS(v) }),
1991
- outerClass
1992
- );
1993
- Object.assign(outerStyles, outerPaddingResult.baseStyles);
1994
- if (outerPaddingResult.mediaQueryCSS) {
1995
- mediaQueries.push(outerPaddingResult.mediaQueryCSS);
1996
- }
1997
- const outerBorderStyles = borderValueToCSS(border);
1998
- if (outerBorderStyles) {
1999
- Object.assign(outerStyles, outerBorderStyles);
1976
+ const containerStyles = {};
1977
+ const backgroundStyles = backgroundValueToCSS(background);
1978
+ if (backgroundStyles) {
1979
+ Object.assign(containerStyles, backgroundStyles);
2000
1980
  }
2001
- const marginResult = responsiveValueToCSS(
2002
- margin,
2003
- (v) => ({ margin: marginValueToCSS(v) }),
2004
- outerClass
2005
- );
2006
- Object.assign(outerStyles, marginResult.baseStyles);
2007
- if (marginResult.mediaQueryCSS) {
2008
- mediaQueries.push(marginResult.mediaQueryCSS);
1981
+ const borderStyles = borderValueToCSS(border);
1982
+ if (borderStyles) {
1983
+ Object.assign(containerStyles, borderStyles);
2009
1984
  }
2010
- const innerBackgroundStyles = backgroundValueToCSS(innerBackground);
2011
- const innerStyles = {
2012
- ...innerBackgroundStyles
2013
- };
2014
1985
  const dimensionsResult = responsiveValueToCSS(
2015
1986
  dimensions,
2016
1987
  dimensionsValueToCSS,
2017
- innerClass
1988
+ containerClass
2018
1989
  );
2019
- Object.assign(innerStyles, dimensionsResult.baseStyles);
1990
+ Object.assign(containerStyles, dimensionsResult.baseStyles);
2020
1991
  if (dimensionsResult.mediaQueryCSS) {
2021
1992
  mediaQueries.push(dimensionsResult.mediaQueryCSS);
2022
1993
  }
2023
- const innerPaddingResult = responsiveValueToCSS(
2024
- innerPadding,
1994
+ const hasMinHeight = (() => {
1995
+ if (!dimensions) return false;
1996
+ if (typeof dimensions === "object" && "xs" in dimensions) {
1997
+ const responsiveDims = dimensions;
1998
+ return Object.values(responsiveDims).some((v) => {
1999
+ if (!v || typeof v !== "object") return false;
2000
+ const dim2 = v;
2001
+ return dim2.minHeight?.enabled && dim2.minHeight?.value > 0;
2002
+ });
2003
+ }
2004
+ const dim = dimensions;
2005
+ return dim.minHeight?.enabled && dim.minHeight?.value > 0;
2006
+ })();
2007
+ if (hasMinHeight) {
2008
+ containerStyles.display = "flex";
2009
+ containerStyles.flexDirection = "column";
2010
+ }
2011
+ const paddingResult = responsiveValueToCSS(
2012
+ padding,
2025
2013
  (v) => ({ padding: paddingValueToCSS(v) }),
2026
- innerClass
2014
+ containerClass
2027
2015
  );
2028
- Object.assign(innerStyles, innerPaddingResult.baseStyles);
2029
- if (innerPaddingResult.mediaQueryCSS) {
2030
- mediaQueries.push(innerPaddingResult.mediaQueryCSS);
2016
+ Object.assign(containerStyles, paddingResult.baseStyles);
2017
+ if (paddingResult.mediaQueryCSS) {
2018
+ mediaQueries.push(paddingResult.mediaQueryCSS);
2031
2019
  }
2032
- const innerBorderStyles = borderValueToCSS(innerBorder);
2033
- if (innerBorderStyles) {
2034
- Object.assign(innerStyles, innerBorderStyles);
2020
+ const marginResult = responsiveValueToCSS(
2021
+ margin,
2022
+ (v) => ({ margin: marginValueToCSS(v) }),
2023
+ containerClass
2024
+ );
2025
+ Object.assign(containerStyles, marginResult.baseStyles);
2026
+ if (marginResult.mediaQueryCSS) {
2027
+ mediaQueries.push(marginResult.mediaQueryCSS);
2035
2028
  }
2036
- const visibilityCSS = visibilityValueToCSS(visibility, outerClass);
2029
+ const visibilityCSS = visibilityValueToCSS(visibility, containerClass);
2037
2030
  if (visibilityCSS) {
2038
2031
  mediaQueries.push(visibilityCSS);
2039
2032
  }
2040
- const contentClasses = cn2("px-4", innerClass);
2041
- const hasInnerStyles = Object.keys(innerStyles).length > 0;
2042
2033
  const allMediaQueryCSS = mediaQueries.join("\n");
2034
+ const hasStyles = Object.keys(containerStyles).length > 0;
2043
2035
  const ContentSlot = Content2;
2036
+ const renderContent = () => {
2037
+ if (hasMinHeight) {
2038
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { style: { flex: 1 } }) });
2039
+ }
2040
+ return /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, {});
2041
+ };
2044
2042
  return /* @__PURE__ */ jsxRuntime.jsxs(AnimatedWrapper, { animation, children: [
2045
2043
  allMediaQueryCSS && /* @__PURE__ */ jsxRuntime.jsx("style", { children: allMediaQueryCSS }),
2046
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: outerClass, style: outerStyles, children: hasInnerStyles ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: contentClasses, style: innerStyles, children: /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { className: contentClasses, style: innerStyles }) })
2044
+ hasStyles ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: containerClass, style: containerStyles, children: renderContent() }) : /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { className: containerClass })
2047
2045
  ] });
2048
2046
  }
2049
2047
  };
@@ -2286,21 +2284,39 @@ var init_Grid_server = __esm({
2286
2284
  function generateUniqueId4() {
2287
2285
  return `s${(++idCounter4).toString(36)}${Math.random().toString(36).slice(2, 6)}`;
2288
2286
  }
2289
- var idCounter4, defaultProps4, SectionConfig;
2287
+ var idCounter4, DEFAULT_CONTENT_DIMENSIONS, DEFAULT_CONTENT_PADDING, defaultProps4, SectionConfig;
2290
2288
  var init_Section_server = __esm({
2291
2289
  "src/components/layout/Section.server.tsx"() {
2292
2290
  init_shared();
2293
2291
  init_AnimatedWrapper();
2294
2292
  idCounter4 = 0;
2293
+ DEFAULT_CONTENT_DIMENSIONS = {
2294
+ mode: "contained",
2295
+ alignment: "center",
2296
+ maxWidth: { value: 1200, unit: "px", enabled: true }
2297
+ };
2298
+ DEFAULT_CONTENT_PADDING = {
2299
+ top: 0,
2300
+ right: 16,
2301
+ bottom: 0,
2302
+ left: 16,
2303
+ unit: "px",
2304
+ linked: false
2305
+ };
2295
2306
  defaultProps4 = {
2296
2307
  id: "",
2297
2308
  content: [],
2298
- background: null,
2299
- fullWidth: false,
2300
- customPadding: null,
2301
- dimensions: null,
2302
- border: null,
2303
- margin: null,
2309
+ // Section layer defaults
2310
+ sectionBackground: null,
2311
+ sectionBorder: null,
2312
+ sectionPadding: null,
2313
+ sectionMargin: null,
2314
+ // Content layer defaults - 1200px max-width so two-layer design is immediately visible
2315
+ contentDimensions: { xs: DEFAULT_CONTENT_DIMENSIONS },
2316
+ contentBackground: null,
2317
+ contentBorder: null,
2318
+ contentPadding: { xs: DEFAULT_CONTENT_PADDING },
2319
+ // Other
2304
2320
  animation: null,
2305
2321
  visibility: null
2306
2322
  };
@@ -2313,12 +2329,14 @@ var init_Section_server = __esm({
2313
2329
  render: ({
2314
2330
  id,
2315
2331
  content: Content2,
2316
- background,
2317
- fullWidth,
2318
- customPadding,
2319
- dimensions,
2320
- border,
2321
- margin,
2332
+ sectionBackground,
2333
+ sectionBorder,
2334
+ sectionPadding,
2335
+ sectionMargin,
2336
+ contentDimensions,
2337
+ contentBackground,
2338
+ contentBorder,
2339
+ contentPadding,
2322
2340
  animation,
2323
2341
  visibility
2324
2342
  }) => {
@@ -2326,53 +2344,90 @@ var init_Section_server = __esm({
2326
2344
  const sectionClass = `puck-section-${uniqueId}`;
2327
2345
  const contentClass = `puck-section-content-${uniqueId}`;
2328
2346
  const mediaQueries = [];
2329
- const backgroundStyles = backgroundValueToCSS(background);
2347
+ const sectionBackgroundStyles = backgroundValueToCSS(sectionBackground);
2330
2348
  const sectionStyles = {
2331
- ...backgroundStyles
2349
+ ...sectionBackgroundStyles
2332
2350
  };
2333
- const paddingResult = responsiveValueToCSS(
2334
- customPadding,
2351
+ const sectionBorderStyles = borderValueToCSS(sectionBorder);
2352
+ if (sectionBorderStyles) {
2353
+ Object.assign(sectionStyles, sectionBorderStyles);
2354
+ }
2355
+ const sectionPaddingResult = responsiveValueToCSS(
2356
+ sectionPadding,
2335
2357
  (v) => ({ padding: paddingValueToCSS(v) }),
2336
2358
  sectionClass
2337
2359
  );
2338
- Object.assign(sectionStyles, paddingResult.baseStyles);
2339
- if (paddingResult.mediaQueryCSS) {
2340
- mediaQueries.push(paddingResult.mediaQueryCSS);
2341
- }
2342
- const borderStyles = borderValueToCSS(border);
2343
- if (borderStyles) {
2344
- Object.assign(sectionStyles, borderStyles);
2360
+ Object.assign(sectionStyles, sectionPaddingResult.baseStyles);
2361
+ if (sectionPaddingResult.mediaQueryCSS) {
2362
+ mediaQueries.push(sectionPaddingResult.mediaQueryCSS);
2345
2363
  }
2346
- const marginResult = responsiveValueToCSS(
2347
- margin,
2364
+ const sectionMarginResult = responsiveValueToCSS(
2365
+ sectionMargin,
2348
2366
  (v) => ({ margin: marginValueToCSS(v) }),
2349
2367
  sectionClass
2350
2368
  );
2351
- Object.assign(sectionStyles, marginResult.baseStyles);
2352
- if (marginResult.mediaQueryCSS) {
2353
- mediaQueries.push(marginResult.mediaQueryCSS);
2369
+ Object.assign(sectionStyles, sectionMarginResult.baseStyles);
2370
+ if (sectionMarginResult.mediaQueryCSS) {
2371
+ mediaQueries.push(sectionMarginResult.mediaQueryCSS);
2354
2372
  }
2355
2373
  const visibilityCSS = visibilityValueToCSS(visibility, sectionClass);
2356
2374
  if (visibilityCSS) {
2357
2375
  mediaQueries.push(visibilityCSS);
2358
2376
  }
2359
- const sectionClasses = cn2("relative w-full", sectionClass);
2360
- const dimensionsResult = responsiveValueToCSS(
2361
- dimensions,
2377
+ const contentBackgroundStyles = backgroundValueToCSS(contentBackground);
2378
+ const contentStyles = {
2379
+ ...contentBackgroundStyles
2380
+ };
2381
+ const contentDimensionsResult = responsiveValueToCSS(
2382
+ contentDimensions,
2362
2383
  dimensionsValueToCSS,
2363
2384
  contentClass
2364
2385
  );
2365
- if (dimensionsResult.mediaQueryCSS) {
2366
- mediaQueries.push(dimensionsResult.mediaQueryCSS);
2386
+ Object.assign(contentStyles, contentDimensionsResult.baseStyles);
2387
+ if (contentDimensionsResult.mediaQueryCSS) {
2388
+ mediaQueries.push(contentDimensionsResult.mediaQueryCSS);
2367
2389
  }
2368
- const contentClasses = cn2(
2369
- "relative z-10",
2370
- // Only apply preset content width if no dimensions set
2371
- !dimensions && !fullWidth && "max-w-[1200px] mx-auto px-4",
2390
+ const hasMinHeight = (() => {
2391
+ if (!contentDimensions) return false;
2392
+ if (typeof contentDimensions === "object" && "xs" in contentDimensions) {
2393
+ const responsiveDims = contentDimensions;
2394
+ return Object.values(responsiveDims).some((v) => {
2395
+ if (!v || typeof v !== "object") return false;
2396
+ const dim2 = v;
2397
+ return dim2.minHeight?.enabled && dim2.minHeight?.value > 0;
2398
+ });
2399
+ }
2400
+ const dim = contentDimensions;
2401
+ return dim.minHeight?.enabled && dim.minHeight?.value > 0;
2402
+ })();
2403
+ if (hasMinHeight) {
2404
+ contentStyles.display = "flex";
2405
+ contentStyles.flexDirection = "column";
2406
+ }
2407
+ const contentBorderStyles = borderValueToCSS(contentBorder);
2408
+ if (contentBorderStyles) {
2409
+ Object.assign(contentStyles, contentBorderStyles);
2410
+ }
2411
+ const contentPaddingResult = responsiveValueToCSS(
2412
+ contentPadding,
2413
+ (v) => ({ padding: paddingValueToCSS(v) }),
2372
2414
  contentClass
2373
2415
  );
2416
+ Object.assign(contentStyles, contentPaddingResult.baseStyles);
2417
+ if (contentPaddingResult.mediaQueryCSS) {
2418
+ mediaQueries.push(contentPaddingResult.mediaQueryCSS);
2419
+ }
2420
+ const sectionClasses = cn2("relative w-full", sectionClass);
2421
+ const contentClasses = cn2("relative z-10", contentClass);
2422
+ const hasContentStyles = Object.keys(contentStyles).length > 0;
2374
2423
  const allMediaQueryCSS = mediaQueries.join("\n");
2375
2424
  const ContentSlot = Content2;
2425
+ const renderContent = () => {
2426
+ if (hasMinHeight) {
2427
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { style: { flex: 1 } }) });
2428
+ }
2429
+ return /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, {});
2430
+ };
2376
2431
  return /* @__PURE__ */ jsxRuntime.jsxs(AnimatedWrapper, { animation, children: [
2377
2432
  allMediaQueryCSS && /* @__PURE__ */ jsxRuntime.jsx("style", { children: allMediaQueryCSS }),
2378
2433
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2381,7 +2436,7 @@ var init_Section_server = __esm({
2381
2436
  id: id || void 0,
2382
2437
  className: sectionClasses,
2383
2438
  style: sectionStyles,
2384
- children: /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { className: contentClasses, style: dimensionsResult.baseStyles })
2439
+ children: hasContentStyles ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: contentClasses, style: contentStyles, children: renderContent() }) : /* @__PURE__ */ jsxRuntime.jsx(ContentSlot, { className: contentClasses })
2385
2440
  }
2386
2441
  )
2387
2442
  ] });
@@ -2630,11 +2685,19 @@ var init_Text_server = __esm({
2630
2685
  };
2631
2686
  }
2632
2687
  });
2633
- var defaultProps9, RichTextConfig;
2688
+ var DEFAULT_PADDING, defaultProps9, RichTextConfig;
2634
2689
  var init_RichText_server = __esm({
2635
2690
  "src/components/typography/RichText.server.tsx"() {
2636
2691
  init_shared();
2637
2692
  init_AnimatedWrapper();
2693
+ DEFAULT_PADDING = {
2694
+ top: 0,
2695
+ right: 16,
2696
+ bottom: 0,
2697
+ left: 16,
2698
+ unit: "px",
2699
+ linked: false
2700
+ };
2638
2701
  defaultProps9 = {
2639
2702
  content: "<p>Enter your content here...</p>",
2640
2703
  alignment: null,
@@ -2642,7 +2705,8 @@ var init_RichText_server = __esm({
2642
2705
  dimensions: null,
2643
2706
  animation: null,
2644
2707
  margin: null,
2645
- customPadding: null
2708
+ customPadding: DEFAULT_PADDING
2709
+ // Default 16px horizontal padding
2646
2710
  };
2647
2711
  RichTextConfig = {
2648
2712
  label: "Rich Text",
@@ -2667,12 +2731,12 @@ var init_RichText_server = __esm({
2667
2731
  const alignmentValue = alignment ?? "left";
2668
2732
  const alignmentClass = alignmentMap[alignmentValue] || alignmentMap.left;
2669
2733
  if (!content || content === "<p></p>") {
2670
- return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn2("relative overflow-hidden px-4", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: /* @__PURE__ */ jsxRuntime.jsx("em", { children: "No content available" }) }) }) }) });
2734
+ return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn2("relative overflow-hidden", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "prose dark:prose-invert max-w-none", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: /* @__PURE__ */ jsxRuntime.jsx("em", { children: "No content available" }) }) }) }) });
2671
2735
  }
2672
- return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn2("relative overflow-hidden px-4", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
2736
+ return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn2("relative overflow-hidden", alignmentClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
2673
2737
  "div",
2674
2738
  {
2675
- className: "prose dark:prose-invert",
2739
+ className: "prose dark:prose-invert max-w-none",
2676
2740
  dangerouslySetInnerHTML: { __html: content }
2677
2741
  }
2678
2742
  ) }) });
@@ -2683,11 +2747,19 @@ var init_RichText_server = __esm({
2683
2747
  function generateUniqueId7() {
2684
2748
  return `i${(++idCounter7).toString(36)}${Math.random().toString(36).slice(2, 6)}`;
2685
2749
  }
2686
- var idCounter7, defaultProps10, ImageConfig;
2750
+ var DEFAULT_PADDING2, idCounter7, defaultProps10, ImageConfig;
2687
2751
  var init_Image_server = __esm({
2688
2752
  "src/components/media/Image.server.tsx"() {
2689
2753
  init_shared();
2690
2754
  init_AnimatedWrapper();
2755
+ DEFAULT_PADDING2 = {
2756
+ top: 16,
2757
+ right: 16,
2758
+ bottom: 16,
2759
+ left: 16,
2760
+ unit: "px",
2761
+ linked: true
2762
+ };
2691
2763
  idCounter7 = 0;
2692
2764
  defaultProps10 = {
2693
2765
  image: null,
@@ -2701,7 +2773,8 @@ var init_Image_server = __esm({
2701
2773
  alignment: null,
2702
2774
  transform: null,
2703
2775
  animation: null,
2704
- customPadding: null,
2776
+ customPadding: DEFAULT_PADDING2,
2777
+ // Default 16px padding
2705
2778
  visibility: null
2706
2779
  };
2707
2780
  ImageConfig = {
@@ -2741,7 +2814,7 @@ var init_Image_server = __esm({
2741
2814
  if (!image?.url) {
2742
2815
  return /* @__PURE__ */ jsxRuntime.jsxs(AnimatedWrapper, { animation, children: [
2743
2816
  visibilityCSS && /* @__PURE__ */ jsxRuntime.jsx("style", { children: visibilityCSS }),
2744
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("py-4 px-4", wrapperClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: alignmentClasses, children: /* @__PURE__ */ jsxRuntime.jsx(
2817
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: wrapperClass, style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: alignmentClasses, children: /* @__PURE__ */ jsxRuntime.jsx(
2745
2818
  "div",
2746
2819
  {
2747
2820
  className: cn2(
@@ -2780,7 +2853,7 @@ var init_Image_server = __esm({
2780
2853
  ) : imageElement;
2781
2854
  return /* @__PURE__ */ jsxRuntime.jsxs(AnimatedWrapper, { animation, children: [
2782
2855
  visibilityCSS && /* @__PURE__ */ jsxRuntime.jsx("style", { children: visibilityCSS }),
2783
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("py-4 px-4", wrapperClass), style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: alignmentClasses, children: content }) })
2856
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: wrapperClass, style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: alignmentClasses, children: content }) })
2784
2857
  ] });
2785
2858
  }
2786
2859
  };
@@ -3290,11 +3363,19 @@ var init_Button_server = __esm({
3290
3363
  };
3291
3364
  }
3292
3365
  });
3293
- var defaultProps12, CardConfig;
3366
+ var DEFAULT_CONTENT_PADDING2, defaultProps12, CardConfig;
3294
3367
  var init_Card_server = __esm({
3295
3368
  "src/components/interactive/Card.server.tsx"() {
3296
3369
  init_shared();
3297
3370
  init_AnimatedWrapper();
3371
+ DEFAULT_CONTENT_PADDING2 = {
3372
+ top: 16,
3373
+ right: 16,
3374
+ bottom: 16,
3375
+ left: 16,
3376
+ unit: "px",
3377
+ linked: true
3378
+ };
3298
3379
  defaultProps12 = {
3299
3380
  image: null,
3300
3381
  heading: "Card Heading",
@@ -3309,12 +3390,13 @@ var init_Card_server = __esm({
3309
3390
  alignment: null,
3310
3391
  transform: null,
3311
3392
  animation: null,
3312
- customPadding: null
3393
+ contentPadding: DEFAULT_CONTENT_PADDING2
3394
+ // Default 16px padding
3313
3395
  };
3314
3396
  CardConfig = {
3315
3397
  label: "Card",
3316
3398
  defaultProps: defaultProps12,
3317
- render: ({ image, heading, text, link, openInNewTab, shadow, background, dimensions, alignment, margin, border, transform, animation, customPadding }) => {
3399
+ render: ({ image, heading, text, link, openInNewTab, shadow, background, dimensions, alignment, margin, border, transform, animation, contentPadding }) => {
3318
3400
  const hasBorderRadius = border?.radius && border.radius > 0;
3319
3401
  const cardClasses = cn2(
3320
3402
  "overflow-hidden transition-all bg-card",
@@ -3350,9 +3432,10 @@ var init_Card_server = __esm({
3350
3432
  if (borderStyles) {
3351
3433
  Object.assign(cardStyle, borderStyles);
3352
3434
  }
3353
- const paddingCSS = paddingValueToCSS(customPadding);
3354
- if (paddingCSS) {
3355
- cardStyle.padding = paddingCSS;
3435
+ const contentStyle = {};
3436
+ const contentPaddingCSS = paddingValueToCSS(contentPadding);
3437
+ if (contentPaddingCSS) {
3438
+ contentStyle.padding = contentPaddingCSS;
3356
3439
  }
3357
3440
  const cardContent = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cardClasses, style: cardStyle, children: [
3358
3441
  image?.url ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-video w-full overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -3363,7 +3446,7 @@ var init_Card_server = __esm({
3363
3446
  className: "w-full h-full object-cover"
3364
3447
  }
3365
3448
  ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-video w-full bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "No image" }) }),
3366
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
3449
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: contentStyle, children: [
3367
3450
  heading && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-foreground mb-2", children: heading }),
3368
3451
  text && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: text })
3369
3452
  ] })
@@ -3386,11 +3469,19 @@ var init_Card_server = __esm({
3386
3469
  };
3387
3470
  }
3388
3471
  });
3389
- var defaultProps13, DividerConfig;
3472
+ var DEFAULT_PADDING3, defaultProps13, DividerConfig;
3390
3473
  var init_Divider_server = __esm({
3391
3474
  "src/components/interactive/Divider.server.tsx"() {
3392
3475
  init_shared();
3393
3476
  init_AnimatedWrapper();
3477
+ DEFAULT_PADDING3 = {
3478
+ top: 0,
3479
+ right: 16,
3480
+ bottom: 0,
3481
+ left: 16,
3482
+ unit: "px",
3483
+ linked: false
3484
+ };
3394
3485
  defaultProps13 = {
3395
3486
  style: "solid",
3396
3487
  color: null,
@@ -3398,7 +3489,8 @@ var init_Divider_server = __esm({
3398
3489
  dimensions: null,
3399
3490
  transform: null,
3400
3491
  animation: null,
3401
- customPadding: null
3492
+ customPadding: DEFAULT_PADDING3
3493
+ // Default 16px horizontal padding
3402
3494
  };
3403
3495
  DividerConfig = {
3404
3496
  label: "Divider",
@@ -3422,7 +3514,7 @@ var init_Divider_server = __esm({
3422
3514
  }
3423
3515
  const customColor = colorValueToCSS(color);
3424
3516
  const hrStyle = customColor ? { borderColor: customColor } : void 0;
3425
- return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4", style: Object.keys(wrapperStyle).length > 0 ? wrapperStyle : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
3517
+ return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: Object.keys(wrapperStyle).length > 0 ? wrapperStyle : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
3426
3518
  "hr",
3427
3519
  {
3428
3520
  className: cn2(
@@ -3539,9 +3631,9 @@ function AccordionClient({
3539
3631
  Object.assign(style, transformStyles);
3540
3632
  }
3541
3633
  if (!items || items.length === 0) {
3542
- return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4", style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: accordionClasses, style: accordionStyle, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-muted-foreground", children: "No accordion items. Add items in the editor." }) }) }) });
3634
+ return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: accordionClasses, style: accordionStyle, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-muted-foreground", children: "No accordion items. Add items in the editor." }) }) }) });
3543
3635
  }
3544
- return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4", style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: accordionClasses, style: accordionStyle, children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
3636
+ return /* @__PURE__ */ jsxRuntime.jsx(AnimatedWrapper, { animation, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: Object.keys(style).length > 0 ? style : void 0, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: accordionClasses, style: accordionStyle, children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
3545
3637
  AccordionItem,
3546
3638
  {
3547
3639
  item,