@bettercms-ai/types 1.61.0 → 1.62.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 +80 -22
- package/dist/index.js +15 -99
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -45,10 +45,10 @@ declare const SEGMENTED_MIN = 2;
|
|
|
45
45
|
declare const SEGMENTED_MAX = 8;
|
|
46
46
|
/** Field / prop nesting depth. */
|
|
47
47
|
declare const DEPTH_MAX = 10;
|
|
48
|
-
/** Help and description caps by where the text sits. */
|
|
48
|
+
/** Help and description caps by where the text sits. A field's or a prop's help is ONE dock line: HELP_LINE_MAX. */
|
|
49
49
|
declare const HELP_CAPS: {
|
|
50
|
-
readonly field:
|
|
51
|
-
readonly prop:
|
|
50
|
+
readonly field: 80;
|
|
51
|
+
readonly prop: 80;
|
|
52
52
|
readonly placeholder: 120;
|
|
53
53
|
readonly helpMore: 2000;
|
|
54
54
|
readonly option: 140;
|
|
@@ -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";
|
|
@@ -2105,6 +2118,10 @@ interface LayoutFieldDefinition {
|
|
|
2105
2118
|
overridable?: boolean;
|
|
2106
2119
|
/** Shown where the page editor would have offered the field. Required when overridable is false. */
|
|
2107
2120
|
lockReason?: string;
|
|
2121
|
+
/** The dock's chrome, as on a content-model field (`design-section` writes it). */
|
|
2122
|
+
ui?: Record<string, unknown>;
|
|
2123
|
+
/** The section's `fieldsets` entry this field sits in (`design-section` fieldFieldset). */
|
|
2124
|
+
fieldsetId?: string;
|
|
2108
2125
|
}
|
|
2109
2126
|
/** The canonical public input contract all variants in a group implement. */
|
|
2110
2127
|
type CanonicalInputDefinition = LayoutFieldDefinition;
|
|
@@ -2173,6 +2190,19 @@ interface LayoutSection {
|
|
|
2173
2190
|
* SLOT's: a locale variant shows when its base does, whatever the variant's own row says.
|
|
2174
2191
|
*/
|
|
2175
2192
|
window?: VisibilityWindow;
|
|
2193
|
+
/** The dock's groups, rows and tabs over `fields`, as a content model's `fieldsets` (`design-section`). */
|
|
2194
|
+
fieldsets?: Array<{
|
|
2195
|
+
id: string;
|
|
2196
|
+
name: string;
|
|
2197
|
+
kind?: string;
|
|
2198
|
+
tab?: string;
|
|
2199
|
+
} & Record<string, unknown>>;
|
|
2200
|
+
/** `"none"`: the dock draws no automatic tabs, as update_component `dock.tabs`. */
|
|
2201
|
+
dockTabs?: "none";
|
|
2202
|
+
/** The bettercms://kit entry the Section's dock follows (`design-section` kitEntry). */
|
|
2203
|
+
kitEntry?: string;
|
|
2204
|
+
/** Why no kit entry fits, when none does: the setup's `no-fit` answer (`design-section` kitNoFit). */
|
|
2205
|
+
kitNoFit?: string;
|
|
2176
2206
|
}
|
|
2177
2207
|
interface LayoutStructureDocument {
|
|
2178
2208
|
version: 1;
|
|
@@ -2356,13 +2386,40 @@ type ManagementLayoutCommand = {
|
|
|
2356
2386
|
sectionId: string;
|
|
2357
2387
|
itemId: string;
|
|
2358
2388
|
index: number;
|
|
2359
|
-
} | {
|
|
2389
|
+
} | ({
|
|
2390
|
+
type: "design-section";
|
|
2391
|
+
sectionId: string;
|
|
2392
|
+
} & LayoutSectionDesign) | {
|
|
2360
2393
|
type: "set-bindings";
|
|
2361
2394
|
sectionId: string;
|
|
2362
2395
|
itemId: string;
|
|
2363
2396
|
bindings: LayoutComponentItem["bindings"];
|
|
2364
2397
|
literalValues?: Record<string, unknown>;
|
|
2365
2398
|
};
|
|
2399
|
+
/**
|
|
2400
|
+
* `design-section`: update_content_model's field chrome and update_component's dock, for one Layout
|
|
2401
|
+
* Section, in the same words. A path is a field's id or slug, dot-separated through its parents.
|
|
2402
|
+
*/
|
|
2403
|
+
interface LayoutSectionDesign {
|
|
2404
|
+
fieldType?: Record<string, LayoutFieldType>;
|
|
2405
|
+
/** path → ui merged per key (a null key clears it); null clears the field's ui. */
|
|
2406
|
+
fieldUi?: Record<string, Record<string, unknown> | null>;
|
|
2407
|
+
fieldsets?: LayoutSection["fieldsets"] | null;
|
|
2408
|
+
fieldFieldset?: Record<string, string | null>;
|
|
2409
|
+
dockTabs?: "none" | null;
|
|
2410
|
+
/** The full new order of one parent's children (top level without parentPath). */
|
|
2411
|
+
fieldOrder?: {
|
|
2412
|
+
parentPath?: string;
|
|
2413
|
+
order: string[];
|
|
2414
|
+
};
|
|
2415
|
+
fieldLabel?: Record<string, string>;
|
|
2416
|
+
/** path → one help line; null = none on purpose. */
|
|
2417
|
+
fieldHelpText?: Record<string, string | null>;
|
|
2418
|
+
/** A bettercms://kit entry id; null clears it. */
|
|
2419
|
+
kitEntry?: string | null;
|
|
2420
|
+
/** Why no kit entry fits (12+ characters); null clears it. */
|
|
2421
|
+
kitNoFit?: string | null;
|
|
2422
|
+
}
|
|
2366
2423
|
type ResolvedLayoutNode = {
|
|
2367
2424
|
kind: "page-content";
|
|
2368
2425
|
id: typeof PAGE_CONTENT_ANCHOR_ID;
|
|
@@ -3051,26 +3108,23 @@ declare function slotShapeProblems(value: unknown, opts?: SlotShapeOptions): Slo
|
|
|
3051
3108
|
declare const slotPathString: (path: Array<string | number>) => string;
|
|
3052
3109
|
|
|
3053
3110
|
/**
|
|
3054
|
-
* What the dock says under a field, as data both sides read
|
|
3055
|
-
* (
|
|
3056
|
-
*
|
|
3057
|
-
*
|
|
3058
|
-
*
|
|
3059
|
-
* A field's help, joined with single spaces, at most {@link HELP_MAX} characters (two dock lines):
|
|
3060
|
-
* 1. a role sentence (@see ROLE_HELP), or the site's own words where the markup has them;
|
|
3061
|
-
* 2. the control's how-to (@see CONTROL_HELP), only where the canvas has the gesture it names;
|
|
3062
|
-
* 3. for a column of a list, `e.g. "<value>"` from the nearest OTHER row.
|
|
3111
|
+
* What the dock says under a field, as data both sides read. The platform writes NO help words
|
|
3112
|
+
* (owner, 2026-10-26: "hard-coded cheezein nahi rakhni"): the setup agent writes one line per field
|
|
3113
|
+
* from the section's source and purpose, through MCP, or null where the label says it all. This file
|
|
3114
|
+
* holds only the limit every writer is held to, the canvas gestures as DATA (@see CONTROL_HELP), and
|
|
3115
|
+
* the dashboard's per-row example ({@link exampleFor}), which depends on WHICH row is open.
|
|
3063
3116
|
*
|
|
3064
3117
|
* Pure. No DOM, no I/O.
|
|
3065
3118
|
*/
|
|
3066
|
-
/** Two dock lines at 12px in a ~250px column. */
|
|
3119
|
+
/** Two dock lines at 12px in a ~250px column: a stored line plus its row's example. */
|
|
3067
3120
|
declare const HELP_MAX = 160;
|
|
3068
3121
|
/**
|
|
3069
|
-
*
|
|
3070
|
-
*
|
|
3071
|
-
* Never the label again, never writing advice.
|
|
3122
|
+
* ONE dock line, everywhere: the longest help any writer may store (an agent's `propHelpText`, a page
|
|
3123
|
+
* field's, a kit entry's line). Refused past it, `HELP_TEXT_TOO_LONG`. Aim for about 60.
|
|
3072
3124
|
*/
|
|
3073
|
-
declare const
|
|
3125
|
+
declare const HELP_LINE_MAX = 80;
|
|
3126
|
+
/** @deprecated The same limit: {@link HELP_LINE_MAX}. */
|
|
3127
|
+
declare const HELP_WRITE_MAX = 80;
|
|
3074
3128
|
/**
|
|
3075
3129
|
* The canvas gestures a how-to may name, each one a control the Visual Editor draws:
|
|
3076
3130
|
* rows.reorder — a selected row's grip (dashboard canvas/dnd/RowGrip.tsx);
|
|
@@ -3082,7 +3136,11 @@ declare const ROLE_HELP: Readonly<Record<string, string>>;
|
|
|
3082
3136
|
*/
|
|
3083
3137
|
declare const CANVAS_GESTURE_NAMES: readonly ["rows.reorder", "image.replace", "link.popover", "text.inline"];
|
|
3084
3138
|
type CanvasGesture = (typeof CANVAS_GESTURE_NAMES)[number];
|
|
3085
|
-
/**
|
|
3139
|
+
/**
|
|
3140
|
+
* A control kind the canvas can also edit. A kind with no gesture (an icon, a switch) has no how-to.
|
|
3141
|
+
* The `text` is the dashboard's to show beside the control if it wants: it is NEVER part of a stored
|
|
3142
|
+
* help line (two dock lines was too long, owner 2026-10-25).
|
|
3143
|
+
*/
|
|
3086
3144
|
type ControlKind = "rows" | "image" | "link" | "text";
|
|
3087
3145
|
declare const CONTROL_HELP: Readonly<Record<ControlKind, {
|
|
3088
3146
|
text: string;
|
|
@@ -4552,4 +4610,4 @@ interface RichTextEmbeds {
|
|
|
4552
4610
|
*/
|
|
4553
4611
|
declare const slugify: (s: string) => string;
|
|
4554
4612
|
|
|
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,
|
|
4613
|
+
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 LayoutSectionDesign, 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_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,99 +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
|
|
3166
|
-
|
|
3167
|
-
headline: "The page's main heading, one per page.",
|
|
3168
|
-
heading: "The heading of this section.",
|
|
3169
|
-
subheading: "Shown under the heading.",
|
|
3170
|
-
eyebrow: "Short label shown above the heading.",
|
|
3171
|
-
intro: "Shown under the heading. One or two sentences.",
|
|
3172
|
-
paragraph: "A paragraph of text.",
|
|
3173
|
-
text: "Text shown on the page.",
|
|
3174
|
-
"primary-button": "The main call to action.",
|
|
3175
|
-
"secondary-button": "The second call to action.",
|
|
3176
|
-
button: "Its text, where it goes and how it looks.",
|
|
3177
|
-
"button-label": "Text on the button. Two to four words works best.",
|
|
3178
|
-
link: "Text of this link. Say where it leads.",
|
|
3179
|
-
"home-link": "Takes visitors back to the home page.",
|
|
3180
|
-
destination: "Pick a page or paste a full URL.",
|
|
3181
|
-
image: "An image shown on the page.",
|
|
3182
|
-
icon: "Optional icon before the label.",
|
|
3183
|
-
logo: "An SVG or transparent PNG works best.",
|
|
3184
|
-
"background-image": "Text sits on top of it, so a calm image works best.",
|
|
3185
|
-
"video-poster": "Shown before the video plays.",
|
|
3186
|
-
video: "Paste a link or upload an MP4.",
|
|
3187
|
-
embed: "Paste the link the other site gives you to share it.",
|
|
3188
|
-
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
|
-
copyright: "Shown at the bottom of every page.",
|
|
3192
|
-
email: "An email address, such as name@example.com.",
|
|
3193
|
-
phone: "A phone number, with its country code.",
|
|
3194
|
-
price: "Whole number, no currency symbol.",
|
|
3195
|
-
percentage: "A number with its % sign.",
|
|
3196
|
-
number: "A figure shown on the page.",
|
|
3197
|
-
date: "A date, written as it should appear.",
|
|
3198
|
-
"stat-value": "A figure shown large, such as 70k+.",
|
|
3199
|
-
"stat-label": "What the figure counts.",
|
|
3200
|
-
quote: "Without quote marks.",
|
|
3201
|
-
attribution: "Who said it.",
|
|
3202
|
-
caption: "Shown under the image.",
|
|
3203
|
-
label: "A short label.",
|
|
3204
|
-
summary: "Shown in lists and previews.",
|
|
3205
|
-
address: "The postal address, as it should appear.",
|
|
3206
|
-
code: "Shown exactly as written.",
|
|
3207
|
-
term: "The word or phrase being explained.",
|
|
3208
|
-
definition: "What the term means.",
|
|
3209
|
-
"table-heading": "Heading of a table column.",
|
|
3210
|
-
"table-cell": "One cell of the table.",
|
|
3211
|
-
"list-item": "One item of the list.",
|
|
3212
|
-
list: "One item per row.",
|
|
3213
|
-
links: "One link per row.",
|
|
3214
|
-
band: "All the text of this section, edited as one.",
|
|
3215
|
-
// A column's role in its row.
|
|
3216
|
-
title: "The title of this item.",
|
|
3217
|
-
subtitle: "Shown under the title.",
|
|
3218
|
-
description: "One line under the name.",
|
|
3219
|
-
value: "The value shown for this item.",
|
|
3220
|
-
// What a band's shape calls an element.
|
|
3221
|
-
"plan-name": "Short name of this plan, shown at the top of its card.",
|
|
3222
|
-
cents: "Digits after the decimal point.",
|
|
3223
|
-
"billing-period": "How often the price is charged.",
|
|
3224
|
-
// The parts of a plan's price object.
|
|
3225
|
-
amount: "Whole number, no currency symbol.",
|
|
3226
|
-
period: "How often the price is charged.",
|
|
3227
|
-
badge: "Optional. Two or three words that make this plan stand out.",
|
|
3228
|
-
features: "One feature per row.",
|
|
3229
|
-
question: "One question, as a customer would ask it.",
|
|
3230
|
-
answer: "Shown when the question is opened.",
|
|
3231
|
-
author: "The person's full name.",
|
|
3232
|
-
role: "Their job title and company.",
|
|
3233
|
-
// What an attribute is, by what carries it.
|
|
3234
|
-
tooltip: "Shown when the pointer rests on it.",
|
|
3235
|
-
placeholder: "Shown in the empty input.",
|
|
3236
|
-
"image-description": "Read by screen readers, not shown on the page.",
|
|
3237
|
-
"counter-target": "The number the counter runs up to.",
|
|
3238
|
-
attribute: "A setting of this element, not shown as text.",
|
|
3239
|
-
"navigation-label": "Read by screen readers, not shown on the page.",
|
|
3240
|
-
"link-label": "Read by screen readers, not shown on the page.",
|
|
3241
|
-
"image-label": "Read by screen readers, not shown on the page.",
|
|
3242
|
-
"field-label": "Read by screen readers, not shown on the page.",
|
|
3243
|
-
"header-label": "Read by screen readers, not shown on the page.",
|
|
3244
|
-
"footer-label": "Read by screen readers, not shown on the page.",
|
|
3245
|
-
"aside-label": "Read by screen readers, not shown on the page.",
|
|
3246
|
-
"section-label": "Read by screen readers, not shown on the page.",
|
|
3247
|
-
"heading-label": "Read by screen readers, not shown on the page.",
|
|
3248
|
-
// What a list's rows are.
|
|
3249
|
-
plans: "One plan per card.",
|
|
3250
|
-
questions: "One question and its answer per row.",
|
|
3251
|
-
quotes: "One quote per row, with who said it.",
|
|
3252
|
-
testimonials: "One quote per row, with who said it.",
|
|
3253
|
-
stats: "One figure per row, with what it counts.",
|
|
3254
|
-
logos: "One logo per row.",
|
|
3255
|
-
cards: "One card per row.",
|
|
3256
|
-
items: "One item per row."
|
|
3257
|
-
};
|
|
3165
|
+
var HELP_LINE_MAX = 80;
|
|
3166
|
+
var HELP_WRITE_MAX = HELP_LINE_MAX;
|
|
3258
3167
|
var CANVAS_GESTURE_NAMES = ["rows.reorder", "image.replace", "link.popover", "text.inline"];
|
|
3259
3168
|
var CONTROL_HELP = {
|
|
3260
3169
|
rows: { text: "Drag to reorder. You can also drag rows on the canvas.", gesture: "rows.reorder" },
|
|
@@ -4349,18 +4258,24 @@ function locatorFor(el, region, landmarks = false) {
|
|
|
4349
4258
|
) {
|
|
4350
4259
|
ancestors.unshift(parent.tagName.toLowerCase());
|
|
4351
4260
|
}
|
|
4352
|
-
const siblings = el.parentElement ? Array.from(el.parentElement.children) : [];
|
|
4353
4261
|
return {
|
|
4354
4262
|
region,
|
|
4355
4263
|
ancestors,
|
|
4356
|
-
siblingIndex:
|
|
4264
|
+
siblingIndex: siblingIndexOf(el),
|
|
4357
4265
|
tag: el.tagName.toLowerCase()
|
|
4358
4266
|
};
|
|
4359
4267
|
}
|
|
4268
|
+
function siblingIndexOf(el) {
|
|
4269
|
+
const linked = el;
|
|
4270
|
+
if (linked.previousElementSibling === void 0) return el.parentElement ? Math.max(Array.from(el.parentElement.children).indexOf(el), 0) : 0;
|
|
4271
|
+
let i = 0;
|
|
4272
|
+
for (let s = linked.previousElementSibling; s; s = s.previousElementSibling ?? null) i += 1;
|
|
4273
|
+
return i;
|
|
4274
|
+
}
|
|
4360
4275
|
function locatorPath(el, landmarks = false) {
|
|
4361
4276
|
const path = [];
|
|
4362
4277
|
for (let parent = el.parentElement; parent && parent.tagName !== "BODY" && !isChromeLandmark(parent, landmarks); parent = parent.parentElement) {
|
|
4363
|
-
path.unshift(parent.parentElement ?
|
|
4278
|
+
path.unshift(parent.parentElement ? siblingIndexOf(parent) : 0);
|
|
4364
4279
|
}
|
|
4365
4280
|
return path;
|
|
4366
4281
|
}
|
|
@@ -4559,8 +4474,8 @@ var SEGMENTED_MIN = 2;
|
|
|
4559
4474
|
var SEGMENTED_MAX = 8;
|
|
4560
4475
|
var DEPTH_MAX = 10;
|
|
4561
4476
|
var HELP_CAPS = {
|
|
4562
|
-
field:
|
|
4563
|
-
prop:
|
|
4477
|
+
field: HELP_LINE_MAX,
|
|
4478
|
+
prop: HELP_LINE_MAX,
|
|
4564
4479
|
placeholder: 120,
|
|
4565
4480
|
helpMore: 2e3,
|
|
4566
4481
|
option: OPTION_DESCRIPTION_MAX,
|
|
@@ -4908,7 +4823,9 @@ export {
|
|
|
4908
4823
|
FOOTER_SECTION_ID,
|
|
4909
4824
|
FRAME_REFUSALS,
|
|
4910
4825
|
HELP_CAPS,
|
|
4826
|
+
HELP_LINE_MAX,
|
|
4911
4827
|
HELP_MAX,
|
|
4828
|
+
HELP_WRITE_MAX,
|
|
4912
4829
|
IMAGE_ASPECTS,
|
|
4913
4830
|
IMAGE_FRAME_RADIUS,
|
|
4914
4831
|
KEY_FORBIDDEN,
|
|
@@ -4943,7 +4860,6 @@ export {
|
|
|
4943
4860
|
RICHTEXT_HEADING_FEATURES,
|
|
4944
4861
|
RICHTEXT_MARK_FEATURES,
|
|
4945
4862
|
RICHTEXT_TOGGLE_FEATURES,
|
|
4946
|
-
ROLE_HELP,
|
|
4947
4863
|
ROLE_KEYS,
|
|
4948
4864
|
SCHEMA_HASH_INPUTS,
|
|
4949
4865
|
SECTION_DOCTRINE,
|