@caltho/site-kit 0.2.10 → 0.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/README.md +146 -16
- package/dist/behaviors/accordion.d.ts +4 -0
- package/dist/behaviors/accordion.js +56 -0
- package/dist/behaviors/carousel.d.ts +4 -0
- package/dist/behaviors/carousel.js +127 -0
- package/dist/behaviors/filter.d.ts +1 -0
- package/dist/behaviors/filter.js +25 -0
- package/dist/behaviors/index.d.ts +14 -0
- package/dist/behaviors/index.js +78 -0
- package/dist/behaviors/motion.d.ts +13 -0
- package/dist/behaviors/motion.js +88 -0
- package/dist/behaviors/tabs.d.ts +3 -0
- package/dist/behaviors/tabs.js +55 -0
- package/dist/built/css.d.ts +2 -0
- package/dist/built/css.js +26 -0
- package/dist/built/theme.d.ts +19 -0
- package/dist/built/theme.js +86 -0
- package/dist/built/tree.d.ts +24 -0
- package/dist/built/tree.js +96 -0
- package/dist/built.test.d.ts +1 -0
- package/dist/built.test.js +257 -0
- package/dist/cli/check.js +31 -1
- package/dist/consent.d.ts +33 -0
- package/dist/consent.js +36 -0
- package/dist/consent.test.d.ts +1 -0
- package/dist/consent.test.js +61 -0
- package/dist/content/index.d.ts +450 -33
- package/dist/content/index.js +297 -15
- package/dist/content/lists.d.ts +69 -0
- package/dist/content/lists.js +77 -0
- package/dist/content/lists.test.d.ts +1 -0
- package/dist/content/lists.test.js +257 -0
- package/dist/content/look.d.ts +260 -9
- package/dist/content/look.js +386 -22
- package/dist/content-migrate.d.ts +51 -0
- package/dist/content-migrate.js +69 -0
- package/dist/finish.d.ts +1 -1
- package/dist/finish.js +27 -6
- package/dist/fonts/families/dm-sans/LICENSE +93 -0
- package/dist/fonts/families/dm-sans/dm-sans-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/families/dm-sans/dm-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/families/dm-sans/dm-sans-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/families/dm-sans/dm-sans-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/families/fraunces/LICENSE +93 -0
- package/dist/fonts/families/fraunces/fraunces-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/families/fraunces/fraunces-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/families/fraunces/fraunces-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/families/fraunces/fraunces-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/families/inter/LICENSE +93 -0
- package/dist/fonts/families/inter/inter-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/families/inter/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/families/inter/inter-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/families/inter/inter-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/families/lora/LICENSE +93 -0
- package/dist/fonts/families/lora/lora-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/families/lora/lora-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/families/lora/lora-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/families/lora/lora-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/families/manrope/LICENSE +93 -0
- package/dist/fonts/families/manrope/manrope-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/families/manrope/manrope-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/families/newsreader/LICENSE +93 -0
- package/dist/fonts/families/newsreader/newsreader-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/families/newsreader/newsreader-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/families/newsreader/newsreader-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/families/newsreader/newsreader-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/families/outfit/LICENSE +93 -0
- package/dist/fonts/families/outfit/outfit-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/families/outfit/outfit-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/families/playfair-display/LICENSE +93 -0
- package/dist/fonts/families/playfair-display/playfair-display-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/families/playfair-display/playfair-display-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/families/playfair-display/playfair-display-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/families/playfair-display/playfair-display-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/families/source-serif-4/LICENSE +93 -0
- package/dist/fonts/families/source-serif-4/source-serif-4-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/families/source-serif-4/source-serif-4-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/families/source-serif-4/source-serif-4-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/families/source-serif-4/source-serif-4-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/families/work-sans/LICENSE +93 -0
- package/dist/fonts/families/work-sans/work-sans-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/families/work-sans/work-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/families/work-sans/work-sans-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/families/work-sans/work-sans-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/google.json +1 -0
- package/dist/fonts-google.d.ts +35 -0
- package/dist/fonts-google.js +70 -0
- package/dist/fonts.css +365 -0
- package/dist/frame.test.d.ts +1 -0
- package/dist/frame.test.js +58 -0
- package/dist/migrate.d.ts +45 -0
- package/dist/migrate.js +284 -0
- package/dist/next/block-mark.d.ts +7 -0
- package/dist/next/block-mark.js +16 -0
- package/dist/next/blocks.d.ts +11 -0
- package/dist/next/blocks.js +35 -0
- package/dist/next/built.d.ts +40 -0
- package/dist/next/built.js +318 -0
- package/dist/next/consent.d.ts +4 -0
- package/dist/next/consent.js +13 -0
- package/dist/next/data.d.ts +6 -2
- package/dist/next/data.js +10 -4
- package/dist/next/frame.d.ts +42 -0
- package/dist/next/frame.js +73 -0
- package/dist/next/index.d.ts +8 -2
- package/dist/next/index.js +9 -3
- package/dist/next/menu-group.d.ts +11 -0
- package/dist/next/menu-group.js +33 -0
- package/dist/next/metadata.js +3 -2
- package/dist/next/parts/Img.d.ts +6 -1
- package/dist/next/parts/Img.js +11 -3
- package/dist/next/parts/LookStyle.js +3 -1
- package/dist/next/preview.js +511 -27
- package/dist/next/sections.d.ts +19 -10
- package/dist/next/sections.js +134 -17
- package/dist/policies.js +22 -4
- package/dist/prepare.d.ts +15 -1
- package/dist/prepare.js +125 -3
- package/dist/preview-match.d.ts +29 -0
- package/dist/preview-match.js +58 -1
- package/dist/schema.d.ts +10 -0
- package/dist/schema.js +29 -1
- package/dist/sections/icons.d.ts +49 -0
- package/dist/sections/icons.js +55 -0
- package/dist/sections/index.d.ts +188 -12
- package/dist/sections/index.js +136 -10
- package/dist/sections/presets.d.ts +13 -0
- package/dist/sections/presets.js +300 -0
- package/dist/sections.css +1584 -41
- package/dist/sections.test.js +276 -14
- package/dist/seo.js +2 -1
- package/dist/tree/behaviors.d.ts +50 -0
- package/dist/tree/behaviors.js +67 -0
- package/dist/tree/classes.d.ts +24 -0
- package/dist/tree/classes.js +94 -0
- package/dist/tree/index.d.ts +145 -0
- package/dist/tree/index.js +196 -0
- package/dist/tree/messages.d.ts +45 -0
- package/dist/tree/messages.js +7 -0
- package/package.json +22 -3
package/dist/preview-match.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// Which field of the content a click in CalOS's preview landed on, with no markers in the site's
|
|
2
2
|
// components: the words clicked are matched against the content's text, a picture by its address.
|
|
3
3
|
// Pure, so it's tested here and runs in the preview in the browser.
|
|
4
|
+
import { PREFIX } from "./built/theme.js";
|
|
5
|
+
import { splitVariants } from "./tree/classes.js";
|
|
4
6
|
/** The preview page's list of the pictures its build made (by path), as a JSON script with this id (../finish.ts). */
|
|
5
7
|
export const BUILT_IMAGES = "calos-built-images";
|
|
6
8
|
/** Keys that hold no words a visitor reads: never what a click on words means. */
|
|
7
|
-
const SKIP = new Set(["type", "id", "href", "path", "style", "menuStyle", "footer", "ratio", "tone"]);
|
|
9
|
+
const SKIP = new Set(["type", "id", "href", "url", "path", "style", "menuStyle", "footer", "ratio", "tone"]);
|
|
8
10
|
/** Words as they read on the page: Markdown's marks gone, a link's address gone, spacing and case evened. */
|
|
9
11
|
export function readable(text) {
|
|
10
12
|
return text
|
|
@@ -78,3 +80,58 @@ export function fieldForImage(value, base, url, images) {
|
|
|
78
80
|
// The picture's group (its src and alt together) is what's edited.
|
|
79
81
|
return hit.path.slice(0, -1).length > base.length ? hit.path.slice(0, -1) : hit.path;
|
|
80
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Which block drew each of `main`'s drawn children, by the block's index (null: not known). `drawn`:
|
|
85
|
+
* each child's words, its pictures' alt text included. One drawn for each block pairs them in order.
|
|
86
|
+
* Otherwise they're found by their words, in order: a block may draw nothing (a list with nothing in
|
|
87
|
+
* it yet) or more than one (a hero above its rows), and a child without the words to say is left
|
|
88
|
+
* unknown, never guessed, unless the next block has no words to find it by.
|
|
89
|
+
*/
|
|
90
|
+
export function matchBlocks(blocks, drawn) {
|
|
91
|
+
if (drawn.length === blocks.length)
|
|
92
|
+
return blocks.map((_, i) => i);
|
|
93
|
+
const page = drawn.map(readable);
|
|
94
|
+
const words = blocks.map((b) => textsIn(b).map((t) => readable(t.text)).filter((t) => t.length >= 4));
|
|
95
|
+
const out = [];
|
|
96
|
+
let last = -1;
|
|
97
|
+
for (const text of page) {
|
|
98
|
+
// A later block whose words are here, else more of the block before (its words here too), else
|
|
99
|
+
// the next one when it has no words to be found by.
|
|
100
|
+
const shows = (i) => words[i].some((w) => text.includes(w));
|
|
101
|
+
let at = null;
|
|
102
|
+
for (let i = last + 1; i < blocks.length && at === null; i++)
|
|
103
|
+
if (shows(i))
|
|
104
|
+
at = i;
|
|
105
|
+
if (at === null && last >= 0 && shows(last))
|
|
106
|
+
at = last;
|
|
107
|
+
if (at === null && last + 1 < blocks.length && !words[last + 1].length)
|
|
108
|
+
at = last + 1;
|
|
109
|
+
out.push(at);
|
|
110
|
+
if (at !== null)
|
|
111
|
+
last = at;
|
|
112
|
+
}
|
|
113
|
+
return out;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Whether an element is one a person sees, from it and each element it's in (itself first): not in
|
|
117
|
+
* something hidden from them (a carousel's other slides, stacked in the same place and faded out,
|
|
118
|
+
* aria-hidden or inert) and not faded out to nothing. A click is matched only against what's seen,
|
|
119
|
+
* so the slide showing is the one a click on it opens, not one faded out on top of it.
|
|
120
|
+
*/
|
|
121
|
+
export function isShown(chain) {
|
|
122
|
+
return chain.every((c) => c.ariaHidden !== "true" && !c.inert && c.visibility !== "hidden" && c.display !== "none" && !(Number(c.opacity) < 0.05));
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* A built section's class (as drawn, prefixed) without the state variants given: `kit:md:hover:bg-ink`
|
|
126
|
+
* without hover is `kit:md:bg-ink`, which the preview adds to draw an element as hovered while its
|
|
127
|
+
* hover classes are edited. Null for a class without any of them.
|
|
128
|
+
*/
|
|
129
|
+
export function withoutVariant(cls, variants) {
|
|
130
|
+
if (!cls.startsWith(`${PREFIX}:`))
|
|
131
|
+
return null;
|
|
132
|
+
const { variants: vs, utility } = splitVariants(cls.slice(PREFIX.length + 1));
|
|
133
|
+
const kept = vs.filter((v) => !variants.includes(v));
|
|
134
|
+
if (kept.length === vs.length)
|
|
135
|
+
return null;
|
|
136
|
+
return [PREFIX, ...kept, utility].join(":");
|
|
137
|
+
}
|
package/dist/schema.d.ts
CHANGED
|
@@ -58,3 +58,13 @@ export declare function checkStructure(site: {
|
|
|
58
58
|
export declare function describePath(raw: unknown, path: PropertyKey[]): string;
|
|
59
59
|
/** The last named field in a path, for a short label. */
|
|
60
60
|
export declare const fieldOf: (path: (string | number)[]) => string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* What a block is called where a person sees a list of them (CalOS's sections, Cal's changes): a
|
|
63
|
+
* section of the business's own by its heading, else its first heading part; any other by its
|
|
64
|
+
* `heading`, `title` or the first line of its `headline`; else what its kind is called
|
|
65
|
+
* (`kindTitle`). At most 60 characters.
|
|
66
|
+
*/
|
|
67
|
+
export declare function blockLabel(block: {
|
|
68
|
+
type?: unknown;
|
|
69
|
+
[field: string]: unknown;
|
|
70
|
+
}, kindTitle: string): string;
|
package/dist/schema.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// check content with messages a person can act on, make a blank new item (a block, a list entry),
|
|
4
4
|
// and find the kinds of block a site has. Also the checks that need no schema at all (pages, home,
|
|
5
5
|
// links), and readable places in the content.
|
|
6
|
+
import { allPages } from "./content/lists.js";
|
|
6
7
|
const unions = (s) => s.anyOf ?? s.oneOf;
|
|
7
8
|
/** Follows a `$ref` to its definition in the same document. */
|
|
8
9
|
export function resolve(s, root) {
|
|
@@ -191,7 +192,8 @@ export function checkStructure(site) {
|
|
|
191
192
|
/** Every link to a page of the site must land on one, and every link to a part of a page must have that part. */
|
|
192
193
|
function linkIssues(site) {
|
|
193
194
|
const issues = [];
|
|
194
|
-
|
|
195
|
+
// A list's item pages are pages too (a link to /products/walnut-desk/ lands).
|
|
196
|
+
const ids = new Map(allPages(site).map((p) => [p.path, new Set(p.blocks.map((b) => b.id).filter(Boolean))]));
|
|
195
197
|
const visit = (value, path, pagePath) => {
|
|
196
198
|
if (Array.isArray(value))
|
|
197
199
|
value.forEach((v, i) => visit(v, [...path, i], pagePath));
|
|
@@ -235,3 +237,29 @@ export function describePath(raw, path) {
|
|
|
235
237
|
}
|
|
236
238
|
/** The last named field in a path, for a short label. */
|
|
237
239
|
export const fieldOf = words;
|
|
240
|
+
/**
|
|
241
|
+
* What a block is called where a person sees a list of them (CalOS's sections, Cal's changes): a
|
|
242
|
+
* section of the business's own by its heading, else its first heading part; any other by its
|
|
243
|
+
* `heading`, `title` or the first line of its `headline`; else what its kind is called
|
|
244
|
+
* (`kindTitle`). At most 60 characters.
|
|
245
|
+
*/
|
|
246
|
+
export function blockLabel(block, kindTitle) {
|
|
247
|
+
const str = (v) => (typeof v === "string" && v.trim() ? v.trim().split("\n")[0].trim() : undefined);
|
|
248
|
+
let label;
|
|
249
|
+
if (block.type === "own") {
|
|
250
|
+
label = str(block.heading);
|
|
251
|
+
if (!label && Array.isArray(block.columns)) {
|
|
252
|
+
for (const c of block.columns) {
|
|
253
|
+
const h = Array.isArray(c?.parts) ? c.parts.find((p) => p?.type === "heading" && str(p.text)) : undefined;
|
|
254
|
+
if (h) {
|
|
255
|
+
label = str(h.text);
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
else
|
|
262
|
+
label = str(block.heading) ?? str(block.title) ?? str(block.headline);
|
|
263
|
+
const out = label ?? kindTitle;
|
|
264
|
+
return out.length > 60 ? `${out.slice(0, 59).trimEnd()}…` : out;
|
|
265
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Each icon's strokes, as SVG path data (stroke 2, round ends and joins, no fill). */
|
|
2
|
+
export declare const ICONS: {
|
|
3
|
+
readonly check: readonly ["M20 6 9 17l-5-5"];
|
|
4
|
+
readonly calendar: readonly ["M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z", "M16 2v4M8 2v4M3 10h18"];
|
|
5
|
+
readonly clock: readonly ["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z", "M12 6v6l4 2"];
|
|
6
|
+
readonly users: readonly ["M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2", "M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z", "M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75"];
|
|
7
|
+
readonly user: readonly ["M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2", "M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z"];
|
|
8
|
+
readonly chat: readonly ["M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"];
|
|
9
|
+
readonly mail: readonly ["M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z", "m22 6-10 7L2 6"];
|
|
10
|
+
readonly phone: readonly ["M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z"];
|
|
11
|
+
readonly "map-pin": readonly ["M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z", "M12 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"];
|
|
12
|
+
readonly chart: readonly ["M18 20V10M12 20V4M6 20v-6"];
|
|
13
|
+
readonly file: readonly ["M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z", "M14 2v6h6M16 13H8M16 17H8M10 9H8"];
|
|
14
|
+
readonly folder: readonly ["M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"];
|
|
15
|
+
readonly invoice: readonly ["M5 2h14v20l-3-2-2 2-2-2-2 2-2-2-3 2z", "M9 7h6M9 11h6M9 15h4"];
|
|
16
|
+
readonly card: readonly ["M3 5h18a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z", "M1 10h22"];
|
|
17
|
+
readonly shield: readonly ["M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"];
|
|
18
|
+
readonly lock: readonly ["M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z", "M7 11V7a5 5 0 0 1 10 0v4"];
|
|
19
|
+
readonly star: readonly ["m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z"];
|
|
20
|
+
readonly heart: readonly ["M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"];
|
|
21
|
+
readonly bolt: readonly ["M13 2 3 14h9l-1 8 10-12h-9z"];
|
|
22
|
+
readonly gear: readonly ["M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z", "M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14z", "M12 1v4M12 19v4M1 12h4M19 12h4M4.2 4.2l2.85 2.85M16.95 16.95l2.85 2.85M4.2 19.8l2.85-2.85M16.95 7.05l2.85-2.85"];
|
|
23
|
+
readonly search: readonly ["M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z", "m21 21-4.35-4.35"];
|
|
24
|
+
readonly home: readonly ["m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z", "M9 22V12h6v10"];
|
|
25
|
+
readonly building: readonly ["M4 22V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v18", "M2 22h20", "M9 6h1M14 6h1M9 10h1M14 10h1M9 14h1M14 14h1", "M10 22v-4h4v4"];
|
|
26
|
+
readonly truck: readonly ["M1 3h15v13H1z", "M16 8h4l3 3v5h-7z", "M5.5 21a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z", "M18.5 21a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z"];
|
|
27
|
+
readonly wrench: readonly ["M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"];
|
|
28
|
+
readonly leaf: readonly ["M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10z", "M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12"];
|
|
29
|
+
readonly sun: readonly ["M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10z", "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"];
|
|
30
|
+
readonly globe: readonly ["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z", "M2 12h20", "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"];
|
|
31
|
+
readonly link: readonly ["M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"];
|
|
32
|
+
readonly camera: readonly ["M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z", "M12 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8z"];
|
|
33
|
+
readonly play: readonly ["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z", "m10 8 6 4-6 4z"];
|
|
34
|
+
readonly "arrow-right": readonly ["M5 12h14M12 5l7 7-7 7"];
|
|
35
|
+
readonly menu: readonly ["M4 6h16M4 12h16M4 18h16"];
|
|
36
|
+
readonly "star-four": readonly ["M12 2C13.03 7.97 16.03 10.97 22 12C16.03 13.03 13.03 16.03 12 22C10.97 16.03 7.97 13.03 2 12C7.97 10.97 10.97 7.97 12 2Z"];
|
|
37
|
+
readonly plus: readonly ["M12 5v14M5 12h14"];
|
|
38
|
+
readonly minus: readonly ["M5 12h14"];
|
|
39
|
+
readonly x: readonly ["M18 6 6 18M6 6l12 12"];
|
|
40
|
+
readonly info: readonly ["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z", "M12 16v-4M12 8h.01"];
|
|
41
|
+
readonly warning: readonly ["M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z", "M12 9v4M12 17h.01"];
|
|
42
|
+
readonly list: readonly ["M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"];
|
|
43
|
+
readonly grid: readonly ["M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z"];
|
|
44
|
+
readonly tag: readonly ["M20.59 13.41 13.42 20.58a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z", "M7 7h.01"];
|
|
45
|
+
readonly award: readonly ["M12 15a7 7 0 1 0 0-14 7 7 0 0 0 0 14z", "M8.21 13.89 7 23l5-3 5 3-1.21-9.12"];
|
|
46
|
+
};
|
|
47
|
+
export type IconName = keyof typeof ICONS;
|
|
48
|
+
/** Every icon's name, in the order CalOS offers them. */
|
|
49
|
+
export declare const ICON_NAMES: [IconName, ...IconName[]];
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// The kit's icons: plain line drawings on a 24-unit grid, drawn inline (an `own` section's icon part,
|
|
2
|
+
// a table's yes and no) so they need nothing fetched and take the colour of what they're in. No
|
|
3
|
+
// sparkles: an icon says what something is, not that it's new or clever.
|
|
4
|
+
/** Each icon's strokes, as SVG path data (stroke 2, round ends and joins, no fill). */
|
|
5
|
+
export const ICONS = {
|
|
6
|
+
check: ["M20 6 9 17l-5-5"],
|
|
7
|
+
calendar: ["M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z", "M16 2v4M8 2v4M3 10h18"],
|
|
8
|
+
clock: ["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z", "M12 6v6l4 2"],
|
|
9
|
+
users: ["M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2", "M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z", "M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75"],
|
|
10
|
+
user: ["M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2", "M12 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z"],
|
|
11
|
+
chat: ["M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"],
|
|
12
|
+
mail: ["M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z", "m22 6-10 7L2 6"],
|
|
13
|
+
phone: [
|
|
14
|
+
"M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z",
|
|
15
|
+
],
|
|
16
|
+
"map-pin": ["M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z", "M12 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"],
|
|
17
|
+
chart: ["M18 20V10M12 20V4M6 20v-6"],
|
|
18
|
+
file: ["M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z", "M14 2v6h6M16 13H8M16 17H8M10 9H8"],
|
|
19
|
+
folder: ["M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"],
|
|
20
|
+
invoice: ["M5 2h14v20l-3-2-2 2-2-2-2 2-2-2-3 2z", "M9 7h6M9 11h6M9 15h4"],
|
|
21
|
+
card: ["M3 5h18a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z", "M1 10h22"],
|
|
22
|
+
shield: ["M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"],
|
|
23
|
+
lock: ["M5 11h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z", "M7 11V7a5 5 0 0 1 10 0v4"],
|
|
24
|
+
star: ["m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z"],
|
|
25
|
+
heart: ["M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"],
|
|
26
|
+
bolt: ["M13 2 3 14h9l-1 8 10-12h-9z"],
|
|
27
|
+
gear: ["M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z", "M12 19a7 7 0 1 0 0-14 7 7 0 0 0 0 14z", "M12 1v4M12 19v4M1 12h4M19 12h4M4.2 4.2l2.85 2.85M16.95 16.95l2.85 2.85M4.2 19.8l2.85-2.85M16.95 7.05l2.85-2.85"],
|
|
28
|
+
search: ["M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z", "m21 21-4.35-4.35"],
|
|
29
|
+
home: ["m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z", "M9 22V12h6v10"],
|
|
30
|
+
building: ["M4 22V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v18", "M2 22h20", "M9 6h1M14 6h1M9 10h1M14 10h1M9 14h1M14 14h1", "M10 22v-4h4v4"],
|
|
31
|
+
truck: ["M1 3h15v13H1z", "M16 8h4l3 3v5h-7z", "M5.5 21a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z", "M18.5 21a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z"],
|
|
32
|
+
wrench: ["M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"],
|
|
33
|
+
leaf: ["M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10z", "M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12"],
|
|
34
|
+
sun: ["M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10z", "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"],
|
|
35
|
+
globe: ["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z", "M2 12h20", "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"],
|
|
36
|
+
link: ["M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"],
|
|
37
|
+
camera: ["M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z", "M12 17a4 4 0 1 0 0-8 4 4 0 0 0 0 8z"],
|
|
38
|
+
play: ["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z", "m10 8 6 4-6 4z"],
|
|
39
|
+
"arrow-right": ["M5 12h14M12 5l7 7-7 7"],
|
|
40
|
+
// A phone's menu button: three lines.
|
|
41
|
+
menu: ["M4 6h16M4 12h16M4 18h16"],
|
|
42
|
+
// A four-point star (a mark beside a link, a divider): drawn as a line like the others, solid with fill-current.
|
|
43
|
+
"star-four": ["M12 2C13.03 7.97 16.03 10.97 22 12C16.03 13.03 13.03 16.03 12 22C10.97 16.03 7.97 13.03 2 12C7.97 10.97 10.97 7.97 12 2Z"],
|
|
44
|
+
plus: ["M12 5v14M5 12h14"],
|
|
45
|
+
minus: ["M5 12h14"],
|
|
46
|
+
x: ["M18 6 6 18M6 6l12 12"],
|
|
47
|
+
info: ["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z", "M12 16v-4M12 8h.01"],
|
|
48
|
+
warning: ["M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z", "M12 9v4M12 17h.01"],
|
|
49
|
+
list: ["M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"],
|
|
50
|
+
grid: ["M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z"],
|
|
51
|
+
tag: ["M20.59 13.41 13.42 20.58a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z", "M7 7h.01"],
|
|
52
|
+
award: ["M12 15a7 7 0 1 0 0-14 7 7 0 0 0 0 14z", "M8.21 13.89 7 23l5-3 5 3-1.21-9.12"],
|
|
53
|
+
};
|
|
54
|
+
/** Every icon's name, in the order CalOS offers them. */
|
|
55
|
+
export const ICON_NAMES = Object.keys(ICONS);
|
package/dist/sections/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export { ICON_NAMES, ICONS, type IconName } from "./icons.ts";
|
|
2
3
|
/** Photos in a grid, each with a caption if it has one: their work, the place, the team at it. */
|
|
3
4
|
export declare const gallery: z.ZodObject<{
|
|
4
5
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -30,29 +31,50 @@ export declare const slideshow: z.ZodObject<{
|
|
|
30
31
|
}, z.core.$strip>>;
|
|
31
32
|
shape: z.ZodDefault<z.ZodEnum<{
|
|
32
33
|
square: "square";
|
|
33
|
-
wide: "wide";
|
|
34
34
|
landscape: "landscape";
|
|
35
|
+
wide: "wide";
|
|
35
36
|
}>>;
|
|
36
37
|
seconds: z.ZodDefault<z.ZodNumber>;
|
|
37
38
|
}, z.core.$strip>;
|
|
39
|
+
/**
|
|
40
|
+
* A YouTube or Vimeo address as the privacy-friendly player it's shown in (YouTube's no-cookie one,
|
|
41
|
+
* Vimeo's with tracking off), or null for any other address. Watch, share, Shorts and embed
|
|
42
|
+
* addresses all work.
|
|
43
|
+
*/
|
|
44
|
+
export declare function videoEmbed(url: string): {
|
|
45
|
+
src: string;
|
|
46
|
+
origin: string;
|
|
47
|
+
} | null;
|
|
48
|
+
/** Where a video part's players come from: a page showing one allows them in its frame-src. */
|
|
49
|
+
export declare const VIDEO_ORIGINS: readonly ["https://www.youtube-nocookie.com", "https://player.vimeo.com"];
|
|
38
50
|
export declare const parts: {
|
|
39
51
|
readonly heading: z.ZodObject<{
|
|
40
52
|
text: z.ZodString;
|
|
41
53
|
size: z.ZodDefault<z.ZodEnum<{
|
|
42
54
|
small: "small";
|
|
43
|
-
|
|
55
|
+
display: "display";
|
|
44
56
|
medium: "medium";
|
|
57
|
+
large: "large";
|
|
58
|
+
page: "page";
|
|
59
|
+
}>>;
|
|
60
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
61
|
+
text: "text";
|
|
62
|
+
heading: "heading";
|
|
45
63
|
}>>;
|
|
46
64
|
}, z.core.$strip>;
|
|
47
65
|
readonly text: z.ZodObject<{
|
|
48
66
|
text: z.ZodString;
|
|
67
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
68
|
+
text: "text";
|
|
69
|
+
heading: "heading";
|
|
70
|
+
}>>;
|
|
49
71
|
}, z.core.$strip>;
|
|
50
72
|
readonly photo: z.ZodObject<{
|
|
51
|
-
image: z.ZodObject<{
|
|
73
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
52
74
|
src: z.ZodString;
|
|
53
75
|
alt: z.ZodString;
|
|
54
76
|
caption: z.ZodOptional<z.ZodString>;
|
|
55
|
-
}, z.core.$strip
|
|
77
|
+
}, z.core.$strip>>;
|
|
56
78
|
shape: z.ZodDefault<z.ZodEnum<{
|
|
57
79
|
square: "square";
|
|
58
80
|
landscape: "landscape";
|
|
@@ -63,10 +85,7 @@ export declare const parts: {
|
|
|
63
85
|
readonly button: z.ZodObject<{
|
|
64
86
|
label: z.ZodString;
|
|
65
87
|
href: z.ZodString;
|
|
66
|
-
style: z.ZodDefault<z.
|
|
67
|
-
main: "main";
|
|
68
|
-
quiet: "quiet";
|
|
69
|
-
}>>;
|
|
88
|
+
style: z.ZodDefault<z.ZodString>;
|
|
70
89
|
}, z.core.$strip>;
|
|
71
90
|
readonly list: z.ZodObject<{
|
|
72
91
|
items: z.ZodArray<z.ZodString>;
|
|
@@ -76,9 +95,25 @@ export declare const parts: {
|
|
|
76
95
|
numbers: "numbers";
|
|
77
96
|
}>>;
|
|
78
97
|
}, z.core.$strip>;
|
|
98
|
+
readonly items: z.ZodObject<{
|
|
99
|
+
items: z.ZodArray<z.ZodObject<{
|
|
100
|
+
title: z.ZodString;
|
|
101
|
+
text: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
104
|
+
text: "text";
|
|
105
|
+
heading: "heading";
|
|
106
|
+
}>>;
|
|
107
|
+
numbered: z.ZodDefault<z.ZodBoolean>;
|
|
108
|
+
lines: z.ZodDefault<z.ZodBoolean>;
|
|
109
|
+
}, z.core.$strip>;
|
|
79
110
|
readonly quote: z.ZodObject<{
|
|
80
111
|
text: z.ZodString;
|
|
81
112
|
who: z.ZodOptional<z.ZodString>;
|
|
113
|
+
font: z.ZodOptional<z.ZodEnum<{
|
|
114
|
+
text: "text";
|
|
115
|
+
heading: "heading";
|
|
116
|
+
}>>;
|
|
82
117
|
}, z.core.$strip>;
|
|
83
118
|
readonly stats: z.ZodObject<{
|
|
84
119
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -114,14 +149,87 @@ export declare const parts: {
|
|
|
114
149
|
readonly space: z.ZodObject<{
|
|
115
150
|
size: z.ZodDefault<z.ZodEnum<{
|
|
116
151
|
small: "small";
|
|
152
|
+
medium: "medium";
|
|
117
153
|
large: "large";
|
|
154
|
+
}>>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
readonly table: z.ZodObject<{
|
|
157
|
+
columns: z.ZodArray<z.ZodString>;
|
|
158
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
159
|
+
label: z.ZodString;
|
|
160
|
+
cells: z.ZodArray<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>>;
|
|
162
|
+
highlight: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
readonly icon: z.ZodObject<{
|
|
165
|
+
name: z.ZodEnum<{
|
|
166
|
+
file: "file";
|
|
167
|
+
check: "check";
|
|
168
|
+
search: "search";
|
|
169
|
+
link: "link";
|
|
170
|
+
tag: "tag";
|
|
171
|
+
menu: "menu";
|
|
172
|
+
play: "play";
|
|
173
|
+
x: "x";
|
|
174
|
+
card: "card";
|
|
175
|
+
phone: "phone";
|
|
176
|
+
home: "home";
|
|
177
|
+
list: "list";
|
|
178
|
+
calendar: "calendar";
|
|
179
|
+
clock: "clock";
|
|
180
|
+
users: "users";
|
|
181
|
+
user: "user";
|
|
182
|
+
chat: "chat";
|
|
183
|
+
mail: "mail";
|
|
184
|
+
"map-pin": "map-pin";
|
|
185
|
+
chart: "chart";
|
|
186
|
+
folder: "folder";
|
|
187
|
+
invoice: "invoice";
|
|
188
|
+
shield: "shield";
|
|
189
|
+
lock: "lock";
|
|
190
|
+
star: "star";
|
|
191
|
+
heart: "heart";
|
|
192
|
+
bolt: "bolt";
|
|
193
|
+
gear: "gear";
|
|
194
|
+
building: "building";
|
|
195
|
+
truck: "truck";
|
|
196
|
+
wrench: "wrench";
|
|
197
|
+
leaf: "leaf";
|
|
198
|
+
sun: "sun";
|
|
199
|
+
globe: "globe";
|
|
200
|
+
camera: "camera";
|
|
201
|
+
"arrow-right": "arrow-right";
|
|
202
|
+
"star-four": "star-four";
|
|
203
|
+
plus: "plus";
|
|
204
|
+
minus: "minus";
|
|
205
|
+
info: "info";
|
|
206
|
+
warning: "warning";
|
|
207
|
+
grid: "grid";
|
|
208
|
+
award: "award";
|
|
209
|
+
}>;
|
|
210
|
+
size: z.ZodDefault<z.ZodEnum<{
|
|
211
|
+
small: "small";
|
|
118
212
|
medium: "medium";
|
|
213
|
+
large: "large";
|
|
119
214
|
}>>;
|
|
120
215
|
}, z.core.$strip>;
|
|
216
|
+
readonly logos: z.ZodObject<{
|
|
217
|
+
title: z.ZodOptional<z.ZodString>;
|
|
218
|
+
images: z.ZodArray<z.ZodObject<{
|
|
219
|
+
src: z.ZodString;
|
|
220
|
+
alt: z.ZodString;
|
|
221
|
+
}, z.core.$strip>>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
readonly video: z.ZodObject<{
|
|
224
|
+
url: z.ZodOptional<z.ZodString>;
|
|
225
|
+
title: z.ZodString;
|
|
226
|
+
}, z.core.$strip>;
|
|
121
227
|
};
|
|
122
228
|
export type PartType = keyof typeof parts;
|
|
123
229
|
/** A section of the business's own: columns of parts, laid out as chosen, in the site's design. */
|
|
124
230
|
export declare const own: z.ZodObject<{
|
|
231
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
232
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
125
233
|
layout: z.ZodDefault<z.ZodEnum<{
|
|
126
234
|
one: "one";
|
|
127
235
|
two: "two";
|
|
@@ -135,14 +243,40 @@ export declare const own: z.ZodObject<{
|
|
|
135
243
|
center: "center";
|
|
136
244
|
}>>;
|
|
137
245
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
138
|
-
|
|
246
|
+
dark: "dark";
|
|
247
|
+
soft: "soft";
|
|
139
248
|
plain: "plain";
|
|
249
|
+
brand: "brand";
|
|
250
|
+
}>>;
|
|
251
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
252
|
+
card: "card";
|
|
253
|
+
band: "band";
|
|
254
|
+
}>>;
|
|
255
|
+
spacing: z.ZodDefault<z.ZodEnum<{
|
|
256
|
+
normal: "normal";
|
|
257
|
+
roomy: "roomy";
|
|
258
|
+
tight: "tight";
|
|
140
259
|
}>>;
|
|
260
|
+
background: z.ZodOptional<z.ZodObject<{
|
|
261
|
+
src: z.ZodString;
|
|
262
|
+
alt: z.ZodString;
|
|
263
|
+
}, z.core.$strip>>;
|
|
141
264
|
columns: z.ZodArray<z.ZodObject<{
|
|
265
|
+
card: z.ZodOptional<z.ZodBoolean>;
|
|
266
|
+
end: z.ZodOptional<z.ZodBoolean>;
|
|
267
|
+
place: z.ZodOptional<z.ZodEnum<{
|
|
268
|
+
top: "top";
|
|
269
|
+
middle: "middle";
|
|
270
|
+
bottom: "bottom";
|
|
271
|
+
}>>;
|
|
142
272
|
parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<z.core.$ZodLooseShape, z.core.$strip>, ...z.ZodObject<z.core.$ZodLooseShape, z.core.$strip>[]], "type">>;
|
|
143
273
|
}, z.core.$strip>>;
|
|
144
274
|
}, z.core.$strip>;
|
|
145
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* Every section the kit draws, by the type a block names. `built`: a tree of elements styled with
|
|
277
|
+
* Tailwind, made in CalOS's editor or by Cal (../tree, cal-os docs/design/site-builder.md); `use`:
|
|
278
|
+
* one of the site's components (a tree kept once in the content's `components`) with its slots filled.
|
|
279
|
+
*/
|
|
146
280
|
export declare const sections: {
|
|
147
281
|
readonly gallery: z.ZodObject<{
|
|
148
282
|
heading: z.ZodOptional<z.ZodString>;
|
|
@@ -173,12 +307,14 @@ export declare const sections: {
|
|
|
173
307
|
}, z.core.$strip>>;
|
|
174
308
|
shape: z.ZodDefault<z.ZodEnum<{
|
|
175
309
|
square: "square";
|
|
176
|
-
wide: "wide";
|
|
177
310
|
landscape: "landscape";
|
|
311
|
+
wide: "wide";
|
|
178
312
|
}>>;
|
|
179
313
|
seconds: z.ZodDefault<z.ZodNumber>;
|
|
180
314
|
}, z.core.$strip>;
|
|
181
315
|
readonly own: z.ZodObject<{
|
|
316
|
+
heading: z.ZodOptional<z.ZodString>;
|
|
317
|
+
intro: z.ZodOptional<z.ZodString>;
|
|
182
318
|
layout: z.ZodDefault<z.ZodEnum<{
|
|
183
319
|
one: "one";
|
|
184
320
|
two: "two";
|
|
@@ -192,13 +328,53 @@ export declare const sections: {
|
|
|
192
328
|
center: "center";
|
|
193
329
|
}>>;
|
|
194
330
|
tone: z.ZodDefault<z.ZodEnum<{
|
|
195
|
-
|
|
331
|
+
dark: "dark";
|
|
332
|
+
soft: "soft";
|
|
196
333
|
plain: "plain";
|
|
334
|
+
brand: "brand";
|
|
335
|
+
}>>;
|
|
336
|
+
shape: z.ZodDefault<z.ZodEnum<{
|
|
337
|
+
card: "card";
|
|
338
|
+
band: "band";
|
|
197
339
|
}>>;
|
|
340
|
+
spacing: z.ZodDefault<z.ZodEnum<{
|
|
341
|
+
normal: "normal";
|
|
342
|
+
roomy: "roomy";
|
|
343
|
+
tight: "tight";
|
|
344
|
+
}>>;
|
|
345
|
+
background: z.ZodOptional<z.ZodObject<{
|
|
346
|
+
src: z.ZodString;
|
|
347
|
+
alt: z.ZodString;
|
|
348
|
+
}, z.core.$strip>>;
|
|
198
349
|
columns: z.ZodArray<z.ZodObject<{
|
|
350
|
+
card: z.ZodOptional<z.ZodBoolean>;
|
|
351
|
+
end: z.ZodOptional<z.ZodBoolean>;
|
|
352
|
+
place: z.ZodOptional<z.ZodEnum<{
|
|
353
|
+
top: "top";
|
|
354
|
+
middle: "middle";
|
|
355
|
+
bottom: "bottom";
|
|
356
|
+
}>>;
|
|
199
357
|
parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<z.core.$ZodLooseShape, z.core.$strip>, ...z.ZodObject<z.core.$ZodLooseShape, z.core.$strip>[]], "type">>;
|
|
200
358
|
}, z.core.$strip>>;
|
|
201
359
|
}, z.core.$strip>;
|
|
360
|
+
readonly built: z.ZodObject<{
|
|
361
|
+
name: z.ZodOptional<z.ZodString>;
|
|
362
|
+
root: z.ZodType<import("../tree/index.ts").Node, unknown, z.core.$ZodTypeInternals<import("../tree/index.ts").Node, unknown>>;
|
|
363
|
+
}, z.core.$strip>;
|
|
364
|
+
readonly use: z.ZodObject<{
|
|
365
|
+
component: z.ZodString;
|
|
366
|
+
slots: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
367
|
+
text: z.ZodOptional<z.ZodString>;
|
|
368
|
+
href: z.ZodOptional<z.ZodString>;
|
|
369
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
370
|
+
src: z.ZodString;
|
|
371
|
+
alt: z.ZodDefault<z.ZodString>;
|
|
372
|
+
phoneSrc: z.ZodOptional<z.ZodString>;
|
|
373
|
+
}, z.core.$strip>>;
|
|
374
|
+
}, z.core.$strip>>>;
|
|
375
|
+
}, z.core.$strip>;
|
|
202
376
|
};
|
|
203
377
|
export type KitSectionType = keyof typeof sections;
|
|
204
378
|
export declare const isKitSection: (type: string) => type is KitSectionType;
|
|
379
|
+
/** Ready-made sections of the business's own, to add and then edit like any other (./presets.ts). */
|
|
380
|
+
export { presets, type OwnBlock, type Preset } from "./presets.ts";
|