@asheeui/puck 0.0.0-stage → 2.3.1

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 (154) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +10 -0
  3. package/README.md +126 -3
  4. package/dist/index.d.ts +22 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +23 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/index.native.d.ts +22 -0
  9. package/dist/index.native.d.ts.map +1 -0
  10. package/dist/index.native.js +22 -0
  11. package/dist/index.native.js.map +1 -0
  12. package/dist/native/blocks/content.d.ts +19 -0
  13. package/dist/native/blocks/content.d.ts.map +1 -0
  14. package/dist/native/blocks/content.js +28 -0
  15. package/dist/native/blocks/content.js.map +1 -0
  16. package/dist/native/blocks/layout.d.ts +42 -0
  17. package/dist/native/blocks/layout.d.ts.map +1 -0
  18. package/dist/native/blocks/layout.js +33 -0
  19. package/dist/native/blocks/layout.js.map +1 -0
  20. package/dist/native/blocks/navigation.d.ts +19 -0
  21. package/dist/native/blocks/navigation.d.ts.map +1 -0
  22. package/dist/native/blocks/navigation.js +38 -0
  23. package/dist/native/blocks/navigation.js.map +1 -0
  24. package/dist/native/blocks/sections.d.ts +30 -0
  25. package/dist/native/blocks/sections.d.ts.map +1 -0
  26. package/dist/native/blocks/sections.js +60 -0
  27. package/dist/native/blocks/sections.js.map +1 -0
  28. package/dist/native/blocks/utility.d.ts +13 -0
  29. package/dist/native/blocks/utility.d.ts.map +1 -0
  30. package/dist/native/blocks/utility.js +18 -0
  31. package/dist/native/blocks/utility.js.map +1 -0
  32. package/dist/native/config.d.ts +19 -0
  33. package/dist/native/config.d.ts.map +1 -0
  34. package/dist/native/config.js +45 -0
  35. package/dist/native/config.js.map +1 -0
  36. package/dist/native/index.d.ts +18 -0
  37. package/dist/native/index.d.ts.map +1 -0
  38. package/dist/native/index.js +18 -0
  39. package/dist/native/index.js.map +1 -0
  40. package/dist/native/render.d.ts +39 -0
  41. package/dist/native/render.d.ts.map +1 -0
  42. package/dist/native/render.js +71 -0
  43. package/dist/native/render.js.map +1 -0
  44. package/dist/native/root.d.ts +21 -0
  45. package/dist/native/root.d.ts.map +1 -0
  46. package/dist/native/root.js +28 -0
  47. package/dist/native/root.js.map +1 -0
  48. package/dist/shared/adapters.d.ts +52 -0
  49. package/dist/shared/adapters.d.ts.map +1 -0
  50. package/dist/shared/adapters.js +57 -0
  51. package/dist/shared/adapters.js.map +1 -0
  52. package/dist/shared/blocks/content.d.ts +42 -0
  53. package/dist/shared/blocks/content.d.ts.map +1 -0
  54. package/dist/shared/blocks/content.js +44 -0
  55. package/dist/shared/blocks/content.js.map +1 -0
  56. package/dist/shared/blocks/index.d.ts +42 -0
  57. package/dist/shared/blocks/index.d.ts.map +1 -0
  58. package/dist/shared/blocks/index.js +81 -0
  59. package/dist/shared/blocks/index.js.map +1 -0
  60. package/dist/shared/blocks/layout.d.ts +52 -0
  61. package/dist/shared/blocks/layout.d.ts.map +1 -0
  62. package/dist/shared/blocks/layout.js +51 -0
  63. package/dist/shared/blocks/layout.js.map +1 -0
  64. package/dist/shared/blocks/navigation.d.ts +74 -0
  65. package/dist/shared/blocks/navigation.d.ts.map +1 -0
  66. package/dist/shared/blocks/navigation.js +86 -0
  67. package/dist/shared/blocks/navigation.js.map +1 -0
  68. package/dist/shared/blocks/sections.d.ts +142 -0
  69. package/dist/shared/blocks/sections.d.ts.map +1 -0
  70. package/dist/shared/blocks/sections.js +166 -0
  71. package/dist/shared/blocks/sections.js.map +1 -0
  72. package/dist/shared/blocks/utility.d.ts +31 -0
  73. package/dist/shared/blocks/utility.d.ts.map +1 -0
  74. package/dist/shared/blocks/utility.js +36 -0
  75. package/dist/shared/blocks/utility.js.map +1 -0
  76. package/dist/shared/fields.d.ts +103 -0
  77. package/dist/shared/fields.d.ts.map +1 -0
  78. package/dist/shared/fields.js +162 -0
  79. package/dist/shared/fields.js.map +1 -0
  80. package/dist/shared/index.d.ts +14 -0
  81. package/dist/shared/index.d.ts.map +1 -0
  82. package/dist/shared/index.js +14 -0
  83. package/dist/shared/index.js.map +1 -0
  84. package/dist/shared/types.d.ts +235 -0
  85. package/dist/shared/types.d.ts.map +1 -0
  86. package/dist/shared/types.js +20 -0
  87. package/dist/shared/types.js.map +1 -0
  88. package/dist/web/blocks/content.d.ts +10 -0
  89. package/dist/web/blocks/content.d.ts.map +1 -0
  90. package/dist/web/blocks/content.js +28 -0
  91. package/dist/web/blocks/content.js.map +1 -0
  92. package/dist/web/blocks/layout.d.ts +27 -0
  93. package/dist/web/blocks/layout.d.ts.map +1 -0
  94. package/dist/web/blocks/layout.js +28 -0
  95. package/dist/web/blocks/layout.js.map +1 -0
  96. package/dist/web/blocks/navigation.d.ts +10 -0
  97. package/dist/web/blocks/navigation.d.ts.map +1 -0
  98. package/dist/web/blocks/navigation.js +38 -0
  99. package/dist/web/blocks/navigation.js.map +1 -0
  100. package/dist/web/blocks/sections.d.ts +22 -0
  101. package/dist/web/blocks/sections.d.ts.map +1 -0
  102. package/dist/web/blocks/sections.js +60 -0
  103. package/dist/web/blocks/sections.js.map +1 -0
  104. package/dist/web/blocks/utility.d.ts +6 -0
  105. package/dist/web/blocks/utility.d.ts.map +1 -0
  106. package/dist/web/blocks/utility.js +19 -0
  107. package/dist/web/blocks/utility.js.map +1 -0
  108. package/dist/web/config.d.ts +65 -0
  109. package/dist/web/config.d.ts.map +1 -0
  110. package/dist/web/config.js +35 -0
  111. package/dist/web/config.js.map +1 -0
  112. package/dist/web/index.d.ts +19 -0
  113. package/dist/web/index.d.ts.map +1 -0
  114. package/dist/web/index.js +20 -0
  115. package/dist/web/index.js.map +1 -0
  116. package/dist/web/page.d.ts +24 -0
  117. package/dist/web/page.d.ts.map +1 -0
  118. package/dist/web/page.js +27 -0
  119. package/dist/web/page.js.map +1 -0
  120. package/dist/web/root.d.ts +9 -0
  121. package/dist/web/root.d.ts.map +1 -0
  122. package/dist/web/root.js +26 -0
  123. package/dist/web/root.js.map +1 -0
  124. package/package.json +120 -3
  125. package/src/index.native.ts +22 -0
  126. package/src/index.ts +24 -0
  127. package/src/native/blocks/content.tsx +61 -0
  128. package/src/native/blocks/layout.tsx +72 -0
  129. package/src/native/blocks/navigation.tsx +71 -0
  130. package/src/native/blocks/sections.tsx +174 -0
  131. package/src/native/blocks/utility.tsx +27 -0
  132. package/src/native/config.tsx +66 -0
  133. package/src/native/index.ts +18 -0
  134. package/src/native/render.tsx +113 -0
  135. package/src/native/root.tsx +31 -0
  136. package/src/shared/adapters.ts +82 -0
  137. package/src/shared/blocks/content.ts +80 -0
  138. package/src/shared/blocks/index.ts +100 -0
  139. package/src/shared/blocks/layout.ts +82 -0
  140. package/src/shared/blocks/navigation.ts +168 -0
  141. package/src/shared/blocks/sections.ts +322 -0
  142. package/src/shared/blocks/utility.ts +65 -0
  143. package/src/shared/fields.ts +199 -0
  144. package/src/shared/index.ts +14 -0
  145. package/src/shared/types.ts +278 -0
  146. package/src/web/blocks/content.tsx +55 -0
  147. package/src/web/blocks/layout.tsx +73 -0
  148. package/src/web/blocks/navigation.tsx +72 -0
  149. package/src/web/blocks/sections.tsx +177 -0
  150. package/src/web/blocks/utility.tsx +31 -0
  151. package/src/web/config.tsx +141 -0
  152. package/src/web/index.ts +21 -0
  153. package/src/web/page.tsx +40 -0
  154. package/src/web/root.tsx +34 -0
