@bettercms-ai/types 1.61.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 +30 -9
- package/dist/index.js +20 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1637,10 +1637,23 @@ interface ComponentProps {
|
|
|
1637
1637
|
bindPaths?: Record<string, string>;
|
|
1638
1638
|
/**
|
|
1639
1639
|
* Phase B: the props this INSTANCE does not own — their copy stays in the page's own field, which
|
|
1640
|
-
* 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" }`.
|
|
1641
1641
|
* The dock hides these props: an override written there renders nowhere.
|
|
1642
1642
|
*/
|
|
1643
|
-
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;
|
|
1644
1657
|
}
|
|
1645
1658
|
interface ComponentBlock {
|
|
1646
1659
|
type: "component";
|
|
@@ -3056,15 +3069,19 @@ declare const slotPathString: (path: Array<string | number>) => string;
|
|
|
3056
3069
|
* stored `helpText`; the dashboard adds a list column's example per row ({@link exampleFor}),
|
|
3057
3070
|
* because the example depends on WHICH row is open and a stored line has one value for all rows.
|
|
3058
3071
|
*
|
|
3059
|
-
* A field's help
|
|
3060
|
-
*
|
|
3061
|
-
*
|
|
3062
|
-
*
|
|
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.
|
|
3063
3076
|
*
|
|
3064
3077
|
* Pure. No DOM, no I/O.
|
|
3065
3078
|
*/
|
|
3066
|
-
/** 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. */
|
|
3067
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;
|
|
3068
3085
|
/**
|
|
3069
3086
|
* What one role holds, said once: the role words a structural key ends in (@see ROLE_KEYS in
|
|
3070
3087
|
* sections.ts, and the server's ROLE_VOCABULARY), plus the words a band's shape and a list give.
|
|
@@ -3082,7 +3099,11 @@ declare const ROLE_HELP: Readonly<Record<string, string>>;
|
|
|
3082
3099
|
*/
|
|
3083
3100
|
declare const CANVAS_GESTURE_NAMES: readonly ["rows.reorder", "image.replace", "link.popover", "text.inline"];
|
|
3084
3101
|
type CanvasGesture = (typeof CANVAS_GESTURE_NAMES)[number];
|
|
3085
|
-
/**
|
|
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
|
+
*/
|
|
3086
3107
|
type ControlKind = "rows" | "image" | "link" | "text";
|
|
3087
3108
|
declare const CONTROL_HELP: Readonly<Record<ControlKind, {
|
|
3088
3109
|
text: string;
|
|
@@ -4552,4 +4573,4 @@ interface RichTextEmbeds {
|
|
|
4552
4573
|
*/
|
|
4553
4574
|
declare const slugify: (s: string) => string;
|
|
4554
4575
|
|
|
4555
|
-
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": "
|
|
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
|
|
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
|
|
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
|
|
3190
|
-
content: "Headings, paragraphs, lists and links
|
|
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
|
|
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.
|
|
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:
|
|
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 ?
|
|
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,
|