@bettercms-ai/types 1.67.0 → 1.68.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/dist/index.d.ts CHANGED
@@ -589,7 +589,7 @@ type OpenMode = "inline" | "drill" | "popover" | "dialog";
589
589
  * editor falls back to its title-gated heuristic. Only an explicit value promotes a
590
590
  * field past that gate.
591
591
  */
592
- type ContentModelFieldPlacement = "cover" | "title" | "excerpt" | "body" | "inline" | "panel";
592
+ type ContentModelFieldPlacement = "cover" | "title" | "excerpt" | "body" | "inline" | "panel" | "settings";
593
593
  /**
594
594
  * Editor-only conditional visibility: the field (or component prop) shows only while the
595
595
  * sibling keys its rules name hold these values. `isSet` reads no `value`: it passes once the
@@ -754,6 +754,8 @@ interface ContentModelFieldUi {
754
754
  /** V2 item identity on a list: the item type's own name (an identifier) and title. */
755
755
  itemName?: string;
756
756
  itemTitle?: string;
757
+ /** A fixed prefix the control draws before the value. Editor-only. */
758
+ prefix?: string;
757
759
  /** V2 `synced`: the value comes from a global, so an edit applies everywhere. A marker. */
758
760
  synced?: {
759
761
  from: string;
@@ -1105,8 +1107,84 @@ declare function buttonFullWidthProblem(value: unknown, previous?: unknown): str
1105
1107
  * buttonLookValue): a variant is one of those or one of the fixed names.
1106
1108
  */
1107
1109
  declare function buttonValueProblem(value: unknown, looks?: ReadonlySet<string>): string | null;
1110
+ /**
1111
+ * A button's own corner and text, set per button (the Button panel's Radius and Text groups). Each
1112
+ * is a closed token → one fixed declaration on the button's element; absent means the variant's own.
1113
+ * `letterSpacing` is hundredths of an em. `font`: the site's body font, the brand's display serif
1114
+ * (`--bcms-font-heading`) or its mono (`--bcms-font-mono`), each with a generic fallback.
1115
+ */
1116
+ declare const BUTTON_TEXT_CSS: {
1117
+ readonly radius: {
1118
+ readonly prop: "borderRadius";
1119
+ readonly values: {
1120
+ readonly "0": "0";
1121
+ readonly s: "4px";
1122
+ readonly m: "8px";
1123
+ readonly l: "12px";
1124
+ readonly full: "999px";
1125
+ };
1126
+ };
1127
+ readonly font: {
1128
+ readonly prop: "fontFamily";
1129
+ readonly values: {
1130
+ readonly site: "inherit";
1131
+ readonly serif: "var(--bcms-font-heading,Georgia,serif)";
1132
+ readonly mono: "var(--bcms-font-mono,ui-monospace,SFMono-Regular,Menlo,monospace)";
1133
+ };
1134
+ };
1135
+ readonly fontSize: {
1136
+ readonly prop: "fontSize";
1137
+ readonly values: {
1138
+ readonly "12": "12px";
1139
+ readonly "13": "13px";
1140
+ readonly "14": "14px";
1141
+ readonly "16": "16px";
1142
+ readonly "18": "18px";
1143
+ };
1144
+ };
1145
+ readonly weight: {
1146
+ readonly prop: "fontWeight";
1147
+ readonly values: {
1148
+ readonly "400": "400";
1149
+ readonly "500": "500";
1150
+ readonly "600": "600";
1151
+ readonly "700": "700";
1152
+ readonly "800": "800";
1153
+ };
1154
+ };
1155
+ readonly letterSpacing: {
1156
+ readonly prop: "letterSpacing";
1157
+ readonly values: {
1158
+ readonly "-2": "-0.02em";
1159
+ readonly "-1": "-0.01em";
1160
+ readonly "0": "0";
1161
+ readonly "1": "0.01em";
1162
+ readonly "2": "0.02em";
1163
+ };
1164
+ };
1165
+ readonly textCase: {
1166
+ readonly prop: "textTransform";
1167
+ readonly values: {
1168
+ readonly none: "none";
1169
+ readonly title: "capitalize";
1170
+ readonly upper: "uppercase";
1171
+ };
1172
+ };
1173
+ };
1174
+ type ButtonTextKey = keyof typeof BUTTON_TEXT_CSS;
1175
+ declare const BUTTON_TEXT_KEYS: ButtonTextKey[];
1176
+ /**
1177
+ * A button's `radius` / `font` / `fontSize` / `weight` / `letterSpacing` / `textCase` props as the
1178
+ * declarations for its element (camelCase, a React `style`), or undefined when it sets none.
1179
+ * By OWN key only, so an unknown or hostile value paints nothing. Every lane paints from this.
1180
+ */
1181
+ declare function buttonTextCss(props: unknown): Record<string, string> | undefined;
1182
+ /** `buttonTextCss` as an inline `style` string (`border-radius:8px;font-weight:600`), "" when empty. */
1183
+ declare function buttonTextCssText(props: unknown): string;
1184
+ /** Why a button's text/radius props are refused, or null: each, when present, must be one of its tokens. */
1185
+ declare function buttonTextProblem(value: unknown): string | null;
1108
1186
  /** The look keys an instance of a Button component may override, beside its label and link. */
1109
- declare const BUTTON_LOOK_KEYS: readonly ["variant", "size", "arrow", "icon", "newTab", "fullWidth"];
1187
+ declare const BUTTON_LOOK_KEYS: readonly ["variant", "size", "arrow", "icon", "newTab", "fullWidth", "radius", "font", "fontSize", "weight", "letterSpacing", "textCase"];
1110
1188
  type ButtonLookKey = (typeof BUTTON_LOOK_KEYS)[number];
1111
1189
  /**
1112
1190
  * A `button` PROP's value as the `button` BLOCK props it writes, for every lane that applies an
@@ -1153,8 +1231,12 @@ declare function buttonValueOfInstance<P extends PropDefLike>(def: ComponentLike
1153
1231
  type SpaceToken = "none" | "xs" | "sm" | "md" | "lg" | "xl";
1154
1232
  type ColorToken = "none" | "white" | "black" | "muted" | "mutedBg" | "primary" | "accent";
1155
1233
  type AlignToken = "left" | "center" | "right";
1156
- /** 3xl/4xl/5xl (2.25/3/4rem) were added for headings, whose size now paints on the <hN> itself. */
1157
- type FontSizeToken = "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl";
1234
+ /**
1235
+ * 3xl/4xl/5xl (2.25/3/4rem) were added for headings, whose size now paints on the <hN> itself.
1236
+ * xs / md / 3.5xl (12 / 18 / 40px) complete the text toolbar's size menu: 12 14 16 18 20 24 32 40 48 64
1237
+ * (36px `3xl` stays for content written before it).
1238
+ */
1239
+ type FontSizeToken = "xs" | "sm" | "base" | "md" | "lg" | "xl" | "2xl" | "3xl" | "3.5xl" | "4xl" | "5xl";
1158
1240
  type WeightToken = "normal" | "medium" | "semibold" | "bold";
1159
1241
  type RadiusToken = "none" | "sm" | "md" | "lg" | "full";
1160
1242
  declare const THEME_TOKENS: readonly ["inherit", "light", "dark"];
