@palmyit/elements 0.1.8 → 0.1.20
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 +1 -13
- package/dist/definitions.d.ts +15 -9
- package/dist/definitions.js +1756 -949
- package/dist/elements/article/definition.d.ts +43 -0
- package/dist/elements/article/template.d.ts +12 -0
- package/dist/elements/button/definition.d.ts +1 -0
- package/dist/elements/footer/definition.d.ts +35 -0
- package/dist/elements/footer/template.d.ts +2 -0
- package/dist/elements/heading/definition.d.ts +29 -0
- package/dist/elements/heading/template.d.ts +2 -0
- package/dist/elements/icon/definition.d.ts +11 -0
- package/dist/elements/image/definition.d.ts +47 -0
- package/dist/elements/image/template.d.ts +30 -0
- package/dist/elements/list/definition.d.ts +2 -0
- package/dist/elements/nav/definition.d.ts +39 -0
- package/dist/elements/nav/template.d.ts +17 -0
- package/dist/elements/page/definition.d.ts +41 -1
- package/dist/elements/table/definition.d.ts +2 -0
- package/dist/elements/text/definition.d.ts +2 -1
- package/dist/elements/video/definition.d.ts +39 -0
- package/dist/elements/video/template.d.ts +6 -0
- package/dist/elements/video/youtube.d.ts +4 -0
- package/dist/manifest.json +2 -2
- package/dist/plmt-elements.css +1 -1
- package/dist/render/renderHtml.d.ts +1 -1
- package/dist/render/styleToClasses.d.ts +8 -9
- package/dist/render/styleToVars.d.ts +2 -0
- package/dist/render/styleTokens.d.ts +11 -1
- package/dist/render/tags.d.ts +9 -1
- package/dist/render/types.d.ts +4 -0
- package/dist/schema/Fields/ColorField/colorText.d.ts +3 -0
- package/dist/schema/Fields/IconPicker/iconCatalog.d.ts +5 -1
- package/dist/schema/addressSchema.d.ts +2 -0
- package/dist/schema/device/devices.d.ts +8 -0
- package/dist/schema/deviceSettings.d.ts +1 -1
- package/dist/schema/elementCategories.d.ts +29 -0
- package/dist/schema/elementConfiguration.d.ts +1 -1
- package/dist/schema/elementRegistry.d.ts +25 -1
- package/dist/schema/elementStyleDefinitions.d.ts +6 -14
- package/dist/schema/elementTemplates.d.ts +3 -2
- package/dist/schema/linkSettings.d.ts +19 -2
- package/dist/schema/style/elementStyle.d.ts +1 -1
- package/dist/schema/styleItems.d.ts +18 -0
- package/dist/schema/styleTokensSchema.d.ts +34 -18
- package/dist/tags.json +5 -1
- package/dist/templates/brands/brandSpec.d.ts +5 -0
- package/dist/templates/elementSpec.d.ts +1 -1
- package/dist/templates/head.d.ts +43 -0
- package/dist/templates/heroicons/heroiconSpec.d.ts +6 -0
- package/dist/templates.d.ts +3 -0
- package/dist/templates.js +1351 -237
- package/dist/youtube-BDsE1Bz3.js +910 -0
- package/package.json +3 -3
- package/dist/styleToClasses-CZSWp6Ez.js +0 -683
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementSpec } from './types';
|
|
2
2
|
export declare function escapeHtml(value: unknown): string;
|
|
3
|
-
/**
|
|
3
|
+
/** Allowlist-sanitize rich text; demote h1 to h2; drop scripts and handlers. */
|
|
4
4
|
export declare function sanitizeRichTextHtml(html: string): string;
|
|
5
5
|
export declare function renderHtml(node: ElementSpec | string): string;
|
|
@@ -8,22 +8,21 @@ export type DeviceStyleProps = {
|
|
|
8
8
|
};
|
|
9
9
|
type VariantPrefix = '' | 'tablet:' | 'mobile:' | 'tablet-landscape:' | 'mobile-landscape:';
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* Authored style keys become CSS variables (via unresolvedStyleForVars).
|
|
12
|
+
* No property utilities — those lost to @layer components and fought defaults.
|
|
13
13
|
*/
|
|
14
|
-
export declare function styleObjectToClasses(
|
|
14
|
+
export declare function styleObjectToClasses(_type: ElementType, style: Record<string, unknown> | undefined, _variant?: VariantPrefix): {
|
|
15
15
|
classes: string[];
|
|
16
16
|
unresolved: Record<string, unknown>;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
|
-
* Classes for an element: type defaults
|
|
20
|
-
*
|
|
21
|
-
* last class for a conflicting property should not be duplicated by the caller.
|
|
19
|
+
* Classes for an element: structural type defaults only.
|
|
20
|
+
* Device style overrides are applied as CSS variables by renderDeviceCss.
|
|
22
21
|
*/
|
|
23
|
-
export declare function styleToClasses(type: ElementType,
|
|
22
|
+
export declare function styleToClasses(type: ElementType, _props: DeviceStyleProps): string[];
|
|
24
23
|
/**
|
|
25
|
-
* Style keys that
|
|
26
|
-
* off-scale lengths
|
|
24
|
+
* Style keys that need --palmyit-* variables. Every authored key is included so
|
|
25
|
+
* on-scale tokens and off-scale lengths both reach the element CSS.
|
|
27
26
|
*/
|
|
28
27
|
export declare function unresolvedStyleForVars(type: ElementType, style: Record<string, unknown> | undefined): Record<string, unknown>;
|
|
29
28
|
/** Convert page style tokens into values styleToCssVariables can write. */
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { CssVariables } from './types';
|
|
2
|
+
/** Expand composite keys and drop attribute-only keys before writing variables. */
|
|
3
|
+
export declare function expandStyleForVars(style: Record<string, unknown>): Record<string, unknown>;
|
|
2
4
|
export declare function styleToCssVariables(style: Record<string, unknown> | undefined, prefix: string): CssVariables;
|
|
@@ -11,7 +11,7 @@ export declare const LEADING_TOKENS: readonly ["none", "tight", "snug", "normal"
|
|
|
11
11
|
export type LeadingToken = (typeof LEADING_TOKENS)[number];
|
|
12
12
|
export declare const TRACKING_TOKENS: readonly ["tighter", "tight", "normal", "wide", "wider", "widest"];
|
|
13
13
|
export type TrackingToken = (typeof TRACKING_TOKENS)[number];
|
|
14
|
-
export declare const COLOR_NAMES: readonly ["accent", "transparent", "white", "black", "slate-50", "slate-100", "slate-200", "slate-300", "slate-400", "slate-500", "slate-600", "slate-700", "slate-800", "slate-900", "slate-950"];
|
|
14
|
+
export declare const COLOR_NAMES: readonly ["accent", "accent-50", "accent-100", "accent-700", "accent-foreground", "transparent", "white", "black", "slate-50", "slate-100", "slate-200", "slate-300", "slate-400", "slate-500", "slate-600", "slate-700", "slate-800", "slate-900", "slate-950"];
|
|
15
15
|
export type ColorName = (typeof COLOR_NAMES)[number];
|
|
16
16
|
export declare const OPACITY_STEPS: readonly [0, 5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100];
|
|
17
17
|
export type OpacityStep = (typeof OPACITY_STEPS)[number];
|
|
@@ -55,3 +55,13 @@ export declare function trackingClass(token: TrackingToken): string;
|
|
|
55
55
|
export declare function textSizeTokenToCss(token: TextSizeToken): string;
|
|
56
56
|
/** CSS value for a palette color (for page theme variables). */
|
|
57
57
|
export declare function paletteColorToCss(color: PaletteColor): string | undefined;
|
|
58
|
+
/** CSS length for a spacing token. */
|
|
59
|
+
export declare function spacingTokenToCss(token: SpacingToken): string;
|
|
60
|
+
/** CSS length for a radius token. */
|
|
61
|
+
export declare function radiusTokenToCss(token: RadiusToken): string;
|
|
62
|
+
/** CSS length for a border-width token. */
|
|
63
|
+
export declare function borderWidthTokenToCss(token: BorderWidthToken): string;
|
|
64
|
+
/** CSS value for a leading token. */
|
|
65
|
+
export declare function leadingTokenToCss(token: LeadingToken): string;
|
|
66
|
+
/** CSS value for a tracking token. */
|
|
67
|
+
export declare function trackingTokenToCss(token: TrackingToken): string;
|
package/dist/render/tags.d.ts
CHANGED
|
@@ -4,8 +4,11 @@ export declare const tags: {
|
|
|
4
4
|
readonly PPage: "plmt-page";
|
|
5
5
|
readonly PSection: "plmt-section";
|
|
6
6
|
readonly PContainer: "plmt-container";
|
|
7
|
+
readonly PNav: "plmt-nav";
|
|
8
|
+
readonly PFooter: "plmt-footer";
|
|
7
9
|
readonly PButton: "plmt-button";
|
|
8
10
|
readonly PText: "plmt-text";
|
|
11
|
+
readonly PHeading: "plmt-heading";
|
|
9
12
|
readonly PRichText: "plmt-rich-text";
|
|
10
13
|
readonly PImage: "plmt-image";
|
|
11
14
|
readonly PVideo: "plmt-video";
|
|
@@ -18,15 +21,19 @@ export declare const tags: {
|
|
|
18
21
|
readonly PCheckbox: "plmt-checkbox";
|
|
19
22
|
readonly PRadio: "plmt-radio";
|
|
20
23
|
readonly PSelect: "plmt-select";
|
|
24
|
+
readonly PArticle: "plmt-article";
|
|
21
25
|
};
|
|
22
26
|
export type ShortcodeTag = (typeof tags)[ElementType];
|
|
23
27
|
/** Semantic HTML tag for each element type (Stage 3). */
|
|
24
28
|
export declare const semanticTags: {
|
|
25
|
-
readonly PPage: "
|
|
29
|
+
readonly PPage: "div";
|
|
26
30
|
readonly PSection: "section";
|
|
27
31
|
readonly PContainer: "div";
|
|
32
|
+
readonly PNav: "header";
|
|
33
|
+
readonly PFooter: "footer";
|
|
28
34
|
readonly PButton: "button";
|
|
29
35
|
readonly PText: "p";
|
|
36
|
+
readonly PHeading: "h2";
|
|
30
37
|
readonly PRichText: "div";
|
|
31
38
|
readonly PImage: "img";
|
|
32
39
|
readonly PVideo: "video";
|
|
@@ -39,4 +46,5 @@ export declare const semanticTags: {
|
|
|
39
46
|
readonly PCheckbox: "div";
|
|
40
47
|
readonly PRadio: "fieldset";
|
|
41
48
|
readonly PSelect: "div";
|
|
49
|
+
readonly PArticle: "article";
|
|
42
50
|
};
|
package/dist/render/types.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ export type ElementSpec = {
|
|
|
12
12
|
export type ElementSpecOptions = {
|
|
13
13
|
/** Layout host children (from Puck slots or recursion). Ignored for leaf elements. */
|
|
14
14
|
children?: Array<ElementSpec | string>;
|
|
15
|
+
/** Page context passed from the page root (e.g. current URL for nav highlighting). */
|
|
16
|
+
context?: {
|
|
17
|
+
pageUrl?: string;
|
|
18
|
+
};
|
|
15
19
|
};
|
|
16
20
|
export type ShortcodeNode = {
|
|
17
21
|
type: ElementType;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/** Heroicons 24px file names (outline and solid share this list). Generated from src/templates/heroicons/24/outline. */
|
|
2
|
+
export declare const HEROICON_NAMES: readonly ["academic-cap", "adjustments-horizontal", "adjustments-vertical", "archive-box", "archive-box-arrow-down", "archive-box-x-mark", "arrow-down", "arrow-down-circle", "arrow-down-left", "arrow-down-on-square", "arrow-down-on-square-stack", "arrow-down-right", "arrow-down-tray", "arrow-left", "arrow-left-circle", "arrow-left-end-on-rectangle", "arrow-left-on-rectangle", "arrow-left-start-on-rectangle", "arrow-long-down", "arrow-long-left", "arrow-long-right", "arrow-long-up", "arrow-path", "arrow-path-rounded-square", "arrow-right", "arrow-right-circle", "arrow-right-end-on-rectangle", "arrow-right-on-rectangle", "arrow-right-start-on-rectangle", "arrow-small-down", "arrow-small-left", "arrow-small-right", "arrow-small-up", "arrow-top-right-on-square", "arrow-trending-down", "arrow-trending-up", "arrow-turn-down-left", "arrow-turn-down-right", "arrow-turn-left-down", "arrow-turn-left-up", "arrow-turn-right-down", "arrow-turn-right-up", "arrow-turn-up-left", "arrow-turn-up-right", "arrow-up", "arrow-up-circle", "arrow-up-left", "arrow-up-on-square", "arrow-up-on-square-stack", "arrow-up-right", "arrow-up-tray", "arrow-uturn-down", "arrow-uturn-left", "arrow-uturn-right", "arrow-uturn-up", "arrows-pointing-in", "arrows-pointing-out", "arrows-right-left", "arrows-up-down", "at-symbol", "backspace", "backward", "banknotes", "bars-2", "bars-3", "bars-3-bottom-left", "bars-3-bottom-right", "bars-3-center-left", "bars-4", "bars-arrow-down", "bars-arrow-up", "battery-0", "battery-100", "battery-50", "beaker", "bell", "bell-alert", "bell-slash", "bell-snooze", "bold", "bolt", "bolt-slash", "book-open", "bookmark", "bookmark-slash", "bookmark-square", "briefcase", "bug-ant", "building-library", "building-office", "building-office-2", "building-storefront", "cake", "calculator", "calendar", "calendar-date-range", "calendar-days", "camera", "chart-bar", "chart-bar-square", "chart-pie", "chat-bubble-bottom-center", "chat-bubble-bottom-center-text", "chat-bubble-left", "chat-bubble-left-ellipsis", "chat-bubble-left-right", "chat-bubble-oval-left", "chat-bubble-oval-left-ellipsis", "check", "check-badge", "check-circle", "chevron-double-down", "chevron-double-left", "chevron-double-right", "chevron-double-up", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevron-up-down", "circle-stack", "clipboard", "clipboard-document", "clipboard-document-check", "clipboard-document-list", "clock", "cloud", "cloud-arrow-down", "cloud-arrow-up", "code-bracket", "code-bracket-square", "cog", "cog-6-tooth", "cog-8-tooth", "command-line", "computer-desktop", "cpu-chip", "credit-card", "cube", "cube-transparent", "currency-bangladeshi", "currency-dollar", "currency-euro", "currency-pound", "currency-rupee", "currency-yen", "cursor-arrow-rays", "cursor-arrow-ripple", "device-phone-mobile", "device-tablet", "divide", "document", "document-arrow-down", "document-arrow-up", "document-chart-bar", "document-check", "document-currency-bangladeshi", "document-currency-dollar", "document-currency-euro", "document-currency-pound", "document-currency-rupee", "document-currency-yen", "document-duplicate", "document-magnifying-glass", "document-minus", "document-plus", "document-text", "ellipsis-horizontal", "ellipsis-horizontal-circle", "ellipsis-vertical", "envelope", "envelope-open", "equals", "exclamation-circle", "exclamation-triangle", "eye", "eye-dropper", "eye-slash", "face-frown", "face-smile", "film", "finger-print", "fire", "flag", "folder", "folder-arrow-down", "folder-minus", "folder-open", "folder-plus", "forward", "funnel", "gif", "gift", "gift-top", "globe-alt", "globe-americas", "globe-asia-australia", "globe-europe-africa", "h1", "h2", "h3", "hand-raised", "hand-thumb-down", "hand-thumb-up", "hashtag", "heart", "home", "home-modern", "identification", "inbox", "inbox-arrow-down", "inbox-stack", "information-circle", "italic", "key", "language", "lifebuoy", "light-bulb", "link", "link-slash", "list-bullet", "lock-closed", "lock-open", "magnifying-glass", "magnifying-glass-circle", "magnifying-glass-minus", "magnifying-glass-plus", "map", "map-pin", "megaphone", "microphone", "minus", "minus-circle", "minus-small", "moon", "musical-note", "newspaper", "no-symbol", "numbered-list", "paint-brush", "paper-airplane", "paper-clip", "pause", "pause-circle", "pencil", "pencil-square", "percent-badge", "phone", "phone-arrow-down-left", "phone-arrow-up-right", "phone-x-mark", "photo", "play", "play-circle", "play-pause", "plus", "plus-circle", "plus-small", "power", "presentation-chart-bar", "presentation-chart-line", "printer", "puzzle-piece", "qr-code", "question-mark-circle", "queue-list", "radio", "receipt-percent", "receipt-refund", "rectangle-group", "rectangle-stack", "rocket-launch", "rss", "scale", "scissors", "server", "server-stack", "share", "shield-check", "shield-exclamation", "shopping-bag", "shopping-cart", "signal", "signal-slash", "slash", "sparkles", "speaker-wave", "speaker-x-mark", "square-2-stack", "square-3-stack-3d", "squares-2x2", "squares-plus", "star", "stop", "stop-circle", "strikethrough", "sun", "swatch", "table-cells", "tag", "ticket", "trash", "trophy", "truck", "tv", "underline", "user", "user-circle", "user-group", "user-minus", "user-plus", "users", "variable", "video-camera", "video-camera-slash", "view-columns", "viewfinder-circle", "wallet", "wifi", "window", "wrench", "wrench-screwdriver", "x-circle", "x-mark"];
|
|
3
|
+
export type HeroiconName = (typeof HEROICON_NAMES)[number];
|
|
1
4
|
export declare const NO_ICON = "";
|
|
2
|
-
export declare function
|
|
5
|
+
export declare function isHeroiconName(value: string): boolean;
|
|
6
|
+
/** Display label for a Heroicons file name (map-pin becomes Map pin). */
|
|
3
7
|
export declare function labelForIcon(value: string): string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/** An http(s) URL or a single-slash path on the same site. Other schemes and relative paths are rejected. */
|
|
3
3
|
export declare const addressSchema: z.ZodString;
|
|
4
|
+
/** Like addressSchema, plus mailto: and tel: for contact and footer links. */
|
|
5
|
+
export declare const linkAddressSchema: z.ZodString;
|
|
@@ -11,6 +11,14 @@ export type BuilderDevice = {
|
|
|
11
11
|
landscape?: ViewportSize;
|
|
12
12
|
};
|
|
13
13
|
export declare const builderDevices: BuilderDevice[];
|
|
14
|
+
/**
|
|
15
|
+
* Media queries for `<picture>` sources. Must match `@custom-variant` in
|
|
16
|
+
* `src/styles/tailwind.css` (enforced by devices.test.ts).
|
|
17
|
+
*/
|
|
18
|
+
export declare const deviceMediaQueries: {
|
|
19
|
+
readonly mobile: "(max-width: 767px)";
|
|
20
|
+
readonly tablet: "(max-width: 1279px)";
|
|
21
|
+
};
|
|
14
22
|
export declare const builderViewports: {
|
|
15
23
|
icon: "Tablet" | "Monitor" | "Smartphone";
|
|
16
24
|
label: DeviceName;
|
|
@@ -7,7 +7,7 @@ export type DeviceStyleOverrides<TStyle> = Partial<Record<OverrideProp, Partial<
|
|
|
7
7
|
/**
|
|
8
8
|
* Adds the Show for devices flags to an element, and, when it has `styles`,
|
|
9
9
|
* portrait and landscape Tablet and Mobile overrides of those styles. Publish
|
|
10
|
-
* writes
|
|
10
|
+
* writes a nested `devices` object with only the flags and overrides that differ.
|
|
11
11
|
*/
|
|
12
12
|
export declare function withDeviceSettings<TProps>(configuration: ElementConfiguration<TProps>, styles?: StyleDefinition[]): ElementConfiguration<TProps & Partial<DeviceVisibility> & DeviceStyleOverrides<Record<string, unknown>>>;
|
|
13
13
|
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ElementType } from './elementConfiguration';
|
|
2
|
+
export type ElementCategory = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
components: readonly ElementType[];
|
|
6
|
+
};
|
|
7
|
+
/** Structural types kept out of the Elements drawer. */
|
|
8
|
+
export declare const hiddenFromDrawer: readonly ["PPage", "PSection"];
|
|
9
|
+
export declare const elementCategories: readonly [{
|
|
10
|
+
readonly id: "basic";
|
|
11
|
+
readonly title: "Basic";
|
|
12
|
+
readonly components: readonly ["PButton", "PText", "PHeading", "PRichText", "PImage", "PVideo", "PList", "PIcon", "PDivider"];
|
|
13
|
+
}, {
|
|
14
|
+
readonly id: "layout";
|
|
15
|
+
readonly title: "Layout";
|
|
16
|
+
readonly components: readonly ["PContainer", "PTable", "PArticle", "PNav", "PFooter"];
|
|
17
|
+
}, {
|
|
18
|
+
readonly id: "inputs";
|
|
19
|
+
readonly title: "Inputs";
|
|
20
|
+
readonly components: readonly ["PTextField", "PTextArea", "PCheckbox", "PRadio"];
|
|
21
|
+
}, {
|
|
22
|
+
readonly id: "dropdown";
|
|
23
|
+
readonly title: "Dropdown";
|
|
24
|
+
readonly components: readonly ["PSelect"];
|
|
25
|
+
}, {
|
|
26
|
+
readonly id: "feedback";
|
|
27
|
+
readonly title: "Feedback";
|
|
28
|
+
readonly components: readonly [];
|
|
29
|
+
}];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ElementTemplate } from './elementTemplates';
|
|
3
|
-
export type ElementType = 'PPage' | 'PSection' | 'PContainer' | 'PButton' | 'PText' | 'PRichText' | 'PImage' | 'PVideo' | 'PList' | 'PIcon' | 'PDivider' | 'PTextField' | 'PTextArea' | 'PCheckbox' | 'PRadio' | 'PSelect' | 'PTable';
|
|
3
|
+
export type ElementType = 'PPage' | 'PSection' | 'PContainer' | 'PNav' | 'PFooter' | 'PButton' | 'PText' | 'PHeading' | 'PRichText' | 'PImage' | 'PVideo' | 'PList' | 'PIcon' | 'PDivider' | 'PTextField' | 'PTextArea' | 'PCheckbox' | 'PRadio' | 'PSelect' | 'PTable' | 'PArticle';
|
|
4
4
|
export type DocumentAttributes = Record<string, unknown>;
|
|
5
5
|
/**
|
|
6
6
|
* The words the page history uses for an element. `summary` names one
|
|
@@ -3,6 +3,8 @@ export declare const elementRegistry: {
|
|
|
3
3
|
PPage: import('./elementConfiguration').ElementConfiguration<import('../definitions').PPageRootProps>;
|
|
4
4
|
PSection: import('./elementConfiguration').ElementConfiguration<import('./layoutElementConfiguration').LayoutElementProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
5
5
|
PContainer: import('./elementConfiguration').ElementConfiguration<import('./layoutElementConfiguration').LayoutElementProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
6
|
+
PNav: import('./elementConfiguration').ElementConfiguration<import('../definitions').PNavDocumentProps>;
|
|
7
|
+
PFooter: import('./elementConfiguration').ElementConfiguration<import('../definitions').PFooterDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
6
8
|
PButton: import('./elementConfiguration').ElementConfiguration<import('./linkSettings').LinkSettings & {
|
|
7
9
|
id: string;
|
|
8
10
|
name: string;
|
|
@@ -15,19 +17,40 @@ export declare const elementRegistry: {
|
|
|
15
17
|
text: string;
|
|
16
18
|
style: import('../definitions').TextStyle;
|
|
17
19
|
} & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
20
|
+
PHeading: import('./elementConfiguration').ElementConfiguration<import('./linkSettings').LinkSettings & {
|
|
21
|
+
id: string;
|
|
22
|
+
text: string;
|
|
23
|
+
level: import('../definitions').HeadingLevel;
|
|
24
|
+
anchor: string;
|
|
25
|
+
style: import('../definitions').TextStyle;
|
|
26
|
+
} & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
18
27
|
PRichText: import('./elementConfiguration').ElementConfiguration<import('../elements/rich-text/definition').PRichTextDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
19
28
|
PImage: import('./elementConfiguration').ElementConfiguration<import('./linkSettings').LinkSettings & {
|
|
20
29
|
id: string;
|
|
21
30
|
src: string;
|
|
22
31
|
alt: string;
|
|
32
|
+
priority: boolean;
|
|
33
|
+
caption: string;
|
|
34
|
+
decorative: boolean;
|
|
35
|
+
intrinsicWidth: number | null;
|
|
36
|
+
intrinsicHeight: number | null;
|
|
37
|
+
tabletSrc: string;
|
|
38
|
+
mobileSrc: string;
|
|
39
|
+
aspectRatio: import('../definitions').ImageAspectRatio;
|
|
40
|
+
objectFit: import('../definitions').ImageObjectFit | "";
|
|
41
|
+
objectPosition: import('../definitions').ImageObjectPosition;
|
|
42
|
+
shadow: import('../definitions').ImageShadow;
|
|
43
|
+
captionAlign: import('../definitions').ImageCaptionAlign;
|
|
23
44
|
style: import('../definitions').ImageStyle;
|
|
24
45
|
} & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
25
|
-
PVideo: import('./elementConfiguration').ElementConfiguration<import('../
|
|
46
|
+
PVideo: import('./elementConfiguration').ElementConfiguration<import('../definitions').PVideoDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
26
47
|
PList: import('./elementConfiguration').ElementConfiguration<import('../elements/list/definition').PListDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
27
48
|
PIcon: import('./elementConfiguration').ElementConfiguration<import('./linkSettings').LinkSettings & {
|
|
28
49
|
id: string;
|
|
29
50
|
icon: string;
|
|
30
51
|
label: string;
|
|
52
|
+
size: import('../definitions').IconSize;
|
|
53
|
+
shape: import('../definitions').IconShape;
|
|
31
54
|
} & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
32
55
|
PDivider: import('./elementConfiguration').ElementConfiguration<import('../elements/divider/definition').PDividerDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
33
56
|
PTextField: import('./elementConfiguration').ElementConfiguration<import('../elements/text-field/definition').PTextFieldDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
@@ -36,5 +59,6 @@ export declare const elementRegistry: {
|
|
|
36
59
|
PRadio: import('./elementConfiguration').ElementConfiguration<import('../elements/radio/definition').PRadioDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
37
60
|
PSelect: import('./elementConfiguration').ElementConfiguration<import('../elements/select/definition').PSelectDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
38
61
|
PTable: import('./elementConfiguration').ElementConfiguration<import('../elements/table/definition').PTableDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
62
|
+
PArticle: import('./elementConfiguration').ElementConfiguration<import('../definitions').PArticleDocumentProps & Partial<import('./deviceVisibility').DeviceVisibility> & Partial<Record<"tabletStyle" | "mobileStyle" | "tabletLandscapeStyle" | "mobileLandscapeStyle", Partial<Record<string, unknown>>>>>;
|
|
39
63
|
};
|
|
40
64
|
export declare function isElementType(value: unknown): value is ElementType;
|
|
@@ -2,23 +2,15 @@ import { z } from 'zod';
|
|
|
2
2
|
import { ElementStyle, ElementStyleKind } from './style/elementStyle';
|
|
3
3
|
import { StyleDefinition } from './styleItems';
|
|
4
4
|
export { lengthValue, colorValue, borderWidthValue } from './styleTokensSchema';
|
|
5
|
-
export declare const lengthKeys: readonly [readonly ["width", "width", "Width"], readonly ["height", "height", "Height"], readonly ["minWidth", "min-width", "Min width"], readonly ["minHeight", "min-height", "Min height"], readonly ["maxWidth", "max-width", "Max width"], readonly ["maxHeight", "max-height", "Max height"], readonly ["paddingTop", "padding-top", "Padding top"], readonly ["paddingBottom", "padding-bottom", "Padding bottom"], readonly ["paddingLeft", "padding-left", "Padding
|
|
5
|
+
export declare const lengthKeys: readonly [readonly ["width", "width", "Width"], readonly ["height", "height", "Height"], readonly ["minWidth", "min-width", "Min width"], readonly ["minHeight", "min-height", "Min height"], readonly ["maxWidth", "max-width", "Max width"], readonly ["maxHeight", "max-height", "Max height"], readonly ["paddingTop", "padding-top", "Padding top"], readonly ["paddingBottom", "padding-bottom", "Padding bottom"], readonly ["paddingLeft", "padding-left", "Padding start"], readonly ["paddingRight", "padding-right", "Padding end"], readonly ["marginTop", "margin-top", "Margin top"], readonly ["marginBottom", "margin-bottom", "Margin bottom"], readonly ["marginLeft", "margin-left", "Margin start"], readonly ["marginRight", "margin-right", "Margin end"], readonly ["borderRadiusTopLeft", "border-top-left-radius", "Radius top left"], readonly ["borderRadiusTopRight", "border-top-right-radius", "Radius top right"], readonly ["borderRadiusBottomRight", "border-bottom-right-radius", "Radius bottom right"], readonly ["borderRadiusBottomLeft", "border-bottom-left-radius", "Radius bottom left"]];
|
|
6
6
|
export type LengthKey = (typeof lengthKeys)[number][0];
|
|
7
7
|
export declare function elementStyleDefinitions(kind: ElementStyleKind, defaults: ElementStyle): StyleDefinition[];
|
|
8
|
-
export declare function elementStyleSchema(definitions: StyleDefinition[], defaults: ElementStyle): z.ZodPipe<z.ZodPipe<z.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
12
|
-
attribute: z.ZodOptional<z.ZodString>;
|
|
13
|
-
value: z.ZodUnknown;
|
|
14
|
-
}, z.core.$strict>>>, z.ZodTransform<{
|
|
8
|
+
export declare function elementStyleSchema(definitions: StyleDefinition[], defaults: ElementStyle): z.ZodPipe<z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodTransform<{
|
|
9
|
+
[x: string]: unknown;
|
|
10
|
+
}, Record<string, unknown>>>>, z.ZodTransform<{
|
|
15
11
|
[x: string]: unknown;
|
|
16
12
|
}, {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
variable?: string | undefined;
|
|
20
|
-
variables?: Record<string, string> | undefined;
|
|
21
|
-
attribute?: string | undefined;
|
|
22
|
-
}[]>>, z.ZodTransform<ElementStyle, {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
} | undefined>>, z.ZodTransform<ElementStyle, {
|
|
23
15
|
[x: string]: unknown;
|
|
24
16
|
}>>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { RegisteredElementConfiguration } from './elementConfiguration';
|
|
2
2
|
/**
|
|
3
3
|
* A preset shown on the Templates tab. `shortcode` is a JSON object in the
|
|
4
|
-
* page-document format.
|
|
5
|
-
*
|
|
4
|
+
* page-document format. Style is a sparse key → value object (legacy style
|
|
5
|
+
* item arrays are accepted and rewritten). `children` replaces that element's
|
|
6
|
+
* content.
|
|
6
7
|
*/
|
|
7
8
|
export type ElementTemplate = {
|
|
8
9
|
shortcode: string;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DocumentAttributes } from './elementConfiguration';
|
|
3
3
|
export declare const LINK_TARGETS: readonly ["_self", "_blank"];
|
|
4
|
+
export declare const LINK_RELS: readonly ["", "nofollow", "sponsored", "ugc"];
|
|
4
5
|
export type LinkTarget = (typeof LINK_TARGETS)[number];
|
|
6
|
+
export type LinkRel = (typeof LINK_RELS)[number];
|
|
5
7
|
/** An empty `href` means the element is not a link. */
|
|
6
8
|
export type LinkSettings = {
|
|
7
9
|
href: string;
|
|
8
10
|
target: LinkTarget;
|
|
9
11
|
description: string;
|
|
12
|
+
rel: LinkRel;
|
|
10
13
|
};
|
|
11
14
|
export declare const defaultLinkSettings: LinkSettings;
|
|
12
15
|
export declare const linkSettingsShape: {
|
|
@@ -16,11 +19,25 @@ export declare const linkSettingsShape: {
|
|
|
16
19
|
_blank: "_blank";
|
|
17
20
|
}>>;
|
|
18
21
|
description: z.ZodDefault<z.ZodString>;
|
|
22
|
+
rel: z.ZodDefault<z.ZodEnum<{
|
|
23
|
+
"": "";
|
|
24
|
+
nofollow: "nofollow";
|
|
25
|
+
sponsored: "sponsored";
|
|
26
|
+
ugc: "ugc";
|
|
27
|
+
}>>;
|
|
19
28
|
};
|
|
20
29
|
export declare const linkHistoryLabels: {
|
|
21
30
|
href: string;
|
|
22
31
|
target: string;
|
|
23
32
|
description: string;
|
|
33
|
+
rel: string;
|
|
24
34
|
};
|
|
25
|
-
/**
|
|
26
|
-
export declare function
|
|
35
|
+
/** Merge authored rel with security tokens for new tabs. */
|
|
36
|
+
export declare function linkRelAttribute(target: LinkTarget, rel?: string): string | undefined;
|
|
37
|
+
/** Writes only what differs from no link: the address, a new tab, a description, and rel. */
|
|
38
|
+
export declare function toLinkAttributes({ href, target, description, rel, }: {
|
|
39
|
+
href: string;
|
|
40
|
+
target?: LinkTarget;
|
|
41
|
+
description?: string;
|
|
42
|
+
rel?: string;
|
|
43
|
+
}): DocumentAttributes;
|
|
@@ -15,7 +15,7 @@ export type FlexAlignContent = (typeof FLEX_ALIGN_CONTENTS)[number];
|
|
|
15
15
|
export type ElementLayout = 'block' | 'flex' | 'grid';
|
|
16
16
|
export type ElementOverflow = 'show' | 'hide';
|
|
17
17
|
export type GridColumnCount = 2 | 3 | 4;
|
|
18
|
-
export type ElementStyleKind = 'section' | 'container';
|
|
18
|
+
export type ElementStyleKind = 'section' | 'container' | 'footer' | 'nav';
|
|
19
19
|
export type ElementStyle = {
|
|
20
20
|
layout: ElementLayout;
|
|
21
21
|
gridColumns?: GridColumnCount;
|
|
@@ -6,6 +6,10 @@ export type StyleItem = {
|
|
|
6
6
|
attribute?: string;
|
|
7
7
|
value: unknown;
|
|
8
8
|
};
|
|
9
|
+
export type StyleDocumentCodec = {
|
|
10
|
+
schema: z.ZodType;
|
|
11
|
+
encode: (value: unknown) => unknown;
|
|
12
|
+
};
|
|
9
13
|
export type StyleDefinition = {
|
|
10
14
|
key: string;
|
|
11
15
|
variable?: string;
|
|
@@ -16,6 +20,8 @@ export type StyleDefinition = {
|
|
|
16
20
|
defaultValue?: unknown;
|
|
17
21
|
/** How the page history names this key. */
|
|
18
22
|
label?: string;
|
|
23
|
+
/** When set, the document stores this key through encode/schema instead of `value`. */
|
|
24
|
+
document?: StyleDocumentCodec;
|
|
19
25
|
};
|
|
20
26
|
type StyleValues = Record<string, unknown>;
|
|
21
27
|
export declare function styleItemsSchema(definitions: StyleDefinition[]): z.ZodPipe<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -50,4 +56,16 @@ export declare function styleLabels(definitions: StyleDefinition[], pathPrefix?:
|
|
|
50
56
|
/** Keys missing from `values` (or an absent `values`) use the definition default. */
|
|
51
57
|
export declare function toStyleItems(values: StyleValues | undefined, definitions: StyleDefinition[]): StyleItem[];
|
|
52
58
|
export declare function toStyleOverrideItems(values: StyleValues | undefined, definitions: StyleDefinition[]): StyleItem[];
|
|
59
|
+
/** Sparse document style: key → value, no defaults, no CSS addresses. */
|
|
60
|
+
export declare function toDocumentStyle(values: StyleValues | undefined, definitions: StyleDefinition[]): StyleValues | undefined;
|
|
61
|
+
/** Spreads a document style only when at least one key remains. */
|
|
62
|
+
export declare function documentStyleAttribute(style: StyleValues | undefined): {
|
|
63
|
+
style: StyleValues;
|
|
64
|
+
} | Record<string, never>;
|
|
65
|
+
/** Sparse device override style for the document. */
|
|
66
|
+
export declare function toDocumentStyleOverride(values: StyleValues | undefined, definitions: StyleDefinition[]): StyleValues | undefined;
|
|
67
|
+
/** Document `style` object: fills definition defaults for omitted keys. */
|
|
68
|
+
export declare function documentStyleSchema(definitions: StyleDefinition[]): z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodTransform<StyleValues, Record<string, unknown>>>>, z.ZodTransform<StyleValues, StyleValues | undefined>>;
|
|
69
|
+
/** Device override style object: only the keys the document sets. */
|
|
70
|
+
export declare function documentStyleOverrideSchema(definitions: StyleDefinition[]): z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodTransform<StyleValues, Record<string, unknown>>>>, z.ZodTransform<StyleValues, StyleValues | undefined>>;
|
|
53
71
|
export {};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { StyleDefinition } from './styleItems';
|
|
2
3
|
declare const spacingToken: z.ZodEnum<{
|
|
4
|
+
auto: "auto";
|
|
3
5
|
0: "0";
|
|
6
|
+
1: "1";
|
|
7
|
+
2: "2";
|
|
8
|
+
3: "3";
|
|
9
|
+
4: "4";
|
|
4
10
|
px: "px";
|
|
5
11
|
0.5: "0.5";
|
|
6
|
-
1: "1";
|
|
7
12
|
1.5: "1.5";
|
|
8
|
-
2: "2";
|
|
9
13
|
2.5: "2.5";
|
|
10
|
-
3: "3";
|
|
11
14
|
3.5: "3.5";
|
|
12
|
-
4: "4";
|
|
13
15
|
5: "5";
|
|
14
16
|
6: "6";
|
|
15
17
|
7: "7";
|
|
@@ -35,7 +37,6 @@ declare const spacingToken: z.ZodEnum<{
|
|
|
35
37
|
72: "72";
|
|
36
38
|
80: "80";
|
|
37
39
|
96: "96";
|
|
38
|
-
auto: "auto";
|
|
39
40
|
}>;
|
|
40
41
|
declare const borderWidthToken: z.ZodEnum<{
|
|
41
42
|
0: "0";
|
|
@@ -46,15 +47,15 @@ declare const borderWidthToken: z.ZodEnum<{
|
|
|
46
47
|
}>;
|
|
47
48
|
declare const radiusToken: z.ZodEnum<{
|
|
48
49
|
0: "0";
|
|
50
|
+
1: "1";
|
|
51
|
+
2: "2";
|
|
52
|
+
3: "3";
|
|
53
|
+
4: "4";
|
|
49
54
|
px: "px";
|
|
50
55
|
0.5: "0.5";
|
|
51
|
-
1: "1";
|
|
52
56
|
1.5: "1.5";
|
|
53
|
-
2: "2";
|
|
54
57
|
2.5: "2.5";
|
|
55
|
-
3: "3";
|
|
56
58
|
3.5: "3.5";
|
|
57
|
-
4: "4";
|
|
58
59
|
5: "5";
|
|
59
60
|
6: "6";
|
|
60
61
|
7: "7";
|
|
@@ -112,16 +113,17 @@ declare const trackingToken: z.ZodEnum<{
|
|
|
112
113
|
}>;
|
|
113
114
|
/** Spacing / size: Tailwind token or a legacy CSS length. */
|
|
114
115
|
export declare const lengthValue: z.ZodUnion<readonly [z.ZodEnum<{
|
|
116
|
+
auto: "auto";
|
|
115
117
|
0: "0";
|
|
118
|
+
1: "1";
|
|
119
|
+
2: "2";
|
|
120
|
+
3: "3";
|
|
121
|
+
4: "4";
|
|
116
122
|
px: "px";
|
|
117
123
|
0.5: "0.5";
|
|
118
|
-
1: "1";
|
|
119
124
|
1.5: "1.5";
|
|
120
|
-
2: "2";
|
|
121
125
|
2.5: "2.5";
|
|
122
|
-
3: "3";
|
|
123
126
|
3.5: "3.5";
|
|
124
|
-
4: "4";
|
|
125
127
|
5: "5";
|
|
126
128
|
6: "6";
|
|
127
129
|
7: "7";
|
|
@@ -147,18 +149,17 @@ export declare const lengthValue: z.ZodUnion<readonly [z.ZodEnum<{
|
|
|
147
149
|
72: "72";
|
|
148
150
|
80: "80";
|
|
149
151
|
96: "96";
|
|
150
|
-
auto: "auto";
|
|
151
152
|
}>, z.ZodEnum<{
|
|
152
153
|
0: "0";
|
|
154
|
+
1: "1";
|
|
155
|
+
2: "2";
|
|
156
|
+
3: "3";
|
|
157
|
+
4: "4";
|
|
153
158
|
px: "px";
|
|
154
159
|
0.5: "0.5";
|
|
155
|
-
1: "1";
|
|
156
160
|
1.5: "1.5";
|
|
157
|
-
2: "2";
|
|
158
161
|
2.5: "2.5";
|
|
159
|
-
3: "3";
|
|
160
162
|
3.5: "3.5";
|
|
161
|
-
4: "4";
|
|
162
163
|
5: "5";
|
|
163
164
|
6: "6";
|
|
164
165
|
7: "7";
|
|
@@ -230,6 +231,10 @@ declare const hexColor: z.ZodObject<{
|
|
|
230
231
|
declare const paletteColor: z.ZodObject<{
|
|
231
232
|
name: z.ZodEnum<{
|
|
232
233
|
accent: "accent";
|
|
234
|
+
"accent-50": "accent-50";
|
|
235
|
+
"accent-100": "accent-100";
|
|
236
|
+
"accent-700": "accent-700";
|
|
237
|
+
"accent-foreground": "accent-foreground";
|
|
233
238
|
transparent: "transparent";
|
|
234
239
|
white: "white";
|
|
235
240
|
black: "black";
|
|
@@ -251,6 +256,10 @@ declare const paletteColor: z.ZodObject<{
|
|
|
251
256
|
export declare const colorValue: z.ZodUnion<readonly [z.ZodObject<{
|
|
252
257
|
name: z.ZodEnum<{
|
|
253
258
|
accent: "accent";
|
|
259
|
+
"accent-50": "accent-50";
|
|
260
|
+
"accent-100": "accent-100";
|
|
261
|
+
"accent-700": "accent-700";
|
|
262
|
+
"accent-foreground": "accent-foreground";
|
|
254
263
|
transparent: "transparent";
|
|
255
264
|
white: "white";
|
|
256
265
|
black: "black";
|
|
@@ -271,4 +280,11 @@ export declare const colorValue: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
271
280
|
hex: z.ZodString;
|
|
272
281
|
opacity: z.ZodNumber;
|
|
273
282
|
}, z.core.$strict>]>;
|
|
283
|
+
/** Document color string → editor `{ hex, opacity }` or `{ name, opacity }`. */
|
|
284
|
+
export declare const documentColorValue: z.ZodPipe<z.ZodString, z.ZodTransform<import('../definitions').PaletteColor | {
|
|
285
|
+
hex: string;
|
|
286
|
+
opacity: number;
|
|
287
|
+
}, string>>;
|
|
288
|
+
/** Style definition that stores colors as compact document strings. */
|
|
289
|
+
export declare function colorStyle(definition: Omit<StyleDefinition, 'value' | 'document'>): StyleDefinition;
|
|
274
290
|
export { spacingToken, borderWidthToken, radiusToken, textSizeToken, leadingToken, trackingToken, hexColor, paletteColor, };
|
package/dist/tags.json
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
"plmt-page",
|
|
3
3
|
"plmt-section",
|
|
4
4
|
"plmt-container",
|
|
5
|
+
"plmt-nav",
|
|
6
|
+
"plmt-footer",
|
|
5
7
|
"plmt-button",
|
|
6
8
|
"plmt-text",
|
|
9
|
+
"plmt-heading",
|
|
7
10
|
"plmt-rich-text",
|
|
8
11
|
"plmt-image",
|
|
9
12
|
"plmt-video",
|
|
@@ -15,5 +18,6 @@
|
|
|
15
18
|
"plmt-text-area",
|
|
16
19
|
"plmt-checkbox",
|
|
17
20
|
"plmt-radio",
|
|
18
|
-
"plmt-select"
|
|
21
|
+
"plmt-select",
|
|
22
|
+
"plmt-article"
|
|
19
23
|
]
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ElementSpec } from '../../render/types';
|
|
2
|
+
export declare const BRAND_NETWORKS: readonly ["facebook", "x", "instagram", "linkedin", "youtube"];
|
|
3
|
+
export type BrandNetwork = (typeof BRAND_NETWORKS)[number];
|
|
4
|
+
export declare function brandSpec(network: string): ElementSpec | null;
|
|
5
|
+
export declare function brandLabel(network: BrandNetwork): string;
|
|
@@ -7,4 +7,4 @@ export type { ShortcodeNode };
|
|
|
7
7
|
*/
|
|
8
8
|
export declare function elementSpec(node: ShortcodeNode, options?: ElementSpecOptions): ElementSpec | null;
|
|
9
9
|
/** Convert a parsed shortcode node into a semantic HTML element tree. */
|
|
10
|
-
export declare function toElementTree(node: ShortcodeNode): ElementSpec | null;
|
|
10
|
+
export declare function toElementTree(node: ShortcodeNode, context?: ElementSpecOptions['context']): ElementSpec | null;
|