@bettercms-ai/types 1.60.0 → 1.61.1

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
@@ -103,10 +103,21 @@ interface V2VariantMeta {
103
103
  icon?: DockIconName;
104
104
  description?: string;
105
105
  }
106
- /** `components.v2` / `published_v2`. Category and icon are native columns. */
106
+ /**
107
+ * `components.v2` / `published_v2`. Category and icon are native columns. The `dock*` keys are
108
+ * SERVER-OWNED (written only by update_component `dockTabs` / `dockDesign`, never in V2_KEYS, so a
109
+ * client `v2` block cannot carry them; a `v2` write keeps the stored ones). @see Component.dockTabs
110
+ */
107
111
  interface ComponentV2 {
108
112
  shape?: V2Shape;
109
113
  placement?: V2Placement;
114
+ dockTabs?: "none";
115
+ dockDesign?: "tab" | "fold";
116
+ dockOrigin?: "human" | "agent" | "derived";
117
+ dockBefore?: {
118
+ dockTabs: "none" | null;
119
+ dockDesign: "tab" | "fold" | null;
120
+ };
110
121
  }
111
122
  /** `content_models.v2`. Icon and preview are native (`icon`, `list_preview`). */
112
123
  interface ContentModelV2 {
@@ -1626,10 +1637,23 @@ interface ComponentProps {
1626
1637
  bindPaths?: Record<string, string>;
1627
1638
  /**
1628
1639
  * Phase B: the props this INSTANCE does not own — their copy stays in the page's own field, which
1629
- * the page lane keeps binding — and why: `{ <propKey>: "RICHTEXT_HEADING" | "BUTTON_LOOK_UNMAPPED" }`.
1640
+ * the page lane keeps binding — and why: `{ <propKey>: "RICHTEXT_HEADING" | "BUTTON_LOOK_UNMAPPED" | "TYPE_NOT_PROPPABLE" }`.
1630
1641
  * The dock hides these props: an override written there renders nowhere.
1631
1642
  */
1632
- kept?: Record<string, "RICHTEXT_HEADING" | "BUTTON_LOOK_UNMAPPED">;
1643
+ kept?: Record<string, "RICHTEXT_HEADING" | "BUTTON_LOOK_UNMAPPED" | "TYPE_NOT_PROPPABLE">;
1644
+ /**
1645
+ * WHERE each kept prop's copy stays: `{ <propKey>: "<page field path>" }`, the index-free address
1646
+ * the page lane binds (`sec0-button.label`, a table's `pricing-plans`). Written beside `kept`; a
1647
+ * placement from before it has none, and a reader falls back to matching by name.
1648
+ */
1649
+ keptAt?: Record<string, string>;
1650
+ /**
1651
+ * The BAND this placement stands on, by its locator (`region|ancestors|tag|siblingIndex`, the
1652
+ * backend's `bandLocatorOf`), stamped by the release. A person's removal of the placement records
1653
+ * it beside the group key (`derive_json.removedSectionsAt`), so the band stays removed after a
1654
+ * re-key (`sec0` → `authorImage`). Absent on a placement from before it: matched by key only.
1655
+ */
1656
+ bandAt?: string;
1633
1657
  }
1634
1658
  interface ComponentBlock {
1635
1659
  type: "component";
@@ -2887,6 +2911,15 @@ interface ComponentTab {
2887
2911
  icon?: DockIconName;
2888
2912
  order?: number;
2889
2913
  }
2914
+ /** `dockTabs: "none"`: draw the props with no tab strip. A stored `ui.tab` is kept, only ignored. */
2915
+ type ComponentDockTabs = "none";
2916
+ /** Where a designable section's Design controls go: `tab` = the outer Content | Design, `fold` = a Design group under the content. */
2917
+ type ComponentDockDesign = "tab" | "fold";
2918
+ /** The dock arrangement an agent's write replaced, which Revert restores. @see Component.dockOrigin */
2919
+ interface ComponentDockBefore {
2920
+ dockTabs: ComponentDockTabs | null;
2921
+ dockDesign: ComponentDockDesign | null;
2922
+ }
2890
2923
  interface Component {
2891
2924
  id: string;
2892
2925
  workspaceId: string;
@@ -2913,6 +2946,15 @@ interface Component {
2913
2946
  preview?: ComponentPreview | null;
2914
2947
  /** The block icon (a /kit schema's document-level `icon`): root crumb, slot rows, slot child frames. Null/absent = unset. */
2915
2948
  icon?: DockIconName | null;
2949
+ /**
2950
+ * The dock arrangement (stored in `components.v2`, served top level). Null/absent = the default:
2951
+ * tabs as the props declare them, Design as its own tab. Authoring chrome, component-wide.
2952
+ */
2953
+ dockTabs?: ComponentDockTabs | null;
2954
+ dockDesign?: ComponentDockDesign | null;
2955
+ /** Who last set `dockTabs` / `dockDesign` (server-owned), and with an agent the state Revert restores. */
2956
+ dockOrigin?: "human" | "agent" | "derived" | null;
2957
+ dockBefore?: ComponentDockBefore | null;
2916
2958
  /** Declared tabs no top-level prop sits in. Null/absent = none. @see ComponentTab */
2917
2959
  tabs?: ComponentTab[] | null;
2918
2960
  /** The bettercms://kit entry its V2 dock UI was built from (a kit-catalog id). Null/absent = none named. */
@@ -3027,15 +3069,19 @@ declare const slotPathString: (path: Array<string | number>) => string;
3027
3069
  * stored `helpText`; the dashboard adds a list column's example per row ({@link exampleFor}),
3028
3070
  * because the example depends on WHICH row is open and a stored line has one value for all rows.
3029
3071
  *
3030
- * A field's help, joined with single spaces, at most {@link HELP_MAX} characters (two dock lines):
3031
- * 1. a role sentence (@see ROLE_HELP), or the site's own words where the markup has them;
3032
- * 2. the control's how-to (@see CONTROL_HELP), only where the canvas has the gesture it names;
3033
- * 3. for a column of a list, `e.g. "<value>"` from the nearest OTHER row.
3072
+ * A field's stored help is ONE dock line, at most {@link HELP_LINE_MAX} characters (owner, 2026-10-25):
3073
+ * a role sentence (@see ROLE_HELP), or the site's own words where the markup has them. The canvas
3074
+ * gesture that also edits the field is DATA (@see CONTROL_HELP's `gesture`), never appended prose.
3075
+ * For a column of a list the dashboard may add `e.g. "<value>"` from the nearest OTHER row.
3034
3076
  *
3035
3077
  * Pure. No DOM, no I/O.
3036
3078
  */
3037
- /** Two dock lines at 12px in a ~250px column. */
3079
+ /** Two dock lines at 12px in a ~250px column: a stored line plus its row's example. */
3038
3080
  declare const HELP_MAX = 160;
3081
+ /** ONE dock line, no ellipsis: every line the platform writes fits it. */
3082
+ declare const HELP_LINE_MAX = 48;
3083
+ /** The longest help a client may write (an agent's `propHelpText`, a page field's): refused past it, `HELP_TEXT_TOO_LONG`. */
3084
+ declare const HELP_WRITE_MAX = 80;
3039
3085
  /**
3040
3086
  * What one role holds, said once: the role words a structural key ends in (@see ROLE_KEYS in
3041
3087
  * sections.ts, and the server's ROLE_VOCABULARY), plus the words a band's shape and a list give.
@@ -3053,7 +3099,11 @@ declare const ROLE_HELP: Readonly<Record<string, string>>;
3053
3099
  */
3054
3100
  declare const CANVAS_GESTURE_NAMES: readonly ["rows.reorder", "image.replace", "link.popover", "text.inline"];
3055
3101
  type CanvasGesture = (typeof CANVAS_GESTURE_NAMES)[number];
3056
- /** A control kind the canvas can also edit. A kind with no gesture (an icon, a switch) has no how-to. */
3102
+ /**
3103
+ * A control kind the canvas can also edit. A kind with no gesture (an icon, a switch) has no how-to.
3104
+ * The `text` is the dashboard's to show beside the control if it wants: it is NEVER part of a stored
3105
+ * help line (two dock lines was too long, owner 2026-10-25).
3106
+ */
3057
3107
  type ControlKind = "rows" | "image" | "link" | "text";
3058
3108
  declare const CONTROL_HELP: Readonly<Record<ControlKind, {
3059
3109
  text: string;
@@ -4523,4 +4573,4 @@ interface RichTextEmbeds {
4523
4573
  */
4524
4574
  declare const slugify: (s: string) => string;
4525
4575
 
4526
- 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, 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 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_PROP_TYPES, 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 ComponentFormPropRef, 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, 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 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, type ElementLike, type EmbedCard, type ExpandedBinding, FIELD_SIZE_ZOOM, FIELD_STYLE_KEYS, FOOTER_SECTION_ID, 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_MAX, type HeadingBlock, type HeadingProps, IMAGE_ASPECTS, IMAGE_FRAME_RADIUS, 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 LayoutSectionIcon, type LayoutSectionItem, type LayoutStructureDocument, type LayoutZone, 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 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_HELP, ROLE_KEYS, type RadiusToken, type ReadButtonValue, type Redirect, type ReferenceCreateCapability, type ReferenceCreateRefusal, type ReferenceCreateRefusalCode, type ReferenceCreateResult, type ReferenceCreatedOption, type ReservedLayoutSection, type ResolvedAuthor, 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_JSONLD_TYPES, TABLE_LIMITS, TABLE_RESPONSIVE, TAB_MAX, TAB_MAX_RENDERABLE_NOW, TAG_HEADS, 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 V2Placement, type V2Shape, type V2VariantMeta, V2_KEYS, V2_PLACEMENTS, V2_SHAPES, VIDEO_TRANSCRIPT_MAX, VIDEO_VALUE_KEYS, type ValidateDockUiInput, type ValidateDockUiOutput, type VariantGroupV2, type VariantInputMapping, type VideoBlock, type VideoProps, type VideoValue, type VisibilityWindow, type WeightToken, 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, componentInstanceAddresses, componentPropTargetKey, derivedPairs, dockBudget, dockScreens, dockUiMerkleKey, exampleFor, expandBlockBindings, fieldGroupOf, fieldStyleCssText, fieldStyleToCss, formatNumber, formatPropsAttribute, getBlockType, headingPaintCss, hiddenEverywhere, hideOnAttr, imageFrameCss, inWindow, isBlock, isButtonLookValue, isChromeLandmark, isCodeButton, isDeriveReservedKey, isDockUiImportAllowed, isLinkObject, isReservedKey, isRoleKey, isRulePaired, isScriptHref, isSlotChild, isTableValue, isUiRefusal, keyWords, landmarkRegions, linkAnchorOf, linkHref, linkRefOf, linkValueProblem, locatorFor, locatorPath, mayOverwrite, normaliseRichTextFeatures, normalizeLinkValue, normalizeTableValue, normalizeWindow, parseNumberText, parsePropsAttribute, pickFieldStyle, placementBindOf, planSections, readButtonValue, readNumberFormat, readPath, referenceCreateRefusal, regionOf, renderTableHtml, richTextRefusal, rulePartnerOf, safeCssUrl, schemaHashInput, sideFloorApplies, sideSpaceCss, slotBindOf, slotChildValues, slotItems, slotPathString, slotShapeProblems, slugify, spaceTokenCss, splitButtonStyle, tableCellText, tablePathString, tableRefCells, tableSearchText, tableToMarkdown, tableValueProblems, topFieldKeyOf, uiRefusalId, usesHideOn, videoUrlOf, videoValueProblem, visibleBlocks, visibleDeliveredLayout, visibleLayoutStructure, windowState, withButtonLookProps, withExample };
4576
+ 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, 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 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_PROP_TYPES, 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 ComponentFormPropRef, 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, 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 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, type ElementLike, type EmbedCard, type ExpandedBinding, FIELD_SIZE_ZOOM, FIELD_STYLE_KEYS, FOOTER_SECTION_ID, 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, IMAGE_ASPECTS, IMAGE_FRAME_RADIUS, 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 LayoutSectionIcon, type LayoutSectionItem, type LayoutStructureDocument, type LayoutZone, 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 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_HELP, ROLE_KEYS, type RadiusToken, type ReadButtonValue, type Redirect, type ReferenceCreateCapability, type ReferenceCreateRefusal, type ReferenceCreateRefusalCode, type ReferenceCreateResult, type ReferenceCreatedOption, type ReservedLayoutSection, type ResolvedAuthor, 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_JSONLD_TYPES, TABLE_LIMITS, TABLE_RESPONSIVE, TAB_MAX, TAB_MAX_RENDERABLE_NOW, TAG_HEADS, 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 V2Placement, type V2Shape, type V2VariantMeta, V2_KEYS, V2_PLACEMENTS, V2_SHAPES, VIDEO_TRANSCRIPT_MAX, VIDEO_VALUE_KEYS, type ValidateDockUiInput, type ValidateDockUiOutput, type VariantGroupV2, type VariantInputMapping, type VideoBlock, type VideoProps, type VideoValue, type VisibilityWindow, type WeightToken, 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, componentInstanceAddresses, componentPropTargetKey, derivedPairs, dockBudget, dockScreens, dockUiMerkleKey, exampleFor, expandBlockBindings, fieldGroupOf, fieldStyleCssText, fieldStyleToCss, formatNumber, formatPropsAttribute, getBlockType, headingPaintCss, hiddenEverywhere, hideOnAttr, imageFrameCss, inWindow, isBlock, isButtonLookValue, isChromeLandmark, isCodeButton, isDeriveReservedKey, isDockUiImportAllowed, isLinkObject, isReservedKey, isRoleKey, isRulePaired, isScriptHref, isSlotChild, isTableValue, isUiRefusal, keyWords, landmarkRegions, linkAnchorOf, linkHref, linkRefOf, linkValueProblem, locatorFor, locatorPath, mayOverwrite, normaliseRichTextFeatures, normalizeLinkValue, normalizeTableValue, normalizeWindow, parseNumberText, parsePropsAttribute, pickFieldStyle, placementBindOf, planSections, readButtonValue, readNumberFormat, readPath, referenceCreateRefusal, regionOf, renderTableHtml, richTextRefusal, rulePartnerOf, safeCssUrl, schemaHashInput, sideFloorApplies, sideSpaceCss, slotBindOf, slotChildValues, slotItems, slotPathString, slotShapeProblems, slugify, spaceTokenCss, splitButtonStyle, tableCellText, tablePathString, tableRefCells, tableSearchText, tableToMarkdown, tableValueProblems, topFieldKeyOf, uiRefusalId, usesHideOn, videoUrlOf, videoValueProblem, visibleBlocks, visibleDeliveredLayout, visibleLayoutStructure, windowState, withButtonLookProps, withExample };
package/dist/index.js CHANGED
@@ -3162,6 +3162,8 @@ var DOCK_ICON_NAME_SET = new Set(DOCK_ICON_NAMES);
3162
3162
 
3163
3163
  // src/help-catalog.ts
3164
3164
  var HELP_MAX = 160;
3165
+ var HELP_LINE_MAX = 48;
3166
+ var HELP_WRITE_MAX = 80;
3165
3167
  var ROLE_HELP = {
3166
3168
  // A top-level field's role in its section.
3167
3169
  headline: "The page's main heading, one per page.",
@@ -3174,20 +3176,20 @@ var ROLE_HELP = {
3174
3176
  "primary-button": "The main call to action.",
3175
3177
  "secondary-button": "The second call to action.",
3176
3178
  button: "Its text, where it goes and how it looks.",
3177
- "button-label": "Text on the button. Two to four words works best.",
3179
+ "button-label": "Button text. Two to four words work best.",
3178
3180
  link: "Text of this link. Say where it leads.",
3179
3181
  "home-link": "Takes visitors back to the home page.",
3180
3182
  destination: "Pick a page or paste a full URL.",
3181
3183
  image: "An image shown on the page.",
3182
3184
  icon: "Optional icon before the label.",
3183
3185
  logo: "An SVG or transparent PNG works best.",
3184
- "background-image": "Text sits on top of it, so a calm image works best.",
3186
+ "background-image": "Text sits on top, so pick a calm image.",
3185
3187
  "video-poster": "Shown before the video plays.",
3186
3188
  video: "Paste a link or upload an MP4.",
3187
- embed: "Paste the link the other site gives you to share it.",
3189
+ embed: "Paste the share link from the other site.",
3188
3190
  audio: "Paste a link or upload an audio file.",
3189
- body: "Headings, paragraphs, lists and links, edited as one.",
3190
- content: "Headings, paragraphs, lists and links, edited as one.",
3191
+ body: "Headings, paragraphs, lists and links.",
3192
+ content: "Headings, paragraphs, lists and links.",
3191
3193
  copyright: "Shown at the bottom of every page.",
3192
3194
  email: "An email address, such as name@example.com.",
3193
3195
  phone: "A phone number, with its country code.",
@@ -3218,13 +3220,13 @@ var ROLE_HELP = {
3218
3220
  description: "One line under the name.",
3219
3221
  value: "The value shown for this item.",
3220
3222
  // What a band's shape calls an element.
3221
- "plan-name": "Short name of this plan, shown at the top of its card.",
3223
+ "plan-name": "Short name, shown at the top of the card.",
3222
3224
  cents: "Digits after the decimal point.",
3223
3225
  "billing-period": "How often the price is charged.",
3224
3226
  // The parts of a plan's price object.
3225
3227
  amount: "Whole number, no currency symbol.",
3226
3228
  period: "How often the price is charged.",
3227
- badge: "Optional. Two or three words that make this plan stand out.",
3229
+ badge: "Optional. A few words to make it stand out.",
3228
3230
  features: "One feature per row.",
3229
3231
  question: "One question, as a customer would ask it.",
3230
3232
  answer: "Shown when the question is opened.",
@@ -4349,18 +4351,24 @@ function locatorFor(el, region, landmarks = false) {
4349
4351
  ) {
4350
4352
  ancestors.unshift(parent.tagName.toLowerCase());
4351
4353
  }
4352
- const siblings = el.parentElement ? Array.from(el.parentElement.children) : [];
4353
4354
  return {
4354
4355
  region,
4355
4356
  ancestors,
4356
- siblingIndex: Math.max(siblings.indexOf(el), 0),
4357
+ siblingIndex: siblingIndexOf(el),
4357
4358
  tag: el.tagName.toLowerCase()
4358
4359
  };
4359
4360
  }
4361
+ function siblingIndexOf(el) {
4362
+ const linked = el;
4363
+ if (linked.previousElementSibling === void 0) return el.parentElement ? Math.max(Array.from(el.parentElement.children).indexOf(el), 0) : 0;
4364
+ let i = 0;
4365
+ for (let s = linked.previousElementSibling; s; s = s.previousElementSibling ?? null) i += 1;
4366
+ return i;
4367
+ }
4360
4368
  function locatorPath(el, landmarks = false) {
4361
4369
  const path = [];
4362
4370
  for (let parent = el.parentElement; parent && parent.tagName !== "BODY" && !isChromeLandmark(parent, landmarks); parent = parent.parentElement) {
4363
- path.unshift(parent.parentElement ? Math.max(Array.from(parent.parentElement.children).indexOf(parent), 0) : 0);
4371
+ path.unshift(parent.parentElement ? siblingIndexOf(parent) : 0);
4364
4372
  }
4365
4373
  return path;
4366
4374
  }
@@ -4908,7 +4916,9 @@ export {
4908
4916
  FOOTER_SECTION_ID,
4909
4917
  FRAME_REFUSALS,
4910
4918
  HELP_CAPS,
4919
+ HELP_LINE_MAX,
4911
4920
  HELP_MAX,
4921
+ HELP_WRITE_MAX,
4912
4922
  IMAGE_ASPECTS,
4913
4923
  IMAGE_FRAME_RADIUS,
4914
4924
  KEY_FORBIDDEN,