@@ -0,0 +1,235 @@
1
+ /**
2
+ * The vocabulary the two halves of the Puck integration share.
3
+ *
4
+ * A page composed in a visual builder has to mean the same thing on the web and on a
5
+ * device. What makes that true is that the two renderers read one description of a
6
+ * block: the same fields, the same default values, the same label and the same
7
+ * category. Those descriptions live here, and the types in this module are what the
8
+ * shared block specs and both renderers are written against.
9
+ *
10
+ * The module is deliberately free of two dependencies rather than one. It imports no
11
+ * renderer — that is what makes it shared — and it imports nothing from
12
+ * `@puckeditor/core`, because that package is a DOM editor and the native entry has to
13
+ * be loadable, and type-checkable, without it. The field types below are this
14
+ * package's own, structurally the field types a builder understands: `type` is the
15
+ * discriminator and the rest is the data a form control needs. The web registry
16
+ * asserts once, where it assembles its `Config`, that they describe the same fields —
17
+ * which is the single place the two descriptions meet.
18
+ */
19
+ import type { ReactNode } from "react";
20
+ /**
21
+ * A single line of text.
22
+ */
23
+ export interface AsheeTextField {
24
+ /** The builder draws this as a text input. */
25
+ type: "text";
26
+ /** Label shown in the builder. */
27
+ label: string;
28
+ /** Placeholder shown in the empty field. */
29
+ placeholder?: string;
30
+ }
31
+ /**
32
+ * Several lines of text.
33
+ */
34
+ export interface AsheeTextareaField {
35
+ /** The builder draws this as a text area. */
36
+ type: "textarea";
37
+ /** Label shown in the builder. */
38
+ label: string;
39
+ /** Placeholder shown in the empty field. */
40
+ placeholder?: string;
41
+ }
42
+ /**
43
+ * One of a fixed set of values.
44
+ */
45
+ export interface AsheeSelectField {
46
+ /** The builder draws this as a select control. */
47
+ type: "select";
48
+ /** Label shown in the builder. */
49
+ label: string;
50
+ /** The values the field offers. */
51
+ options: Array<{
52
+ label: string;
53
+ value: string;
54
+ }>;
55
+ }
56
+ /**
57
+ * One of a small set of values, drawn as a radio group.
58
+ *
59
+ * A radio field is what a boolean is expressed with, because a builder's radio
60
+ * control holds the value itself rather than a string spelling of it.
61
+ */
62
+ export interface AsheeRadioField {
63
+ /** The builder draws this as a radio group. */
64
+ type: "radio";
65
+ /** Label shown in the builder. */
66
+ label: string;
67
+ /** The values the field offers. */
68
+ options: Array<{
69
+ label: string;
70
+ value: string | number | boolean;
71
+ }>;
72
+ }
73
+ /**
74
+ * A drop zone: where the builder lets a reader put other blocks.
75
+ */
76
+ export interface AsheeSlotField {
77
+ /** The builder draws this as a drop zone. */
78
+ type: "slot";
79
+ /** Label shown in the builder. */
80
+ label: string;
81
+ }
82
+ /**
83
+ * A repeatable list of items, with its item type erased.
84
+ *
85
+ * This is the form the field union holds: a registry keeps fields of different item
86
+ * shapes in one object, so the collection's type has to state what every list has in
87
+ * common — the nested fields, the starting row and the summary — without naming an item.
88
+ * `AsheeArrayField` is the form a block writes, where the item type is known.
89
+ */
90
+ export interface AsheeArrayFieldBase {
91
+ /** The builder draws this as a list with an add control. */
92
+ type: "array";
93
+ /** Label shown in the builder. */
94
+ label: string;
95
+ /** The fields of one item. */
96
+ arrayFields: Record<string, AsheeField>;
97
+ /** The item a new row starts as. */
98
+ defaultItemProps?: unknown;
99
+ /** The one line that summarises an item in the closed list. */
100
+ getItemSummary?: (item: never) => string;
101
+ }
102
+ /**
103
+ * A repeatable list of items.
104
+ *
105
+ * @typeParam Item - The shape of one item, which `arrayFields` describes field by
106
+ * field.
107
+ */
108
+ export interface AsheeArrayField<Item = Record<string, unknown>> extends Omit<AsheeArrayFieldBase, "defaultItemProps" | "getItemSummary"> {
109
+ /** The item a new row starts as. */
110
+ defaultItemProps?: Partial<Item>;
111
+ /** The one line that summarises an item in the closed list. */
112
+ getItemSummary?: (item: Item) => string;
113
+ }
114
+ /**
115
+ * A fixed group of fields.
116
+ */
117
+ export interface AsheeObjectField {
118
+ /** The builder draws this as a nested group of controls. */
119
+ type: "object";
120
+ /** Label shown in the builder. */
121
+ label: string;
122
+ /** The fields of the group. */
123
+ objectFields: Record<string, AsheeField>;
124
+ }
125
+ /**
126
+ * Every field type the AsheeUI blocks use.
127
+ */
128
+ export type AsheeField = AsheeTextField | AsheeTextareaField | AsheeSelectField | AsheeRadioField | AsheeSlotField | AsheeArrayFieldBase | AsheeObjectField;
129
+ /**
130
+ * A block's visual configuration, stated once for both renderers.
131
+ *
132
+ * The three members are exactly the part of a block that cannot differ between
133
+ * platforms: a label a builder shows, the fields it fills in, and the value it starts
134
+ * with. The render function is deliberately absent — that is the one part the platform
135
+ * owns — and the two platform registries add it.
136
+ *
137
+ * `fields` is keyed by name rather than tied to the prop type. A drop zone names a key
138
+ * whose value is not part of the component's own props on either platform (the web
139
+ * passes a `SlotComponent`, the platform passes rendered children), so the linked form
140
+ * would be untruthful for exactly the blocks where the two differ most.
141
+ *
142
+ * @typeParam TProps - The props the block's render function receives.
143
+ */
144
+ export interface AsheeBlockSpec<TProps> {
145
+ /** Name of the block in the builder's block list. */
146
+ label: string;
147
+ /** The fields the builder fills in. */
148
+ fields: Record<string, AsheeField>;
149
+ /** The value a new block starts with. */
150
+ defaultProps: Partial<TProps>;
151
+ }
152
+ /**
153
+ * A block as a renderer sees it.
154
+ *
155
+ * The render function returns a plain React node rather than a builder's render
156
+ * result, because the same shape has to describe a block to two renderers: the web
157
+ * draws it into a DOM inside the editor's preview and inside a published page, and the
158
+ * platform draws it into a native view when it renders a stored page. On the platform
159
+ * it is handed the block's props with every drop zone already resolved to a rendered
160
+ * node, because a native screen has no editor to resolve one for it.
161
+ *
162
+ * @typeParam TProps - The props the render function receives.
163
+ */
164
+ export interface AsheeBlock<TProps> {
165
+ /** Name of the block in the builder's block list. */
166
+ label: string;
167
+ /** The fields the block declares, read to find its drop zones. */
168
+ fields: Record<string, AsheeField>;
169
+ /** The value the block resolves when a stored page omits a key. */
170
+ defaultProps?: Partial<TProps>;
171
+ /** Draw the block. */
172
+ render: (props: TProps) => ReactNode;
173
+ }
174
+ /**
175
+ * One category of the builder's block list.
176
+ */
177
+ export interface AsheePuckCategoryDefinition {
178
+ /** Heading the builder shows for the category. */
179
+ title: string;
180
+ /** The blocks filed under it. */
181
+ components: string[];
182
+ }
183
+ /**
184
+ * The categories a block can be filed under, by key.
185
+ */
186
+ export type AsheePuckCategories = Record<string, AsheePuckCategoryDefinition>;
187
+ /**
188
+ * The page shell a stored page renders into.
189
+ */
190
+ export interface AsheePuckRootProps {
191
+ /** The page the builder composed. */
192
+ children?: ReactNode;
193
+ }
194
+ /**
195
+ * The native registry: every block, the categories they are filed under, and the page
196
+ * shell a stored page renders into.
197
+ */
198
+ export interface AsheeNativePuckConfig {
199
+ /** The blocks, by the name a stored page names them with. */
200
+ components: Record<string, AsheeBlock<never>>;
201
+ /** The categories the blocks are filed under. */
202
+ categories: AsheePuckCategories;
203
+ /** The page shell every stored page renders into. */
204
+ root: AsheeBlock<AsheePuckRootProps>;
205
+ }
206
+ /**
207
+ * One block in a stored page.
208
+ *
209
+ * The shape is the builder's own serialized document, and it is described here rather
210
+ * than imported so that reading a stored page needs nothing from the editor. A drop
211
+ * zone's children are stored under the zone's own key in `props`, which is why `props`
212
+ * is an open record: the renderer reads a zone by name.
213
+ */
214
+ export interface AsheePuckBlockData {
215
+ /** The block's name, which is the key it is registered under. */
216
+ type: string;
217
+ /** The value the editor stored for the block, including its drop zones. */
218
+ props: Record<string, unknown>;
219
+ }
220
+ /**
221
+ * A stored page, as the editor publishes it.
222
+ *
223
+ * Only the members a renderer reads are stated. A published document carries more — a
224
+ * history, a set of zones — and a renderer that ignored them would be right to: this
225
+ * is the contract a page is *rendered* from.
226
+ */
227
+ export interface AsheePuckData {
228
+ /** The page's outer value, which the page shell may read. */
229
+ root?: {
230
+ props?: Record<string, unknown>;
231
+ };
232
+ /** The blocks of the page, in order. */
233
+ content: AsheePuckBlockData[];
234
+ }
235
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IAEb,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IAEd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,6CAA6C;IAC7C,IAAI,EAAE,UAAU,CAAC;IAEjB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IAEd,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IA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AAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAE9C,iDAAiD;IACjD,UAAU,EAAE,mBAAmB,CAAC;IAEhC,qDAAqD;IACrD,IAAI,EAAE,UAAU,CAAC,kBAAkB,CAAC,CAAC;CACtC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;IAEb,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,6DAA6D;IAC7D,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC;IAE3C,wCAAwC;IACxC,OAAO,EAAE,kBAAkB,EAAE,CAAC;CAC/B"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The vocabulary the two halves of the Puck integration share.
3
+ *
4
+ * A page composed in a visual builder has to mean the same thing on the web and on a
5
+ * device. What makes that true is that the two renderers read one description of a
6
+ * block: the same fields, the same default values, the same label and the same
7
+ * category. Those descriptions live here, and the types in this module are what the
8
+ * shared block specs and both renderers are written against.
9
+ *
10
+ * The module is deliberately free of two dependencies rather than one. It imports no
11
+ * renderer — that is what makes it shared — and it imports nothing from
12
+ * `@puckeditor/core`, because that package is a DOM editor and the native entry has to
13
+ * be loadable, and type-checkable, without it. The field types below are this
14
+ * package's own, structurally the field types a builder understands: `type` is the
15
+ * discriminator and the rest is the data a form control needs. The web registry
16
+ * asserts once, where it assembles its `Config`, that they describe the same fields —
17
+ * which is the single place the two descriptions meet.
18
+ */
19
+ export {};
20
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -0,0 +1,10 @@
1
+ import type { AsheeBlock, HeadingBlockProps, TextBlockProps } from "../../shared";
2
+ /**
3
+ * A section heading with an optional eyebrow and description.
4
+ */
5
+ export declare const headingBlock: AsheeBlock<HeadingBlockProps>;
6
+ /**
7
+ * A paragraph of body text.
8
+ */
9
+ export declare const textBlock: AsheeBlock<TextBlockProps>;
10
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/web/blocks/content.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,cAAc,EACf,MAAM,cAAc,CAAC;AAGtB;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,iBAAiB,CAatD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,cAAc,CAahD,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * The web content blocks.
5
+ *
6
+ * Each block is the framework component plus the shared spec: the label, the fields and
7
+ * the defaults come from `src/shared`, and only the drawing is written here. That is
8
+ * what keeps the editor's promise — a block cannot describe one thing and render
9
+ * another — while letting each platform draw with its own components.
10
+ */
11
+ import { Section, Typography } from "@asheeui/web";
12
+ import { SectionHeading } from "@asheeui/web/section-kit";
13
+ import { HEADING_SPEC, TEXT_SPEC } from "../../shared";
14
+ /**
15
+ * A section heading with an optional eyebrow and description.
16
+ */
17
+ export const headingBlock = {
18
+ ...HEADING_SPEC,
19
+ render: ({ eyebrow, title, description, align }) => (_jsx(Section, { spacing: "md", contained: true, children: _jsx(SectionHeading, { eyebrow: eyebrow || undefined, title: title || undefined, description: description || undefined, align: align ?? "start", size: "lg" }) })),
20
+ };
21
+ /**
22
+ * A paragraph of body text.
23
+ */
24
+ export const textBlock = {
25
+ ...TEXT_SPEC,
26
+ render: ({ text, align }) => (_jsx(Section, { spacing: "sm", contained: true, children: _jsx(Typography, { role: "body-lg", className: align === "center" ? "mx-auto max-w-2xl text-center" : "max-w-2xl", children: text }) })),
27
+ };
28
+ //# sourceMappingURL=content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/web/blocks/content.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD,GAAG,YAAY;IACf,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAClD,KAAC,OAAO,IAAC,OAAO,EAAC,IAAI,EAAC,SAAS,kBAC7B,KAAC,cAAc,IACb,OAAO,EAAE,OAAO,IAAI,SAAS,EAC7B,KAAK,EAAE,KAAK,IAAI,SAAS,EACzB,WAAW,EAAE,WAAW,IAAI,SAAS,EACrC,KAAK,EAAE,KAAK,IAAI,OAAO,EACvB,IAAI,EAAC,IAAI,GACT,GACM,CACX;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAA+B;IACnD,GAAG,SAAS;IACZ,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC3B,KAAC,OAAO,IAAC,OAAO,EAAC,IAAI,EAAC,SAAS,kBAC7B,KAAC,UAAU,IACT,IAAI,EAAC,SAAS,EACd,SAAS,EACP,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,WAAW,YAEnE,IAAI,GACM,GACL,CACX;CACF,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { SlotComponent } from "@puckeditor/core";
2
+ import type { AsheeBlock, ColumnsBandProps, SectionBandProps } from "../../shared";
3
+ /**
4
+ * The props of the band block.
5
+ */
6
+ export type SectionBlockProps = SectionBandProps & {
7
+ /** Content dropped into the band. */
8
+ content?: SlotComponent;
9
+ };
10
+ /**
11
+ * A band with its own vertical rhythm and background.
12
+ */
13
+ export declare const sectionBlock: AsheeBlock<SectionBlockProps>;
14
+ /**
15
+ * The props of the two-column block.
16
+ */
17
+ export type ColumnsBlockProps = ColumnsBandProps & {
18
+ /** Content of the first column. */
19
+ start?: SlotComponent;
20
+ /** Content of the second column. */
21
+ end?: SlotComponent;
22
+ };
23
+ /**
24
+ * Two columns that stack on a narrow screen.
25
+ */
26
+ export declare const columnsBlock: AsheeBlock<ColumnsBlockProps>;
27
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/web/blocks/layout.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAGtB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IACjD,qCAAqC;IACrC,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,iBAAiB,CAUtD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IACjD,mCAAmC;IACnC,KAAK,CAAC,EAAE,aAAa,CAAC;IAEtB,oCAAoC;IACpC,GAAG,CAAC,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,iBAAiB,CActD,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * The web layout blocks.
5
+ *
6
+ * A band and a two-column arrangement. Both are the only blocks whose props hold a
7
+ * drop zone, so both are written against the builder's own `SlotComponent`: the
8
+ * editor drops a component into the field and the block places it. The fields and the
9
+ * defaults still come from `src/shared`, so the platform offers the same two zones.
10
+ */
11
+ import { Section } from "@asheeui/web";
12
+ import { cn } from "@asheeui/web";
13
+ import { COLUMN_RATIO_CLASS, COLUMNS_SPEC, SECTION_SPEC } from "../../shared";
14
+ /**
15
+ * A band with its own vertical rhythm and background.
16
+ */
17
+ export const sectionBlock = {
18
+ ...SECTION_SPEC,
19
+ render: ({ spacing, background, content: Content }) => (_jsx(Section, { spacing: spacing ?? "lg", background: background ?? "none", contained: true, children: Content ? _jsx(Content, {}) : null })),
20
+ };
21
+ /**
22
+ * Two columns that stack on a narrow screen.
23
+ */
24
+ export const columnsBlock = {
25
+ ...COLUMNS_SPEC,
26
+ render: ({ ratio, spacing, start: Start, end: End }) => (_jsx(Section, { spacing: spacing ?? "lg", contained: true, children: _jsxs("div", { className: cn("grid grid-cols-1 gap-8", COLUMN_RATIO_CLASS[ratio ?? "50/50"]), children: [_jsx("div", { className: "min-w-0", children: Start ? _jsx(Start, {}) : null }), _jsx("div", { className: "min-w-0", children: End ? _jsx(End, {}) : null })] }) })),
27
+ };
28
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/web/blocks/layout.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAMlC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAU9E;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD,GAAG,YAAY;IACf,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACrD,KAAC,OAAO,IACN,OAAO,EAAE,OAAO,IAAI,IAAI,EACxB,UAAU,EAAE,UAAU,IAAI,MAAM,EAChC,SAAS,kBACR,OAAO,CAAC,CAAC,CAAC,KAAC,OAAO,KAAG,CAAC,CAAC,CAAC,IAAI,GACrB,CACX;CACF,CAAC;AAaF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD,GAAG,YAAY;IACf,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CACtD,KAAC,OAAO,IAAC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,SAAS,kBAC1C,eACE,SAAS,EAAE,EAAE,CACX,wBAAwB,EACxB,kBAAkB,CAAC,KAAK,IAAI,OAAO,CAAC,CACrC,aACD,cAAK,SAAS,EAAC,SAAS,YAAE,KAAK,CAAC,CAAC,CAAC,KAAC,KAAK,KAAG,CAAC,CAAC,CAAC,IAAI,GAAO,EACzD,cAAK,SAAS,EAAC,SAAS,YAAE,GAAG,CAAC,CAAC,CAAC,KAAC,GAAG,KAAG,CAAC,CAAC,CAAC,IAAI,GAAO,IACjD,GACE,CACX;CACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { AsheeBlock, FooterBlockProps, NavbarBlockProps } from "../../shared";
2
+ /**
3
+ * The navigation bar of a page.
4
+ */
5
+ export declare const navbarBlock: AsheeBlock<NavbarBlockProps>;
6
+ /**
7
+ * The footer of a page.
8
+ */
9
+ export declare const footerBlock: AsheeBlock<FooterBlockProps>;
10
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/web/blocks/navigation.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAGtB;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,gBAAgB,CA0BpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,gBAAgB,CAiBpD,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * The web navigation blocks.
5
+ *
6
+ * A bar and a footer, with the navigation as data: link lists a non-developer can edit
7
+ * and no application state. The bar's action region is the framework's own action
8
+ * group, so a configured action renders exactly as a hand-written button does and
9
+ * inherits the same cascade. The fields and the defaults come from `src/shared`.
10
+ */
11
+ import { Footer, Navbar } from "@asheeui/web";
12
+ import { ActionGroup } from "@asheeui/web/section-kit";
13
+ import { FOOTER_SPEC, NAVBAR_SPEC, toAction } from "../../shared";
14
+ /**
15
+ * The navigation bar of a page.
16
+ */
17
+ export const navbarBlock = {
18
+ ...NAVBAR_SPEC,
19
+ render: ({ brand, brandHref, align, links, primaryAction, secondaryAction, }) => (_jsx(Navbar, { brand: brand || undefined, brandHref: brandHref || undefined, align: align ?? "center", links: (links ?? []).map((link) => ({
20
+ label: link.label ?? "",
21
+ href: link.href,
22
+ })), actions: _jsx(ActionGroup, { primaryAction: toAction(primaryAction), secondaryAction: toAction(secondaryAction) }) })),
23
+ };
24
+ /**
25
+ * The footer of a page.
26
+ */
27
+ export const footerBlock = {
28
+ ...FOOTER_SPEC,
29
+ render: ({ brand, description, groups, copyright }) => (_jsx(Footer, { brand: brand || undefined, description: description || undefined, copyright: copyright || undefined, groups: (groups ?? []).map((group, index) => ({
30
+ id: index,
31
+ title: group.title ?? "Links",
32
+ links: (group.links ?? []).map((item) => ({
33
+ label: item.label ?? "",
34
+ href: item.href,
35
+ })),
36
+ })) })),
37
+ };
38
+ //# sourceMappingURL=navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../src/web/blocks/navigation.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAMvD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAElE;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAiC;IACvD,GAAG,WAAW;IACd,MAAM,EAAE,CAAC,EACP,KAAK,EACL,SAAS,EACT,KAAK,EACL,KAAK,EACL,aAAa,EACb,eAAe,GAChB,EAAE,EAAE,CAAC,CACJ,KAAC,MAAM,IACL,KAAK,EAAE,KAAK,IAAI,SAAS,EACzB,SAAS,EAAE,SAAS,IAAI,SAAS,EACjC,KAAK,EAAE,KAAK,IAAI,QAAQ,EACxB,KAAK,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAClC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC,CAAC,EACH,OAAO,EACL,KAAC,WAAW,IACV,aAAa,EAAE,QAAQ,CAAC,aAAa,CAAC,EACtC,eAAe,EAAE,QAAQ,CAAC,eAAe,CAAC,GAC1C,GAEJ,CACH;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAiC;IACvD,GAAG,WAAW;IACd,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CACrD,KAAC,MAAM,IACL,KAAK,EAAE,KAAK,IAAI,SAAS,EACzB,WAAW,EAAE,WAAW,IAAI,SAAS,EACrC,SAAS,EAAE,SAAS,IAAI,SAAS,EACjC,MAAM,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;YAC5C,EAAE,EAAE,KAAK;YACT,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,OAAO;YAC7B,KAAK,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBACxC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;gBACvB,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,CAAC,CAAC;SACJ,CAAC,CAAC,GACH,CACH;CACF,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { AsheeBlock, CtaBlockProps, FeatureGridBlockProps, HeroBlockProps, PricingCardBlockProps, TestimonialsBlockProps } from "../../shared";
2
+ /**
3
+ * The leading statement of a page.
4
+ */
5
+ export declare const heroBlock: AsheeBlock<HeroBlockProps>;
6
+ /**
7
+ * The closing call to action of a page.
8
+ */
9
+ export declare const ctaBlock: AsheeBlock<CtaBlockProps>;
10
+ /**
11
+ * A band of features laid out in a responsive grid.
12
+ */
13
+ export declare const featureGridBlock: AsheeBlock<FeatureGridBlockProps>;
14
+ /**
15
+ * A band of attributed customer quotes.
16
+ */
17
+ export declare const testimonialsBlock: AsheeBlock<TestimonialsBlockProps>;
18
+ /**
19
+ * One plan in a pricing table.
20
+ */
21
+ export declare const pricingCardBlock: AsheeBlock<PricingCardBlockProps>;
22
+ //# sourceMappingURL=sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../../src/web/blocks/sections.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,cAAc,CAAC;AAWtB;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,UAAU,CAAC,cAAc,CAuBhD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,UAAU,CAAC,aAAa,CAuB9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,qBAAqB,CA2B9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,sBAAsB,CAgBhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,qBAAqB,CA6B9D,CAAC"}
@@ -0,0 +1,60 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * The web marketing section blocks.
5
+ *
6
+ * Each one is a thin adapter over the framework component of the same name, so the
7
+ * builder edits the component's own props rather than a parallel model of them. The
8
+ * label, the fields and the defaults come from `src/shared`; only the drawing is here.
9
+ */
10
+ import { CTA, FeatureGrid, Hero, PricingCard, Testimonials, } from "@asheeui/web";
11
+ import { CTA_SPEC, FEATURE_GRID_SPEC, HERO_SPEC, PRICING_CARD_SPEC, TESTIMONIALS_SPEC, toAction, toColumns, } from "../../shared";
12
+ /**
13
+ * The leading statement of a page.
14
+ */
15
+ export const heroBlock = {
16
+ ...HERO_SPEC,
17
+ render: ({ eyebrow, title, description, primaryAction, secondaryAction, align, background, contentWidth, }) => (_jsx(Hero, { eyebrow: eyebrow || undefined, title: title ?? "", description: description || undefined, primaryAction: toAction(primaryAction), secondaryAction: toAction(secondaryAction), align: align ?? "start", background: background ?? "none", containerSize: contentWidth ?? "lg" })),
18
+ };
19
+ /**
20
+ * The closing call to action of a page.
21
+ */
22
+ export const ctaBlock = {
23
+ ...CTA_SPEC,
24
+ render: ({ eyebrow, title, description, primaryAction, secondaryAction, align, background, panel, }) => (_jsx(CTA, { eyebrow: eyebrow || undefined, title: title ?? "", description: description || undefined, primaryAction: toAction(primaryAction), secondaryAction: toAction(secondaryAction), align: align ?? "center", background: background ?? "none", panel: panel ?? "bordered" })),
25
+ };
26
+ /**
27
+ * A band of features laid out in a responsive grid.
28
+ */
29
+ export const featureGridBlock = {
30
+ ...FEATURE_GRID_SPEC,
31
+ render: ({ eyebrow, title, description, items, columnsMd, columnsLg, align, background, }) => (_jsx(FeatureGrid, { eyebrow: eyebrow || undefined, title: title || undefined, description: description || undefined, align: align ?? "center", background: background ?? "none", columnsMd: toColumns(columnsMd), columnsLg: toColumns(columnsLg), items: (items ?? []).map((item, index) => ({
32
+ id: index,
33
+ title: item.title ?? "",
34
+ description: item.description || undefined,
35
+ })) })),
36
+ };
37
+ /**
38
+ * A band of attributed customer quotes.
39
+ */
40
+ export const testimonialsBlock = {
41
+ ...TESTIMONIALS_SPEC,
42
+ render: ({ eyebrow, title, description, items, align }) => (_jsx(Testimonials, { eyebrow: eyebrow || undefined, title: title || undefined, description: description || undefined, align: align ?? "center", items: (items ?? []).map((item, index) => ({
43
+ id: index,
44
+ quote: item.quote ?? "",
45
+ name: item.name ?? "",
46
+ role: item.role || undefined,
47
+ })) })),
48
+ };
49
+ /**
50
+ * One plan in a pricing table.
51
+ */
52
+ export const pricingCardBlock = {
53
+ ...PRICING_CARD_SPEC,
54
+ render: ({ badge, name, price, period, description, features, highlighted, primaryAction, }) => (_jsx("div", { className: "p-6", children: _jsx(PricingCard, { badge: badge || undefined, name: name ?? "", price: price ?? "", period: period || undefined, description: description || undefined, highlighted: highlighted ?? false, features: (features ?? []).map((feature, index) => ({
55
+ id: index,
56
+ label: feature.label ?? "",
57
+ included: feature.included !== false,
58
+ })), primaryAction: toAction(primaryAction) }) })),
59
+ };
60
+ //# sourceMappingURL=sections.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sections.js","sourceRoot":"","sources":["../../../src/web/blocks/sections.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;GAMG;AAEH,OAAO,EACL,GAAG,EACH,WAAW,EACX,IAAI,EACJ,WAAW,EACX,YAAY,GACb,MAAM,cAAc,CAAC;AAStB,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAA+B;IACnD,GAAG,SAAS;IACZ,MAAM,EAAE,CAAC,EACP,OAAO,EACP,KAAK,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,KAAK,EACL,UAAU,EACV,YAAY,GACb,EAAE,EAAE,CAAC,CACJ,KAAC,IAAI,IACH,OAAO,EAAE,OAAO,IAAI,SAAS,EAC7B,KAAK,EAAE,KAAK,IAAI,EAAE,EAClB,WAAW,EAAE,WAAW,IAAI,SAAS,EACrC,aAAa,EAAE,QAAQ,CAAC,aAAa,CAAC,EACtC,eAAe,EAAE,QAAQ,CAAC,eAAe,CAAC,EAC1C,KAAK,EAAE,KAAK,IAAI,OAAO,EACvB,UAAU,EAAE,UAAU,IAAI,MAAM,EAChC,aAAa,EAAE,YAAY,IAAI,IAAI,GACnC,CACH;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAA8B;IACjD,GAAG,QAAQ;IACX,MAAM,EAAE,CAAC,EACP,OAAO,EACP,KAAK,EACL,WAAW,EACX,aAAa,EACb,eAAe,EACf,KAAK,EACL,UAAU,EACV,KAAK,GACN,EAAE,EAAE,CAAC,CACJ,KAAC,GAAG,IACF,OAAO,EAAE,OAAO,IAAI,SAAS,EAC7B,KAAK,EAAE,KAAK,IAAI,EAAE,EAClB,WAAW,EAAE,WAAW,IAAI,SAAS,EACrC,aAAa,EAAE,QAAQ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Block, EmptyStateBlockProps } from "../../shared";
2
+ /**
3
+ * A region with nothing in it.
4
+ */
5
+ export declare const emptyStateBlock: AsheeBlock<EmptyStateBlockProps>;
6
+ //# sourceMappingURL=utility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../src/web/blocks/utility.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGrE;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,oBAAoB,CAa5D,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * The web utility blocks.
5
+ *
6
+ * The empty state is the one utility block a marketing or application page needs from a
7
+ * builder: a region that has nothing in it yet, which a non-developer can word and
8
+ * justify without touching code. The fields and the defaults come from `src/shared`.
9
+ */
10
+ import { EmptyState } from "@asheeui/web";
11
+ import { EMPTY_STATE_SPEC, toAction } from "../../shared";
12
+ /**
13
+ * A region with nothing in it.
14
+ */
15
+ export const emptyStateBlock = {
16
+ ...EMPTY_STATE_SPEC,
17
+ render: ({ title, description, type, panel, primaryAction }) => (_jsx("div", { className: "p-6", children: _jsx(EmptyState, { title: title ?? "", description: description || undefined, type: type ?? "info", panel: panel ?? false, primaryAction: toAction(primaryAction) }) })),
18
+ };
19
+ //# sourceMappingURL=utility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility.js","sourceRoot":"","sources":["../../../src/web/blocks/utility.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAqC;IAC/D,GAAG,gBAAgB;IACnB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAC9D,cAAK,SAAS,EAAC,KAAK,YAClB,KAAC,UAAU,IACT,KAAK,EAAE,KAAK,IAAI,EAAE,EAClB,WAAW,EAAE,WAAW,IAAI,SAAS,EACrC,IAAI,EAAE,IAAI,IAAI,MAAM,EACpB,KAAK,EAAE,KAAK,IAAI,KAAK,EACrB,aAAa,EAAE,QAAQ,CAAC,aAAa,CAAC,GACtC,GACE,CACP;CACF,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * The AsheeUI configuration for Puck, on the web.
3
+ *
4
+ * This file is the registry the visual builder reads: every block, the category it
5
+ * belongs to, and the page shell a published page renders into. It contains no second
6
+ * implementation of any component. Each entry is the framework component plus the
7
+ * serializable configuration a builder can own, and the configuration half comes from
8
+ * `src/shared`, so the web editor and the native renderer offer one editor for one
9
+ * block.
10
+ *
11
+ * One assertion is made here and nowhere else: the components map and the category map
12
+ * are asserted to be the shape the editor's own `Config` describes. It is the single
13
+ * point where this package's platform-free field vocabulary meets the editor's, and a
14
+ * cast is what keeps the two descriptions from having to be one type in both halves —
15
+ * the native entry could not load if they were.
16
+ */
17
+ import type { Config } from "@puckeditor/core";
18
+ import type { AsheePuckRootProps, CtaBlockProps, EmptyStateBlockProps, FeatureGridBlockProps, FooterBlockProps, HeadingBlockProps, HeroBlockProps, NavbarBlockProps, PricingCardBlockProps, TestimonialsBlockProps, TextBlockProps } from "../shared";
19
+ import { type ColumnsBlockProps, type SectionBlockProps } from "./blocks/layout";
20
+ /**
21
+ * Every block the AsheeUI configuration offers, with its props.
22
+ */
23
+ export type AsheePuckComponents = {
24
+ /** A band with vertical rhythm and a background. */
25
+ Section: SectionBlockProps;
26
+ /** A two-column arrangement that stacks on a narrow screen. */
27
+ Columns: ColumnsBlockProps;
28
+ /** A section heading. */
29
+ Heading: HeadingBlockProps;
30
+ /** A paragraph of body text. */
31
+ Text: TextBlockProps;
32
+ /** The navigation bar of a page. */
33
+ Navbar: NavbarBlockProps;
34
+ /** The footer of a page. */
35
+ Footer: FooterBlockProps;
36
+ /** The leading statement of a page. */
37
+ Hero: HeroBlockProps;
38
+ /** The closing call to action of a page. */
39
+ CTA: CtaBlockProps;
40
+ /** A band of features in a responsive grid. */
41
+ FeatureGrid: FeatureGridBlockProps;
42
+ /** A band of attributed customer quotes. */
43
+ Testimonials: TestimonialsBlockProps;
44
+ /** One plan in a pricing table. */
45
+ PricingCard: PricingCardBlockProps;
46
+ /** A region with nothing in it. */
47
+ EmptyState: EmptyStateBlockProps;
48
+ };
49
+ /**
50
+ * The categories a block can be filed under.
51
+ */
52
+ export type AsheePuckCategory = "Layout" | "Navigation" | "Hero" | "Content" | "Features" | "CTA" | "Pricing" | "Testimonials" | "Utility";
53
+ /**
54
+ * The type of the AsheeUI Puck configuration.
55
+ */
56
+ export type AsheePuckConfig = Config<{
57
+ components: AsheePuckComponents;
58
+ root: AsheePuckRootProps;
59
+ categories: AsheePuckCategory[];
60
+ }>;
61
+ /**
62
+ * The AsheeUI blocks, filed under the categories the builder shows.
63
+ */
64
+ export declare const asheePuckConfig: AsheePuckConfig;
65
+ //# sourceMappingURL=config.d.ts.map