dune-react 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/components/puck-base/article-card.js +1 -1
  2. package/dist/components/puck-base/button.d.ts +0 -1
  3. package/dist/components/puck-base/button.js +3 -3
  4. package/dist/components/puck-base/card.js +0 -1
  5. package/dist/components/puck-base/content.js +0 -1
  6. package/dist/components/puck-base/core/fields.d.ts +26 -119
  7. package/dist/components/puck-base/core/fields.js +10 -17
  8. package/dist/components/puck-base/core/icon-catalog.d.ts +14 -0
  9. package/dist/components/puck-base/core/icon-catalog.js +193 -0
  10. package/dist/components/puck-base/core/styles.d.ts +102 -33
  11. package/dist/components/puck-base/core/styles.js +45 -81
  12. package/dist/components/puck-base/core/with-editable.d.ts +4 -9
  13. package/dist/components/puck-base/core/with-editable.js +43 -62
  14. package/dist/components/puck-base/fields/action-field.d.ts +30 -0
  15. package/dist/components/puck-base/fields/action-field.js +289 -0
  16. package/dist/components/puck-base/fields/auto-field.d.ts +0 -1
  17. package/dist/components/puck-base/fields/auto-field.js +2 -90
  18. package/dist/components/puck-base/form.js +0 -1
  19. package/dist/components/puck-base/gradient-text.js +1 -1
  20. package/dist/components/puck-base/icon-picker-field.d.ts +8 -0
  21. package/dist/components/puck-base/icon-picker-field.js +153 -0
  22. package/dist/components/puck-base/index.d.ts +1 -1
  23. package/dist/components/puck-base/navigation-menu.d.ts +18 -0
  24. package/dist/components/puck-base/navigation-menu.js +202 -0
  25. package/dist/components/puck-block/banner-sections/announcement-banner-1/index.js +1 -1
  26. package/dist/components/puck-block/banner-sections/marquee-1/index.js +6 -4
  27. package/dist/components/puck-block/contact-sections/contact-us-1/index.js +18 -8
  28. package/dist/components/puck-block/contact-sections/contact-us-2/contact-us-2.js +1 -1
  29. package/dist/components/puck-block/contact-sections/contact-us-2/index.js +7 -7
  30. package/dist/components/puck-block/contact-sections/contact-us-3/index.js +2 -2
  31. package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.d.ts +2 -1
  32. package/dist/components/puck-block/cta-sections/banner-cta-1/banner-cta.js +6 -5
  33. package/dist/components/puck-block/cta-sections/banner-cta-1/index.js +4 -4
  34. package/dist/components/puck-block/cta-sections/cta-1/index.js +9 -9
  35. package/dist/components/puck-block/cta-sections/gradient-cta-1/gradient-cta.js +34 -12
  36. package/dist/components/puck-block/cta-sections/gradient-cta-1/index.js +3 -3
  37. package/dist/components/puck-block/cta-sections/newsletter-signup-1/index.js +1 -1
  38. package/dist/components/puck-block/cta-sections/promo-section-1/index.js +5 -6
  39. package/dist/components/puck-block/cta-sections/promo-section-1/promo-section.js +2 -2
  40. package/dist/components/puck-block/faq-sections/accordion-1/accordion.js +8 -3
  41. package/dist/components/puck-block/faq-sections/accordion-1/index.js +7 -3
  42. package/dist/components/puck-block/faq-sections/faq-1/index.js +16 -4
  43. package/dist/components/puck-block/faq-sections/faq-2/index.js +11 -11
  44. package/dist/components/puck-block/feature-sections/bento-1/bento.js +16 -7
  45. package/dist/components/puck-block/feature-sections/bento-1/index.js +19 -6
  46. package/dist/components/puck-block/feature-sections/feature-cards-1/index.js +11 -12
  47. package/dist/components/puck-block/feature-sections/feature-showcase-1/index.js +10 -10
  48. package/dist/components/puck-block/feature-sections/icon-grid-1/icon-grid.js +1 -1
  49. package/dist/components/puck-block/feature-sections/icon-grid-1/index.js +13 -18
  50. package/dist/components/puck-block/feature-sections/product-features-1/index.js +18 -23
  51. package/dist/components/puck-block/footer-sections/footer-1/index.js +17 -22
  52. package/dist/components/puck-block/gallery-sections/gallery-1/index.js +12 -8
  53. package/dist/components/puck-block/gallery-sections/gallery-2/gallery-2.js +14 -6
  54. package/dist/components/puck-block/gallery-sections/gallery-2/index.js +10 -9
  55. package/dist/components/puck-block/gallery-sections/gallery-3/index.js +17 -14
  56. package/dist/components/puck-block/header-sections/header-1/header.d.ts +4 -1
  57. package/dist/components/puck-block/header-sections/header-1/header.js +26 -19
  58. package/dist/components/puck-block/header-sections/header-1/index.js +61 -50
  59. package/dist/components/puck-block/header-sections/sticky-nav-1/index.js +4 -3
  60. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/fullscreen-hero.js +15 -2
  61. package/dist/components/puck-block/hero-sections/fullscreen-hero-1/index.js +4 -4
  62. package/dist/components/puck-block/hero-sections/gradient-hero-1/gradient-hero.js +2 -2
  63. package/dist/components/puck-block/hero-sections/gradient-hero-1/index.js +5 -4
  64. package/dist/components/puck-block/hero-sections/grid-hero-1/grid-hero.js +1 -1
  65. package/dist/components/puck-block/hero-sections/grid-hero-1/index.js +8 -8
  66. package/dist/components/puck-block/hero-sections/hero-1/hero.js +1 -1
  67. package/dist/components/puck-block/hero-sections/hero-1/index.js +16 -12
  68. package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.d.ts +0 -1
  69. package/dist/components/puck-block/hero-sections/image-hero-1/image-hero.js +1 -1
  70. package/dist/components/puck-block/hero-sections/image-hero-1/index.js +23 -6
  71. package/dist/components/puck-block/hero-sections/split-hero-1/index.js +7 -7
  72. package/dist/components/puck-block/hero-sections/video-hero-1/index.js +5 -5
  73. package/dist/components/puck-block/hero-sections/video-hero-1/video-hero.js +1 -1
  74. package/dist/components/puck-block/location-sections/location-1/index.js +4 -7
  75. package/dist/components/puck-block/location-sections/location-1/location.d.ts +1 -0
  76. package/dist/components/puck-block/location-sections/location-1/location.js +2 -3
  77. package/dist/components/puck-block/location-sections/location-2/index.js +4 -7
  78. package/dist/components/puck-block/location-sections/location-2/location.d.ts +1 -0
  79. package/dist/components/puck-block/location-sections/location-2/location.js +2 -3
  80. package/dist/components/puck-block/location-sections/location-3/index.js +15 -14
  81. package/dist/components/puck-block/location-sections/location-3/location.d.ts +3 -0
  82. package/dist/components/puck-block/location-sections/location-3/location.js +7 -4
  83. package/dist/components/puck-block/metrics-sections/stats-1/index.js +13 -13
  84. package/dist/components/puck-block/metrics-sections/stats-2/index.js +8 -10
  85. package/dist/components/puck-block/metrics-sections/stats-2/stats-2.js +0 -1
  86. package/dist/components/puck-block/metrics-sections/stats-3/index.js +13 -15
  87. package/dist/components/puck-block/metrics-sections/stats-3/stats-3.js +14 -1
  88. package/dist/components/puck-block/pricing-sections/comparison-1/index.js +2 -2
  89. package/dist/components/puck-block/pricing-sections/pricing-1/index.js +39 -21
  90. package/dist/components/puck-block/pricing-sections/pricing-2/index.js +30 -34
  91. package/dist/components/puck-block/showcase-sections/before-after-1/index.js +12 -13
  92. package/dist/components/puck-block/showcase-sections/case-study-1/case-study.js +1 -1
  93. package/dist/components/puck-block/showcase-sections/case-study-1/index.js +8 -8
  94. package/dist/components/puck-block/showcase-sections/step-by-step-1/index.js +8 -8
  95. package/dist/components/puck-block/team-sections/team-grid-1/index.js +9 -9
  96. package/dist/components/puck-block/team-sections/team-grid-2/index.js +12 -14
  97. package/dist/components/puck-block/team-sections/team-profiles-1/index.js +11 -9
  98. package/dist/components/puck-block/testimonial-sections/customers-1/index.js +18 -7
  99. package/dist/components/puck-block/testimonial-sections/logo-marquee-1/index.js +2 -2
  100. package/dist/components/puck-block/testimonial-sections/logo-marquee-1/logo-marquee.js +1 -1
  101. package/dist/components/puck-block/testimonial-sections/logo-wall-1/index.js +7 -7
  102. package/dist/components/puck-block/testimonial-sections/review-section-1/index.js +27 -12
  103. package/dist/components/puck-block/testimonial-sections/testimonials-1/index.js +17 -7
  104. package/dist/components/puck-block/testimonial-sections/testimonials-1/testimonials.js +30 -10
  105. package/dist/components/puck-block/text-sections/articles-1/articles.js +1 -1
  106. package/dist/components/puck-block/text-sections/articles-1/index.js +12 -8
  107. package/dist/components/puck-block/text-sections/content-section-1/content-section.js +0 -1
  108. package/dist/components/puck-block/text-sections/content-section-1/index.js +6 -8
  109. package/dist/components/puck-block/text-sections/rich-text-1/index.js +1 -1
  110. package/dist/components/puck-block/text-sections/rich-text-1/rich-text.js +6 -1
  111. package/dist/components/puck-block/text-sections/tab-section-1/index.js +12 -12
  112. package/dist/components/puck-block/text-sections/tab-section-1/tab-section.js +7 -3
  113. package/dist/components/puck-block/text-sections/timeline-1/index.js +17 -7
  114. package/dist/components/puck-block/text-sections/two-column-1/index.js +10 -10
  115. package/dist/components/shadcn/navigation-menu.js +8 -33
  116. package/dist/index.js +9 -1
  117. package/dist/node_modules/.pnpm/lucide-react@0.540.0_react@19.2.4/node_modules/lucide-react/dist/esm/DynamicIcon.js +1 -3
  118. package/package.json +3 -2
  119. package/dist/components/puck-base/action-field.d.ts +0 -8
  120. package/dist/components/puck-base/action-field.js +0 -170