@@ -1194,6 +1276,11 @@ interface BlockStyle {
1194
1276
  paddingTop?: number;
1195
1277
  paddingBottom?: number;
1196
1278
  paddingSides?: number;
1279
+ /**
1280
+ * Opt-in: the px `paddingTop` / `paddingBottom` shrink with the device (×.8 on a tablet, ×.6 on a
1281
+ * phone). Absent or false = the same px on every screen, as every page published before it.
1282
+ */
1283
+ padScale?: boolean;
1197
1284
  /** Section spacing as token steps (see sectionSpace.ts). Only the top may pull under the nav. */
1198
1285
  spaceTop?: SectionSpaceToken;
1199
1286
  spaceBottom?: Exclude<SectionSpaceToken, "section-space-nav-overlap">;
@@ -1229,6 +1316,12 @@ interface BlockStyle {
1229
1316
  * emits it (`hiddenEverywhere`, `visibleBlocks`). Bands: see `BREAKPOINTS`.
1230
1317
  */
1231
1318
  hideOn?: Array<"mobile" | "tablet" | "desktop">;
1319
+ /** A named background that wins over `bg`. `brand-tint`: the brand accent at 8% over the surface (`--bcms-bg-tint`). */
1320
+ bgToken?: "brand-tint";
1321
+ /** The section element's `id` (a link target, `#pricing`): lower-case letters, digits and dashes. @see sectionIdentityAttrs */
1322
+ anchor?: string;
1323
+ /** Extra class names for the section element, space-separated. @see sectionIdentityAttrs */
1324
+ cssClass?: string;
1232
1325
  }
1233
1326
  /** The paint a button swaps to on hover: fill, text colour, and the all-round border. */
1234
1327
  interface BlockHoverStyle {
@@ -1404,6 +1497,12 @@ interface ImageProps {
1404
1497
  * never the shared media asset's, so one Undo reverses it with the alt.
1405
1498
  */
1406
1499
  decorative?: boolean;
1500
+ /** A logo's name: with no `src` the block draws this as a word mark instead of nothing (the Logos list). */
1501
+ wordmark?: string;
1502
+ /** Where the picture links to. Absent or "" = no anchor. */
1503
+ href?: string;
1504
+ /** Open `href` in a new tab (`target="_blank" rel="noopener"`). */
1505
+ newTab?: boolean;
1407
1506
  }
1408
1507
  interface ImageBlock {
1409
1508
  type: "image";
@@ -1437,6 +1536,14 @@ interface ButtonProps {
1437
1536
  rel?: "nofollow" | "sponsored" | "ugc";
1438
1537
  /** `"code"`: the click is the site's own script, so it renders `<button type="button">` and `href` is "". Absent ⇒ a link. */
1439
1538
  action?: "code";
1539
+ /** The button's own corner and text; absent ⇒ the variant's own. Tokens and CSS: `BUTTON_TEXT_CSS` (button-look.ts). */
1540
+ radius?: "0" | "s" | "m" | "l" | "full";
1541
+ font?: "site" | "serif" | "mono";
1542
+ fontSize?: "12" | "13" | "14" | "16" | "18";
1543
+ weight?: "400" | "500" | "600" | "700" | "800";
1544
+ /** Hundredths of an em. */
1545
+ letterSpacing?: "-2" | "-1" | "0" | "1" | "2";
1546
+ textCase?: "none" | "title" | "upper";
1440
1547
  }
1441
1548
  interface ButtonBlock {
1442
1549
  type: "button";
@@ -1515,6 +1622,10 @@ interface SectionProps {
1515
1622
  background?: string;
1516
1623
  paddingY?: number;
1517
1624
  maxWidth?: number;
1625
+ /** Draw the children as a logo strip: one centred line that wraps, or a grid of rows. */
1626
+ logoLayout?: "row" | "grid";
1627
+ /** The Logos list's rows as the dock wrote them (`{ _key, image, name, link, newTab }`); the children are drawn from them. */
1628
+ logos?: unknown[];
1518
1629
  }
1519
1630
  interface SectionBlock {
1520
1631
  type: "section";
@@ -1599,6 +1710,8 @@ interface TabItem {
1599
1710
  }
1600
1711
  interface TabsProps {
1601
1712
  tabs: TabItem[];
1713
+ /** How the tab row is drawn. Absent = `underline`, the block's first look. */
1714
+ variant?: "underline" | "pills" | "side";
1602
1715
  }
1603
1716
  interface TabsBlock {
1604
1717
  type: "tabs";
@@ -1908,6 +2021,11 @@ declare function componentInstanceAddresses(instanceBlockId: string, props: read
1908
2021
  * render-page.ts. Unknown tokens are dropped — closed set, no arbitrary CSS.
1909
2022
  */
1910
2023
 
2024
+ /**
2025
+ * Every font-size token with its size in px at a 16px root, smallest first: what a size menu lists
2026
+ * (12 14 16 18 20 24 32 36 40 48 64) and how a px size is turned back into the token to store.
2027
+ */
2028
+ declare const FONT_SIZE_TOKEN_PX: Readonly<Record<string, number>>;
1911
2029
  /**
1912
2030
  * V2's media frame (`aspect-[16/7]` + `cs-r2` on the image wrapper, site/hero.tsx and content.tsx):
1913
2031
  * the picture fills its column, is cropped to the ratio (cover), and takes the theme's large media
@@ -1924,6 +2042,8 @@ declare function imageFrameCss(style: unknown): {
1924
2042
  objectFit: "cover";
1925
2043
  borderRadius?: string;
1926
2044
  } | null;
2045
+ /** `style.bgToken`: named section backgrounds. A brand kit may set `--bcms-bg-tint`; without it, the accent at 8% over the surface. */
2046
+ declare const BG_TOKEN_CSS: Readonly<Record<string, string>>;
1927
2047
  /**
1928
2048
  * Where a block's `hideOn` bands start and end: mobile at most 767px, tablet 768-1023px, desktop
1929
2049
  * 1024px and up (the dock's 390 / 810 / 1280 canvases fall one in each band). A site's CSS
@@ -1948,6 +2068,31 @@ declare const RESPONSIVE_CSS: string;
1948
2068
  * and the editor's lane draws it whole, marked `data-bcms-hidden`, so the author can find it.
1949
2069
  */
1950
2070
  declare function hideOnAttr(style: unknown): string;
2071
+ /** `style.anchor`: an element id, lower-case letters, digits and dashes, at most 64. */
2072
+ declare const SECTION_ANCHOR: RegExp;
2073
+ /** `style.cssClass`: class names (letters, digits, `_`, `-`) separated by spaces, at most 200 characters. */
2074
+ declare const SECTION_CSS_CLASS: RegExp;
2075
+ /**
2076
+ * A section's Anchor ID and CSS class (`style.anchor`, `style.cssClass`) as the two attributes a
2077
+ * renderer puts on the section's element: `id`, and class names to ADD to the ones it already has.
2078
+ * Closed sets (the two patterns above), so a stored value that does not match paints nothing and
2079
+ * neither can break out of an attribute. Empty object when the style sets neither.
2080
+ */
2081
+ declare function sectionIdentityAttrs(style: unknown): {
2082
+ id?: string;
2083
+ className?: string;
2084
+ };
2085
+ /** A label as an anchor: lower-case words joined by hyphens, at most 64 characters. "" when nothing is left. */
2086
+ declare function anchorSlug(text: string): string;
2087
+ /**
2088
+ * The default Anchor ID of each top-level section of a page (REQ-4b-4): its label as a slug
2089
+ * (`anchorSlug`), made unique on the page with `-2`, `-3` … against every other section's anchor,
2090
+ * the explicit ones (`style.anchor`) included. A section with its own `style.anchor` keeps it
2091
+ * (the override) and gets no entry here; a section with no label gets none either (no invented
2092
+ * ids). Derived, never stored: the same tree always yields the same anchors, in page order, so the
2093
+ * page read and every renderer agree without a write. Keyed by the block object.
2094
+ */
2095
+ declare function defaultSectionAnchors(blocks: unknown): Map<object, string>;
1951
2096
  /** True when any block in the tree hides somewhere; lets a lane skip `RESPONSIVE_CSS` when unused. */
1952
2097
  declare function usesHideOn(blocks: unknown): boolean;
1953
2098
  /**
@@ -2026,12 +2171,14 @@ declare function splitButtonStyle(style: BlockStyle | undefined): {
2026
2171
  };
2027
2172
  /**
2028
2173
  * The style keys a PAGE FIELD takes (`pages.field_styles`, keyed by field path): its width and
2029
- * placement, the space above and below it, its text alignment, font size and weight, and `size` — a
2030
- * whole element's Small / Large (a button's). Every key but `size` is a `BlockStyle` key, so it
2031
- * keeps the token set and the CSS table it already has — a field never gets a second scale.
2174
+ * placement, the space above and below it, its text alignment, font size and weight, `size` — a
2175
+ * whole element's Small / Large (a button's) — and `textColor`, its text colour (a colour TOKEN,
2176
+ * never a free hex). Every key but `size` is a `BlockStyle` key, so it keeps the token set and the
2177
+ * CSS table it already has — a field never gets a second scale. `textColor` is LAST so a style
2178
+ * without it keeps the key order it always had.
2032
2179
  * 🔴 Twin: `FIELD_STYLE_KEYS` in the dashboard's fieldStyle.ts.
2033
2180
  */
2034
- declare const FIELD_STYLE_KEYS: readonly ["contentWidth", "contentAlign", "marginTop", "marginBottom", "align", "fontSize", "weight", "size"];
2181
+ declare const FIELD_STYLE_KEYS: readonly ["contentWidth", "contentAlign", "marginTop", "marginBottom", "align", "fontSize", "weight", "size", "textColor"];
2035
2182
  type FieldStyleKey = (typeof FIELD_STYLE_KEYS)[number];
2036
2183
  /** A field element's Small / Large. Medium is UNSET — no "md" token is ever stored. */
2037
2184
  type FieldSize = "sm" | "lg";
@@ -2553,7 +2700,7 @@ declare function visibleDeliveredLayout<T extends DeliveredLayout | null | undef
2553
2700
  * A constant rather than three paraphrases, because updating some of them is exactly how this happened.
2554
2701
  */
2555
2702
  declare const SECTION_DOCTRINE = "STRUCTURE (separate from schema): a page is composed of SECTIONS. NEVER build a page out of loose top-level heading/text/image/button/spacer blocks \u2014 they cannot be moved, duplicated or swapped as a unit, the visual editor cannot outline or name them, and every one of them becomes its own section in the editor. A hero of a headline, a lede and two CTAs is ONE section, not four. TWO SHAPES, and the choice is about REUSE. (1) A band that appears on more than one page, or that needs layout variants, is a COMPONENT with a `sectionType` \u2014 see create_component. Components sharing a `sectionType` are that section's VARIANTS (one Hero: 'Centered' for the home page and 'Two-column' for about, same prop keys so a swap keeps the content). This is also the only shape the editor's 'Add a section' picker can insert, and the only one that gets a family name and a variant switcher. (2) A genuinely one-off band on a single page is a `section` BLOCK whose `props.children` hold its blocks. THE TRADEOFF, stated in the present tense because it is real today: inside a component, ONLY the leaves a declared prop TARGETS are click-to-edit on the canvas \u2014 each declared prop's `target` is re-keyed to that PLACEMENT's own override address, so editing it changes this page and not the shared definition. A prop with no `target` still SHOWS as a dock control, but its override reaches no rendered slot, so editing it changes nothing on the page. Copy that no prop points at is worse still: no binding and no control, unreachable from click-to-edit AND from the dock, changeable only by editing the component definition, which rewrites every page that places it. A `section` block's children stay click-to-edit unconditionally. So when you choose a component, DECLARE A PROP \u2014 WITH A `target` \u2014 for every string, link and image a marketer will ever touch; a component with un-propped editable copy is the defect, not the component. In the dock an unset prop shows EMPTY and inherits the definition's default, so set props explicitly when you want the current copy visible there. An IMPORTED site's components are its own (read the repo); its nav, footer and modals are the Layout. On a blank site, do not hand-write a band's JSON: start from a built-in section blueprint (list_components returns locked `builtin:*` blueprints with no projectId \u2014 hero-centered, hero-split, feature-grid-three, cta-banner and more), each already rooted in a `section` block with its editable leaves declared as props. INLINE its blockJson as a `section` block for a one-off band; for a recurring band, materialize it with create_component `from` so it becomes project-scoped before implementation validation, Output or publication. Direct `builtin:*` component references exist only for legacy delivery compatibility. Two consecutive call-to-action buttons are two sibling `button` blocks inside the same section \u2014 never a `columns` block, which is a `repeat(N,1fr)` grid and would stretch each CTA to half the container. Buttons are inline-level and flow side by side on their own.";
2556
- type ComponentCategory = "navbar" | "footer" | "button" | "section" | "slider" | "tabs" | "form" | "custom" | "hero" | "content" | "social-proof" | "conversion";
2703
+ type ComponentCategory = "navbar" | "footer" | "button" | "section" | "slider" | "tabs" | "form" | "custom" | "hero" | "content" | "social-proof" | "conversion" | "features" | "bento" | "pricing" | "cta" | "resources" | "security" | "integrations" | "faq" | "footers";
2557
2704
  /** What `components.category` stores: a library tab, or one of the kit catalogue's categories (facet row 2). */
2558
2705
  type ComponentCategoryId = ComponentCategory | KitCategory;
2559
2706
  /**
@@ -3838,6 +3985,12 @@ interface DeliveryPage {
3838
3985
  /** The page's language (`null`: the site's default) and, on a translation, the page it translates. */
3839
3986
  locale?: string | null;
3840
3987
  translationOf?: string | null;
3988
+ /**
3989
+ * The page's "Show in navigation" switch (REQ-6-10), on the pages list. `false`: a site menu
3990
+ * built from the pages list leaves it out (the hosted navbar drops links to it). Absent on an
3991
+ * older server: treat as `true`.
3992
+ */
3993
+ showInNavigation?: boolean;
3841
3994
  }
3842
3995
  /** Generic paginated list envelope (the `data` of a list response). */
3843
3996
  interface DeliveryList<T> {
@@ -4978,4 +5131,4 @@ declare function iconValueProblem(v: unknown, knownName: (name: string) => boole
4978
5131
  */
4979
5132
  declare function iconHtml(v: unknown, className?: string): string;
4980
5133
 
4981
- export { type AlignToken, type AllowRule, type ApiError, type ApiKey, type ApiKeyPermission, type ApiKeyTokenType, type ApproveDockUiInput, type ApproveDockUiOutput, type ArrayZoneConfig, type AssertEqual, type AuthResponse, type AuthSession, type AuthUser, BG_TOKENS, BLOCK_BINDINGS, BLOCK_FIELD_TYPES, BLOCK_FIELD_TYPES_RENDERABLE_NOW, BODY_SCHEMA_ORIGINS, BREAKPOINTS, BUTTON_ACTIONS, BUTTON_FULL_WIDTH_INVALID, BUTTON_ICONS, BUTTON_ICON_NAMES, BUTTON_LOOK_KEYS, BUTTON_PLACEMENT_KEYS, BUTTON_SIZES, BUTTON_VARIANTS, type BetterCMSErrorCode, type BgToken, type BindingKind, type BlockBinding, type BlockHoverStyle, type BlockStyle, type BlockType, type BodiesState, type BodyDeclaration, type BodySchema, type BodySchemaOrigin, type ButtonAction, type ButtonBlock, type ButtonIcon, type ButtonLinkCandidate, type ButtonLookKey, type ButtonProps, type ButtonSiteLook, type ButtonSizeName, type ButtonValue, type ButtonVariant, CANVAS_GESTURE_NAMES, CATEGORY_ID_MAX, CATEGORY_ORDER, CODE_SLOT_PREFIX, COMPONENT_GATE_CODES, COMPONENT_PROP_TYPES, CONTENT_WIDTH_TOKENS, CONTROL_HELP, type CanonicalInputDefinition, type CanvasGesture, type ChoiceOption, type CollectionBlock, type CollectionFilter, type CollectionProps, type ColorToken, type ColumnsBlock, type ColumnsProps, type Component, type ComponentBlock, type ComponentCategory, type ComponentCategoryId, type ComponentEmbedNode, type ComponentFormPropRef, type ComponentGateCode, type ComponentPreview, type ComponentPropDef, type ComponentPropType, type ComponentPropUi, type ComponentProps, type ComponentSubField, type ComponentTab, type ComponentV2, type ComponentVariantGroup, type Content, type ContentBlock, type ContentEntry, type ContentModel, type ContentModelField, type ContentModelFieldType, type ContentModelFieldUi, type ContentModelV2, type ContentPageResult, type ContentResponse, type ContentWidthToken, type ControlKind, type CornerToken, DEFAULT_ICON_SOURCES, DEFAULT_VARIANT, DEPTH_MAX, DERIVE_MINTED_RESERVED, DIALOG_SELECTOR, DOCK_BUDGET, DOCK_ICON_NAMES, DOCK_ICON_NAME_SET, DOCK_UI_IMPORTS, DOCK_UI_LIMITS, DOCK_UI_NAME, type DeclaredSlot, type DeepReadonly, type DefSources, type DeliveredLayout, type DeliveryComponent, type DeliveryEntry, type DeliveryEntrySeo, type DeliveryList, type DeliveryPage, type DerivedLocator, type DockBudget, type DockFieldLike, type DockFieldsetLike, type DockIconName, type DockInputRef, type DockLane, type DockNode, type DockPropGroupLike, type DockScreen, type DockUiBuildReceipt, type DockUiKind, type DockUiOrigin, type DockUiScope, type DockUiSource, type DockUiStatus, type DockUiVersion, EMBED_LEDGER_OUTCOMES, EMBED_REASONS, type ElementLike, type EmbedCapability, type EmbedCard, type EmbedLedgerOutcome, type EmbedMarker, type EmbedMarkerMatch, type EmbedNotRenderedWarning, type EmbedReason, type ExpandedBinding, FIELD_SIZE_ZOOM, FIELD_STYLE_KEYS, FOOTER_SECTION_ID, FORM_UPLOAD, FORM_UPLOAD_DEFAULT_ACCEPT, FORM_UPLOAD_PRESETS, FORM_UPLOAD_REFUSED_EXTENSIONS, FRAME_REFUSALS, type FieldConfig, type FieldSize, type FieldStyle, type FieldStyleKey, type FieldStyles, type Fieldset, type FieldsetKind, type FieldsetUiBefore, type FontSizeToken, type FooterBlock, type FooterColumn, type FooterProps, type Form, type FormBlock, type FormField, type FormProps, type FormSubmission, HELP_CAPS, HELP_LINE_MAX, HELP_MAX, HELP_WRITE_MAX, type HeadingBlock, type HeadingProps, ICON_LABEL_MAX, ICON_SOURCES, IMAGE_ASPECTS, IMAGE_FRAME_RADIUS, type IconFieldOptions, type IconObjectValue, type IconSource, type IconSrc, type IconValue, type ImageAspect, type ImageBlock, type ImageProps, KEY_FORBIDDEN, KEY_FORMAT, KEY_RESERVED, KEY_RESERVED_PREFIX, KIT_CATEGORIES, type KitCategory, LANDMARK_SELECTOR, LAYOUT_SECTION_ICONS, LAYOUT_SECTION_ICON_SET, LINK_RELS, LINK_VALUE_TYPES, LIST_ITEMS_CAP, LIST_PREVIEW_SLOTS, LOCATOR_PATH, type LandmarkChainElement, type LandmarkElement, type LayoutComponentItem, type LayoutDataDocument, type LayoutFieldDefinition, type LayoutFieldItem, type LayoutFieldType, type LayoutScalarFieldType, type LayoutSection, type LayoutSectionDesign, type LayoutSectionIcon, type LayoutSectionItem, type LayoutStructureDocument, type LayoutZone, type LibraryIconValue, type LinkPairSibling, type LinkRel, type LinkValue, type LinkValueType, type ListDockUiInput, type ListDockUiOutput, type LocatorGrammar, MAIN_SELECTOR, type ManagementLayoutCommand, type MediaAsset, type MediaCaptionTrack, type MediaFieldValue, NAVIGATION_SECTION_ID, type NavLink, type NavbarBlock, type NavbarProps, type NumberFieldFormat, type NumberScale, OPEN_MODES, OPEN_MODE_TYPES, OPTION_DESCRIPTION_MAX, type OpenMode, PAGE_CONTENT_ANCHOR_ID, PRIMITIVE_ARRAY_RULE, type PackIconValue, type Page, type PageLayoutOverrideDataDocument, type PageLayoutOverrideDocument, type PageLayoutOverrideState, type PageLayoutOverrideStructureDocument, type PageLayoutSectionOverride, type PageLayoutSectionStructureOverride, type PageMetaJson, type PageOnlyLayoutSection, type PageSectionPlacement, type PaginatedResult, type Perspective, type PortableTextDocument, type PortableTextNode, type PropGroup, type PropTab, type PublishDockUiInput, type PublishDockUiOutput, REFERENCE_CREATE_REFUSAL_CODES, RESPONSIVE_CSS, RICHTEXT_ADVANCED_ELEMENTS, RICHTEXT_BLOCK_ELEMENTS, RICHTEXT_BLOCK_FEATURES, RICHTEXT_CORE_ELEMENTS, RICHTEXT_ELEMENTS, RICHTEXT_FEATURES, RICHTEXT_FEATURE_ALIASES, RICHTEXT_HEADING_FEATURES, RICHTEXT_MARK_FEATURES, RICHTEXT_TOGGLE_FEATURES, ROLE_KEYS, type RadiusToken, type ReadButtonValue, type Redirect, type ReferenceCreateCapability, type ReferenceCreateRefusal, type ReferenceCreateRefusalCode, type ReferenceCreateResult, type ReferenceCreatedOption, type ReservedLayoutSection, type ResolvedAuthor, type ResolvedIconOptions, type ResolvedLayoutNode, type ResolvedPost, type RichTextBlock, type RichTextElementName, type RichTextEmbeds, type RichTextFeature, type RichTextProps, type RichTextRefusalCode, type RichTextResolved, SCHEMA_HASH_INPUTS, SECTION_DOCTRINE, SECTION_SPACE_TOKENS, SEGMENTED_MAX, SEGMENTED_MIN, SHOW_IF_SCOPES, SIDE_SPACE_MIN_PX, SIDE_SPACE_TOKENS, SLOT_CHILD_KEYS, SLOT_ITEMS_CAP, SLOT_MAX_ITEMS, SLOT_SETTINGS_MAX, SLOT_SETTINGS_TYPES, SOURCE_RANK, SPACE_BOTTOM_TOKENS, SPACE_STEP_TOKENS, type ScaleUnit, type SchemaHashTable, type SchemaSource, type SectionBlock, type SectionPlanItem, type SectionProps, type SectionSpaceToken, type ShadowToken, type ShowIf, type ShowIfRule, type SignInInput, type SignUpInput, type SiteSeoDefaults, type SlideItem, type SliderBlock, type SliderProps, type SlotChild, type SlotItem, type SlotShapeOptions, type SlotShapeProblem, type SlotValue, type SourcedFacet, type SpaceStepToken, type SpaceToken, type SpacerBlock, type SpacerProps, TABLE_COLUMN_TYPES, TABLE_CSS, TABLE_JSONLD_TYPES, TABLE_LIMITS, TABLE_RESPONSIVE, TAB_MAX, TAB_MAX_RENDERABLE_NOW, TAG_HEADS, THEME_TOKENS, type TabItem, type TableCell, type TableCellObject, type TableCellValue, type TableCheckOptions, type TableColumn, type TableColumnType, type TableFieldOptions, type TableFootnote, type TableGroup, type TableLink, type TableProblem, type TableRef, type TableRefResolved, type TableRow, type TableValue, type TabsBlock, type TabsProps, type TextBlock, type TextProps, type ThemeToken, UI_PROTOCOLS, UI_REFUSAL_CODES, UI_REFUSAL_IDS, type UiBefore, type UiManifestEntry, type UiManifestV2, type UiOrigin, type UiProtocol, type UiRefusal, type UiRefusalFamily, type UiRefusalId, type UploadIconValue, type V2Placement, type V2Shape, type V2VariantMeta, V2_KEYS, V2_PLACEMENTS, V2_SHAPES, VARIANT_PROP_KEY, VIDEO_TRANSCRIPT_MAX, VIDEO_VALUE_KEYS, type ValidateDockUiInput, type ValidateDockUiOutput, type VariantGroupV2, type VariantInputMapping, type VideoBlock, type VideoProps, type VideoValue, type VisibilityWindow, WIDTH_FIT_FAIL_KINDS, type WeightToken, type WidthFitFailKind, type WidthFitResult, type WindowState, type Workspace, type WriteDockUiInput, type WriteDockUiOutput, type ZoneField, allowRuleOf, anchorTargetRel, blockStyleToColumnCss, blockStyleToCss, blockStyleToInnerCss, bodySchemaOf, buttonBlockProps, buttonFullWidthProblem, buttonIconOf, buttonIconSvg, buttonLinkPairs, buttonLookValue, buttonSiteLookOf, buttonValueOfInstance, buttonValueProblem, buttonVariantOf, candidateRole, canonicalJson, compactIcon, componentInstanceAddresses, componentPropTargetKey, derivedPairs, dockBudget, dockScreens, dockUiMerkleKey, embedAddress, embedMarkerHtml, embedVisible, evaluateShowIf, exampleFor, expandBlockBindings, fieldGroupOf, fieldStyleCssText, fieldStyleToCss, fileExtension, fileFieldLimits, formUploadAccept, formUploadLimits, formatNumber, formatPropsAttribute, getBlockType, headingPaintCss, hiddenEverywhere, hideOnAttr, iconHtml, iconIdentity, iconSrc, iconValueProblem, imageFrameCss, inWindow, isBlock, isButtonLookValue, isChromeLandmark, isCodeButton, isComponentGateCode, isDeriveReservedKey, isDockUiImportAllowed, isEmbedReason, isIconObjectForm, isLinkObject, isRefusedUploadExtension, isReservedKey, isRoleKey, isRulePaired, isScriptHref, isSlotChild, isTableValue, isUiRefusal, isVariantVisible, keyWords, landmarkRegions, linkAnchorOf, linkHref, linkRefOf, linkValueProblem, locatorFor, locatorPath, mayOverwrite, normaliseRichTextFeatures, normalizeIcon, normalizeLinkValue, normalizeTableValue, normalizeWindow, parseEmbedMarkers, parseNumberText, parsePropsAttribute, pickFieldStyle, placementBindOf, planSections, readButtonValue, readNumberFormat, readPath, referenceCreateRefusal, regionOf, renderTableHtml, resolveIconOptions, richTextRefusal, rulePartnerOf, safeCssUrl, schemaHashInput, sideFloorApplies, sideSpaceCss, slotBindOf, slotChildValues, slotItems, slotPathString, slotShapeProblems, slugify, spaceTokenCss, splitButtonStyle, tableCellText, tablePathString, tableRefCells, tableSearchText, tableToMarkdown, tableValueProblems, topFieldKeyOf, uiRefusalId, usesHideOn, variantOptionsFromUnion, variantOptionsOf, variantPropOf, videoUrlOf, videoValueProblem, visibleBlocks, visibleDeliveredLayout, visibleLayoutStructure, windowState, withButtonLookProps, withExample, withIconLabel };
5134
+ export { type AlignToken, type AllowRule, type ApiError, type ApiKey, type ApiKeyPermission, type ApiKeyTokenType, type ApproveDockUiInput, type ApproveDockUiOutput, type ArrayZoneConfig, type AssertEqual, type AuthResponse, type AuthSession, type AuthUser, BG_TOKENS, BG_TOKEN_CSS, BLOCK_BINDINGS, BLOCK_FIELD_TYPES, BLOCK_FIELD_TYPES_RENDERABLE_NOW, BODY_SCHEMA_ORIGINS, BREAKPOINTS, BUTTON_ACTIONS, BUTTON_FULL_WIDTH_INVALID, BUTTON_ICONS, BUTTON_ICON_NAMES, BUTTON_LOOK_KEYS, BUTTON_PLACEMENT_KEYS, BUTTON_SIZES, BUTTON_TEXT_CSS, BUTTON_TEXT_KEYS, BUTTON_VARIANTS, type BetterCMSErrorCode, type BgToken, type BindingKind, type BlockBinding, type BlockHoverStyle, type BlockStyle, type BlockType, type BodiesState, type BodyDeclaration, type BodySchema, type BodySchemaOrigin, type ButtonAction, type ButtonBlock, type ButtonIcon, type ButtonLinkCandidate, type ButtonLookKey, type ButtonProps, type ButtonSiteLook, type ButtonSizeName, type ButtonTextKey, type ButtonValue, type ButtonVariant, CANVAS_GESTURE_NAMES, CATEGORY_ID_MAX, CATEGORY_ORDER, CODE_SLOT_PREFIX, COMPONENT_GATE_CODES, COMPONENT_PROP_TYPES, CONTENT_WIDTH_TOKENS, CONTROL_HELP, type CanonicalInputDefinition, type CanvasGesture, type ChoiceOption, type CollectionBlock, type CollectionFilter, type CollectionProps, type ColorToken, type ColumnsBlock, type ColumnsProps, type Component, type ComponentBlock, type ComponentCategory, type ComponentCategoryId, type ComponentEmbedNode, type ComponentFormPropRef, type ComponentGateCode, type ComponentPreview, type ComponentPropDef, type ComponentPropType, type ComponentPropUi, type ComponentProps, type ComponentSubField, type ComponentTab, type ComponentV2, type ComponentVariantGroup, type Content, type ContentBlock, type ContentEntry, type ContentModel, type ContentModelField, type ContentModelFieldType, type ContentModelFieldUi, type ContentModelV2, type ContentPageResult, type ContentResponse, type ContentWidthToken, type ControlKind, type CornerToken, DEFAULT_ICON_SOURCES, DEFAULT_VARIANT, DEPTH_MAX, DERIVE_MINTED_RESERVED, DIALOG_SELECTOR, DOCK_BUDGET, DOCK_ICON_NAMES, DOCK_ICON_NAME_SET, DOCK_UI_IMPORTS, DOCK_UI_LIMITS, DOCK_UI_NAME, type DeclaredSlot, type DeepReadonly, type DefSources, type DeliveredLayout, type DeliveryComponent, type DeliveryEntry, type DeliveryEntrySeo, type DeliveryList, type DeliveryPage, type DerivedLocator, type DockBudget, type DockFieldLike, type DockFieldsetLike, type DockIconName, type DockInputRef, type DockLane, type DockNode, type DockPropGroupLike, type DockScreen, type DockUiBuildReceipt, type DockUiKind, type DockUiOrigin, type DockUiScope, type DockUiSource, type DockUiStatus, type DockUiVersion, EMBED_LEDGER_OUTCOMES, EMBED_REASONS, type ElementLike, type EmbedCapability, type EmbedCard, type EmbedLedgerOutcome, type EmbedMarker, type EmbedMarkerMatch, type EmbedNotRenderedWarning, type EmbedReason, type ExpandedBinding, FIELD_SIZE_ZOOM, FIELD_STYLE_KEYS, FONT_SIZE_TOKEN_PX, FOOTER_SECTION_ID, FORM_UPLOAD, FORM_UPLOAD_DEFAULT_ACCEPT, FORM_UPLOAD_PRESETS, FORM_UPLOAD_REFUSED_EXTENSIONS, FRAME_REFUSALS, type FieldConfig, type FieldSize, type FieldStyle, type FieldStyleKey, type FieldStyles, type Fieldset, type FieldsetKind, type FieldsetUiBefore, type FontSizeToken, type FooterBlock, type FooterColumn, type FooterProps, type Form, type FormBlock, type FormField, type FormProps, type FormSubmission, HELP_CAPS, HELP_LINE_MAX, HELP_MAX, HELP_WRITE_MAX, type HeadingBlock, type HeadingProps, ICON_LABEL_MAX, ICON_SOURCES, IMAGE_ASPECTS, IMAGE_FRAME_RADIUS, type IconFieldOptions, type IconObjectValue, type IconSource, type IconSrc, type IconValue, type ImageAspect, type ImageBlock, type ImageProps, KEY_FORBIDDEN, KEY_FORMAT, KEY_RESERVED, KEY_RESERVED_PREFIX, KIT_CATEGORIES, type KitCategory, LANDMARK_SELECTOR, LAYOUT_SECTION_ICONS, LAYOUT_SECTION_ICON_SET, LINK_RELS, LINK_VALUE_TYPES, LIST_ITEMS_CAP, LIST_PREVIEW_SLOTS, LOCATOR_PATH, type LandmarkChainElement, type LandmarkElement, type LayoutComponentItem, type LayoutDataDocument, type LayoutFieldDefinition, type LayoutFieldItem, type LayoutFieldType, type LayoutScalarFieldType, type LayoutSection, type LayoutSectionDesign, type LayoutSectionIcon, type LayoutSectionItem, type LayoutStructureDocument, type LayoutZone, type LibraryIconValue, type LinkPairSibling, type LinkRel, type LinkValue, type LinkValueType, type ListDockUiInput, type ListDockUiOutput, type LocatorGrammar, MAIN_SELECTOR, type ManagementLayoutCommand, type MediaAsset, type MediaCaptionTrack, type MediaFieldValue, NAVIGATION_SECTION_ID, type NavLink, type NavbarBlock, type NavbarProps, type NumberFieldFormat, type NumberScale, OPEN_MODES, OPEN_MODE_TYPES, OPTION_DESCRIPTION_MAX, type OpenMode, PAGE_CONTENT_ANCHOR_ID, PRIMITIVE_ARRAY_RULE, type PackIconValue, type Page, type PageLayoutOverrideDataDocument, type PageLayoutOverrideDocument, type PageLayoutOverrideState, type PageLayoutOverrideStructureDocument, type PageLayoutSectionOverride, type PageLayoutSectionStructureOverride, type PageMetaJson, type PageOnlyLayoutSection, type PageSectionPlacement, type PaginatedResult, type Perspective, type PortableTextDocument, type PortableTextNode, type PropGroup, type PropTab, type PublishDockUiInput, type PublishDockUiOutput, REFERENCE_CREATE_REFUSAL_CODES, RESPONSIVE_CSS, RICHTEXT_ADVANCED_ELEMENTS, RICHTEXT_BLOCK_ELEMENTS, RICHTEXT_BLOCK_FEATURES, RICHTEXT_CORE_ELEMENTS, RICHTEXT_ELEMENTS, RICHTEXT_FEATURES, RICHTEXT_FEATURE_ALIASES, RICHTEXT_HEADING_FEATURES, RICHTEXT_MARK_FEATURES, RICHTEXT_TOGGLE_FEATURES, ROLE_KEYS, type RadiusToken, type ReadButtonValue, type Redirect, type ReferenceCreateCapability, type ReferenceCreateRefusal, type ReferenceCreateRefusalCode, type ReferenceCreateResult, type ReferenceCreatedOption, type ReservedLayoutSection, type ResolvedAuthor, type ResolvedIconOptions, type ResolvedLayoutNode, type ResolvedPost, type RichTextBlock, type RichTextElementName, type RichTextEmbeds, type RichTextFeature, type RichTextProps, type RichTextRefusalCode, type RichTextResolved, SCHEMA_HASH_INPUTS, SECTION_ANCHOR, SECTION_CSS_CLASS, SECTION_DOCTRINE, SECTION_SPACE_TOKENS, SEGMENTED_MAX, SEGMENTED_MIN, SHOW_IF_SCOPES, SIDE_SPACE_MIN_PX, SIDE_SPACE_TOKENS, SLOT_CHILD_KEYS, SLOT_ITEMS_CAP, SLOT_MAX_ITEMS, SLOT_SETTINGS_MAX, SLOT_SETTINGS_TYPES, SOURCE_RANK, SPACE_BOTTOM_TOKENS, SPACE_STEP_TOKENS, type ScaleUnit, type SchemaHashTable, type SchemaSource, type SectionBlock, type SectionPlanItem, type SectionProps, type SectionSpaceToken, type ShadowToken, type ShowIf, type ShowIfRule, type SignInInput, type SignUpInput, type SiteSeoDefaults, type SlideItem, type SliderBlock, type SliderProps, type SlotChild, type SlotItem, type SlotShapeOptions, type SlotShapeProblem, type SlotValue, type SourcedFacet, type SpaceStepToken, type SpaceToken, type SpacerBlock, type SpacerProps, TABLE_COLUMN_TYPES, TABLE_CSS, TABLE_JSONLD_TYPES, TABLE_LIMITS, TABLE_RESPONSIVE, TAB_MAX, TAB_MAX_RENDERABLE_NOW, TAG_HEADS, THEME_TOKENS, type TabItem, type TableCell, type TableCellObject, type TableCellValue, type TableCheckOptions, type TableColumn, type TableColumnType, type TableFieldOptions, type TableFootnote, type TableGroup, type TableLink, type TableProblem, type TableRef, type TableRefResolved, type TableRow, type TableValue, type TabsBlock, type TabsProps, type TextBlock, type TextProps, type ThemeToken, UI_PROTOCOLS, UI_REFUSAL_CODES, UI_REFUSAL_IDS, type UiBefore, type UiManifestEntry, type UiManifestV2, type UiOrigin, type UiProtocol, type UiRefusal, type UiRefusalFamily, type UiRefusalId, type UploadIconValue, type V2Placement, type V2Shape, type V2VariantMeta, V2_KEYS, V2_PLACEMENTS, V2_SHAPES, VARIANT_PROP_KEY, VIDEO_TRANSCRIPT_MAX, VIDEO_VALUE_KEYS, type ValidateDockUiInput, type ValidateDockUiOutput, type VariantGroupV2, type VariantInputMapping, type VideoBlock, type VideoProps, type VideoValue, type VisibilityWindow, WIDTH_FIT_FAIL_KINDS, type WeightToken, type WidthFitFailKind, type WidthFitResult, type WindowState, type Workspace, type WriteDockUiInput, type WriteDockUiOutput, type ZoneField, allowRuleOf, anchorSlug, anchorTargetRel, blockStyleToColumnCss, blockStyleToCss, blockStyleToInnerCss, bodySchemaOf, buttonBlockProps, buttonFullWidthProblem, buttonIconOf, buttonIconSvg, buttonLinkPairs, buttonLookValue, buttonSiteLookOf, buttonTextCss, buttonTextCssText, buttonTextProblem, buttonValueOfInstance, buttonValueProblem, buttonVariantOf, candidateRole, canonicalJson, compactIcon, componentInstanceAddresses, componentPropTargetKey, defaultSectionAnchors, derivedPairs, dockBudget, dockScreens, dockUiMerkleKey, embedAddress, embedMarkerHtml, embedVisible, evaluateShowIf, exampleFor, expandBlockBindings, fieldGroupOf, fieldStyleCssText, fieldStyleToCss, fileExtension, fileFieldLimits, formUploadAccept, formUploadLimits, formatNumber, formatPropsAttribute, getBlockType, headingPaintCss, hiddenEverywhere, hideOnAttr, iconHtml, iconIdentity, iconSrc, iconValueProblem, imageFrameCss, inWindow, isBlock, isButtonLookValue, isChromeLandmark, isCodeButton, isComponentGateCode, isDeriveReservedKey, isDockUiImportAllowed, isEmbedReason, isIconObjectForm, isLinkObject, isRefusedUploadExtension, isReservedKey, isRoleKey, isRulePaired, isScriptHref, isSlotChild, isTableValue, isUiRefusal, isVariantVisible, keyWords, landmarkRegions, linkAnchorOf, linkHref, linkRefOf, linkValueProblem, locatorFor, locatorPath, mayOverwrite, normaliseRichTextFeatures, normalizeIcon, normalizeLinkValue, normalizeTableValue, normalizeWindow, parseEmbedMarkers, parseNumberText, parsePropsAttribute, pickFieldStyle, placementBindOf, planSections, readButtonValue, readNumberFormat, readPath, referenceCreateRefusal, regionOf, renderTableHtml, resolveIconOptions, richTextRefusal, rulePartnerOf, safeCssUrl, schemaHashInput, sectionIdentityAttrs, sideFloorApplies, sideSpaceCss, slotBindOf, slotChildValues, slotItems, slotPathString, slotShapeProblems, slugify, spaceTokenCss, splitButtonStyle, tableCellText, tablePathString, tableRefCells, tableSearchText, tableToMarkdown, tableValueProblems, topFieldKeyOf, uiRefusalId, usesHideOn, variantOptionsFromUnion, variantOptionsOf, variantPropOf, videoUrlOf, videoValueProblem, visibleBlocks, visibleDeliveredLayout, visibleLayoutStructure, windowState, withButtonLookProps, withExample, withIconLabel };
package/dist/index.js CHANGED
@@ -339,15 +339,31 @@ function spaceTokenCss(token) {
339
339
  // src/blockStyle.ts
340
340
  var SPACE_PX = { none: "0", xs: "4px", sm: "8px", md: "16px", lg: "32px", xl: "64px" };
341
341
  var FONT_SIZE_REM = {
342
+ xs: "0.75rem",
342
343
  sm: "0.875rem",
343
344
  base: "1rem",
345
+ md: "1.125rem",
344
346
  lg: "1.25rem",
345
347
  xl: "1.5rem",
346
348
  "2xl": "2rem",
347
349
  "3xl": "2.25rem",
350
+ "3.5xl": "2.5rem",
348
351
  "4xl": "3rem",
349
352
  "5xl": "4rem"
350
353
  };
354
+ var FONT_SIZE_TOKEN_PX = {
355
+ xs: 12,
356
+ sm: 14,
357
+ base: 16,
358
+ md: 18,
359
+ lg: 20,
360
+ xl: 24,
361
+ "2xl": 32,
362
+ "3xl": 36,
363
+ "3.5xl": 40,
364
+ "4xl": 48,
365
+ "5xl": 64
366
+ };
351
367
  var WEIGHT = { normal: 400, medium: 500, semibold: 600, bold: 700 };
352
368
  var RADIUS_PX = { none: "0", sm: "4px", md: "8px", lg: "16px", full: "9999px" };
353
369
  var IMAGE_ASPECTS = ["16/9", "16/7", "4/3", "4/5", "1/1"];
@@ -383,6 +399,9 @@ var FILL_SCHEME = {
383
399
  dark: { colorScheme: "dark", color: "#f7f8f8" },
384
400
  accent: { colorScheme: "var(--bcms-accent-scheme,dark)", color: "var(--bcms-on-accent,#ffffff)" }
385
401
  };
402
+ var BG_TOKEN_CSS = {
403
+ "brand-tint": "var(--bcms-bg-tint,color-mix(in srgb,var(--bcms-bg-accent,#4f46e5) 8%,var(--bcms-bg-surface,#ffffff)))"
404
+ };
386
405
  var CORNER_PX = { "0": "0", s: "4px", m: "8px", l: "16px", xl: "24px", "2xl": "32px" };
387
406
  var SHADOW_CSS = {
388
407
  "0": "none",
@@ -401,6 +420,43 @@ function hideOnAttr(style) {
401
420
  const on = ["mobile", "tablet", "desktop"].filter((b) => raw.includes(b));
402
421
  return on.length === 3 ? "" : on.join(" ");
403
422
  }
423
+ var SECTION_ANCHOR = /^[a-z0-9-]{1,64}$/;
424
+ var SECTION_CSS_CLASS = /^[A-Za-z0-9_\- ]{1,200}$/;
425
+ function sectionIdentityAttrs(style) {
426
+ if (!style || typeof style !== "object") return {};
427
+ const s = style;
428
+ const out = {};
429
+ if (typeof s.anchor === "string" && SECTION_ANCHOR.test(s.anchor)) out.id = s.anchor;
430
+ if (typeof s.cssClass === "string" && SECTION_CSS_CLASS.test(s.cssClass)) {
431
+ const names = s.cssClass.split(" ").filter(Boolean);
432
+ if (names.length) out.className = names.join(" ");
433
+ }
434
+ return out;
435
+ }
436
+ function anchorSlug(text2) {
437
+ return text2.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64).replace(/-+$/, "");
438
+ }
439
+ function defaultSectionAnchors(blocks) {
440
+ const out = /* @__PURE__ */ new Map();
441
+ if (!Array.isArray(blocks)) return out;
442
+ const used = /* @__PURE__ */ new Set();
443
+ for (const b of blocks) {
444
+ const own2 = b && typeof b === "object" ? sectionIdentityAttrs(b.style).id : void 0;
445
+ if (own2) used.add(own2);
446
+ }
447
+ for (const b of blocks) {
448
+ if (!b || typeof b !== "object") continue;
449
+ if (sectionIdentityAttrs(b.style).id) continue;
450
+ const label = b.label;
451
+ const base = typeof label === "string" ? anchorSlug(label) : "";
452
+ if (!base) continue;
453
+ let anchor = base;
454
+ for (let n = 2; used.has(anchor); n++) anchor = `${base.slice(0, 64 - String(n).length - 1).replace(/-+$/, "")}-${n}`;
455
+ used.add(anchor);
456
+ out.set(b, anchor);
457
+ }
458
+ return out;
459
+ }
404
460
  function usesHideOn(blocks) {
405
461
  let found = false;
406
462
  JSON.stringify(blocks ?? null, (k, v) => {
@@ -473,6 +529,7 @@ function blockStyleToCss(style) {
473
529
  css.color = fill.color;
474
530
  }
475
531
  }
532
+ if (own(BG_TOKEN_CSS, s.bgToken)) css.background = own(BG_TOKEN_CSS, s.bgToken);
476
533
  const bgImage = safeCssUrl(s.bgImage);
477
534
  if (bgImage) {
478
535
  css.backgroundImage = `url(${bgImage})`;
@@ -480,8 +537,9 @@ function blockStyleToCss(style) {
480
537
  css.backgroundPosition = "center";
481
538
  }
482
539
  const n = style;
483
- if (!top && typeof n.paddingTop === "number") css.paddingTop = `${clamp(n.paddingTop, 0, 240)}px`;
484
- if (!bottom && typeof n.paddingBottom === "number") css.paddingBottom = `${clamp(n.paddingBottom, 0, 240)}px`;
540
+ const scaled = (px) => n.padScale === true ? `calc(${clamp(px, 0, 240)}px * var(--bcms-pad-scale, 1))` : `${clamp(px, 0, 240)}px`;
541
+ if (!top && typeof n.paddingTop === "number") css.paddingTop = scaled(n.paddingTop);
542
+ if (!bottom && typeof n.paddingBottom === "number") css.paddingBottom = scaled(n.paddingBottom);
485
543
  if (!sides && typeof n.paddingSides === "number") {
486
544
  const px = `${clamp(n.paddingSides, 0, 240)}px`;
487
545
  css.paddingLeft = px;
@@ -553,7 +611,7 @@ function splitButtonStyle(style) {
553
611
  paint: Object.keys(paint).length ? paint : void 0
554
612
  };
555
613
  }
556
- var FIELD_STYLE_KEYS = ["contentWidth", "contentAlign", "marginTop", "marginBottom", "align", "fontSize", "weight", "size"];
614
+ var FIELD_STYLE_KEYS = ["contentWidth", "contentAlign", "marginTop", "marginBottom", "align", "fontSize", "weight", "size", "textColor"];
557
615
  var FIELD_SIZE_ZOOM = { sm: "0.875", lg: "1.125" };
558
616
  var FIELD_KEY_SET = new Set(FIELD_STYLE_KEYS);
559
617
  function pickFieldStyle(style) {
@@ -3633,9 +3691,46 @@ function buttonValueProblem(value, looks) {
3633
3691
  if (v.newTab !== void 0 && typeof v.newTab !== "boolean") return "newTab must be true or false";
3634
3692
  if (v.rel !== void 0 && !LINK_RELS.includes(v.rel)) return `has an unknown rel "${String(v.rel)}" (nofollow, sponsored or ugc)`;
3635
3693
  if (v.icon !== void 0 && v.icon !== null && buttonIconOf(v.icon) === null) return `has an unknown icon "${String(v.icon)}"`;
3694
+ return buttonTextProblem(v);
3695
+ }
3696
+ var BUTTON_TEXT_CSS = {
3697
+ radius: { prop: "borderRadius", values: { "0": "0", s: "4px", m: "8px", l: "12px", full: "999px" } },
3698
+ font: { prop: "fontFamily", values: { site: "inherit", serif: "var(--bcms-font-heading,Georgia,serif)", mono: "var(--bcms-font-mono,ui-monospace,SFMono-Regular,Menlo,monospace)" } },
3699
+ fontSize: { prop: "fontSize", values: { "12": "12px", "13": "13px", "14": "14px", "16": "16px", "18": "18px" } },
3700
+ weight: { prop: "fontWeight", values: { "400": "400", "500": "500", "600": "600", "700": "700", "800": "800" } },
3701
+ letterSpacing: { prop: "letterSpacing", values: { "-2": "-0.02em", "-1": "-0.01em", "0": "0", "1": "0.01em", "2": "0.02em" } },
3702
+ textCase: { prop: "textTransform", values: { none: "none", title: "capitalize", upper: "uppercase" } }
3703
+ };
3704
+ var BUTTON_TEXT_KEYS = Object.keys(BUTTON_TEXT_CSS);
3705
+ function buttonTextCss(props) {
3706
+ if (!props || typeof props !== "object") return void 0;
3707
+ const p = props;
3708
+ const css = {};
3709
+ for (const key of BUTTON_TEXT_KEYS) {
3710
+ const { prop, values } = BUTTON_TEXT_CSS[key];
3711
+ const token = p[key];
3712
+ if (typeof token === "string" && Object.prototype.hasOwnProperty.call(values, token)) css[prop] = values[token];
3713
+ }
3714
+ return Object.keys(css).length ? css : void 0;
3715
+ }
3716
+ function buttonTextCssText(props) {
3717
+ const css = buttonTextCss(props);
3718
+ return css ? Object.entries(css).map(([k, v]) => `${k.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)}:${v}`).join(";") : "";
3719
+ }
3720
+ function buttonTextProblem(value) {
3721
+ if (!value || typeof value !== "object") return null;
3722
+ const v = value;
3723
+ for (const key of BUTTON_TEXT_KEYS) {
3724
+ const token = v[key];
3725
+ if (token === void 0 || token === null) continue;
3726
+ const values = BUTTON_TEXT_CSS[key].values;
3727
+ if (typeof token !== "string" || !Object.prototype.hasOwnProperty.call(values, token)) {
3728
+ return `has an unknown ${key} "${String(token)}" (${Object.keys(values).join(", ")})`;
3729
+ }
3730
+ }
3636
3731
  return null;
3637
3732
  }
3638
- var BUTTON_LOOK_KEYS = ["variant", "size", "arrow", "icon", "newTab", "fullWidth"];
3733
+ var BUTTON_LOOK_KEYS = ["variant", "size", "arrow", "icon", "newTab", "fullWidth", "radius", "font", "fontSize", "weight", "letterSpacing", "textCase"];
3639
3734
  function buttonBlockProps(value) {
3640
3735
  if (!value || typeof value !== "object" || Array.isArray(value)) return {};
3641
3736
  const v = value;
@@ -3672,8 +3767,34 @@ function soleButtonId(blockJson) {
3672
3767
  walk(blockJson);
3673
3768
  return ids.length === 1 ? ids[0] : null;
3674
3769
  }
3675
- var LOOK_PROP_TYPE = { variant: "text", size: "text", arrow: "boolean", icon: "text", newTab: "boolean", fullWidth: "boolean" };
3676
- var LOOK_PROP_LABEL = { variant: "Style", size: "Size", arrow: "Show arrow", icon: "Leading icon", newTab: "Open in new tab", fullWidth: "Full width" };
3770
+ var LOOK_PROP_TYPE = {
3771
+ variant: "text",
3772
+ size: "text",
3773
+ arrow: "boolean",
3774
+ icon: "text",
3775
+ newTab: "boolean",
3776
+ fullWidth: "boolean",
3777
+ radius: "text",
3778
+ font: "text",
3779
+ fontSize: "text",
3780
+ weight: "text",
3781
+ letterSpacing: "text",
3782
+ textCase: "text"
3783
+ };
3784
+ var LOOK_PROP_LABEL = {
3785
+ variant: "Style",
3786
+ size: "Size",
3787
+ arrow: "Show arrow",
3788
+ icon: "Leading icon",
3789
+ newTab: "Open in new tab",
3790
+ fullWidth: "Full width",
3791
+ radius: "Radius",
3792
+ font: "Font",
3793
+ fontSize: "Size of text",
3794
+ weight: "Weight",
3795
+ letterSpacing: "Letter spacing",
3796
+ textCase: "Case"
3797
+ };
3677
3798
  function withButtonLookProps(def) {
3678
3799
  const props = [...def.props ?? []];
3679
3800
  if (def.category !== "button") return props;
@@ -5120,6 +5241,7 @@ function iconHtml(v, className = "") {
5120
5241
  }
5121
5242
  export {
5122
5243
  BG_TOKENS,
5244
+ BG_TOKEN_CSS,
5123
5245
  BLOCK_BINDINGS,
5124
5246
  BLOCK_FIELD_TYPES,
5125
5247
  BLOCK_FIELD_TYPES_RENDERABLE_NOW,
@@ -5132,6 +5254,8 @@ export {
5132
5254
  BUTTON_LOOK_KEYS,
5133
5255
  BUTTON_PLACEMENT_KEYS,
5134
5256
  BUTTON_SIZES,
5257
+ BUTTON_TEXT_CSS,
5258
+ BUTTON_TEXT_KEYS,
5135
5259
  BUTTON_VARIANTS,
5136
5260
  CANVAS_GESTURE_NAMES,
5137
5261
  CATEGORY_ID_MAX,
@@ -5156,6 +5280,7 @@ export {
5156
5280
  EMBED_REASONS,
5157
5281
  FIELD_SIZE_ZOOM,
5158
5282
  FIELD_STYLE_KEYS,
5283
+ FONT_SIZE_TOKEN_PX,
5159
5284
  FOOTER_SECTION_ID,
5160
5285
  FORM_UPLOAD,
5161
5286
  FORM_UPLOAD_DEFAULT_ACCEPT,
@@ -5204,6 +5329,8 @@ export {
5204
5329
  RICHTEXT_TOGGLE_FEATURES,
5205
5330
  ROLE_KEYS,
5206
5331
  SCHEMA_HASH_INPUTS,
5332
+ SECTION_ANCHOR,
5333
+ SECTION_CSS_CLASS,
5207
5334
  SECTION_DOCTRINE,
5208
5335
  SECTION_SPACE_TOKENS,
5209
5336
  SEGMENTED_MAX,
@@ -5239,6 +5366,7 @@ export {
5239
5366
  VIDEO_VALUE_KEYS,
5240
5367
  WIDTH_FIT_FAIL_KINDS,
5241
5368
  allowRuleOf,
5369
+ anchorSlug,
5242
5370
  anchorTargetRel,
5243
5371
  blockStyleToColumnCss,
5244
5372
  blockStyleToCss,
@@ -5251,6 +5379,9 @@ export {
5251
5379
  buttonLinkPairs,
5252
5380
  buttonLookValue,
5253
5381
  buttonSiteLookOf,
5382
+ buttonTextCss,
5383
+ buttonTextCssText,
5384
+ buttonTextProblem,
5254
5385
  buttonValueOfInstance,
5255
5386
  buttonValueProblem,
5256
5387
  buttonVariantOf,
@@ -5259,6 +5390,7 @@ export {
5259
5390
  compactIcon,
5260
5391
  componentInstanceAddresses,
5261
5392
  componentPropTargetKey,
5393
+ defaultSectionAnchors,
5262
5394
  derivedPairs,
5263
5395
  dockBudget,
5264
5396
  dockScreens,
@@ -5338,6 +5470,7 @@ export {
5338
5470
  rulePartnerOf,
5339
5471
  safeCssUrl,
5340
5472
  schemaHashInput,
5473
+ sectionIdentityAttrs,
5341
5474
  sideFloorApplies,
5342
5475
  sideSpaceCss,
5343
5476
  slotBindOf,