@asheeui/puck 0.0.0-stage → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE +10 -0
- package/README.md +126 -3
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/index.native.d.ts +22 -0
- package/dist/index.native.d.ts.map +1 -0
- package/dist/index.native.js +22 -0
- package/dist/index.native.js.map +1 -0
- package/dist/native/blocks/content.d.ts +19 -0
- package/dist/native/blocks/content.d.ts.map +1 -0
- package/dist/native/blocks/content.js +29 -0
- package/dist/native/blocks/content.js.map +1 -0
- package/dist/native/blocks/layout.d.ts +42 -0
- package/dist/native/blocks/layout.d.ts.map +1 -0
- package/dist/native/blocks/layout.js +33 -0
- package/dist/native/blocks/layout.js.map +1 -0
- package/dist/native/blocks/navigation.d.ts +19 -0
- package/dist/native/blocks/navigation.d.ts.map +1 -0
- package/dist/native/blocks/navigation.js +38 -0
- package/dist/native/blocks/navigation.js.map +1 -0
- package/dist/native/blocks/sections.d.ts +30 -0
- package/dist/native/blocks/sections.d.ts.map +1 -0
- package/dist/native/blocks/sections.js +60 -0
- package/dist/native/blocks/sections.js.map +1 -0
- package/dist/native/blocks/utility.d.ts +13 -0
- package/dist/native/blocks/utility.d.ts.map +1 -0
- package/dist/native/blocks/utility.js +18 -0
- package/dist/native/blocks/utility.js.map +1 -0
- package/dist/native/config.d.ts +19 -0
- package/dist/native/config.d.ts.map +1 -0
- package/dist/native/config.js +45 -0
- package/dist/native/config.js.map +1 -0
- package/dist/native/index.d.ts +18 -0
- package/dist/native/index.d.ts.map +1 -0
- package/dist/native/index.js +18 -0
- package/dist/native/index.js.map +1 -0
- package/dist/native/render.d.ts +39 -0
- package/dist/native/render.d.ts.map +1 -0
- package/dist/native/render.js +71 -0
- package/dist/native/render.js.map +1 -0
- package/dist/native/root.d.ts +21 -0
- package/dist/native/root.d.ts.map +1 -0
- package/dist/native/root.js +28 -0
- package/dist/native/root.js.map +1 -0
- package/dist/shared/adapters.d.ts +52 -0
- package/dist/shared/adapters.d.ts.map +1 -0
- package/dist/shared/adapters.js +57 -0
- package/dist/shared/adapters.js.map +1 -0
- package/dist/shared/blocks/content.d.ts +42 -0
- package/dist/shared/blocks/content.d.ts.map +1 -0
- package/dist/shared/blocks/content.js +44 -0
- package/dist/shared/blocks/content.js.map +1 -0
- package/dist/shared/blocks/index.d.ts +42 -0
- package/dist/shared/blocks/index.d.ts.map +1 -0
- package/dist/shared/blocks/index.js +81 -0
- package/dist/shared/blocks/index.js.map +1 -0
- package/dist/shared/blocks/layout.d.ts +52 -0
- package/dist/shared/blocks/layout.d.ts.map +1 -0
- package/dist/shared/blocks/layout.js +51 -0
- package/dist/shared/blocks/layout.js.map +1 -0
- package/dist/shared/blocks/navigation.d.ts +74 -0
- package/dist/shared/blocks/navigation.d.ts.map +1 -0
- package/dist/shared/blocks/navigation.js +86 -0
- package/dist/shared/blocks/navigation.js.map +1 -0
- package/dist/shared/blocks/sections.d.ts +142 -0
- package/dist/shared/blocks/sections.d.ts.map +1 -0
- package/dist/shared/blocks/sections.js +166 -0
- package/dist/shared/blocks/sections.js.map +1 -0
- package/dist/shared/blocks/utility.d.ts +31 -0
- package/dist/shared/blocks/utility.d.ts.map +1 -0
- package/dist/shared/blocks/utility.js +36 -0
- package/dist/shared/blocks/utility.js.map +1 -0
- package/dist/shared/fields.d.ts +103 -0
- package/dist/shared/fields.d.ts.map +1 -0
- package/dist/shared/fields.js +162 -0
- package/dist/shared/fields.js.map +1 -0
- package/dist/shared/index.d.ts +14 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +14 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/types.d.ts +235 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +20 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/web/blocks/content.d.ts +10 -0
- package/dist/web/blocks/content.d.ts.map +1 -0
- package/dist/web/blocks/content.js +28 -0
- package/dist/web/blocks/content.js.map +1 -0
- package/dist/web/blocks/layout.d.ts +27 -0
- package/dist/web/blocks/layout.d.ts.map +1 -0
- package/dist/web/blocks/layout.js +28 -0
- package/dist/web/blocks/layout.js.map +1 -0
- package/dist/web/blocks/navigation.d.ts +10 -0
- package/dist/web/blocks/navigation.d.ts.map +1 -0
- package/dist/web/blocks/navigation.js +38 -0
- package/dist/web/blocks/navigation.js.map +1 -0
- package/dist/web/blocks/sections.d.ts +22 -0
- package/dist/web/blocks/sections.d.ts.map +1 -0
- package/dist/web/blocks/sections.js +60 -0
- package/dist/web/blocks/sections.js.map +1 -0
- package/dist/web/blocks/utility.d.ts +6 -0
- package/dist/web/blocks/utility.d.ts.map +1 -0
- package/dist/web/blocks/utility.js +19 -0
- package/dist/web/blocks/utility.js.map +1 -0
- package/dist/web/config.d.ts +65 -0
- package/dist/web/config.d.ts.map +1 -0
- package/dist/web/config.js +35 -0
- package/dist/web/config.js.map +1 -0
- package/dist/web/index.d.ts +19 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +20 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/page.d.ts +24 -0
- package/dist/web/page.d.ts.map +1 -0
- package/dist/web/page.js +27 -0
- package/dist/web/page.js.map +1 -0
- package/dist/web/root.d.ts +9 -0
- package/dist/web/root.d.ts.map +1 -0
- package/dist/web/root.js +26 -0
- package/dist/web/root.js.map +1 -0
- package/package.json +119 -3
- package/src/index.native.ts +22 -0
- package/src/index.ts +24 -0
- package/src/native/blocks/content.tsx +55 -0
- package/src/native/blocks/layout.tsx +72 -0
- package/src/native/blocks/navigation.tsx +71 -0
- package/src/native/blocks/sections.tsx +174 -0
- package/src/native/blocks/utility.tsx +27 -0
- package/src/native/config.tsx +66 -0
- package/src/native/index.ts +18 -0
- package/src/native/render.tsx +113 -0
- package/src/native/root.tsx +35 -0
- package/src/shared/adapters.ts +82 -0
- package/src/shared/blocks/content.ts +80 -0
- package/src/shared/blocks/index.ts +100 -0
- package/src/shared/blocks/layout.ts +82 -0
- package/src/shared/blocks/navigation.ts +168 -0
- package/src/shared/blocks/sections.ts +322 -0
- package/src/shared/blocks/utility.ts +65 -0
- package/src/shared/fields.ts +199 -0
- package/src/shared/index.ts +14 -0
- package/src/shared/types.ts +278 -0
- package/src/web/blocks/content.tsx +55 -0
- package/src/web/blocks/layout.tsx +73 -0
- package/src/web/blocks/navigation.tsx +72 -0
- package/src/web/blocks/sections.tsx +177 -0
- package/src/web/blocks/utility.tsx +31 -0
- package/src/web/config.tsx +141 -0
- package/src/web/index.ts +21 -0
- package/src/web/page.tsx +40 -0
- package/src/web/root.tsx +34 -0
|
@@ -0,0 +1,166 @@
|
|
|
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 { ACTION_FIELDS, ALIGNMENT_OPTIONS, BACKGROUND_OPTIONS, COLUMNS_OPTIONS, CONTAINER_SIZE_OPTIONS, FEATURE_ITEM_FIELD, PRICING_FEATURE_FIELD, selectField, TESTIMONIAL_ITEM_FIELD, textareaField, textField, } from "../fields";
|
|
11
|
+
/**
|
|
12
|
+
* The leading statement of a page.
|
|
13
|
+
*/
|
|
14
|
+
export const HERO_SPEC = {
|
|
15
|
+
label: "Hero",
|
|
16
|
+
fields: {
|
|
17
|
+
eyebrow: textField("Eyebrow"),
|
|
18
|
+
title: textField("Headline", "Run your campaigns from one place"),
|
|
19
|
+
description: textareaField("Description"),
|
|
20
|
+
primaryAction: ACTION_FIELDS,
|
|
21
|
+
secondaryAction: ACTION_FIELDS,
|
|
22
|
+
align: selectField("Alignment", ALIGNMENT_OPTIONS),
|
|
23
|
+
background: selectField("Background", BACKGROUND_OPTIONS),
|
|
24
|
+
contentWidth: selectField("Content width", CONTAINER_SIZE_OPTIONS),
|
|
25
|
+
},
|
|
26
|
+
defaultProps: {
|
|
27
|
+
eyebrow: "",
|
|
28
|
+
title: "Run your campaigns from one place",
|
|
29
|
+
description: "Messages, templates and results, without switching tools.",
|
|
30
|
+
primaryAction: { label: "Start free", href: "/signup", variant: "solid" },
|
|
31
|
+
secondaryAction: {
|
|
32
|
+
label: "Book a demo",
|
|
33
|
+
href: "/demo",
|
|
34
|
+
variant: "bordered",
|
|
35
|
+
},
|
|
36
|
+
align: "start",
|
|
37
|
+
background: "none",
|
|
38
|
+
contentWidth: "lg",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The closing call to action of a page.
|
|
43
|
+
*/
|
|
44
|
+
export const CTA_SPEC = {
|
|
45
|
+
label: "Call to action",
|
|
46
|
+
fields: {
|
|
47
|
+
eyebrow: textField("Eyebrow"),
|
|
48
|
+
title: textField("Headline", "Send your first campaign today"),
|
|
49
|
+
description: textareaField("Description"),
|
|
50
|
+
primaryAction: ACTION_FIELDS,
|
|
51
|
+
secondaryAction: ACTION_FIELDS,
|
|
52
|
+
align: selectField("Alignment", ALIGNMENT_OPTIONS),
|
|
53
|
+
background: selectField("Background", BACKGROUND_OPTIONS),
|
|
54
|
+
panel: selectField("Panel", ["bordered", "muted", "plain"]),
|
|
55
|
+
},
|
|
56
|
+
defaultProps: {
|
|
57
|
+
eyebrow: "",
|
|
58
|
+
title: "Send your first campaign today",
|
|
59
|
+
description: "No card required, and no setup call.",
|
|
60
|
+
primaryAction: {
|
|
61
|
+
label: "Create an account",
|
|
62
|
+
href: "/signup",
|
|
63
|
+
variant: "solid",
|
|
64
|
+
},
|
|
65
|
+
align: "center",
|
|
66
|
+
background: "none",
|
|
67
|
+
panel: "bordered",
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* A band of features laid out in a responsive grid.
|
|
72
|
+
*/
|
|
73
|
+
export const FEATURE_GRID_SPEC = {
|
|
74
|
+
label: "Feature grid",
|
|
75
|
+
fields: {
|
|
76
|
+
eyebrow: textField("Eyebrow"),
|
|
77
|
+
title: textField("Heading", "Everything the campaign needs"),
|
|
78
|
+
description: textareaField("Description"),
|
|
79
|
+
items: FEATURE_ITEM_FIELD,
|
|
80
|
+
columnsMd: selectField("Columns on tablet", COLUMNS_OPTIONS),
|
|
81
|
+
columnsLg: selectField("Columns on desktop", COLUMNS_OPTIONS),
|
|
82
|
+
align: selectField("Heading alignment", ALIGNMENT_OPTIONS),
|
|
83
|
+
background: selectField("Background", BACKGROUND_OPTIONS),
|
|
84
|
+
},
|
|
85
|
+
defaultProps: {
|
|
86
|
+
eyebrow: "",
|
|
87
|
+
title: "Everything the campaign needs",
|
|
88
|
+
description: "",
|
|
89
|
+
items: [
|
|
90
|
+
{ title: "Templates", description: "Reusable messages." },
|
|
91
|
+
{ title: "Scheduling", description: "Send at the right time." },
|
|
92
|
+
{ title: "Reporting", description: "See what landed." },
|
|
93
|
+
],
|
|
94
|
+
columnsMd: "2",
|
|
95
|
+
columnsLg: "3",
|
|
96
|
+
align: "center",
|
|
97
|
+
background: "none",
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* A band of attributed customer quotes.
|
|
102
|
+
*/
|
|
103
|
+
export const TESTIMONIALS_SPEC = {
|
|
104
|
+
label: "Testimonials",
|
|
105
|
+
fields: {
|
|
106
|
+
eyebrow: textField("Eyebrow"),
|
|
107
|
+
title: textField("Heading", "Teams send more with Ashee"),
|
|
108
|
+
description: textareaField("Description"),
|
|
109
|
+
items: TESTIMONIAL_ITEM_FIELD,
|
|
110
|
+
align: selectField("Heading alignment", ALIGNMENT_OPTIONS),
|
|
111
|
+
},
|
|
112
|
+
defaultProps: {
|
|
113
|
+
eyebrow: "",
|
|
114
|
+
title: "Teams send more with Ashee",
|
|
115
|
+
description: "",
|
|
116
|
+
items: [
|
|
117
|
+
{
|
|
118
|
+
quote: "We cut campaign setup from hours to minutes.",
|
|
119
|
+
name: "Ama Boateng",
|
|
120
|
+
role: "Head of Growth, Kora Retail",
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
align: "center",
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* One plan in a pricing table.
|
|
128
|
+
*/
|
|
129
|
+
export const PRICING_CARD_SPEC = {
|
|
130
|
+
label: "Pricing card",
|
|
131
|
+
fields: {
|
|
132
|
+
badge: textField("Badge", "Most popular"),
|
|
133
|
+
name: textField("Plan", "Growth"),
|
|
134
|
+
price: textField("Price", "$29"),
|
|
135
|
+
period: textField("Period", "/month"),
|
|
136
|
+
description: textareaField("Description"),
|
|
137
|
+
features: PRICING_FEATURE_FIELD,
|
|
138
|
+
highlighted: {
|
|
139
|
+
type: "radio",
|
|
140
|
+
label: "Recommended plan",
|
|
141
|
+
options: [
|
|
142
|
+
{ label: "Yes", value: true },
|
|
143
|
+
{ label: "No", value: false },
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
primaryAction: ACTION_FIELDS,
|
|
147
|
+
},
|
|
148
|
+
defaultProps: {
|
|
149
|
+
badge: "",
|
|
150
|
+
name: "Growth",
|
|
151
|
+
price: "$29",
|
|
152
|
+
period: "/month",
|
|
153
|
+
description: "For teams sending their first campaigns.",
|
|
154
|
+
features: [
|
|
155
|
+
{ label: "10,000 messages", included: true },
|
|
156
|
+
{ label: "Audit log", included: false },
|
|
157
|
+
],
|
|
158
|
+
highlighted: false,
|
|
159
|
+
primaryAction: {
|
|
160
|
+
label: "Choose Growth",
|
|
161
|
+
href: "/signup",
|
|
162
|
+
variant: "solid",
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=sections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sections.js","sourceRoot":"","sources":["../../../src/shared/blocks/sections.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,sBAAsB,EACtB,aAAa,EACb,SAAS,GACV,MAAM,WAAW,CAAC;AAgCnB;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAmC;IACvD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE;QACN,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC;QAC7B,KAAK,EAAE,SAAS,CAAC,UAAU,EAAE,mCAAmC,CAAC;QACjE,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC;QACzC,aAAa,EAAE,aAAa;QAC5B,eAAe,EAAE,aAAa;QAC9B,KAAK,EAAE,WAAW,CAAC,WAAW,EAAE,iBAAiB,CAAC;QAClD,UAAU,EAAE,WAAW,CAAC,YAAY,EAAE,kBAAkB,CAAC;QACzD,YAAY,EAAE,WAAW,CAAC,eAAe,EAAE,sBAAsB,CAAC;KACnE;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,mCAAmC;QAC1C,WAAW,EAAE,2DAA2D;QACxE,aAAa,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE;QACzE,eAAe,EAAE;YACf,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,UAAU;SACpB;QACD,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,MAAM;QAClB,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AA+BF;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAkC;IACrD,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE;QACN,OAAO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CAAC;QACrC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC;QACzC,QAAQ,EAAE,qBAAqB;QAC/B,WAAW,EAAE;YACX,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,kBAAkB;YACzB,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE;gBAC7B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;aAC9B;SACF;QACD,aAAa,EAAE,aAAa;KAC7B;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,0CAA0C;QACvD,QAAQ,EAAE;YACR,EAAE,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC5C,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE;SACxC;QACD,WAAW,EAAE,KAAK;QAClB,aAAa,EAAE;YACb,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,OAAO;SACjB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The utility blocks, stated once for both renderers.
|
|
3
|
+
*
|
|
4
|
+
* The empty state is the one utility block a marketing or application page needs from
|
|
5
|
+
* a builder: a region that has nothing in it yet, which a non-developer can word and
|
|
6
|
+
* justify without touching code. Its fields are stated here so the two platforms offer
|
|
7
|
+
* the same editor for it.
|
|
8
|
+
*/
|
|
9
|
+
import type { EmptyStateType } from "@asheeui/core";
|
|
10
|
+
import type { BuilderAction } from "../adapters";
|
|
11
|
+
import type { AsheeBlockSpec } from "../types";
|
|
12
|
+
/**
|
|
13
|
+
* The props of the empty state block.
|
|
14
|
+
*/
|
|
15
|
+
export type EmptyStateBlockProps = {
|
|
16
|
+
/** What the region is. */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** What the reader can do about it. */
|
|
19
|
+
description?: string;
|
|
20
|
+
/** Tone of the state. */
|
|
21
|
+
type?: EmptyStateType;
|
|
22
|
+
/** Whether the state is drawn as a panel. */
|
|
23
|
+
panel?: boolean;
|
|
24
|
+
/** The emphasised action. */
|
|
25
|
+
primaryAction?: BuilderAction;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A region with nothing in it.
|
|
29
|
+
*/
|
|
30
|
+
export declare const EMPTY_STATE_SPEC: AsheeBlockSpec<EmptyStateBlockProps>;
|
|
31
|
+
//# sourceMappingURL=utility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../src/shared/blocks/utility.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAOjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,yBAAyB;IACzB,IAAI,CAAC,EAAE,cAAc,CAAC;IAEtB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,6BAA6B;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,oBAAoB,CAsBjE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The utility blocks, stated once for both renderers.
|
|
3
|
+
*
|
|
4
|
+
* The empty state is the one utility block a marketing or application page needs from
|
|
5
|
+
* a builder: a region that has nothing in it yet, which a non-developer can word and
|
|
6
|
+
* justify without touching code. Its fields are stated here so the two platforms offer
|
|
7
|
+
* the same editor for it.
|
|
8
|
+
*/
|
|
9
|
+
import { ACTION_FIELDS, selectField, textareaField, textField, } from "../fields";
|
|
10
|
+
/**
|
|
11
|
+
* A region with nothing in it.
|
|
12
|
+
*/
|
|
13
|
+
export const EMPTY_STATE_SPEC = {
|
|
14
|
+
label: "Empty state",
|
|
15
|
+
fields: {
|
|
16
|
+
title: textField("Heading", "Nothing here yet"),
|
|
17
|
+
description: textareaField("Description"),
|
|
18
|
+
type: selectField("Tone", ["info", "success", "warning", "error"]),
|
|
19
|
+
panel: {
|
|
20
|
+
type: "radio",
|
|
21
|
+
label: "Panel",
|
|
22
|
+
options: [
|
|
23
|
+
{ label: "Yes", value: true },
|
|
24
|
+
{ label: "No", value: false },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
primaryAction: ACTION_FIELDS,
|
|
28
|
+
},
|
|
29
|
+
defaultProps: {
|
|
30
|
+
title: "Nothing here yet",
|
|
31
|
+
description: "Create the first item to see it here.",
|
|
32
|
+
type: "info",
|
|
33
|
+
panel: true,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=utility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility.js","sourceRoot":"","sources":["../../../src/shared/blocks/utility.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,aAAa,EACb,WAAW,EACX,aAAa,EACb,SAAS,GACV,MAAM,WAAW,CAAC;AAuBnB;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAyC;IACpE,KAAK,EAAE,aAAa;IACpB,MAAM,EAAE;QACN,KAAK,EAAE,SAAS,CAAC,SAAS,EAAE,kBAAkB,CAAC;QAC/C,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC;QACzC,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;QAC3E,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO;YACd,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE;gBAC7B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;aAC9B;SACF;QACD,aAAa,EAAE,aAAa;KAC7B;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,IAAI;KACZ;CACF,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable field definitions for the AsheeUI blocks.
|
|
3
|
+
*
|
|
4
|
+
* These builders are the boundary between a component's visual configuration and its
|
|
5
|
+
* React implementation: every option a block exposes is described here as a
|
|
6
|
+
* serializable field, so the value a consumer edits in the builder is a plain string,
|
|
7
|
+
* number or array that survives a save and a reload. Nothing in this file imports a
|
|
8
|
+
* component, and nothing it produces is a function, which is what lets the same
|
|
9
|
+
* definitions describe a block to the web editor and to the native renderer.
|
|
10
|
+
*
|
|
11
|
+
* The types come from `./types`, this package's own, rather than from the editor: the
|
|
12
|
+
* native entry has to load without a DOM editor, and a field is data either way.
|
|
13
|
+
*/
|
|
14
|
+
import type { AsheeArrayField, AsheeObjectField, AsheeSelectField, AsheeTextareaField, AsheeTextField } from "./types";
|
|
15
|
+
/**
|
|
16
|
+
* Build a select field from the values a prop accepts.
|
|
17
|
+
*
|
|
18
|
+
* The options are derived from the same tuple the component's type uses, so a value
|
|
19
|
+
* the builder offers and a value the component accepts cannot drift.
|
|
20
|
+
*
|
|
21
|
+
* @param label - Label shown in the builder.
|
|
22
|
+
* @param options - The accepted values.
|
|
23
|
+
* @returns The field definition.
|
|
24
|
+
*/
|
|
25
|
+
export declare function selectField<T extends string>(label: string, options: readonly T[]): AsheeSelectField;
|
|
26
|
+
/**
|
|
27
|
+
* Build a single-line text field.
|
|
28
|
+
*
|
|
29
|
+
* @param label - Label shown in the builder.
|
|
30
|
+
* @param placeholder - Placeholder shown in the empty field.
|
|
31
|
+
* @returns The field definition.
|
|
32
|
+
*/
|
|
33
|
+
export declare function textField(label: string, placeholder?: string): AsheeTextField;
|
|
34
|
+
/**
|
|
35
|
+
* Build a multi-line text field.
|
|
36
|
+
*
|
|
37
|
+
* @param label - Label shown in the builder.
|
|
38
|
+
* @param placeholder - Placeholder shown in the empty field.
|
|
39
|
+
* @returns The field definition.
|
|
40
|
+
*/
|
|
41
|
+
export declare function textareaField(label: string, placeholder?: string): AsheeTextareaField;
|
|
42
|
+
/**
|
|
43
|
+
* Alignment options shared by the patterns that can centre their content.
|
|
44
|
+
*/
|
|
45
|
+
export declare const ALIGNMENT_OPTIONS: readonly ["start", "center"];
|
|
46
|
+
/**
|
|
47
|
+
* Vertical rhythm options shared by the section-level blocks.
|
|
48
|
+
*/
|
|
49
|
+
export declare const SPACING_OPTIONS: readonly ["none", "xs", "sm", "md", "lg", "xl", "2xl"];
|
|
50
|
+
/**
|
|
51
|
+
* Background treatments a section-level block can offer.
|
|
52
|
+
*/
|
|
53
|
+
export declare const BACKGROUND_OPTIONS: readonly ["none", "muted", "tinted"];
|
|
54
|
+
/**
|
|
55
|
+
* Maximum content widths a block can offer.
|
|
56
|
+
*/
|
|
57
|
+
export declare const CONTAINER_SIZE_OPTIONS: readonly ["sm", "md", "lg", "xl", "full"];
|
|
58
|
+
/**
|
|
59
|
+
* Column counts a grid block can offer.
|
|
60
|
+
*/
|
|
61
|
+
export declare const COLUMNS_OPTIONS: readonly ["1", "2", "3", "4"];
|
|
62
|
+
/**
|
|
63
|
+
* Button variants a configured action can offer.
|
|
64
|
+
*/
|
|
65
|
+
export declare const ACTION_VARIANT_OPTIONS: readonly ["solid", "faded", "bordered", "ghost"];
|
|
66
|
+
/**
|
|
67
|
+
* Fields of a configured action.
|
|
68
|
+
*
|
|
69
|
+
* The shape matches the framework's `ActionConfig` for the fields a builder can own:
|
|
70
|
+
* wording, destination and emphasis. An icon, a custom component and a click handler
|
|
71
|
+
* stay out, because none of them can be serialized.
|
|
72
|
+
*/
|
|
73
|
+
export declare const ACTION_FIELDS: AsheeObjectField;
|
|
74
|
+
/**
|
|
75
|
+
* A single feature inside a feature grid.
|
|
76
|
+
*/
|
|
77
|
+
export declare const FEATURE_ITEM_FIELD: AsheeArrayField<{
|
|
78
|
+
title: string;
|
|
79
|
+
description: string;
|
|
80
|
+
}>;
|
|
81
|
+
/**
|
|
82
|
+
* A plan's feature line.
|
|
83
|
+
*/
|
|
84
|
+
export declare const PRICING_FEATURE_FIELD: AsheeArrayField<{
|
|
85
|
+
label: string;
|
|
86
|
+
included: boolean;
|
|
87
|
+
}>;
|
|
88
|
+
/**
|
|
89
|
+
* One navigation link.
|
|
90
|
+
*/
|
|
91
|
+
export declare const LINK_ITEM_FIELDS: {
|
|
92
|
+
label: AsheeTextField;
|
|
93
|
+
href: AsheeTextField;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* A testimonial quote.
|
|
97
|
+
*/
|
|
98
|
+
export declare const TESTIMONIAL_ITEM_FIELD: AsheeArrayField<{
|
|
99
|
+
quote: string;
|
|
100
|
+
name: string;
|
|
101
|
+
role: string;
|
|
102
|
+
}>;
|
|
103
|
+
//# sourceMappingURL=fields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../src/shared/fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC1C,KAAK,EAAE,MA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AAO,MAAM,gBAAgB;;;CAGa,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAAe,CAAC;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAcA,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable field definitions for the AsheeUI blocks.
|
|
3
|
+
*
|
|
4
|
+
* These builders are the boundary between a component's visual configuration and its
|
|
5
|
+
* React implementation: every option a block exposes is described here as a
|
|
6
|
+
* serializable field, so the value a consumer edits in the builder is a plain string,
|
|
7
|
+
* number or array that survives a save and a reload. Nothing in this file imports a
|
|
8
|
+
* component, and nothing it produces is a function, which is what lets the same
|
|
9
|
+
* definitions describe a block to the web editor and to the native renderer.
|
|
10
|
+
*
|
|
11
|
+
* The types come from `./types`, this package's own, rather than from the editor: the
|
|
12
|
+
* native entry has to load without a DOM editor, and a field is data either way.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Build a select field from the values a prop accepts.
|
|
16
|
+
*
|
|
17
|
+
* The options are derived from the same tuple the component's type uses, so a value
|
|
18
|
+
* the builder offers and a value the component accepts cannot drift.
|
|
19
|
+
*
|
|
20
|
+
* @param label - Label shown in the builder.
|
|
21
|
+
* @param options - The accepted values.
|
|
22
|
+
* @returns The field definition.
|
|
23
|
+
*/
|
|
24
|
+
export function selectField(label, options) {
|
|
25
|
+
return {
|
|
26
|
+
type: "select",
|
|
27
|
+
label,
|
|
28
|
+
options: options.map((value) => ({ label: value, value })),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Build a single-line text field.
|
|
33
|
+
*
|
|
34
|
+
* @param label - Label shown in the builder.
|
|
35
|
+
* @param placeholder - Placeholder shown in the empty field.
|
|
36
|
+
* @returns The field definition.
|
|
37
|
+
*/
|
|
38
|
+
export function textField(label, placeholder) {
|
|
39
|
+
return { type: "text", label, placeholder };
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Build a multi-line text field.
|
|
43
|
+
*
|
|
44
|
+
* @param label - Label shown in the builder.
|
|
45
|
+
* @param placeholder - Placeholder shown in the empty field.
|
|
46
|
+
* @returns The field definition.
|
|
47
|
+
*/
|
|
48
|
+
export function textareaField(label, placeholder) {
|
|
49
|
+
return { type: "textarea", label, placeholder };
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Alignment options shared by the patterns that can centre their content.
|
|
53
|
+
*/
|
|
54
|
+
export const ALIGNMENT_OPTIONS = ["start", "center"];
|
|
55
|
+
/**
|
|
56
|
+
* Vertical rhythm options shared by the section-level blocks.
|
|
57
|
+
*/
|
|
58
|
+
export const SPACING_OPTIONS = [
|
|
59
|
+
"none",
|
|
60
|
+
"xs",
|
|
61
|
+
"sm",
|
|
62
|
+
"md",
|
|
63
|
+
"lg",
|
|
64
|
+
"xl",
|
|
65
|
+
"2xl",
|
|
66
|
+
];
|
|
67
|
+
/**
|
|
68
|
+
* Background treatments a section-level block can offer.
|
|
69
|
+
*/
|
|
70
|
+
export const BACKGROUND_OPTIONS = ["none", "muted", "tinted"];
|
|
71
|
+
/**
|
|
72
|
+
* Maximum content widths a block can offer.
|
|
73
|
+
*/
|
|
74
|
+
export const CONTAINER_SIZE_OPTIONS = ["sm", "md", "lg", "xl", "full"];
|
|
75
|
+
/**
|
|
76
|
+
* Column counts a grid block can offer.
|
|
77
|
+
*/
|
|
78
|
+
export const COLUMNS_OPTIONS = ["1", "2", "3", "4"];
|
|
79
|
+
/**
|
|
80
|
+
* Button variants a configured action can offer.
|
|
81
|
+
*/
|
|
82
|
+
export const ACTION_VARIANT_OPTIONS = [
|
|
83
|
+
"solid",
|
|
84
|
+
"faded",
|
|
85
|
+
"bordered",
|
|
86
|
+
"ghost",
|
|
87
|
+
];
|
|
88
|
+
/**
|
|
89
|
+
* Fields of a configured action.
|
|
90
|
+
*
|
|
91
|
+
* The shape matches the framework's `ActionConfig` for the fields a builder can own:
|
|
92
|
+
* wording, destination and emphasis. An icon, a custom component and a click handler
|
|
93
|
+
* stay out, because none of them can be serialized.
|
|
94
|
+
*/
|
|
95
|
+
export const ACTION_FIELDS = {
|
|
96
|
+
type: "object",
|
|
97
|
+
label: "Action",
|
|
98
|
+
objectFields: {
|
|
99
|
+
label: textField("Action label"),
|
|
100
|
+
href: textField("Action link", "/pricing"),
|
|
101
|
+
variant: selectField("Action emphasis", ACTION_VARIANT_OPTIONS),
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* A single feature inside a feature grid.
|
|
106
|
+
*/
|
|
107
|
+
export const FEATURE_ITEM_FIELD = {
|
|
108
|
+
type: "array",
|
|
109
|
+
label: "Features",
|
|
110
|
+
arrayFields: {
|
|
111
|
+
title: textField("Feature title"),
|
|
112
|
+
description: textareaField("Feature description"),
|
|
113
|
+
},
|
|
114
|
+
defaultItemProps: { title: "New feature", description: "" },
|
|
115
|
+
getItemSummary: (item) => item.title,
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* A plan's feature line.
|
|
119
|
+
*/
|
|
120
|
+
export const PRICING_FEATURE_FIELD = {
|
|
121
|
+
type: "array",
|
|
122
|
+
label: "Feature lines",
|
|
123
|
+
arrayFields: {
|
|
124
|
+
label: textField("Line"),
|
|
125
|
+
included: {
|
|
126
|
+
type: "radio",
|
|
127
|
+
label: "Included",
|
|
128
|
+
options: [
|
|
129
|
+
{ label: "Included", value: true },
|
|
130
|
+
{ label: "Not included", value: false },
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
defaultItemProps: { label: "New line", included: true },
|
|
135
|
+
getItemSummary: (item) => item.label,
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* One navigation link.
|
|
139
|
+
*/
|
|
140
|
+
export const LINK_ITEM_FIELDS = {
|
|
141
|
+
label: textField("Link label"),
|
|
142
|
+
href: textField("Link", "/pricing"),
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* A testimonial quote.
|
|
146
|
+
*/
|
|
147
|
+
export const TESTIMONIAL_ITEM_FIELD = {
|
|
148
|
+
type: "array",
|
|
149
|
+
label: "Quotes",
|
|
150
|
+
arrayFields: {
|
|
151
|
+
quote: textareaField("Quote"),
|
|
152
|
+
name: textField("Name"),
|
|
153
|
+
role: textField("Role"),
|
|
154
|
+
},
|
|
155
|
+
defaultItemProps: {
|
|
156
|
+
quote: "They send twice as fast as they used to.",
|
|
157
|
+
name: "New customer",
|
|
158
|
+
role: "",
|
|
159
|
+
},
|
|
160
|
+
getItemSummary: (item) => item.name,
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../src/shared/fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CACzB,KAAa,EACb,OAAqB;IAErB,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,KAAK;QACL,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;KAC3D,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,WAAoB;IAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AAC9C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAa,EACb,WAAoB;IAEpB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OA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|
+
*
|
|
4
|
+
* Everything in this module is true on both platforms: the field vocabulary, the block
|
|
5
|
+
* specs, the adapters that turn a builder value into a component prop, and the contract
|
|
6
|
+
* a stored page is read through. It imports no renderer and nothing from the editor, so
|
|
7
|
+
* it is the same code in a browser bundle and on a device — which is the whole reason
|
|
8
|
+
* the package is split this way.
|
|
9
|
+
*/
|
|
10
|
+
export * from "./adapters";
|
|
11
|
+
export * from "./blocks";
|
|
12
|
+
export * from "./fields";
|
|
13
|
+
export * from "./types";
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared layer of the Puck integration.
|
|
3
|
+
*
|
|
4
|
+
* Everything in this module is true on both platforms: the field vocabulary, the block
|
|
5
|
+
* specs, the adapters that turn a builder value into a component prop, and the contract
|
|
6
|
+
* a stored page is read through. It imports no renderer and nothing from the editor, so
|
|
7
|
+
* it is the same code in a browser bundle and on a device — which is the whole reason
|
|
8
|
+
* the package is split this way.
|
|
9
|
+
*/
|
|
10
|
+
export * from "./adapters";
|
|
11
|
+
export * from "./blocks";
|
|
12
|
+
export * from "./fields";
|
|
13
|
+
export * from "./types";
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|