@threadlabs/looma 0.53.14 → 0.53.16

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.
@@ -1,3 +1,4 @@
1
1
  import type { NodeViewRenderer } from '@tiptap/core';
2
- /** A whole-card native link, with decorative SVGs and authored filename/size. No nested action. */
3
- export declare const fileAttachmentNodeView: NodeViewRenderer;
2
+ import { type FileDeletionServices } from '../file-deletions';
3
+ /** A compact file link with an editable reference action and optional original deletion. */
4
+ export declare const createFileAttachmentNodeView: (services: FileDeletionServices) => NodeViewRenderer;
@@ -1,9 +1,11 @@
1
1
  import { Extension, Node, type Editor } from "@tiptap/core";
2
- import type { Node as ProseMirrorNode } from "@tiptap/pm/model";
3
- /** Replaceable host-owned presentation, keyed by `link:<id>` or `mention:<id>`. */
2
+ import { type Node as ProseMirrorNode } from "@tiptap/pm/model";
3
+ /** Host presentation keyed by link:id, mention:id, or attachment:href. File status never edits authored content. */
4
4
  export interface LoomaReferenceDisplay {
5
5
  readonly label: string;
6
6
  readonly href?: string;
7
+ readonly status?: 'ready' | 'pending' | 'deleted';
8
+ readonly deletable?: boolean;
7
9
  }
8
10
  /** Display values indexed by stable target kind and identity, outside authored document data. */
9
11
  export type LoomaReferenceMap = Readonly<Record<string, LoomaReferenceDisplay>>;
