dune-react 0.0.12 → 0.0.14

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.
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import { useState, useCallback } from "react";
4
+ import { SafeDynamicIcon } from "./safe-dynamic-icon.js";
4
5
  import { Button, buttonVariants } from "../shadcn/button.js";
5
6
  import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "../shadcn/dialog.js";
6
7
  import { AutoField } from "./fields/auto-field.js";
@@ -8,7 +9,6 @@ import { button } from "./core/fields.js";
8
9
  import { cn } from "../../utils/css-utils.js";
9
10
  import { resolveActionUrl } from "./core/types.js";
10
11
  import { withEditable } from "./core/with-editable.js";
11
- import DynamicIcon from "../../node_modules/.pnpm/lucide-react@0.540.0_react@19.2.4/node_modules/lucide-react/dist/esm/DynamicIcon.js";
12
12
  const BUTTON_FIELDS = button.objectFields;
13
13
  function ButtonEditDialog({
14
14
  open,
@@ -46,7 +46,7 @@ function CompoundButtonBase(props) {
46
46
  var _a, _b, _c;
47
47
  const content = /* @__PURE__ */ jsxs(Fragment, { children: [
48
48
  props.size !== "icon" && props.label,
49
- props.icon && props.icon !== "none" ? /* @__PURE__ */ jsx(DynamicIcon, { name: props.icon, className: "h-4 w-4" }) : null
49
+ props.icon && props.icon !== "none" ? /* @__PURE__ */ jsx(SafeDynamicIcon, { name: props.icon, className: "h-4 w-4" }) : null
50
50
  ] });
51
51
  const href = props.action ? resolveActionUrl(props.action) : void 0;
52
52
  const isDownload = ((_a = props.action) == null ? void 0 : _a.type) === "download";
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { SafeDynamicIcon } from "./safe-dynamic-icon.js";
2
3
  import { cn } from "../../utils/css-utils.js";
3
4
  import { CompoundButton } from "./button.js";
4
5
  import { CompoundImage } from "./image.js";
5
- import DynamicIcon from "../../node_modules/.pnpm/lucide-react@0.540.0_react@19.2.4/node_modules/lucide-react/dist/esm/DynamicIcon.js";
6
6
  const CompoundCard = ({
7
7
  image,
8
8
  icon,
@@ -32,7 +32,7 @@ const CompoundCard = ({
32
32
  children: [
33
33
  hasImage ? /* @__PURE__ */ jsx("div", { className: "aspect-video overflow-hidden rounded-t-md", children: /* @__PURE__ */ jsx(CompoundImage, { src: image.src, alt: image.alt, className: "h-full" }) }) : null,
34
34
  hasIcon && !hasImage ? /* @__PURE__ */ jsx(
35
- DynamicIcon,
35
+ SafeDynamicIcon,
36
36
  {
37
37
  name: icon,
38
38
  className: cn("h-4 w-4", isLight && "text-gray-900")
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../utils/css-utils.js";
3
3
  import { CompoundBadge } from "./badge.js";
4
4
  import { CompoundButton } from "./button.js";
5
- import DynamicIcon from "../../node_modules/.pnpm/lucide-react@0.540.0_react@19.2.4/node_modules/lucide-react/dist/esm/DynamicIcon.js";
5
+ import { SafeDynamicIcon } from "./safe-dynamic-icon.js";
6
6
  const CompoundContent = ({
7
7
  badge,
8
8
  heading,
@@ -83,7 +83,7 @@ const CompoundContent = ({
83
83
  ) : null,
84
84
  Array.isArray(features) && features.length > 0 ? features.map((feature, index) => /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-4", children: [
85
85
  feature.icon && feature.icon !== "none" ? /* @__PURE__ */ jsx(
86
- DynamicIcon,
86
+ SafeDynamicIcon,
87
87
  {
88
88
  name: feature.icon,
89
89
  className: "h-6 w-6 shrink-0"
@@ -0,0 +1,7 @@
1
+ import { DynamicIcon } from "lucide-react/dynamic";
2
+ import type { ComponentPropsWithoutRef } from "react";
3
+ type SafeDynamicIconProps = Omit<ComponentPropsWithoutRef<typeof DynamicIcon>, "name"> & {
4
+ name: string;
5
+ };
6
+ export declare function SafeDynamicIcon({ name, ...props }: SafeDynamicIconProps): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import dynamicIconImports from "../../node_modules/.pnpm/lucide-react@0.540.0_react@19.2.4/node_modules/lucide-react/dist/esm/dynamicIconImports.js";
4
+ import DynamicIcon from "../../node_modules/.pnpm/lucide-react@0.540.0_react@19.2.4/node_modules/lucide-react/dist/esm/DynamicIcon.js";
5
+ function SafeDynamicIcon({ name, ...props }) {
6
+ if (!name || name === "none" || !(name in dynamicIconImports)) {
7
+ return null;
8
+ }
9
+ return /* @__PURE__ */ jsx(DynamicIcon, { name, ...props });
10
+ }
11
+ export {
12
+ SafeDynamicIcon
13
+ };
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { CompoundContainer } from "../../../puck-base/container.js";
3
3
  import { CompoundImage } from "../../../puck-base/image.js";
4
4
  import { cn } from "../../../../utils/css-utils.js";
5
- import DynamicIcon from "../../../../node_modules/.pnpm/lucide-react@0.540.0_react@19.2.4/node_modules/lucide-react/dist/esm/DynamicIcon.js";
5
+ import { SafeDynamicIcon } from "../../../puck-base/safe-dynamic-icon.js";
6
6
  const GridLayout = ({
7
7
  features,
8
8
  columns,
@@ -18,7 +18,7 @@ const GridLayout = ({
18
18
  ),
19
19
  children: features.map((feature, index) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
20
20
  feature.icon && feature.icon !== "none" && /* @__PURE__ */ jsx("div", { className: "bg-primary/10 flex h-10 w-10 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(
21
- DynamicIcon,
21
+ SafeDynamicIcon,
22
22
  {
23
23
  name: feature.icon,
24
24
  className: "text-primary h-5 w-5"
@@ -46,7 +46,7 @@ const AlternatingLayout = ({ features }) => /* @__PURE__ */ jsx("div", { classNa
46
46
  !isEven && "lg:order-2"
47
47
  ),
48
48
  children: ((_a = feature.image) == null ? void 0 : _a.src) ? /* @__PURE__ */ jsx(CompoundImage, { src: feature.image.src, alt: feature.image.alt || "", className: "w-full object-cover" }) : /* @__PURE__ */ jsx("div", { className: "flex aspect-video items-center justify-center", children: feature.icon && feature.icon !== "none" && /* @__PURE__ */ jsx(
49
- DynamicIcon,
49
+ SafeDynamicIcon,
50
50
  {
51
51
  name: feature.icon,
52
52
  className: "text-muted-foreground h-16 w-16"
@@ -56,7 +56,7 @@ const AlternatingLayout = ({ features }) => /* @__PURE__ */ jsx("div", { classNa
56
56
  ),
57
57
  /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", !isEven && "lg:order-1"), children: [
58
58
  feature.icon && feature.icon !== "none" && /* @__PURE__ */ jsx("div", { className: "bg-primary/10 flex h-10 w-10 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx(
59
- DynamicIcon,
59
+ SafeDynamicIcon,
60
60
  {
61
61
  name: feature.icon,
62
62
  className: "text-primary h-5 w-5"
@@ -80,7 +80,7 @@ const ListLayout = ({
80
80
  className: "border-border flex gap-4 border-b pb-8 last:border-b-0 last:pb-0",
81
81
  children: [
82
82
  feature.icon && feature.icon !== "none" && /* @__PURE__ */ jsx("div", { className: "bg-primary/10 flex h-10 w-10 shrink-0 items-center justify-center rounded-lg", children: /* @__PURE__ */ jsx(
83
- DynamicIcon,
83
+ SafeDynamicIcon,
84
84
  {
85
85
  name: feature.icon,
86
86
  className: "text-primary h-5 w-5"
@@ -94,11 +94,11 @@ const defaultActionItems = [
94
94
  },
95
95
  {
96
96
  label: "Get Started",
97
- url: "#",
97
+ url: "",
98
98
  action: {
99
- type: "external",
99
+ type: "email",
100
100
  pageUrl: "",
101
- externalUrl: "#",
101
+ externalUrl: "",
102
102
  openInNewTab: "false",
103
103
  email: "",
104
104
  subject: "",
@@ -1,4 +1,4 @@
1
- type HeroVariant = "hero-1" | "split-hero-1" | "grid-hero-1" | "image-hero-1" | "video-hero-1" | "gradient-hero-1" | "fullscreen-hero-1";
1
+ type HeroVariant = "hero-1" | "split-hero-1" | "image-hero-1" | "video-hero-1" | "gradient-hero-1" | "fullscreen-hero-1";
2
2
  type HeroPadding = {
3
3
  top?: "none" | "small" | "medium" | "large";
4
4
  bottom?: "none" | "small" | "medium" | "large";
@@ -26,12 +26,6 @@ type HeroImage = {
26
26
  alt?: string;
27
27
  aspectRatio?: "16x9" | "1x1";
28
28
  };
29
- type HeroSidebarItem = {
30
- label: string;
31
- value?: string;
32
- description?: string;
33
- url?: string;
34
- };
35
29
  type HeroSectionProps = {
36
30
  variant?: HeroVariant;
37
31
  badge?: HeroBadge;
@@ -53,16 +47,11 @@ type HeroSectionProps = {
53
47
  displayText?: string;
54
48
  imageLayout?: "1x1" | "1x1-9x16-1x1" | "16x9";
55
49
  imagePosition?: "left" | "right";
56
- leftSidebarTitle?: string;
57
- leftSidebar?: HeroSidebarItem[];
58
- rightSidebarTitle?: string;
59
- rightSidebar?: HeroSidebarItem[];
60
50
  styles?: {
61
51
  padding?: HeroPadding;
62
52
  sectionStyle?: HeroSectionStyle;
63
53
  backgroundColor?: string;
64
54
  className?: string;
65
- showGridLines?: boolean;
66
55
  overlay?: "none" | "dark" | "gradient";
67
56
  minHeight?: "medium" | "large" | "full";
68
57
  gradientFrom?: string;
@@ -24,7 +24,6 @@ export { default as HeaderConf, type HeaderProps } from "./header-sections/heade
24
24
  export { conf as StickyNavConf, type StickyNavProps } from "./header-sections/sticky-nav-1/index.tsx";
25
25
  export { conf as FullscreenHeroConf, type FullscreenHeroProps } from "./hero-sections/fullscreen-hero-1/index.tsx";
26
26
  export { conf as GradientHeroConf, type GradientHeroProps } from "./hero-sections/gradient-hero-1/index.tsx";
27
- export { conf as GridHeroConf, type GridHeroProps } from "./hero-sections/grid-hero-1/index.tsx";
28
27
  export { conf as HeroConf, type HeroProps } from "./hero-sections/hero-1/index.tsx";
29
28
  export { conf as ImageHeroConf, type ImageHeroProps } from "./hero-sections/image-hero-1/index.tsx";
30
29
  export { conf as SplitHeroConf, type SplitHeroProps } from "./hero-sections/split-hero-1/index.tsx";
@@ -3,7 +3,7 @@ import { Card, CardHeader, CardTitle, CardDescription, CardContent } from "../..
3
3
  import { CompoundButton } from "../../../puck-base/button.js";
4
4
  import { CompoundContainer } from "../../../puck-base/container.js";
5
5
  import { CompoundContent } from "../../../puck-base/content.js";
6
- import DynamicIcon from "../../../../node_modules/.pnpm/lucide-react@0.540.0_react@19.2.4/node_modules/lucide-react/dist/esm/DynamicIcon.js";
6
+ import { SafeDynamicIcon } from "../../../puck-base/safe-dynamic-icon.js";
7
7
  const Pricing = (props) => {
8
8
  var _a, _b, _c, _d;
9
9
  return /* @__PURE__ */ jsx(
@@ -40,7 +40,7 @@ const Pricing = (props) => {
40
40
  ] })
41
41
  ] }),
42
42
  /* @__PURE__ */ jsx("div", { className: "flex flex-col justify-start gap-4", children: (tier.features ?? []).map((feature, index2) => /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-4", children: [
43
- feature.icon && feature.icon !== "none" ? /* @__PURE__ */ jsx(DynamicIcon, { name: feature.icon }) : null,
43
+ feature.icon && feature.icon !== "none" ? /* @__PURE__ */ jsx(SafeDynamicIcon, { name: feature.icon }) : null,
44
44
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
45
45
  /* @__PURE__ */ jsx("p", { children: feature.name }),
46
46
  feature.description ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: feature.description }) : null
@@ -1,11 +1,12 @@
1
1
  import { CompoundContainerProps } from "@/components/puck-base/container";
2
2
  import { CompoundButtonProps } from "@/components/puck-base/button";
3
- import { PuckComponent, Slot } from "@puckeditor/core";
3
+ import { CompoundArticleCardProps } from "@/components/puck-base/article-card";
4
+ import { PuckComponent } from "@puckeditor/core";
4
5
  export interface ArticlesProps {
5
6
  eyebrow?: string;
6
7
  heading?: string;
7
8
  buttons?: CompoundButtonProps[];
8
- cards?: Slot;
9
+ cards?: CompoundArticleCardProps[];
9
10
  styles?: {
10
11
  padding?: CompoundContainerProps["padding"];
11
12
  sectionStyle?: CompoundContainerProps["sectionStyle"];
@@ -1,12 +1,13 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { CompoundContainer } from "../../../puck-base/container.js";
3
3
  import { CompoundButton } from "../../../puck-base/button.js";
4
+ import { CompoundArticleCard } from "../../../puck-base/article-card.js";
4
5
  import { cn } from "../../../../utils/css-utils.js";
5
6
  const Articles = ({
6
7
  eyebrow,
7
8
  heading,
8
9
  buttons,
9
- cards: Cards,
10
+ cards,
10
11
  styles
11
12
  }) => {
12
13
  var _a;
@@ -34,14 +35,15 @@ const Articles = ({
34
35
  }
35
36
  ) }) : null
36
37
  ] }),
37
- Cards && /* @__PURE__ */ jsx(
38
- Cards,
38
+ cards && cards.length > 0 && /* @__PURE__ */ jsx(
39
+ "div",
39
40
  {
40
41
  className: cn("grid grid-cols-1 gap-8", {
41
42
  "sm:grid-cols-2": columns === 2,
42
43
  "sm:grid-cols-2 lg:grid-cols-3": columns === 3,
43
44
  "sm:grid-cols-2 lg:grid-cols-4": columns === 4
44
- })
45
+ }),
46
+ children: cards.map((card, i) => /* @__PURE__ */ jsx(CompoundArticleCard, { ...card }, i))
45
47
  }
46
48
  )
47
49
  ]
@@ -1,19 +1,36 @@
1
- import { buttons, heading, cards } from "../../../puck-base/core/fields.js";
1
+ import { actionDefaults, button, description, heading, image, buttons } from "../../../puck-base/core/fields.js";
2
2
  import { Articles } from "./articles.js";
3
3
  import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
4
- const { icon: defaultIcon, ...defaultCardProps } = cards.defaultItemProps;
5
- const defaultCard = {
6
- ...defaultCardProps,
7
- image: { src: "https://images.pexels.com/photos/546819/pexels-photo-546819.jpeg?auto=compress&cs=tinysrgb&w=1200", alt: "Code displayed on laptop screen" }
8
- };
9
4
  const conf = {
10
5
  fields: {
11
6
  eyebrow: { type: "text", contentEditable: true },
12
7
  heading,
13
8
  buttons,
14
9
  cards: {
15
- type: "slot",
16
- allow: ["ArticleCard"]
10
+ type: "array",
11
+ max: 6,
12
+ getItemSummary: (item, index = 0) => item.heading || `Card ${index + 1}`,
13
+ arrayFields: {
14
+ image,
15
+ heading,
16
+ description,
17
+ button
18
+ },
19
+ defaultItemProps: {
20
+ image: {
21
+ src: "https://images.pexels.com/photos/546819/pexels-photo-546819.jpeg?auto=compress&cs=tinysrgb&w=1200",
22
+ alt: "Code displayed on laptop screen"
23
+ },
24
+ heading: "Article heading",
25
+ description: "Article description goes here.",
26
+ button: {
27
+ label: "",
28
+ action: actionDefaults,
29
+ variant: "link",
30
+ size: "default",
31
+ icon: "move-right"
32
+ }
33
+ }
17
34
  },
18
35
  styles: createStylesField({
19
36
  columns: {
@@ -37,20 +54,26 @@ const conf = {
37
54
  icon: "none"
38
55
  }
39
56
  ],
40
- cards: Array.from({ length: 3 }).map((_, index) => ({
41
- type: "ArticleCard",
42
- props: {
43
- ...defaultCard,
44
- image: [
45
- { src: "https://images.pexels.com/photos/3861969/pexels-photo-3861969.jpeg?auto=compress&cs=tinysrgb&w=1200", alt: "Developer working at desk with multiple monitors" },
46
- { src: "https://images.pexels.com/photos/574071/pexels-photo-574071.jpeg?auto=compress&cs=tinysrgb&w=1200", alt: "Colorful code on computer monitor in dark setting" },
47
- { src: "https://images.pexels.com/photos/1181677/pexels-photo-1181677.jpeg?auto=compress&cs=tinysrgb&w=1200", alt: "Developers collaborating on code together" }
48
- ][index],
49
- heading: ["How to Ship 10x Faster Without Burning Out", "The Future of Developer Tooling in 2026", "Building a Culture of Continuous Deployment"][index],
50
- description: ["Practical strategies for high-velocity teams that prioritize sustainability.", "An in-depth look at the trends shaping how developers build and deploy software.", "How top engineering orgs embed CI/CD into their team culture."][index],
51
- button: { label: "", variant: "link", size: "default", icon: "move-right" }
57
+ cards: [
58
+ {
59
+ image: { src: "https://images.pexels.com/photos/3861969/pexels-photo-3861969.jpeg?auto=compress&cs=tinysrgb&w=1200", alt: "Developer working at desk with multiple monitors" },
60
+ heading: "How to Ship 10x Faster Without Burning Out",
61
+ description: "Practical strategies for high-velocity teams that prioritize sustainability.",
62
+ button: { label: "", action: actionDefaults, variant: "link", size: "default", icon: "move-right" }
63
+ },
64
+ {
65
+ image: { src: "https://images.pexels.com/photos/574071/pexels-photo-574071.jpeg?auto=compress&cs=tinysrgb&w=1200", alt: "Colorful code on computer monitor in dark setting" },
66
+ heading: "The Future of Developer Tooling in 2026",
67
+ description: "An in-depth look at the trends shaping how developers build and deploy software.",
68
+ button: { label: "", action: actionDefaults, variant: "link", size: "default", icon: "move-right" }
69
+ },
70
+ {
71
+ image: { src: "https://images.pexels.com/photos/1181677/pexels-photo-1181677.jpeg?auto=compress&cs=tinysrgb&w=1200", alt: "Developers collaborating on code together" },
72
+ heading: "Building a Culture of Continuous Deployment",
73
+ description: "How top engineering orgs embed CI/CD into their team culture.",
74
+ button: { label: "", action: actionDefaults, variant: "link", size: "default", icon: "move-right" }
52
75
  }
53
- })),
76
+ ],
54
77
  styles: createStylesDefaults({ columns: 3 })
55
78
  },
56
79
  render: Articles
package/dist/index.js CHANGED
@@ -68,11 +68,10 @@ import { conf as conf23 } from "./components/puck-block/gallery-sections/gallery
68
68
  import { conf as conf24 } from "./components/puck-block/cta-sections/gradient-cta-1/index.js";
69
69
  import { conf as conf25 } from "./components/puck-block/hero-sections/gradient-hero-1/index.js";
70
70
  import { GradientText } from "./components/puck-base/gradient-text.js";
71
- import { conf as conf26 } from "./components/puck-block/hero-sections/grid-hero-1/index.js";
72
- import { conf as conf27 } from "./components/puck-block/hero-sections/hero-1/index.js";
71
+ import { conf as conf26 } from "./components/puck-block/hero-sections/hero-1/index.js";
73
72
  import { HoverCard, HoverCardContent, HoverCardTrigger } from "./components/shadcn/hover-card.js";
74
- import { conf as conf28 } from "./components/puck-block/feature-sections/icon-grid-1/index.js";
75
- import { conf as conf29 } from "./components/puck-block/hero-sections/image-hero-1/index.js";
73
+ import { conf as conf27 } from "./components/puck-block/feature-sections/icon-grid-1/index.js";
74
+ import { conf as conf28 } from "./components/puck-block/hero-sections/image-hero-1/index.js";
76
75
  import { ImageUploadField } from "./components/puck-base/image-upload-field.js";
77
76
  import { InlineEditable } from "./components/puck-base/inline-editable.js";
78
77
  import { Input } from "./components/shadcn/input.js";
@@ -82,28 +81,28 @@ import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup,
82
81
  import { Kbd, KbdGroup } from "./components/shadcn/kbd.js";
83
82
  import { Label } from "./components/shadcn/label.js";
84
83
  import { LayoutTextFlip } from "./components/shadcn/layout-text-flip.js";
85
- import { conf as conf30 } from "./components/puck-block/location-sections/location-2/index.js";
86
- import { conf as conf31 } from "./components/puck-block/location-sections/location-3/index.js";
87
- import { conf as conf32 } from "./components/puck-block/location-sections/location-1/index.js";
88
- import { conf as conf33 } from "./components/puck-block/testimonial-sections/logo-marquee-1/index.js";
89
- import { conf as conf34 } from "./components/puck-block/testimonial-sections/logo-wall-1/index.js";
90
- import { conf as conf35 } from "./components/puck-block/banner-sections/marquee-1/index.js";
84
+ import { conf as conf29 } from "./components/puck-block/location-sections/location-2/index.js";
85
+ import { conf as conf30 } from "./components/puck-block/location-sections/location-3/index.js";
86
+ import { conf as conf31 } from "./components/puck-block/location-sections/location-1/index.js";
87
+ import { conf as conf32 } from "./components/puck-block/testimonial-sections/logo-marquee-1/index.js";
88
+ import { conf as conf33 } from "./components/puck-block/testimonial-sections/logo-wall-1/index.js";
89
+ import { conf as conf34 } from "./components/puck-block/banner-sections/marquee-1/index.js";
91
90
  import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "./components/shadcn/menubar.js";
92
91
  import { MobileNav, MobileNavHeader, MobileNavMenu, MobileNavToggle, NavBody, NavItems, Navbar, NavbarButton, NavbarLogo } from "./components/shadcn/resizable-navbar.js";
93
92
  import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "./components/shadcn/native-select.js";
94
93
  import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle } from "./components/shadcn/navigation-menu.js";
95
- import { conf as conf36 } from "./components/puck-block/cta-sections/newsletter-signup-1/index.js";
94
+ import { conf as conf35 } from "./components/puck-block/cta-sections/newsletter-signup-1/index.js";
96
95
  import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/shadcn/pagination.js";
97
96
  import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from "./components/shadcn/popover.js";
98
- import { conf as conf37 } from "./components/puck-block/pricing-sections/pricing-2/index.js";
99
- import { conf as conf38 } from "./components/puck-block/pricing-sections/pricing-1/index.js";
100
- import { conf as conf39 } from "./components/puck-block/feature-sections/product-features-1/index.js";
97
+ import { conf as conf36 } from "./components/puck-block/pricing-sections/pricing-2/index.js";
98
+ import { conf as conf37 } from "./components/puck-block/pricing-sections/pricing-1/index.js";
99
+ import { conf as conf38 } from "./components/puck-block/feature-sections/product-features-1/index.js";
101
100
  import { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue } from "./components/shadcn/progress.js";
102
- import { conf as conf40 } from "./components/puck-block/cta-sections/promo-section-1/index.js";
101
+ import { conf as conf39 } from "./components/puck-block/cta-sections/promo-section-1/index.js";
103
102
  import { RadioGroup, RadioGroupItem } from "./components/shadcn/radio-group.js";
104
103
  import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "./components/shadcn/resizable.js";
105
- import { conf as conf41 } from "./components/puck-block/testimonial-sections/review-section-1/index.js";
106
- import { conf as conf42 } from "./components/puck-block/text-sections/rich-text-1/index.js";
104
+ import { conf as conf40 } from "./components/puck-block/testimonial-sections/review-section-1/index.js";
105
+ import { conf as conf41 } from "./components/puck-block/text-sections/rich-text-1/index.js";
107
106
  import { ScrollArea, ScrollBar } from "./components/shadcn/scroll-area.js";
108
107
  import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./components/shadcn/select.js";
109
108
  import { Separator } from "./components/shadcn/separator.js";
@@ -113,31 +112,31 @@ import { Skeleton } from "./components/shadcn/skeleton.js";
113
112
  import { Slider } from "./components/shadcn/slider.js";
114
113
  import { SparklesCore } from "./components/ui-block/sparkles/index.js";
115
114
  import { Spinner } from "./components/shadcn/spinner.js";
116
- import { conf as conf43 } from "./components/puck-block/hero-sections/split-hero-1/index.js";
115
+ import { conf as conf42 } from "./components/puck-block/hero-sections/split-hero-1/index.js";
117
116
  import { Spotlight } from "./components/ui-block/spotlight/index.js";
118
- import { conf as conf44 } from "./components/puck-block/metrics-sections/stats-2/index.js";
119
- import { conf as conf45 } from "./components/puck-block/metrics-sections/stats-3/index.js";
120
- import { conf as conf46 } from "./components/puck-block/metrics-sections/stats-1/index.js";
121
- import { conf as conf47 } from "./components/puck-block/showcase-sections/step-by-step-1/index.js";
122
- import { conf as conf48 } from "./components/puck-block/header-sections/sticky-nav-1/index.js";
117
+ import { conf as conf43 } from "./components/puck-block/metrics-sections/stats-2/index.js";
118
+ import { conf as conf44 } from "./components/puck-block/metrics-sections/stats-3/index.js";
119
+ import { conf as conf45 } from "./components/puck-block/metrics-sections/stats-1/index.js";
120
+ import { conf as conf46 } from "./components/puck-block/showcase-sections/step-by-step-1/index.js";
121
+ import { conf as conf47 } from "./components/puck-block/header-sections/sticky-nav-1/index.js";
123
122
  import { Switch } from "./components/shadcn/switch.js";
124
- import { conf as conf49 } from "./components/puck-block/text-sections/tab-section-1/index.js";
123
+ import { conf as conf48 } from "./components/puck-block/text-sections/tab-section-1/index.js";
125
124
  import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./components/shadcn/table.js";
126
125
  import { Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants } from "./components/shadcn/tabs.js";
127
- import { conf as conf50 } from "./components/puck-block/team-sections/team-grid-2/index.js";
128
- import { conf as conf51 } from "./components/puck-block/team-sections/team-grid-1/index.js";
129
- import { conf as conf52 } from "./components/puck-block/team-sections/team-profiles-1/index.js";
130
- import { conf as conf53 } from "./components/puck-block/testimonial-sections/testimonials-1/index.js";
126
+ import { conf as conf49 } from "./components/puck-block/team-sections/team-grid-2/index.js";
127
+ import { conf as conf50 } from "./components/puck-block/team-sections/team-grid-1/index.js";
128
+ import { conf as conf51 } from "./components/puck-block/team-sections/team-profiles-1/index.js";
129
+ import { conf as conf52 } from "./components/puck-block/testimonial-sections/testimonials-1/index.js";
131
130
  import { Textarea } from "./components/shadcn/textarea.js";
132
- import { conf as conf54 } from "./components/puck-block/text-sections/timeline-1/index.js";
131
+ import { conf as conf53 } from "./components/puck-block/text-sections/timeline-1/index.js";
133
132
  import { Toaster } from "./components/shadcn/sonner.js";
134
133
  import { Toggle, toggleVariants } from "./components/shadcn/toggle.js";
135
134
  import { ToggleGroup, ToggleGroupItem } from "./components/shadcn/toggle-group.js";
136
135
  import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/shadcn/tooltip.js";
137
136
  import { TweetCard, truncate } from "./components/shadcn/tweet-card.js";
138
137
  import { TweetCardClient } from "./components/shadcn/tweet-card-client.js";
139
- import { conf as conf55 } from "./components/puck-block/text-sections/two-column-1/index.js";
140
- import { conf as conf56 } from "./components/puck-block/hero-sections/video-hero-1/index.js";
138
+ import { conf as conf54 } from "./components/puck-block/text-sections/two-column-1/index.js";
139
+ import { conf as conf55 } from "./components/puck-block/hero-sections/video-hero-1/index.js";
141
140
  import { action, actionDefaults, badge, button, buttons, card, cards, contentFields, contentFieldsWithFeatures, description, features, field, fieldDefaults, form, formDefaults, getPlaceholderImageUrl, heading, icon, image, image16x9Placeholder, image1x1Placeholder, image9x16Placeholder, images } from "./components/puck-base/core/fields.js";
142
141
  import { backgroundColor, backgroundImage, padding, paddingDefaults, paddingLevel, sectionOverlay, sectionStyle } from "./components/puck-base/core/styles.js";
143
142
  import { base64ToFile, base64ToUrl, blobToBase64, blobToUrl, convertBase64ToBlob, structureFile } from "./utils/utils-canvas.js";
@@ -360,14 +359,13 @@ export {
360
359
  conf24 as GradientCtaConf,
361
360
  conf25 as GradientHeroConf,
362
361
  GradientText,
363
- conf26 as GridHeroConf,
364
362
  default3 as HeaderConf,
365
- conf27 as HeroConf,
363
+ conf26 as HeroConf,
366
364
  HoverCard,
367
365
  HoverCardContent,
368
366
  HoverCardTrigger,
369
- conf28 as IconGridConf,
370
- conf29 as ImageHeroConf,
367
+ conf27 as IconGridConf,
368
+ conf28 as ImageHeroConf,
371
369
  ImageUploadField,
372
370
  InlineEditable,
373
371
  Input,
@@ -395,12 +393,12 @@ export {
395
393
  KbdGroup,
396
394
  Label,
397
395
  LayoutTextFlip,
398
- conf30 as Location2Conf,
399
- conf31 as Location3Conf,
400
- conf32 as LocationConf,
401
- conf33 as LogoMarqueeConf,
402
- conf34 as LogoWallConf,
403
- conf35 as MarqueeConf,
396
+ conf29 as Location2Conf,
397
+ conf30 as Location3Conf,
398
+ conf31 as LocationConf,
399
+ conf32 as LogoMarqueeConf,
400
+ conf33 as LogoWallConf,
401
+ conf34 as MarqueeConf,
404
402
  Menubar,
405
403
  MenubarCheckboxItem,
406
404
  MenubarContent,
@@ -437,7 +435,7 @@ export {
437
435
  NavigationMenuList,
438
436
  NavigationMenuPositioner,
439
437
  NavigationMenuTrigger,
440
- conf36 as NewsletterSignupConf,
438
+ conf35 as NewsletterSignupConf,
441
439
  PageActionFields,
442
440
  Pagination,
443
441
  PaginationContent,
@@ -453,22 +451,22 @@ export {
453
451
  PopoverHeader,
454
452
  PopoverTitle,
455
453
  PopoverTrigger,
456
- conf37 as Pricing2Conf,
457
- conf38 as PricingConf,
458
- conf39 as ProductFeaturesConf,
454
+ conf36 as Pricing2Conf,
455
+ conf37 as PricingConf,
456
+ conf38 as ProductFeaturesConf,
459
457
  Progress,
460
458
  ProgressIndicator,
461
459
  ProgressLabel,
462
460
  ProgressTrack,
463
461
  ProgressValue,
464
- conf40 as PromoSectionConf,
462
+ conf39 as PromoSectionConf,
465
463
  RadioGroup,
466
464
  RadioGroupItem,
467
465
  ResizableHandle,
468
466
  ResizablePanel,
469
467
  ResizablePanelGroup,
470
- conf41 as ReviewSectionConf,
471
- conf42 as RichTextConf,
468
+ conf40 as ReviewSectionConf,
469
+ conf41 as RichTextConf,
472
470
  ScrollArea,
473
471
  ScrollBar,
474
472
  SectionActionFields,
@@ -519,15 +517,15 @@ export {
519
517
  Slider,
520
518
  SparklesCore,
521
519
  Spinner,
522
- conf43 as SplitHeroConf,
520
+ conf42 as SplitHeroConf,
523
521
  Spotlight,
524
- conf44 as Stats2Conf,
525
- conf45 as Stats3Conf,
526
- conf46 as StatsConf,
527
- conf47 as StepByStepConf,
528
- conf48 as StickyNavConf,
522
+ conf43 as Stats2Conf,
523
+ conf44 as Stats3Conf,
524
+ conf45 as StatsConf,
525
+ conf46 as StepByStepConf,
526
+ conf47 as StickyNavConf,
529
527
  Switch,
530
- conf49 as TabSectionConf,
528
+ conf48 as TabSectionConf,
531
529
  Table,
532
530
  TableBody,
533
531
  TableCaption,
@@ -540,12 +538,12 @@ export {
540
538
  TabsContent,
541
539
  TabsList,
542
540
  TabsTrigger,
543
- conf50 as TeamGrid2Conf,
544
- conf51 as TeamGridConf,
545
- conf52 as TeamProfilesConf,
546
- conf53 as TestimonialsConf,
541
+ conf49 as TeamGrid2Conf,
542
+ conf50 as TeamGridConf,
543
+ conf51 as TeamProfilesConf,
544
+ conf52 as TestimonialsConf,
547
545
  Textarea,
548
- conf54 as TimelineConf,
546
+ conf53 as TimelineConf,
549
547
  Toaster,
550
548
  Toggle,
551
549
  ToggleGroup,
@@ -556,8 +554,8 @@ export {
556
554
  TooltipTrigger,
557
555
  TweetCard,
558
556
  TweetCardClient,
559
- conf55 as TwoColumnConf,
560
- conf56 as VideoHeroConf,
557
+ conf54 as TwoColumnConf,
558
+ conf55 as VideoHeroConf,
561
559
  action,
562
560
  actionDefaults,
563
561
  backgroundColor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dune-react",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,26 +0,0 @@
1
- import { CompoundContainerProps } from "@/components/puck-base/container";
2
- import { CompoundBadgeProps } from "@/components/puck-base/badge";
3
- import { CompoundButtonProps } from "@/components/puck-base/button";
4
- export interface SidebarItem {
5
- label: string;
6
- value?: string;
7
- description?: string;
8
- url?: string;
9
- }
10
- export interface GridHeroProps {
11
- badge?: CompoundBadgeProps;
12
- heading: string;
13
- description?: string;
14
- buttons?: CompoundButtonProps[];
15
- leftSidebarTitle?: string;
16
- leftSidebar?: SidebarItem[];
17
- rightSidebar?: SidebarItem[];
18
- rightSidebarTitle?: string;
19
- styles?: {
20
- padding?: CompoundContainerProps["padding"];
21
- sectionStyle?: CompoundContainerProps["sectionStyle"];
22
- backgroundColor?: string;
23
- showGridLines?: boolean;
24
- };
25
- }
26
- export declare const GridHero: ({ badge, heading, description, buttons, leftSidebarTitle, leftSidebar, rightSidebar, rightSidebarTitle, styles, }: GridHeroProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,125 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { cn } from "../../../../utils/css-utils.js";
3
- import { CompoundContainer } from "../../../puck-base/container.js";
4
- import { CompoundBadge } from "../../../puck-base/badge.js";
5
- import { CompoundButton } from "../../../puck-base/button.js";
6
- const GridHero = ({
7
- badge,
8
- heading,
9
- description,
10
- buttons,
11
- leftSidebarTitle,
12
- leftSidebar = [],
13
- rightSidebar = [],
14
- rightSidebarTitle,
15
- styles
16
- }) => {
17
- const showGridLines = (styles == null ? void 0 : styles.showGridLines) ?? true;
18
- const hasLeftSidebar = leftSidebar.length > 0 || !!leftSidebarTitle;
19
- const hasRightSidebar = rightSidebar.length > 0;
20
- return /* @__PURE__ */ jsx(
21
- CompoundContainer,
22
- {
23
- padding: styles == null ? void 0 : styles.padding,
24
- sectionStyle: styles == null ? void 0 : styles.sectionStyle,
25
- backgroundColor: styles == null ? void 0 : styles.backgroundColor,
26
- children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
27
- showGridLines && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0", "aria-hidden": true, children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex h-full max-w-7xl justify-between px-4", children: [...Array(7)].map((_, i) => /* @__PURE__ */ jsx("div", { className: "h-full w-px bg-gray-200/60" }, i)) }) }),
28
- /* @__PURE__ */ jsxs(
29
- "div",
30
- {
31
- className: cn(
32
- "relative mx-auto grid max-w-7xl gap-0 px-4",
33
- hasLeftSidebar || hasRightSidebar ? "grid-cols-[minmax(120px,180px)_1fr_minmax(120px,180px)]" : "grid-cols-1"
34
- ),
35
- children: [
36
- hasLeftSidebar && /* @__PURE__ */ jsx("div", { className: "hidden border-r border-gray-200/60 pt-8 pr-6 md:block", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
37
- leftSidebarTitle && /* @__PURE__ */ jsx("div", { className: "pb-4", children: /* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-mono text-xs leading-tight font-medium", children: leftSidebarTitle }) }),
38
- leftSidebar.map((item, i) => /* @__PURE__ */ jsxs(
39
- "div",
40
- {
41
- className: cn(
42
- "flex flex-col gap-0.5 py-4",
43
- i > 0 && "border-t border-dotted border-gray-400"
44
- ),
45
- children: [
46
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-mono text-[10px] font-medium tracking-wider", children: item.label }),
47
- item.value && /* @__PURE__ */ jsx("span", { className: "font-mono text-xl font-semibold tracking-tight", children: item.value }),
48
- item.description && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-mono text-[10px]", children: item.description })
49
- ]
50
- },
51
- i
52
- ))
53
- ] }) }),
54
- /* @__PURE__ */ jsxs(
55
- "div",
56
- {
57
- className: cn("flex flex-col gap-5 py-14", {
58
- "px-8": hasLeftSidebar || hasRightSidebar,
59
- "items-center text-center": !hasLeftSidebar && !hasRightSidebar
60
- }),
61
- children: [
62
- badge && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
63
- CompoundBadge,
64
- {
65
- label: badge.label,
66
- variant: badge.variant || "outline",
67
- url: badge.url
68
- }
69
- ) }),
70
- /* @__PURE__ */ jsx("h1", { className: "max-w-2xl text-5xl font-semibold tracking-tighter md:text-6xl", children: heading }),
71
- description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground max-w-lg font-mono text-sm leading-relaxed", children: description }),
72
- Array.isArray(buttons) && buttons.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-row flex-wrap gap-3 pt-2", children: buttons.filter((b) => !!b.label).map((button, index) => /* @__PURE__ */ jsx(
73
- CompoundButton,
74
- {
75
- label: button.label,
76
- action: button.action,
77
- variant: button.variant,
78
- size: button.size,
79
- className: button.variant === "outline" ? "border-foreground border-2" : void 0
80
- },
81
- index
82
- )) })
83
- ]
84
- }
85
- ),
86
- hasRightSidebar && /* @__PURE__ */ jsxs("div", { className: "hidden border-l border-gray-200/60 pt-12 pl-6 md:block", children: [
87
- /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: rightSidebar.map((item, i) => /* @__PURE__ */ jsx("div", { className: "py-2", children: item.url ? /* @__PURE__ */ jsxs(
88
- "a",
89
- {
90
- href: item.url,
91
- className: "text-muted-foreground hover:text-foreground font-mono text-xs transition-colors",
92
- children: [
93
- item.label,
94
- item.value && /* @__PURE__ */ jsx("span", { className: "ml-1.5 text-[10px] opacity-60", children: item.value })
95
- ]
96
- }
97
- ) : /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground font-mono text-xs", children: [
98
- item.label,
99
- item.value && /* @__PURE__ */ jsx("span", { className: "ml-1.5 text-[10px] opacity-60", children: item.value })
100
- ] }) }, i)) }),
101
- rightSidebarTitle && /* @__PURE__ */ jsxs("div", { className: "mt-6 border-t border-dotted border-gray-400 pt-4", children: [
102
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-mono text-[10px] font-medium tracking-wider", children: rightSidebarTitle }),
103
- rightSidebar.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-col gap-1", children: rightSidebar.map((item, i) => /* @__PURE__ */ jsxs(
104
- "div",
105
- {
106
- className: "flex items-baseline justify-between gap-2",
107
- children: [
108
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-mono text-[10px]", children: item.label }),
109
- item.value && /* @__PURE__ */ jsx("span", { className: "font-mono text-xs font-semibold", children: item.value })
110
- ]
111
- },
112
- i
113
- )) })
114
- ] })
115
- ] })
116
- ]
117
- }
118
- )
119
- ] })
120
- }
121
- );
122
- };
123
- export {
124
- GridHero
125
- };
@@ -1,5 +0,0 @@
1
- import { ComponentConfig } from "@puckeditor/core";
2
- import { GridHeroProps } from "./grid-hero";
3
- export type { GridHeroProps };
4
- export declare const conf: ComponentConfig<GridHeroProps>;
5
- export default conf;
@@ -1,71 +0,0 @@
1
- import { contentFields } from "../../../puck-base/core/fields.js";
2
- import { GridHero } from "./grid-hero.js";
3
- import { createStylesDefaults, createStylesField } from "../../../puck-base/core/styles.js";
4
- const conf = {
5
- fields: {
6
- ...contentFields,
7
- leftSidebarTitle: { type: "text", label: "Left Sidebar Title" },
8
- leftSidebar: {
9
- type: "array",
10
- max: 5,
11
- getItemSummary: (item, i = 0) => item.label || `Item ${i + 1}`,
12
- arrayFields: {
13
- label: { type: "text" },
14
- value: { type: "text" },
15
- description: { type: "text" },
16
- url: { type: "text" }
17
- },
18
- defaultItemProps: {
19
- label: "Label",
20
- value: "Value"
21
- }
22
- },
23
- rightSidebarTitle: { type: "text", label: "Right Sidebar Title" },
24
- rightSidebar: {
25
- type: "array",
26
- max: 5,
27
- getItemSummary: (item, i = 0) => item.label || `Item ${i + 1}`,
28
- arrayFields: {
29
- label: { type: "text" },
30
- value: { type: "text" },
31
- url: { type: "text" }
32
- },
33
- defaultItemProps: {
34
- label: "Link",
35
- url: "#"
36
- }
37
- },
38
- styles: createStylesField({
39
- showGridLines: {
40
- type: "radio",
41
- label: "Show Grid Lines",
42
- options: [
43
- { label: "Yes", value: true },
44
- { label: "No", value: false }
45
- ]
46
- }
47
- })
48
- },
49
- defaultProps: {
50
- heading: "Scale without limits. Build without compromise.",
51
- description: "An enterprise-ready platform that gives your team full control over every deployment.",
52
- badge: { label: "TRUSTED BY 10,000+ TEAMS", url: "", variant: "default" },
53
- buttons: [
54
- { label: "Get Started", variant: "default" },
55
- { label: "Read Docs", variant: "outline" }
56
- ],
57
- leftSidebar: [
58
- { label: "API Requests / Day", value: "2.4M" },
59
- { label: "Uptime (30d)", value: "99.99%" }
60
- ],
61
- rightSidebar: [
62
- { label: "Open Source", value: "18.2k", url: "#" },
63
- { label: "Documentation", url: "#" }
64
- ],
65
- styles: createStylesDefaults({ showGridLines: true })
66
- },
67
- render: GridHero
68
- };
69
- export {
70
- conf
71
- };