@bettercms-ai/types 1.57.0 → 1.59.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 +397 -169
- package/dist/index.js +87 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -16,16 +16,233 @@ interface Workspace {
|
|
|
16
16
|
/**
|
|
17
17
|
* Generated by scripts/gen-dock-icon-names.mjs from the vendored icon tarball
|
|
18
18
|
* (sha256 0691620e50bdf453c2fed06224d9dc52d521574ab254a149eba47664b92fb889)
|
|
19
|
-
* and the vendored line-icon subset (sha256
|
|
19
|
+
* and the vendored line-icon subset (sha256 6c5d1e54865d87a2b7a1109b5ba69e86b1040bb6b59267eb7b0349401642f169).
|
|
20
20
|
* Do not edit by hand: rerun the script (`--check` fails CI on drift).
|
|
21
21
|
*
|
|
22
22
|
* The closed vocabulary for `ui.icon` (field ui, fieldsets, prop ui.group). `as const` because a
|
|
23
23
|
* z.enum needs the literal tuple; a `readonly string[]` would type every string as valid.
|
|
24
24
|
*/
|
|
25
|
-
declare const DOCK_ICON_NAMES: readonly ["abc", "access-denied", "activity", "add", "add-circle", "add-comment", "add-document", "add-user", "address-book", "adjustments", "adjustments-horizontal", "alarm", "alert-triangle", "align-left", "api", "app-window", "apple", "apps", "archive", "arrow-back-up", "arrow-down", "arrow-guide", "arrow-left", "arrow-right", "arrow-top-right", "arrow-up", "arrows-diagonal", "arrows-down", "arrows-exchange", "arrows-horizontal", "arrows-left-right", "arrows-shuffle", "arrows-sort", "article", "aspect-ratio", "asterisk", "award", "axis-x", "backpack", "badge", "badge-cc", "badges", "bar-chart", "basket", "bell", "bill", "binary-document", "block-content", "block-element", "blockquote", "bold", "bolt", "book", "book-2", "bookmark", "bookmark-filled", "books", "bottle", "box", "brand-dribbble", "brand-facebook", "brand-instagram", "brand-linkedin", "brand-pinterest", "brand-tiktok", "brand-x", "brand-youtube", "briefcase", "broadcast", "browser", "bug", "building", "building-skyscraper", "building-store", "bulb-filled", "bulb-outline", "calculator", "calendar", "calendar-dollar", "calendar-event", "calendar-exclamation", "calendar-off", "calendar-plus", "calendar-star", "calendar-time", "camera", "campfire", "carousel-horizontal", "case", "cash", "category", "category-2", "chart-area", "chart-arrows", "chart-bar", "chart-bar-popular", "chart-donut", "chart-dots", "chart-line", "chart-upward", "check", "checkbox", "checklist", "checkmark", "checkmark-circle", "chef-hat", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevrons-right", "circle", "circle-check", "circle-dot", "circle-number-1", "circle-plus", "click", "clipboard", "clipboard-image", "clipboard-text", "clock", "clock-check", "clock-hour-4", "close", "close-circle", "code", "code-block", "cog", "collapse", "color-wheel", "columns", "columns-2", "columns-3", "comment", "component", "compose", "compose-sparkles", "confetti", "controls", "cookie", "copy", "credit-card", "crop", "cube", "currency-dollar", "dashboard", "database", "database-search", "desktop", "device-desktop", "device-mobile", "device-tablet", "devices", "diamond", "discount", "document", "document-pdf", "document-remove", "document-sheet", "document-text", "document-video", "document-word", "document-zip", "documents", "door-exit", "dot", "double-chevron-down", "double-chevron-left", "double-chevron-right", "double-chevron-up", "double-quote", "download", "drag-handle", "drop", "droplet", "droplet-half", "earth-americas", "earth-globe", "edit", "egg", "ellipsis-horizontal", "ellipsis-vertical", "empty", "enter", "enter-right", "envelope", "equal", "error-filled", "error-outline", "error-screen", "expand", "eye-closed", "eye-off", "eye-open", "face-happy", "face-indifferent", "face-sad", "feather", "feedback", "file", "file-certificate", "file-code", "file-download", "file-text", "filter", "flag", "flame", "flask", "focus-2", "folder", "folders", "forms", "frame", "generate", "gift", "git-branch", "github", "grid-dots", "groq", "hammer", "hand-finger", "hanger", "hash", "headphones", "headset", "heart", "heart-filled", "heart-handshake", "help-circle", "highlight", "history", "home", "hourglass", "ice-cream", "id-badge", "id-badge-2", "image", "image-remove", "images", "inbox", "infinity", "info-circle", "info-filled", "info-outline", "info-square-rounded", "inline", "inline-element", "input-search", "insert-above", "insert-below", "italic", "joystick", "json", "language", "launch", "layout", "layout-align-center", "layout-board", "layout-board-split", "layout-bottombar", "layout-bottombar-expand", "layout-cards", "layout-columns", "layout-dashboard", "layout-grid", "layout-list", "layout-navbar", "layout-rows", "layout-sidebar", "layout-sidebar-right", "leaf", "leave", "lemon", "library-photo", "lifebuoy", "link", "link-removed", "linkedin", "list", "list-check", "list-details", "list-numbers", "list-tree", "lock", "logo-js", "logo-ts", "mail", "map-2", "map-pin", "map-pins", "marker", "marker-removed", "master-detail", "math-function", "meat", "menu", "message", "message-2", "message-check", "message-circle", "message-circle-2", "message-plus", "message-star", "microphone", "microphone-slash", "mobile-device", "mood-empty", "moon", "movie", "news", "notes", "number", "ok-hand", "olist", "overage", "package", "packages", "palette", "panel-left", "panel-right", "paperclip", "pause", "pencil", "phone", "photo", "photo-scan", "photo-search", "pig-money", "pin", "pin-filled", "pin-removed", "play", "player-play", "player-track-next", "playlist-add", "plug", "plug-connected", "plus-minus", "point", "presentation", "printer", "progress-50", "progress-75", "projects", "publish", "qrcode", "quote", "read-only", "receipt", "recycle", "redo", "refresh", "remove", "remove-circle", "repeat", "reset", "restore", "retrieve", "retry", "revert", "robot", "rocket", "rosette", "route", "ruler", "ruler-measure", "salad", "scale", "schema", "school", "search", "section", "select", "send", "server", "settings", "share", "shield-check", "shield-lock", "shopping-bag", "shopping-cart", "shopping-cart-plus", "signature", "sitemap", "slideshow", "sort", "sort-descending", "spacing-vertical", "sparkle", "sparkles", "speakerphone", "spinner", "split-horizontal", "split-vertical", "square", "stack", "stack-2", "stack-compact", "stairs", "stairs-up", "star", "star-filled", "stars", "stop", "strikethrough", "string", "subtask", "sun", "superscript", "sync", "table", "table-options", "tablet-device", "tag", "tags", "target", "task", "template", "tent", "terminal", "terminal-2", "text", "th-large", "th-list", "thumb-up", "thumbs-down", "thumbs-up", "ticket", "tiers", "timeline", "toggle-arrow-right", "toggle-right", "token", "tool", "tools-kitchen-2", "transfer", "translate", "trash", "trend-upward", "triangle-outline", "trolley", "truck", "truck-delivery", "truncate", "twitter", "typography", "ulist", "unarchive", "underline", "undo", "unknown", "unlink", "unlock", "unpublish", "upload", "user", "user-circle", "user-plus", "user-search", "user-star", "users", "users-group", "versions", "video", "vocabulary", "vs", "warning-filled", "warning-outline", "weight", "world", "wrench", "zoom-question"];
|
|
25
|
+
declare const DOCK_ICON_NAMES: readonly ["abc", "access-denied", "activity", "add", "add-circle", "add-comment", "add-document", "add-user", "address-book", "adjustments", "adjustments-horizontal", "alarm", "alert-triangle", "align-left", "api", "app-window", "apple", "apps", "archive", "arrow-back-up", "arrow-down", "arrow-guide", "arrow-left", "arrow-right", "arrow-top-right", "arrow-up", "arrows-diagonal", "arrows-down", "arrows-exchange", "arrows-horizontal", "arrows-left-right", "arrows-shuffle", "arrows-sort", "article", "aspect-ratio", "asterisk", "award", "axis-x", "backpack", "badge", "badge-cc", "badges", "bar-chart", "basket", "bell", "bill", "binary-document", "block-content", "block-element", "blockquote", "bold", "bolt", "book", "book-2", "bookmark", "bookmark-filled", "books", "bottle", "box", "brand-dribbble", "brand-facebook", "brand-instagram", "brand-linkedin", "brand-pinterest", "brand-tiktok", "brand-x", "brand-youtube", "briefcase", "broadcast", "browser", "bug", "building", "building-skyscraper", "building-store", "bulb-filled", "bulb-outline", "calculator", "calendar", "calendar-dollar", "calendar-event", "calendar-exclamation", "calendar-off", "calendar-plus", "calendar-star", "calendar-time", "camera", "campfire", "carousel-horizontal", "case", "cash", "category", "category-2", "chart-area", "chart-arrows", "chart-bar", "chart-bar-popular", "chart-donut", "chart-dots", "chart-line", "chart-upward", "check", "checkbox", "checklist", "checkmark", "checkmark-circle", "chef-hat", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevrons-right", "circle", "circle-check", "circle-dot", "circle-number-1", "circle-plus", "click", "clipboard", "clipboard-image", "clipboard-text", "clock", "clock-check", "clock-hour-4", "close", "close-circle", "code", "code-block", "cog", "collapse", "color-wheel", "columns", "columns-2", "columns-3", "comment", "component", "compose", "compose-sparkles", "confetti", "controls", "cookie", "copy", "credit-card", "crop", "cube", "currency-dollar", "dashboard", "database", "database-search", "desktop", "device-desktop", "device-mobile", "device-tablet", "devices", "diamond", "discount", "document", "document-pdf", "document-remove", "document-sheet", "document-text", "document-video", "document-word", "document-zip", "documents", "door-exit", "dot", "double-chevron-down", "double-chevron-left", "double-chevron-right", "double-chevron-up", "double-quote", "download", "drag-handle", "drop", "droplet", "droplet-half", "earth-americas", "earth-globe", "edit", "egg", "ellipsis-horizontal", "ellipsis-vertical", "empty", "enter", "enter-right", "envelope", "equal", "error-filled", "error-outline", "error-screen", "expand", "eye-closed", "eye-off", "eye-open", "face-happy", "face-indifferent", "face-sad", "feather", "feedback", "file", "file-certificate", "file-code", "file-download", "file-settings", "file-text", "filter", "flag", "flame", "flask", "focus-2", "folder", "folders", "forms", "frame", "generate", "gift", "git-branch", "github", "grid-dots", "groq", "hammer", "hand-finger", "hanger", "hash", "headphones", "headset", "heart", "heart-filled", "heart-handshake", "help-circle", "highlight", "history", "home", "hourglass", "ice-cream", "id-badge", "id-badge-2", "image", "image-remove", "images", "inbox", "infinity", "info-circle", "info-filled", "info-outline", "info-square-rounded", "inline", "inline-element", "input-search", "insert-above", "insert-below", "italic", "joystick", "json", "language", "launch", "layout", "layout-align-center", "layout-board", "layout-board-split", "layout-bottombar", "layout-bottombar-expand", "layout-cards", "layout-columns", "layout-dashboard", "layout-grid", "layout-list", "layout-navbar", "layout-rows", "layout-sidebar", "layout-sidebar-right", "leaf", "leave", "lemon", "library-photo", "lifebuoy", "link", "link-removed", "linkedin", "list", "list-check", "list-details", "list-numbers", "list-tree", "lock", "logo-js", "logo-ts", "mail", "map-2", "map-pin", "map-pins", "marker", "marker-removed", "master-detail", "math-function", "meat", "menu", "message", "message-2", "message-check", "message-circle", "message-circle-2", "message-plus", "message-star", "microphone", "microphone-slash", "mobile-device", "mood-empty", "moon", "movie", "news", "notes", "number", "ok-hand", "olist", "overage", "package", "packages", "palette", "panel-left", "panel-right", "paperclip", "pause", "pencil", "phone", "photo", "photo-scan", "photo-search", "pig-money", "pin", "pin-filled", "pin-removed", "play", "player-play", "player-track-next", "playlist-add", "plug", "plug-connected", "plus-minus", "point", "presentation", "printer", "progress-50", "progress-75", "projects", "publish", "qrcode", "quote", "read-only", "receipt", "recycle", "redo", "refresh", "remove", "remove-circle", "repeat", "reset", "restore", "retrieve", "retry", "revert", "robot", "rocket", "rosette", "route", "ruler", "ruler-measure", "salad", "scale", "schema", "school", "search", "section", "select", "send", "server", "settings", "share", "shield-check", "shield-lock", "shopping-bag", "shopping-cart", "shopping-cart-plus", "signature", "sitemap", "slideshow", "sort", "sort-descending", "spacing-vertical", "sparkle", "sparkles", "speakerphone", "spinner", "split-horizontal", "split-vertical", "square", "stack", "stack-2", "stack-compact", "stairs", "stairs-up", "star", "star-filled", "stars", "stop", "strikethrough", "string", "subtask", "sun", "superscript", "sync", "table", "table-options", "tablet-device", "tag", "tags", "target", "task", "template", "tent", "terminal", "terminal-2", "text", "th-large", "th-list", "thumb-up", "thumbs-down", "thumbs-up", "ticket", "tiers", "timeline", "toggle-arrow-right", "toggle-right", "token", "tool", "tools-kitchen-2", "transfer", "translate", "trash", "trend-upward", "triangle-outline", "trolley", "truck", "truck-delivery", "truncate", "twitter", "typography", "ulist", "unarchive", "underline", "undo", "unknown", "unlink", "unlock", "unpublish", "upload", "user", "user-circle", "user-plus", "user-search", "user-star", "users", "users-group", "versions", "video", "vocabulary", "vs", "warning-filled", "warning-outline", "weight", "world", "wrench", "zoom-question"];
|
|
26
26
|
type DockIconName = (typeof DOCK_ICON_NAMES)[number];
|
|
27
27
|
declare const DOCK_ICON_NAME_SET: ReadonlySet<string>;
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* The V2 kit's storage contract, shared by V2 authoring (the dashboard kit) and prod validation.
|
|
31
|
+
* One home per constant: a bound the two sides kept separately is how a value got refused on one
|
|
32
|
+
* side and stored on the other (kit-facet-table.v3.md, "Carriers" and "Corpus floor").
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/** Tabs on one screen, the V2 target: a model's `fieldsets kind:"tab"` and a component's prop tabs alike. */
|
|
36
|
+
declare const TAB_MAX = 8;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Use TAB_MAX. There is no render cap: like V2's GroupTabs, the dock folds the tabs
|
|
39
|
+
* that do not fit into "More" by width, so a model screen shows every tab TAB_MAX allows
|
|
40
|
+
* (G-REMAIN B4). Kept equal to TAB_MAX until its readers move off it.
|
|
41
|
+
*/
|
|
42
|
+
declare const TAB_MAX_RENDERABLE_NOW = 8;
|
|
43
|
+
/** `ui.control:"segmented"`: the option count it stores. V2's 3 is a render-fit rule, not this. */
|
|
44
|
+
declare const SEGMENTED_MIN = 2;
|
|
45
|
+
declare const SEGMENTED_MAX = 8;
|
|
46
|
+
/** Field / prop nesting depth. */
|
|
47
|
+
declare const DEPTH_MAX = 10;
|
|
48
|
+
/** Help and description caps by where the text sits. */
|
|
49
|
+
declare const HELP_CAPS: {
|
|
50
|
+
readonly field: 500;
|
|
51
|
+
readonly prop: 200;
|
|
52
|
+
readonly placeholder: 120;
|
|
53
|
+
readonly helpMore: 2000;
|
|
54
|
+
readonly option: 140;
|
|
55
|
+
readonly fieldset: 500;
|
|
56
|
+
readonly propGroup: 200;
|
|
57
|
+
};
|
|
58
|
+
/** `config.settings` on a slot prop or a slot / modular field: at most this many setting defs. */
|
|
59
|
+
declare const SLOT_SETTINGS_MAX = 12;
|
|
60
|
+
/**
|
|
61
|
+
* The types a slot setting may be: one value on one block. A select's options are written inline
|
|
62
|
+
* on the setting; no reference type, since a setting never points at another record.
|
|
63
|
+
*/
|
|
64
|
+
declare const SLOT_SETTINGS_TYPES: readonly ["text", "slug", "select", "multiselect", "number", "rating", "date", "datetime", "boolean", "color", "icon", "link"];
|
|
65
|
+
/**
|
|
66
|
+
* The field types a `kind:'block'` model may hold: the TARGET set. The kit corpus uses every one
|
|
67
|
+
* of them, so this is the bound; anything outside it is refused as out of domain.
|
|
68
|
+
*/
|
|
69
|
+
declare const BLOCK_FIELD_TYPES: readonly ["text", "longtext", "richtext", "image", "link", "slug", "email", "phone", "color", "select", "number", "rating", "date", "datetime", "boolean", "video", "object", "array", "reference", "file", "tags"];
|
|
70
|
+
/**
|
|
71
|
+
* The staged part of BLOCK_FIELD_TYPES a block primitive renders TODAY
|
|
72
|
+
* (src/lib/sections/block-model-mapping.ts FIELD_PRIMITIVE). A type in the target set but not
|
|
73
|
+
* here is refused with `schema.block_field_unrenderable` only until its renderer ships, and then
|
|
74
|
+
* joins this list. When this equals BLOCK_FIELD_TYPES (G7), the staging is over.
|
|
75
|
+
*/
|
|
76
|
+
declare const BLOCK_FIELD_TYPES_RENDERABLE_NOW: readonly ["text", "longtext", "richtext", "image", "link", "slug", "email", "phone", "color", "select", "number", "rating", "date", "datetime", "boolean", "video", "file", "tags", "reference"];
|
|
77
|
+
/** `openMode` values (content-model.ts OpenMode). */
|
|
78
|
+
declare const OPEN_MODES: readonly ["inline", "drill", "popover", "dialog"];
|
|
79
|
+
/**
|
|
80
|
+
* The types `openMode` may sit on, in either lane: what opens (object, group), what holds rows
|
|
81
|
+
* (array, repeater, table) and `code`, whose editor may open in a dialog (facet row 21).
|
|
82
|
+
*/
|
|
83
|
+
declare const OPEN_MODE_TYPES: readonly ["object", "array", "group", "repeater", "table", "code"];
|
|
84
|
+
/** `showIf` rule `scope` (ShowIfRule.scope); absent is a sibling. */
|
|
85
|
+
declare const SHOW_IF_SCOPES: readonly ["parent", "root"];
|
|
86
|
+
/** A list row's preview slots: `components.preview` and the widened `content_models.list_preview`. */
|
|
87
|
+
declare const LIST_PREVIEW_SLOTS: readonly ["title", "subtitle", "media", "fallback", "icon"];
|
|
88
|
+
declare const V2_SHAPES: readonly ["block", "page", "entry", "global", "object"];
|
|
89
|
+
/** What a definition IS in V2. On a model, `block` ⇔ `content_models.kind = 'block'`. */
|
|
90
|
+
type V2Shape = (typeof V2_SHAPES)[number];
|
|
91
|
+
declare const V2_PLACEMENTS: readonly ["inline", "section", "page"];
|
|
92
|
+
/** Where a block may be placed. */
|
|
93
|
+
type V2Placement = (typeof V2_PLACEMENTS)[number];
|
|
94
|
+
/** The kit catalogue's categories, verbatim (dashboard src/kit/library/catalog.ts CATEGORY_ORDER). */
|
|
95
|
+
declare const KIT_CATEGORIES: readonly ["Navigation & chrome", "Heroes", "Features & storytelling", "Social proof", "Media & galleries", "Commerce", "Pricing & plans", "Conversion & forms", "Listings & feeds", "Long-form & docs", "Company & people", "Events & places", "Data & interactive", "Advanced patterns"];
|
|
96
|
+
type KitCategory = (typeof KIT_CATEGORIES)[number];
|
|
97
|
+
/** The catalogue's order, by the name the facet table bounds `category` with. */
|
|
98
|
+
declare const CATEGORY_ORDER: readonly ["Navigation & chrome", "Heroes", "Features & storytelling", "Social proof", "Media & galleries", "Commerce", "Pricing & plans", "Conversion & forms", "Listings & feeds", "Long-form & docs", "Company & people", "Events & places", "Data & interactive", "Advanced patterns"];
|
|
99
|
+
/** `components.category` is varchar(32) (0503): every category id fits. */
|
|
100
|
+
declare const CATEGORY_ID_MAX = 32;
|
|
101
|
+
/** A variant's chrome. Its slug, name and members are native; only these two are not. */
|
|
102
|
+
interface V2VariantMeta {
|
|
103
|
+
icon?: DockIconName;
|
|
104
|
+
description?: string;
|
|
105
|
+
}
|
|
106
|
+
/** `components.v2` / `published_v2`. Category and icon are native columns. */
|
|
107
|
+
interface ComponentV2 {
|
|
108
|
+
shape?: V2Shape;
|
|
109
|
+
placement?: V2Placement;
|
|
110
|
+
}
|
|
111
|
+
/** `content_models.v2`. Icon and preview are native (`icon`, `list_preview`). */
|
|
112
|
+
interface ContentModelV2 {
|
|
113
|
+
shape?: V2Shape;
|
|
114
|
+
placement?: V2Placement;
|
|
115
|
+
category?: KitCategory;
|
|
116
|
+
/** By variant slug; the slugs themselves are the options of the model's `_variant` select. */
|
|
117
|
+
variants?: Record<string, V2VariantMeta>;
|
|
118
|
+
}
|
|
119
|
+
/** `component_variant_groups.v2` / `published_v2`. ORDER is the array index, like field order. */
|
|
120
|
+
interface VariantGroupV2 {
|
|
121
|
+
variants?: Array<V2VariantMeta & {
|
|
122
|
+
componentId: string;
|
|
123
|
+
}>;
|
|
124
|
+
}
|
|
125
|
+
/** The keys each table's block may hold; validators build strict schemas from these. */
|
|
126
|
+
declare const V2_KEYS: {
|
|
127
|
+
readonly components: readonly ["shape", "placement"];
|
|
128
|
+
readonly content_models: readonly ["shape", "placement", "category", "variants"];
|
|
129
|
+
readonly component_variant_groups: readonly ["variants"];
|
|
130
|
+
};
|
|
131
|
+
/** Who last wrote a facet, weakest first: the generator, the site's own code, an agent, a person. */
|
|
132
|
+
declare const SOURCE_RANK: {
|
|
133
|
+
readonly auto: 0;
|
|
134
|
+
readonly site: 1;
|
|
135
|
+
readonly agent: 2;
|
|
136
|
+
readonly human: 3;
|
|
137
|
+
};
|
|
138
|
+
type SchemaSource = keyof typeof SOURCE_RANK;
|
|
139
|
+
/** The facets a per-def `sources` map tracks. */
|
|
140
|
+
type SourcedFacet = "ui" | "input" | "ai";
|
|
141
|
+
/** A field's or prop's `sources`: server-owned, stamped on write, never taken from a client. */
|
|
142
|
+
type DefSources = Partial<Record<SourcedFacet, SchemaSource>>;
|
|
143
|
+
/**
|
|
144
|
+
* May `incoming` overwrite a facet `stored` last wrote? Never a weaker source over a stronger
|
|
145
|
+
* one, so a re-derive cannot undo a person's edit. Equal rank may: an agent revises its own work.
|
|
146
|
+
* An absent source is `auto`.
|
|
147
|
+
*/
|
|
148
|
+
declare const mayOverwrite: (stored: SchemaSource | undefined, incoming: SchemaSource) => boolean;
|
|
149
|
+
declare const UI_REFUSAL_CODES: {
|
|
150
|
+
readonly schema: readonly ["facet_unclassified", "excluded_facet", "depth_exceeded", "validation_failed", "hash_mismatch", "non_finite_number", "shape_kind_mismatch", "block_field_unrenderable", "block_not_accepted", "derived_field", "feature_unknown"];
|
|
151
|
+
readonly build: readonly ["peer_missing", "kit_major_unsupported", "compile_error", "nondeterministic", "size_exceeded", "import_denied", "name_conflict"];
|
|
152
|
+
readonly protocol: readonly ["unsupported", "handshake_timeout", "origin_mismatch", "write_denied"];
|
|
153
|
+
readonly runtime: readonly ["crashed", "blank", "csp_violation"];
|
|
154
|
+
readonly policy: readonly ["confirmation_required", "flag_off", "not_approved"];
|
|
155
|
+
};
|
|
156
|
+
type UiRefusalFamily = keyof typeof UI_REFUSAL_CODES;
|
|
157
|
+
type UiRefusal = {
|
|
158
|
+
[F in UiRefusalFamily]: {
|
|
159
|
+
family: F;
|
|
160
|
+
code: (typeof UI_REFUSAL_CODES)[F][number];
|
|
161
|
+
message: string;
|
|
162
|
+
/** What it is about: a facet name, a field type, a path. */
|
|
163
|
+
detail?: string;
|
|
164
|
+
};
|
|
165
|
+
}[UiRefusalFamily];
|
|
166
|
+
/** `schema.depth_exceeded`: how a refusal is named on the wire, in a chip, in a build receipt. */
|
|
167
|
+
type UiRefusalId = {
|
|
168
|
+
[F in UiRefusalFamily]: `${F}.${(typeof UI_REFUSAL_CODES)[F][number]}`;
|
|
169
|
+
}[UiRefusalFamily];
|
|
170
|
+
/** Every id, so a lane that keeps a subset (a frame's own refusals) checks it against one list. */
|
|
171
|
+
declare const UI_REFUSAL_IDS: readonly UiRefusalId[];
|
|
172
|
+
declare const uiRefusalId: (r: UiRefusal) => UiRefusalId;
|
|
173
|
+
/** The refusals a frame may report about itself; the host owns every other one. */
|
|
174
|
+
declare const FRAME_REFUSALS: readonly ["runtime.crashed", "runtime.blank", "runtime.csp_violation", "protocol.unsupported"];
|
|
175
|
+
/**
|
|
176
|
+
* The protocols a manifest entry declares. The first three are the frame protocols a host
|
|
177
|
+
* speaks, best first (dock-input ui2.ts HOST_PROTOCOLS); `bcms-function/1` is a `function:<name>`
|
|
178
|
+
* entry, the third UI scope: js only, never framed.
|
|
179
|
+
*/
|
|
180
|
+
declare const UI_PROTOCOLS: readonly ["bcms-ui/2", "bcms-input/1", "bcms-panel/1", "bcms-function/1"];
|
|
181
|
+
type UiProtocol = (typeof UI_PROTOCOLS)[number];
|
|
182
|
+
interface UiManifestEntry {
|
|
183
|
+
/** The bundle's content key: its files are `bundles/<k>/<js>` and `bundles/<k>/<html>`. */
|
|
184
|
+
k: string;
|
|
185
|
+
protocol: UiProtocol;
|
|
186
|
+
js: string;
|
|
187
|
+
/** Absent on a `function:<name>` entry, which has no frame. */
|
|
188
|
+
html?: string;
|
|
189
|
+
}
|
|
190
|
+
interface UiManifestV2 {
|
|
191
|
+
version: 2;
|
|
192
|
+
/** The release key: the Merkle root over every entry's `k`. */
|
|
193
|
+
K: string;
|
|
194
|
+
algorithm: string;
|
|
195
|
+
kit: {
|
|
196
|
+
version: string;
|
|
197
|
+
stylesSha: string;
|
|
198
|
+
} | null;
|
|
199
|
+
/** By `input:<name>` | `panel:<name>` | `function:<name>`. */
|
|
200
|
+
entries: Record<string, UiManifestEntry>;
|
|
201
|
+
}
|
|
202
|
+
declare const isUiRefusal: (v: unknown) => v is UiRefusal;
|
|
203
|
+
/** KEY_RESERVED, the API contract: `derived` (the Layout id prefix), `layout` and `page` (address prefixes). */
|
|
204
|
+
declare const KEY_RESERVED: ReadonlySet<string>;
|
|
205
|
+
/** The derive lane's minted-key bound: KEY_RESERVED and `id` (key-rules.ts RESERVED_KEYS). */
|
|
206
|
+
declare const DERIVE_MINTED_RESERVED: ReadonlySet<string>;
|
|
207
|
+
/** Keys that reach an object's prototype (safe-keys.ts FORBIDDEN_KEYS): also refused as KEY_RESERVED. */
|
|
208
|
+
declare const KEY_FORBIDDEN: ReadonlySet<string>;
|
|
209
|
+
/** A key with this lead is the platform's too (`_type`, `_key`, `_variant`): KEY_RESERVED. */
|
|
210
|
+
declare const KEY_RESERVED_PREFIX = "_";
|
|
211
|
+
/** KEY_FORMAT: a stored field key is a letter, then letters, digits, `-` and `_` (key-rules.ts API_KEY). */
|
|
212
|
+
declare const KEY_FORMAT: RegExp;
|
|
213
|
+
/** Whether the API refuses a key as KEY_RESERVED (content.ts keyRuleProblem). */
|
|
214
|
+
declare const isReservedKey: (key: string) => boolean;
|
|
215
|
+
/** Whether the derive lane may not mint a key (key-rules.ts isReservedKey): the API's words and `id`. */
|
|
216
|
+
declare const isDeriveReservedKey: (key: string) => boolean;
|
|
217
|
+
/**
|
|
218
|
+
* A primitive `array` (`config.itemType`): the item types it may list, the only config keys it may
|
|
219
|
+
* hold, and the item types an array with `zones` may not name (a list of values holds no rows).
|
|
220
|
+
* `minItems ≤ maxItems`, and both bound the primitive list only (beside `itemType`).
|
|
221
|
+
* src/lib/validation/schemas/content.ts ARRAY_ITEM_TYPES / PRIMITIVE_ARRAY_CONFIG_KEYS, in their order.
|
|
222
|
+
*/
|
|
223
|
+
declare const PRIMITIVE_ARRAY_RULE: {
|
|
224
|
+
readonly itemTypes: readonly ["text", "number", "date", "image", "link", "richtext"];
|
|
225
|
+
readonly configKeys: readonly ["itemType", "minItems", "maxItems", "aliases"];
|
|
226
|
+
readonly notWithZones: readonly ["image", "link", "richtext"];
|
|
227
|
+
};
|
|
228
|
+
declare function canonicalJson(value: unknown): string;
|
|
229
|
+
/**
|
|
230
|
+
* The definition a table's `schema_hash` is taken over: what a dock UI is built against. Names,
|
|
231
|
+
* slugs and list chrome are not in it. Migration 0503's schema_hash_clear_when_stale triggers clear
|
|
232
|
+
* the hash when exactly these change.
|
|
233
|
+
*/
|
|
234
|
+
declare const SCHEMA_HASH_INPUTS: {
|
|
235
|
+
readonly components: readonly ["props", "tabs", "v2"];
|
|
236
|
+
readonly content_models: readonly ["fields", "fieldsets", "v2"];
|
|
237
|
+
readonly component_variant_groups: readonly ["canonicalInputs", "v2"];
|
|
238
|
+
};
|
|
239
|
+
type SchemaHashTable = keyof typeof SCHEMA_HASH_INPUTS;
|
|
240
|
+
/**
|
|
241
|
+
* What `canonicalJson` hashes for one definition: exactly its table's inputs, so an unset key and a
|
|
242
|
+
* cleared one hash alike. `schema_hash` = "v1:" + sha256 hex of `canonicalJson(schemaHashInput(…))`.
|
|
243
|
+
*/
|
|
244
|
+
declare function schemaHashInput(table: SchemaHashTable, def: Readonly<Record<string, unknown>>): Record<string, unknown>;
|
|
245
|
+
|
|
29
246
|
/**
|
|
30
247
|
* How a `number` field's value is SHOWN: `config.format` on the field.
|
|
31
248
|
*
|
|
@@ -376,6 +593,11 @@ interface ShowIfRule {
|
|
|
376
593
|
*/
|
|
377
594
|
op: "eq" | "neq" | "in" | "notIn" | "gt" | "lt" | "isSet" | "notEmpty" | "empty";
|
|
378
595
|
value?: string | string[];
|
|
596
|
+
/**
|
|
597
|
+
* Where `field` is looked up: absent = a sibling; `parent` = the object that holds the siblings;
|
|
598
|
+
* `root` = the top of the component or entry. @see SHOW_IF_SCOPES
|
|
599
|
+
*/
|
|
600
|
+
scope?: "parent" | "root";
|
|
379
601
|
}
|
|
380
602
|
interface ShowIf {
|
|
381
603
|
match: "all" | "any";
|
|
@@ -400,8 +622,12 @@ interface ContentModelField {
|
|
|
400
622
|
config?: FieldConfig | null;
|
|
401
623
|
/** `object`: its child fields. */
|
|
402
624
|
fields?: ContentModelField[];
|
|
403
|
-
/** `object` / `array`: how the value (or each row) opens when edited. */
|
|
625
|
+
/** `object` / `array` / `group` / `repeater` / `table` / `code`: how the value (or each row) opens when edited. @see OPEN_MODE_TYPES */
|
|
404
626
|
openMode?: OpenMode;
|
|
627
|
+
/** V2 `ai`: the editor offers its AI assist on this field. A stored marker. */
|
|
628
|
+
ai?: boolean;
|
|
629
|
+
/** Server-owned: who last wrote each facet (`mayOverwrite`). Never taken from a client. */
|
|
630
|
+
sources?: DefSources;
|
|
405
631
|
/** Longer help behind the ⓘ next to the label. Editor-only. */
|
|
406
632
|
helpMore?: string;
|
|
407
633
|
/** Tuck into the closed "Advanced" section. Editor-only. */
|
|
@@ -542,6 +768,7 @@ interface ContentModelFieldUi {
|
|
|
542
768
|
blocks?: Record<string, {
|
|
543
769
|
icon?: DockIconName;
|
|
544
770
|
preview?: ContentModelFieldUi["preview"];
|
|
771
|
+
openMode?: OpenMode;
|
|
545
772
|
}>;
|
|
546
773
|
/**
|
|
547
774
|
* A custom dock input, by NAME: the project's own input (built with its site, served on its
|
|
@@ -766,7 +993,7 @@ type ButtonVariant = (typeof BUTTON_VARIANTS)[number];
|
|
|
766
993
|
/** Each icon's inner SVG markup (viewBox `0 0 25 25`), by name. */
|
|
767
994
|
declare const BUTTON_ICONS: Readonly<Record<DockIconName, string>>;
|
|
768
995
|
type ButtonIcon = DockIconName;
|
|
769
|
-
declare const BUTTON_ICON_NAMES: readonly ["abc", "access-denied", "activity", "add", "add-circle", "add-comment", "add-document", "add-user", "address-book", "adjustments", "adjustments-horizontal", "alarm", "alert-triangle", "align-left", "api", "app-window", "apple", "apps", "archive", "arrow-back-up", "arrow-down", "arrow-guide", "arrow-left", "arrow-right", "arrow-top-right", "arrow-up", "arrows-diagonal", "arrows-down", "arrows-exchange", "arrows-horizontal", "arrows-left-right", "arrows-shuffle", "arrows-sort", "article", "aspect-ratio", "asterisk", "award", "axis-x", "backpack", "badge", "badge-cc", "badges", "bar-chart", "basket", "bell", "bill", "binary-document", "block-content", "block-element", "blockquote", "bold", "bolt", "book", "book-2", "bookmark", "bookmark-filled", "books", "bottle", "box", "brand-dribbble", "brand-facebook", "brand-instagram", "brand-linkedin", "brand-pinterest", "brand-tiktok", "brand-x", "brand-youtube", "briefcase", "broadcast", "browser", "bug", "building", "building-skyscraper", "building-store", "bulb-filled", "bulb-outline", "calculator", "calendar", "calendar-dollar", "calendar-event", "calendar-exclamation", "calendar-off", "calendar-plus", "calendar-star", "calendar-time", "camera", "campfire", "carousel-horizontal", "case", "cash", "category", "category-2", "chart-area", "chart-arrows", "chart-bar", "chart-bar-popular", "chart-donut", "chart-dots", "chart-line", "chart-upward", "check", "checkbox", "checklist", "checkmark", "checkmark-circle", "chef-hat", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevrons-right", "circle", "circle-check", "circle-dot", "circle-number-1", "circle-plus", "click", "clipboard", "clipboard-image", "clipboard-text", "clock", "clock-check", "clock-hour-4", "close", "close-circle", "code", "code-block", "cog", "collapse", "color-wheel", "columns", "columns-2", "columns-3", "comment", "component", "compose", "compose-sparkles", "confetti", "controls", "cookie", "copy", "credit-card", "crop", "cube", "currency-dollar", "dashboard", "database", "database-search", "desktop", "device-desktop", "device-mobile", "device-tablet", "devices", "diamond", "discount", "document", "document-pdf", "document-remove", "document-sheet", "document-text", "document-video", "document-word", "document-zip", "documents", "door-exit", "dot", "double-chevron-down", "double-chevron-left", "double-chevron-right", "double-chevron-up", "double-quote", "download", "drag-handle", "drop", "droplet", "droplet-half", "earth-americas", "earth-globe", "edit", "egg", "ellipsis-horizontal", "ellipsis-vertical", "empty", "enter", "enter-right", "envelope", "equal", "error-filled", "error-outline", "error-screen", "expand", "eye-closed", "eye-off", "eye-open", "face-happy", "face-indifferent", "face-sad", "feather", "feedback", "file", "file-certificate", "file-code", "file-download", "file-text", "filter", "flag", "flame", "flask", "focus-2", "folder", "folders", "forms", "frame", "generate", "gift", "git-branch", "github", "grid-dots", "groq", "hammer", "hand-finger", "hanger", "hash", "headphones", "headset", "heart", "heart-filled", "heart-handshake", "help-circle", "highlight", "history", "home", "hourglass", "ice-cream", "id-badge", "id-badge-2", "image", "image-remove", "images", "inbox", "infinity", "info-circle", "info-filled", "info-outline", "info-square-rounded", "inline", "inline-element", "input-search", "insert-above", "insert-below", "italic", "joystick", "json", "language", "launch", "layout", "layout-align-center", "layout-board", "layout-board-split", "layout-bottombar", "layout-bottombar-expand", "layout-cards", "layout-columns", "layout-dashboard", "layout-grid", "layout-list", "layout-navbar", "layout-rows", "layout-sidebar", "layout-sidebar-right", "leaf", "leave", "lemon", "library-photo", "lifebuoy", "link", "link-removed", "linkedin", "list", "list-check", "list-details", "list-numbers", "list-tree", "lock", "logo-js", "logo-ts", "mail", "map-2", "map-pin", "map-pins", "marker", "marker-removed", "master-detail", "math-function", "meat", "menu", "message", "message-2", "message-check", "message-circle", "message-circle-2", "message-plus", "message-star", "microphone", "microphone-slash", "mobile-device", "mood-empty", "moon", "movie", "news", "notes", "number", "ok-hand", "olist", "overage", "package", "packages", "palette", "panel-left", "panel-right", "paperclip", "pause", "pencil", "phone", "photo", "photo-scan", "photo-search", "pig-money", "pin", "pin-filled", "pin-removed", "play", "player-play", "player-track-next", "playlist-add", "plug", "plug-connected", "plus-minus", "point", "presentation", "printer", "progress-50", "progress-75", "projects", "publish", "qrcode", "quote", "read-only", "receipt", "recycle", "redo", "refresh", "remove", "remove-circle", "repeat", "reset", "restore", "retrieve", "retry", "revert", "robot", "rocket", "rosette", "route", "ruler", "ruler-measure", "salad", "scale", "schema", "school", "search", "section", "select", "send", "server", "settings", "share", "shield-check", "shield-lock", "shopping-bag", "shopping-cart", "shopping-cart-plus", "signature", "sitemap", "slideshow", "sort", "sort-descending", "spacing-vertical", "sparkle", "sparkles", "speakerphone", "spinner", "split-horizontal", "split-vertical", "square", "stack", "stack-2", "stack-compact", "stairs", "stairs-up", "star", "star-filled", "stars", "stop", "strikethrough", "string", "subtask", "sun", "superscript", "sync", "table", "table-options", "tablet-device", "tag", "tags", "target", "task", "template", "tent", "terminal", "terminal-2", "text", "th-large", "th-list", "thumb-up", "thumbs-down", "thumbs-up", "ticket", "tiers", "timeline", "toggle-arrow-right", "toggle-right", "token", "tool", "tools-kitchen-2", "transfer", "translate", "trash", "trend-upward", "triangle-outline", "trolley", "truck", "truck-delivery", "truncate", "twitter", "typography", "ulist", "unarchive", "underline", "undo", "unknown", "unlink", "unlock", "unpublish", "upload", "user", "user-circle", "user-plus", "user-search", "user-star", "users", "users-group", "versions", "video", "vocabulary", "vs", "warning-filled", "warning-outline", "weight", "world", "wrench", "zoom-question"];
|
|
996
|
+
declare const BUTTON_ICON_NAMES: readonly ["abc", "access-denied", "activity", "add", "add-circle", "add-comment", "add-document", "add-user", "address-book", "adjustments", "adjustments-horizontal", "alarm", "alert-triangle", "align-left", "api", "app-window", "apple", "apps", "archive", "arrow-back-up", "arrow-down", "arrow-guide", "arrow-left", "arrow-right", "arrow-top-right", "arrow-up", "arrows-diagonal", "arrows-down", "arrows-exchange", "arrows-horizontal", "arrows-left-right", "arrows-shuffle", "arrows-sort", "article", "aspect-ratio", "asterisk", "award", "axis-x", "backpack", "badge", "badge-cc", "badges", "bar-chart", "basket", "bell", "bill", "binary-document", "block-content", "block-element", "blockquote", "bold", "bolt", "book", "book-2", "bookmark", "bookmark-filled", "books", "bottle", "box", "brand-dribbble", "brand-facebook", "brand-instagram", "brand-linkedin", "brand-pinterest", "brand-tiktok", "brand-x", "brand-youtube", "briefcase", "broadcast", "browser", "bug", "building", "building-skyscraper", "building-store", "bulb-filled", "bulb-outline", "calculator", "calendar", "calendar-dollar", "calendar-event", "calendar-exclamation", "calendar-off", "calendar-plus", "calendar-star", "calendar-time", "camera", "campfire", "carousel-horizontal", "case", "cash", "category", "category-2", "chart-area", "chart-arrows", "chart-bar", "chart-bar-popular", "chart-donut", "chart-dots", "chart-line", "chart-upward", "check", "checkbox", "checklist", "checkmark", "checkmark-circle", "chef-hat", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "chevrons-right", "circle", "circle-check", "circle-dot", "circle-number-1", "circle-plus", "click", "clipboard", "clipboard-image", "clipboard-text", "clock", "clock-check", "clock-hour-4", "close", "close-circle", "code", "code-block", "cog", "collapse", "color-wheel", "columns", "columns-2", "columns-3", "comment", "component", "compose", "compose-sparkles", "confetti", "controls", "cookie", "copy", "credit-card", "crop", "cube", "currency-dollar", "dashboard", "database", "database-search", "desktop", "device-desktop", "device-mobile", "device-tablet", "devices", "diamond", "discount", "document", "document-pdf", "document-remove", "document-sheet", "document-text", "document-video", "document-word", "document-zip", "documents", "door-exit", "dot", "double-chevron-down", "double-chevron-left", "double-chevron-right", "double-chevron-up", "double-quote", "download", "drag-handle", "drop", "droplet", "droplet-half", "earth-americas", "earth-globe", "edit", "egg", "ellipsis-horizontal", "ellipsis-vertical", "empty", "enter", "enter-right", "envelope", "equal", "error-filled", "error-outline", "error-screen", "expand", "eye-closed", "eye-off", "eye-open", "face-happy", "face-indifferent", "face-sad", "feather", "feedback", "file", "file-certificate", "file-code", "file-download", "file-settings", "file-text", "filter", "flag", "flame", "flask", "focus-2", "folder", "folders", "forms", "frame", "generate", "gift", "git-branch", "github", "grid-dots", "groq", "hammer", "hand-finger", "hanger", "hash", "headphones", "headset", "heart", "heart-filled", "heart-handshake", "help-circle", "highlight", "history", "home", "hourglass", "ice-cream", "id-badge", "id-badge-2", "image", "image-remove", "images", "inbox", "infinity", "info-circle", "info-filled", "info-outline", "info-square-rounded", "inline", "inline-element", "input-search", "insert-above", "insert-below", "italic", "joystick", "json", "language", "launch", "layout", "layout-align-center", "layout-board", "layout-board-split", "layout-bottombar", "layout-bottombar-expand", "layout-cards", "layout-columns", "layout-dashboard", "layout-grid", "layout-list", "layout-navbar", "layout-rows", "layout-sidebar", "layout-sidebar-right", "leaf", "leave", "lemon", "library-photo", "lifebuoy", "link", "link-removed", "linkedin", "list", "list-check", "list-details", "list-numbers", "list-tree", "lock", "logo-js", "logo-ts", "mail", "map-2", "map-pin", "map-pins", "marker", "marker-removed", "master-detail", "math-function", "meat", "menu", "message", "message-2", "message-check", "message-circle", "message-circle-2", "message-plus", "message-star", "microphone", "microphone-slash", "mobile-device", "mood-empty", "moon", "movie", "news", "notes", "number", "ok-hand", "olist", "overage", "package", "packages", "palette", "panel-left", "panel-right", "paperclip", "pause", "pencil", "phone", "photo", "photo-scan", "photo-search", "pig-money", "pin", "pin-filled", "pin-removed", "play", "player-play", "player-track-next", "playlist-add", "plug", "plug-connected", "plus-minus", "point", "presentation", "printer", "progress-50", "progress-75", "projects", "publish", "qrcode", "quote", "read-only", "receipt", "recycle", "redo", "refresh", "remove", "remove-circle", "repeat", "reset", "restore", "retrieve", "retry", "revert", "robot", "rocket", "rosette", "route", "ruler", "ruler-measure", "salad", "scale", "schema", "school", "search", "section", "select", "send", "server", "settings", "share", "shield-check", "shield-lock", "shopping-bag", "shopping-cart", "shopping-cart-plus", "signature", "sitemap", "slideshow", "sort", "sort-descending", "spacing-vertical", "sparkle", "sparkles", "speakerphone", "spinner", "split-horizontal", "split-vertical", "square", "stack", "stack-2", "stack-compact", "stairs", "stairs-up", "star", "star-filled", "stars", "stop", "strikethrough", "string", "subtask", "sun", "superscript", "sync", "table", "table-options", "tablet-device", "tag", "tags", "target", "task", "template", "tent", "terminal", "terminal-2", "text", "th-large", "th-list", "thumb-up", "thumbs-down", "thumbs-up", "ticket", "tiers", "timeline", "toggle-arrow-right", "toggle-right", "token", "tool", "tools-kitchen-2", "transfer", "translate", "trash", "trend-upward", "triangle-outline", "trolley", "truck", "truck-delivery", "truncate", "twitter", "typography", "ulist", "unarchive", "underline", "undo", "unknown", "unlink", "unlock", "unpublish", "upload", "user", "user-circle", "user-plus", "user-search", "user-star", "users", "users-group", "versions", "video", "vocabulary", "vs", "warning-filled", "warning-outline", "weight", "world", "wrench", "zoom-question"];
|
|
770
997
|
/** A stored variant as it renders: anything off the list is Primary. */
|
|
771
998
|
declare function buttonVariantOf(value: unknown): ButtonVariant;
|
|
772
999
|
/**
|
|
@@ -2256,6 +2483,8 @@ declare function visibleDeliveredLayout<T extends DeliveredLayout | null | undef
|
|
|
2256
2483
|
*/
|
|
2257
2484
|
declare const SECTION_DOCTRINE = "STRUCTURE (separate from schema): a page is composed of SECTIONS. NEVER build a page out of loose top-level heading/text/image/button/spacer blocks \u2014 they cannot be moved, duplicated or swapped as a unit, the visual editor cannot outline or name them, and every one of them becomes its own section in the editor. A hero of a headline, a lede and two CTAs is ONE section, not four. TWO SHAPES, and the choice is about REUSE. (1) A band that appears on more than one page, or that needs layout variants, is a COMPONENT with a `sectionType` \u2014 see create_component. Components sharing a `sectionType` are that section's VARIANTS (one Hero: 'Centered' for the home page and 'Two-column' for about, same prop keys so a swap keeps the content). This is also the only shape the editor's 'Add a section' picker can insert, and the only one that gets a family name and a variant switcher. (2) A genuinely one-off band on a single page is a `section` BLOCK whose `props.children` hold its blocks. THE TRADEOFF, stated in the present tense because it is real today: inside a component, ONLY the leaves a declared prop TARGETS are click-to-edit on the canvas \u2014 each declared prop's `target` is re-keyed to that PLACEMENT's own override address, so editing it changes this page and not the shared definition. A prop with no `target` still SHOWS as a dock control, but its override reaches no rendered slot, so editing it changes nothing on the page. Copy that no prop points at is worse still: no binding and no control, unreachable from click-to-edit AND from the dock, changeable only by editing the component definition, which rewrites every page that places it. A `section` block's children stay click-to-edit unconditionally. So when you choose a component, DECLARE A PROP \u2014 WITH A `target` \u2014 for every string, link and image a marketer will ever touch; a component with un-propped editable copy is the defect, not the component. In the dock an unset prop shows EMPTY and inherits the definition's default, so set props explicitly when you want the current copy visible there. An IMPORTED site's components are its own (read the repo); its nav, footer and modals are the Layout. On a blank site, do not hand-write a band's JSON: start from a built-in section blueprint (list_components returns locked `builtin:*` blueprints with no projectId \u2014 hero-centered, hero-split, feature-grid-three, cta-banner and more), each already rooted in a `section` block with its editable leaves declared as props. INLINE its blockJson as a `section` block for a one-off band; for a recurring band, materialize it with create_component `from` so it becomes project-scoped before implementation validation, Output or publication. Direct `builtin:*` component references exist only for legacy delivery compatibility. Two consecutive call-to-action buttons are two sibling `button` blocks inside the same section \u2014 never a `columns` block, which is a `repeat(N,1fr)` grid and would stretch each CTA to half the container. Buttons are inline-level and flow side by side on their own.";
|
|
2258
2485
|
type ComponentCategory = "navbar" | "footer" | "button" | "section" | "slider" | "tabs" | "form" | "custom" | "hero" | "content" | "social-proof" | "conversion";
|
|
2486
|
+
/** What `components.category` stores: a library tab, or one of the kit catalogue's categories (facet row 2). */
|
|
2487
|
+
type ComponentCategoryId = ComponentCategory | KitCategory;
|
|
2259
2488
|
/**
|
|
2260
2489
|
* A single overridable field on a component. `target` points at the block + JSON
|
|
2261
2490
|
* path inside `blockJson` the override writes to (e.g. blockId "cta", path
|
|
@@ -2378,8 +2607,12 @@ interface ComponentPropDef {
|
|
|
2378
2607
|
* the value. Refused (`unique_prop_scope`) on a top-level scalar: nothing to be unique across.
|
|
2379
2608
|
*/
|
|
2380
2609
|
unique?: boolean;
|
|
2381
|
-
/** `object` / `group` / `table`: how the value (or each row) opens when edited. */
|
|
2610
|
+
/** `object` / `group` / `table` / `code`: how the value (or each row) opens when edited. @see OPEN_MODE_TYPES */
|
|
2382
2611
|
openMode?: OpenMode;
|
|
2612
|
+
/** V2 `ai`: the editor offers its AI assist on this prop. A stored marker. */
|
|
2613
|
+
ai?: boolean;
|
|
2614
|
+
/** Server-owned: who last wrote each facet (`mayOverwrite`). Never taken from a client. */
|
|
2615
|
+
sources?: DefSources;
|
|
2383
2616
|
/**
|
|
2384
2617
|
* The content-model field's `readOnly` / `lockReason` pair, as STORED MARKERS only: the
|
|
2385
2618
|
* editor may render the prop read-only, and no write of a prop value is refused for them.
|
|
@@ -2406,6 +2639,7 @@ interface ComponentPropDef {
|
|
|
2406
2639
|
maxLength?: number;
|
|
2407
2640
|
pattern?: string;
|
|
2408
2641
|
patternMessage?: string;
|
|
2642
|
+
openMode?: OpenMode;
|
|
2409
2643
|
};
|
|
2410
2644
|
/** `slot` — the value is a list of instances, not one. @see slotItems */
|
|
2411
2645
|
multiple?: boolean;
|
|
@@ -2435,6 +2669,8 @@ interface ComponentPropDef {
|
|
|
2435
2669
|
};
|
|
2436
2670
|
/** The row icon for this type, a dock icon name. */
|
|
2437
2671
|
icon?: DockIconName;
|
|
2672
|
+
/** How a row of this type opens when edited. */
|
|
2673
|
+
openMode?: OpenMode;
|
|
2438
2674
|
}>;
|
|
2439
2675
|
/**
|
|
2440
2676
|
* `select` / `multiselect` — the choices. Required, and a default must be one of them. `{ label, value }`
|
|
@@ -2657,7 +2893,7 @@ interface Component {
|
|
|
2657
2893
|
projectId?: string | null;
|
|
2658
2894
|
name: string;
|
|
2659
2895
|
slug: string;
|
|
2660
|
-
category:
|
|
2896
|
+
category: ComponentCategoryId;
|
|
2661
2897
|
/**
|
|
2662
2898
|
* Section library: the family this component is a LAYOUT of, e.g. "Hero". `name` is the
|
|
2663
2899
|
* layout label ("Centered"), so components sharing a sectionType are selectable variants
|
|
@@ -2719,7 +2955,7 @@ interface DeliveryComponent {
|
|
|
2719
2955
|
thumbnail?: string | null;
|
|
2720
2956
|
name: string;
|
|
2721
2957
|
slug: string;
|
|
2722
|
-
category:
|
|
2958
|
+
category: ComponentCategoryId;
|
|
2723
2959
|
sectionType?: string | null;
|
|
2724
2960
|
blockJson: ContentBlock[];
|
|
2725
2961
|
props: ComponentPropDef[];
|
|
@@ -4035,173 +4271,122 @@ type SectionPlanItem<B> = {
|
|
|
4035
4271
|
*/
|
|
4036
4272
|
declare function planSections<B>(slots: readonly string[], blocks: readonly B[] | null | undefined): SectionPlanItem<B>[];
|
|
4037
4273
|
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
*/
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
* dashboard renders 3 tabs on a model screen. It rises to TAB_MAX when the dashboard renders 8
|
|
4049
|
-
* (facet table row 7, F12). Component prop tabs are at TAB_MAX already.
|
|
4050
|
-
*/
|
|
4051
|
-
declare const TAB_MAX_RENDERABLE_NOW = 3;
|
|
4052
|
-
/** `ui.control:"segmented"`: the option count it stores. V2's 3 is a render-fit rule, not this. */
|
|
4053
|
-
declare const SEGMENTED_MIN = 2;
|
|
4054
|
-
declare const SEGMENTED_MAX = 8;
|
|
4055
|
-
/** Field / prop nesting depth. */
|
|
4056
|
-
declare const DEPTH_MAX = 10;
|
|
4057
|
-
/** Help and description caps by where the text sits. */
|
|
4058
|
-
declare const HELP_CAPS: {
|
|
4059
|
-
readonly field: 500;
|
|
4060
|
-
readonly prop: 200;
|
|
4061
|
-
readonly placeholder: 120;
|
|
4062
|
-
readonly helpMore: 2000;
|
|
4063
|
-
readonly option: 140;
|
|
4064
|
-
readonly fieldset: 500;
|
|
4065
|
-
readonly propGroup: 200;
|
|
4274
|
+
type DockUiScope = "field" | "section" | "page" | "layout";
|
|
4275
|
+
type DockUiKind = "input" | "panel";
|
|
4276
|
+
type DockUiStatus = "draft" | "approved" | "published";
|
|
4277
|
+
type DockUiOrigin = "dashboard" | "management" | "mcp" | "system";
|
|
4278
|
+
/** The write path's limits. A version over its cap, or a project over its, refuses `build.size_exceeded`. */
|
|
4279
|
+
declare const DOCK_UI_LIMITS: {
|
|
4280
|
+
readonly sourcesPerProject: 64;
|
|
4281
|
+
readonly bytesPerProject: number;
|
|
4282
|
+
readonly bytesPerVersion: number;
|
|
4283
|
+
readonly bytesPerBundle: number;
|
|
4066
4284
|
};
|
|
4067
|
-
/**
|
|
4068
|
-
declare const
|
|
4069
|
-
/**
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
*/
|
|
4073
|
-
declare const
|
|
4074
|
-
/**
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
declare const V2_SHAPES: readonly ["block", "page", "entry", "global", "object"];
|
|
4087
|
-
/** What a definition IS in V2. On a model, `block` ⇔ `content_models.kind = 'block'`. */
|
|
4088
|
-
type V2Shape = (typeof V2_SHAPES)[number];
|
|
4089
|
-
declare const V2_PLACEMENTS: readonly ["inline", "section", "page"];
|
|
4090
|
-
/** Where a block may be placed. */
|
|
4091
|
-
type V2Placement = (typeof V2_PLACEMENTS)[number];
|
|
4092
|
-
/** The kit catalogue's categories, verbatim (dashboard src/kit/library/catalog.ts CATEGORY_ORDER). */
|
|
4093
|
-
declare const KIT_CATEGORIES: readonly ["Navigation & chrome", "Heroes", "Features & storytelling", "Social proof", "Media & galleries", "Commerce", "Pricing & plans", "Conversion & forms", "Listings & feeds", "Long-form & docs", "Company & people", "Events & places", "Data & interactive", "Advanced patterns"];
|
|
4094
|
-
type KitCategory = (typeof KIT_CATEGORIES)[number];
|
|
4095
|
-
/** A variant's chrome. Its slug, name and members are native; only these two are not. */
|
|
4096
|
-
interface V2VariantMeta {
|
|
4097
|
-
icon?: DockIconName;
|
|
4098
|
-
description?: string;
|
|
4099
|
-
}
|
|
4100
|
-
/** `components.v2` / `published_v2`. Category and icon are native columns. */
|
|
4101
|
-
interface ComponentV2 {
|
|
4102
|
-
shape?: V2Shape;
|
|
4103
|
-
placement?: V2Placement;
|
|
4104
|
-
}
|
|
4105
|
-
/** `content_models.v2`. Icon and preview are native (`icon`, `list_preview`). */
|
|
4106
|
-
interface ContentModelV2 {
|
|
4107
|
-
shape?: V2Shape;
|
|
4108
|
-
placement?: V2Placement;
|
|
4109
|
-
category?: KitCategory;
|
|
4110
|
-
/** By variant slug; the slugs themselves are the options of the model's `_variant` select. */
|
|
4111
|
-
variants?: Record<string, V2VariantMeta>;
|
|
4112
|
-
}
|
|
4113
|
-
/** `component_variant_groups.v2` / `published_v2`. ORDER is the array index, like field order. */
|
|
4114
|
-
interface VariantGroupV2 {
|
|
4115
|
-
variants?: Array<V2VariantMeta & {
|
|
4116
|
-
componentId: string;
|
|
4117
|
-
}>;
|
|
4118
|
-
}
|
|
4119
|
-
/** The keys each table's block may hold; validators build strict schemas from these. */
|
|
4120
|
-
declare const V2_KEYS: {
|
|
4121
|
-
readonly components: readonly ["shape", "placement"];
|
|
4122
|
-
readonly content_models: readonly ["shape", "placement", "category", "variants"];
|
|
4123
|
-
readonly component_variant_groups: readonly ["variants"];
|
|
4285
|
+
/** What a `cms:<name>` import resolves: lowercase letters, digits and hyphens, at most 64 (the column). */
|
|
4286
|
+
declare const DOCK_UI_NAME: RegExp;
|
|
4287
|
+
/** The only imports a CMS source may make; anything else refuses `build.import_denied`. */
|
|
4288
|
+
declare const DOCK_UI_IMPORTS: readonly ["react", "react-dom", "@bettercms-ai/kit/*", "@bettercms-ai/dock-input"];
|
|
4289
|
+
declare const isDockUiImportAllowed: (specifier: string) => boolean;
|
|
4290
|
+
/** A CMS source's entry in the Merkle input, beside the repo's: `"cms:<name>@<version>": source_sha`. */
|
|
4291
|
+
declare const dockUiMerkleKey: (name: string, version: number) => string;
|
|
4292
|
+
/** What the builder recorded for the last validate or publish. */
|
|
4293
|
+
type DockUiBuildReceipt = {
|
|
4294
|
+
ok: true;
|
|
4295
|
+
version: number;
|
|
4296
|
+
bundleKey: string;
|
|
4297
|
+
bytes: number;
|
|
4298
|
+
builtAt: string;
|
|
4299
|
+
} | {
|
|
4300
|
+
ok: false;
|
|
4301
|
+
version: number;
|
|
4302
|
+
refusals: UiRefusal[];
|
|
4303
|
+
builtAt: string;
|
|
4124
4304
|
};
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4305
|
+
type DockUiSource = {
|
|
4306
|
+
id: string;
|
|
4307
|
+
name: string;
|
|
4308
|
+
scope: DockUiScope;
|
|
4309
|
+
kind: DockUiKind;
|
|
4310
|
+
/** What the UI is for (a field path, a section, a page, the layout), per `scope`. */
|
|
4311
|
+
target: Record<string, unknown>;
|
|
4312
|
+
/** The newest saved version; 0 before the first write. */
|
|
4313
|
+
headVersion: number;
|
|
4314
|
+
/** The version the dock serves, null until the first publish. */
|
|
4315
|
+
publishedVersion: number | null;
|
|
4316
|
+
status: DockUiStatus;
|
|
4317
|
+
approvedBy: string | null;
|
|
4318
|
+
approvedAt: string | null;
|
|
4319
|
+
buildReceipt: DockUiBuildReceipt | null;
|
|
4320
|
+
createdAt: string;
|
|
4321
|
+
updatedAt: string;
|
|
4131
4322
|
};
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
/**
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
*/
|
|
4142
|
-
declare const mayOverwrite: (stored: SchemaSource | undefined, incoming: SchemaSource) => boolean;
|
|
4143
|
-
declare const UI_REFUSAL_CODES: {
|
|
4144
|
-
readonly schema: readonly ["facet_unclassified", "excluded_facet", "depth_exceeded", "validation_failed", "hash_mismatch", "non_finite_number", "shape_kind_mismatch", "block_field_unrenderable", "block_not_accepted", "derived_field", "feature_unknown"];
|
|
4145
|
-
readonly build: readonly ["peer_missing", "kit_major_unsupported", "compile_error", "nondeterministic", "size_exceeded"];
|
|
4146
|
-
readonly protocol: readonly ["unsupported", "handshake_timeout", "origin_mismatch", "write_denied"];
|
|
4147
|
-
readonly runtime: readonly ["crashed", "blank", "csp_violation"];
|
|
4148
|
-
readonly policy: readonly ["confirmation_required", "flag_off"];
|
|
4323
|
+
/** One append-only saved version. `sourceText` is left out of lists. */
|
|
4324
|
+
type DockUiVersion = {
|
|
4325
|
+
version: number;
|
|
4326
|
+
/** sha256 hex of `sourceText` */
|
|
4327
|
+
sourceSha: string;
|
|
4328
|
+
sourceText?: string;
|
|
4329
|
+
actorId: string | null;
|
|
4330
|
+
origin: DockUiOrigin;
|
|
4331
|
+
createdAt: string;
|
|
4149
4332
|
};
|
|
4150
|
-
|
|
4151
|
-
type
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
detail?: string;
|
|
4158
|
-
};
|
|
4159
|
-
}[UiRefusalFamily];
|
|
4160
|
-
/** `schema.depth_exceeded` */
|
|
4161
|
-
declare const uiRefusalId: (r: UiRefusal) => string;
|
|
4162
|
-
declare const isUiRefusal: (v: unknown) => v is UiRefusal;
|
|
4163
|
-
/** KEY_RESERVED, the API contract: `derived` (the Layout id prefix), `layout` and `page` (address prefixes). */
|
|
4164
|
-
declare const KEY_RESERVED: ReadonlySet<string>;
|
|
4165
|
-
/** The derive lane's minted-key bound: KEY_RESERVED and `id` (key-rules.ts RESERVED_KEYS). */
|
|
4166
|
-
declare const DERIVE_MINTED_RESERVED: ReadonlySet<string>;
|
|
4167
|
-
/** Keys that reach an object's prototype (safe-keys.ts FORBIDDEN_KEYS): also refused as KEY_RESERVED. */
|
|
4168
|
-
declare const KEY_FORBIDDEN: ReadonlySet<string>;
|
|
4169
|
-
/** A key with this lead is the platform's too (`_type`, `_key`, `_variant`): KEY_RESERVED. */
|
|
4170
|
-
declare const KEY_RESERVED_PREFIX = "_";
|
|
4171
|
-
/** KEY_FORMAT: a stored field key is a letter, then letters, digits, `-` and `_` (key-rules.ts API_KEY). */
|
|
4172
|
-
declare const KEY_FORMAT: RegExp;
|
|
4173
|
-
/** Whether the API refuses a key as KEY_RESERVED (content.ts keyRuleProblem). */
|
|
4174
|
-
declare const isReservedKey: (key: string) => boolean;
|
|
4175
|
-
/** Whether the derive lane may not mint a key (key-rules.ts isReservedKey): the API's words and `id`. */
|
|
4176
|
-
declare const isDeriveReservedKey: (key: string) => boolean;
|
|
4177
|
-
/**
|
|
4178
|
-
* A primitive `array` (`config.itemType`): the item types it may list, the only config keys it may
|
|
4179
|
-
* hold, and the item types an array with `zones` may not name (a list of values holds no rows).
|
|
4180
|
-
* `minItems ≤ maxItems`, and both bound the primitive list only (beside `itemType`).
|
|
4181
|
-
* src/lib/validation/schemas/content.ts ARRAY_ITEM_TYPES / PRIMITIVE_ARRAY_CONFIG_KEYS, in their order.
|
|
4182
|
-
*/
|
|
4183
|
-
declare const PRIMITIVE_ARRAY_RULE: {
|
|
4184
|
-
readonly itemTypes: readonly ["text", "number", "date", "image", "link", "richtext"];
|
|
4185
|
-
readonly configKeys: readonly ["itemType", "minItems", "maxItems", "aliases"];
|
|
4186
|
-
readonly notWithZones: readonly ["image", "link", "richtext"];
|
|
4333
|
+
/** write_dock_ui: saves a new version as a draft (creates the source on its first write). */
|
|
4334
|
+
type WriteDockUiInput = {
|
|
4335
|
+
name: string;
|
|
4336
|
+
scope: DockUiScope;
|
|
4337
|
+
kind: DockUiKind;
|
|
4338
|
+
target: Record<string, unknown>;
|
|
4339
|
+
source: string;
|
|
4187
4340
|
};
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
*/
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4341
|
+
type WriteDockUiOutput = {
|
|
4342
|
+
source: DockUiSource;
|
|
4343
|
+
version: DockUiVersion;
|
|
4344
|
+
created: boolean;
|
|
4345
|
+
};
|
|
4346
|
+
/** approve_dock_ui: approves one version, so a later write is not approved with it. */
|
|
4347
|
+
type ApproveDockUiInput = {
|
|
4348
|
+
name: string;
|
|
4349
|
+
version: number;
|
|
4350
|
+
};
|
|
4351
|
+
type ApproveDockUiOutput = {
|
|
4352
|
+
source: DockUiSource;
|
|
4353
|
+
};
|
|
4354
|
+
/** validate_dock_ui: builds without publishing; the head version when `version` is left out. */
|
|
4355
|
+
type ValidateDockUiInput = {
|
|
4356
|
+
name: string;
|
|
4357
|
+
version?: number;
|
|
4358
|
+
};
|
|
4359
|
+
type ValidateDockUiOutput = {
|
|
4360
|
+
name: string;
|
|
4361
|
+
receipt: DockUiBuildReceipt;
|
|
4362
|
+
};
|
|
4363
|
+
/** publish_dock_ui: validates first, and publishes only an approved version that builds. */
|
|
4364
|
+
type PublishDockUiInput = {
|
|
4365
|
+
name: string;
|
|
4366
|
+
version?: number;
|
|
4367
|
+
};
|
|
4368
|
+
type PublishDockUiOutput = {
|
|
4369
|
+
ok: true;
|
|
4370
|
+
source: DockUiSource;
|
|
4371
|
+
receipt: Extract<DockUiBuildReceipt, {
|
|
4372
|
+
ok: true;
|
|
4373
|
+
}>;
|
|
4374
|
+
} | {
|
|
4375
|
+
ok: false;
|
|
4376
|
+
refusals: UiRefusal[];
|
|
4377
|
+
};
|
|
4378
|
+
type ListDockUiInput = {
|
|
4379
|
+
scope?: DockUiScope;
|
|
4380
|
+
status?: DockUiStatus;
|
|
4381
|
+
};
|
|
4382
|
+
type ListDockUiOutput = {
|
|
4383
|
+
sources: DockUiSource[];
|
|
4384
|
+
usage: {
|
|
4385
|
+
sources: number;
|
|
4386
|
+
bytes: number;
|
|
4387
|
+
limits: typeof DOCK_UI_LIMITS;
|
|
4388
|
+
};
|
|
4198
4389
|
};
|
|
4199
|
-
type SchemaHashTable = keyof typeof SCHEMA_HASH_INPUTS;
|
|
4200
|
-
/**
|
|
4201
|
-
* What `canonicalJson` hashes for one definition: exactly its table's inputs, so an unset key and a
|
|
4202
|
-
* cleared one hash alike. `schema_hash` = "v1:" + sha256 hex of `canonicalJson(schemaHashInput(…))`.
|
|
4203
|
-
*/
|
|
4204
|
-
declare function schemaHashInput(table: SchemaHashTable, def: Readonly<Record<string, unknown>>): Record<string, unknown>;
|
|
4205
4390
|
|
|
4206
4391
|
/**
|
|
4207
4392
|
* The rich-text features vocabulary: every name a field's `config.features` may carry.
|
|
@@ -4265,6 +4450,49 @@ type RichTextRefusalCode = "block_not_accepted" | "derived_field" | "feature_unk
|
|
|
4265
4450
|
*/
|
|
4266
4451
|
declare const richTextRefusal: (code: RichTextRefusalCode, detail: string) => UiRefusal;
|
|
4267
4452
|
|
|
4453
|
+
/** Every way a create can be refused: a closed set, so the picker always names the reason. */
|
|
4454
|
+
declare const REFERENCE_CREATE_REFUSAL_CODES: readonly ["no_title_field", "not_an_entry_model", "singleton", "model_not_found", "forbidden", "branch_readonly", "title_invalid", "locale_required", "slug_exhausted", "unique_conflict", "in_progress"];
|
|
4455
|
+
type ReferenceCreateRefusalCode = (typeof REFERENCE_CREATE_REFUSAL_CODES)[number];
|
|
4456
|
+
/** A refusal as the endpoint sends it: `code` is `reference_create.<code>`, `reason` adds the detail. */
|
|
4457
|
+
type ReferenceCreateRefusal = {
|
|
4458
|
+
code: `reference_create.${ReferenceCreateRefusalCode}`;
|
|
4459
|
+
reason: string;
|
|
4460
|
+
};
|
|
4461
|
+
/**
|
|
4462
|
+
* One refusal, named the same way everywhere: `reason` is `reference_create.<code>:<detail>`
|
|
4463
|
+
* (a model slug, the title's limit, a permission), so a caller can show or match it.
|
|
4464
|
+
*/
|
|
4465
|
+
declare const referenceCreateRefusal: (code: ReferenceCreateRefusalCode, detail: string) => ReferenceCreateRefusal;
|
|
4466
|
+
/** Whether the picker may offer "Create new" for a target: the host passes `createReference` only on `ok`. */
|
|
4467
|
+
type ReferenceCreateCapability = {
|
|
4468
|
+
ok: true;
|
|
4469
|
+
} | ({
|
|
4470
|
+
ok: false;
|
|
4471
|
+
} & ReferenceCreateRefusal);
|
|
4472
|
+
/** The created (or replayed) entry, as the picker lists it: the search endpoint's entry option. */
|
|
4473
|
+
type ReferenceCreatedOption = {
|
|
4474
|
+
kind: "entry";
|
|
4475
|
+
id: string;
|
|
4476
|
+
title: string;
|
|
4477
|
+
/** `<Model> · draft` */
|
|
4478
|
+
subtitle: string | null;
|
|
4479
|
+
status: string | null;
|
|
4480
|
+
modelSlug?: string;
|
|
4481
|
+
url?: string | null;
|
|
4482
|
+
};
|
|
4483
|
+
type ReferenceCreateResult = {
|
|
4484
|
+
option: ReferenceCreatedOption;
|
|
4485
|
+
/** false on an idempotent replay, or when an existing entry answered the title. */
|
|
4486
|
+
created: boolean;
|
|
4487
|
+
slug: string;
|
|
4488
|
+
/** The required fields the draft still lacks, so the picker can say what is left to fill. */
|
|
4489
|
+
completeness: {
|
|
4490
|
+
missingRequired: string[];
|
|
4491
|
+
};
|
|
4492
|
+
/** Whether the new entry passes the field's reference filter (it is selected either way). */
|
|
4493
|
+
satisfiesFilter: boolean;
|
|
4494
|
+
};
|
|
4495
|
+
|
|
4268
4496
|
/**
|
|
4269
4497
|
* What a delivered rich-text value carries for its embeds, beside its `html`: the one shape the
|
|
4270
4498
|
* server writes (at html-cache build), the SDK surfaces and every renderer reads.
|
|
@@ -4295,4 +4523,4 @@ interface RichTextEmbeds {
|
|
|
4295
4523
|
*/
|
|
4296
4524
|
declare const slugify: (s: string) => string;
|
|
4297
4525
|
|
|
4298
|
-
export { type AlignToken, type AllowRule, type ApiError, type ApiKey, type ApiKeyPermission, type ApiKeyTokenType, 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, 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 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, 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 ElementLike, type EmbedCard, type ExpandedBinding, FIELD_SIZE_ZOOM, FIELD_STYLE_KEYS, FOOTER_SECTION_ID, 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, 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 LocatorGrammar, MAIN_SELECTOR, type ManagementLayoutCommand, type MediaAsset, type MediaCaptionTrack, type MediaFieldValue, NAVIGATION_SECTION_ID, type NavLink, type NavbarBlock, type NavbarProps, type NumberFieldFormat, type NumberScale, 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, 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 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, 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_REFUSAL_CODES, type UiBefore, type UiOrigin, type UiRefusal, type UiRefusalFamily, type V2Placement, type V2Shape, type V2VariantMeta, V2_KEYS, V2_PLACEMENTS, V2_SHAPES, VIDEO_TRANSCRIPT_MAX, VIDEO_VALUE_KEYS, type VariantGroupV2, type VariantInputMapping, type VideoBlock, type VideoProps, type VideoValue, type VisibilityWindow, type WeightToken, type WindowState, type Workspace, 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, exampleFor, expandBlockBindings, fieldGroupOf, fieldStyleCssText, fieldStyleToCss, formatNumber, formatPropsAttribute, getBlockType, headingPaintCss, hiddenEverywhere, hideOnAttr, imageFrameCss, inWindow, isBlock, isButtonLookValue, isChromeLandmark, isCodeButton, isDeriveReservedKey, 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, 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 };
|
|
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 };
|