@@ -1,16 +1,10 @@
1
1
  import { fieldTypes } from "../field.js";
2
- import { ActionField } from "../action-field.js";
3
- import { iconNames } from "../../../node_modules/.pnpm/lucide-react@0.540.0_react@19.2.4/node_modules/lucide-react/dist/esm/DynamicIcon.js";
2
+ import { ActionField } from "../fields/action-field.js";
3
+ import { IconPickerField } from "../icon-picker-field.js";
4
4
  const formMethods = ["get", "post", "put", "patch", "delete"];
5
5
  const icon = {
6
- type: "select",
7
- options: [
8
- { label: "none", value: "none" },
9
- ...iconNames.map((iconName) => ({
10
- label: iconName,
11
- value: iconName
12
- }))
13
- ]
6
+ type: "custom",
7
+ render: IconPickerField
14
8
  };
15
9
  const action = {
16
10
  type: "custom",
@@ -32,7 +26,6 @@ const button = {
32
26
  type: "object",
33
27
  objectFields: {
34
28
  label: { type: "text" },
35
- url: { type: "text" },
36
29
  action,
37
30
  variant: {
38
31
  type: "select",
@@ -59,7 +52,6 @@ const button = {
59
52
  };
60
53
  const buttonDefaults = {
61
54
  label: "Button",
62
- url: "",
63
55
  action: actionDefaults,
64
56
  variant: "default",
65
57
  size: "default",
@@ -97,13 +89,14 @@ const image = {
97
89
  type: "object",
98
90
  objectFields: {
99
91
  // "image" is a custom field type registered via Puck overrides (fieldTypes.image)
100
- src: { type: "image", label: "图片" },
92
+ src: { type: "image", label: "Image" },
101
93
  alt: { type: "text" }
102
94
  }
103
95
  };
104
- const getPlaceholderImageUrl = (size, text = "Placeholder Image") => `https://dummyimage.com/${size}/f5f4f4/101010.png&text=${encodeURIComponent(
105
- text
106
- )}`;
96
+ const getPlaceholderImageUrl = (size, text = "Placeholder Image") => {
97
+ const [w, h] = size.split("x");
98
+ return `https://picsum.photos/seed/${encodeURIComponent(text)}/${w}/${h}`;
99
+ };
107
100
  const image16x9Placeholder = {
108
101
  alt: "16/9 aspect ratio accessible description of the image",
109
102
  src: getPlaceholderImageUrl("1920x1080")
@@ -204,7 +197,7 @@ const fieldDefaults = {
204
197
  type: "text",
205
198
  name: "field_name"
206
199
  };
207
- const { url, action: _buttonAction, ...formButtonConfig } = button.objectFields;
200
+ const { action: _buttonAction, ...formButtonConfig } = button.objectFields;
208
201
  const form = {
209
202
  type: "object",
210
203
  objectFields: {
@@ -0,0 +1,14 @@
1
+ import type { LucideIcon } from "lucide-react";
2
+ export interface IconEntry {
3
+ name: string;
4
+ component: LucideIcon;
5
+ }
6
+ export interface IconCategory {
7
+ label: string;
8
+ icons: IconEntry[];
9
+ }
10
+ export declare const ICON_CATALOG: IconCategory[];
11
+ /** Flat map of icon name → LucideIcon component */
12
+ export declare const ICON_MAP: Map<string, LucideIcon>;
13
+ /** Set of all curated icon names, for membership checks */
14
+ export declare const CURATED_ICON_SET: Set<string>;
@@ -0,0 +1,193 @@
1
+ import { ArrowRight, ArrowLeft, ArrowUp, ArrowDown, ArrowUpRight, ChevronRight, ChevronLeft, ChevronDown, ChevronUp, ChevronsRight, MoveRight, ExternalLink, CornerDownRight, Undo2, Redo2, Mail, Phone, MessageCircle, MessageSquare, Send, AtSign, Inbox, Bell, BellRing, Megaphone, PhoneCall, Voicemail, Globe, Share2, Link, ThumbsUp, Heart, Star, Users, User, UserPlus, UserCheck, HandHeart, Handshake, Briefcase, Building2, CreditCard, DollarSign, Wallet, Receipt, BarChart3, TrendingUp, PiggyBank, BadgeDollarSign, ChartPie, Landmark, Image, Video, Camera, Play, Music, FileText, BookOpen, PenTool, Newspaper, Mic, Headphones, Film, Code, Terminal, Cpu, Database, Server, Cloud, Wifi, Smartphone, Monitor, Laptop, HardDrive, GitBranch, Check, CheckCircle, CircleCheck, X, XCircle, AlertTriangle, AlertCircle, Info, Ban, Loader, CircleAlert, ShieldCheck, Search, Settings, Menu, Plus, Minus, Pencil, Trash2, Copy, Download, Upload, Filter, Eye, EyeOff, Lock, Unlock, MoreHorizontal, Grip, Sun, Moon, Zap, Flame, Droplets, Leaf, Mountain, Compass, MapPin, Clock, Calendar, Gift, TreePine, Snowflake, CloudRain, ShoppingCart, ShoppingBag, Tag, Percent, Store, Package, Truck, Box, BadgePercent, Ticket } from "lucide-react";
2
+ function entry(name, component) {
3
+ return { name, component };
4
+ }
5
+ const ICON_CATALOG = [
6
+ {
7
+ label: "Navigation",
8
+ icons: [
9
+ entry("arrow-right", ArrowRight),
10
+ entry("arrow-left", ArrowLeft),
11
+ entry("arrow-up", ArrowUp),
12
+ entry("arrow-down", ArrowDown),
13
+ entry("arrow-up-right", ArrowUpRight),
14
+ entry("chevron-right", ChevronRight),
15
+ entry("chevron-left", ChevronLeft),
16
+ entry("chevron-down", ChevronDown),
17
+ entry("chevron-up", ChevronUp),
18
+ entry("chevrons-right", ChevronsRight),
19
+ entry("move-right", MoveRight),
20
+ entry("external-link", ExternalLink),
21
+ entry("corner-down-right", CornerDownRight),
22
+ entry("undo-2", Undo2),
23
+ entry("redo-2", Redo2)
24
+ ]
25
+ },
26
+ {
27
+ label: "Communication",
28
+ icons: [
29
+ entry("mail", Mail),
30
+ entry("phone", Phone),
31
+ entry("message-circle", MessageCircle),
32
+ entry("message-square", MessageSquare),
33
+ entry("send", Send),
34
+ entry("at-sign", AtSign),
35
+ entry("inbox", Inbox),
36
+ entry("bell", Bell),
37
+ entry("bell-ring", BellRing),
38
+ entry("megaphone", Megaphone),
39
+ entry("phone-call", PhoneCall),
40
+ entry("voicemail", Voicemail)
41
+ ]
42
+ },
43
+ {
44
+ label: "Social",
45
+ icons: [
46
+ entry("globe", Globe),
47
+ entry("share-2", Share2),
48
+ entry("link", Link),
49
+ entry("thumbs-up", ThumbsUp),
50
+ entry("heart", Heart),
51
+ entry("star", Star),
52
+ entry("users", Users),
53
+ entry("user", User),
54
+ entry("user-plus", UserPlus),
55
+ entry("user-check", UserCheck),
56
+ entry("hand-heart", HandHeart),
57
+ entry("handshake", Handshake)
58
+ ]
59
+ },
60
+ {
61
+ label: "Business",
62
+ icons: [
63
+ entry("briefcase", Briefcase),
64
+ entry("building-2", Building2),
65
+ entry("credit-card", CreditCard),
66
+ entry("dollar-sign", DollarSign),
67
+ entry("wallet", Wallet),
68
+ entry("receipt", Receipt),
69
+ entry("bar-chart-3", BarChart3),
70
+ entry("trending-up", TrendingUp),
71
+ entry("piggy-bank", PiggyBank),
72
+ entry("badge-dollar-sign", BadgeDollarSign),
73
+ entry("chart-pie", ChartPie),
74
+ entry("landmark", Landmark)
75
+ ]
76
+ },
77
+ {
78
+ label: "Media",
79
+ icons: [
80
+ entry("image", Image),
81
+ entry("video", Video),
82
+ entry("camera", Camera),
83
+ entry("play", Play),
84
+ entry("music", Music),
85
+ entry("file-text", FileText),
86
+ entry("book-open", BookOpen),
87
+ entry("pen-tool", PenTool),
88
+ entry("newspaper", Newspaper),
89
+ entry("mic", Mic),
90
+ entry("headphones", Headphones),
91
+ entry("film", Film)
92
+ ]
93
+ },
94
+ {
95
+ label: "Tech",
96
+ icons: [
97
+ entry("code", Code),
98
+ entry("terminal", Terminal),
99
+ entry("cpu", Cpu),
100
+ entry("database", Database),
101
+ entry("server", Server),
102
+ entry("cloud", Cloud),
103
+ entry("wifi", Wifi),
104
+ entry("smartphone", Smartphone),
105
+ entry("monitor", Monitor),
106
+ entry("laptop", Laptop),
107
+ entry("hard-drive", HardDrive),
108
+ entry("git-branch", GitBranch)
109
+ ]
110
+ },
111
+ {
112
+ label: "Status",
113
+ icons: [
114
+ entry("check", Check),
115
+ entry("check-circle", CheckCircle),
116
+ entry("circle-check", CircleCheck),
117
+ entry("x", X),
118
+ entry("x-circle", XCircle),
119
+ entry("alert-triangle", AlertTriangle),
120
+ entry("alert-circle", AlertCircle),
121
+ entry("info", Info),
122
+ entry("ban", Ban),
123
+ entry("loader", Loader),
124
+ entry("circle-alert", CircleAlert),
125
+ entry("shield-check", ShieldCheck)
126
+ ]
127
+ },
128
+ {
129
+ label: "UI",
130
+ icons: [
131
+ entry("search", Search),
132
+ entry("settings", Settings),
133
+ entry("menu", Menu),
134
+ entry("plus", Plus),
135
+ entry("minus", Minus),
136
+ entry("pencil", Pencil),
137
+ entry("trash-2", Trash2),
138
+ entry("copy", Copy),
139
+ entry("download", Download),
140
+ entry("upload", Upload),
141
+ entry("filter", Filter),
142
+ entry("eye", Eye),
143
+ entry("eye-off", EyeOff),
144
+ entry("lock", Lock),
145
+ entry("unlock", Unlock),
146
+ entry("more-horizontal", MoreHorizontal),
147
+ entry("grip", Grip)
148
+ ]
149
+ },
150
+ {
151
+ label: "Nature",
152
+ icons: [
153
+ entry("sun", Sun),
154
+ entry("moon", Moon),
155
+ entry("zap", Zap),
156
+ entry("flame", Flame),
157
+ entry("droplets", Droplets),
158
+ entry("leaf", Leaf),
159
+ entry("mountain", Mountain),
160
+ entry("compass", Compass),
161
+ entry("map-pin", MapPin),
162
+ entry("clock", Clock),
163
+ entry("calendar", Calendar),
164
+ entry("gift", Gift),
165
+ entry("tree-pine", TreePine),
166
+ entry("snowflake", Snowflake),
167
+ entry("cloud-rain", CloudRain)
168
+ ]
169
+ },
170
+ {
171
+ label: "Commerce",
172
+ icons: [
173
+ entry("shopping-cart", ShoppingCart),
174
+ entry("shopping-bag", ShoppingBag),
175
+ entry("tag", Tag),
176
+ entry("percent", Percent),
177
+ entry("store", Store),
178
+ entry("package", Package),
179
+ entry("truck", Truck),
180
+ entry("box", Box),
181
+ entry("badge-percent", BadgePercent),
182
+ entry("ticket", Ticket)
183
+ ]
184
+ }
185
+ ];
186
+ const ICON_MAP = new Map(
187
+ ICON_CATALOG.flatMap((cat) => cat.icons.map((e) => [e.name, e.component]))
188
+ );
189
+ new Set(ICON_MAP.keys());
190
+ export {
191
+ ICON_CATALOG,
192
+ ICON_MAP
193
+ };
@@ -1,4 +1,37 @@
1
+ /**
2
+ * Puck Section 样式系统
3
+ *
4
+ * 所有 section 组件共享一套可编辑的样式配置(背景、内边距、深色/浅色模式等)。
5
+ * 本文件是该样式系统的中枢,避免在 50+ 个组件中重复定义。
6
+ *
7
+ * 核心流程:
8
+ * createStylesField(extra) → 组件 index.tsx 的 fields.styles → Puck 编辑器右侧面板的样式控件
9
+ * createStylesDefaults(extra) → 组件 index.tsx 的 defaultProps.styles → 组件拖入画布时的初始样式
10
+ *
11
+ * 文件结构:
12
+ * 1. Types — 样式相关类型
13
+ * 2. Field 原子定义 — 每个编辑器控件的配置(padding / sectionStyle / backgroundColor …)
14
+ * 3. Fields & Defaults — 将原子 field 按层级组合(基础 / 带背景图)
15
+ * 4. 工厂函数 — createStylesField / createStylesDefaults
16
+ * 5. 各分类预设 — Banner / Hero / CTA … 每类导出 Interface + Field + Defaults 三件套
17
+ */
1
18
  import type { SectionStyle, OverlayStyle } from "../container";
19
+ export type PaddingLevel = "none" | "small" | "medium" | "large";
20
+ export type { SectionStyle, OverlayStyle };
21
+ /** 所有 section 通用的基础样式 */
22
+ export interface SectionBaseStyles {
23
+ sectionStyle?: SectionStyle;
24
+ backgroundColor?: string;
25
+ padding?: {
26
+ top?: PaddingLevel;
27
+ bottom?: PaddingLevel;
28
+ };
29
+ }
30
+ /** 带背景图的 section 样式,继承基础样式 */
31
+ export interface SectionImageStyles extends SectionBaseStyles {
32
+ backgroundImage?: string;
33
+ overlay?: OverlayStyle;
34
+ }
2
35
  export declare const paddingLevel: {
3
36
  readonly type: "select";
4
37
  readonly options: readonly [{
@@ -64,10 +97,6 @@ export declare const padding: {
64
97
  readonly exclude: true;
65
98
  };
66
99
  };
67
- export declare const paddingDefaults: {
68
- readonly top: "medium";
69
- readonly bottom: "medium";
70
- };
71
100
  export declare const sectionStyle: {
72
101
  readonly type: "select";
73
102
  readonly label: "Section Style";
@@ -91,6 +120,21 @@ export declare const sectionStyle: {
91
120
  readonly instructions: "Match the section's background tone: use 'dark' for dark/black backgrounds, 'muted' for gray/subtle backgrounds, 'inverted' for full contrast reversal. Default for standard light backgrounds.";
92
121
  };
93
122
  };
123
+ export declare const backgroundColor: {
124
+ readonly type: "text";
125
+ readonly label: "Background Color";
126
+ readonly ai: {
127
+ readonly instructions: "Set a custom background color in oklch format (e.g. 'oklch(0.2 0.05 260)'). Only use when sectionStyle is 'custom'.";
128
+ };
129
+ };
130
+ export declare const backgroundImage: {
131
+ readonly type: "text";
132
+ readonly label: "Background Image URL";
133
+ readonly ai: {
134
+ readonly instructions: "URL for a full-width background image behind the section.";
135
+ readonly stream: false;
136
+ };
137
+ };
94
138
  export declare const sectionOverlay: {
95
139
  readonly type: "select";
96
140
  readonly label: "Overlay";
@@ -111,31 +155,6 @@ export declare const sectionOverlay: {
111
155
  readonly instructions: "Use gradient overlays when the section has a background image that needs text contrast. Use noise for subtle texture.";
112
156
  };
113
157
  };
114
- export declare const backgroundColor: {
115
- readonly type: "text";
116
- readonly label: "Background Color";
117
- readonly ai: {
118
- readonly instructions: "Set a custom background color in oklch format (e.g. 'oklch(0.2 0.05 260)'). Only use when sectionStyle is 'custom'.";
119
- };
120
- };
121
- export declare const backgroundImage: {
122
- readonly type: "text";
123
- readonly label: "Background Image URL";
124
- readonly ai: {
125
- readonly instructions: "URL for a full-width background image behind the section.";
126
- readonly stream: false;
127
- };
128
- };
129
- export type PaddingLevel = "none" | "small" | "medium" | "large";
130
- export type { SectionStyle, OverlayStyle };
131
- export interface SectionBaseStyles {
132
- sectionStyle?: SectionStyle;
133
- backgroundColor?: string;
134
- padding?: {
135
- top?: PaddingLevel;
136
- bottom?: PaddingLevel;
137
- };
138
- }
139
158
  export declare const sectionBaseStyleFields: {
140
159
  readonly sectionStyle: {
141
160
  readonly type: "select";
@@ -214,16 +233,18 @@ export declare const sectionBaseStyleFields: {
214
233
  };
215
234
  };
216
235
  };
236
+ export declare const paddingDefaults: {
237
+ readonly top: "medium";
238
+ readonly bottom: "medium";
239
+ };
217
240
  export declare const sectionBaseStyleDefaults: {
241
+ sectionStyle: "default";
242
+ backgroundColor: string;
218
243
  padding: {
219
244
  readonly top: "medium";
220
245
  readonly bottom: "medium";
221
246
  };
222
247
  };
223
- export interface SectionImageStyles extends SectionBaseStyles {
224
- backgroundImage?: string;
225
- overlay?: OverlayStyle;
226
- }
227
248
  export declare const sectionImageStyleFields: {
228
249
  readonly backgroundImage: {
229
250
  readonly type: "text";
@@ -331,11 +352,20 @@ export declare const sectionImageStyleFields: {
331
352
  };
332
353
  };
333
354
  export declare const sectionImageStyleDefaults: {
355
+ backgroundImage: string;
356
+ overlay: "none";
357
+ sectionStyle: "default";
358
+ backgroundColor: string;
334
359
  padding: {
335
360
  readonly top: "medium";
336
361
  readonly bottom: "medium";
337
362
  };
338
363
  };
364
+ /**
365
+ * 生成 Puck `styles` object field。
366
+ * 始终包含 sectionBaseStyleFields(sectionStyle / backgroundColor / padding),
367
+ * 可通过 extraFields 追加分类特有的控件。
368
+ */
339
369
  export declare function createStylesField<T extends Record<string, unknown> = Record<string, never>>(extraFields?: T): {
340
370
  type: "object";
341
371
  label: string;
@@ -418,7 +448,14 @@ export declare function createStylesField<T extends Record<string, unknown> = Re
418
448
  };
419
449
  };
420
450
  };
451
+ /**
452
+ * 生成 Puck `styles` defaultProps。
453
+ * 始终包含 sectionBaseStyleDefaults 的全部 key,
454
+ * 可通过 extraDefaults 追加或覆盖分类特有的默认值。
455
+ */
421
456
  export declare function createStylesDefaults<T>(extraDefaults?: T): {
457
+ sectionStyle: "default";
458
+ backgroundColor: string;
422
459
  padding: {
423
460
  readonly top: "medium";
424
461
  readonly bottom: "medium";
@@ -512,6 +549,8 @@ export declare const bannerStylesField: {
512
549
  };
513
550
  };
514
551
  export declare const bannerStylesDefaults: {
552
+ sectionStyle: "default";
553
+ backgroundColor: string;
515
554
  padding: {
516
555
  readonly top: "medium";
517
556
  readonly bottom: "medium";
@@ -604,6 +643,8 @@ export declare const heroStylesField: {
604
643
  };
605
644
  };
606
645
  export declare const heroStylesDefaults: {
646
+ sectionStyle: "default";
647
+ backgroundColor: string;
607
648
  padding: {
608
649
  readonly top: "medium";
609
650
  readonly bottom: "medium";
@@ -695,6 +736,8 @@ export declare const ctaStylesField: {
695
736
  };
696
737
  };
697
738
  export declare const ctaStylesDefaults: {
739
+ sectionStyle: "default";
740
+ backgroundColor: string;
698
741
  padding: {
699
742
  readonly top: "medium";
700
743
  readonly bottom: "medium";
@@ -786,6 +829,8 @@ export declare const featureStylesField: {
786
829
  };
787
830
  };
788
831
  export declare const featureStylesDefaults: {
832
+ sectionStyle: "default";
833
+ backgroundColor: string;
789
834
  padding: {
790
835
  readonly top: "medium";
791
836
  readonly bottom: "medium";
@@ -877,6 +922,8 @@ export declare const faqStylesField: {
877
922
  };
878
923
  };
879
924
  export declare const faqStylesDefaults: {
925
+ sectionStyle: "default";
926
+ backgroundColor: string;
880
927
  padding: {
881
928
  readonly top: "medium";
882
929
  readonly bottom: "medium";
@@ -968,6 +1015,8 @@ export declare const galleryStylesField: {
968
1015
  };
969
1016
  };
970
1017
  export declare const galleryStylesDefaults: {
1018
+ sectionStyle: "default";
1019
+ backgroundColor: string;
971
1020
  padding: {
972
1021
  readonly top: "medium";
973
1022
  readonly bottom: "medium";
@@ -1059,6 +1108,8 @@ export declare const testimonialStylesField: {
1059
1108
  };
1060
1109
  };
1061
1110
  export declare const testimonialStylesDefaults: {
1111
+ sectionStyle: "default";
1112
+ backgroundColor: string;
1062
1113
  padding: {
1063
1114
  readonly top: "medium";
1064
1115
  readonly bottom: "medium";
@@ -1150,6 +1201,8 @@ export declare const showcaseStylesField: {
1150
1201
  };
1151
1202
  };
1152
1203
  export declare const showcaseStylesDefaults: {
1204
+ sectionStyle: "default";
1205
+ backgroundColor: string;
1153
1206
  padding: {
1154
1207
  readonly top: "medium";
1155
1208
  readonly bottom: "medium";
@@ -1241,6 +1294,8 @@ export declare const textStylesField: {
1241
1294
  };
1242
1295
  };
1243
1296
  export declare const textStylesDefaults: {
1297
+ sectionStyle: "default";
1298
+ backgroundColor: string;
1244
1299
  padding: {
1245
1300
  readonly top: "medium";
1246
1301
  readonly bottom: "medium";
@@ -1332,6 +1387,8 @@ export declare const contactStylesField: {
1332
1387
  };
1333
1388
  };
1334
1389
  export declare const contactStylesDefaults: {
1390
+ sectionStyle: "default";
1391
+ backgroundColor: string;
1335
1392
  padding: {
1336
1393
  readonly top: "medium";
1337
1394
  readonly bottom: "medium";
@@ -1425,6 +1482,8 @@ export declare const locationStylesField: {
1425
1482
  };
1426
1483
  };
1427
1484
  export declare const locationStylesDefaults: {
1485
+ sectionStyle: "default";
1486
+ backgroundColor: string;
1428
1487
  padding: {
1429
1488
  readonly top: "medium";
1430
1489
  readonly bottom: "medium";
@@ -1518,6 +1577,8 @@ export declare const footerStylesField: {
1518
1577
  };
1519
1578
  };
1520
1579
  export declare const footerStylesDefaults: {
1580
+ sectionStyle: "default";
1581
+ backgroundColor: string;
1521
1582
  padding: {
1522
1583
  readonly top: "medium";
1523
1584
  readonly bottom: "medium";
@@ -1606,6 +1667,8 @@ export declare const headerStylesField: {
1606
1667
  };
1607
1668
  };
1608
1669
  export declare const headerStylesDefaults: {
1670
+ sectionStyle: "default";
1671
+ backgroundColor: string;
1609
1672
  padding: {
1610
1673
  readonly top: "medium";
1611
1674
  readonly bottom: "medium";
@@ -1694,6 +1757,8 @@ export declare const metricsStylesField: {
1694
1757
  };
1695
1758
  };
1696
1759
  export declare const metricsStylesDefaults: {
1760
+ sectionStyle: "default";
1761
+ backgroundColor: string;
1697
1762
  padding: {
1698
1763
  readonly top: "medium";
1699
1764
  readonly bottom: "medium";
@@ -1782,6 +1847,8 @@ export declare const pricingStylesField: {
1782
1847
  };
1783
1848
  };
1784
1849
  export declare const pricingStylesDefaults: {
1850
+ sectionStyle: "default";
1851
+ backgroundColor: string;
1785
1852
  padding: {
1786
1853
  readonly top: "medium";
1787
1854
  readonly bottom: "medium";
@@ -1870,6 +1937,8 @@ export declare const teamStylesField: {
1870
1937
  };
1871
1938
  };
1872
1939
  export declare const teamStylesDefaults: {
1940
+ sectionStyle: "default";
1941
+ backgroundColor: string;
1873
1942
  padding: {
1874
1943
  readonly top: "medium";
1875
1944
  readonly bottom: "medium";