@@ -17,6 +19,8 @@ export declare function setReferenceDisplay(editor: Editor, references: LoomaRef
17
19
  * @ownership The returned map belongs to the host; replace it rather than mutating it.
18
20
  */
19
21
  export declare function getReferenceDisplay(editor: Editor): LoomaReferenceMap;
22
+ /** Observe host presentation and editability without changing authored content or history. */
23
+ export declare function observeReferenceDisplay(editor: Editor, render: () => void): () => void;
20
24
  /**
21
25
  * Reads current host presentation, with a durable insertion-time fallback for offline copies.
22
26
  * @failure Unsafe cached destinations fall back to the saved safe URL or no destination.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.53.14",
3
+ "version": "0.53.16",
4
4
  "type": "module",
5
5
  "description": "HTML Next UI components, native DOM support and design tokens.",
6
6
  "license": "MIT",
@@ -211,9 +211,19 @@
211
211
  box-shadow: none;
212
212
  background-image: none;
213
213
  }
214
- :scope:where(:is([component~="ui-button"]:not(template), [data-component~="ui-button"]:not([component])))[data-appearance="card"][size="lg"] {
214
+ :scope:where(:is([component~="ui-button"]:not(template), [data-component~="ui-button"]:not([component])))[data-ui-button-state~="size=lg"][data-appearance="card"] {
215
215
  min-block-size: max(var(--ui-control-min-block-size), var(--ui-control-size-lg));
216
216
  }
217
+ :scope:where(:is([component~="ui-button"]:not(template), [data-component~="ui-button"]:not([component])))[data-ui-button-state~="size=sm"][data-appearance="card"] {
218
+ min-block-size: var(--ui-control-size-sm);
219
+ align-items: center !important;
220
+ gap: var(--ui-space-2) !important;
221
+ }
222
+ :scope:where(:is([component~="ui-button"]:not(template), [data-component~="ui-button"]:not([component])))[data-ui-button-state~="fit"][data-appearance="card"] {
223
+ inline-size: fit-content;
224
+ min-inline-size: 0;
225
+ max-inline-size: 100%;
226
+ }
217
227
  :scope:where(:is([component~="ui-button"]:not(template), [data-component~="ui-button"]:not([component])))[data-appearance="card"]:has(.card-icon:empty) {
218
228
  grid-template-columns: minmax(0, 1fr) auto;
219
229
  }
@@ -12,6 +12,7 @@ export interface UiButtonElement extends HTMLElement {
12
12
  export interface UiButtonProps {
13
13
  align?: "center" | "start" | null;
14
14
  disabled?: boolean | null;
15
+ fit?: boolean | null;
15
16
  href?: string | null;
16
17
  interactionTone?: "inherit" | "accent" | "accent-secondary" | "accent-tertiary" | "neutral" | "danger" | "success" | "warning" | "info" | null;
17
18
  interactionVariant?: "inherit" | "outline" | "solid" | "ghost" | null;
@@ -25,21 +25,21 @@ const T18 = ["",[]];
25
25
  const T19 = ["",[]];
26
26
  let P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19;
27
27
  const S = { n: ["appearance","colorTone","interactionAppearance"], t: ["?","?","?"], f: import.meta.url, g: "ui-button", k: 0, r: readonlyView, a: (host, I) => C(host, I), b: generatedInputs };
28
- const A = [["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-interaction-tone","data-ui-button-prop-interaction-variant","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-selected","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","data-interaction-tone","data-interaction-appearance","data-selected","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-interaction-tone","data-ui-button-prop-interaction-variant","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-selected","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","data-interaction-tone","data-interaction-appearance","data-selected","type","disabled","aria-disabled","aria-busy"]],["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-interaction-tone","data-ui-button-prop-interaction-variant","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-selected","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","data-interaction-tone","data-interaction-appearance","data-selected","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-href","data-ui-button-prop-interaction-tone","data-ui-button-prop-interaction-variant","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-selected","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","data-interaction-tone","data-interaction-appearance","data-selected","type","disabled","aria-disabled","aria-busy"]]];
28
+ const A = [["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-fit","data-ui-button-prop-href","data-ui-button-prop-interaction-tone","data-ui-button-prop-interaction-variant","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-selected","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","data-interaction-tone","data-interaction-appearance","data-selected","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-fit","data-ui-button-prop-href","data-ui-button-prop-interaction-tone","data-ui-button-prop-interaction-variant","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-selected","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","data-interaction-tone","data-interaction-appearance","data-selected","type","disabled","aria-disabled","aria-busy"]],["a",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-fit","data-ui-button-prop-href","data-ui-button-prop-interaction-tone","data-ui-button-prop-interaction-variant","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-selected","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","data-interaction-tone","data-interaction-appearance","data-selected","href","target","rel","aria-disabled","aria-busy","tabindex"]],["button",{},[],"",[],["data-ui-button-state","data-ui-button-prop-align","data-ui-button-prop-disabled","data-ui-button-prop-fit","data-ui-button-prop-href","data-ui-button-prop-interaction-tone","data-ui-button-prop-interaction-variant","data-ui-button-prop-loading","data-ui-button-prop-pending","data-ui-button-prop-preset","data-ui-button-prop-rel","data-ui-button-prop-selected","data-ui-button-prop-shape","data-ui-button-prop-size","data-ui-button-prop-square","data-ui-button-prop-stretch","data-ui-button-prop-target","data-ui-button-prop-tone","data-ui-button-prop-type","data-ui-button-prop-variant","data-appearance","data-tone","data-interaction-tone","data-interaction-appearance","data-selected","type","disabled","aria-disabled","aria-busy"]]];
29
29
  const Q = [[],[],[],[]];
30
- const D = { g: "ui-button", props: { "align": { "required":false,"values":["center","start"],"default":"center", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "href": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "interactionTone": { "required":false,"values":["inherit","accent","accent-secondary","accent-tertiary","neutral","danger","success","warning","info"],"default":"inherit", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "interactionVariant": { "required":false,"values":["inherit","outline","solid","ghost"],"default":"inherit", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "loading": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "pending": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "preset": { "required":false,"values":["none","primary","standard","quiet","destructive"],"default":"none", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "rel": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "selected": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "shape": { "required":false,"values":["rounded","pill"],"default":"rounded", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "square": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "stretch": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "target": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "tone": { "required":false,"values":["accent","accent-secondary","accent-tertiary","neutral","danger","success","warning","info"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "type": { "required":false,"values":["button","submit","reset"],"default":"button", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outline","solid","danger","ghost","link","card","field"],"default":"outline", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
30
+ const D = { g: "ui-button", props: { "align": { "required":false,"values":["center","start"],"default":"center", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "disabled": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "fit": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "href": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "interactionTone": { "required":false,"values":["inherit","accent","accent-secondary","accent-tertiary","neutral","danger","success","warning","info"],"default":"inherit", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "interactionVariant": { "required":false,"values":["inherit","outline","solid","ghost"],"default":"inherit", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "loading": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "pending": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "preset": { "required":false,"values":["none","primary","standard","quiet","destructive"],"default":"none", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "rel": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "selected": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "shape": { "required":false,"values":["rounded","pill"],"default":"rounded", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "size": { "required":false,"values":["xs","sm","md","lg"],"default":"md", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "square": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "stretch": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "target": { "required":false, c: checkString, t: "string", j: 0, m: "s" }, "tone": { "required":false,"values":["accent","accent-secondary","accent-tertiary","neutral","danger","success","warning","info"],"default":"neutral", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "type": { "required":false,"values":["button","submit","reset"],"default":"button", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "variant": { "required":false,"values":["outline","solid","danger","ghost","link","card","field"],"default":"outline", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] } } };
31
31
  const C = (host) => activateModule(controller, host);
32
32
 
33
33
  export function createUiButton(options = {}, html) {
34
34
  const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
35
- const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["align","disabled","href","interaction-tone","interaction-variant","loading","pending","preset","rel","selected","shape","size","square","stretch","target","tone","type","variant"].includes(name)));
36
- const v = [undefined, undefined, undefined, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
35
+ const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["align","disabled","fit","href","interaction-tone","interaction-variant","loading","pending","preset","rel","selected","shape","size","square","stretch","target","tone","type","variant"].includes(name)));
36
+ const v = [undefined, undefined, undefined, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
37
37
  let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
38
38
  const CS = [];
39
- const inputStatus = (j) => { if (j >= 0 && j < 3) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 3) return awaitInput(B, "align", true); if (j === 4) return awaitInput(B, "disabled", true); if (j === 5) return awaitInput(B, "href", true); if (j === 6) return awaitInput(B, "interactionTone", true); if (j === 7) return awaitInput(B, "interactionVariant", true); if (j === 8) return awaitInput(B, "loading", true); if (j === 9) return awaitInput(B, "pending", true); if (j === 10) return awaitInput(B, "preset", true); if (j === 11) return awaitInput(B, "rel", true); if (j === 12) return awaitInput(B, "selected", true); if (j === 13) return awaitInput(B, "shape", true); if (j === 14) return awaitInput(B, "size", true); if (j === 15) return awaitInput(B, "square", true); if (j === 16) return awaitInput(B, "stretch", true); if (j === 17) return awaitInput(B, "target", true); if (j === 18) return awaitInput(B, "tone", true); if (j === 19) return awaitInput(B, "type", true); if (j === 20) return awaitInput(B, "variant", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
39
+ const inputStatus = (j) => { if (j >= 0 && j < 3) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 3) return awaitInput(B, "align", true); if (j === 4) return awaitInput(B, "disabled", true); if (j === 5) return awaitInput(B, "fit", true); if (j === 6) return awaitInput(B, "href", true); if (j === 7) return awaitInput(B, "interactionTone", true); if (j === 8) return awaitInput(B, "interactionVariant", true); if (j === 9) return awaitInput(B, "loading", true); if (j === 10) return awaitInput(B, "pending", true); if (j === 11) return awaitInput(B, "preset", true); if (j === 12) return awaitInput(B, "rel", true); if (j === 13) return awaitInput(B, "selected", true); if (j === 14) return awaitInput(B, "shape", true); if (j === 15) return awaitInput(B, "size", true); if (j === 16) return awaitInput(B, "square", true); if (j === 17) return awaitInput(B, "stretch", true); if (j === 18) return awaitInput(B, "target", true); if (j === 19) return awaitInput(B, "tone", true); if (j === 20) return awaitInput(B, "type", true); if (j === 21) return awaitInput(B, "variant", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
40
40
  const X = { e: 0, g: (j) => g(j), w: new Set(), a: CS, i: inputStatus };
41
41
  const ke = [];
42
- const K = [() => readIndex({ "none": inputRead(v[20], inputStatus(20)), "primary": "solid", "standard": "solid", "quiet": "ghost", "destructive": "solid" }, inputRead(v[10], inputStatus(10))), () => readIndex(recordValue(["none","primary","standard","quiet","destructive"], [readIndex({ "true": "danger", "false": inputRead(v[18], inputStatus(18)) }, textCall("concat", [equalValue(inputRead(v[20], inputStatus(20)), "danger")])), "accent", "neutral", "neutral", "danger"]), inputRead(v[10], inputStatus(10))), () => readIndex({ "true": null, "false": readIndex({ "inherit": inputRead(g(0), inputStatus(0)), "outline": "outline", "solid": "solid", "ghost": "ghost" }, inputRead(v[7], inputStatus(7))) }, textCall("concat", [(truthy(equalValue(inputRead(v[6], inputStatus(6)), "inherit")) && truthy(equalValue(inputRead(v[7], inputStatus(7)), "inherit")))]))];
42
+ const K = [() => readIndex({ "none": inputRead(v[21], inputStatus(21)), "primary": "solid", "standard": "solid", "quiet": "ghost", "destructive": "solid" }, inputRead(v[11], inputStatus(11))), () => readIndex(recordValue(["none","primary","standard","quiet","destructive"], [readIndex({ "true": "danger", "false": inputRead(v[19], inputStatus(19)) }, textCall("concat", [equalValue(inputRead(v[21], inputStatus(21)), "danger")])), "accent", "neutral", "neutral", "danger"]), inputRead(v[11], inputStatus(11))), () => readIndex({ "true": null, "false": readIndex({ "inherit": inputRead(g(0), inputStatus(0)), "outline": "outline", "solid": "solid", "ghost": "ghost" }, inputRead(v[8], inputStatus(8))) }, textCall("concat", [(truthy(equalValue(inputRead(v[7], inputStatus(7)), "inherit")) && truthy(equalValue(inputRead(v[8], inputStatus(8)), "inherit")))]))];
43
43
  const g = (j) => {
44
44
  const i = j - 0;
45
45
  if (ke[i] === X.e) return v[j];
@@ -52,7 +52,7 @@ export function createUiButton(options = {}, html) {
52
52
  if (!Object.is(previous, next)) { v[j] = next; X.n?.(j, previous, next); }
53
53
  return next;
54
54
  };
55
- let a = ((truthy(equalValue(g(0), "card")) && truthy(equalValue(v[5], null, true))) ? 0 : truthy(equalValue(g(0), "card")) ? 1 : truthy(equalValue(v[5], null, true)) ? 2 : 3);
55
+ let a = ((truthy(equalValue(g(0), "card")) && truthy(equalValue(v[6], null, true))) ? 0 : truthy(equalValue(g(0), "card")) ? 1 : truthy(equalValue(v[6], null, true)) ? 2 : 3);
56
56
  let element;
57
57
  if (a === 0) {
58
58
  element = document.createElement("a");
@@ -218,7 +218,7 @@ export function createUiButton(options = {}, html) {
218
218
  return r;
219
219
  };
220
220
  const p0 = (r, c, d) => {
221
- if (c & 1075191792) {
221
+ if (c & 1076641744) {
222
222
  resetForwardedAttributes(r.n, attributes, r.v0);
223
223
  r.v0 = forwardAttributes(r.n, attributes);
224
224
  const x0 = g(0);
@@ -230,7 +230,7 @@ export function createUiButton(options = {}, html) {
230
230
  const s2 = toAttribute(r.g2, "data-tone");
231
231
  writeAttribute(r.n, "data-tone", r.v2 = s2);
232
232
  }
233
- const x2 = readIndex({ "true": null, "false": v[6] }, textCall("concat", [equalValue(v[6], "inherit")]));
233
+ const x2 = readIndex({ "true": null, "false": v[7] }, textCall("concat", [equalValue(v[7], "inherit")]));
234
234
  if (x2 !== NONCONFORMING) r.g3 = x2;
235
235
  if (r.g3 !== NONCONFORMING) {
236
236
  const s3 = toAttribute(r.g3, "data-interaction-tone");
@@ -242,47 +242,47 @@ export function createUiButton(options = {}, html) {
242
242
  const s4 = toAttribute(r.g4, "data-interaction-appearance");
243
243
  writeAttribute(r.n, "data-interaction-appearance", r.v4 = s4);
244
244
  }
245
- const x4 = v[12];
245
+ const x4 = v[13];
246
246
  const s5 = toAttribute(x4, "data-selected");
247
247
  writeAttribute(r.n, "data-selected", r.v5 = s5);
248
- const x5 = readIndex({ "true": null, "false": v[5] }, textCall("concat", [((truthy(v[4]) || truthy(v[8])) || truthy(v[9]))]));
248
+ const x5 = readIndex({ "true": null, "false": v[6] }, textCall("concat", [((truthy(v[4]) || truthy(v[9])) || truthy(v[10]))]));
249
249
  if (x5 !== NONCONFORMING) r.g6 = x5;
250
250
  if (r.g6 !== NONCONFORMING) {
251
251
  const s6 = toAttribute(r.g6, "href");
252
252
  writeUrlAttribute(r.n, "href", r.v6 = s6);
253
253
  }
254
- const x6 = v[17];
254
+ const x6 = v[18];
255
255
  const s7 = toAttribute(x6, "target");
256
256
  writeAttribute(r.n, "target", r.v7 = s7);
257
- const x7 = v[11];
257
+ const x7 = v[12];
258
258
  const s8 = toAttribute(x7, "rel");
259
259
  writeAttribute(r.n, "rel", r.v8 = s8);
260
- const x8 = readIndex({ "true": "true", "false": null }, textCall("concat", [((truthy(v[4]) || truthy(v[8])) || truthy(v[9]))]));
260
+ const x8 = readIndex({ "true": "true", "false": null }, textCall("concat", [((truthy(v[4]) || truthy(v[9])) || truthy(v[10]))]));
261
261
  if (x8 !== NONCONFORMING) r.g9 = x8;
262
262
  if (r.g9 !== NONCONFORMING) {
263
263
  const s9 = toAttribute(r.g9, "aria-disabled");
264
264
  writeAttribute(r.n, "aria-disabled", r.v9 = s9);
265
265
  }
266
- const x9 = (truthy(v[8]) || truthy(v[9]));
266
+ const x9 = (truthy(v[9]) || truthy(v[10]));
267
267
  const s10 = toAttribute(x9, "aria-busy");
268
268
  writeAttribute(r.n, "aria-busy", r.v10 = s10);
269
- const x10 = readIndex({ "true": "0", "false": null }, textCall("concat", [((truthy(v[8]) || truthy(v[9])) && !truthy(v[4]))]));
269
+ const x10 = readIndex({ "true": "0", "false": null }, textCall("concat", [((truthy(v[9]) || truthy(v[10])) && !truthy(v[4]))]));
270
270
  if (x10 !== NONCONFORMING) r.g11 = x10;
271
271
  if (r.g11 !== NONCONFORMING) {
272
272
  const s11 = toAttribute(r.g11, "tabindex");
273
273
  writeAttribute(r.n, "tabindex", r.v11 = s11);
274
274
  }
275
275
  }
276
- if (c & 123656) {
277
- const x11 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[3], v[16], v[14], v[13], v[15], v[8], v[9]]);
276
+ if (c & 247336) {
277
+ const x11 = hostState(["align","stretch","size","shape","square","fit","loading","pending"], [v[3], v[17], v[15], v[14], v[16], v[5], v[9], v[10]]);
278
278
  const s12 = x11;
279
279
  if (s12 !== r.v12) writeAttribute(r.n, "data-ui-button-state", (r.v12 = s12) === "" ? null : s12);
280
280
  }
281
- if (c & 768 && !((truthy(v[8]) || truthy(v[9]))) !== !r.b0) {
281
+ if (c & 1536 && !((truthy(v[9]) || truthy(v[10]))) !== !r.b0) {
282
282
  if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
283
283
  else { r.b0 = m1(d); r.e0.before(r.b0.n); }
284
284
  } else if (r.b0 !== undefined) p1(r.b0, c, d);
285
- if (c & 768 && !(!(truthy(v[8]) || truthy(v[9]))) !== !r.b1) {
285
+ if (c & 1536 && !(!(truthy(v[9]) || truthy(v[10]))) !== !r.b1) {
286
286
  if (r.b1) { dispose(r.b1); r.b1 = undefined; clearRegion(r.a2, r.e1); }
287
287
  else { r.b1 = m2(d); r.e1.before(r.b1.n); }
288
288
  } else if (r.b1 !== undefined) p2(r.b1, c, d);
@@ -307,7 +307,7 @@ export function createUiButton(options = {}, html) {
307
307
  return r;
308
308
  };
309
309
  const p6 = (r, c, d) => {
310
- if (c & 1075582928) {
310
+ if (c & 1077424016) {
311
311
  resetForwardedAttributes(r.n, attributes, r.v0);
312
312
  r.v0 = forwardAttributes(r.n, attributes);
313
313
  const x0 = g(0);
@@ -319,7 +319,7 @@ export function createUiButton(options = {}, html) {
319
319
  const s2 = toAttribute(r.g2, "data-tone");
320
320
  writeAttribute(r.n, "data-tone", r.v2 = s2);
321
321
  }
322
- const x2 = readIndex({ "true": null, "false": v[6] }, textCall("concat", [equalValue(v[6], "inherit")]));
322
+ const x2 = readIndex({ "true": null, "false": v[7] }, textCall("concat", [equalValue(v[7], "inherit")]));
323
323
  if (x2 !== NONCONFORMING) r.g3 = x2;
324
324
  if (r.g3 !== NONCONFORMING) {
325
325
  const s3 = toAttribute(r.g3, "data-interaction-tone");
@@ -331,35 +331,35 @@ export function createUiButton(options = {}, html) {
331
331
  const s4 = toAttribute(r.g4, "data-interaction-appearance");
332
332
  writeAttribute(r.n, "data-interaction-appearance", r.v4 = s4);
333
333
  }
334
- const x4 = v[12];
334
+ const x4 = v[13];
335
335
  const s5 = toAttribute(x4, "data-selected");
336
336
  writeAttribute(r.n, "data-selected", r.v5 = s5);
337
- const x5 = v[19];
337
+ const x5 = v[20];
338
338
  const s6 = toAttribute(x5, "type");
339
339
  writeAttribute(r.n, "type", r.v6 = s6);
340
340
  const x6 = v[4];
341
341
  const s7 = toAttribute(x6, "disabled");
342
342
  writeAttribute(r.n, "disabled", r.v7 = s7);
343
- const x7 = readIndex({ "true": "true", "false": null }, textCall("concat", [(truthy(v[8]) || truthy(v[9]))]));
343
+ const x7 = readIndex({ "true": "true", "false": null }, textCall("concat", [(truthy(v[9]) || truthy(v[10]))]));
344
344
  if (x7 !== NONCONFORMING) r.g8 = x7;
345
345
  if (r.g8 !== NONCONFORMING) {
346
346
  const s8 = toAttribute(r.g8, "aria-disabled");
347
347
  writeAttribute(r.n, "aria-disabled", r.v8 = s8);
348
348
  }
349
- const x8 = (truthy(v[8]) || truthy(v[9]));
349
+ const x8 = (truthy(v[9]) || truthy(v[10]));
350
350
  const s9 = toAttribute(x8, "aria-busy");
351
351
  writeAttribute(r.n, "aria-busy", r.v9 = s9);
352
352
  }
353
- if (c & 123656) {
354
- const x9 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[3], v[16], v[14], v[13], v[15], v[8], v[9]]);
353
+ if (c & 247336) {
354
+ const x9 = hostState(["align","stretch","size","shape","square","fit","loading","pending"], [v[3], v[17], v[15], v[14], v[16], v[5], v[9], v[10]]);
355
355
  const s10 = x9;
356
356
  if (s10 !== r.v10) writeAttribute(r.n, "data-ui-button-state", (r.v10 = s10) === "" ? null : s10);
357
357
  }
358
- if (c & 768 && !((truthy(v[8]) || truthy(v[9]))) !== !r.b0) {
358
+ if (c & 1536 && !((truthy(v[9]) || truthy(v[10]))) !== !r.b0) {
359
359
  if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
360
360
  else { r.b0 = m7(d); r.e0.before(r.b0.n); }
361
361
  } else if (r.b0 !== undefined) p7(r.b0, c, d);
362
- if (c & 768 && !(!(truthy(v[8]) || truthy(v[9]))) !== !r.b1) {
362
+ if (c & 1536 && !(!(truthy(v[9]) || truthy(v[10]))) !== !r.b1) {
363
363
  if (r.b1) { dispose(r.b1); r.b1 = undefined; clearRegion(r.a2, r.e1); }
364
364
  else { r.b1 = m8(d); r.e1.before(r.b1.n); }
365
365
  } else if (r.b1 !== undefined) p8(r.b1, c, d);
@@ -381,7 +381,7 @@ export function createUiButton(options = {}, html) {
381
381
  return r;
382
382
  };
383
383
  const p12 = (r, c, d) => {
384
- if (c & 1075191792) {
384
+ if (c & 1076641744) {
385
385
  resetForwardedAttributes(r.n, attributes, r.v0);
386
386
  r.v0 = forwardAttributes(r.n, attributes);
387
387
  const x0 = g(0);
@@ -393,7 +393,7 @@ export function createUiButton(options = {}, html) {
393
393
  const s2 = toAttribute(r.g2, "data-tone");
394
394
  writeAttribute(r.n, "data-tone", r.v2 = s2);
395
395
  }
396
- const x2 = readIndex({ "true": null, "false": v[6] }, textCall("concat", [equalValue(v[6], "inherit")]));
396
+ const x2 = readIndex({ "true": null, "false": v[7] }, textCall("concat", [equalValue(v[7], "inherit")]));
397
397
  if (x2 !== NONCONFORMING) r.g3 = x2;
398
398
  if (r.g3 !== NONCONFORMING) {
399
399
  const s3 = toAttribute(r.g3, "data-interaction-tone");
@@ -405,43 +405,43 @@ export function createUiButton(options = {}, html) {
405
405
  const s4 = toAttribute(r.g4, "data-interaction-appearance");
406
406
  writeAttribute(r.n, "data-interaction-appearance", r.v4 = s4);
407
407
  }
408
- const x4 = v[12];
408
+ const x4 = v[13];
409
409
  const s5 = toAttribute(x4, "data-selected");
410
410
  writeAttribute(r.n, "data-selected", r.v5 = s5);
411
- const x5 = readIndex({ "true": null, "false": v[5] }, textCall("concat", [((truthy(v[4]) || truthy(v[8])) || truthy(v[9]))]));
411
+ const x5 = readIndex({ "true": null, "false": v[6] }, textCall("concat", [((truthy(v[4]) || truthy(v[9])) || truthy(v[10]))]));
412
412
  if (x5 !== NONCONFORMING) r.g6 = x5;
413
413
  if (r.g6 !== NONCONFORMING) {
414
414
  const s6 = toAttribute(r.g6, "href");
415
415
  writeUrlAttribute(r.n, "href", r.v6 = s6);
416
416
  }
417
- const x6 = v[17];
417
+ const x6 = v[18];
418
418
  const s7 = toAttribute(x6, "target");
419
419
  writeAttribute(r.n, "target", r.v7 = s7);
420
- const x7 = v[11];
420
+ const x7 = v[12];
421
421
  const s8 = toAttribute(x7, "rel");
422
422
  writeAttribute(r.n, "rel", r.v8 = s8);
423
- const x8 = readIndex({ "true": "true", "false": null }, textCall("concat", [((truthy(v[4]) || truthy(v[8])) || truthy(v[9]))]));
423
+ const x8 = readIndex({ "true": "true", "false": null }, textCall("concat", [((truthy(v[4]) || truthy(v[9])) || truthy(v[10]))]));
424
424
  if (x8 !== NONCONFORMING) r.g9 = x8;
425
425
  if (r.g9 !== NONCONFORMING) {
426
426
  const s9 = toAttribute(r.g9, "aria-disabled");
427
427
  writeAttribute(r.n, "aria-disabled", r.v9 = s9);
428
428
  }
429
- const x9 = (truthy(v[8]) || truthy(v[9]));
429
+ const x9 = (truthy(v[9]) || truthy(v[10]));
430
430
  const s10 = toAttribute(x9, "aria-busy");
431
431
  writeAttribute(r.n, "aria-busy", r.v10 = s10);
432
- const x10 = readIndex({ "true": "0", "false": null }, textCall("concat", [((truthy(v[8]) || truthy(v[9])) && !truthy(v[4]))]));
432
+ const x10 = readIndex({ "true": "0", "false": null }, textCall("concat", [((truthy(v[9]) || truthy(v[10])) && !truthy(v[4]))]));
433
433
  if (x10 !== NONCONFORMING) r.g11 = x10;
434
434
  if (r.g11 !== NONCONFORMING) {
435
435
  const s11 = toAttribute(r.g11, "tabindex");
436
436
  writeAttribute(r.n, "tabindex", r.v11 = s11);
437
437
  }
438
438
  }
439
- if (c & 123656) {
440
- const x11 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[3], v[16], v[14], v[13], v[15], v[8], v[9]]);
439
+ if (c & 247336) {
440
+ const x11 = hostState(["align","stretch","size","shape","square","fit","loading","pending"], [v[3], v[17], v[15], v[14], v[16], v[5], v[9], v[10]]);
441
441
  const s12 = x11;
442
442
  if (s12 !== r.v12) writeAttribute(r.n, "data-ui-button-state", (r.v12 = s12) === "" ? null : s12);
443
443
  }
444
- if (c & 768 && !((truthy(v[8]) || truthy(v[9]))) !== !r.b0) {
444
+ if (c & 1536 && !((truthy(v[9]) || truthy(v[10]))) !== !r.b0) {
445
445
  if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
446
446
  else { r.b0 = m13(d); r.e0.before(r.b0.n); }
447
447
  } else if (r.b0 !== undefined) p13(r.b0, c, d);
@@ -463,7 +463,7 @@ export function createUiButton(options = {}, html) {
463
463
  return r;
464
464
  };
465
465
  const p16 = (r, c, d) => {
466
- if (c & 1075582928) {
466
+ if (c & 1077424016) {
467
467
  resetForwardedAttributes(r.n, attributes, r.v0);
468
468
  r.v0 = forwardAttributes(r.n, attributes);
469
469
  const x0 = g(0);
@@ -475,7 +475,7 @@ export function createUiButton(options = {}, html) {
475
475
  const s2 = toAttribute(r.g2, "data-tone");
476
476
  writeAttribute(r.n, "data-tone", r.v2 = s2);
477
477
  }
478
- const x2 = readIndex({ "true": null, "false": v[6] }, textCall("concat", [equalValue(v[6], "inherit")]));
478
+ const x2 = readIndex({ "true": null, "false": v[7] }, textCall("concat", [equalValue(v[7], "inherit")]));
479
479
  if (x2 !== NONCONFORMING) r.g3 = x2;
480
480
  if (r.g3 !== NONCONFORMING) {
481
481
  const s3 = toAttribute(r.g3, "data-interaction-tone");
@@ -487,31 +487,31 @@ export function createUiButton(options = {}, html) {
487
487
  const s4 = toAttribute(r.g4, "data-interaction-appearance");
488
488
  writeAttribute(r.n, "data-interaction-appearance", r.v4 = s4);
489
489
  }
490
- const x4 = v[12];
490
+ const x4 = v[13];
491
491
  const s5 = toAttribute(x4, "data-selected");
492
492
  writeAttribute(r.n, "data-selected", r.v5 = s5);
493
- const x5 = v[19];
493
+ const x5 = v[20];
494
494
  const s6 = toAttribute(x5, "type");
495
495
  writeAttribute(r.n, "type", r.v6 = s6);
496
496
  const x6 = v[4];
497
497
  const s7 = toAttribute(x6, "disabled");
498
498
  writeAttribute(r.n, "disabled", r.v7 = s7);
499
- const x7 = readIndex({ "true": "true", "false": null }, textCall("concat", [(truthy(v[8]) || truthy(v[9]))]));
499
+ const x7 = readIndex({ "true": "true", "false": null }, textCall("concat", [(truthy(v[9]) || truthy(v[10]))]));
500
500
  if (x7 !== NONCONFORMING) r.g8 = x7;
501
501
  if (r.g8 !== NONCONFORMING) {
502
502
  const s8 = toAttribute(r.g8, "aria-disabled");
503
503
  writeAttribute(r.n, "aria-disabled", r.v8 = s8);
504
504
  }
505
- const x8 = (truthy(v[8]) || truthy(v[9]));
505
+ const x8 = (truthy(v[9]) || truthy(v[10]));
506
506
  const s9 = toAttribute(x8, "aria-busy");
507
507
  writeAttribute(r.n, "aria-busy", r.v9 = s9);
508
508
  }
509
- if (c & 123656) {
510
- const x9 = hostState(["align","stretch","size","shape","square","loading","pending"], [v[3], v[16], v[14], v[13], v[15], v[8], v[9]]);
509
+ if (c & 247336) {
510
+ const x9 = hostState(["align","stretch","size","shape","square","fit","loading","pending"], [v[3], v[17], v[15], v[14], v[16], v[5], v[9], v[10]]);
511
511
  const s10 = x9;
512
512
  if (s10 !== r.v10) writeAttribute(r.n, "data-ui-button-state", (r.v10 = s10) === "" ? null : s10);
513
513
  }
514
- if (c & 768 && !((truthy(v[8]) || truthy(v[9]))) !== !r.b0) {
514
+ if (c & 1536 && !((truthy(v[9]) || truthy(v[10]))) !== !r.b0) {
515
515
  if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
516
516
  else { r.b0 = m17(d); r.e0.before(r.b0.n); }
517
517
  } else if (r.b0 !== undefined) p17(r.b0, c, d);
@@ -527,8 +527,8 @@ export function createUiButton(options = {}, html) {
527
527
  const p = (c, d) => {
528
528
  if (R === null) return;
529
529
  if (R === undefined) { R = M[a](element, d); return; }
530
- if (c & 1074791456) {
531
- const t = ((truthy(equalValue(g(0), "card")) && truthy(equalValue(v[5], null, true))) ? 0 : truthy(equalValue(g(0), "card")) ? 1 : truthy(equalValue(v[5], null, true)) ? 2 : 3);
530
+ if (c & 1075841088) {
531
+ const t = ((truthy(equalValue(g(0), "card")) && truthy(equalValue(v[6], null, true))) ? 0 : truthy(equalValue(g(0), "card")) ? 1 : truthy(equalValue(v[6], null, true)) ? 2 : 3);
532
532
  if (t !== a) {
533
533
  dispose(R);
534
534
  for (const key in I.r) delete I.r[key];
@@ -551,4 +551,4 @@ export function createUiButton(options = {}, html) {
551
551
  manageProps(I);
552
552
  return element;
553
553
  }
554
- defineComponent("ui-button", createUiButton, ["align","disabled","href","interactionTone","interactionVariant","loading","pending","preset","rel","selected","shape","size","square","stretch","target","tone","type","variant"]);
554
+ defineComponent("ui-button", createUiButton, ["align","disabled","fit","href","interactionTone","interactionVariant","loading","pending","preset","rel","selected","shape","size","square","stretch","target","tone","type","variant"]);
@@ -7,6 +7,7 @@ export interface UiEditorEventMap {
7
7
  "selection-action": CustomEvent<{ readonly id: string; readonly from: number; readonly to: number; readonly text: string; readonly before: string; readonly after: string }>;
8
8
  "range-action": CustomEvent<{ readonly id: string; readonly ranges: readonly ({ readonly from: number; readonly to: number })[] }>;
9
9
  "upload-error": CustomEvent<{ readonly error: unknown; readonly file: unknown }>;
10
+ "file-delete-error": CustomEvent<{ readonly error: unknown; readonly file: unknown }>;
10
11
  "image-activate": CustomEvent<{ readonly src: string; readonly trigger: "pointer" | "keyboard"; readonly [name: string]: unknown }>;
11
12
  "image-rendition-error": CustomEvent<{ readonly src: string; readonly trigger: "programmatic"; readonly [name: string]: unknown }>;
12
13
  extensions: RequestEvent<null, readonly (unknown)[]>;
@@ -17,6 +18,8 @@ export interface UiEditorEventMap {
17
18
  "image-upload": RequestEvent<{ readonly file: unknown }, { readonly src: string; readonly [name: string]: unknown }>;
18
19
  "file-upload": RequestEvent<{ readonly file: unknown }, { readonly href: string; readonly name: string; readonly size: number; readonly contentType: string; readonly [name: string]: unknown }>;
19
20
  "code-languages": RequestEvent<null, { readonly [name: string]: unknown }>;
21
+ "file-delete-confirm": RequestEvent<{ readonly file: unknown }, { readonly confirmed: boolean }>;
22
+ "file-delete": RequestEvent<{ readonly file: unknown }, { readonly deleted: boolean }>;
20
23
  "image-delivery": RequestEvent<null, unknown>;
21
24
  }
22
25
  export interface UiEditorElement extends HTMLDivElement {
@@ -43,7 +43,7 @@ const T36 = ["ui-editor-table-overlay",["open",""]];
43
43
  const T37 = ["div",["class","looma-editor__table-menu-shell"],"\n ",["ui-editor-table-context-menu",["open",""]],"\n "];
44
44
  let P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37;
45
45
  const emptyDirty = new Map();
46
- const S = { n: ["view"], t: [["o",[],1]], f: import.meta.url, g: "ui-editor", d: { "change": [detailCheck(checkObject([["content", checkObject([["type", checkString, false]], true), false]], false)), true, true, false], "toolbar-open": [detailCheck(checkObject([], true)), true, true, false], "toolbar-close": [detailCheck(checkObject([], true)), true, true, false], "selection-action": [detailCheck(checkObject([["id", checkString, false], ["from", checkInteger, false], ["to", checkInteger, false], ["text", checkString, false], ["before", checkString, false], ["after", checkString, false]], false)), true, true, false], "range-action": [detailCheck(checkObject([["id", checkString, false], ["ranges", checkList(checkObject([["from", checkInteger, false], ["to", checkInteger, false]], false)), false]], false)), true, true, false], "upload-error": [detailCheck(checkObject([["error", checkUnknown, false], ["file", checkUnknown, false]], false)), true, true, false], "image-activate": [detailCheck(checkObject([["src", checkString, false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["pointer","keyboard"]}), false]], true)), true, true, false], "image-rendition-error": [detailCheck(checkObject([["src", checkString, false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["programmatic"]}), false]], true)), true, true, false] }, x: dispatchDeclared, q: { "extensions": [(v0) => v0 === null, (v0) => (Array.isArray(v0) && v0.every((v1) => true))], "slash-commands": [(v0) => (plainObject(v0) && "defaults" in v0 && (Array.isArray(v0["defaults"]) && v0["defaults"].every((v1) => true)) && Object.keys(v0).every((v1) => ["defaults"].includes(v1))), (v0) => (Array.isArray(v0) && v0.every((v1) => true))], "mention-query": [(v0) => (plainObject(v0) && "query" in v0 && typeof v0["query"] == "string" && "limit" in v0 && Number.isInteger(v0["limit"]) && Object.keys(v0).every((v1) => ["query","limit"].includes(v1))), (v0) => (Array.isArray(v0) && v0.every((v1) => (plainObject(v1) && "id" in v1 && typeof v1["id"] == "string" && "label" in v1 && typeof v1["label"] == "string" && (v1["detail"] == null || typeof v1["detail"] == "string") && (v1["initials"] == null || typeof v1["initials"] == "string") && Object.keys(v1).every((v2) => ["id","label","detail","initials"].includes(v2)))))], "link-search": [(v0) => (plainObject(v0) && "query" in v0 && typeof v0["query"] == "string" && Object.keys(v0).every((v1) => ["query"].includes(v1))), (v0) => (Array.isArray(v0) && v0.every((v1) => (plainObject(v1) && "id" in v1 && typeof v1["id"] == "string" && "label" in v1 && typeof v1["label"] == "string" && "href" in v1 && typeof v1["href"] == "string" && (v1["detail"] == null || typeof v1["detail"] == "string") && Object.keys(v1).every((v2) => ["id","label","href","detail"].includes(v2)))))], "link-resolve": [(v0) => (plainObject(v0) && "href" in v0 && typeof v0["href"] == "string" && Object.keys(v0).every((v1) => ["href"].includes(v1))), (v0) => (plainObject(v0) && "id" in v0 && typeof v0["id"] == "string" && "label" in v0 && typeof v0["label"] == "string" && "href" in v0 && typeof v0["href"] == "string" && (v0["detail"] == null || typeof v0["detail"] == "string") && Object.keys(v0).every((v1) => ["id","label","href","detail"].includes(v1)))], "image-upload": [(v0) => (plainObject(v0) && "file" in v0 && true && Object.keys(v0).every((v1) => ["file"].includes(v1))), (v0) => (plainObject(v0) && "src" in v0 && typeof v0["src"] == "string")], "file-upload": [(v0) => (plainObject(v0) && "file" in v0 && true && Object.keys(v0).every((v1) => ["file"].includes(v1))), (v0) => (plainObject(v0) && "href" in v0 && typeof v0["href"] == "string" && "name" in v0 && typeof v0["name"] == "string" && "size" in v0 && Number.isFinite(v0["size"]) && "contentType" in v0 && typeof v0["contentType"] == "string")], "code-languages": [(v0) => v0 === null, (v0) => (plainObject(v0))], "image-delivery": [(v0) => v0 === null, (v0) => true] }, a: (host, I) => C(host, I), b: generatedInputs, i: [{ }] };
46
+ const S = { n: ["view"], t: [["o",[],1]], f: import.meta.url, g: "ui-editor", d: { "change": [detailCheck(checkObject([["content", checkObject([["type", checkString, false]], true), false]], false)), true, true, false], "toolbar-open": [detailCheck(checkObject([], true)), true, true, false], "toolbar-close": [detailCheck(checkObject([], true)), true, true, false], "selection-action": [detailCheck(checkObject([["id", checkString, false], ["from", checkInteger, false], ["to", checkInteger, false], ["text", checkString, false], ["before", checkString, false], ["after", checkString, false]], false)), true, true, false], "range-action": [detailCheck(checkObject([["id", checkString, false], ["ranges", checkList(checkObject([["from", checkInteger, false], ["to", checkInteger, false]], false)), false]], false)), true, true, false], "upload-error": [detailCheck(checkObject([["error", checkUnknown, false], ["file", checkUnknown, false]], false)), true, true, false], "file-delete-error": [detailCheck(checkObject([["error", checkUnknown, false], ["file", checkUnknown, false]], false)), true, true, false], "image-activate": [detailCheck(checkObject([["src", checkString, false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["pointer","keyboard"]}), false]], true)), true, true, false], "image-rendition-error": [detailCheck(checkObject([["src", checkString, false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["programmatic"]}), false]], true)), true, true, false] }, x: dispatchDeclared, q: { "extensions": [(v0) => v0 === null, (v0) => (Array.isArray(v0) && v0.every((v1) => true))], "slash-commands": [(v0) => (plainObject(v0) && "defaults" in v0 && (Array.isArray(v0["defaults"]) && v0["defaults"].every((v1) => true)) && Object.keys(v0).every((v1) => ["defaults"].includes(v1))), (v0) => (Array.isArray(v0) && v0.every((v1) => true))], "mention-query": [(v0) => (plainObject(v0) && "query" in v0 && typeof v0["query"] == "string" && "limit" in v0 && Number.isInteger(v0["limit"]) && Object.keys(v0).every((v1) => ["query","limit"].includes(v1))), (v0) => (Array.isArray(v0) && v0.every((v1) => (plainObject(v1) && "id" in v1 && typeof v1["id"] == "string" && "label" in v1 && typeof v1["label"] == "string" && (v1["detail"] == null || typeof v1["detail"] == "string") && (v1["initials"] == null || typeof v1["initials"] == "string") && Object.keys(v1).every((v2) => ["id","label","detail","initials"].includes(v2)))))], "link-search": [(v0) => (plainObject(v0) && "query" in v0 && typeof v0["query"] == "string" && Object.keys(v0).every((v1) => ["query"].includes(v1))), (v0) => (Array.isArray(v0) && v0.every((v1) => (plainObject(v1) && "id" in v1 && typeof v1["id"] == "string" && "label" in v1 && typeof v1["label"] == "string" && "href" in v1 && typeof v1["href"] == "string" && (v1["detail"] == null || typeof v1["detail"] == "string") && Object.keys(v1).every((v2) => ["id","label","href","detail"].includes(v2)))))], "link-resolve": [(v0) => (plainObject(v0) && "href" in v0 && typeof v0["href"] == "string" && Object.keys(v0).every((v1) => ["href"].includes(v1))), (v0) => (plainObject(v0) && "id" in v0 && typeof v0["id"] == "string" && "label" in v0 && typeof v0["label"] == "string" && "href" in v0 && typeof v0["href"] == "string" && (v0["detail"] == null || typeof v0["detail"] == "string") && Object.keys(v0).every((v1) => ["id","label","href","detail"].includes(v1)))], "image-upload": [(v0) => (plainObject(v0) && "file" in v0 && true && Object.keys(v0).every((v1) => ["file"].includes(v1))), (v0) => (plainObject(v0) && "src" in v0 && typeof v0["src"] == "string")], "file-upload": [(v0) => (plainObject(v0) && "file" in v0 && true && Object.keys(v0).every((v1) => ["file"].includes(v1))), (v0) => (plainObject(v0) && "href" in v0 && typeof v0["href"] == "string" && "name" in v0 && typeof v0["name"] == "string" && "size" in v0 && Number.isFinite(v0["size"]) && "contentType" in v0 && typeof v0["contentType"] == "string")], "code-languages": [(v0) => v0 === null, (v0) => (plainObject(v0))], "file-delete-confirm": [(v0) => (plainObject(v0) && "file" in v0 && true && Object.keys(v0).every((v1) => ["file"].includes(v1))), (v0) => (plainObject(v0) && "confirmed" in v0 && typeof v0["confirmed"] == "boolean" && Object.keys(v0).every((v1) => ["confirmed"].includes(v1)))], "file-delete": [(v0) => (plainObject(v0) && "file" in v0 && true && Object.keys(v0).every((v1) => ["file"].includes(v1))), (v0) => (plainObject(v0) && "deleted" in v0 && typeof v0["deleted"] == "boolean" && Object.keys(v0).every((v1) => ["deleted"].includes(v1)))], "image-delivery": [(v0) => v0 === null, (v0) => true] }, a: (host, I) => C(host, I), b: generatedInputs, i: [{ }] };
47
47
  const D = { g: "ui-editor", props: { "compactToolbar": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "content": { "required":false,"default":{"type":"doc","content":[{"type":"paragraph"}]}, c: checkObject([["type", checkString, false]], true), j: 1, m: ["o",["type","s"],1] }, "contentDensity": { "required":false,"values":["comfortable","compact"],"default":"comfortable", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "disableHighlight": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "editable": { "required":false,"default":true, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "label": { "required":false,"default":"Document", c: checkString, t: "string", j: 0, m: "s" }, "linkBaseUrl": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "linkTargetLabel": { "required":false,"default":"Item", c: checkString, t: "string", j: 0, m: "s" }, "mentionItems": { "required":false,"default":[], c: checkList(checkObject([["id", checkString, false], ["label", checkString, false], ["detail", checkString, true], ["initials", checkString, true]], false)), j: 1, m: ["l",["o",["id","s","label","s","detail","s","initials","s"]]] }, "mentionLimit": { "required":false,"default":8, c: checkInteger, t: "integer", j: 0, m: "i" }, "placeholder": { "required":false,"default":"Type “/” for commands, or start writing…", c: checkString, t: "string", j: 0, m: "s" }, "rangeActions": { "required":false,"default":[], c: checkList(checkObject([["id", checkString, false], ["label", checkString, false], ["from", checkInteger, false], ["to", checkInteger, false]], false)), j: 1, m: ["l",["o",["id","s","label","s","from","i","to","i"]]] }, "references": { "required":false, c: checkObject([], true), j: 1, m: ["o",[],1] }, "selectionActions": { "required":false,"default":[], c: checkList(checkObject([["id", checkString, false], ["label", checkString, false]], false)), j: 1, m: ["l",["o",["id","s","label","s"]]] }, "toolbarMode": { "required":false,"values":["bubble","sticky","popover","contextual"],"default":"bubble", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "toolbarOpen": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "toolbarTriggerId": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" } } };
48
48
  const C = (host, I) => activateModule(controller, requestHost(host, I));
49
49