@bettercms-ai/types 1.70.0 → 1.71.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 +17 -2
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5564,7 +5564,7 @@ declare const slugify: (s: string) => string;
|
|
|
5564
5564
|
* exact twin of its type, and a name that starts with a sentence of copy. Never library-wide: one component per page shares
|
|
5565
5565
|
* its family's name on purpose.
|
|
5566
5566
|
*
|
|
5567
|
-
*
|
|
5567
|
+
* field-names.ts re-exports these rules: the derive, the namer and the judge read one copy.
|
|
5568
5568
|
*/
|
|
5569
5569
|
/**
|
|
5570
5570
|
* Every role a key may be spelled with, closed: the heads field-names.ts's `fieldParts` and `rowParts`
|
|
@@ -5580,6 +5580,14 @@ declare const ROLE_VOCABULARY: readonly string[];
|
|
|
5580
5580
|
* wrapper utility `shell` keyed every band `shell-`, `shell2-`… and the dock showed "Shell 2".
|
|
5581
5581
|
*/
|
|
5582
5582
|
declare const BOX_WORDS: ReadonlySet<string>;
|
|
5583
|
+
/**
|
|
5584
|
+
* The role words a walk names an element by when it knows nothing else of it: they say what the
|
|
5585
|
+
* element IS in the markup (a span's text, a number, an svg), never what it is FOR. sft21 #8:
|
|
5586
|
+
* `logo` and `stat` too, the kit words the relabel counted ("Logo 1".."Logo 4", "Stat 1 › Number").
|
|
5587
|
+
*/
|
|
5588
|
+
declare const GENERIC_ROLES: readonly string[];
|
|
5589
|
+
/** Scopes that place nothing: one of the page's dialogs (counted or not); a band known only by its position ("Section 2") besides. */
|
|
5590
|
+
declare const GENERIC_SCOPE: readonly string[];
|
|
5583
5591
|
/**
|
|
5584
5592
|
* Is this NAME a build artifact rather than a name a person reads: nothing at all, a key or a path
|
|
5585
5593
|
* (`sec1-p-trusted-by`, `group-founded[i].dt-founded`), digits glued to letters (`Shell2`,
|
|
@@ -5658,6 +5666,13 @@ declare function namingProblem(name: string, kind: NameKind, { copy, lang }?: {
|
|
|
5658
5666
|
* ("Javelin"), @see properNounsOf.
|
|
5659
5667
|
*/
|
|
5660
5668
|
declare function sentenceCase(name: string, keep?: ReadonlySet<string>): string;
|
|
5669
|
+
/**
|
|
5670
|
+
* A key, slug or class word said as a name (`cta` → "CTA", `learn-ai-literacy` → "Learn AI literacy",
|
|
5671
|
+
* `pricing_table` → "Pricing table", `sectionAtTabs` → "Section at tabs"): its words apart, in the dock's sentence case, acronyms in
|
|
5672
|
+
* capitals. THE one word-to-name step: five private Title-case copies said "Cta" beside "Call to
|
|
5673
|
+
* action" and "Learn Ai Literacy".
|
|
5674
|
+
*/
|
|
5675
|
+
declare const humanize: (word: string) => string;
|
|
5661
5676
|
/**
|
|
5662
5677
|
* The capitalised words the `labels` already say as names: one after the first word of a ` › ` part
|
|
5663
5678
|
* in sentence case already (another word after its first is lower case and no small word, which
|
|
@@ -5835,4 +5850,4 @@ declare function iconValueProblem(v: unknown, knownName: (name: string) => boole
|
|
|
5835
5850
|
*/
|
|
5836
5851
|
declare function iconHtml(v: unknown, className?: string): string;
|
|
5837
5852
|
|
|
5838
|
-
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, BLOCKED_REASONS, BLOCK_BINDINGS, BLOCK_FIELD_TYPES, BLOCK_FIELD_TYPES_RENDERABLE_NOW, BODY_SCHEMA_ORIGINS, BOX_WORDS, 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, type JudgeContext, type JudgeRule, KEY_FORBIDDEN, KEY_FORMAT, KEY_RESERVED, KEY_RESERVED_PREFIX, KIT_CATEGORIES, type KitCategory, LANDMARK_SELECTOR, LAYOUT_ROLES, LAYOUT_SECTION_ICONS, LAYOUT_SECTION_ICON_SET, LINK_RELS, LINK_VALUE_TYPES, LIST_ITEMS_CAP, LIST_PREVIEW_SLOTS, LOCAL_FRAMEWORKS, LOCAL_SETUP_LIMITS, LOCAL_SETUP_VERSION, LOCATOR_PATH, type LandmarkChainElement, type LandmarkElement, type LayoutComponentItem, type LayoutDataDocument, type LayoutFieldDefinition, type LayoutFieldItem, type LayoutFieldType, type LayoutRole, 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 LiteralCounts, type LocalFramework, type LocalProof, type LocalProofRow, type LocalSetupDoc, type LocalSetupIssue, type LocalSetupManifest, type LocalSetupPageSections, type LocalSetupParse, type LocalSetupReceipt, type LocalSetupScope, type LocalXray, type LocatorGrammar, MAIN_SELECTOR, MAX_LOCAL_SETUP_BYTES, MAX_SITE_MAP_BYTES, type ManagementLayoutCommand, type MediaAsset, type MediaCaptionTrack, type MediaFieldValue, NAME_PART_SEP, NAVIGATION_SECTION_ID, type NameKind, type NameSibling, type NameVerdict, type NamingProblem, type NamingRule, type NavLink, type NavbarBlock, type NavbarProps, type NumberFieldFormat, type NumberScale, OPEN_MODES, OPEN_MODE_TYPES, OPTION_DESCRIPTION_MAX, type OpenMode, PAGE_CONTENT_ANCHOR_ID, PHRASE_MAX, 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 PhraseOptions, 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, ROLE_VOCABULARY, type RadiusToken, type ReadButtonValue, type ReadabilityContext, type ReadabilityProblem, type ReadabilityRule, type Redirect, type ReferenceCreateCapability, type ReferenceCreateRefusal, type ReferenceCreateRefusalCode, type ReferenceCreateResult, type ReferenceCreatedOption, type RenderEqualRow, 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_KINDS, SECTION_SPACE_TOKENS, SEGMENTED_MAX, SEGMENTED_MIN, SHOW_IF_SCOPES, SIDE_SPACE_MIN_PX, SIDE_SPACE_TOKENS, SITE_MAP_VERSION, SITE_MAP_VERSIONS, SLOT_CHILD_KEYS, SLOT_ITEMS_CAP, SLOT_MAX_ITEMS, SLOT_SETTINGS_MAX, SLOT_SETTINGS_TYPES, SOURCE_RANK, SPACE_BOTTOM_TOKENS, SPACE_STEP_TOKENS, STYLE_TOKEN_GROUPS, STYLE_USED_GROUPS, 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 SiteMap, type SiteMapBlocked, type SiteMapCollection, type SiteMapComponent, type SiteMapField, type SiteMapForm, type SiteMapLayout, type SiteMapLocales, type SiteMapMedia, type SiteMapSection, type SiteMapStyleGuide, type SiteMapStyles, type SiteMapTemplate, type SiteMapVersion, 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, type StyleGuideColor, type StyleGuideFace, type StyleGuideStep, type StyleGuideToken, type StyleTokenGroup, type StyleUsedGroup, 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, caseTwins, compactIcon, componentInstanceAddresses, componentPropTargetKey, defaultSectionAnchors, derivedPairs, dockBudget, dockScreens, dockUiMerkleKey, embedAddress, embedMarkerHtml, embedVisible, evaluateShowIf, exampleFor, expandBlockBindings, fieldGroupOf, fieldStyleCssText, fieldStyleToCss, fileExtension, fileFieldLimits, formUploadAccept, formUploadLimits, formatNumber, formatPropsAttribute, getBlockType, headingClause, headingPaintCss, hiddenEverywhere, hideOnAttr, iconHtml, iconIdentity, iconSrc, iconValueProblem, imageFrameCss, inWindow, isArtifactName, isBlock, isButtonLookValue, isChromeLandmark, isCodeButton, isComponentGateCode, isCountedName, isDeriveReservedKey, isDockUiImportAllowed, isEmbedReason, isIconObjectForm, isLinkObject, isRefusedUploadExtension, isReservedKey, isRoleKey, isRulePaired, isScriptHref, isSlotChild, isTableValue, isUiRefusal, isVariantVisible, judgeName, keyWords, landmarkRegions, linkAnchorOf, linkHref, linkRefOf, linkValueProblem, locatorFor, locatorPath, mayOverwrite, namingProblem, normaliseRichTextFeatures, normalizeIcon, normalizeLinkValue, normalizeTableValue, normalizeWindow, parseEmbedMarkers, parseLocalSetupManifest, parseNumberText, parsePropsAttribute, parseSiteMap, pickFieldStyle, placementBindOf, planSections, properNounsOf, readButtonValue, readNumberFormat, readPath, readabilityProblem, referenceCreateRefusal, regionOf, renderTableHtml, resolveIconOptions, richTextRefusal, rulePartnerOf, safeCssUrl, schemaHashInput, sectionIdentityAttrs, sectionPhrase, sentenceCase, 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 };
|
|
5853
|
+
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, BLOCKED_REASONS, BLOCK_BINDINGS, BLOCK_FIELD_TYPES, BLOCK_FIELD_TYPES_RENDERABLE_NOW, BODY_SCHEMA_ORIGINS, BOX_WORDS, 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, GENERIC_ROLES, GENERIC_SCOPE, 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, type JudgeContext, type JudgeRule, KEY_FORBIDDEN, KEY_FORMAT, KEY_RESERVED, KEY_RESERVED_PREFIX, KIT_CATEGORIES, type KitCategory, LANDMARK_SELECTOR, LAYOUT_ROLES, LAYOUT_SECTION_ICONS, LAYOUT_SECTION_ICON_SET, LINK_RELS, LINK_VALUE_TYPES, LIST_ITEMS_CAP, LIST_PREVIEW_SLOTS, LOCAL_FRAMEWORKS, LOCAL_SETUP_LIMITS, LOCAL_SETUP_VERSION, LOCATOR_PATH, type LandmarkChainElement, type LandmarkElement, type LayoutComponentItem, type LayoutDataDocument, type LayoutFieldDefinition, type LayoutFieldItem, type LayoutFieldType, type LayoutRole, 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 LiteralCounts, type LocalFramework, type LocalProof, type LocalProofRow, type LocalSetupDoc, type LocalSetupIssue, type LocalSetupManifest, type LocalSetupPageSections, type LocalSetupParse, type LocalSetupReceipt, type LocalSetupScope, type LocalXray, type LocatorGrammar, MAIN_SELECTOR, MAX_LOCAL_SETUP_BYTES, MAX_SITE_MAP_BYTES, type ManagementLayoutCommand, type MediaAsset, type MediaCaptionTrack, type MediaFieldValue, NAME_PART_SEP, NAVIGATION_SECTION_ID, type NameKind, type NameSibling, type NameVerdict, type NamingProblem, type NamingRule, type NavLink, type NavbarBlock, type NavbarProps, type NumberFieldFormat, type NumberScale, OPEN_MODES, OPEN_MODE_TYPES, OPTION_DESCRIPTION_MAX, type OpenMode, PAGE_CONTENT_ANCHOR_ID, PHRASE_MAX, 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 PhraseOptions, 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, ROLE_VOCABULARY, type RadiusToken, type ReadButtonValue, type ReadabilityContext, type ReadabilityProblem, type ReadabilityRule, type Redirect, type ReferenceCreateCapability, type ReferenceCreateRefusal, type ReferenceCreateRefusalCode, type ReferenceCreateResult, type ReferenceCreatedOption, type RenderEqualRow, 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_KINDS, SECTION_SPACE_TOKENS, SEGMENTED_MAX, SEGMENTED_MIN, SHOW_IF_SCOPES, SIDE_SPACE_MIN_PX, SIDE_SPACE_TOKENS, SITE_MAP_VERSION, SITE_MAP_VERSIONS, SLOT_CHILD_KEYS, SLOT_ITEMS_CAP, SLOT_MAX_ITEMS, SLOT_SETTINGS_MAX, SLOT_SETTINGS_TYPES, SOURCE_RANK, SPACE_BOTTOM_TOKENS, SPACE_STEP_TOKENS, STYLE_TOKEN_GROUPS, STYLE_USED_GROUPS, 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 SiteMap, type SiteMapBlocked, type SiteMapCollection, type SiteMapComponent, type SiteMapField, type SiteMapForm, type SiteMapLayout, type SiteMapLocales, type SiteMapMedia, type SiteMapSection, type SiteMapStyleGuide, type SiteMapStyles, type SiteMapTemplate, type SiteMapVersion, 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, type StyleGuideColor, type StyleGuideFace, type StyleGuideStep, type StyleGuideToken, type StyleTokenGroup, type StyleUsedGroup, 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, caseTwins, compactIcon, componentInstanceAddresses, componentPropTargetKey, defaultSectionAnchors, derivedPairs, dockBudget, dockScreens, dockUiMerkleKey, embedAddress, embedMarkerHtml, embedVisible, evaluateShowIf, exampleFor, expandBlockBindings, fieldGroupOf, fieldStyleCssText, fieldStyleToCss, fileExtension, fileFieldLimits, formUploadAccept, formUploadLimits, formatNumber, formatPropsAttribute, getBlockType, headingClause, headingPaintCss, hiddenEverywhere, hideOnAttr, humanize, iconHtml, iconIdentity, iconSrc, iconValueProblem, imageFrameCss, inWindow, isArtifactName, isBlock, isButtonLookValue, isChromeLandmark, isCodeButton, isComponentGateCode, isCountedName, isDeriveReservedKey, isDockUiImportAllowed, isEmbedReason, isIconObjectForm, isLinkObject, isRefusedUploadExtension, isReservedKey, isRoleKey, isRulePaired, isScriptHref, isSlotChild, isTableValue, isUiRefusal, isVariantVisible, judgeName, keyWords, landmarkRegions, linkAnchorOf, linkHref, linkRefOf, linkValueProblem, locatorFor, locatorPath, mayOverwrite, namingProblem, normaliseRichTextFeatures, normalizeIcon, normalizeLinkValue, normalizeTableValue, normalizeWindow, parseEmbedMarkers, parseLocalSetupManifest, parseNumberText, parsePropsAttribute, parseSiteMap, pickFieldStyle, placementBindOf, planSections, properNounsOf, readButtonValue, readNumberFormat, readPath, readabilityProblem, referenceCreateRefusal, regionOf, renderTableHtml, resolveIconOptions, richTextRefusal, rulePartnerOf, safeCssUrl, schemaHashInput, sectionIdentityAttrs, sectionPhrase, sentenceCase, 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
|
@@ -5725,10 +5725,10 @@ var BOX_WORDS = /* @__PURE__ */ new Set([
|
|
|
5725
5725
|
"region"
|
|
5726
5726
|
]);
|
|
5727
5727
|
var PLACEHOLDER_WORDS = /* @__PURE__ */ new Set(["sec", "span"]);
|
|
5728
|
-
var GENERIC_ROLES = "text
|
|
5729
|
-
var GENERIC_SCOPE = "
|
|
5728
|
+
var GENERIC_ROLES = ["text", "paragraph", "number", "link", "links", "icon", "image", "item", "items", "list", "attribute", "span", "element", "logo", "logos", "stat", "stats"];
|
|
5729
|
+
var GENERIC_SCOPE = ["dialog", "modal", "popup", "overlay", "drawer"];
|
|
5730
5730
|
var GENERIC_ROLE_NAME = new RegExp(
|
|
5731
|
-
`^(?:(?<scope
|
|
5731
|
+
`^(?:(?<scope>(?:${GENERIC_SCOPE.join("|")})(?:\\s+\\d{1,3})?|section\\s+\\d{1,3})\\s+)?(?:${GENERIC_ROLES.join("|")})(?<n>\\s+\\d{1,3})?(?:\\s+(?:url|label))?$`,
|
|
5732
5732
|
"i"
|
|
5733
5733
|
);
|
|
5734
5734
|
var WORD_ITEMS = new RegExp("^\\p{L}+\\s+items?$", "iu");
|
|
@@ -5935,6 +5935,7 @@ function sentenceCase(name2, keep = properNounsOf([name2])) {
|
|
|
5935
5935
|
(part) => part.trim().split(/\s+/).map((w, i) => acronymOf(w) ?? (i === 0 ? w.charAt(0).toUpperCase() + w.slice(1) : new RegExp("^\\p{Lu}\\p{Ll}+$", "u").test(w) && !keep.has(w) ? w.toLowerCase() : w)).join(" ")
|
|
5936
5936
|
).join(NAME_PART_SEP);
|
|
5937
5937
|
}
|
|
5938
|
+
var humanize = (word) => sentenceCase(word.replace(new RegExp("(\\p{Ll}|\\d)(\\p{Lu})", "gu"), "$1 $2").replace(/[-_.\s]+/g, " ").trim().toLowerCase(), /* @__PURE__ */ new Set());
|
|
5938
5939
|
var SMALL_WORDS = /* @__PURE__ */ new Set(["a", "an", "and", "at", "by", "for", "from", "in", "of", "on", "the", "to", "with"]);
|
|
5939
5940
|
function properNounsOf(labels, { across = false } = {}) {
|
|
5940
5941
|
const firsts = /* @__PURE__ */ new Map();
|
|
@@ -6233,6 +6234,8 @@ export {
|
|
|
6233
6234
|
FORM_UPLOAD_PRESETS,
|
|
6234
6235
|
FORM_UPLOAD_REFUSED_EXTENSIONS,
|
|
6235
6236
|
FRAME_REFUSALS,
|
|
6237
|
+
GENERIC_ROLES,
|
|
6238
|
+
GENERIC_SCOPE,
|
|
6236
6239
|
HELP_CAPS,
|
|
6237
6240
|
HELP_LINE_MAX,
|
|
6238
6241
|
HELP_MAX,
|
|
@@ -6376,6 +6379,7 @@ export {
|
|
|
6376
6379
|
headingPaintCss,
|
|
6377
6380
|
hiddenEverywhere,
|
|
6378
6381
|
hideOnAttr,
|
|
6382
|
+
humanize,
|
|
6379
6383
|
iconHtml,
|
|
6380
6384
|
iconIdentity,
|
|
6381
6385
|
iconSrc,
|