astroidjs 0.1.1 → 0.2.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/README.md +240 -5
- package/bin/astroid.mjs +185 -9
- package/dist/analytics/index.d.ts +37 -0
- package/dist/analytics/index.js +108 -0
- package/dist/astro/csp.d.ts +64 -0
- package/dist/astro/csp.js +173 -0
- package/dist/astro/index.d.ts +1 -0
- package/dist/astro/index.js +7 -0
- package/dist/commerce/adapters.d.ts +60 -0
- package/dist/commerce/adapters.js +90 -0
- package/dist/commerce/checkout-scaffold.d.ts +42 -0
- package/dist/commerce/checkout-scaffold.js +306 -0
- package/dist/commerce/checkout.d.ts +72 -0
- package/dist/commerce/checkout.js +124 -0
- package/dist/commerce/index.d.ts +8 -0
- package/dist/commerce/index.js +9 -0
- package/dist/commerce/loader.d.ts +71 -0
- package/dist/commerce/loader.js +90 -0
- package/dist/commerce/mirror.d.ts +67 -0
- package/dist/commerce/mirror.js +203 -0
- package/dist/commerce/roles.d.ts +38 -0
- package/dist/commerce/roles.js +93 -0
- package/dist/commerce/secrets.d.ts +74 -0
- package/dist/commerce/secrets.js +129 -0
- package/dist/commerce/sync.d.ts +86 -0
- package/dist/commerce/sync.js +154 -0
- package/dist/components/sections.d.ts +577 -0
- package/dist/components/sections.js +425 -0
- package/dist/config.d.ts +174 -12
- package/dist/config.js +43 -1
- package/dist/email/index.d.ts +4 -0
- package/dist/email/index.js +5 -0
- package/dist/email/inquiry.d.ts +33 -0
- package/dist/email/inquiry.js +63 -0
- package/dist/email/send.d.ts +120 -0
- package/dist/email/send.js +196 -0
- package/dist/email/templates.d.ts +24 -0
- package/dist/email/templates.js +184 -0
- package/dist/email/theme.d.ts +24 -0
- package/dist/email/theme.js +150 -0
- package/dist/errors.d.ts +14 -0
- package/dist/errors.js +17 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +14 -0
- package/dist/map/index.d.ts +3 -0
- package/dist/map/index.js +4 -0
- package/dist/map/pmtiles.d.ts +92 -0
- package/dist/map/pmtiles.js +130 -0
- package/dist/map/scaffold.d.ts +29 -0
- package/dist/map/scaffold.js +212 -0
- package/dist/map/style.d.ts +58 -0
- package/dist/map/style.js +154 -0
- package/dist/portal/config.d.ts +26 -0
- package/dist/portal/config.js +50 -0
- package/dist/portal/guard.d.ts +48 -0
- package/dist/portal/guard.js +64 -0
- package/dist/portal/index.d.ts +5 -0
- package/dist/portal/index.js +6 -0
- package/dist/portal/nav.d.ts +26 -0
- package/dist/portal/nav.js +35 -0
- package/dist/portal/scaffold.d.ts +28 -0
- package/dist/portal/scaffold.js +140 -0
- package/dist/portal/session.d.ts +36 -0
- package/dist/portal/session.js +86 -0
- package/dist/portfolio/index.d.ts +1 -0
- package/dist/portfolio/index.js +4 -0
- package/dist/portfolio/scaffold.d.ts +9 -0
- package/dist/portfolio/scaffold.js +93 -0
- package/dist/project/actions.d.ts +3 -0
- package/dist/project/actions.js +106 -0
- package/dist/project/generate.d.ts +15 -0
- package/dist/project/generate.js +144 -2
- package/dist/project/index.d.ts +2 -0
- package/dist/project/index.js +2 -0
- package/dist/project/scaffold.d.ts +29 -0
- package/dist/project/scaffold.js +140 -0
- package/dist/pwa/generate.d.ts +49 -0
- package/dist/pwa/generate.js +218 -0
- package/dist/pwa/index.d.ts +1 -0
- package/dist/pwa/index.js +2 -0
- package/dist/queues/consumer.d.ts +29 -0
- package/dist/queues/consumer.js +37 -0
- package/dist/queues/index.d.ts +4 -0
- package/dist/queues/index.js +5 -0
- package/dist/queues/messages.d.ts +60 -0
- package/dist/queues/messages.js +71 -0
- package/dist/queues/scaffold.d.ts +44 -0
- package/dist/queues/scaffold.js +204 -0
- package/dist/queues/webhook.d.ts +60 -0
- package/dist/queues/webhook.js +81 -0
- package/dist/realtime/index.d.ts +1 -0
- package/dist/realtime/index.js +4 -0
- package/dist/realtime/scaffold.d.ts +30 -0
- package/dist/realtime/scaffold.js +159 -0
- package/dist/schema/collections.d.ts +42 -8
- package/dist/schema/collections.js +102 -8
- package/dist/schema/generate.js +10 -1
- package/dist/secrets.d.ts +54 -0
- package/dist/secrets.js +80 -0
- package/dist/security/index.d.ts +1 -0
- package/dist/security/index.js +2 -0
- package/dist/security/rate-rules.d.ts +21 -0
- package/dist/security/rate-rules.js +107 -0
- package/dist/seo/index.d.ts +3 -0
- package/dist/seo/index.js +4 -0
- package/dist/seo/resolve.d.ts +68 -0
- package/dist/seo/resolve.js +73 -0
- package/dist/seo/routes.d.ts +44 -0
- package/dist/seo/routes.js +104 -0
- package/dist/seo/structured-data.d.ts +51 -0
- package/dist/seo/structured-data.js +105 -0
- package/dist/status.d.ts +51 -0
- package/dist/status.js +113 -0
- package/dist/worker/generate.d.ts +18 -10
- package/dist/worker/generate.js +325 -37
- package/dist/worker/routes.d.ts +1 -1
- package/dist/worker/routes.js +42 -0
- package/dist/workflow/advance.d.ts +102 -0
- package/dist/workflow/advance.js +145 -0
- package/dist/workflow/config.d.ts +60 -0
- package/dist/workflow/config.js +73 -0
- package/dist/workflow/generate.d.ts +22 -0
- package/dist/workflow/generate.js +138 -0
- package/dist/workflow/index.d.ts +3 -0
- package/dist/workflow/index.js +4 -0
- package/package.json +21 -5
- package/src/components/Editable.astro +33 -9
- package/src/components/JustifiedGallery.astro +254 -0
- package/src/components/MediaSlot.astro +178 -0
- package/src/components/PortalShell.astro +80 -0
- package/src/components/RegisterSW.astro +45 -0
- package/src/components/Section.astro +101 -35
- package/src/components/Sections.astro +64 -0
- package/src/components/Seo.astro +57 -0
- package/src/components/StageBar.astro +137 -0
- package/src/components/StructuredData.astro +33 -0
- package/src/components/justify.ts +170 -0
- package/src/components/media-meta.ts +174 -0
- package/src/components/sections/AboutIntro.astro +46 -0
- package/src/components/sections/Banner.astro +31 -0
- package/src/components/sections/Contact.astro +22 -9
- package/src/components/sections/Cta.astro +33 -10
- package/src/components/sections/Faq.astro +50 -0
- package/src/components/sections/FeatureGrid.astro +40 -11
- package/src/components/sections/Gallery.astro +46 -0
- package/src/components/sections/Hero.astro +40 -12
- package/src/components/sections/LocationHours.astro +59 -0
- package/src/components/sections/Media.astro +44 -0
- package/src/components/sections/PricingTiers.astro +79 -0
- package/src/components/sections/ProductGrid.astro +73 -0
- package/src/components/sections/SplitImage.astro +61 -0
- package/src/components/sections/Steps.astro +58 -0
- package/src/components/sections/Testimonial.astro +51 -0
- package/src/components/sections.ts +452 -67
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import type { SectionCatalog, SectionDef, SectionField, SectionItem } from "louise-toolkit/content";
|
|
2
|
+
export type { SectionCatalog, SectionDef, SectionField, SectionItem };
|
|
3
|
+
/**
|
|
4
|
+
* Colorway → daisyUI surface classes, keyed to the `Theme.colors` set
|
|
5
|
+
* (brand/secondary/tertiary) plus the neutral base.
|
|
6
|
+
*
|
|
7
|
+
* This map is the site-owned half of the token contract: Louise stores
|
|
8
|
+
* `_settings.colorway = "brand"` and never learns what that renders as, so a
|
|
9
|
+
* brand re-theme is a change here and no content rewrite anywhere.
|
|
10
|
+
*/
|
|
11
|
+
export declare const COLORWAY_CLASS: {
|
|
12
|
+
readonly brand: "bg-primary text-primary-content";
|
|
13
|
+
readonly secondary: "bg-secondary text-secondary-content";
|
|
14
|
+
readonly tertiary: "bg-accent text-accent-content";
|
|
15
|
+
readonly base: "bg-base-100 text-base-content";
|
|
16
|
+
};
|
|
17
|
+
export type Colorway = keyof typeof COLORWAY_CLASS;
|
|
18
|
+
/** Content alignment → flex/text-alignment utilities. Same token contract. */
|
|
19
|
+
export declare const ALIGN_CLASS: {
|
|
20
|
+
readonly start: "text-start items-start";
|
|
21
|
+
readonly center: "text-center items-center";
|
|
22
|
+
readonly end: "text-end items-end";
|
|
23
|
+
};
|
|
24
|
+
export type Align = keyof typeof ALIGN_CLASS;
|
|
25
|
+
/** Resolve a colorway token to its class string (default: neutral base). */
|
|
26
|
+
export declare function colorwayClass(colorway?: string | undefined): string;
|
|
27
|
+
/** Resolve an alignment token to its class string (default: start). */
|
|
28
|
+
export declare function alignClass(align?: string | undefined): string;
|
|
29
|
+
/**
|
|
30
|
+
* The shared `_settings` every section in the catalog accepts.
|
|
31
|
+
*
|
|
32
|
+
* These are closed token sets, declared as `select` (#272) so the inspector
|
|
33
|
+
* renders a picker and an unknown token is rejected on write. They used to be
|
|
34
|
+
* `text` with the valid values stuffed into `placeholder` — which meant a typo
|
|
35
|
+
* wasn't a validation error at all, just a silent fallback to the default
|
|
36
|
+
* inside `colorwayClass` at render time.
|
|
37
|
+
*/
|
|
38
|
+
export declare const SECTION_SETTINGS: Record<string, SectionField>;
|
|
39
|
+
/**
|
|
40
|
+
* What every section render component receives.
|
|
41
|
+
*
|
|
42
|
+
* `base` is the whole point. It is this item's path within the page's `sections`
|
|
43
|
+
* array — `"2"` for a top-level section, `"2.blocks.0"` for a block inside it —
|
|
44
|
+
* and every marker the component stamps is built from it. Passing it down (rather
|
|
45
|
+
* than having each component work out its own depth) is what lets the exact same
|
|
46
|
+
* component render as a section or as a block, and what keeps `data-louise-sfield`
|
|
47
|
+
* paths correct at any nesting depth.
|
|
48
|
+
*/
|
|
49
|
+
export interface SectionRenderProps {
|
|
50
|
+
/** The stored item: `_type` plus its field values, settings, and blocks. */
|
|
51
|
+
item: SectionItem;
|
|
52
|
+
/** Path prefix for this item's markers (`"2"`, `"2.blocks.0"`). */
|
|
53
|
+
base: string;
|
|
54
|
+
/** Whether to stamp edit markers. Defaults to `Astro.locals.editMode`. */
|
|
55
|
+
edit?: boolean;
|
|
56
|
+
/** Alt/caption resolved from the media registry, keyed by public URL —
|
|
57
|
+
* looked up once for the whole page by `<Sections>`. */
|
|
58
|
+
mediaMeta?: MediaMeta;
|
|
59
|
+
}
|
|
60
|
+
/** Asset-level `alt`/`caption` from the media registry, keyed by public URL. */
|
|
61
|
+
export type MediaMeta = Record<string, {
|
|
62
|
+
alt?: string;
|
|
63
|
+
caption?: string;
|
|
64
|
+
}>;
|
|
65
|
+
/** Read a `_settings` token as a string, or a fallback. Tolerant by design: a
|
|
66
|
+
* stored setting is untrusted JSON, and a bad token should degrade to the
|
|
67
|
+
* default rather than throw during render. */
|
|
68
|
+
export declare function setting(item: SectionItem, key: string, fallback?: string): string | undefined;
|
|
69
|
+
/** Read a section field as a string (the common case for text/richText). */
|
|
70
|
+
export declare function field(item: SectionItem, key: string): string | undefined;
|
|
71
|
+
/** Read an `array` field as a list of objects, or `[]`. Stored arrays are
|
|
72
|
+
* untrusted, so a non-array or a scalar entry is dropped rather than rendered. */
|
|
73
|
+
export declare function list(item: SectionItem, key: string): Record<string, unknown>[];
|
|
74
|
+
/** Read a string off an array item (see {@link list}). */
|
|
75
|
+
export declare function itemField(row: Record<string, unknown>, key: string): string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Alt text for an image, resolving the ASSET-LEVEL fallback.
|
|
78
|
+
*
|
|
79
|
+
* The precedence is the whole reason `<Sections>` does its media lookup: a
|
|
80
|
+
* per-usage `alt` on the section wins, because the same photo means something
|
|
81
|
+
* different in a hero than in a thumbnail strip — but when there isn't one, the
|
|
82
|
+
* alt an editor typed once in the media library is used. That's what makes
|
|
83
|
+
* fixing alt text a single edit that propagates everywhere the asset appears,
|
|
84
|
+
* instead of a hunt through every page that embeds it.
|
|
85
|
+
*
|
|
86
|
+
* Returns `""` rather than undefined when neither exists: an image with no
|
|
87
|
+
* description is decorative as far as a screen reader is concerned, and an
|
|
88
|
+
* empty alt says exactly that. A missing attribute makes it read the filename.
|
|
89
|
+
*/
|
|
90
|
+
export declare function mediaAlt(mediaMeta: MediaMeta | undefined, src: string | undefined, override?: string): string;
|
|
91
|
+
/** Caption for an image, same precedence as {@link mediaAlt}. Undefined when
|
|
92
|
+
* there is none — a missing caption renders nothing, unlike a missing alt. */
|
|
93
|
+
export declare function mediaCaption(mediaMeta: MediaMeta | undefined, src: string | undefined, override?: string): string | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Every section type Astroid ships.
|
|
96
|
+
*
|
|
97
|
+
* `satisfies` rather than a `: SectionCatalog` annotation, and it matters:
|
|
98
|
+
* `SectionCatalog` is `Record<string, SectionDef>`, so annotating would widen
|
|
99
|
+
* `keyof typeof` to `string` and throw away the literal keys. Those keys are
|
|
100
|
+
* the project's whole section vocabulary — `SectionKind` is derived from them
|
|
101
|
+
* (config.ts), `isRenderableSection` narrows to them, and `<Section>` indexes
|
|
102
|
+
* its component map with them. Annotate this and all three silently degrade to
|
|
103
|
+
* "any string", which is how the dispatcher lost its type safety once already.
|
|
104
|
+
*/
|
|
105
|
+
export declare const astroidSectionCatalog: {
|
|
106
|
+
hero: {
|
|
107
|
+
label: string;
|
|
108
|
+
icon: string;
|
|
109
|
+
fields: {
|
|
110
|
+
heading: {
|
|
111
|
+
type: "text";
|
|
112
|
+
label: string;
|
|
113
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
114
|
+
};
|
|
115
|
+
subheading: {
|
|
116
|
+
type: "textarea";
|
|
117
|
+
label: string;
|
|
118
|
+
};
|
|
119
|
+
ctaLabel: {
|
|
120
|
+
type: "text";
|
|
121
|
+
label: string;
|
|
122
|
+
};
|
|
123
|
+
ctaHref: {
|
|
124
|
+
type: "text";
|
|
125
|
+
label: string;
|
|
126
|
+
inline: false;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
settings: Record<string, SectionField>;
|
|
130
|
+
};
|
|
131
|
+
featureGrid: {
|
|
132
|
+
label: string;
|
|
133
|
+
icon: string;
|
|
134
|
+
fields: {
|
|
135
|
+
heading: {
|
|
136
|
+
type: "text";
|
|
137
|
+
label: string;
|
|
138
|
+
};
|
|
139
|
+
items: {
|
|
140
|
+
type: "array";
|
|
141
|
+
label: string;
|
|
142
|
+
itemLabel: string;
|
|
143
|
+
itemFields: {
|
|
144
|
+
title: {
|
|
145
|
+
type: "text";
|
|
146
|
+
label: string;
|
|
147
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
148
|
+
};
|
|
149
|
+
body: {
|
|
150
|
+
type: "textarea";
|
|
151
|
+
label: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
settings: Record<string, SectionField>;
|
|
157
|
+
};
|
|
158
|
+
cta: {
|
|
159
|
+
label: string;
|
|
160
|
+
icon: string;
|
|
161
|
+
fields: {
|
|
162
|
+
heading: {
|
|
163
|
+
type: "text";
|
|
164
|
+
label: string;
|
|
165
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
166
|
+
};
|
|
167
|
+
body: {
|
|
168
|
+
type: "textarea";
|
|
169
|
+
label: string;
|
|
170
|
+
};
|
|
171
|
+
ctaLabel: {
|
|
172
|
+
type: "text";
|
|
173
|
+
label: string;
|
|
174
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
175
|
+
};
|
|
176
|
+
ctaHref: {
|
|
177
|
+
type: "text";
|
|
178
|
+
label: string;
|
|
179
|
+
inline: false;
|
|
180
|
+
};
|
|
181
|
+
};
|
|
182
|
+
settings: Record<string, SectionField>;
|
|
183
|
+
};
|
|
184
|
+
gallery: {
|
|
185
|
+
label: string;
|
|
186
|
+
icon: string;
|
|
187
|
+
fields: {
|
|
188
|
+
heading: {
|
|
189
|
+
type: "text";
|
|
190
|
+
label: string;
|
|
191
|
+
};
|
|
192
|
+
items: {
|
|
193
|
+
type: "array";
|
|
194
|
+
label: string;
|
|
195
|
+
itemLabel: string;
|
|
196
|
+
itemFields: {
|
|
197
|
+
image: {
|
|
198
|
+
type: "image";
|
|
199
|
+
label: string;
|
|
200
|
+
};
|
|
201
|
+
alt: {
|
|
202
|
+
type: "text";
|
|
203
|
+
label: string;
|
|
204
|
+
inline: false;
|
|
205
|
+
};
|
|
206
|
+
caption: {
|
|
207
|
+
type: "text";
|
|
208
|
+
label: string;
|
|
209
|
+
};
|
|
210
|
+
href: {
|
|
211
|
+
type: "text";
|
|
212
|
+
label: string;
|
|
213
|
+
inline: false;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
settings: Record<string, SectionField>;
|
|
219
|
+
};
|
|
220
|
+
media: {
|
|
221
|
+
label: string;
|
|
222
|
+
icon: string;
|
|
223
|
+
fields: {
|
|
224
|
+
heading: {
|
|
225
|
+
type: "text";
|
|
226
|
+
label: string;
|
|
227
|
+
};
|
|
228
|
+
image: {
|
|
229
|
+
type: "image";
|
|
230
|
+
label: string;
|
|
231
|
+
};
|
|
232
|
+
alt: {
|
|
233
|
+
type: "text";
|
|
234
|
+
label: string;
|
|
235
|
+
inline: false;
|
|
236
|
+
};
|
|
237
|
+
caption: {
|
|
238
|
+
type: "text";
|
|
239
|
+
label: string;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
settings: Record<string, SectionField>;
|
|
243
|
+
};
|
|
244
|
+
splitImage: {
|
|
245
|
+
label: string;
|
|
246
|
+
icon: string;
|
|
247
|
+
fields: {
|
|
248
|
+
heading: {
|
|
249
|
+
type: "text";
|
|
250
|
+
label: string;
|
|
251
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
252
|
+
};
|
|
253
|
+
body: {
|
|
254
|
+
type: "richText";
|
|
255
|
+
label: string;
|
|
256
|
+
};
|
|
257
|
+
image: {
|
|
258
|
+
type: "image";
|
|
259
|
+
label: string;
|
|
260
|
+
};
|
|
261
|
+
alt: {
|
|
262
|
+
type: "text";
|
|
263
|
+
label: string;
|
|
264
|
+
inline: false;
|
|
265
|
+
};
|
|
266
|
+
ctaLabel: {
|
|
267
|
+
type: "text";
|
|
268
|
+
label: string;
|
|
269
|
+
};
|
|
270
|
+
ctaHref: {
|
|
271
|
+
type: "text";
|
|
272
|
+
label: string;
|
|
273
|
+
inline: false;
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
layouts: {
|
|
277
|
+
imageStart: {
|
|
278
|
+
label: string;
|
|
279
|
+
};
|
|
280
|
+
imageEnd: {
|
|
281
|
+
label: string;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
settings: Record<string, SectionField>;
|
|
285
|
+
};
|
|
286
|
+
steps: {
|
|
287
|
+
label: string;
|
|
288
|
+
icon: string;
|
|
289
|
+
fields: {
|
|
290
|
+
heading: {
|
|
291
|
+
type: "text";
|
|
292
|
+
label: string;
|
|
293
|
+
};
|
|
294
|
+
items: {
|
|
295
|
+
type: "array";
|
|
296
|
+
label: string;
|
|
297
|
+
itemLabel: string;
|
|
298
|
+
itemFields: {
|
|
299
|
+
title: {
|
|
300
|
+
type: "text";
|
|
301
|
+
label: string;
|
|
302
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
303
|
+
};
|
|
304
|
+
body: {
|
|
305
|
+
type: "textarea";
|
|
306
|
+
label: string;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
settings: Record<string, SectionField>;
|
|
312
|
+
};
|
|
313
|
+
banner: {
|
|
314
|
+
label: string;
|
|
315
|
+
icon: string;
|
|
316
|
+
fields: {
|
|
317
|
+
text: {
|
|
318
|
+
type: "text";
|
|
319
|
+
label: string;
|
|
320
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
321
|
+
};
|
|
322
|
+
ctaLabel: {
|
|
323
|
+
type: "text";
|
|
324
|
+
label: string;
|
|
325
|
+
};
|
|
326
|
+
ctaHref: {
|
|
327
|
+
type: "text";
|
|
328
|
+
label: string;
|
|
329
|
+
inline: false;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
settings: Record<string, SectionField>;
|
|
333
|
+
};
|
|
334
|
+
faq: {
|
|
335
|
+
label: string;
|
|
336
|
+
icon: string;
|
|
337
|
+
fields: {
|
|
338
|
+
heading: {
|
|
339
|
+
type: "text";
|
|
340
|
+
label: string;
|
|
341
|
+
};
|
|
342
|
+
items: {
|
|
343
|
+
type: "array";
|
|
344
|
+
label: string;
|
|
345
|
+
itemLabel: string;
|
|
346
|
+
itemFields: {
|
|
347
|
+
question: {
|
|
348
|
+
type: "text";
|
|
349
|
+
label: string;
|
|
350
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
351
|
+
};
|
|
352
|
+
answer: {
|
|
353
|
+
type: "richText";
|
|
354
|
+
label: string;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
settings: Record<string, SectionField>;
|
|
360
|
+
};
|
|
361
|
+
pricingTiers: {
|
|
362
|
+
label: string;
|
|
363
|
+
icon: string;
|
|
364
|
+
fields: {
|
|
365
|
+
heading: {
|
|
366
|
+
type: "text";
|
|
367
|
+
label: string;
|
|
368
|
+
};
|
|
369
|
+
items: {
|
|
370
|
+
type: "array";
|
|
371
|
+
label: string;
|
|
372
|
+
itemLabel: string;
|
|
373
|
+
itemFields: {
|
|
374
|
+
name: {
|
|
375
|
+
type: "text";
|
|
376
|
+
label: string;
|
|
377
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
378
|
+
};
|
|
379
|
+
price: {
|
|
380
|
+
type: "text";
|
|
381
|
+
label: string;
|
|
382
|
+
};
|
|
383
|
+
period: {
|
|
384
|
+
type: "text";
|
|
385
|
+
label: string;
|
|
386
|
+
};
|
|
387
|
+
features: {
|
|
388
|
+
type: "array";
|
|
389
|
+
label: string;
|
|
390
|
+
itemLabel: string;
|
|
391
|
+
itemFields: {
|
|
392
|
+
text: {
|
|
393
|
+
type: "text";
|
|
394
|
+
label: string;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
ctaLabel: {
|
|
399
|
+
type: "text";
|
|
400
|
+
label: string;
|
|
401
|
+
};
|
|
402
|
+
ctaHref: {
|
|
403
|
+
type: "text";
|
|
404
|
+
label: string;
|
|
405
|
+
inline: false;
|
|
406
|
+
};
|
|
407
|
+
featured: {
|
|
408
|
+
type: "select";
|
|
409
|
+
label: string;
|
|
410
|
+
inline: false;
|
|
411
|
+
options: {
|
|
412
|
+
value: string;
|
|
413
|
+
label: string;
|
|
414
|
+
}[];
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
settings: Record<string, SectionField>;
|
|
420
|
+
};
|
|
421
|
+
testimonial: {
|
|
422
|
+
label: string;
|
|
423
|
+
icon: string;
|
|
424
|
+
fields: {
|
|
425
|
+
quote: {
|
|
426
|
+
type: "textarea";
|
|
427
|
+
label: string;
|
|
428
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
429
|
+
};
|
|
430
|
+
attribution: {
|
|
431
|
+
type: "text";
|
|
432
|
+
label: string;
|
|
433
|
+
};
|
|
434
|
+
role: {
|
|
435
|
+
type: "text";
|
|
436
|
+
label: string;
|
|
437
|
+
};
|
|
438
|
+
image: {
|
|
439
|
+
type: "image";
|
|
440
|
+
label: string;
|
|
441
|
+
};
|
|
442
|
+
alt: {
|
|
443
|
+
type: "text";
|
|
444
|
+
label: string;
|
|
445
|
+
inline: false;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
settings: Record<string, SectionField>;
|
|
449
|
+
};
|
|
450
|
+
aboutIntro: {
|
|
451
|
+
label: string;
|
|
452
|
+
icon: string;
|
|
453
|
+
fields: {
|
|
454
|
+
heading: {
|
|
455
|
+
type: "text";
|
|
456
|
+
label: string;
|
|
457
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
458
|
+
};
|
|
459
|
+
body: {
|
|
460
|
+
type: "richText";
|
|
461
|
+
label: string;
|
|
462
|
+
};
|
|
463
|
+
image: {
|
|
464
|
+
type: "image";
|
|
465
|
+
label: string;
|
|
466
|
+
};
|
|
467
|
+
alt: {
|
|
468
|
+
type: "text";
|
|
469
|
+
label: string;
|
|
470
|
+
inline: false;
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
settings: Record<string, SectionField>;
|
|
474
|
+
};
|
|
475
|
+
productGrid: {
|
|
476
|
+
label: string;
|
|
477
|
+
icon: string;
|
|
478
|
+
fields: {
|
|
479
|
+
heading: {
|
|
480
|
+
type: "text";
|
|
481
|
+
label: string;
|
|
482
|
+
};
|
|
483
|
+
items: {
|
|
484
|
+
type: "array";
|
|
485
|
+
label: string;
|
|
486
|
+
itemLabel: string;
|
|
487
|
+
itemFields: {
|
|
488
|
+
name: {
|
|
489
|
+
type: "text";
|
|
490
|
+
label: string;
|
|
491
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
492
|
+
};
|
|
493
|
+
price: {
|
|
494
|
+
type: "text";
|
|
495
|
+
label: string;
|
|
496
|
+
};
|
|
497
|
+
image: {
|
|
498
|
+
type: "image";
|
|
499
|
+
label: string;
|
|
500
|
+
};
|
|
501
|
+
alt: {
|
|
502
|
+
type: "text";
|
|
503
|
+
label: string;
|
|
504
|
+
inline: false;
|
|
505
|
+
};
|
|
506
|
+
href: {
|
|
507
|
+
type: "text";
|
|
508
|
+
label: string;
|
|
509
|
+
inline: false;
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
settings: Record<string, SectionField>;
|
|
515
|
+
};
|
|
516
|
+
locationHours: {
|
|
517
|
+
label: string;
|
|
518
|
+
icon: string;
|
|
519
|
+
fields: {
|
|
520
|
+
heading: {
|
|
521
|
+
type: "text";
|
|
522
|
+
label: string;
|
|
523
|
+
};
|
|
524
|
+
address: {
|
|
525
|
+
type: "textarea";
|
|
526
|
+
label: string;
|
|
527
|
+
};
|
|
528
|
+
phone: {
|
|
529
|
+
type: "text";
|
|
530
|
+
label: string;
|
|
531
|
+
};
|
|
532
|
+
items: {
|
|
533
|
+
type: "array";
|
|
534
|
+
label: string;
|
|
535
|
+
itemLabel: string;
|
|
536
|
+
itemFields: {
|
|
537
|
+
day: {
|
|
538
|
+
type: "text";
|
|
539
|
+
label: string;
|
|
540
|
+
validation: (r: import("louise-toolkit/content").Rule) => import("louise-toolkit/content").Rule;
|
|
541
|
+
};
|
|
542
|
+
hours: {
|
|
543
|
+
type: "text";
|
|
544
|
+
label: string;
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
settings: Record<string, SectionField>;
|
|
550
|
+
};
|
|
551
|
+
contact: {
|
|
552
|
+
label: string;
|
|
553
|
+
icon: string;
|
|
554
|
+
fields: {
|
|
555
|
+
heading: {
|
|
556
|
+
type: "text";
|
|
557
|
+
label: string;
|
|
558
|
+
};
|
|
559
|
+
blurb: {
|
|
560
|
+
type: "textarea";
|
|
561
|
+
label: string;
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
settings: Record<string, SectionField>;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
/** The `_type`s with a shipped render component — derived from the catalog, so
|
|
568
|
+
* it can't drift from what `<Section>` actually dispatches. A literal union,
|
|
569
|
+
* not `string`, because the catalog is declared with `satisfies`. */
|
|
570
|
+
export type RenderableSectionType = keyof typeof astroidSectionCatalog;
|
|
571
|
+
/**
|
|
572
|
+
* Does this `_type` have a shipped component? Narrows the untrusted `_type` of a
|
|
573
|
+
* stored item, so `<Sections>` can skip an unknown one instead of rendering a
|
|
574
|
+
* hole. (Unknown types are legitimate mid-migration, and `validateSections`
|
|
575
|
+
* already rejects them on write.)
|
|
576
|
+
*/
|
|
577
|
+
export declare function isRenderableSection(type: string): type is RenderableSectionType;
|