@threadlabs/looma 0.28.6 → 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-block-actions/ui-editor-block-actions.html +20 -0
- package/components/ui-editor-block-actions/ui-editor-block-actions.js +14 -0
- package/components/ui-editor-image-toolbar/ui-editor-image-toolbar.html +7 -6
- package/components/ui-editor-image-toolbar/ui-editor-image-toolbar.js +2 -1
- package/components/ui-editor-link-card/ui-editor-link-card.html +57 -0
- package/components/ui-editor-link-card/ui-editor-link-card.js +27 -0
- 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 +37 -34
- package/package.json +1 -1
- package/styles/ui-editor-block-actions.css +1 -0
- package/styles/ui-editor-link-card.css +1 -0
- package/styles/ui-editor-link-form.css +1 -0
- package/vanilla/UiEditorBlockActions.d.ts +16 -0
- package/vanilla/UiEditorBlockActions.js +41 -0
- package/vanilla/UiEditorImageToolbar.js +1 -1
- package/vanilla/UiEditorLinkCard.d.ts +20 -0
- package/vanilla/UiEditorLinkCard.js +153 -0
- package/vanilla/UiEditorLinkForm.d.ts +32 -0
- package/vanilla/UiEditorLinkForm.js +354 -0
- package/vanilla/index.js +3 -0
- package/vue/UiEditorBlockActions.d.ts +33 -0
- package/vue/UiEditorBlockActions.js +2 -0
- package/vue/UiEditorBlockActions.vue +125 -0
- package/vue/UiEditorImageToolbar.vue +5 -6
- package/vue/UiEditorLinkCard.d.ts +58 -0
- package/vue/UiEditorLinkCard.js +2 -0
- package/vue/UiEditorLinkCard.vue +319 -0
- package/vue/UiEditorLinkForm.d.ts +165 -0
- package/vue/UiEditorLinkForm.js +2 -0
- package/vue/UiEditorLinkForm.vue +557 -0
- package/vue/chunks/UiAffordanceScope.js +1 -1
- package/vue/chunks/UiAvatar.js +1 -1
- package/vue/chunks/UiAvatarGroup.js +1 -1
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiBreadcrumbItem.js +1 -1
- package/vue/chunks/UiBreadcrumbs.js +1 -1
- package/vue/chunks/UiButton.js +1 -1
- package/vue/chunks/UiCallout.js +1 -1
- package/vue/chunks/UiCard.js +1 -1
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiCluster.js +1 -1
- package/vue/chunks/UiCombobox.js +1 -1
- package/vue/chunks/UiContainer.js +1 -1
- package/vue/chunks/UiContextMenu.js +1 -1
- package/vue/chunks/UiCover.js +1 -1
- package/vue/chunks/UiDescriptionItem.js +1 -1
- package/vue/chunks/UiDescriptionList.js +1 -1
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiDisclosure.js +1 -1
- package/vue/chunks/UiEditable.js +1 -1
- package/vue/chunks/UiEditorBlockActions.js +127 -0
- package/vue/chunks/UiEditorImageToolbar.js +7 -25
- package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
- package/vue/chunks/UiEditorLinkCard.js +356 -0
- package/vue/chunks/UiEditorLinkForm.js +669 -0
- package/vue/chunks/UiEditorMentionMenu.js +1 -1
- package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
- package/vue/chunks/UiEditorSlashMenu.js +1 -1
- package/vue/chunks/UiEditorSlashMenuGroup.js +1 -1
- package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
- package/vue/chunks/UiEditorSurface.js +1 -1
- package/vue/chunks/UiEditorTableContextMenu.js +1 -1
- package/vue/chunks/UiEditorTableOverlay.js +1 -1
- package/vue/chunks/UiEditorTableToolbar.js +1 -1
- package/vue/chunks/UiEditorToolbar.js +1 -1
- package/vue/chunks/UiFloatingActionButton.js +1 -1
- package/vue/chunks/UiFormField.js +1 -1
- package/vue/chunks/UiGrid.js +1 -1
- package/vue/chunks/UiIcon.js +1 -1
- package/vue/chunks/UiIconButton.js +1 -1
- package/vue/chunks/UiImage.js +1 -1
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiInputGroup.js +1 -1
- package/vue/chunks/UiList.js +1 -1
- package/vue/chunks/UiListItem.js +1 -1
- package/vue/chunks/UiListbox.js +1 -1
- package/vue/chunks/UiMenu.js +1 -1
- package/vue/chunks/UiMenuGroup.js +1 -1
- package/vue/chunks/UiMenuItem.js +1 -1
- package/vue/chunks/UiMeter.js +1 -1
- package/vue/chunks/UiNavItem.js +1 -1
- package/vue/chunks/UiPageHeader.js +1 -1
- package/vue/chunks/UiPopover.js +1 -1
- package/vue/chunks/UiRadio.js +1 -1
- package/vue/chunks/UiRadioGroup.js +1 -1
- package/vue/chunks/UiReel.js +1 -1
- package/vue/chunks/UiScrollArea.js +1 -1
- package/vue/chunks/UiSearchResultRow.js +1 -1
- package/vue/chunks/UiSearchShell.js +1 -1
- package/vue/chunks/UiSection.js +1 -1
- package/vue/chunks/UiSelect.js +1 -1
- package/vue/chunks/UiSeparator.js +1 -1
- package/vue/chunks/UiSidebar.js +1 -1
- package/vue/chunks/UiSpinner.js +1 -1
- package/vue/chunks/UiStack.js +1 -1
- package/vue/chunks/UiStatusMessage.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiSwitcher.js +1 -1
- package/vue/chunks/UiTable.js +1 -1
- package/vue/chunks/UiTabs.js +1 -1
- package/vue/chunks/UiText.js +1 -1
- package/vue/chunks/UiTextarea.js +1 -1
- package/vue/chunks/UiToast.js +1 -1
- package/vue/chunks/UiToastRegion.js +1 -1
- package/vue/chunks/UiTooltip.js +1 -1
- package/vue/chunks/UiTree.js +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/chunks/_plugin-vue_export-helper.js +1 -1
- package/vue/components.css +2886 -2886
- package/vue/editor/index.js +98 -250
- package/vue/editor/primitives.d.ts +24 -2
- package/vue/index.d.ts +3 -0
- package/vue/index.js +8 -5
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* Generated by HTML Next 1.0.0-alpha.51. Do not edit. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* Generated by HTML Next 1.0.0-alpha.51. Do not edit. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* Generated by HTML Next 1.0.0-alpha.51. Do not edit. */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.51 for Vanilla DOM. Do not edit.
|
|
2
|
+
export interface UiEditorBlockActionsEventMap {
|
|
3
|
+
action: CustomEvent<{ readonly action: "insert-below" | "duplicate" | "delete" }>;
|
|
4
|
+
}
|
|
5
|
+
export interface UiEditorBlockActionsElement extends HTMLDivElement {
|
|
6
|
+
addEventListener<K extends keyof UiEditorBlockActionsEventMap>(type: K, listener: (this: UiEditorBlockActionsElement, event: UiEditorBlockActionsEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
7
|
+
removeEventListener<K extends keyof UiEditorBlockActionsEventMap>(type: K, listener: (this: UiEditorBlockActionsElement, event: UiEditorBlockActionsEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
8
|
+
}
|
|
9
|
+
export interface UiEditorBlockActionsProps {
|
|
10
|
+
for?: string | null;
|
|
11
|
+
placement?: "bottom-start" | "top-start" | null;
|
|
12
|
+
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
13
|
+
children?: readonly (string | Node)[];
|
|
14
|
+
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
|
15
|
+
}
|
|
16
|
+
export declare function createUiEditorBlockActions(props?: UiEditorBlockActionsProps): UiEditorBlockActionsElement;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.51 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, buildTemplate, toAttribute, writeAttribute, dispatchDeclared, detailCheck, formatOf, keywordFormat, acceptProps, manageProps, checkConstrained, checkFormat, checkObject, checkString } from "@nextwebwg/html-next/generated-runtime";
|
|
3
|
+
import * as controller from "../components/ui-editor-block-actions/ui-editor-block-actions.js";
|
|
4
|
+
import "../styles/ui-editor-block-actions.css";
|
|
5
|
+
|
|
6
|
+
const T0 = ["",[],["ui-menu",["aria-label","Block actions"],["ui-menu-item",["value","insert-below"],"Insert paragraph below"],["ui-menu-item",["value","duplicate"],"Duplicate block"],["ui-menu-item",["value","delete"],"Delete block"]]];
|
|
7
|
+
let P0;
|
|
8
|
+
const S = { n: [], t: [], f: import.meta.url, g: "ui-editor-block-actions", d: { "action": [detailCheck(checkObject([["action", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["insert-below","duplicate","delete"]}), false]], false)), true, true, false] }, x: dispatchDeclared };
|
|
9
|
+
const D = { props: { "for": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "placement": { "required":false,"values":["bottom-start","top-start"],"default":"bottom-start", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat),false] } } };
|
|
10
|
+
const C = (host) => controller.default(host);
|
|
11
|
+
|
|
12
|
+
export function createUiEditorBlockActions(options = {}, html) {
|
|
13
|
+
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
14
|
+
const element = document.createElement("div");
|
|
15
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
16
|
+
if (value === null || value === undefined || value === false) continue;
|
|
17
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
18
|
+
}
|
|
19
|
+
element.setAttribute("data-component", "ui-editor-block-actions");
|
|
20
|
+
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
21
|
+
const v = [null, null];
|
|
22
|
+
const B = acceptProps(element, D, S.n, v, componentProps, [], html);
|
|
23
|
+
const p0 = (r, c, d) => {
|
|
24
|
+
if (c & 1) {
|
|
25
|
+
const x0 = v[0];
|
|
26
|
+
const s0 = toAttribute(x0, "for");
|
|
27
|
+
if (s0 !== r.v0) writeAttribute(r.a0, "for", r.v0 = s0);
|
|
28
|
+
}
|
|
29
|
+
if (c & 1073741826) {
|
|
30
|
+
const x1 = v[1];
|
|
31
|
+
const s1 = toAttribute(x1, "placement");
|
|
32
|
+
if (s1 !== r.v1) writeAttribute(r.a0, "placement", r.v1 = s1);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const t0 = element.firstChild;
|
|
36
|
+
const R = { a0: t0, v0: null, v1: null };
|
|
37
|
+
const I = { B };
|
|
38
|
+
attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), C, undefined, I);
|
|
39
|
+
manageProps(I);
|
|
40
|
+
return element;
|
|
41
|
+
}
|
|
@@ -3,7 +3,7 @@ import { attachGeneratedController, buildTemplate, NONCONFORMING, readIndex, tex
|
|
|
3
3
|
import * as controller from "../components/ui-editor-image-toolbar/ui-editor-image-toolbar.js";
|
|
4
4
|
import "../styles/ui-editor-image-toolbar.css";
|
|
5
5
|
|
|
6
|
-
const T0 = ["",[],["ui-text",["as","div","font","sans"],["ui-editor-toolbar",["aria-label","Image actions"],["ui-icon-button",["label","Image in line","size","sm","data-image-placement","block"],["ui-icon",["name","panel-top"
|
|
6
|
+
const T0 = ["",[],["ui-text",["as","div","font","sans"],["ui-editor-toolbar",["aria-label","Image actions"],["ui-icon-button",["label","Image in line","size","sm","data-image-placement","block"],["ui-icon",["name","panel-top"]]],["ui-icon-button",["label","Center image","size","sm","data-image-placement","center"],["ui-icon",["name","align-center"]]],["ui-icon-button",["label","Wrap text to the right","size","sm","data-image-placement","wrap-left"],["ui-icon",["name","panel-left"]]],["ui-icon-button",["label","Wrap text to the left","size","sm","data-image-placement","wrap-right"],["ui-icon",["name","panel-right"]]],["ui-icon-button",["label","Image description","size","sm","variant","ghost"],["ui-icon",["name","file-text"]]],["ui-icon-button",["label","Delete image","size","sm","variant","ghost","data-image-action","delete"],["ui-icon",["name","trash"]]]],["ui-tooltip",[],"Image in line"],["ui-tooltip",[],"Center image"],["ui-tooltip",[],"Wrap text to the right"],["ui-tooltip",[],"Wrap text to the left"],["ui-tooltip",[],"Image description"],["ui-tooltip",[],"Delete image"],["ui-popover",["data-image-description","","size","sm","aria-label","Image description"],["form",["aria-label","Image description"],["ui-stack",["gap","s"],["ui-form-field",[],["label",["slot","label"],"Alt text"],["ui-input",["data-image-alt","","size","sm"]]],["ui-text",["size","xs","tone","secondary"],"Describe the image for people using a screen reader."],["ui-cluster",["justify","end","gap","xs"],["ui-button",["type","button","variant","ghost","tone","neutral","size","sm","data-image-action","cancel"],"Cancel"],["ui-button",["type","submit","variant","solid","size","sm"],"Save"]]]]]]];
|
|
7
7
|
let P0;
|
|
8
8
|
const S = { n: ["base","describing","draft"], t: ["s","b","s"], f: import.meta.url, g: "ui-editor-image-toolbar", d: { "placement": [detailCheck(checkObject([["placement", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["block","center","wrap-left","wrap-right"]}), false]], false)), true, true, false], "describe": [detailCheck(checkObject([["alt", checkString, false]], false)), true, true, false], "delete": [detailCheck(checkRecord(checkUnknown)), true, true, false] }, x: dispatchDeclared };
|
|
9
9
|
const D = { props: { "alt": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "placement": { "required":false,"values":["block","center","wrap-left","wrap-right"],"default":"block", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat),false] }, "target": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" } } };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.51 for Vanilla DOM. Do not edit.
|
|
2
|
+
export interface UiEditorLinkCardEventMap {
|
|
3
|
+
edit: CustomEvent<Readonly<Record<string, unknown>>>;
|
|
4
|
+
remove: CustomEvent<Readonly<Record<string, unknown>>>;
|
|
5
|
+
}
|
|
6
|
+
export interface UiEditorLinkCardElement extends HTMLDivElement {
|
|
7
|
+
addEventListener<K extends keyof UiEditorLinkCardEventMap>(type: K, listener: (this: UiEditorLinkCardElement, event: UiEditorLinkCardEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
|
|
8
|
+
removeEventListener<K extends keyof UiEditorLinkCardEventMap>(type: K, listener: (this: UiEditorLinkCardElement, event: UiEditorLinkCardEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
|
|
9
|
+
}
|
|
10
|
+
export interface UiEditorLinkCardProps {
|
|
11
|
+
detail?: string | null;
|
|
12
|
+
href?: string | null;
|
|
13
|
+
label?: string | null;
|
|
14
|
+
openHref?: string | null;
|
|
15
|
+
targetLabel?: string | null;
|
|
16
|
+
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
17
|
+
children?: readonly (string | Node)[];
|
|
18
|
+
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
|
19
|
+
}
|
|
20
|
+
export declare function createUiEditorLinkCard(props?: UiEditorLinkCardProps): UiEditorLinkCardElement;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
// Generated by HTML Next 1.0.0-alpha.51 for Vanilla DOM. Do not edit.
|
|
2
|
+
import { attachGeneratedController, buildTemplate, clearRegion, NONCONFORMING, readIndex, textCall, toAttribute, toText, writeAttribute, writeUrlAttribute, computedCycle, dispatchDeclared, detailCheck, acceptProps, manageProps, readonlyView, checkRecord, checkString, checkUnknown } from "@nextwebwg/html-next/generated-runtime";
|
|
3
|
+
import * as controller from "../components/ui-editor-link-card/ui-editor-link-card.js";
|
|
4
|
+
import "../styles/ui-editor-link-card.css";
|
|
5
|
+
|
|
6
|
+
const T0 = ["",[],["ui-card",["variant","elevated","padding","xs","size","content"],["ui-cluster",["gap","xs","wrap","nowrap","role","group","aria-label","Link actions"],["ui-icon",[]],["ui-stack",["gap","none"],["ui-text",["as","strong","size","sm","weight","medium","font","sans","wrap","anywhere"],0],1],1,["ui-icon-button",["label","Edit link","variant","ghost","size","sm","data-link-action","edit"],["ui-icon",["name","pencil"]]],["ui-tooltip",[],"Edit link"],["ui-icon-button",["label","Remove link","variant","ghost","size","sm","data-link-action","remove"],["ui-icon",["name","unlink"]]],["ui-tooltip",[],"Remove link"]]]];
|
|
7
|
+
const T1 = ["ui-text",["as","small","size","xs","tone","secondary","font","sans"],0];
|
|
8
|
+
const T2 = ["",[],["ui-button",["as","a","variant","ghost","tone","neutral","size","sm","target","_blank","rel","noopener noreferrer","aria-label","Open link"],["ui-cluster",["gap","xs","wrap","nowrap"],["ui-icon",["name","external-link"]],"Open link"]],["ui-tooltip",[],"Open link"]];
|
|
9
|
+
let P0, P1, P2;
|
|
10
|
+
const S = { n: ["base","resolved","shown"], t: ["s","?","?"], f: import.meta.url, g: "ui-editor-link-card", k: 1, d: { "edit": [detailCheck(checkRecord(checkUnknown)), true, true, false], "remove": [detailCheck(checkRecord(checkUnknown)), true, true, false] }, x: dispatchDeclared, r: readonlyView };
|
|
11
|
+
const D = { props: { "detail": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "href": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "label": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "openHref": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "targetLabel": { "required":false,"default":"Item", c: checkString, t: "string", j: 0, m: "s" } } };
|
|
12
|
+
const C = (host) => controller.default(host);
|
|
13
|
+
|
|
14
|
+
export function createUiEditorLinkCard(options = {}, html) {
|
|
15
|
+
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
|
16
|
+
const element = document.createElement("div");
|
|
17
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
18
|
+
if (value === null || value === undefined || value === false) continue;
|
|
19
|
+
element.setAttribute(name, value === true ? "" : String(value));
|
|
20
|
+
}
|
|
21
|
+
element.setAttribute("data-component", "ui-editor-link-card");
|
|
22
|
+
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
23
|
+
const v = ["ui-editor-link-card", undefined, undefined, null, null, null, null, null];
|
|
24
|
+
const B = acceptProps(element, D, S.n, v, componentProps, [], html);
|
|
25
|
+
const X = { e: 0, g: (j) => g(j), w: new Set() };
|
|
26
|
+
const ke = [];
|
|
27
|
+
const K = [() => (v[5] !== ""), () => readIndex({ "true": v[5], "false": v[4] }, textCall("concat", [g(1)]))];
|
|
28
|
+
const g = (j) => {
|
|
29
|
+
const i = j - 1;
|
|
30
|
+
if (ke[i] === X.e) return v[j];
|
|
31
|
+
if (ke[i] === -1) computedCycle();
|
|
32
|
+
ke[i] = -1;
|
|
33
|
+
let next;
|
|
34
|
+
try { next = K[i](); } catch (error) { ke[i] = undefined; throw error; }
|
|
35
|
+
ke[i] = X.e;
|
|
36
|
+
const previous = v[j];
|
|
37
|
+
if (!Object.is(previous, next)) { v[j] = next; X.n?.(j, previous, next); }
|
|
38
|
+
return next;
|
|
39
|
+
};
|
|
40
|
+
const m1 = (d) => {
|
|
41
|
+
const n = (P1 ??= buildTemplate(T1)).cloneNode(true);
|
|
42
|
+
const t0 = n.firstChild;
|
|
43
|
+
const r = { n, a0: t0, v0: "" };
|
|
44
|
+
p1(r, -1, d);
|
|
45
|
+
return r;
|
|
46
|
+
};
|
|
47
|
+
const p1 = (r, c, d) => {
|
|
48
|
+
if (c & 8) {
|
|
49
|
+
const x0 = v[3];
|
|
50
|
+
const s0 = toText(x0);
|
|
51
|
+
if (s0 !== r.v0) r.a0.data = r.v0 = s0;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const m2 = (d) => {
|
|
55
|
+
const n = (P2 ??= buildTemplate(T2)).cloneNode(true);
|
|
56
|
+
const t0 = n.firstChild;
|
|
57
|
+
const t1 = t0.nextSibling;
|
|
58
|
+
const r = { n, a0: t0, a1: t1, v0: null, v1: null, v2: null };
|
|
59
|
+
p2(r, -1, d);
|
|
60
|
+
return r;
|
|
61
|
+
};
|
|
62
|
+
const p2 = (r, c, d) => {
|
|
63
|
+
if (c & 1) {
|
|
64
|
+
const x0 = textCall("concat", [v[0], "-open"]);
|
|
65
|
+
if (x0 !== NONCONFORMING) {
|
|
66
|
+
const s0 = toAttribute(x0, "id");
|
|
67
|
+
if (s0 !== r.v0) writeAttribute(r.a0, "id", r.v0 = s0);
|
|
68
|
+
}
|
|
69
|
+
if (x0 !== NONCONFORMING) {
|
|
70
|
+
const s2 = toAttribute(x0, "for");
|
|
71
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "for", r.v2 = s2);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (c & 64) {
|
|
75
|
+
const x1 = v[6];
|
|
76
|
+
const s1 = toAttribute(x1, "href");
|
|
77
|
+
if (s1 !== r.v1) writeUrlAttribute(r.a0, "href", r.v1 = s1);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const p0 = (r, c, d) => {
|
|
81
|
+
if (c & 1073741856) {
|
|
82
|
+
const x0 = readIndex({ "true": "file-text", "false": "link" }, textCall("concat", [g(1)]));
|
|
83
|
+
if (x0 !== NONCONFORMING) {
|
|
84
|
+
const s0 = toAttribute(x0, "name");
|
|
85
|
+
if (s0 !== r.v0) writeAttribute(r.a0, "name", r.v0 = s0);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (c & 16) {
|
|
89
|
+
const x1 = v[4];
|
|
90
|
+
const s1 = toAttribute(x1, "title");
|
|
91
|
+
if (s1 !== r.v1) writeAttribute(r.a1, "title", r.v1 = s1);
|
|
92
|
+
}
|
|
93
|
+
if (c & 1073742000) {
|
|
94
|
+
const x2 = textCall("concat", [readIndex({ "true": v[7], "false": "URL" }, textCall("concat", [g(1)])), ": ", g(2)]);
|
|
95
|
+
if (x2 !== NONCONFORMING) {
|
|
96
|
+
const s2 = toAttribute(x2, "aria-label");
|
|
97
|
+
if (s2 !== r.v2) writeAttribute(r.a1, "aria-label", r.v2 = s2);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (c & 1073741872) {
|
|
101
|
+
const x3 = g(2);
|
|
102
|
+
if (x3 !== NONCONFORMING) {
|
|
103
|
+
const s3 = toText(x3);
|
|
104
|
+
if (s3 !== r.v3) r.a2.data = r.v3 = s3;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (c & 1) {
|
|
108
|
+
const x4 = textCall("concat", [v[0], "-edit"]);
|
|
109
|
+
if (x4 !== NONCONFORMING) {
|
|
110
|
+
const s4 = toAttribute(x4, "id");
|
|
111
|
+
if (s4 !== r.v4) writeAttribute(r.a5, "id", r.v4 = s4);
|
|
112
|
+
}
|
|
113
|
+
if (x4 !== NONCONFORMING) {
|
|
114
|
+
const s5 = toAttribute(x4, "for");
|
|
115
|
+
if (s5 !== r.v5) writeAttribute(r.a6, "for", r.v5 = s5);
|
|
116
|
+
}
|
|
117
|
+
const x5 = textCall("concat", [v[0], "-remove"]);
|
|
118
|
+
if (x5 !== NONCONFORMING) {
|
|
119
|
+
const s6 = toAttribute(x5, "id");
|
|
120
|
+
if (s6 !== r.v6) writeAttribute(r.a7, "id", r.v6 = s6);
|
|
121
|
+
}
|
|
122
|
+
if (x5 !== NONCONFORMING) {
|
|
123
|
+
const s7 = toAttribute(x5, "for");
|
|
124
|
+
if (s7 !== r.v7) writeAttribute(r.a8, "for", r.v7 = s7);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (c & 8 && !((v[3] !== "")) !== !r.b0) {
|
|
128
|
+
if (r.b0) { r.b0 = undefined; clearRegion(r.a3, r.e0); }
|
|
129
|
+
else { r.b0 = m1(d); r.e0.before(r.b0.n); }
|
|
130
|
+
} else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
131
|
+
if (c & 64 && !((v[6] !== "")) !== !r.b1) {
|
|
132
|
+
if (r.b1) { r.b1 = undefined; clearRegion(r.a4, r.e1); }
|
|
133
|
+
else { r.b1 = m2(d); r.e1.before(r.b1.n); }
|
|
134
|
+
} else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
135
|
+
};
|
|
136
|
+
const t0 = element.firstChild.firstChild;
|
|
137
|
+
const t1 = t0.firstChild;
|
|
138
|
+
const t2 = t1.nextSibling;
|
|
139
|
+
const t3 = t2.firstChild;
|
|
140
|
+
const t4 = t3.firstChild;
|
|
141
|
+
const t5 = t3.nextSibling;
|
|
142
|
+
const t6 = t2.nextSibling;
|
|
143
|
+
const t7 = t6.nextSibling.nextSibling;
|
|
144
|
+
const t8 = t7.nextSibling;
|
|
145
|
+
const t9 = t8.nextSibling;
|
|
146
|
+
const t10 = t9.nextSibling;
|
|
147
|
+
const R = { a0: t1, a1: t2, a2: t4, a5: t7, a6: t8, a7: t9, a8: t10, v0: null, v1: null, v2: null, v3: "", v4: null, v5: null, v6: null, v7: null, a3: t5, e0: t5.nextSibling, b0: undefined, a4: t6, e1: t6.nextSibling, b1: undefined };
|
|
148
|
+
const I = { B };
|
|
149
|
+
I.R = new Set();
|
|
150
|
+
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);
|
|
151
|
+
manageProps(I);
|
|
152
|
+
return element;
|
|
153
|
+
}
|
|
@@ -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;
|