@charisol/plexo-sdk 2.0.3 → 2.0.5
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 +2 -2
- package/dist/{InlineColorPicker-8ewm1Asx.js → InlineColorPicker-BGyPZzyk.js} +326 -138
- package/dist/{client-DlVJt_6V.js → client-CAWtj9sV.js} +1 -1
- package/dist/index.js +12669 -12857
- package/dist/lint-CTTecyu_.js +429 -0
- package/dist/plexo-sdk.css +1 -1
- package/dist/{legacy-B4E71HSa.js → v1-DgwxU8IH.js} +4295 -1654
- package/dist/v2/compile/build.d.ts +15 -0
- package/dist/v2/compile/extras.d.ts +19 -0
- package/dist/v2/compile/html.d.ts +8 -0
- package/dist/v2/compile/index.d.ts +3 -0
- package/dist/v2/compile/sanitizeHtml.d.ts +37 -0
- package/dist/v2/components/fonts/EditorFonts.d.ts +2 -0
- package/dist/v2/components/fonts/FontPicker.d.ts +15 -0
- package/dist/v2/components/fonts/fontLoader.d.ts +13 -0
- package/dist/v2/components/properties/TypeControls.d.ts +10 -0
- package/dist/v2/components/sidebar/ImagesPanel.d.ts +6 -0
- package/dist/v2/context/EditorContext.d.ts +3 -1
- package/dist/v2/data/insertableComponents.d.ts +1 -1
- package/dist/v2/design/css.d.ts +1 -1
- package/dist/v2/design/customFonts.d.ts +49 -0
- package/dist/v2/design/fonts.d.ts +36 -2
- package/dist/v2/design/googleFontsData.d.ts +1 -0
- package/dist/v2/design/index.d.ts +4 -1
- package/dist/v2/design/textStyles.d.ts +6 -2
- package/dist/v2/design/typeScale.d.ts +43 -0
- package/dist/v2/design/types.d.ts +2 -0
- package/dist/v2/host/HostContext.d.ts +15 -0
- package/dist/v2/index.d.ts +5 -0
- package/dist/v2/migrate/v1.d.ts +43 -0
- package/dist/v2/render/dynamicBlocks.d.ts +53 -0
- package/dist/v2/render/elementProps.d.ts +2 -1
- package/dist/v2/render/elements.d.ts +4 -0
- package/dist/v2/sections/catalog/blogArticle.d.ts +2 -0
- package/dist/v2/sections/catalog/blogList.d.ts +2 -0
- package/dist/v2/sections/catalog/cartCheckout.d.ts +2 -0
- package/dist/v2/sections/catalog/dynamicKit.d.ts +10 -0
- package/dist/v2/sections/catalog/funnelSignup.d.ts +2 -0
- package/dist/v2/sections/catalog/orderConfirmation.d.ts +2 -0
- package/dist/v2/sections/catalog/orderTracking.d.ts +2 -0
- package/dist/v2/sections/catalog/productPage.d.ts +2 -0
- package/dist/v2/sections/catalog/shop.d.ts +2 -0
- package/dist/v2/sections/materialize.d.ts +7 -0
- package/dist/v2/sections/types.d.ts +6 -2
- package/dist/v2/types/editor.d.ts +1 -1
- package/dist/v2-compile.js +26 -119
- package/dist/v2-strata.js +1 -1
- package/dist/v2.js +4473 -3593
- package/package.json +1 -1
- package/dist/lint-D-2x-Yeb.js +0 -225
- package/dist/v2/components/sidebar/LibraryPanel.d.ts +0 -3
|
@@ -18,14 +18,28 @@ export interface CompileOptions extends FormDestinationConfig {
|
|
|
18
18
|
now?: number;
|
|
19
19
|
/** The site's design system — the colours, fonts and shapes the page's tokens resolve to. Defaults to the built-in one. */
|
|
20
20
|
designSystem?: DesignSystem;
|
|
21
|
+
/**
|
|
22
|
+
* The site owner's own script (V1's "custom code"). Added as the last inline `<script>` of the document and appended to
|
|
23
|
+
* `script`; `</script` inside it is escaped and it is capped at MAX_CUSTOM_JS characters. Off by default. It is owner code the
|
|
24
|
+
* host chooses to pass — it is not sanitised, so only pass what the site's owner wrote, and add it AFTER `sanitizeV2Html`.
|
|
25
|
+
*/
|
|
26
|
+
customJs?: string;
|
|
21
27
|
}
|
|
22
28
|
export interface BuiltPage {
|
|
23
29
|
tree: HNode;
|
|
24
30
|
css: string;
|
|
25
31
|
usesRuntime: boolean;
|
|
32
|
+
/** Every font family the page uses (Google, uploaded or otherwise), by name. */
|
|
26
33
|
fonts: string[];
|
|
34
|
+
/** Stylesheet addresses for the Google Fonts the page uses (only those families, only the weights they have). Empty when none. */
|
|
35
|
+
fontLinks: string[];
|
|
27
36
|
warnings: string[];
|
|
28
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* A plain CSS gradient (`linear-gradient(135deg, var(--a), #fff 40%)`): only letters, digits, spaces and the few characters a
|
|
40
|
+
* gradient needs, with nothing that could fetch a file or end the declaration, and balanced brackets.
|
|
41
|
+
*/
|
|
42
|
+
export declare function safeGradient(v: string): boolean;
|
|
29
43
|
/**
|
|
30
44
|
* Turns one page into markup and CSS. This is the single compile step both outputs share (HTML and React print the
|
|
31
45
|
* same tree), and it is where the visible canvas of each screen is enforced:
|
|
@@ -35,4 +49,5 @@ export interface BuiltPage {
|
|
|
35
49
|
* - the same box model and constraints the editor uses (computeNodeCss) decide where everything lands.
|
|
36
50
|
*/
|
|
37
51
|
export declare function buildPage(page: PageDefinition, opts?: CompileOptions): BuiltPage;
|
|
52
|
+
/** @deprecated use `BuiltPage.fontLinks` (one address per family group, with the right weights). Kept for older callers: the first Google Fonts address, or null. */
|
|
38
53
|
export declare function googleFontsHref(fonts: string[]): string | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Small, shared rules for the two owner-facing publishing extras: an element's anchor name (`props.htmlId`) and the
|
|
3
|
+
* site's own custom script (`CompileOptions.customJs`).
|
|
4
|
+
*/
|
|
5
|
+
/** Longest custom script accepted, in characters. Anything longer is left out with a warning (never silently cut mid-statement). */
|
|
6
|
+
export declare const MAX_CUSTOM_JS = 100000;
|
|
7
|
+
/** An anchor name a person can type: starts with a letter, then letters, digits, `-` or `_` (up to 64). */
|
|
8
|
+
export declare const validHtmlId: (value: unknown) => string | null;
|
|
9
|
+
/** Turns what a person typed into a usable anchor name ("My Pricing" → "My-Pricing"), or '' when nothing usable is left. */
|
|
10
|
+
export declare const toHtmlId: (typed: string) => string;
|
|
11
|
+
/**
|
|
12
|
+
* The owner's custom script, made safe to sit inside a `<script>` element: trimmed, with `</script` and `<!--` unable to end or
|
|
13
|
+
* confuse the element. This is OWNER-authored code that the host explicitly passes (the same trust as V1's custom code box) —
|
|
14
|
+
* it is not sanitised, only contained. Returns '' for empty input or input over the size cap, and says why in `warning`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function prepareCustomJs(source: unknown): {
|
|
17
|
+
code: string;
|
|
18
|
+
warning?: string;
|
|
19
|
+
};
|
|
@@ -8,6 +8,14 @@ export interface CompiledHtml {
|
|
|
8
8
|
css: string;
|
|
9
9
|
/** The optional runtime as a script body ('' when the page doesn't need one or `runtime: 'none'`). */
|
|
10
10
|
script: string;
|
|
11
|
+
/**
|
|
12
|
+
* `<link>` tags for the page's web fonts (preconnect + one stylesheet per Google Fonts group, with only the families and
|
|
13
|
+
* weights used and `display=swap`); '' when the page uses none. A host that places `html` + `css` in its own page puts this
|
|
14
|
+
* in that page's `<head>`. Fonts the owner uploaded need nothing here: their `@font-face` rules are already at the top of `css`.
|
|
15
|
+
*/
|
|
16
|
+
head: string;
|
|
17
|
+
/** The same stylesheet addresses as plain strings (for hosts that build their own head). */
|
|
18
|
+
fontLinks: string[];
|
|
11
19
|
/** A complete standalone document with all of the above (fonts included). */
|
|
12
20
|
document: string;
|
|
13
21
|
/** Things the owner should fix, in plain words (e.g. a form with nowhere to send messages). */
|
|
@@ -26,3 +26,6 @@ export { PAGE_TEMPLATES, listPageTemplates, buildPageFromTemplate, buildTemplate
|
|
|
26
26
|
export type { PageTemplate, PageTemplateSection, PageTemplateSummary } from '../sections/pageTemplates';
|
|
27
27
|
export { catalogSchema, describeDesign, describeSection, applyCommands, setPageTemplateResolver, solCommandSchema, parseSolReply, describeCommand, SOL_SYSTEM_PROMPT } from '../sol';
|
|
28
28
|
export type { SolCatalog, SolDesignSummary, SolCommand, CommandResult, ApplyResult, ParsedSolReply } from '../sol';
|
|
29
|
+
export { sanitizeV2Html, sanitizeCss, type SanitizeV2Options } from './sanitizeHtml';
|
|
30
|
+
export { MAX_CUSTOM_JS, validHtmlId, prepareCustomJs } from './extras';
|
|
31
|
+
export { convertV1Design, V1_DYNAMIC_EQUIVALENTS, V2_DYNAMIC_READY, type ConvertV1Options, type ConvertV1Result, type ConvertV1Fidelity } from '../migrate/v1';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `sanitizeV2Html` — an allow-list sanitizer for what the V2 HTML compiler emits (a fragment or a whole document).
|
|
3
|
+
*
|
|
4
|
+
* The compilers already make every value safe as they print it. This is the second layer for the serving path: whatever
|
|
5
|
+
* is stored or travels between the compiler and a visitor's browser is run through it again, so a tampered or
|
|
6
|
+
* hand-edited page can't smuggle script in. It is dependency-free and DOM-free (a small tokenizer, not a parser), so it
|
|
7
|
+
* runs on a server. Unlike a generic HTML sanitizer it knows V2's own vocabulary and keeps all of it:
|
|
8
|
+
* `<details>/<summary>` accordions, YouTube/Vimeo video iframes, sandboxed embed iframes, `<figure>`, inline SVG icons,
|
|
9
|
+
* forms, `data-plx-*`/`data-plexo-*` hooks, the compiler's stylesheet, and the compiler's own runtime `<script>` (only
|
|
10
|
+
* when its text is byte-identical to the one the compiler prints).
|
|
11
|
+
*
|
|
12
|
+
* What it removes: every other `<script>` (the owner's custom code is added by the host AFTER sanitising — see
|
|
13
|
+
* `allowedScripts` if you want it kept), `on*` attributes, `javascript:`/`vbscript:`/`data:` addresses (a raster/SVG
|
|
14
|
+
* `data:image` is fine in `<img>` and CSS `url()`), iframes to anywhere but YouTube/Vimeo that aren't sandboxed,
|
|
15
|
+
* `<object>/<embed>/<base>/<meta http-equiv>/<template>/<math>`, comments, CSS `@import`, `expression()`, `behavior`,
|
|
16
|
+
* `-moz-binding`, and `url()` to anything that isn't http(s), a relative path or an image `data:`. Unknown tags are
|
|
17
|
+
* dropped and their text kept. The output is idempotent: sanitising it again changes nothing.
|
|
18
|
+
*/
|
|
19
|
+
export interface SanitizeV2Options {
|
|
20
|
+
/** May an HTML embed's sandbox allow scripts (inside its own origin-less sandbox)? Default true. */
|
|
21
|
+
allowEmbedScripts?: boolean;
|
|
22
|
+
/** Extra inline `<script>` bodies to keep, matched byte for byte (e.g. the owner's custom code the host vetted). */
|
|
23
|
+
allowedScripts?: string[];
|
|
24
|
+
/**
|
|
25
|
+
* https origins where the site's own uploaded fonts live (e.g. `https://cdn.example.com`), so `@font-face` may load from them.
|
|
26
|
+
* Without this, a font file may only come from Google Fonts (fonts.gstatic.com), the site's own paths (`/fonts/x.woff2`) or an
|
|
27
|
+
* embedded `data:font/…` address — never from anywhere else.
|
|
28
|
+
*/
|
|
29
|
+
fontOrigins?: string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Keeps the parts of a stylesheet (or a `style=""` declaration list) that are safe, and everything else byte for byte.
|
|
33
|
+
* Rules and declarations that could run script or fetch from somewhere strange are removed whole.
|
|
34
|
+
*/
|
|
35
|
+
export declare function sanitizeCss(css: string, opts?: Pick<SanitizeV2Options, 'fontOrigins'>): string;
|
|
36
|
+
/** Sanitises V2 compiler output (a fragment or a whole document) with an allow-list. See the file header. */
|
|
37
|
+
export declare function sanitizeV2Html(html: string, opts?: SanitizeV2Options): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** The name to show for a stored value: a stack ("'Inter', ui-sans-serif…") or a bare name. */
|
|
3
|
+
export declare const fontNameOf: (value: string | undefined) => string;
|
|
4
|
+
/**
|
|
5
|
+
* One font picker for everything: search, every family shown in its own letters, grouped the way people think about type
|
|
6
|
+
* (Your fonts, Popular, Serif, Sans serif…), and — when the host can store files — "Add a font" to use the brand's own.
|
|
7
|
+
* `onChange` gets the CSS font stack to store (`'Inter', ui-sans-serif, …`); `value` can be a stack or a bare name.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FontPicker: React.FC<{
|
|
10
|
+
value: string | undefined;
|
|
11
|
+
onChange: (stack: string, name: string) => void;
|
|
12
|
+
label?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type CustomFont } from '../../design/customFonts';
|
|
2
|
+
import { type FontRequest } from '../../design/fonts';
|
|
3
|
+
import type { DesignSystem } from '../../design/types';
|
|
4
|
+
import type { DocumentNode } from '../../types/editor';
|
|
5
|
+
export declare function addStylesheet(href: string): void;
|
|
6
|
+
/** The picker shows each family in its own letters; this loads just those letters for one family. */
|
|
7
|
+
export declare function loadFontPreview(family: string): void;
|
|
8
|
+
/** Every font family a design uses: text elements' own fonts and the design system's font tokens. */
|
|
9
|
+
export declare function familiesInUse(root: DocumentNode, ds: DesignSystem): FontRequest[];
|
|
10
|
+
/** Loads the Google fonts a design uses into the editor. Uploaded fonts are handled by `syncCustomFonts`. */
|
|
11
|
+
export declare function loadFontsInUse(root: DocumentNode, ds: DesignSystem): void;
|
|
12
|
+
/** Keeps one `<style>` of `@font-face` rules for the owner's uploaded fonts in step with the design system. */
|
|
13
|
+
export declare function syncCustomFonts(fonts: CustomFont[] | undefined): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DocumentNode } from '../../types/editor';
|
|
3
|
+
/**
|
|
4
|
+
* Font, weight, size and line height of a text element. The numbers are what the text really is on this screen — an H1 shows
|
|
5
|
+
* its heading size, not a made-up 16 — and changing one starts from there. Choosing a level (H1–H6) moves the size with it,
|
|
6
|
+
* until the person types a size of their own (then a small "reset" brings the design's size back).
|
|
7
|
+
*/
|
|
8
|
+
export declare const TypeControls: React.FC<{
|
|
9
|
+
node: DocumentNode;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Pictures for the page: free stock photos (when the host connects a photo service) and the images already uploaded to the project.
|
|
4
|
+
* Clicking a picture fills the selected image, or adds a new image to the page.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ImagesPanel: React.FC;
|
|
@@ -123,7 +123,9 @@ interface EditorContextType {
|
|
|
123
123
|
deleteNodes: (nodeIds: string[]) => void;
|
|
124
124
|
duplicateNode: (nodeId: string) => void;
|
|
125
125
|
/** Returns the new element's id (undefined if the component is unknown). */
|
|
126
|
-
insertComponent: (parentId: string | null, componentId: string
|
|
126
|
+
insertComponent: (parentId: string | null, componentId: string, overrides?: {
|
|
127
|
+
props?: Record<string, unknown>;
|
|
128
|
+
}) => string | undefined;
|
|
127
129
|
/** Adds a ready-made section (e.g. from the host's library) to the page, with fresh ids. */
|
|
128
130
|
insertNodeTree: (tree: DocumentNode) => void;
|
|
129
131
|
/** Moves elements that sit outside a screen's visible canvas back inside it (one undo step). */
|
|
@@ -4,7 +4,7 @@ export interface InsertableComponentItem {
|
|
|
4
4
|
name: string;
|
|
5
5
|
type: NodeType;
|
|
6
6
|
icon: string;
|
|
7
|
-
category: 'layout' | 'typography' | 'media' | 'interactive';
|
|
7
|
+
category: 'layout' | 'typography' | 'media' | 'interactive' | 'blog' | 'store' | 'funnel';
|
|
8
8
|
badge?: string;
|
|
9
9
|
/** Not built yet — it would publish as an empty box, so the Add panel doesn't offer it. */
|
|
10
10
|
unavailable?: boolean;
|
package/dist/v2/design/css.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare function designSystemVars(ds: DesignSystem): Record<string, strin
|
|
|
6
6
|
export declare function plexoVars(ds: DesignSystem, viewport: ViewportMode): Record<string, string>;
|
|
7
7
|
/** What the editor's frame for one screen size sets, so every element on it resolves tokens the way the published page will. */
|
|
8
8
|
export declare function frameVars(ds: DesignSystem, viewport: ViewportMode): Record<string, string>;
|
|
9
|
-
/** Google
|
|
9
|
+
/** Font families (Google or uploaded) a page needs: the families behind the font tokens it uses, minus system fonts. */
|
|
10
10
|
export declare function fontsNeeded(ds: DesignSystem, css: string): string[];
|
|
11
11
|
/**
|
|
12
12
|
* The design system as CSS for a published page: only the variables the page uses (a page doesn't ship Strata's whole
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { DesignSystem } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Fonts a site owner uploaded. They live in the design system (so they are saved with the site, shared by every page and
|
|
4
|
+
* synced nowhere else): a family name, and for each look of it (weight, italic) the address of the font file. The SDK never
|
|
5
|
+
* uploads anything itself — the host's `onUploadFont` stores the file and hands back its address.
|
|
6
|
+
*/
|
|
7
|
+
export type CustomFontFormat = 'woff2' | 'woff' | 'truetype' | 'opentype';
|
|
8
|
+
export interface CustomFontVariant {
|
|
9
|
+
/** 100–900 in steps of 100. */
|
|
10
|
+
weight: number;
|
|
11
|
+
style: 'normal' | 'italic';
|
|
12
|
+
/** Where the file lives: an https address, a path on the site, or (for tiny test fonts) an embedded `data:` address. */
|
|
13
|
+
url: string;
|
|
14
|
+
format: CustomFontFormat;
|
|
15
|
+
}
|
|
16
|
+
export interface CustomFont {
|
|
17
|
+
/** What the font is called in the picker and in the page's CSS. Letters, digits and spaces only. */
|
|
18
|
+
family: string;
|
|
19
|
+
variants: CustomFontVariant[];
|
|
20
|
+
}
|
|
21
|
+
/** Limits that keep a hand-edited or AI-written design from bloating a page. */
|
|
22
|
+
export declare const MAX_CUSTOM_FONTS = 12;
|
|
23
|
+
export declare const MAX_FONT_VARIANTS = 12;
|
|
24
|
+
export declare const MAX_FONT_URL = 2000;
|
|
25
|
+
/** A `data:` font is stored inside the design, so it is kept small (about 400 KB of font). */
|
|
26
|
+
export declare const MAX_FONT_DATA_URL = 560000;
|
|
27
|
+
/** The biggest font file the editor accepts. */
|
|
28
|
+
export declare const MAX_FONT_FILE_BYTES = 3000000;
|
|
29
|
+
export declare const FONT_FILE_ACCEPT = ".woff2,.woff,.ttf,.otf,font/woff2,font/woff,font/ttf,font/otf";
|
|
30
|
+
/** Is this an address a font may load from: https, a path on the site, or an embedded font? (No quotes, brackets or spaces ever.) */
|
|
31
|
+
export declare function isFontUrl(url: unknown): url is string;
|
|
32
|
+
/** Cleans untrusted custom-font data: bad entries are dropped, extras are cut, duplicates merged. Always returns a safe list. */
|
|
33
|
+
export declare function sanitizeCustomFonts(input: unknown): CustomFont[];
|
|
34
|
+
export declare const customFontsOf: (ds: Pick<DesignSystem, "fonts"> | undefined) => CustomFont[];
|
|
35
|
+
export declare const findCustomFont: (fonts: CustomFont[] | undefined, family: string) => CustomFont | undefined;
|
|
36
|
+
/** Adds one look of a family (creating the family if needed) — what happens after an upload. Replaces a look with the same weight and style. */
|
|
37
|
+
export declare function addCustomFont(ds: DesignSystem, family: string, variant: CustomFontVariant): DesignSystem;
|
|
38
|
+
export declare function removeCustomFont(ds: DesignSystem, family: string): DesignSystem;
|
|
39
|
+
/** `@font-face` rules (with `font-display: swap`) for the custom families in `used` (lower-case names), or all of them when `used` is omitted. */
|
|
40
|
+
export declare function customFontFaceCss(fonts: CustomFont[] | undefined, used?: ReadonlySet<string>): string;
|
|
41
|
+
export interface GuessedFont {
|
|
42
|
+
family: string;
|
|
43
|
+
weight: number;
|
|
44
|
+
style: 'normal' | 'italic';
|
|
45
|
+
format: CustomFontFormat | null;
|
|
46
|
+
}
|
|
47
|
+
/** Best guess of a font's name, weight, style and kind of file from its file name ("Brandon-Bold-Italic.woff2"), so the owner mostly just confirms. */
|
|
48
|
+
export declare function guessFontFromFile(fileName: string, mimeType?: string): GuessedFont;
|
|
49
|
+
export declare const WEIGHT_LABELS: Record<number, string>;
|
|
@@ -1,10 +1,44 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Fonts the editor offers: Google Fonts (every family V1 had, plus the most used ones), each with its group, the weights it
|
|
3
|
+
* really has, and a sensible fallback stack. The weights matter: asking Google for a weight a family doesn't have makes the
|
|
4
|
+
* whole stylesheet fail, so both the picker and the compilers go by this table.
|
|
5
|
+
*/
|
|
6
|
+
export type FontKind = 'sans' | 'serif' | 'display' | 'mono' | 'handwriting';
|
|
2
7
|
export interface FontChoice {
|
|
3
8
|
name: string;
|
|
4
|
-
kind:
|
|
9
|
+
kind: FontKind;
|
|
5
10
|
stack: string;
|
|
11
|
+
/** The weights this family comes in (100–900). */
|
|
12
|
+
weights: number[];
|
|
13
|
+
/** Among the most used fonts (shown first, under "Popular"). */
|
|
14
|
+
popular: boolean;
|
|
6
15
|
}
|
|
16
|
+
/** The fonts shown first, under "Popular": well-loved, readable, and a good mix of looks. */
|
|
17
|
+
export declare const POPULAR_FONTS: string[];
|
|
7
18
|
export declare const FONT_CHOICES: FontChoice[];
|
|
19
|
+
/** The catalogue entry for a family name (case-insensitive), if it is one of ours. */
|
|
20
|
+
export declare const findFont: (name: string) => FontChoice | undefined;
|
|
21
|
+
/** Fonts every browser already has — nothing to load. */
|
|
22
|
+
export declare const SYSTEM_FONTS: ReadonlySet<string>;
|
|
23
|
+
export declare const isSystemFont: (name: string) => boolean;
|
|
8
24
|
/** The first family of a font stack, unquoted ("'Plus Jakarta Sans', ui-sans-serif…" → "Plus Jakarta Sans"). */
|
|
9
25
|
export declare function primaryFamily(stack: string): string;
|
|
26
|
+
/** A family name worth loading: plain letters, digits and spaces (anything else can't safely go in a URL or a stylesheet). */
|
|
27
|
+
export declare const isLoadableFamily: (name: string) => boolean;
|
|
28
|
+
/** The stack to store for a font name: ours with its fallbacks, or any other name with a sans fallback. */
|
|
10
29
|
export declare const stackFor: (name: string) => string;
|
|
30
|
+
export interface FontRequest {
|
|
31
|
+
family: string;
|
|
32
|
+
/** Weights the design actually uses, on top of the usual four. */
|
|
33
|
+
weights?: number[];
|
|
34
|
+
}
|
|
35
|
+
/** The weights to ask Google for: the usual four plus the ones used, but only those the family really has. */
|
|
36
|
+
export declare function weightsToLoad(family: string, used?: number[]): number[];
|
|
37
|
+
/**
|
|
38
|
+
* The Google Fonts stylesheets a page needs: one address for all the families we know (with exactly the weights they have,
|
|
39
|
+
* so it can't fail), and one each for any other name — so a name Google doesn't know can't break the rest.
|
|
40
|
+
* `display=swap` shows text straight away in a fallback font and swaps when the font arrives.
|
|
41
|
+
*/
|
|
42
|
+
export declare function googleFontsHrefs(requests: Array<string | FontRequest>): string[];
|
|
43
|
+
/** A tiny stylesheet for showing a family's own name in the picker (only the letters needed, so it is a few KB). */
|
|
44
|
+
export declare function googleFontPreviewHref(family: string): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GOOGLE_FONTS_DATA: string[];
|
|
@@ -2,8 +2,11 @@ export type { DesignSystem, DesignToken, DesignComponent, DesignOptions, StrataL
|
|
|
2
2
|
export { createDefaultDesignSystem } from './baseline';
|
|
3
3
|
export { tokenCssValue, ref, refKey, tokenMap, getToken, getValue, setToken, setTokens, removeToken, resolveValue, resolveKey, nameFromKey } from './tokens';
|
|
4
4
|
export { deriveShades, readableOn, tint } from './shades';
|
|
5
|
-
export { FONT_CHOICES, primaryFamily, stackFor, type FontChoice } from './fonts';
|
|
5
|
+
export { FONT_CHOICES, POPULAR_FONTS, primaryFamily, stackFor, findFont, isSystemFont, isLoadableFamily, weightsToLoad, googleFontsHrefs, googleFontPreviewHref, type FontChoice, type FontKind, type FontRequest } from './fonts';
|
|
6
|
+
export { sanitizeCustomFonts, customFontFaceCss, addCustomFont, removeCustomFont, findCustomFont, customFontsOf, guessFontFromFile, isFontUrl, MAX_CUSTOM_FONTS, MAX_FONT_VARIANTS, MAX_FONT_FILE_BYTES, FONT_FILE_ACCEPT, WEIGHT_LABELS, type CustomFont, type CustomFontVariant, type CustomFontFormat } from './customFonts';
|
|
6
7
|
export { THEME_PRESETS, applyTheme, setPrimaryColor, setSecondaryColor, setNeutralScale, neutralScaleOf, setRoundness, roundnessOf, setFonts, setStatusColor, setDensity, type StatusKind, type ThemePreset, type NeutralScale, type Roundness } from './themes';
|
|
8
|
+
export { effectiveTypeMetrics, evalCssLength, textStyleOf, ROOT_FONT_PX, type TypeMetrics } from './typeScale';
|
|
9
|
+
export { levelTextStyle, isHeadingTextStyle } from './textStyles';
|
|
7
10
|
export { TEXT_STYLES, TEXT_STYLE_IDS, isTextStyle, textStyleDef, textStyleVars, textStyleCss, type TextStyleId, type TextStyleDef } from './textStyles';
|
|
8
11
|
export { designSystemVars, plexoVars, frameVars, designSystemCss, fontsNeeded } from './css';
|
|
9
12
|
export { componentStyle, componentVariants } from './components';
|
|
@@ -4,7 +4,7 @@ import type { ViewportMode } from '../types/editor';
|
|
|
4
4
|
* font sizes. Change the design system's fonts or sizes and every piece of text follows; on a phone the big ones step down
|
|
5
5
|
* on their own. They are derived from the tokens, so there is nothing extra to keep in sync with Strata.
|
|
6
6
|
*/
|
|
7
|
-
export type TextStyleId = 'display' | 'h1' | 'h2' | 'h3' | 'h4' | 'lead' | 'body' | 'small' | 'eyebrow';
|
|
7
|
+
export type TextStyleId = 'display' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'lead' | 'body' | 'small' | 'eyebrow';
|
|
8
8
|
export interface TextStyleDef {
|
|
9
9
|
id: TextStyleId;
|
|
10
10
|
label: string;
|
|
@@ -17,7 +17,7 @@ export interface TextStyleDef {
|
|
|
17
17
|
letterSpacing?: string;
|
|
18
18
|
textTransform?: string;
|
|
19
19
|
/** The HTML heading level text with this style should use, if any. */
|
|
20
|
-
tag?: 1 | 2 | 3 | 4;
|
|
20
|
+
tag?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
21
21
|
}
|
|
22
22
|
export declare const TEXT_STYLES: TextStyleDef[];
|
|
23
23
|
export declare const TEXT_STYLE_IDS: TextStyleId[];
|
|
@@ -27,3 +27,7 @@ export declare const textStyleDef: (id: TextStyleId) => TextStyleDef;
|
|
|
27
27
|
export declare function textStyleVars(viewport: ViewportMode): Record<string, string>;
|
|
28
28
|
/** What a style sets on an element — all by reference to the variables above. */
|
|
29
29
|
export declare function textStyleCss(id: TextStyleId): Record<string, string>;
|
|
30
|
+
/** The text style a heading of this level gets when nothing else says (H1 → "Heading 1", … H6 → "Heading 6"). */
|
|
31
|
+
export declare const levelTextStyle: (level: number | undefined) => TextStyleId;
|
|
32
|
+
/** Is this one of the heading styles (so changing a heading's level should move it to the new level's style)? */
|
|
33
|
+
export declare const isHeadingTextStyle: (id: unknown) => boolean;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { DocumentNode, ElementStyles, ViewportMode } from '../types/editor';
|
|
2
|
+
import { type TextStyleId } from './textStyles';
|
|
3
|
+
import type { DesignSystem, DesignToken } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* What a piece of text really looks like: its size, line height, weight and font, worked out the way the page does — from the
|
|
6
|
+
* element's own settings first, then its text style (Heading 1, Body…), which points at the design system's type scale.
|
|
7
|
+
* The editor shows these numbers instead of guessing "16", so an H1 reads as its real size and editing it starts from there.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ROOT_FONT_PX = 16;
|
|
10
|
+
interface Ctx {
|
|
11
|
+
tokens: Map<string, DesignToken>;
|
|
12
|
+
/** Width of the screen being designed, for `vw` and container units. */
|
|
13
|
+
width: number;
|
|
14
|
+
/** The element's own font size, for `em`. */
|
|
15
|
+
fontPx: number;
|
|
16
|
+
}
|
|
17
|
+
/** Evaluates a CSS length expression (px, rem, em, %, vw, calc/min/max/clamp) to pixels (or a plain number). Null when it can't. */
|
|
18
|
+
export declare function evalCssLength(input: string, ctx: Pick<Ctx, 'width' | 'fontPx'> & {
|
|
19
|
+
tokens?: Map<string, DesignToken>;
|
|
20
|
+
}): number | null;
|
|
21
|
+
export interface TypeMetrics {
|
|
22
|
+
/** Real size in pixels (rounded to 0.1). */
|
|
23
|
+
fontSize: number;
|
|
24
|
+
/** Line height as a multiple of the size (1.25). */
|
|
25
|
+
lineHeight: number;
|
|
26
|
+
fontWeight: number;
|
|
27
|
+
/** The font's name ("Inter"). */
|
|
28
|
+
fontFamily: string;
|
|
29
|
+
/** The text style it comes from, if any ("h1"). */
|
|
30
|
+
textStyle: TextStyleId | null;
|
|
31
|
+
/** Did the element set its own size / line height / font (as opposed to following the design system)? */
|
|
32
|
+
own: {
|
|
33
|
+
fontSize: boolean;
|
|
34
|
+
lineHeight: boolean;
|
|
35
|
+
fontWeight: boolean;
|
|
36
|
+
fontFamily: boolean;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/** The text style a node follows: its own, or for a heading with none, the style for its level. */
|
|
40
|
+
export declare function textStyleOf(node: Pick<DocumentNode, 'type' | 'props'>, styles: ElementStyles): TextStyleId | null;
|
|
41
|
+
/** Works out what the text really looks like on one screen — what the Typography panel shows. */
|
|
42
|
+
export declare function effectiveTypeMetrics(node: Pick<DocumentNode, 'type' | 'props'>, styles: ElementStyles, ds: DesignSystem, viewport: ViewportMode): TypeMetrics;
|
|
43
|
+
export {};
|
|
@@ -122,6 +122,19 @@ export interface V2HostConfig {
|
|
|
122
122
|
autoSaveDuration?: number;
|
|
123
123
|
/** Upload an image, return its public URL. Absent → small images are embedded in the design. */
|
|
124
124
|
onUpload?: (file: File) => Promise<string> | string;
|
|
125
|
+
/**
|
|
126
|
+
* Store a font file the site owner chose and return its public address (an `https://` URL, or a path on the site such as
|
|
127
|
+
* `/fonts/brand-bold.woff2`). Absent → the "Add a font" button is hidden (the SDK never uploads anything itself).
|
|
128
|
+
* `info` is what the owner confirmed (name, weight, italic) — handy for naming the stored file. The address ends up in the
|
|
129
|
+
* site's design system and, at publish time, in an `@font-face` rule: it must be reachable by visitors' browsers, and when
|
|
130
|
+
* it is on another origin the host passes that origin to `sanitizeV2Html({ fontOrigins })`.
|
|
131
|
+
*/
|
|
132
|
+
onUploadFont?: (file: File, info: {
|
|
133
|
+
family: string;
|
|
134
|
+
weight: number;
|
|
135
|
+
style: 'normal' | 'italic';
|
|
136
|
+
format: import('../design/customFonts').CustomFontFormat;
|
|
137
|
+
}) => Promise<string> | string;
|
|
125
138
|
/** Stock photo search, brokered by the host so API keys stay server-side. */
|
|
126
139
|
stockImages?: {
|
|
127
140
|
providers: StockImageProvider[];
|
|
@@ -129,6 +142,8 @@ export interface V2HostConfig {
|
|
|
129
142
|
};
|
|
130
143
|
/** The host's own media library (previously uploaded images). */
|
|
131
144
|
media?: MediaAsset[];
|
|
145
|
+
/** Loads the project's uploaded images when the Images panel opens (use instead of, or alongside, `media`, so the list is always fresh). */
|
|
146
|
+
loadMedia?: () => Promise<MediaAsset[]>;
|
|
132
147
|
/** Powers SOL / Ask-AI. Absent → the SOL tab is hidden (no AI, no credits, nothing fake). */
|
|
133
148
|
onAskSol?: (question: string, context: AskSolContext) => Promise<string>;
|
|
134
149
|
/**
|
package/dist/v2/index.d.ts
CHANGED
|
@@ -19,3 +19,8 @@ export { PAGE_TEMPLATES, listPageTemplates, buildPageFromTemplate, buildTemplate
|
|
|
19
19
|
export type { PageTemplate, PageTemplateSection, PageTemplateSummary } from './sections/pageTemplates';
|
|
20
20
|
export { catalogSchema, describeDesign, applyCommands, parseSolReply, describeCommand, setPageTemplateResolver, SOL_SYSTEM_PROMPT, solCommandSchema } from './sol';
|
|
21
21
|
export type { SolCatalog, SolKind, SolField, SolVariant, SolDesignSummary, SolSectionSummary, SolCommand, SolCommandOp, CommandResult, ParsedSolReply, ApplyOptions, ApplyResult, PageTemplateResolver } from './sol';
|
|
22
|
+
export { sanitizeV2Html, sanitizeCss } from './compile/sanitizeHtml';
|
|
23
|
+
export type { SanitizeV2Options } from './compile/sanitizeHtml';
|
|
24
|
+
export { MAX_CUSTOM_JS, validHtmlId, prepareCustomJs } from './compile/extras';
|
|
25
|
+
export { convertV1Design, V1_DYNAMIC_EQUIVALENTS, V2_DYNAMIC_READY } from './migrate/v1';
|
|
26
|
+
export type { ConvertV1Options, ConvertV1Result, ConvertV1Fidelity } from './migrate/v1';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { PageDefinition } from '../types/editor';
|
|
2
|
+
/**
|
|
3
|
+
* Converts the safe subset of a V1 design (`TemplateJSON`: `body.rows[].columns[].elements / nestedRows / childOrder`) into a
|
|
4
|
+
* V2 page, so a site built in the old builder can be opened, edited and published with V2.
|
|
5
|
+
*
|
|
6
|
+
* Mapping, in one breath: a row becomes a section (with its anchor name, background and spacing); its columns become a grid
|
|
7
|
+
* whose shares follow the V1 column widths and which stacks on phones; every element type V2 has a twin for (heading, text,
|
|
8
|
+
* button, image, divider, spacer, card, icon, carousel, video, social, menu, html, table, timer, accordion) maps one to one with
|
|
9
|
+
* its styling (colours, fonts, sizes, spacing, corners, borders, backgrounds, alignment, per-screen overrides); form fields become
|
|
10
|
+
* one V2 form. Custom script is handed back in `extras.customJs` — the host decides whether to run it.
|
|
11
|
+
*
|
|
12
|
+
* It never throws. Anything it can't carry over is named in `warnings` in plain words, and `fidelity` says how much to trust the
|
|
13
|
+
* result: 'exact' only when nothing was lost or approximated, 'approximate' when everything is there but some looks or behaviours
|
|
14
|
+
* differ (rich text simplified, a V1 embed now sandboxed…), 'partial' when whole blocks had to be left out.
|
|
15
|
+
*/
|
|
16
|
+
export interface ConvertV1Options {
|
|
17
|
+
/** Id for the new page (default `v1-page`). */
|
|
18
|
+
id?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
slug?: string;
|
|
21
|
+
isHome?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export type ConvertV1Fidelity = 'exact' | 'approximate' | 'partial';
|
|
24
|
+
export interface ConvertV1Result {
|
|
25
|
+
page: PageDefinition;
|
|
26
|
+
warnings: string[];
|
|
27
|
+
fidelity: ConvertV1Fidelity;
|
|
28
|
+
/** What isn't a design but came with it. `customJs` is the owner's script from the old Settings tab (not sanitised — the host decides). */
|
|
29
|
+
extras: {
|
|
30
|
+
customJs?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* V1's blog / commerce / funnel blocks and the V2 block that replaces each. They are opaque placeholders in V1 (the host splices
|
|
35
|
+
* real data into them), so each needs a real V2 node to land on.
|
|
36
|
+
*
|
|
37
|
+
* Each lands on the V2 dynamic block of the same job (see render/dynamicBlocks.ts). MailDrip sign-up forms have no equivalent and
|
|
38
|
+
* are dropped with a warning, because `parsePages` would reject a type it doesn't know.
|
|
39
|
+
*/
|
|
40
|
+
export declare const V1_DYNAMIC_EQUIVALENTS: Readonly<Record<string, string | null>>;
|
|
41
|
+
export declare const V2_DYNAMIC_READY = true;
|
|
42
|
+
/** See the file header. */
|
|
43
|
+
export declare function convertV1Design(v1: unknown, opts?: ConvertV1Options): ConvertV1Result;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { DocumentNode } from '../types/editor';
|
|
2
|
+
import { type HNode } from './ir';
|
|
3
|
+
import type { ElementContext } from './elements';
|
|
4
|
+
/**
|
|
5
|
+
* Dynamic blocks: places on a page where the Plexo server fills in live content (a blog post, the shop, a cart, an order).
|
|
6
|
+
*
|
|
7
|
+
* A published dynamic block is an EMPTY marker `<div data-plexo-…="true"></div>`. The server finds the marker in the
|
|
8
|
+
* compiled HTML and renders the real thing into it (lib/pub/blogLayoutRender.ts for the blog, public/commerce.js for the
|
|
9
|
+
* store, public/lms-signup.js for funnel sign-up). The marker names and attributes below are therefore a contract with the
|
|
10
|
+
* server, identical to what the V1 builder's compiler prints — change them only together with the server.
|
|
11
|
+
*
|
|
12
|
+
* In the editor the same block draws a labelled placeholder with sample rows, so a designer can see where it goes and how
|
|
13
|
+
* big it is without any data existing yet.
|
|
14
|
+
*/
|
|
15
|
+
export declare const DYNAMIC_ELEMENT_TYPES: readonly ["blogTitle", "blogContent", "blogFeaturedImage", "blogDate", "blogAuthor", "blogCategories", "blogComments", "blogPostList", "shopGrid", "product", "booking", "cart", "checkout", "orderConfirmation", "orderTracking", "signupForm"];
|
|
16
|
+
export type DynamicElementType = (typeof DYNAMIC_ELEMENT_TYPES)[number];
|
|
17
|
+
export declare const isDynamicElement: (t: string) => t is DynamicElementType;
|
|
18
|
+
/** Every setting a dynamic block can carry. Each type reads only the ones that apply to it (see SPECS). */
|
|
19
|
+
export interface DynamicProps {
|
|
20
|
+
/** Text shown before the date / author / categories ("Written by "). */
|
|
21
|
+
prefix?: string;
|
|
22
|
+
/** product: which product to show (empty on a product page, which shows whichever one the visitor opened). */
|
|
23
|
+
productId?: string;
|
|
24
|
+
/** booking: which service to book. */
|
|
25
|
+
serviceId?: string;
|
|
26
|
+
/** product: 'detail' (a full product page), 'bare' (just the buy button); shopGrid: 'dark' cards. */
|
|
27
|
+
mode?: string;
|
|
28
|
+
/** shopGrid: false → a small curated grid instead of the full searchable store. */
|
|
29
|
+
storeMode?: boolean;
|
|
30
|
+
/** shopGrid (curated): how many products. */
|
|
31
|
+
limit?: number | string;
|
|
32
|
+
/** shopGrid (curated): 'best_seller', 'most_recent' or a category's name. */
|
|
33
|
+
category?: string;
|
|
34
|
+
sort?: string;
|
|
35
|
+
itemsPerRow?: number | string;
|
|
36
|
+
itemsPerPage?: number | string;
|
|
37
|
+
paginated?: boolean;
|
|
38
|
+
/** signupForm: which funnel the form belongs to (defaults to the one being compiled). */
|
|
39
|
+
templateId?: string;
|
|
40
|
+
}
|
|
41
|
+
type Group = 'Blog' | 'Store' | 'Funnel';
|
|
42
|
+
export declare const dynamicLabel: (t: DynamicElementType) => string;
|
|
43
|
+
export declare const dynamicGroup: (t: DynamicElementType) => Group;
|
|
44
|
+
/** Does this type read the given setting? Drives which controls the editor shows. */
|
|
45
|
+
export declare const dynamicUses: (t: DynamicElementType, key: keyof DynamicProps) => boolean;
|
|
46
|
+
/** What a freshly added block starts with. */
|
|
47
|
+
export declare function defaultDynamicProps(type: DynamicElementType): Record<string, unknown>;
|
|
48
|
+
/**
|
|
49
|
+
* The markup for a dynamic block. Published: just the empty marker (the server fills it). In the editor
|
|
50
|
+
* (`placeholders`): the marker around a labelled placeholder, so the page shows where the live content will go.
|
|
51
|
+
*/
|
|
52
|
+
export declare function buildDynamic(node: DocumentNode, c: ElementContext): HNode | null;
|
|
53
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NodeType } from '../types/editor';
|
|
2
2
|
import type { SocialNetwork } from './socialIcons';
|
|
3
|
+
export type { DynamicProps, DynamicElementType } from './dynamicBlocks';
|
|
3
4
|
export interface CarouselSlide {
|
|
4
5
|
src: string;
|
|
5
6
|
alt?: string;
|
|
@@ -85,7 +86,7 @@ export interface IconProps {
|
|
|
85
86
|
strokeWidth?: number; /** Read aloud by screen readers; empty = decorative. */
|
|
86
87
|
label?: string;
|
|
87
88
|
}
|
|
88
|
-
export declare const RICH_ELEMENT_TYPES: readonly ["icon", "carousel", "video", "social", "menu", "html", "table", "timer", "form", "accordion"];
|
|
89
|
+
export declare const RICH_ELEMENT_TYPES: readonly ["icon", "carousel", "video", "social", "menu", "html", "table", "timer", "form", "accordion", "blogTitle", "blogContent", "blogFeaturedImage", "blogDate", "blogAuthor", "blogCategories", "blogComments", "blogPostList", "shopGrid", "product", "booking", "cart", "checkout", "orderConfirmation", "orderTracking", "signupForm"];
|
|
89
90
|
export type RichElementType = (typeof RICH_ELEMENT_TYPES)[number];
|
|
90
91
|
export declare const isRichElement: (t: NodeType) => t is RichElementType;
|
|
91
92
|
/** What a freshly added element starts with — real, editable content, never an empty box. */
|
|
@@ -12,6 +12,10 @@ export interface ElementContext {
|
|
|
12
12
|
allowEmbedScripts: boolean;
|
|
13
13
|
/** Clock for the timer's first paint (ms). */
|
|
14
14
|
now: number;
|
|
15
|
+
/** Draw labelled placeholders inside dynamic blocks (the editor does; published pages print only the empty marker). */
|
|
16
|
+
placeholders?: boolean;
|
|
17
|
+
/** The funnel/site this page belongs to — what a sign-up form connects to when it isn't given its own. */
|
|
18
|
+
templateId?: string;
|
|
15
19
|
}
|
|
16
20
|
/** Same name the host's form handler checks as its spam trap (a visitor never sees or fills it). */
|
|
17
21
|
export declare const FORM_HONEYPOT_FIELD_NAME = "_hp_field";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DocumentNode, ElementStyles } from '../../types/editor';
|
|
2
|
+
import { type DynamicElementType } from '../../render/dynamicBlocks';
|
|
3
|
+
import type { Kit } from '../kit';
|
|
4
|
+
import type { BuildCtx } from '../types';
|
|
5
|
+
/** A dynamic block (blog, store or funnel content the server fills in) placed inside a section. */
|
|
6
|
+
export declare const dyn: (k: Kit, slot: string, type: DynamicElementType, props?: Record<string, unknown>, styles?: Partial<ElementStyles>) => DocumentNode;
|
|
7
|
+
/** The usual eyebrow + heading + paragraph, aligned like the rest of the section. */
|
|
8
|
+
export declare const intro: (k: Kit, c: BuildCtx["content"], o?: {
|
|
9
|
+
maxWidth?: string;
|
|
10
|
+
}) => DocumentNode | null;
|