@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,42 @@
1
+ /**
2
+ * The content blocks, stated once for both renderers.
3
+ *
4
+ * These are the blocks that place words on a page: a section heading and a paragraph.
5
+ * What is stated here is everything but the drawing — the label a builder shows, the
6
+ * fields it fills in and the value each starts as — because the drawing is the one part
7
+ * that is the platform's: the web composes a `Section` and a `Typography`, the platform
8
+ * composes its own two. Everything else would otherwise be stated twice and could
9
+ * drift.
10
+ */
11
+ import type { AsheeBlockSpec } from "../types";
12
+ /**
13
+ * The props of the heading block.
14
+ */
15
+ export type HeadingBlockProps = {
16
+ /** Short label above the heading. */
17
+ eyebrow?: string;
18
+ /** The heading itself. */
19
+ title?: string;
20
+ /** Supporting sentence under the heading. */
21
+ description?: string;
22
+ /** Horizontal alignment of the block. */
23
+ align?: "start" | "center";
24
+ };
25
+ /**
26
+ * A section heading with an optional eyebrow and description.
27
+ */
28
+ export declare const HEADING_SPEC: AsheeBlockSpec<HeadingBlockProps>;
29
+ /**
30
+ * The props of the text block.
31
+ */
32
+ export type TextBlockProps = {
33
+ /** The paragraph. */
34
+ text?: string;
35
+ /** Alignment of the paragraph. */
36
+ align?: "start" | "center";
37
+ };
38
+ /**
39
+ * A paragraph of body text.
40
+ */
41
+ export declare const TEXT_SPEC: AsheeBlockSpec<TextBlockProps>;
42
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/shared/blocks/content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,yCAAyC;IACzC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,cAAc,CAAC,iBAAiB,CAc1D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,kCAAkC;IAClC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,cAAc,CAAC,cAAc,CAUpD,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The content blocks, stated once for both renderers.
3
+ *
4
+ * These are the blocks that place words on a page: a section heading and a paragraph.
5
+ * What is stated here is everything but the drawing — the label a builder shows, the
6
+ * fields it fills in and the value each starts as — because the drawing is the one part
7
+ * that is the platform's: the web composes a `Section` and a `Typography`, the platform
8
+ * composes its own two. Everything else would otherwise be stated twice and could
9
+ * drift.
10
+ */
11
+ import { ALIGNMENT_OPTIONS, selectField, textareaField, textField, } from "../fields";
12
+ /**
13
+ * A section heading with an optional eyebrow and description.
14
+ */
15
+ export const HEADING_SPEC = {
16
+ label: "Heading",
17
+ fields: {
18
+ eyebrow: textField("Eyebrow", "Why teams switch"),
19
+ title: textField("Heading", "Everything in one place"),
20
+ description: textareaField("Description"),
21
+ align: selectField("Alignment", ALIGNMENT_OPTIONS),
22
+ },
23
+ defaultProps: {
24
+ eyebrow: "",
25
+ title: "Everything in one place",
26
+ description: "",
27
+ align: "start",
28
+ },
29
+ };
30
+ /**
31
+ * A paragraph of body text.
32
+ */
33
+ export const TEXT_SPEC = {
34
+ label: "Text",
35
+ fields: {
36
+ text: textareaField("Text", "Write the paragraph here."),
37
+ align: selectField("Alignment", ALIGNMENT_OPTIONS),
38
+ },
39
+ defaultProps: {
40
+ text: "Write the paragraph here.",
41
+ align: "start",
42
+ },
43
+ };
44
+ //# sourceMappingURL=content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/shared/blocks/content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,SAAS,GACV,MAAM,WAAW,CAAC;AAoBnB;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAsC;IAC7D,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE;QACN,OAAO,EAAE,SAAS,CAAC,SAAS,EAAE,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS,CAAC,SAAS,EAAE,yBAAyB,CAAC;QACtD,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC;QACzC,KAAK,EAAE,WAAW,CAAC,WAAW,EAAE,iBAAiB,CAAC;KACnD;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,EAAE;QACf,KAAK,EAAE,OAAO;KACf;CACF,CAAC;AAaF;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAmC;IACvD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE;QACN,IAAI,EAAE,aAAa,CAAC,MAAM,EAAE,2BAA2B,CAAC;QACxD,KAAK,EAAE,WAAW,CAAC,WAAW,EAAE,iBAAiB,CAAC;KACnD;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,2BAA2B;QACjC,KAAK,EAAE,OAAO;KACf;CACF,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * The block specs, gathered.
3
+ *
4
+ * One module states the set: the names a stored page uses, the order a builder lists
5
+ * them in, and the categories they are filed under. A block that is added without a
6
+ * category, or a category that names a block nobody implemented, is caught by the
7
+ * package's own tests rather than by an editor that silently shows nothing — which is
8
+ * why the name list and the category map live beside the specs rather than in either
9
+ * renderer.
10
+ */
11
+ import type { AsheeBlockSpec, AsheePuckCategories } from "../types";
12
+ export * from "./content";
13
+ export * from "./layout";
14
+ export * from "./navigation";
15
+ export * from "./sections";
16
+ export * from "./utility";
17
+ /**
18
+ * The blocks a stored page can name, in the order a builder lists them.
19
+ */
20
+ export declare const PUCK_BLOCK_NAMES: readonly ["Section", "Columns", "Heading", "Text", "Navbar", "Footer", "Hero", "CTA", "FeatureGrid", "Testimonials", "PricingCard", "EmptyState"];
21
+ /**
22
+ * The name of one block, which is also its key in a page's content.
23
+ */
24
+ export type PuckBlockName = (typeof PUCK_BLOCK_NAMES)[number];
25
+ /**
26
+ * The specs, by block name.
27
+ *
28
+ * This is the one place the set is complete: a name without a spec, or a spec without a
29
+ * name, is a compile error rather than an editor that silently shows nothing, and both
30
+ * registries read their labels and fields from what is here. A consumer building its own
31
+ * registry — an application that wants a subset of the blocks, or one of its own beside
32
+ * them — can start from the same specs rather than restating the fields.
33
+ */
34
+ export declare const PUCK_SPECS: Record<PuckBlockName, AsheeBlockSpec<Record<string, unknown>>>;
35
+ /**
36
+ * The categories a block can be filed under.
37
+ *
38
+ * A block that appears in none of them is listed by the builder's own fallback
39
+ * category, which is why the list stays explicit rather than complete by accident.
40
+ */
41
+ export declare const PUCK_CATEGORIES: AsheePuckCategories;
42
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/blocks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAapE,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAE1B;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAC3B,SAAS,EACT,SAAS,EACT,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,KAAK,EACL,aAAa,EACb,cAAc,EACd,aAAa,EACb,YAAY,CACJ,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAC7B,aAAa,EACb,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAcxC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,mBAa7B,CAAC"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * The block specs, gathered.
3
+ *
4
+ * One module states the set: the names a stored page uses, the order a builder lists
5
+ * them in, and the categories they are filed under. A block that is added without a
6
+ * category, or a category that names a block nobody implemented, is caught by the
7
+ * package's own tests rather than by an editor that silently shows nothing — which is
8
+ * why the name list and the category map live beside the specs rather than in either
9
+ * renderer.
10
+ */
11
+ import { HEADING_SPEC, TEXT_SPEC } from "./content";
12
+ import { COLUMNS_SPEC, SECTION_SPEC } from "./layout";
13
+ import { FOOTER_SPEC, NAVBAR_SPEC } from "./navigation";
14
+ import { CTA_SPEC, FEATURE_GRID_SPEC, HERO_SPEC, PRICING_CARD_SPEC, TESTIMONIALS_SPEC, } from "./sections";
15
+ import { EMPTY_STATE_SPEC } from "./utility";
16
+ export * from "./content";
17
+ export * from "./layout";
18
+ export * from "./navigation";
19
+ export * from "./sections";
20
+ export * from "./utility";
21
+ /**
22
+ * The blocks a stored page can name, in the order a builder lists them.
23
+ */
24
+ export const PUCK_BLOCK_NAMES = [
25
+ "Section",
26
+ "Columns",
27
+ "Heading",
28
+ "Text",
29
+ "Navbar",
30
+ "Footer",
31
+ "Hero",
32
+ "CTA",
33
+ "FeatureGrid",
34
+ "Testimonials",
35
+ "PricingCard",
36
+ "EmptyState",
37
+ ];
38
+ /**
39
+ * The specs, by block name.
40
+ *
41
+ * This is the one place the set is complete: a name without a spec, or a spec without a
42
+ * name, is a compile error rather than an editor that silently shows nothing, and both
43
+ * registries read their labels and fields from what is here. A consumer building its own
44
+ * registry — an application that wants a subset of the blocks, or one of its own beside
45
+ * them — can start from the same specs rather than restating the fields.
46
+ */
47
+ export const PUCK_SPECS = {
48
+ Section: SECTION_SPEC,
49
+ Columns: COLUMNS_SPEC,
50
+ Heading: HEADING_SPEC,
51
+ Text: TEXT_SPEC,
52
+ Navbar: NAVBAR_SPEC,
53
+ Footer: FOOTER_SPEC,
54
+ Hero: HERO_SPEC,
55
+ CTA: CTA_SPEC,
56
+ FeatureGrid: FEATURE_GRID_SPEC,
57
+ Testimonials: TESTIMONIALS_SPEC,
58
+ PricingCard: PRICING_CARD_SPEC,
59
+ EmptyState: EMPTY_STATE_SPEC,
60
+ };
61
+ /**
62
+ * The categories a block can be filed under.
63
+ *
64
+ * A block that appears in none of them is listed by the builder's own fallback
65
+ * category, which is why the list stays explicit rather than complete by accident.
66
+ */
67
+ export const PUCK_CATEGORIES = {
68
+ Layout: { title: "Layout", components: ["Section", "Columns"] },
69
+ Navigation: { title: "Navigation", components: ["Navbar", "Footer"] },
70
+ Hero: { title: "Hero", components: ["Hero"] },
71
+ Content: { title: "Content", components: ["Heading", "Text"] },
72
+ Features: { title: "Features", components: ["FeatureGrid"] },
73
+ CTA: { title: "CTA", components: ["CTA"] },
74
+ Pricing: { title: "Pricing", components: ["PricingCard"] },
75
+ Testimonials: {
76
+ title: "Testimonials",
77
+ components: ["Testimonials"],
78
+ },
79
+ Utility: { title: "Utility", components: ["EmptyState"] },
80
+ };
81
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/shared/blocks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,SAAS;IACT,SAAS;IACT,SAAS;IACT,MAAM;IACN,QAAQ;IACR,QAAQ;IAC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AE,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,YAAY,CAAC,EAAE;CAC1D,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * The layout blocks, stated once for both renderers.
3
+ *
4
+ * A band with its own rhythm and background, and a two-column arrangement. These are
5
+ * the two blocks that hold other blocks, and they are also the two whose *props* differ
6
+ * between the platforms while their *fields* do not: the web hands a render function a
7
+ * drop-zone component to place, the platform hands it rendered children. So the fields
8
+ * and the defaults are stated here, once, and the prop type each renderer receives is
9
+ * declared beside it — which keeps a builder from offering two different drop zones for
10
+ * one block.
11
+ */
12
+ import type { SectionBackground, Space } from "@asheeui/core";
13
+ import type { AsheeBlockSpec } from "../types";
14
+ /**
15
+ * Ratio options a two-column block offers.
16
+ */
17
+ export declare const COLUMN_RATIO_OPTIONS: readonly ["50/50", "33/67", "67/33"];
18
+ /**
19
+ * Ratio of a two-column arrangement, from the `lg` breakpoint upwards.
20
+ */
21
+ export type ColumnRatio = (typeof COLUMN_RATIO_OPTIONS)[number];
22
+ /**
23
+ * The band options a section-level block carries, which is every part of its value that
24
+ * is not a drop zone.
25
+ */
26
+ export type SectionBandProps = {
27
+ /** Vertical padding of the band. */
28
+ spacing?: Space;
29
+ /** Background treatment of the band. */
30
+ background?: SectionBackground;
31
+ };
32
+ /**
33
+ * A band with its own vertical rhythm and background.
34
+ */
35
+ export declare const SECTION_SPEC: AsheeBlockSpec<SectionBandProps>;
36
+ /**
37
+ * Everything of the two-column block that is not a drop zone.
38
+ */
39
+ export type ColumnsBandProps = SectionBandProps & {
40
+ /** Ratio of the two columns from the `lg` breakpoint upwards. */
41
+ ratio?: ColumnRatio;
42
+ };
43
+ /**
44
+ * Two columns that stack on a narrow screen.
45
+ */
46
+ export declare const COLUMNS_SPEC: AsheeBlockSpec<ColumnsBandProps>;
47
+ /**
48
+ * The grid columns each ratio resolves to, on the web.
49
+ * The strings are complete literals, so Tailwind emits them.
50
+ */
51
+ export declare const COLUMN_RATIO_CLASS: Record<ColumnRatio, string>;
52
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/shared/blocks/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,oBAAoB,YAAI,OAAO,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oCAAoC;IACpC,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB,wCAAwC;IACxC,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,cAAc,CAAC,gBAAgB,CAQzD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG;IAChD,iEAAiE;IACjE,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,cAAc,CAAC,gBAAgB,CASzD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAI1D,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * The layout blocks, stated once for both renderers.
3
+ *
4
+ * A band with its own rhythm and background, and a two-column arrangement. These are
5
+ * the two blocks that hold other blocks, and they are also the two whose *props* differ
6
+ * between the platforms while their *fields* do not: the web hands a render function a
7
+ * drop-zone component to place, the platform hands it rendered children. So the fields
8
+ * and the defaults are stated here, once, and the prop type each renderer receives is
9
+ * declared beside it — which keeps a builder from offering two different drop zones for
10
+ * one block.
11
+ */
12
+ import { BACKGROUND_OPTIONS, SPACING_OPTIONS, selectField } from "../fields";
13
+ /**
14
+ * Ratio options a two-column block offers.
15
+ */
16
+ export const COLUMN_RATIO_OPTIONS = ["50/50", "33/67", "67/33"];
17
+ /**
18
+ * A band with its own vertical rhythm and background.
19
+ */
20
+ export const SECTION_SPEC = {
21
+ label: "Section",
22
+ fields: {
23
+ spacing: selectField("Vertical spacing", SPACING_OPTIONS),
24
+ background: selectField("Background", BACKGROUND_OPTIONS),
25
+ content: { type: "slot", label: "Content" },
26
+ },
27
+ defaultProps: { spacing: "lg", background: "none" },
28
+ };
29
+ /**
30
+ * Two columns that stack on a narrow screen.
31
+ */
32
+ export const COLUMNS_SPEC = {
33
+ label: "Columns",
34
+ fields: {
35
+ ratio: selectField("Column ratio", COLUMN_RATIO_OPTIONS),
36
+ spacing: selectField("Vertical spacing", SPACING_OPTIONS),
37
+ start: { type: "slot", label: "First column" },
38
+ end: { type: "slot", label: "Second column" },
39
+ },
40
+ defaultProps: { ratio: "50/50", spacing: "lg" },
41
+ };
42
+ /**
43
+ * The grid columns each ratio resolves to, on the web.
44
+ * The strings are complete literals, so Tailwind emits them.
45
+ */
46
+ export const COLUMN_RATIO_CLASS = {
47
+ "50/50": "lg:grid-cols-2",
48
+ "33/67": "lg:grid-cols-[1fr_2fr]",
49
+ "67/33": "lg:grid-cols-[2fr_1fr]",
50
+ };
51
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/shared/blocks/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7E;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAmBzE;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAqC;IAC5D,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE;QACN,OAAO,EAAE,WAAW,CAAC,kBAAkB,EAAE,eAAe,CAAC;QACzD,UAAU,EAAE,WAAW,CAAC,YAAY,EAAE,kBAAkB,CAAC;QACzD,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE;KAC5C;IACD,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE;CACpD,CAAC;AAUF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAqC;IAC5D,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE;QACN,KAAK,EAAE,WAAW,CAAC,cAAc,EAAE,oBAAoB,CAAC;QACxD,OAAO,EAAE,WAAW,CAAC,kBAAkB,EAAE,eAAe,CAAC;QACzD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE;QAC9C,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE;KAC9C;IACD,YAAY,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;CAChD,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAgC;IAC7D,OAAO,EAAE,gBAAgB;IACzB,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,wBAAwB;CAClC,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The navigation blocks, stated once for both renderers.
3
+ *
4
+ * A builder usually owns the header and the footer of a site once, at the page level,
5
+ * so these blocks expose the framework's bar and footer with the navigation as data:
6
+ * link lists a non-developer can edit, and no application state. The link lists are
7
+ * described here, once, so the two platforms offer the same editor for them.
8
+ */
9
+ import type { AsheeBlockSpec } from "../types";
10
+ /**
11
+ * One navigation link.
12
+ */
13
+ export type LinkItemProps = {
14
+ /** Visible name of the link. */
15
+ label: string;
16
+ /** Destination of the link. */
17
+ href: string;
18
+ };
19
+ /**
20
+ * One column of footer navigation.
21
+ */
22
+ export type FooterGroupProps = {
23
+ /** Title of the column. */
24
+ title: string;
25
+ /** The links in the column. */
26
+ links: LinkItemProps[];
27
+ };
28
+ /**
29
+ * The props of the navigation bar block.
30
+ */
31
+ export type NavbarBlockProps = {
32
+ /** Brand content, typically the product name. */
33
+ brand?: string;
34
+ /** Destination of the brand. */
35
+ brandHref?: string;
36
+ /** Where the links sit in the bar, from the `md` breakpoint upwards. */
37
+ align?: "start" | "center" | "end";
38
+ /** The navigation links. */
39
+ links?: LinkItemProps[];
40
+ /** The emphasised action of the bar. */
41
+ primaryAction?: {
42
+ label: string;
43
+ href: string;
44
+ variant: string;
45
+ };
46
+ /** The supporting action of the bar. */
47
+ secondaryAction?: {
48
+ label: string;
49
+ href: string;
50
+ variant: string;
51
+ };
52
+ };
53
+ /**
54
+ * The navigation bar of a page.
55
+ */
56
+ export declare const NAVBAR_SPEC: AsheeBlockSpec<NavbarBlockProps>;
57
+ /**
58
+ * The props of the footer block.
59
+ */
60
+ export type FooterBlockProps = {
61
+ /** Brand content. */
62
+ brand?: string;
63
+ /** Short description under the brand. */
64
+ description?: string;
65
+ /** The navigation columns. */
66
+ groups?: FooterGroupProps[];
67
+ /** The copyright line. */
68
+ copyright?: string;
69
+ };
70
+ /**
71
+ * The footer of a page.
72
+ */
73
+ export declare const FOOTER_SPEC: AsheeBlockSpec<FooterBlockProps>;
74
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/shared/blocks/navigation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,KAAK,EAAmB,cAAc,EAAE,MAAM,UAAU,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,gCAAgC;IAChC,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}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * The navigation blocks, stated once for both renderers.
3
+ *
4
+ * A builder usually owns the header and the footer of a site once, at the page level,
5
+ * so these blocks expose the framework's bar and footer with the navigation as data:
6
+ * link lists a non-developer can edit, and no application state. The link lists are
7
+ * described here, once, so the two platforms offer the same editor for them.
8
+ */
9
+ import { ACTION_FIELDS, LINK_ITEM_FIELDS, selectField, textareaField, textField, } from "../fields";
10
+ /**
11
+ * The links of one column.
12
+ */
13
+ const COLUMN_LINK_ARRAY = {
14
+ type: "array",
15
+ label: "Links",
16
+ arrayFields: LINK_ITEM_FIELDS,
17
+ defaultItemProps: { label: "New link", href: "/" },
18
+ getItemSummary: (item) => item.label ?? "Link",
19
+ };
20
+ /**
21
+ * The link list of the bar.
22
+ */
23
+ const NAVBAR_LINK_ARRAY = COLUMN_LINK_ARRAY;
24
+ /**
25
+ * The columns of the footer.
26
+ */
27
+ const FOOTER_GROUP_ARRAY = {
28
+ type: "array",
29
+ label: "Columns",
30
+ arrayFields: {
31
+ title: textField("Column title"),
32
+ links: COLUMN_LINK_ARRAY,
33
+ },
34
+ defaultItemProps: { title: "New column", links: [] },
35
+ getItemSummary: (item) => item.title ?? "Column",
36
+ };
37
+ /**
38
+ * The navigation bar of a page.
39
+ */
40
+ export const NAVBAR_SPEC = {
41
+ label: "Navbar",
42
+ fields: {
43
+ brand: textField("Brand", "Ashee"),
44
+ brandHref: textField("Brand link", "/"),
45
+ align: selectField("Link alignment", ["start", "center", "end"]),
46
+ links: NAVBAR_LINK_ARRAY,
47
+ primaryAction: ACTION_FIELDS,
48
+ secondaryAction: ACTION_FIELDS,
49
+ },
50
+ defaultProps: {
51
+ brand: "Ashee",
52
+ brandHref: "/",
53
+ align: "center",
54
+ links: [
55
+ { label: "Product", href: "/product" },
56
+ { label: "Pricing", href: "/pricing" },
57
+ ],
58
+ },
59
+ };
60
+ /**
61
+ * The footer of a page.
62
+ */
63
+ export const FOOTER_SPEC = {
64
+ label: "Footer",
65
+ fields: {
66
+ brand: textField("Brand", "Ashee"),
67
+ description: textareaField("Description"),
68
+ groups: FOOTER_GROUP_ARRAY,
69
+ copyright: textField("Copyright", "Ashee Softworks"),
70
+ },
71
+ defaultProps: {
72
+ brand: "Ashee",
73
+ description: "Campaign messaging for growing teams.",
74
+ groups: [
75
+ {
76
+ title: "Product",
77
+ links: [
78
+ { label: "Campaigns", href: "/campaigns" },
79
+ { label: "Pricing", href: "/pricing" },
80
+ ],
81
+ },
82
+ ],
83
+ copyright: "Ashee Softworks",
84
+ },
85
+ };
86
+ //# sourceMappingURL=navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../src/shared/blocks/navigation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,SAAS,GACV,MAAM,WAAW,CAAC;AAyBnB;;GAEG;AACH,MAAM,iBAAiB,GAAmC;IACxD,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,gBAAgB;IAC7B,gBAAgB,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE;IAClD,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM;CAC/C,CAAC;AAEF;;GAEG;AACH,MAAM,iBAAiB,GAAmC,iBAAiB,CAAC;AAE5E;;GAEG;AACH,MAAM,kBAAkB,GAAsC;IAC5D,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,SAAS;IAChB,WAAW,EAAE;QACX,KAAK,EAAE,SAAS,CAAC,cAAc,CAAC;QAChC,KAAK,EAAE,iBAAiB;KACzB;IACD,gBAAgB,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE;IACpD,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAA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B;CACF,CAAC"}
@@ -0,0 +1,142 @@
1
+ /**
2
+ * The marketing section blocks, stated once for both renderers.
3
+ *
4
+ * These are the sections a page is assembled from: a hero, a feature grid, a
5
+ * testimonial wall, a pricing card and a closing call to action. What is stated here is
6
+ * the editor's half of each — its label, its fields and its starting value — so the two
7
+ * platforms offer one editor and one default, and differ only in how each draws the
8
+ * component it names.
9
+ */
10
+ import type { ContainerSize, CtaPanel, SectionBackground } from "@asheeui/core";
11
+ import type { BuilderAction } from "../adapters";
12
+ import type { AsheeBlockSpec } from "../types";
13
+ /**
14
+ * The props of the hero block.
15
+ */
16
+ export type HeroBlockProps = {
17
+ /** Short label above the headline. */
18
+ eyebrow?: string;
19
+ /** The headline. */
20
+ title?: string;
21
+ /** Supporting sentence under the headline. */
22
+ description?: string;
23
+ /** The emphasised action. */
24
+ primaryAction?: BuilderAction;
25
+ /** The supporting action. */
26
+ secondaryAction?: BuilderAction;
27
+ /** Alignment of the text column. */
28
+ align?: "start" | "center";
29
+ /** Background treatment of the band. */
30
+ background?: SectionBackground;
31
+ /** Maximum content width of the band. */
32
+ contentWidth?: ContainerSize;
33
+ };
34
+ /**
35
+ * The leading statement of a page.
36
+ */
37
+ export declare const HERO_SPEC: AsheeBlockSpec<HeroBlockProps>;
38
+ /**
39
+ * The props of the call-to-action block.
40
+ */
41
+ export type CtaBlockProps = {
42
+ /** Short label above the headline. */
43
+ eyebrow?: string;
44
+ /** The headline of the band. */
45
+ title?: string;
46
+ /** Supporting sentence under the headline. */
47
+ description?: string;
48
+ /** The emphasised action. */
49
+ primaryAction?: BuilderAction;
50
+ /** The supporting action. */
51
+ secondaryAction?: BuilderAction;
52
+ /** Alignment of the content. */
53
+ align?: "start" | "center";
54
+ /** Background treatment of the band. */
55
+ background?: SectionBackground;
56
+ /** Panel treatment of the content. */
57
+ panel?: CtaPanel;
58
+ };
59
+ /**
60
+ * The closing call to action of a page.
61
+ */
62
+ export declare const CTA_SPEC: AsheeBlockSpec<CtaBlockProps>;
63
+ /**
64
+ * The props of the feature grid block.
65
+ */
66
+ export type FeatureGridBlockProps = {
67
+ /** Short label above the heading. */
68
+ eyebrow?: string;
69
+ /** Heading of the band. */
70
+ title?: string;
71
+ /** Supporting sentence under the heading. */
72
+ description?: string;
73
+ /** The features to show. */
74
+ items?: Array<{
75
+ title: string;
76
+ description: string;
77
+ }>;
78
+ /** Columns from the `md` breakpoint upwards. */
79
+ columnsMd?: string;
80
+ /** Columns from the `lg` breakpoint upwards. */
81
+ columnsLg?: string;
82
+ /** Alignment of the heading. */
83
+ align?: "start" | "center";
84
+ /** Background treatment of the band. */
85
+ background?: SectionBackground;
86
+ };
87
+ /**
88
+ * A band of features laid out in a responsive grid.
89
+ */
90
+ export declare const FEATURE_GRID_SPEC: AsheeBlockSpec<FeatureGridBlockProps>;
91
+ /**
92
+ * The props of the testimonials block.
93
+ */
94
+ export type TestimonialsBlockProps = {
95
+ /** Short label above the heading. */
96
+ eyebrow?: string;
97
+ /** Heading of the band. */
98
+ title?: string;
99
+ /** Supporting sentence under the heading. */
100
+ description?: string;
101
+ /** The quotes to show. */
102
+ items?: Array<{
103
+ quote: string;
104
+ name: string;
105
+ role: string;
106
+ }>;
107
+ /** Alignment of the heading. */
108
+ align?: "start" | "center";
109
+ };
110
+ /**
111
+ * A band of attributed customer quotes.
112
+ */
113
+ export declare const TESTIMONIALS_SPEC: AsheeBlockSpec<TestimonialsBlockProps>;
114
+ /**
115
+ * The props of the pricing card block.
116
+ */
117
+ export type PricingCardBlockProps = {
118
+ /** Name of the plan. */
119
+ name?: string;
120
+ /** The amount. */
121
+ price?: string;
122
+ /** Billing period shown beside the amount. */
123
+ period?: string;
124
+ /** One sentence about the plan. */
125
+ description?: string;
126
+ /** Short label above the plan name. */
127
+ badge?: string;
128
+ /** The plan's feature lines. */
129
+ features?: Array<{
130
+ label: string;
131
+ included: boolean;
132
+ }>;
133
+ /** Whether the plan is the recommended one. */
134
+ highlighted?: boolean;
135
+ /** The emphasised action. */
136
+ primaryAction?: BuilderAction;
137
+ };
138
+ /**
139
+ * One plan in a pricing table.
140
+ */
141
+ export declare const PRICING_CARD_SPEC: AsheeBlockSpec<PricingCardBlockProps>;
142
+ //# sourceMappingURL=sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../../src/shared/blocks/sections.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAcjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,6BAA6B;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,6BAA6B;IAC7B,eAAe,CAAC,EAAE,aAAa,CAAC;IAEhC,oCAAoC;IACpC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAE3B,wCAAwC;IACxC,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAE/B,yCAAyC;IACzC,YAAY,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,cAAc,CAAC,cAAc,CA0BpD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,6BAA6B;IAC7B,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