@bettercms-ai/types 1.58.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 +10 -5
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ declare const BLOCK_FIELD_TYPES: readonly ["text", "longtext", "richtext", "imag
|
|
|
73
73
|
* here is refused with `schema.block_field_unrenderable` only until its renderer ships, and then
|
|
74
74
|
* joins this list. When this equals BLOCK_FIELD_TYPES (G7), the staging is over.
|
|
75
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"];
|
|
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
77
|
/** `openMode` values (content-model.ts OpenMode). */
|
|
78
78
|
declare const OPEN_MODES: readonly ["inline", "drill", "popover", "dialog"];
|
|
79
79
|
/**
|
|
@@ -172,15 +172,20 @@ declare const UI_REFUSAL_IDS: readonly UiRefusalId[];
|
|
|
172
172
|
declare const uiRefusalId: (r: UiRefusal) => UiRefusalId;
|
|
173
173
|
/** The refusals a frame may report about itself; the host owns every other one. */
|
|
174
174
|
declare const FRAME_REFUSALS: readonly ["runtime.crashed", "runtime.blank", "runtime.csp_violation", "protocol.unsupported"];
|
|
175
|
-
/**
|
|
176
|
-
|
|
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"];
|
|
177
181
|
type UiProtocol = (typeof UI_PROTOCOLS)[number];
|
|
178
182
|
interface UiManifestEntry {
|
|
179
183
|
/** The bundle's content key: its files are `bundles/<k>/<js>` and `bundles/<k>/<html>`. */
|
|
180
184
|
k: string;
|
|
181
185
|
protocol: UiProtocol;
|
|
182
186
|
js: string;
|
|
183
|
-
|
|
187
|
+
/** Absent on a `function:<name>` entry, which has no frame. */
|
|
188
|
+
html?: string;
|
|
184
189
|
}
|
|
185
190
|
interface UiManifestV2 {
|
|
186
191
|
version: 2;
|
|
@@ -191,7 +196,7 @@ interface UiManifestV2 {
|
|
|
191
196
|
version: string;
|
|
192
197
|
stylesSha: string;
|
|
193
198
|
} | null;
|
|
194
|
-
/** By `input:<name>` | `panel:<name>`. */
|
|
199
|
+
/** By `input:<name>` | `panel:<name>` | `function:<name>`. */
|
|
195
200
|
entries: Record<string, UiManifestEntry>;
|
|
196
201
|
}
|
|
197
202
|
declare const isUiRefusal: (v: unknown) => v is UiRefusal;
|
package/dist/index.js
CHANGED
|
@@ -4620,7 +4620,11 @@ var BLOCK_FIELD_TYPES_RENDERABLE_NOW = [
|
|
|
4620
4620
|
"rating",
|
|
4621
4621
|
"date",
|
|
4622
4622
|
"datetime",
|
|
4623
|
-
"boolean"
|
|
4623
|
+
"boolean",
|
|
4624
|
+
"video",
|
|
4625
|
+
"file",
|
|
4626
|
+
"tags",
|
|
4627
|
+
"reference"
|
|
4624
4628
|
];
|
|
4625
4629
|
var OPEN_MODES = ["inline", "drill", "popover", "dialog"];
|
|
4626
4630
|
var OPEN_MODE_TYPES = ["object", "array", "group", "repeater", "table", "code"];
|
|
@@ -4693,7 +4697,7 @@ var FRAME_REFUSALS = [
|
|
|
4693
4697
|
"runtime.csp_violation",
|
|
4694
4698
|
"protocol.unsupported"
|
|
4695
4699
|
];
|
|
4696
|
-
var UI_PROTOCOLS = ["bcms-ui/2", "bcms-input/1", "bcms-panel/1"];
|
|
4700
|
+
var UI_PROTOCOLS = ["bcms-ui/2", "bcms-input/1", "bcms-panel/1", "bcms-function/1"];
|
|
4697
4701
|
var isUiRefusal = (v) => {
|
|
4698
4702
|
if (typeof v !== "object" || v === null) return false;
|
|
4699
4703
|
const { family, code, message } = v;
|