@threadlabs/looma 0.28.7 → 0.28.8
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/components/ui-editor-link-form/ui-editor-link-form.html +118 -0
- package/components/ui-editor-link-form/ui-editor-link-form.js +71 -0
- package/dist/index.js +33 -32
- package/package.json +1 -1
- package/styles/ui-editor-link-form.css +1 -0
- package/vanilla/UiEditorLinkForm.d.ts +32 -0
- package/vanilla/UiEditorLinkForm.js +354 -0
- package/vanilla/index.js +1 -0
- package/vue/UiEditorLinkForm.d.ts +165 -0
- package/vue/UiEditorLinkForm.js +2 -0
- package/vue/UiEditorLinkForm.vue +557 -0
- package/vue/chunks/UiEditorLinkForm.js +669 -0
- package/vue/components.css +407 -407
- package/vue/editor/index.js +72 -159
- package/vue/editor/primitives.d.ts +17 -1
- package/vue/index.d.ts +1 -0
- package/vue/index.js +4 -3
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* Generated by HTML Next 1.0.0-alpha.51. Do not edit. */
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.51 for Vanilla DOM. Do not edit.
|
|
2
|
+
export interface UiEditorLinkFormEventMap {
|
|
3
|
+
destination: CustomEvent<{ readonly value: string }>;
|
|
4
|
+
text: CustomEvent<{ readonly text: string }>;
|
|
5
|
+
"new-tab": CustomEvent<{ readonly newTab: boolean }>;
|
|
6
|
+
choose: CustomEvent<{ readonly id: string }>;
|
|
7
|
+
clear: CustomEvent<Readonly<Record<string, unknown>>>;
|
|
8
|
+
save: CustomEvent<Readonly<Record<string, unknown>>>;
|
|
9
|
+
dismiss: CustomEvent<Readonly<Record<string, unknown>>>;
|
|
10
|
+
}
|
|
11
|
+
export interface UiEditorLinkFormElement extends HTMLFormElement {
|
|
12
|
+
addEventListener<K extends keyof UiEditorLinkFormEventMap>(type: K, listener: (this: UiEditorLinkFormElement, event: UiEditorLinkFormEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
13
|
+
removeEventListener<K extends keyof UiEditorLinkFormEventMap>(type: K, listener: (this: UiEditorLinkFormElement, event: UiEditorLinkFormEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
14
|
+
}
|
|
15
|
+
export interface UiEditorLinkFormProps {
|
|
16
|
+
error?: string | null;
|
|
17
|
+
existing?: boolean | null;
|
|
18
|
+
mode?: "url" | "target" | null;
|
|
19
|
+
newTab?: boolean | null;
|
|
20
|
+
placeholder?: string | null;
|
|
21
|
+
results?: readonly ({ readonly id: string; readonly label: string; readonly detail?: string })[] | null;
|
|
22
|
+
searchable?: boolean | null;
|
|
23
|
+
selected?: string | null;
|
|
24
|
+
status?: string | null;
|
|
25
|
+
text?: string | null;
|
|
26
|
+
textEditable?: boolean | null;
|
|
27
|
+
value?: string | null;
|
|
28
|
+
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
29
|
+
children?: readonly (string | Node)[];
|
|
30
|
+
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
|
31
|
+
}
|
|
32
|
+
export declare function createUiEditorLinkForm(props?: UiEditorLinkFormProps): UiEditorLinkFormElement;
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.51 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, buildTemplate, clearRegion, KeyedList, NONCONFORMING, readIndex, readMember, textCall, toAttribute, toText, trackContainer, truthy, writeAttribute, computedCycle, dispatchDeclared, detailCheck, formatOf, keywordFormat, acceptProps, manageProps, readonlyView, checkBoolean, checkFormat, checkList, checkObject, checkRecord, checkString, checkUnknown } from "@nextwebwg/html-next/generated-runtime";
|
|
3
|
+
import * as controller from "../components/ui-editor-link-form/ui-editor-link-form.js";
|
|
4
|
+
import "../styles/ui-editor-link-form.css";
|
|
5
|
+
|
|
6
|
+
const T0 = ["",[],["ui-stack",["gap","s"],["ui-text",["as","h3","size","sm","weight","semibold"],0],["ui-stack",["gap","s"],["ui-form-field",[],["label",["slot","label"],0],1,1],1,1],1,1]];
|
|
7
|
+
const T1 = ["ui-input-group",["prefix-kind","icon"],["ui-icon",["slot","prefix"]],["ui-input",["data-link-destination","","data-link-search","","type","text","role","searchbox","autocomplete","off"]],1];
|
|
8
|
+
const T2 = ["ui-icon-button",["slot","action","label","Clear search","variant","ghost","size","sm","data-link-clear",""],["ui-icon",["name","x"]]];
|
|
9
|
+
const T3 = ["",[],["ui-input",["data-link-destination","","type","text","inputmode","url","size","sm"]]];
|
|
10
|
+
const T4 = ["ui-scroll-area",["size","sm","aria-label","Destination search results"],1,2];
|
|
11
|
+
const T5 = ["ui-text",["size","sm","tone","secondary","role","status"],0];
|
|
12
|
+
const T6 = ["ui-search-result-row",["density","compact","data-link-result",""],["ui-icon",["slot","leading","name","file-text"]],["ui-text",["slot","title","as","strong","size","sm","weight","medium"],0],1,1];
|
|
13
|
+
const T7 = ["ui-text",["slot","meta","as","span","size","xs","tone","secondary"],0];
|
|
14
|
+
const T8 = ["ui-icon",["slot","trailing","name","check"]];
|
|
15
|
+
const T9 = ["",[],["ui-checkbox",["size","sm","data-link-new-tab",""],"Open in new tab"]];
|
|
16
|
+
const T10 = ["",[],["ui-form-field",[],["label",["slot","label"],"Text"],["ui-input",["data-link-text","","size","sm"]]]];
|
|
17
|
+
const T11 = ["ui-text",["size","sm","tone","danger","role","alert"],0];
|
|
18
|
+
let P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11;
|
|
19
|
+
const E = new Map();
|
|
20
|
+
const S = { n: ["base","heading","fieldLabel"], t: ["s","?","?"], f: import.meta.url, g: "ui-editor-link-form", k: 1, d: { "destination": [detailCheck(checkObject([["value", checkString, false]], false)), true, true, false], "text": [detailCheck(checkObject([["text", checkString, false]], false)), true, true, false], "new-tab": [detailCheck(checkObject([["newTab", checkBoolean, false]], false)), true, true, false], "choose": [detailCheck(checkObject([["id", checkString, false]], false)), true, true, false], "clear": [detailCheck(checkRecord(checkUnknown)), true, true, false], "save": [detailCheck(checkRecord(checkUnknown)), true, true, false], "dismiss": [detailCheck(checkRecord(checkUnknown)), true, true, false] }, x: dispatchDeclared, r: readonlyView };
|
|
21
|
+
const D = { props: { "error": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "existing": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "mode": { "required":false,"values":["url","target"],"default":"url", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat),false] }, "newTab": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "placeholder": { "required":false,"default":"https://example.com", c: checkString, t: "string", j: 0, m: "s" }, "results": { "required":false,"default":[], c: checkList(checkObject([["id", checkString, false], ["label", checkString, false], ["detail", checkString, true]], false)), j: 1, m: ["l",["o",["id","s","label","s","detail","s"]]] }, "searchable": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "selected": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "status": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "text": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "textEditable": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "value": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" } } };
|
|
22
|
+
const C = (host) => controller.default(host);
|
|
23
|
+
|
|
24
|
+
export function createUiEditorLinkForm(options = {}, html) {
|
|
25
|
+
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
26
|
+
const element = document.createElement("form");
|
|
27
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
28
|
+
if (value === null || value === undefined || value === false) continue;
|
|
29
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
30
|
+
}
|
|
31
|
+
if (!element.hasAttribute("aria-label")) element.setAttribute("aria-label", "Edit link");
|
|
32
|
+
element.setAttribute("data-component", "ui-editor-link-form");
|
|
33
|
+
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
34
|
+
const v = ["ui-editor-link-form", undefined, undefined, null, null, null, null, null, null, null, null, null, null, null, null];
|
|
35
|
+
const B = acceptProps(element, D, S.n, v, componentProps, [], html);
|
|
36
|
+
const X = { e: 0, g: (j) => g(j), w: new Set() };
|
|
37
|
+
const ke = [];
|
|
38
|
+
const K = [() => readIndex({ "true": "Edit link", "false": "Add link" }, textCall("concat", [v[4]])), () => readIndex({ "true": "Link destination", "false": "URL" }, textCall("concat", [v[9]]))];
|
|
39
|
+
const g = (j) => {
|
|
40
|
+
const i = j - 1;
|
|
41
|
+
if (ke[i] === X.e) return v[j];
|
|
42
|
+
if (ke[i] === -1) computedCycle();
|
|
43
|
+
ke[i] = -1;
|
|
44
|
+
let next;
|
|
45
|
+
try { next = K[i](); } catch (error) { ke[i] = undefined; throw error; }
|
|
46
|
+
ke[i] = X.e;
|
|
47
|
+
const previous = v[j];
|
|
48
|
+
if (!Object.is(previous, next)) { v[j] = next; X.n?.(j, previous, next); }
|
|
49
|
+
return next;
|
|
50
|
+
};
|
|
51
|
+
const m1 = (d) => {
|
|
52
|
+
const n = (P1 ??= buildTemplate(T1)).cloneNode(true);
|
|
53
|
+
const t0 = n.firstChild;
|
|
54
|
+
const t1 = t0.nextSibling;
|
|
55
|
+
const t2 = t1.nextSibling;
|
|
56
|
+
const r = { n, a0: t0, a1: t1, v0: null, v1: null, v2: null, v3: null, a2: t2, e0: t2.nextSibling, b0: undefined };
|
|
57
|
+
p1(r, -1, d);
|
|
58
|
+
return r;
|
|
59
|
+
};
|
|
60
|
+
const p1 = (r, c, d) => {
|
|
61
|
+
if (c & 1073741856) {
|
|
62
|
+
const x0 = readIndex({ "true": "search", "false": "link" }, textCall("concat", [(v[5] === "target")]));
|
|
63
|
+
if (x0 !== NONCONFORMING) {
|
|
64
|
+
const s0 = toAttribute(x0, "name");
|
|
65
|
+
if (s0 !== r.v0) writeAttribute(r.a0, "name", r.v0 = s0);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (c & 1) {
|
|
69
|
+
const x1 = textCall("concat", [v[0], "-destination"]);
|
|
70
|
+
if (x1 !== NONCONFORMING) {
|
|
71
|
+
const s1 = toAttribute(x1, "id");
|
|
72
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "id", r.v1 = s1);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (c & 128) {
|
|
76
|
+
const x2 = v[7];
|
|
77
|
+
const s2 = toAttribute(x2, "placeholder");
|
|
78
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "placeholder", r.v2 = s2);
|
|
79
|
+
}
|
|
80
|
+
if (c & 16384) {
|
|
81
|
+
const x3 = v[14];
|
|
82
|
+
const s3 = toAttribute(x3, "value");
|
|
83
|
+
if (s3 !== r.v3) writeAttribute(r.a1, "value", r.v3 = s3);
|
|
84
|
+
}
|
|
85
|
+
if (c & 16384 && !((v[14] !== "")) !== !r.b0) {
|
|
86
|
+
if (r.b0) { r.b0 = undefined; clearRegion(r.a2, r.e0); }
|
|
87
|
+
else { r.b0 = m2(d); r.e0.before(r.b0.n); }
|
|
88
|
+
} else if (r.b0 !== undefined) p2(r.b0, c, d);
|
|
89
|
+
};
|
|
90
|
+
const m2 = (d) => {
|
|
91
|
+
const n = (P2 ??= buildTemplate(T2)).cloneNode(true);
|
|
92
|
+
const r = { n };
|
|
93
|
+
p2(r, -1, d);
|
|
94
|
+
return r;
|
|
95
|
+
};
|
|
96
|
+
const p2 = (r, c, d) => {
|
|
97
|
+
};
|
|
98
|
+
const m3 = (d) => {
|
|
99
|
+
const n = (P3 ??= buildTemplate(T3)).cloneNode(true);
|
|
100
|
+
const t0 = n.firstChild;
|
|
101
|
+
const r = { n, a0: t0, v0: null, v1: null, v2: null };
|
|
102
|
+
p3(r, -1, d);
|
|
103
|
+
return r;
|
|
104
|
+
};
|
|
105
|
+
const p3 = (r, c, d) => {
|
|
106
|
+
if (c & 1) {
|
|
107
|
+
const x0 = textCall("concat", [v[0], "-destination"]);
|
|
108
|
+
if (x0 !== NONCONFORMING) {
|
|
109
|
+
const s0 = toAttribute(x0, "id");
|
|
110
|
+
if (s0 !== r.v0) writeAttribute(r.a0, "id", r.v0 = s0);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (c & 128) {
|
|
114
|
+
const x1 = v[7];
|
|
115
|
+
const s1 = toAttribute(x1, "placeholder");
|
|
116
|
+
if (s1 !== r.v1) writeAttribute(r.a0, "placeholder", r.v1 = s1);
|
|
117
|
+
}
|
|
118
|
+
if (c & 16384) {
|
|
119
|
+
const x2 = v[14];
|
|
120
|
+
const s2 = toAttribute(x2, "value");
|
|
121
|
+
if (s2 !== r.v2) writeAttribute(r.a0, "value", r.v2 = s2);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
const m4 = (d) => {
|
|
125
|
+
const n = (P4 ??= buildTemplate(T4)).cloneNode(true);
|
|
126
|
+
const t0 = n.firstChild;
|
|
127
|
+
const t1 = t0.nextSibling.nextSibling;
|
|
128
|
+
const r = { n, a0: t0, e0: t0.nextSibling, b0: undefined, L1: new KeyedList(t1, t1.nextSibling, m6, p6, (o) => readMember(o, "id"), "result") };
|
|
129
|
+
p4(r, -1, d);
|
|
130
|
+
return r;
|
|
131
|
+
};
|
|
132
|
+
const p4 = (r, c, d) => {
|
|
133
|
+
if (c & 2048 && !((v[11] !== "")) !== !r.b0) {
|
|
134
|
+
if (r.b0) { r.b0 = undefined; clearRegion(r.a0, r.e0); }
|
|
135
|
+
else { r.b0 = m5(d); r.e0.before(r.b0.n); }
|
|
136
|
+
} else if (r.b0 !== undefined) p5(r.b0, c, d);
|
|
137
|
+
if (c & 1073742080) r.L1.update(v[8], d, c);
|
|
138
|
+
if (c !== -1 && c & 1024) r.L1.each(c, d);
|
|
139
|
+
};
|
|
140
|
+
const m5 = (d) => {
|
|
141
|
+
const n = (P5 ??= buildTemplate(T5)).cloneNode(true);
|
|
142
|
+
const t0 = n.firstChild;
|
|
143
|
+
const r = { n, a0: t0, v0: "" };
|
|
144
|
+
p5(r, -1, d);
|
|
145
|
+
return r;
|
|
146
|
+
};
|
|
147
|
+
const p5 = (r, c, d) => {
|
|
148
|
+
if (c & 2048) {
|
|
149
|
+
const x0 = v[11];
|
|
150
|
+
const s0 = toText(x0);
|
|
151
|
+
if (s0 !== r.v0) r.a0.data = r.v0 = s0;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const m6 = (o, j, l) => {
|
|
155
|
+
const n = (P6 ??= buildTemplate(T6)).cloneNode(true);
|
|
156
|
+
const t0 = n.firstChild.nextSibling;
|
|
157
|
+
const t1 = t0.firstChild;
|
|
158
|
+
const t2 = t0.nextSibling;
|
|
159
|
+
const t3 = t2.nextSibling.nextSibling;
|
|
160
|
+
const r = { k: undefined, i: o, n, x: 0, y: 0, a1: t0, a2: t1, w: 0, v0: null, v1: null, v2: null, v3: null, v4: "", a3: t2, e0: t2.nextSibling, b0: undefined, a4: t3, e1: t3.nextSibling, b1: undefined };
|
|
161
|
+
p6(r, -1, E);
|
|
162
|
+
return r;
|
|
163
|
+
};
|
|
164
|
+
const p6 = (r, c, d) => {
|
|
165
|
+
const o = r.i;
|
|
166
|
+
if (c & 1073741824) r.w = 0;
|
|
167
|
+
if (c & 1073742848) {
|
|
168
|
+
const x0 = (readMember(o, "id") === v[10]);
|
|
169
|
+
const s0 = toAttribute(x0, "selected");
|
|
170
|
+
if (s0 !== r.v0) writeAttribute(r.n, "selected", r.v0 = s0);
|
|
171
|
+
}
|
|
172
|
+
if (c & 1073741824) {
|
|
173
|
+
const x1 = trackContainer(r, readMember(o, "id"));
|
|
174
|
+
const s1 = toAttribute(x1, "data-link-id");
|
|
175
|
+
if (s1 !== r.v1) writeAttribute(r.n, "data-link-id", r.v1 = s1);
|
|
176
|
+
}
|
|
177
|
+
if (c === -1) {
|
|
178
|
+
const x2 = true;
|
|
179
|
+
const s2 = toAttribute(x2, "truncate");
|
|
180
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "truncate", r.v2 = s2);
|
|
181
|
+
}
|
|
182
|
+
if (c & 1073741824) {
|
|
183
|
+
const x3 = trackContainer(r, readMember(o, "label"));
|
|
184
|
+
const s3 = toAttribute(x3, "title");
|
|
185
|
+
if (s3 !== r.v3) writeAttribute(r.a1, "title", r.v3 = s3);
|
|
186
|
+
const s4 = toText(x3);
|
|
187
|
+
if (s4 !== r.v4) r.a2.data = r.v4 = s4;
|
|
188
|
+
}
|
|
189
|
+
if (c & 1073741824 && !(truthy(trackContainer(r, readMember(o, "detail")))) !== !r.b0) {
|
|
190
|
+
if (r.b0) { r.b0 = undefined; clearRegion(r.a3, r.e0); }
|
|
191
|
+
else { r.b0 = m7(d, undefined, r); r.e0.before(r.b0.n); }
|
|
192
|
+
} else if (r.b0 !== undefined) p7(r.b0, c, d);
|
|
193
|
+
if (c & 1073742848 && !((readMember(o, "id") === v[10])) !== !r.b1) {
|
|
194
|
+
if (r.b1) { r.b1 = undefined; clearRegion(r.a4, r.e1); }
|
|
195
|
+
else { r.b1 = m8(d); r.e1.before(r.b1.n); }
|
|
196
|
+
} else if (r.b1 !== undefined) p8(r.b1, c, d);
|
|
197
|
+
};
|
|
198
|
+
const m7 = (d, o, u) => {
|
|
199
|
+
const n = (P7 ??= buildTemplate(T7)).cloneNode(true);
|
|
200
|
+
const t0 = n.firstChild;
|
|
201
|
+
const r = { n, u, a1: t0, w: 0, v0: null, v1: null, v2: "" };
|
|
202
|
+
p7(r, -1, d);
|
|
203
|
+
return r;
|
|
204
|
+
};
|
|
205
|
+
const p7 = (r, c, d) => {
|
|
206
|
+
if (c & 1073741824) r.w = 0;
|
|
207
|
+
if (c === -1) {
|
|
208
|
+
const x0 = true;
|
|
209
|
+
const s0 = toAttribute(x0, "truncate");
|
|
210
|
+
if (s0 !== r.v0) writeAttribute(r.n, "truncate", r.v0 = s0);
|
|
211
|
+
}
|
|
212
|
+
if (c & 1073741824) {
|
|
213
|
+
const x1 = trackContainer(r, readMember(r.u.i, "detail"));
|
|
214
|
+
const s1 = toAttribute(x1, "title");
|
|
215
|
+
if (s1 !== r.v1) writeAttribute(r.n, "title", r.v1 = s1);
|
|
216
|
+
const s2 = toText(x1);
|
|
217
|
+
if (s2 !== r.v2) r.a1.data = r.v2 = s2;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
const m8 = (d) => {
|
|
221
|
+
const n = (P8 ??= buildTemplate(T8)).cloneNode(true);
|
|
222
|
+
const r = { n };
|
|
223
|
+
p8(r, -1, d);
|
|
224
|
+
return r;
|
|
225
|
+
};
|
|
226
|
+
const p8 = (r, c, d) => {
|
|
227
|
+
};
|
|
228
|
+
const m9 = (d) => {
|
|
229
|
+
const n = (P9 ??= buildTemplate(T9)).cloneNode(true);
|
|
230
|
+
const t0 = n.firstChild;
|
|
231
|
+
const r = { n, a0: t0, v0: null };
|
|
232
|
+
p9(r, -1, d);
|
|
233
|
+
return r;
|
|
234
|
+
};
|
|
235
|
+
const p9 = (r, c, d) => {
|
|
236
|
+
if (c & 64) {
|
|
237
|
+
const x0 = v[6];
|
|
238
|
+
const s0 = toAttribute(x0, "checked");
|
|
239
|
+
if (s0 !== r.v0) writeAttribute(r.a0, "checked", r.v0 = s0);
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
const m10 = (d) => {
|
|
243
|
+
const n = (P10 ??= buildTemplate(T10)).cloneNode(true);
|
|
244
|
+
const t0 = n.firstChild;
|
|
245
|
+
const t1 = t0.firstChild;
|
|
246
|
+
const t2 = t1.nextSibling;
|
|
247
|
+
const r = { n, a0: t1, a1: t2, v0: null, v1: null, v2: null };
|
|
248
|
+
p10(r, -1, d);
|
|
249
|
+
return r;
|
|
250
|
+
};
|
|
251
|
+
const p10 = (r, c, d) => {
|
|
252
|
+
if (c & 1) {
|
|
253
|
+
const x0 = textCall("concat", [v[0], "-text"]);
|
|
254
|
+
if (x0 !== NONCONFORMING) {
|
|
255
|
+
const s0 = toAttribute(x0, "for");
|
|
256
|
+
if (s0 !== r.v0) writeAttribute(r.a0, "for", r.v0 = s0);
|
|
257
|
+
}
|
|
258
|
+
if (x0 !== NONCONFORMING) {
|
|
259
|
+
const s1 = toAttribute(x0, "id");
|
|
260
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "id", r.v1 = s1);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
if (c & 4096) {
|
|
264
|
+
const x1 = v[12];
|
|
265
|
+
const s2 = toAttribute(x1, "value");
|
|
266
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "value", r.v2 = s2);
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
const m11 = (d) => {
|
|
270
|
+
const n = (P11 ??= buildTemplate(T11)).cloneNode(true);
|
|
271
|
+
const t0 = n.firstChild;
|
|
272
|
+
const r = { n, a0: t0, v0: "" };
|
|
273
|
+
p11(r, -1, d);
|
|
274
|
+
return r;
|
|
275
|
+
};
|
|
276
|
+
const p11 = (r, c, d) => {
|
|
277
|
+
if (c & 8) {
|
|
278
|
+
const x0 = v[3];
|
|
279
|
+
const s0 = toText(x0);
|
|
280
|
+
if (s0 !== r.v0) r.a0.data = r.v0 = s0;
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
const p0 = (r, c, d) => {
|
|
284
|
+
if (c & 1073741840) {
|
|
285
|
+
const x0 = g(1);
|
|
286
|
+
if (x0 !== NONCONFORMING) {
|
|
287
|
+
const s0 = toText(x0);
|
|
288
|
+
if (s0 !== r.v0) r.a0.data = r.v0 = s0;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (c & 8) {
|
|
292
|
+
const x1 = (v[3] !== "");
|
|
293
|
+
const s1 = toAttribute(x1, "invalid");
|
|
294
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "invalid", r.v1 = s1);
|
|
295
|
+
}
|
|
296
|
+
if (c & 1) {
|
|
297
|
+
const x2 = textCall("concat", [v[0], "-destination"]);
|
|
298
|
+
if (x2 !== NONCONFORMING) {
|
|
299
|
+
const s2 = toAttribute(x2, "for");
|
|
300
|
+
if (s2 !== r.v2) writeAttribute(r.a2, "for", r.v2 = s2);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
if (c & 1073742336) {
|
|
304
|
+
const x3 = g(2);
|
|
305
|
+
if (x3 !== NONCONFORMING) {
|
|
306
|
+
const s3 = toText(x3);
|
|
307
|
+
if (s3 !== r.v3) r.a3.data = r.v3 = s3;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if (c & 512 && !(truthy(v[9])) !== !r.b0) {
|
|
311
|
+
if (r.b0) { r.b0 = undefined; clearRegion(r.a4, r.e0); }
|
|
312
|
+
else { r.b0 = m1(d); r.e0.before(r.b0.n); }
|
|
313
|
+
} else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
314
|
+
if (c & 512 && !(!truthy(v[9])) !== !r.b1) {
|
|
315
|
+
if (r.b1) { r.b1 = undefined; clearRegion(r.a5, r.e1); }
|
|
316
|
+
else { r.b1 = m3(d); r.e1.before(r.b1.n); }
|
|
317
|
+
} else if (r.b1 !== undefined) p3(r.b1, c, d);
|
|
318
|
+
if (c & 32 && !((v[5] === "target")) !== !r.b2) {
|
|
319
|
+
if (r.b2) { r.b2 = undefined; clearRegion(r.a6, r.e2); }
|
|
320
|
+
else { r.b2 = m4(d); r.e2.before(r.b2.n); }
|
|
321
|
+
} else if (r.b2 !== undefined) p4(r.b2, c, d);
|
|
322
|
+
if (c & 32 && !((v[5] === "url")) !== !r.b3) {
|
|
323
|
+
if (r.b3) { r.b3 = undefined; clearRegion(r.a7, r.e3); }
|
|
324
|
+
else { r.b3 = m9(d); r.e3.before(r.b3.n); }
|
|
325
|
+
} else if (r.b3 !== undefined) p9(r.b3, c, d);
|
|
326
|
+
if (c & 8192 && !(truthy(v[13])) !== !r.b4) {
|
|
327
|
+
if (r.b4) { r.b4 = undefined; clearRegion(r.a8, r.e4); }
|
|
328
|
+
else { r.b4 = m10(d); r.e4.before(r.b4.n); }
|
|
329
|
+
} else if (r.b4 !== undefined) p10(r.b4, c, d);
|
|
330
|
+
if (c & 8 && !((v[3] !== "")) !== !r.b5) {
|
|
331
|
+
if (r.b5) { r.b5 = undefined; clearRegion(r.a9, r.e5); }
|
|
332
|
+
else { r.b5 = m11(d); r.e5.before(r.b5.n); }
|
|
333
|
+
} else if (r.b5 !== undefined) p11(r.b5, c, d);
|
|
334
|
+
};
|
|
335
|
+
const t0 = element.firstChild;
|
|
336
|
+
const t1 = t0.firstChild;
|
|
337
|
+
const t2 = t1.firstChild;
|
|
338
|
+
const t3 = t1.nextSibling;
|
|
339
|
+
const t4 = t3.firstChild;
|
|
340
|
+
const t5 = t4.firstChild;
|
|
341
|
+
const t6 = t5.firstChild;
|
|
342
|
+
const t7 = t5.nextSibling;
|
|
343
|
+
const t8 = t7.nextSibling.nextSibling;
|
|
344
|
+
const t9 = t4.nextSibling;
|
|
345
|
+
const t10 = t9.nextSibling.nextSibling;
|
|
346
|
+
const t11 = t3.nextSibling;
|
|
347
|
+
const t12 = t11.nextSibling.nextSibling;
|
|
348
|
+
const R = { a0: t2, a1: t4, a2: t5, a3: t6, v0: "", v1: null, v2: null, v3: "", a4: t7, e0: t7.nextSibling, b0: undefined, a5: t8, e1: t8.nextSibling, b1: undefined, a6: t9, e2: t9.nextSibling, b2: undefined, a7: t10, e3: t10.nextSibling, b3: undefined, a8: t11, e4: t11.nextSibling, b4: undefined, a9: t12, e5: t12.nextSibling, b5: undefined };
|
|
349
|
+
const I = { B };
|
|
350
|
+
I.R = new Set();
|
|
351
|
+
attachGeneratedController(element, S, v, (c, d) => { ((c, d) => p0(R, c, d))(c, d); for (const f of I.R) f(c, d); }, C, X, I);
|
|
352
|
+
manageProps(I);
|
|
353
|
+
return element;
|
|
354
|
+
}
|
package/vanilla/index.js
CHANGED
|
@@ -23,6 +23,7 @@ export * from "./UiEditorBlockActions.js";
|
|
|
23
23
|
export * from "./UiEditorImageToolbar.js";
|
|
24
24
|
export * from "./UiEditorInsertTableGrid.js";
|
|
25
25
|
export * from "./UiEditorLinkCard.js";
|
|
26
|
+
export * from "./UiEditorLinkForm.js";
|
|
26
27
|
export * from "./UiEditorMentionMenu.js";
|
|
27
28
|
export * from "./UiEditorMentionMenuItem.js";
|
|
28
29
|
export * from "./UiEditorSlashMenu.js";
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
|
+
error: {
|
|
4
|
+
type: PropType<string | null>;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
existing: {
|
|
8
|
+
type: PropType<boolean | null>;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
mode: {
|
|
12
|
+
type: PropType<"url" | "target" | null>;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
newTab: {
|
|
16
|
+
type: PropType<boolean | null>;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
placeholder: {
|
|
20
|
+
type: PropType<string | null>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
results: {
|
|
24
|
+
type: PropType<readonly ({
|
|
25
|
+
readonly id: string;
|
|
26
|
+
readonly label: string;
|
|
27
|
+
readonly detail?: string;
|
|
28
|
+
})[] | null>;
|
|
29
|
+
default: () => never[];
|
|
30
|
+
};
|
|
31
|
+
searchable: {
|
|
32
|
+
type: PropType<boolean | null>;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
selected: {
|
|
36
|
+
type: PropType<string | null>;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
status: {
|
|
40
|
+
type: PropType<string | null>;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
text: {
|
|
44
|
+
type: PropType<string | null>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
textEditable: {
|
|
48
|
+
type: PropType<boolean | null>;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
value: {
|
|
52
|
+
type: PropType<string | null>;
|
|
53
|
+
default: string;
|
|
54
|
+
};
|
|
55
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
56
|
+
clear: (event: CustomEvent<Readonly<Record<string, unknown>>>) => any;
|
|
57
|
+
text: (event: CustomEvent<{
|
|
58
|
+
readonly text: string;
|
|
59
|
+
}>) => any;
|
|
60
|
+
"update:value": (value: string) => any;
|
|
61
|
+
save: (event: CustomEvent<Readonly<Record<string, unknown>>>) => any;
|
|
62
|
+
"update:newTab": (value: boolean) => any;
|
|
63
|
+
"update:text": (value: string) => any;
|
|
64
|
+
destination: (event: CustomEvent<{
|
|
65
|
+
readonly value: string;
|
|
66
|
+
}>) => any;
|
|
67
|
+
"new-tab": (event: CustomEvent<{
|
|
68
|
+
readonly newTab: boolean;
|
|
69
|
+
}>) => any;
|
|
70
|
+
choose: (event: CustomEvent<{
|
|
71
|
+
readonly id: string;
|
|
72
|
+
}>) => any;
|
|
73
|
+
dismiss: (event: CustomEvent<Readonly<Record<string, unknown>>>) => any;
|
|
74
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
75
|
+
error: {
|
|
76
|
+
type: PropType<string | null>;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
existing: {
|
|
80
|
+
type: PropType<boolean | null>;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
mode: {
|
|
84
|
+
type: PropType<"url" | "target" | null>;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
newTab: {
|
|
88
|
+
type: PropType<boolean | null>;
|
|
89
|
+
default: boolean;
|
|
90
|
+
};
|
|
91
|
+
placeholder: {
|
|
92
|
+
type: PropType<string | null>;
|
|
93
|
+
default: string;
|
|
94
|
+
};
|
|
95
|
+
results: {
|
|
96
|
+
type: PropType<readonly ({
|
|
97
|
+
readonly id: string;
|
|
98
|
+
readonly label: string;
|
|
99
|
+
readonly detail?: string;
|
|
100
|
+
})[] | null>;
|
|
101
|
+
default: () => never[];
|
|
102
|
+
};
|
|
103
|
+
searchable: {
|
|
104
|
+
type: PropType<boolean | null>;
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
selected: {
|
|
108
|
+
type: PropType<string | null>;
|
|
109
|
+
default: string;
|
|
110
|
+
};
|
|
111
|
+
status: {
|
|
112
|
+
type: PropType<string | null>;
|
|
113
|
+
default: string;
|
|
114
|
+
};
|
|
115
|
+
text: {
|
|
116
|
+
type: PropType<string | null>;
|
|
117
|
+
default: string;
|
|
118
|
+
};
|
|
119
|
+
textEditable: {
|
|
120
|
+
type: PropType<boolean | null>;
|
|
121
|
+
default: boolean;
|
|
122
|
+
};
|
|
123
|
+
value: {
|
|
124
|
+
type: PropType<string | null>;
|
|
125
|
+
default: string;
|
|
126
|
+
};
|
|
127
|
+
}>> & Readonly<{
|
|
128
|
+
onClear?: ((event: CustomEvent<Readonly<Record<string, unknown>>>) => any) | undefined;
|
|
129
|
+
onText?: ((event: CustomEvent<{
|
|
130
|
+
readonly text: string;
|
|
131
|
+
}>) => any) | undefined;
|
|
132
|
+
"onUpdate:value"?: ((value: string) => any) | undefined;
|
|
133
|
+
onSave?: ((event: CustomEvent<Readonly<Record<string, unknown>>>) => any) | undefined;
|
|
134
|
+
"onUpdate:newTab"?: ((value: boolean) => any) | undefined;
|
|
135
|
+
"onUpdate:text"?: ((value: string) => any) | undefined;
|
|
136
|
+
onDestination?: ((event: CustomEvent<{
|
|
137
|
+
readonly value: string;
|
|
138
|
+
}>) => any) | undefined;
|
|
139
|
+
"onNew-tab"?: ((event: CustomEvent<{
|
|
140
|
+
readonly newTab: boolean;
|
|
141
|
+
}>) => any) | undefined;
|
|
142
|
+
onChoose?: ((event: CustomEvent<{
|
|
143
|
+
readonly id: string;
|
|
144
|
+
}>) => any) | undefined;
|
|
145
|
+
onDismiss?: ((event: CustomEvent<Readonly<Record<string, unknown>>>) => any) | undefined;
|
|
146
|
+
}>, {
|
|
147
|
+
value: string | null;
|
|
148
|
+
error: string | null;
|
|
149
|
+
mode: "url" | "target" | null;
|
|
150
|
+
text: string | null;
|
|
151
|
+
selected: string | null;
|
|
152
|
+
status: string | null;
|
|
153
|
+
placeholder: string | null;
|
|
154
|
+
existing: boolean | null;
|
|
155
|
+
results: readonly {
|
|
156
|
+
readonly id: string;
|
|
157
|
+
readonly label: string;
|
|
158
|
+
readonly detail?: string;
|
|
159
|
+
}[] | null;
|
|
160
|
+
searchable: boolean | null;
|
|
161
|
+
newTab: boolean | null;
|
|
162
|
+
textEditable: boolean | null;
|
|
163
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
164
|
+
declare const _default: typeof __VLS_export;
|
|
165
|
+
export default _default;
|