@threadlabs/looma 0.31.0 → 0.31.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "type": "module",
5
5
  "description": "Looma components as HTML, Vue, and plain DOM, with design tokens.",
6
6
  "license": "MIT",
@@ -0,0 +1 @@
1
+ /* Generated by HTML Next 1.0.0-alpha.67. Do not edit. */
@@ -0,0 +1,30 @@
1
+ // Generated by HTML Next 1.0.0-alpha.67 for Vanilla DOM. Do not edit.
2
+ export interface UiEditorFootnoteEditorEventMap {
3
+ text: CustomEvent<{ readonly text: string }>;
4
+ label: CustomEvent<{ readonly label: string }>;
5
+ go: CustomEvent<Readonly<Record<string, unknown>>>;
6
+ done: CustomEvent<Readonly<Record<string, unknown>>>;
7
+ }
8
+ export interface UiEditorFootnoteEditorElement extends HTMLDivElement {
9
+ addEventListener<K extends keyof UiEditorFootnoteEditorEventMap>(type: K, listener: (this: UiEditorFootnoteEditorElement, event: UiEditorFootnoteEditorEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
10
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: UiEditorFootnoteEditorElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
11
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
12
+ removeEventListener<K extends keyof UiEditorFootnoteEditorEventMap>(type: K, listener: (this: UiEditorFootnoteEditorElement, event: UiEditorFootnoteEditorEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
13
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: UiEditorFootnoteEditorElement, event: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
14
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
15
+ }
16
+ export interface UiEditorFootnoteEditorProps {
17
+ editable?: boolean | null;
18
+ error?: string | null;
19
+ label?: string | null;
20
+ note?: string | null;
21
+ attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
22
+ children?: readonly (string | Node)[];
23
+ slots?: Readonly<Record<string, readonly (string | Node)[]>>;
24
+ }
25
+ export declare function createUiEditorFootnoteEditor(props?: UiEditorFootnoteEditorProps): UiEditorFootnoteEditorElement;
26
+ declare global {
27
+ interface ComponentTagMap {
28
+ "ui-editor-footnote-editor": { element: UiEditorFootnoteEditorElement; props: Omit<UiEditorFootnoteEditorProps, "attributes" | "children" | "slots"> };
29
+ }
30
+ }
@@ -0,0 +1,101 @@
1
+ // Generated by HTML Next 1.0.0-alpha.67 for Vanilla DOM. Do not edit.
2
+ import { attachGeneratedController, buildTemplate, clearRegion, NONCONFORMING, textCall, toAttribute, toText, truthy, writeAttribute, dispatchDeclared, detailCheck, acceptProps, manageProps, generatedInputs, checkBoolean, checkObject, checkRecord, checkString, checkUnknown, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
3
+ import * as controller from "../components/ui-editor-footnote-editor/ui-editor-footnote-editor.js";
4
+ import "../styles/ui-editor-footnote-editor.css";
5
+
6
+ const T0 = ["",[],"\n ",["ui-stack",["gap","s"],["ui-form-field",[],["label",["slot","label"],"Label"],["ui-input-group",[],["span",["slot","prefix"],"[^"],["ui-input",["data-footnote-label","","size","sm","autocomplete","off"]],["span",["slot","suffix"],"]"]],["span",["slot","error"],0]],"\n ",["ui-form-field",[],["label",["slot","label"],"Note"],["ui-input-group",["multiline",""],["ui-textarea",["data-footnote-note","","size","sm","rows","2","autosize","","placeholder","Write the note"]],["ui-button",["slot","action","size","sm","data-footnote-go",""],"Go to note"]],1]],"\n "];
7
+ const T1 = ["span",["slot","help"],"This note has formatting, so it is edited in the document."];
8
+ let P0, P1;
9
+ const S = { n: ["base"], t: ["s"], f: import.meta.url, g: "ui-editor-footnote-editor", d: { "text": [detailCheck(checkObject([["text", checkString, false]], false)), true, true, false], "label": [detailCheck(checkObject([["label", checkString, false]], false)), true, true, false], "go": [detailCheck(checkRecord(checkUnknown)), true, true, false], "done": [detailCheck(checkRecord(checkUnknown)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs, i: ["ui-editor-footnote-editor"] };
10
+ const D = { g: "ui-editor-footnote-editor", props: { "editable": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "error": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "label": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "note": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" } } };
11
+ const C = (host) => activateModule(controller, host);
12
+
13
+ export function createUiEditorFootnoteEditor(options = {}, html) {
14
+ const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
15
+ const element = document.createElement("div");
16
+ for (const [name, value] of Object.entries(attributes)) {
17
+ if (value === null || value === undefined || value === false) continue;
18
+ element.setAttribute(name, value === true ? "" : String(value));
19
+ }
20
+ if (!element.hasAttribute("role")) element.setAttribute("role", "dialog");
21
+ if (!element.hasAttribute("aria-label")) element.setAttribute("aria-label", "Edit footnote");
22
+ element.setAttribute("data-component", "ui-editor-footnote-editor");
23
+ element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
24
+ const v = ["ui-editor-footnote-editor", null, null, null, null];
25
+ const B = acceptProps(element, D, S.n, v, componentProps, [], html);
26
+ const m1 = (d) => {
27
+ const n = (P1 ??= buildTemplate(T1)).cloneNode(true);
28
+ const r = { n };
29
+ p1(r, -1, d);
30
+ return r;
31
+ };
32
+ const p1 = (r, c, d) => {
33
+ };
34
+ const p0 = (r, c, d) => {
35
+ if (c & 4) {
36
+ const x0 = (v[2] !== "");
37
+ const s0 = toAttribute(x0, "invalid");
38
+ if (s0 !== r.v0) writeAttribute(r.a0, "invalid", r.v0 = s0);
39
+ const x1 = v[2];
40
+ const s4 = toText(x1);
41
+ if (s4 !== r.v4) r.a3.data = r.v4 = s4;
42
+ }
43
+ if (c & 1) {
44
+ const x2 = textCall("concat", [v[0], "-label"]);
45
+ if (x2 !== NONCONFORMING) {
46
+ const s1 = toAttribute(x2, "for");
47
+ if (s1 !== r.v1) writeAttribute(r.a1, "for", r.v1 = s1);
48
+ }
49
+ if (x2 !== NONCONFORMING) {
50
+ const s2 = toAttribute(x2, "id");
51
+ if (s2 !== r.v2) writeAttribute(r.a2, "id", r.v2 = s2);
52
+ }
53
+ const x3 = textCall("concat", [v[0], "-note"]);
54
+ if (x3 !== NONCONFORMING) {
55
+ const s5 = toAttribute(x3, "for");
56
+ if (s5 !== r.v5) writeAttribute(r.a4, "for", r.v5 = s5);
57
+ }
58
+ if (x3 !== NONCONFORMING) {
59
+ const s6 = toAttribute(x3, "id");
60
+ if (s6 !== r.v6) writeAttribute(r.a5, "id", r.v6 = s6);
61
+ }
62
+ }
63
+ if (c & 8) {
64
+ const x4 = v[3];
65
+ const s3 = toAttribute(x4, "value");
66
+ if (s3 !== r.v3) writeAttribute(r.a2, "value", r.v3 = s3);
67
+ }
68
+ if (c & 2) {
69
+ const x5 = !truthy(v[1]);
70
+ const s7 = toAttribute(x5, "readonly");
71
+ if (s7 !== r.v7) writeAttribute(r.a5, "readonly", r.v7 = s7);
72
+ }
73
+ if (c & 16) {
74
+ const x6 = v[4];
75
+ const s8 = toAttribute(x6, "value");
76
+ if (s8 !== r.v8) writeAttribute(r.a5, "value", r.v8 = s8);
77
+ }
78
+ if (c & 2 && !(!truthy(v[1])) !== !r.b0) {
79
+ if (r.b0) { r.b0 = undefined; clearRegion(r.a6, r.e0); }
80
+ else { r.b0 = m1(d); r.e0.before(r.b0.n); }
81
+ } else if (r.b0 !== undefined) p1(r.b0, c, d);
82
+ };
83
+ const t0 = element.firstChild.nextSibling;
84
+ const t1 = t0.firstChild;
85
+ const t2 = t1.firstChild;
86
+ const t3 = t2.nextSibling;
87
+ const t4 = t3.firstChild.nextSibling;
88
+ const t5 = t3.nextSibling.firstChild;
89
+ const t6 = t1.nextSibling.nextSibling;
90
+ const t7 = t6.firstChild;
91
+ const t8 = t7.nextSibling;
92
+ const t9 = t8.firstChild;
93
+ const t10 = t8.nextSibling;
94
+ const R = { a0: t1, a1: t2, a2: t4, a3: t5, a4: t7, a5: t9, v0: null, v1: null, v2: null, v3: null, v4: "", v5: null, v6: null, v7: null, v8: null, a6: t10, e0: t10.nextSibling, b0: undefined };
95
+ const I = { B };
96
+ I.R = new Set();
97
+ attachGeneratedController(element, S, v, (c, d) => { ((c, d) => p0(R, c, d))(c, d); for (const f of I.R) f(c, d); }, undefined, undefined, I);
98
+ manageProps(I);
99
+ return element;
100
+ }
101
+ defineComponent("ui-editor-footnote-editor", createUiEditorFootnoteEditor, ["editable","error","label","note"]);
package/vanilla/UiIcon.js CHANGED
@@ -29,7 +29,7 @@ export function createUiIcon(options = {}, html) {
29
29
  const inputStatus = (j) => { if (j >= 0 && j < 1) { g(j); return CS[j] ?? UNRESOLVED_INPUT; } if (j === 1) return awaitInput(B, "name", true); if (j === 2) return awaitInput(B, "tone", true); return v[j] === undefined ? UNRESOLVED_INPUT : READY_INPUT; };
30
30
  const X = { e: 0, g: (j) => g(j), w: new Set(), a: CS, i: inputStatus };
31
31
  const ke = [];
32
- const K = [() => readIndex({ "align-center": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M17 12H7" }, { "tag": "path", "d": "M19 19H5" }], "align-left": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M15 12H3" }, { "tag": "path", "d": "M17 19H3" }], "align-right": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M21 12H9" }, { "tag": "path", "d": "M21 19H7" }], "arrow-left": [{ "tag": "path", "d": "m12 19-7-7 7-7" }, { "tag": "path", "d": "M19 12H5" }], "bell": [{ "tag": "path", "d": "M10.268 21a2 2 0 0 0 3.464 0" }, { "tag": "path", "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }], "bold": [{ "tag": "path", "d": "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }], "book-user": [{ "tag": "path", "d": "M15 13a3 3 0 1 0-6 0" }, { "tag": "path", "d": "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }, { "tag": "circle", "cx": "12", "cy": "8", "r": "2" }], "braces": [{ "tag": "path", "d": "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" }, { "tag": "path", "d": "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" }], "calculator": [{ "tag": "rect", "width": "16", "height": "20", "x": "4", "y": "2", "rx": "2" }, { "tag": "line", "x1": "8", "x2": "16", "y1": "6", "y2": "6" }, { "tag": "line", "x1": "16", "x2": "16", "y1": "14", "y2": "18" }, { "tag": "path", "d": "M16 10h.01" }, { "tag": "path", "d": "M12 10h.01" }, { "tag": "path", "d": "M8 10h.01" }, { "tag": "path", "d": "M12 14h.01" }, { "tag": "path", "d": "M8 14h.01" }, { "tag": "path", "d": "M12 18h.01" }, { "tag": "path", "d": "M8 18h.01" }], "check": [{ "tag": "path", "d": "M20 6 9 17l-5-5" }], "chevron-down": [{ "tag": "path", "d": "m6 9 6 6 6-6" }], "chevron-left": [{ "tag": "path", "d": "m15 18-6-6 6-6" }], "chevron-right": [{ "tag": "path", "d": "m9 18 6-6-6-6" }], "circle-check": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "m9 12 2 2 4-4" }], "circle-dot": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "1" }], "circle-x": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "m15 9-6 6" }, { "tag": "path", "d": "m9 9 6 6" }], "code-xml": [{ "tag": "path", "d": "m18 16 4-4-4-4" }, { "tag": "path", "d": "m6 8-4 4 4 4" }, { "tag": "path", "d": "m14.5 4-5 16" }], "columns": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M9 3v18" }, { "tag": "path", "d": "M15 3v18" }], "compass": [{ "tag": "path", "d": "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "10" }], "credit-card": [{ "tag": "rect", "width": "20", "height": "14", "x": "2", "y": "5", "rx": "2" }, { "tag": "line", "x1": "2", "x2": "22", "y1": "10", "y2": "10" }], "ellipsis": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "12", "r": "1" }], "eraser": [{ "tag": "path", "d": "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21" }, { "tag": "path", "d": "m5.082 11.09 8.828 8.828" }], "external-link": [{ "tag": "path", "d": "M15 3h6v6" }, { "tag": "path", "d": "M10 14 21 3" }, { "tag": "path", "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }], "file-text": [{ "tag": "path", "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }, { "tag": "path", "d": "M14 2v5a1 1 0 0 0 1 1h5" }, { "tag": "path", "d": "M10 9H8" }, { "tag": "path", "d": "M16 13H8" }, { "tag": "path", "d": "M16 17H8" }], "folder": [{ "tag": "path", "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], "grip-horizontal": [{ "tag": "circle", "cx": "12", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "12", "cy": "15", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "15", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "15", "r": "1" }], "grip-vertical": [{ "tag": "circle", "cx": "9", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "9", "cy": "5", "r": "1" }, { "tag": "circle", "cx": "9", "cy": "19", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "5", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "19", "r": "1" }], "heading-1": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "m17 12 3-2v8" }], "heading-2": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }], "heading-3": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }, { "tag": "path", "d": "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }], "help": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }, { "tag": "path", "d": "M12 17h.01" }], "highlighter": [{ "tag": "path", "d": "m9 11-6 6v3h9l3-3" }, { "tag": "path", "d": "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" }], "history": [{ "tag": "path", "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }, { "tag": "path", "d": "M3 3v5h5" }, { "tag": "path", "d": "M12 7v5l4 2" }], "image": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }, { "tag": "circle", "cx": "9", "cy": "9", "r": "2" }, { "tag": "path", "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }], "info": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "M12 16v-4" }, { "tag": "path", "d": "M12 8h.01" }], "italic": [{ "tag": "line", "x1": "19", "x2": "10", "y1": "4", "y2": "4" }, { "tag": "line", "x1": "14", "x2": "5", "y1": "20", "y2": "20" }, { "tag": "line", "x1": "15", "x2": "9", "y1": "4", "y2": "20" }], "layout-dashboard": [{ "tag": "rect", "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }, { "tag": "rect", "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }, { "tag": "rect", "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }, { "tag": "rect", "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }], "lightbulb": [{ "tag": "path", "d": "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" }, { "tag": "path", "d": "M9 18h6" }, { "tag": "path", "d": "M10 22h4" }], "link": [{ "tag": "path", "d": "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }, { "tag": "path", "d": "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }], "list": [{ "tag": "path", "d": "M3 5h.01" }, { "tag": "path", "d": "M3 12h.01" }, { "tag": "path", "d": "M3 19h.01" }, { "tag": "path", "d": "M8 5h13" }, { "tag": "path", "d": "M8 12h13" }, { "tag": "path", "d": "M8 19h13" }], "list-ordered": [{ "tag": "path", "d": "M11 5h10" }, { "tag": "path", "d": "M11 12h10" }, { "tag": "path", "d": "M11 19h10" }, { "tag": "path", "d": "M4 4h1v5" }, { "tag": "path", "d": "M4 9h2" }, { "tag": "path", "d": "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }], "list-todo": [{ "tag": "path", "d": "M13 5h8" }, { "tag": "path", "d": "M13 12h8" }, { "tag": "path", "d": "M13 19h8" }, { "tag": "path", "d": "m3 17 2 2 4-4" }, { "tag": "rect", "x": "3", "y": "4", "width": "6", "height": "6", "rx": "1" }], "loader": [{ "tag": "path", "d": "M21 12a9 9 0 1 1-6.219-8.56" }], "merge": [{ "tag": "path", "d": "m8 6 4-4 4 4" }, { "tag": "path", "d": "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }, { "tag": "path", "d": "m20 22-5-5" }], "message-square-warning": [{ "tag": "path", "d": "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }, { "tag": "path", "d": "M12 15h.01" }, { "tag": "path", "d": "M12 7v4" }], "minus": [{ "tag": "path", "d": "M5 12h14" }], "notebook-pen": [{ "tag": "path", "d": "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4" }, { "tag": "path", "d": "M2 6h4" }, { "tag": "path", "d": "M2 10h4" }, { "tag": "path", "d": "M2 14h4" }, { "tag": "path", "d": "M2 18h4" }, { "tag": "path", "d": "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }], "paint-bucket": [{ "tag": "path", "d": "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z" }, { "tag": "path", "d": "m5 2 5 5" }, { "tag": "path", "d": "M2 13h15" }, { "tag": "path", "d": "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z" }], "panel-bottom": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M3 15h18" }], "panel-left": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M9 3v18" }], "panel-right": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M15 3v18" }], "panel-top": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M3 9h18" }], "pencil": [{ "tag": "path", "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, { "tag": "path", "d": "m15 5 4 4" }], "pilcrow": [{ "tag": "path", "d": "M13 4v16" }, { "tag": "path", "d": "M17 4v16" }, { "tag": "path", "d": "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }], "plus": [{ "tag": "path", "d": "M5 12h14" }, { "tag": "path", "d": "M12 5v14" }], "quote": [{ "tag": "path", "d": "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }, { "tag": "path", "d": "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }], "receipt": [{ "tag": "path", "d": "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }, { "tag": "path", "d": "M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8" }, { "tag": "path", "d": "M12 17.5v-11" }], "redo": [{ "tag": "path", "d": "m15 14 5-5-5-5" }, { "tag": "path", "d": "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }], "rows": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M21 9H3" }, { "tag": "path", "d": "M21 15H3" }], "search": [{ "tag": "path", "d": "m21 21-4.34-4.34" }, { "tag": "circle", "cx": "11", "cy": "11", "r": "8" }], "settings": [{ "tag": "path", "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "3" }], "split": [{ "tag": "path", "d": "M16 3h5v5" }, { "tag": "path", "d": "M8 3H3v5" }, { "tag": "path", "d": "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }, { "tag": "path", "d": "m15 9 6-6" }], "strikethrough": [{ "tag": "path", "d": "M16 4H9a3 3 0 0 0-2.83 4" }, { "tag": "path", "d": "M14 12a4 4 0 0 1 0 8H6" }, { "tag": "line", "x1": "4", "x2": "20", "y1": "12", "y2": "12" }], "table": [{ "tag": "path", "d": "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18" }], "tag": [{ "tag": "path", "d": "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }, { "tag": "circle", "cx": "7.5", "cy": "7.5", "r": ".5", "fill": "currentColor" }], "trash": [{ "tag": "path", "d": "M10 11v6" }, { "tag": "path", "d": "M14 11v6" }, { "tag": "path", "d": "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }, { "tag": "path", "d": "M3 6h18" }, { "tag": "path", "d": "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }], "triangle-alert": [{ "tag": "path", "d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }, { "tag": "path", "d": "M12 9v4" }, { "tag": "path", "d": "M12 17h.01" }], "truck": [{ "tag": "path", "d": "M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2" }, { "tag": "path", "d": "M15 18H9" }, { "tag": "path", "d": "M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14" }, { "tag": "circle", "cx": "17", "cy": "18", "r": "2" }, { "tag": "circle", "cx": "7", "cy": "18", "r": "2" }], "underline": [{ "tag": "path", "d": "M6 4v6a6 6 0 0 0 12 0V4" }, { "tag": "line", "x1": "4", "x2": "20", "y1": "20", "y2": "20" }], "undo": [{ "tag": "path", "d": "M9 14 4 9l5-5" }, { "tag": "path", "d": "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }], "unlink": [{ "tag": "path", "d": "m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71" }, { "tag": "path", "d": "m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71" }, { "tag": "line", "x1": "8", "x2": "8", "y1": "2", "y2": "5" }, { "tag": "line", "x1": "2", "x2": "5", "y1": "8", "y2": "8" }, { "tag": "line", "x1": "16", "x2": "16", "y1": "19", "y2": "22" }, { "tag": "line", "x1": "19", "x2": "22", "y1": "16", "y2": "16" }], "user-round": [{ "tag": "circle", "cx": "12", "cy": "8", "r": "5" }, { "tag": "path", "d": "M20 21a8 8 0 0 0-16 0" }], "users": [{ "tag": "path", "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { "tag": "path", "d": "M16 3.128a4 4 0 0 1 0 7.744" }, { "tag": "path", "d": "M22 21v-2a4 4 0 0 0-3-3.87" }, { "tag": "circle", "cx": "9", "cy": "7", "r": "4" }], "x": [{ "tag": "path", "d": "M18 6 6 18" }, { "tag": "path", "d": "m6 6 12 12" }] }, inputRead(v[1], inputStatus(1)))];
32
+ const K = [() => readIndex({ "align-center": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M17 12H7" }, { "tag": "path", "d": "M19 19H5" }], "align-left": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M15 12H3" }, { "tag": "path", "d": "M17 19H3" }], "align-right": [{ "tag": "path", "d": "M21 5H3" }, { "tag": "path", "d": "M21 12H9" }, { "tag": "path", "d": "M21 19H7" }], "arrow-left": [{ "tag": "path", "d": "m12 19-7-7 7-7" }, { "tag": "path", "d": "M19 12H5" }], "bell": [{ "tag": "path", "d": "M10.268 21a2 2 0 0 0 3.464 0" }, { "tag": "path", "d": "M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326" }], "bold": [{ "tag": "path", "d": "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }], "book-user": [{ "tag": "path", "d": "M15 13a3 3 0 1 0-6 0" }, { "tag": "path", "d": "M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" }, { "tag": "circle", "cx": "12", "cy": "8", "r": "2" }], "braces": [{ "tag": "path", "d": "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" }, { "tag": "path", "d": "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" }], "calculator": [{ "tag": "rect", "width": "16", "height": "20", "x": "4", "y": "2", "rx": "2" }, { "tag": "line", "x1": "8", "x2": "16", "y1": "6", "y2": "6" }, { "tag": "line", "x1": "16", "x2": "16", "y1": "14", "y2": "18" }, { "tag": "path", "d": "M16 10h.01" }, { "tag": "path", "d": "M12 10h.01" }, { "tag": "path", "d": "M8 10h.01" }, { "tag": "path", "d": "M12 14h.01" }, { "tag": "path", "d": "M8 14h.01" }, { "tag": "path", "d": "M12 18h.01" }, { "tag": "path", "d": "M8 18h.01" }], "check": [{ "tag": "path", "d": "M20 6 9 17l-5-5" }], "chevron-down": [{ "tag": "path", "d": "m6 9 6 6 6-6" }], "chevron-left": [{ "tag": "path", "d": "m15 18-6-6 6-6" }], "chevron-right": [{ "tag": "path", "d": "m9 18 6-6-6-6" }], "circle-check": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "m9 12 2 2 4-4" }], "circle-dot": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "1" }], "circle-x": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "m15 9-6 6" }, { "tag": "path", "d": "m9 9 6 6" }], "code-xml": [{ "tag": "path", "d": "m18 16 4-4-4-4" }, { "tag": "path", "d": "m6 8-4 4 4 4" }, { "tag": "path", "d": "m14.5 4-5 16" }], "columns": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M9 3v18" }, { "tag": "path", "d": "M15 3v18" }], "compass": [{ "tag": "path", "d": "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "10" }], "credit-card": [{ "tag": "rect", "width": "20", "height": "14", "x": "2", "y": "5", "rx": "2" }, { "tag": "line", "x1": "2", "x2": "22", "y1": "10", "y2": "10" }], "ellipsis": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "12", "r": "1" }], "eraser": [{ "tag": "path", "d": "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21" }, { "tag": "path", "d": "m5.082 11.09 8.828 8.828" }], "external-link": [{ "tag": "path", "d": "M15 3h6v6" }, { "tag": "path", "d": "M10 14 21 3" }, { "tag": "path", "d": "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }], "file-text": [{ "tag": "path", "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }, { "tag": "path", "d": "M14 2v5a1 1 0 0 0 1 1h5" }, { "tag": "path", "d": "M10 9H8" }, { "tag": "path", "d": "M16 13H8" }, { "tag": "path", "d": "M16 17H8" }], "folder": [{ "tag": "path", "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }], "grip-horizontal": [{ "tag": "circle", "cx": "12", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "9", "r": "1" }, { "tag": "circle", "cx": "12", "cy": "15", "r": "1" }, { "tag": "circle", "cx": "19", "cy": "15", "r": "1" }, { "tag": "circle", "cx": "5", "cy": "15", "r": "1" }], "grip-vertical": [{ "tag": "circle", "cx": "9", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "9", "cy": "5", "r": "1" }, { "tag": "circle", "cx": "9", "cy": "19", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "12", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "5", "r": "1" }, { "tag": "circle", "cx": "15", "cy": "19", "r": "1" }], "heading-1": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "m17 12 3-2v8" }], "heading-2": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }], "heading-3": [{ "tag": "path", "d": "M4 12h8" }, { "tag": "path", "d": "M4 18V6" }, { "tag": "path", "d": "M12 18V6" }, { "tag": "path", "d": "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }, { "tag": "path", "d": "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }], "help": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }, { "tag": "path", "d": "M12 17h.01" }], "highlighter": [{ "tag": "path", "d": "m9 11-6 6v3h9l3-3" }, { "tag": "path", "d": "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" }], "history": [{ "tag": "path", "d": "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }, { "tag": "path", "d": "M3 3v5h5" }, { "tag": "path", "d": "M12 7v5l4 2" }], "image": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2", "ry": "2" }, { "tag": "circle", "cx": "9", "cy": "9", "r": "2" }, { "tag": "path", "d": "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }], "info": [{ "tag": "circle", "cx": "12", "cy": "12", "r": "10" }, { "tag": "path", "d": "M12 16v-4" }, { "tag": "path", "d": "M12 8h.01" }], "italic": [{ "tag": "line", "x1": "19", "x2": "10", "y1": "4", "y2": "4" }, { "tag": "line", "x1": "14", "x2": "5", "y1": "20", "y2": "20" }, { "tag": "line", "x1": "15", "x2": "9", "y1": "4", "y2": "20" }], "layout-dashboard": [{ "tag": "rect", "width": "7", "height": "9", "x": "3", "y": "3", "rx": "1" }, { "tag": "rect", "width": "7", "height": "5", "x": "14", "y": "3", "rx": "1" }, { "tag": "rect", "width": "7", "height": "9", "x": "14", "y": "12", "rx": "1" }, { "tag": "rect", "width": "7", "height": "5", "x": "3", "y": "16", "rx": "1" }], "lightbulb": [{ "tag": "path", "d": "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" }, { "tag": "path", "d": "M9 18h6" }, { "tag": "path", "d": "M10 22h4" }], "link": [{ "tag": "path", "d": "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }, { "tag": "path", "d": "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }], "list": [{ "tag": "path", "d": "M3 5h.01" }, { "tag": "path", "d": "M3 12h.01" }, { "tag": "path", "d": "M3 19h.01" }, { "tag": "path", "d": "M8 5h13" }, { "tag": "path", "d": "M8 12h13" }, { "tag": "path", "d": "M8 19h13" }], "list-ordered": [{ "tag": "path", "d": "M11 5h10" }, { "tag": "path", "d": "M11 12h10" }, { "tag": "path", "d": "M11 19h10" }, { "tag": "path", "d": "M4 4h1v5" }, { "tag": "path", "d": "M4 9h2" }, { "tag": "path", "d": "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }], "list-todo": [{ "tag": "path", "d": "M13 5h8" }, { "tag": "path", "d": "M13 12h8" }, { "tag": "path", "d": "M13 19h8" }, { "tag": "path", "d": "m3 17 2 2 4-4" }, { "tag": "rect", "x": "3", "y": "4", "width": "6", "height": "6", "rx": "1" }], "loader": [{ "tag": "path", "d": "M21 12a9 9 0 1 1-6.219-8.56" }], "merge": [{ "tag": "path", "d": "m8 6 4-4 4 4" }, { "tag": "path", "d": "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }, { "tag": "path", "d": "m20 22-5-5" }], "message-square-warning": [{ "tag": "path", "d": "M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" }, { "tag": "path", "d": "M12 15h.01" }, { "tag": "path", "d": "M12 7v4" }], "minus": [{ "tag": "path", "d": "M5 12h14" }], "notebook-pen": [{ "tag": "path", "d": "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4" }, { "tag": "path", "d": "M2 6h4" }, { "tag": "path", "d": "M2 10h4" }, { "tag": "path", "d": "M2 14h4" }, { "tag": "path", "d": "M2 18h4" }, { "tag": "path", "d": "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z" }], "paint-bucket": [{ "tag": "path", "d": "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z" }, { "tag": "path", "d": "m5 2 5 5" }, { "tag": "path", "d": "M2 13h15" }, { "tag": "path", "d": "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z" }], "panel-bottom": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M3 15h18" }], "panel-left": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M9 3v18" }], "panel-right": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M15 3v18" }], "panel-top": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M3 9h18" }], "pencil": [{ "tag": "path", "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z" }, { "tag": "path", "d": "m15 5 4 4" }], "pilcrow": [{ "tag": "path", "d": "M13 4v16" }, { "tag": "path", "d": "M17 4v16" }, { "tag": "path", "d": "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }], "plus": [{ "tag": "path", "d": "M5 12h14" }, { "tag": "path", "d": "M12 5v14" }], "quote": [{ "tag": "path", "d": "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }, { "tag": "path", "d": "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }], "receipt": [{ "tag": "path", "d": "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z" }, { "tag": "path", "d": "M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8" }, { "tag": "path", "d": "M12 17.5v-11" }], "redo": [{ "tag": "path", "d": "m15 14 5-5-5-5" }, { "tag": "path", "d": "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }], "rows": [{ "tag": "rect", "width": "18", "height": "18", "x": "3", "y": "3", "rx": "2" }, { "tag": "path", "d": "M21 9H3" }, { "tag": "path", "d": "M21 15H3" }], "search": [{ "tag": "path", "d": "m21 21-4.34-4.34" }, { "tag": "circle", "cx": "11", "cy": "11", "r": "8" }], "settings": [{ "tag": "path", "d": "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }, { "tag": "circle", "cx": "12", "cy": "12", "r": "3" }], "split": [{ "tag": "path", "d": "M16 3h5v5" }, { "tag": "path", "d": "M8 3H3v5" }, { "tag": "path", "d": "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }, { "tag": "path", "d": "m15 9 6-6" }], "strikethrough": [{ "tag": "path", "d": "M16 4H9a3 3 0 0 0-2.83 4" }, { "tag": "path", "d": "M14 12a4 4 0 0 1 0 8H6" }, { "tag": "line", "x1": "4", "x2": "20", "y1": "12", "y2": "12" }], "superscript": [{ "tag": "path", "d": "m4 19 8-8" }, { "tag": "path", "d": "m12 19-8-8" }, { "tag": "path", "d": "M20 12h-4c0-1.5.442-2 1.5-2.5S20 8.334 20 7.002c0-.472-.17-.93-.484-1.29a2.105 2.105 0 0 0-2.617-.436c-.42.239-.738.614-.899 1.06" }], "table": [{ "tag": "path", "d": "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18" }], "tag": [{ "tag": "path", "d": "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" }, { "tag": "circle", "cx": "7.5", "cy": "7.5", "r": ".5", "fill": "currentColor" }], "trash": [{ "tag": "path", "d": "M10 11v6" }, { "tag": "path", "d": "M14 11v6" }, { "tag": "path", "d": "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }, { "tag": "path", "d": "M3 6h18" }, { "tag": "path", "d": "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }], "triangle-alert": [{ "tag": "path", "d": "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }, { "tag": "path", "d": "M12 9v4" }, { "tag": "path", "d": "M12 17h.01" }], "truck": [{ "tag": "path", "d": "M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2" }, { "tag": "path", "d": "M15 18H9" }, { "tag": "path", "d": "M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14" }, { "tag": "circle", "cx": "17", "cy": "18", "r": "2" }, { "tag": "circle", "cx": "7", "cy": "18", "r": "2" }], "underline": [{ "tag": "path", "d": "M6 4v6a6 6 0 0 0 12 0V4" }, { "tag": "line", "x1": "4", "x2": "20", "y1": "20", "y2": "20" }], "undo": [{ "tag": "path", "d": "M9 14 4 9l5-5" }, { "tag": "path", "d": "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }], "unlink": [{ "tag": "path", "d": "m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71" }, { "tag": "path", "d": "m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71" }, { "tag": "line", "x1": "8", "x2": "8", "y1": "2", "y2": "5" }, { "tag": "line", "x1": "2", "x2": "5", "y1": "8", "y2": "8" }, { "tag": "line", "x1": "16", "x2": "16", "y1": "19", "y2": "22" }, { "tag": "line", "x1": "19", "x2": "22", "y1": "16", "y2": "16" }], "user-round": [{ "tag": "circle", "cx": "12", "cy": "8", "r": "5" }, { "tag": "path", "d": "M20 21a8 8 0 0 0-16 0" }], "users": [{ "tag": "path", "d": "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" }, { "tag": "path", "d": "M16 3.128a4 4 0 0 1 0 7.744" }, { "tag": "path", "d": "M22 21v-2a4 4 0 0 0-3-3.87" }, { "tag": "circle", "cx": "9", "cy": "7", "r": "4" }], "x": [{ "tag": "path", "d": "M18 6 6 18" }, { "tag": "path", "d": "m6 6 12 12" }] }, inputRead(v[1], inputStatus(1)))];
33
33
  const g = (j) => {
34
34
  const i = j - 0;
35
35
  if (ke[i] === X.e) return v[j];
package/vanilla/index.js CHANGED
@@ -22,6 +22,7 @@ export * from "./UiEditable.js";
22
22
  export * from "./UiEditorBlockActions.js";
23
23
  export * from "./UiEditorChipEditor.js";
24
24
  export * from "./UiEditorCodeLanguage.js";
25
+ export * from "./UiEditorFootnoteEditor.js";
25
26
  export * from "./UiEditorImageToolbar.js";
26
27
  export * from "./UiEditorInsertTableGrid.js";
27
28
  export * from "./UiEditorLinkCard.js";
@@ -0,0 +1,57 @@
1
+ import type { PropType } from 'vue';
2
+ import { type InputBindings } from './props.js';
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ editable: {
5
+ type: PropType<boolean | null>;
6
+ };
7
+ error: {
8
+ type: PropType<string | null>;
9
+ };
10
+ label: {
11
+ type: PropType<string | null>;
12
+ };
13
+ note: {
14
+ type: PropType<string | null>;
15
+ };
16
+ "\0htmlNextInputStatus": {
17
+ type: PropType<InputBindings>;
18
+ };
19
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ done: (event: CustomEvent<Readonly<Record<string, unknown>>>) => any;
21
+ label: (event: CustomEvent<{
22
+ readonly label: string;
23
+ }>) => any;
24
+ text: (event: CustomEvent<{
25
+ readonly text: string;
26
+ }>) => any;
27
+ "update:label": (value: string) => any;
28
+ go: (event: CustomEvent<Readonly<Record<string, unknown>>>) => any;
29
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
30
+ editable: {
31
+ type: PropType<boolean | null>;
32
+ };
33
+ error: {
34
+ type: PropType<string | null>;
35
+ };
36
+ label: {
37
+ type: PropType<string | null>;
38
+ };
39
+ note: {
40
+ type: PropType<string | null>;
41
+ };
42
+ "\0htmlNextInputStatus": {
43
+ type: PropType<InputBindings>;
44
+ };
45
+ }>> & Readonly<{
46
+ onDone?: ((event: CustomEvent<Readonly<Record<string, unknown>>>) => any) | undefined;
47
+ onLabel?: ((event: CustomEvent<{
48
+ readonly label: string;
49
+ }>) => any) | undefined;
50
+ onText?: ((event: CustomEvent<{
51
+ readonly text: string;
52
+ }>) => any) | undefined;
53
+ "onUpdate:label"?: ((value: string) => any) | undefined;
54
+ onGo?: ((event: CustomEvent<Readonly<Record<string, unknown>>>) => any) | undefined;
55
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
56
+ declare const _default: typeof __VLS_export;
57
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { t as UiEditorFootnoteEditor_default } from "./chunks/UiEditorFootnoteEditor.js";
2
+ export { UiEditorFootnoteEditor_default as default };
@@ -0,0 +1,304 @@
1
+ <!-- Generated by HTML Next 1.0.0-alpha.67 for Vue 3.5. Do not edit. -->
2
+ <script setup lang="ts">
3
+ import { computed, getCurrentInstance, provide, ref, watchSyncEffect } from 'vue'
4
+ import type { PropType } from 'vue'
5
+ import {
6
+ checkHydratedRoot,
7
+ concat,
8
+ createDispatch,
9
+ nativeAttrs,
10
+ useComponentHost,
11
+ useReflectedProp,
12
+ } from './host'
13
+ import { acceptsControllerWrite } from './props'
14
+ import {
15
+ BINDING_INPUTS_PROP,
16
+ checkedProp,
17
+ checkPropInput,
18
+ evaluateInput,
19
+ type InputBindings,
20
+ inputDefault,
21
+ inputRead,
22
+ propValidityState,
23
+ READY_INPUT,
24
+ requireInputStatus,
25
+ UNRESOLVED_INPUT,
26
+ vPropValidity,
27
+ vuePropInputs,
28
+ } from './props'
29
+ import UiButton from './UiButton.vue'
30
+ import UiFormField from './UiFormField.vue'
31
+ import UiInput from './UiInput.vue'
32
+ import UiInputGroup from './UiInputGroup.vue'
33
+ import UiStack from './UiStack.vue'
34
+ import UiTextarea from './UiTextarea.vue'
35
+
36
+ defineOptions({ inheritAttrs: false })
37
+
38
+ const propValidityContract = {
39
+ props: {
40
+ editable: {
41
+ type: { kind: 'terminal', name: 'boolean' },
42
+ required: false,
43
+ target: { attribute: 'editable' },
44
+ description:
45
+ 'Whether the note\'s text can be edited here. A note with formatting or more than one block shows its text read-only; Go to note edits it in the\n document.',
46
+ default: false,
47
+ },
48
+ error: {
49
+ type: { kind: 'terminal', name: 'string' },
50
+ required: false,
51
+ target: { attribute: 'error' },
52
+ description:
53
+ 'Why the label field\'s label was not used. While set, the field is invalid and shows it.',
54
+ default: '',
55
+ },
56
+ label: {
57
+ type: { kind: 'terminal', name: 'string' },
58
+ required: false,
59
+ target: { attribute: 'value' },
60
+ description:
61
+ 'The footnote\'s label, which its references and its note share, shown between [^ and ].',
62
+ default: '',
63
+ },
64
+ note: {
65
+ type: { kind: 'terminal', name: 'string' },
66
+ required: false,
67
+ target: { attribute: 'value' },
68
+ description:
69
+ 'The note\'s text, shown in the note field, with each block of a longer note on its own line.',
70
+ default: '',
71
+ },
72
+ },
73
+ } as const
74
+ const props = defineProps({
75
+ editable: { type: null as unknown as PropType<boolean | null> },
76
+ error: { type: null as unknown as PropType<string | null> },
77
+ label: { type: null as unknown as PropType<string | null> },
78
+ note: { type: null as unknown as PropType<string | null> },
79
+ [BINDING_INPUTS_PROP]: { type: null as unknown as PropType<InputBindings> },
80
+ })
81
+ const acceptedProps: Record<string, unknown> = { editable: false, error: '', label: '', note: '' }
82
+ const inputTracking = vuePropInputs(acceptedProps, {
83
+ editable: false,
84
+ error: '',
85
+ label: '',
86
+ note: '',
87
+ }, (name, value, source, values) => {
88
+ switch (name) {
89
+ case 'editable':
90
+ return checkPropInput(value, { kind: 'terminal', name: 'boolean' }, true, true)
91
+ case 'error':
92
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
93
+ case 'label':
94
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
95
+ case 'note':
96
+ return checkPropInput(value, { kind: 'terminal', name: 'string' }, true, true)
97
+ default:
98
+ return { ok: false }
99
+ }
100
+ }, () => {
101
+ void checkedProps.value
102
+ })
103
+ const propInputs = inputTracking.inputs
104
+ const checkedProps = computed(() => {
105
+ void inputTracking.version.value
106
+ return ({
107
+ editable: propInputs.value<boolean | null>(
108
+ 'editable',
109
+ props['editable'],
110
+ props[BINDING_INPUTS_PROP],
111
+ ) as boolean,
112
+ error: propInputs.value<string | null>(
113
+ 'error',
114
+ props['error'],
115
+ props[BINDING_INPUTS_PROP],
116
+ ) as string,
117
+ label: propInputs.value<string | null>(
118
+ 'label',
119
+ props['label'],
120
+ props[BINDING_INPUTS_PROP],
121
+ ) as string,
122
+ note: propInputs.value<string | null>(
123
+ 'note',
124
+ props['note'],
125
+ props[BINDING_INPUTS_PROP],
126
+ ) as string,
127
+ })
128
+ })
129
+ const inputStatus = (name: string, handlesError: boolean) => {
130
+ void checkedProps.value
131
+ void inputTracking.version.value
132
+ return requireInputStatus(propInputs.status(name), handlesError)
133
+ }
134
+ void checkedProps.value
135
+ watchSyncEffect(() => {
136
+ void checkedProps.value
137
+ })
138
+ const reflectedProp = useReflectedProp()
139
+ const hydrationInstance = getCurrentInstance()
140
+ const emit = defineEmits<{
141
+ 'update:label': [value: string]
142
+ text: [event: CustomEvent<{ readonly text: string }>]
143
+ label: [event: CustomEvent<{ readonly label: string }>]
144
+ go: [event: CustomEvent<Readonly<Record<string, unknown>>>]
145
+ done: [event: CustomEvent<Readonly<Record<string, unknown>>>]
146
+ }>()
147
+
148
+ const root = ref<HTMLElement | null>(null)
149
+ const base = ref('ui-editor-footnote-editor')
150
+ let guardedPrevious: any = null
151
+ const guarded = computed(() => {
152
+ const candidate: any = concat(base.value, '-label')
153
+ if (candidate === Symbol.for('html-next.invalid-result')) return guardedPrevious
154
+ return guardedPrevious = candidate
155
+ })
156
+ let guardedBindingPrevious: any = null
157
+ const guardedBinding = computed(() => {
158
+ const candidate: any = concat(base.value, '-label')
159
+ if (candidate === Symbol.for('html-next.invalid-result')) return guardedBindingPrevious
160
+ return guardedBindingPrevious = candidate
161
+ })
162
+ let guardedBinding2Previous: any = null
163
+ const guardedBinding2 = computed(() => {
164
+ const candidate: any = concat(base.value, '-note')
165
+ if (candidate === Symbol.for('html-next.invalid-result')) return guardedBinding2Previous
166
+ return guardedBinding2Previous = candidate
167
+ })
168
+ let guardedBinding3Previous: any = null
169
+ const guardedBinding3 = computed(() => {
170
+ const candidate: any = concat(base.value, '-note')
171
+ if (candidate === Symbol.for('html-next.invalid-result')) return guardedBinding3Previous
172
+ return guardedBinding3Previous = candidate
173
+ })
174
+ provide('html-next:ui-editor-footnote-editor:base', base)
175
+ checkHydratedRoot('div', 'ui-editor-footnote-editor')
176
+
177
+ const isTextDetail = (
178
+ detail: unknown,
179
+ ): boolean => (detail !== null && typeof detail === 'object' && !Array.isArray(detail)
180
+ && typeof (detail as Record<string, unknown>)['text'] === 'string'
181
+ && Object.keys(detail as object).every((key) => ['text'].includes(key)))
182
+ const isLabelDetail = (
183
+ detail: unknown,
184
+ ): boolean => (detail !== null && typeof detail === 'object' && !Array.isArray(detail)
185
+ && typeof (detail as Record<string, unknown>)['label'] === 'string'
186
+ && Object.keys(detail as object).every((key) => ['label'].includes(key)))
187
+ const isGoDetail = (
188
+ detail: unknown,
189
+ ): boolean => (detail !== null && typeof detail === 'object' && !Array.isArray(detail)
190
+ && Object.values(detail as object).every((item: unknown) => true))
191
+ const dispatch = createDispatch(root, emit as (name: string, detail: unknown) => void, {
192
+ checks: {
193
+ text: isTextDetail,
194
+ label: isLabelDetail,
195
+ go: isGoDetail,
196
+ done: isGoDetail,
197
+ },
198
+ modeled: ['label'],
199
+ })
200
+
201
+ useComponentHost(
202
+ () => import('../components/ui-editor-footnote-editor/ui-editor-footnote-editor.js'),
203
+ {
204
+ root,
205
+ module: true,
206
+ dispatch,
207
+ acceptsState: (name: string, keys: readonly string[], value: unknown) =>
208
+ acceptsControllerWrite(
209
+ value,
210
+ ({ base: { kind: 'terminal', name: 'string' } } as Record<string, any>)[name],
211
+ keys,
212
+ ),
213
+ initials: { base: 'ui-editor-footnote-editor' },
214
+ controllerSource: {
215
+ specifier: '../components/ui-editor-footnote-editor/ui-editor-footnote-editor.js',
216
+ definition: './components/ui-editor-footnote-editor/ui-editor-footnote-editor.html',
217
+ },
218
+ props: checkedProps,
219
+ inputs: propInputs,
220
+ inputTracking,
221
+ propInputs: (name: string) => {
222
+ const incoming = hydrationInstance?.vnode.props
223
+ const kebab = name.replace(/[A-Z]/g, (letter) => '-' + letter.toLowerCase())
224
+ return incoming !== null && incoming !== undefined
225
+ ? (incoming[name] ?? incoming[kebab] ?? null)
226
+ : null
227
+ },
228
+ propNames: ['editable', 'error', 'label', 'note'],
229
+ propValidity: (name: string) =>
230
+ propValidityState({ contract: propValidityContract, values: { ...props } }, name),
231
+ state: { base },
232
+ },
233
+ )
234
+ </script>
235
+
236
+ <template>
237
+ <div
238
+ role="dialog"
239
+ aria-label="Edit footnote"
240
+ v-bind="nativeAttrs($attrs)"
241
+ data-hn
242
+ v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
243
+ :data-ui-editor-footnote-editor-prop-editable="reflectedProp('editable', 'editable', checkedProps.editable, undefined, false)"
244
+ :data-ui-editor-footnote-editor-prop-error="reflectedProp('error', 'error', checkedProps.error, undefined, false)"
245
+ :data-ui-editor-footnote-editor-prop-label="reflectedProp('label', 'label', checkedProps.label, undefined, false)"
246
+ :data-ui-editor-footnote-editor-prop-note="reflectedProp('note', 'note', checkedProps.note, undefined, false)"
247
+ ref="root"
248
+ >
249
+ <UiStack gap="s"><template
250
+ v-for="boundInput in [evaluateInput(
251
+ () => (inputRead(checkedProps.error, inputStatus('error', true)) !== '') as any,
252
+ READY_INPUT,
253
+ )]"
254
+ ><UiFormField
255
+ :invalid="boundInput.value"
256
+ v-bind="{ [BINDING_INPUTS_PROP]: { invalid: () => boundInput } }"
257
+ ><UiInputGroup><UiInput
258
+ data-footnote-label=""
259
+ size="sm"
260
+ autocomplete="off"
261
+ :id="guardedBinding"
262
+ :value="checkedProps.label"
263
+ v-bind="{
264
+ [BINDING_INPUTS_PROP]: {
265
+ value: () => ({ value: checkedProps.label, status: inputStatus('label', true) }),
266
+ },
267
+ }"
268
+ />
269
+ <template #prefix><span slot="prefix">[^</span></template>
270
+ <template #suffix><span slot="suffix">]</span></template></UiInputGroup>
271
+ <template #label><label slot="label" :for="guarded">Label</label></template>
272
+ <template #error><span slot="error">{{
273
+ checkedProps.error
274
+ }}</span></template></UiFormField></template>{{ ' ' }}<UiFormField><UiInputGroup
275
+ :multiline="true"
276
+ ><template
277
+ v-for="boundInputSnapshot in [evaluateInput(
278
+ () => (!inputRead(checkedProps.editable, inputStatus('editable', true))) as any,
279
+ READY_INPUT,
280
+ )]"
281
+ ><UiTextarea
282
+ data-footnote-note=""
283
+ size="sm"
284
+ :rows="2"
285
+ :autosize="true"
286
+ placeholder="Write the note"
287
+ :id="guardedBinding3"
288
+ :readonly="boundInputSnapshot.value"
289
+ :value="checkedProps.note"
290
+ v-bind="{
291
+ [BINDING_INPUTS_PROP]: {
292
+ readonly: () => boundInputSnapshot,
293
+ value: () => ({ value: checkedProps.note, status: inputStatus('note', true) }),
294
+ },
295
+ }"
296
+ /></template>
297
+ <template #action><UiButton slot="action" size="sm" data-footnote-go=""
298
+ >Go to note</UiButton></template></UiInputGroup>
299
+ <template #label><label slot="label" :for="guardedBinding2">Note</label></template>
300
+ <template #help><span v-if="!checkedProps.editable" slot="help"
301
+ >This note has formatting, so it is edited in the
302
+ document.</span></template></UiFormField></UiStack>
303
+ </div>
304
+ </template>