@threadlabs/looma 0.53.6 → 0.53.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.53.6",
3
+ "version": "0.53.8",
4
4
  "type": "module",
5
5
  "description": "HTML Next UI components, native DOM support and design tokens.",
6
6
  "license": "MIT",
@@ -19,6 +19,11 @@
19
19
  :scope:where(:is([component~="ui-image"]:not(template), [data-component~="ui-image"]:not([component])))[data-ui-image-state~="placement=center"] {
20
20
  justify-content: center !important;
21
21
  }
22
+ :scope:where(:is([component~="ui-image"]:not(template), [data-component~="ui-image"]:not([component])))[data-ui-image-state~="placement=inline"] {
23
+ display: inline-flex !important;
24
+ padding: 0 !important;
25
+ vertical-align: baseline;
26
+ }
22
27
  :scope:where(:is([component~="ui-image"]:not(template), [data-component~="ui-image"]:not([component])))[data-ui-image-state~="placement=wrap-left"] {
23
28
  float: left;
24
29
  padding-inline-end: var(--ui-space-4) !important;
@@ -876,56 +876,59 @@ export function createUiEditor(options = {}, html) {
876
876
  const x0 = "-1";
877
877
  const s1 = toAttribute(x0, "tabindex");
878
878
  writeAttribute(r.n, "tabindex", r.v1 = s1);
879
- const x1 = textCall("concat", ["looma-editor", (truthy(v[5]) ? "" : " looma-editor--readonly"), (truthy(readMember(v[0], "dragOver")) ? " looma-editor--drag-over" : "")]);
880
- if (x1 !== NONCONFORMING) r.g2 = x1;
881
- if (r.g2 !== NONCONFORMING) {
882
- const s2 = toAttribute(r.g2, "class");
883
- writeAttribute(r.n, "class", r.v2 = s2);
884
- }
879
+ const x1 = true;
880
+ const s2 = x1;
881
+ r.n.classList.toggle("looma-editor", r.v2 = s2);
882
+ const x2 = !truthy(v[5]);
883
+ const s3 = x2;
884
+ r.n.classList.toggle("looma-editor--readonly", r.v3 = s3);
885
+ const x3 = readMember(v[0], "dragOver");
886
+ const s4 = truthy(x3);
887
+ r.n.classList.toggle("looma-editor--drag-over", r.v4 = s4);
885
888
  }
886
889
  if (c & 1073741825) {
887
- const x2 = readMember(v[0], "density");
888
- const s3 = toAttribute(x2, "density");
889
- if (s3 !== r.v3) writeAttribute(r.a7, "density", r.v3 = s3);
890
- const x3 = readMember(readMember(v[0], "chip"), "open");
891
- const s5 = toAttribute(x3, "open");
892
- if (s5 !== r.v5) writeAttribute(r.a19, "open", r.v5 = s5);
893
- const x4 = readMember(v[0], "chipAnchorId");
894
- const s6 = toAttribute(x4, "for");
895
- if (s6 !== r.v6) writeAttribute(r.a19, "for", r.v6 = s6);
896
- const x5 = readMember(readMember(v[0], "chip"), "label");
897
- const s7 = toAttribute(x5, "label");
898
- if (s7 !== r.v7) writeAttribute(r.a20, "label", r.v7 = s7);
899
- const x6 = readMember(readMember(v[0], "chip"), "color");
900
- const s8 = toAttribute(x6, "color");
901
- if (s8 !== r.v8) writeAttribute(r.a20, "color", r.v8 = s8);
902
- const x7 = readMember(v[0], "linkOpen");
903
- const s9 = toAttribute(x7, "open");
904
- if (s9 !== r.v9) writeAttribute(r.a23, "open", r.v9 = s9);
905
- const x8 = readMember(v[0], "linkAnchorId");
906
- const s10 = toAttribute(x8, "for");
907
- if (s10 !== r.v10) writeAttribute(r.a23, "for", r.v10 = s10);
908
- const x9 = readMember(v[0], "placement");
909
- const s11 = toAttribute(x9, "placement");
910
- if (s11 !== r.v11) writeAttribute(r.a23, "placement", r.v11 = s11);
911
- const x10 = readMember(v[0], "blockActionAnchorId");
890
+ const x4 = readMember(v[0], "density");
891
+ const s5 = toAttribute(x4, "density");
892
+ if (s5 !== r.v5) writeAttribute(r.a7, "density", r.v5 = s5);
893
+ const x5 = readMember(readMember(v[0], "chip"), "open");
894
+ const s7 = toAttribute(x5, "open");
895
+ if (s7 !== r.v7) writeAttribute(r.a19, "open", r.v7 = s7);
896
+ const x6 = readMember(v[0], "chipAnchorId");
897
+ const s8 = toAttribute(x6, "for");
898
+ if (s8 !== r.v8) writeAttribute(r.a19, "for", r.v8 = s8);
899
+ const x7 = readMember(readMember(v[0], "chip"), "label");
900
+ const s9 = toAttribute(x7, "label");
901
+ if (s9 !== r.v9) writeAttribute(r.a20, "label", r.v9 = s9);
902
+ const x8 = readMember(readMember(v[0], "chip"), "color");
903
+ const s10 = toAttribute(x8, "color");
904
+ if (s10 !== r.v10) writeAttribute(r.a20, "color", r.v10 = s10);
905
+ const x9 = readMember(v[0], "linkOpen");
906
+ const s11 = toAttribute(x9, "open");
907
+ if (s11 !== r.v11) writeAttribute(r.a23, "open", r.v11 = s11);
908
+ const x10 = readMember(v[0], "linkAnchorId");
912
909
  const s12 = toAttribute(x10, "for");
913
- if (s12 !== r.v12) writeAttribute(r.a26, "for", r.v12 = s12);
914
- const s13 = toAttribute(x9, "placement");
915
- if (s13 !== r.v13) writeAttribute(r.a26, "placement", r.v13 = s13);
916
- const x11 = readMember(v[0], "tablePickerOpen");
917
- const s14 = toAttribute(x11, "open");
918
- if (s14 !== r.v14) writeAttribute(r.a27, "open", r.v14 = s14);
919
- const x12 = readMember(v[0], "tablePickerAnchorId");
920
- const s15 = toAttribute(x12, "for");
921
- if (s15 !== r.v15) writeAttribute(r.a27, "for", r.v15 = s15);
922
- const s16 = toAttribute(x9, "placement");
923
- if (s16 !== r.v16) writeAttribute(r.a27, "placement", r.v16 = s16);
910
+ if (s12 !== r.v12) writeAttribute(r.a23, "for", r.v12 = s12);
911
+ const x11 = readMember(v[0], "placement");
912
+ const s13 = toAttribute(x11, "placement");
913
+ if (s13 !== r.v13) writeAttribute(r.a23, "placement", r.v13 = s13);
914
+ const x12 = readMember(v[0], "blockActionAnchorId");
915
+ const s14 = toAttribute(x12, "for");
916
+ if (s14 !== r.v14) writeAttribute(r.a26, "for", r.v14 = s14);
917
+ const s15 = toAttribute(x11, "placement");
918
+ if (s15 !== r.v15) writeAttribute(r.a26, "placement", r.v15 = s15);
919
+ const x13 = readMember(v[0], "tablePickerOpen");
920
+ const s16 = toAttribute(x13, "open");
921
+ if (s16 !== r.v16) writeAttribute(r.a27, "open", r.v16 = s16);
922
+ const x14 = readMember(v[0], "tablePickerAnchorId");
923
+ const s17 = toAttribute(x14, "for");
924
+ if (s17 !== r.v17) writeAttribute(r.a27, "for", r.v17 = s17);
925
+ const s18 = toAttribute(x11, "placement");
926
+ if (s18 !== r.v18) writeAttribute(r.a27, "placement", r.v18 = s18);
924
927
  }
925
928
  if (c === -1) {
926
- const x13 = true;
927
- const s4 = toAttribute(x13, "multiple");
928
- if (s4 !== r.v4) writeAttribute(r.a12, "multiple", r.v4 = s4);
929
+ const x15 = true;
930
+ const s6 = toAttribute(x15, "multiple");
931
+ if (s6 !== r.v6) writeAttribute(r.a12, "multiple", r.v6 = s6);
929
932
  }
930
933
  if (c & 1073741825 && !(truthy(readMember(v[0], "resizeHintFor"))) !== !r.b0) {
931
934
  if (r.b0) { r.b0 = undefined; clearRegion(r.a1, r.e0); }
@@ -1053,7 +1056,7 @@ export function createUiEditor(options = {}, html) {
1053
1056
  const t30 = t29.nextSibling.nextSibling.nextSibling;
1054
1057
  const t31 = t30.nextSibling.nextSibling.nextSibling;
1055
1058
  const t32 = t31.nextSibling.nextSibling.nextSibling;
1056
- const R = { n: element, a7: t6, a12: t11, a19: t18, a20: t19, a23: t22, a26: t25, a27: t26, v0: undefined, v1: undefined, v2: undefined, g2: NONCONFORMING, v3: null, v4: null, v5: null, v6: null, v7: null, v8: null, v9: null, v10: null, v11: null, v12: null, v13: null, v14: null, v15: null, v16: null, a1: t0, e0: t0.nextSibling, b0: undefined, a2: t1, e1: t1.nextSibling, b1: undefined, a3: t2, e2: t2.nextSibling, b2: undefined, a4: t3, e3: t3.nextSibling, b3: undefined, a5: t4, e4: t4.nextSibling, b4: undefined, a6: t5, e5: t5.nextSibling, b5: undefined, a8: t7, e6: t7.nextSibling, b6: undefined, a10: t9, e7: t9.nextSibling, b7: undefined, a11: t10, e8: t10.nextSibling, b8: undefined, a14: t13, e9: t13.nextSibling, b9: undefined, a15: t14, e10: t14.nextSibling, b10: undefined, a16: t15, e11: t15.nextSibling, b11: undefined, a17: t16, e12: t16.nextSibling, b12: undefined, a18: t17, e13: t17.nextSibling, b13: undefined, a21: t20, e14: t20.nextSibling, b14: undefined, a22: t21, e15: t21.nextSibling, b15: undefined, a24: t23, e16: t23.nextSibling, b16: undefined, a25: t24, e17: t24.nextSibling, b17: undefined, a29: t28, e18: t28.nextSibling, b18: undefined, a30: t29, e19: t29.nextSibling, b19: undefined, a31: t30, e20: t30.nextSibling, b20: undefined, a32: t31, e21: t31.nextSibling, b21: undefined, a33: t32, e22: t32.nextSibling, b22: undefined };
1059
+ const R = { n: element, a7: t6, a12: t11, a19: t18, a20: t19, a23: t22, a26: t25, a27: t26, v0: undefined, v1: undefined, v2: undefined, v3: undefined, v4: undefined, v5: null, v6: null, v7: null, v8: null, v9: null, v10: null, v11: null, v12: null, v13: null, v14: null, v15: null, v16: null, v17: null, v18: null, a1: t0, e0: t0.nextSibling, b0: undefined, a2: t1, e1: t1.nextSibling, b1: undefined, a3: t2, e2: t2.nextSibling, b2: undefined, a4: t3, e3: t3.nextSibling, b3: undefined, a5: t4, e4: t4.nextSibling, b4: undefined, a6: t5, e5: t5.nextSibling, b5: undefined, a8: t7, e6: t7.nextSibling, b6: undefined, a10: t9, e7: t9.nextSibling, b7: undefined, a11: t10, e8: t10.nextSibling, b8: undefined, a14: t13, e9: t13.nextSibling, b9: undefined, a15: t14, e10: t14.nextSibling, b10: undefined, a16: t15, e11: t15.nextSibling, b11: undefined, a17: t16, e12: t16.nextSibling, b12: undefined, a18: t17, e13: t17.nextSibling, b13: undefined, a21: t20, e14: t20.nextSibling, b14: undefined, a22: t21, e15: t21.nextSibling, b15: undefined, a24: t23, e16: t23.nextSibling, b16: undefined, a25: t24, e17: t24.nextSibling, b17: undefined, a29: t28, e18: t28.nextSibling, b18: undefined, a30: t29, e19: t29.nextSibling, b19: undefined, a31: t30, e20: t30.nextSibling, b20: undefined, a32: t31, e21: t31.nextSibling, b21: undefined, a33: t32, e22: t32.nextSibling, b22: undefined };
1057
1060
  const I = { B };
1058
1061
  const J = project(I, children, slots);
1059
1062
  I.R = new Set();
@@ -13,7 +13,7 @@ export interface UiImageElement extends HTMLElement {
13
13
  export interface UiImageProps {
14
14
  alt?: string | null;
15
15
  height?: number | null;
16
- placement?: "block" | "center" | "wrap-left" | "wrap-right" | null;
16
+ placement?: "block" | "center" | "wrap-left" | "wrap-right" | "inline" | null;
17
17
  resizable?: boolean | null;
18
18
  selected?: boolean | null;
19
19
  src?: string | null;
@@ -1,24 +1,36 @@
1
1
  // Generated by HTML Next 1.0.0-alpha.92 for Vanilla DOM. Do not edit.
2
- import { attachGeneratedController, buildTemplate, toAttribute, truthy, writeAttribute, writeUrlAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, fillSlot, checkBoolean, checkConstrained, checkFormat, checkInteger, checkObject, checkString, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
2
+ import { attachGeneratedController, equalValue, buildTemplate, toAttribute, truthy, writeAttribute, writeUrlAttribute, dispatchDeclared, detailCheck, dispose, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, project, armElement, replaceRoot, checkBoolean, checkConstrained, checkFormat, checkInteger, checkObject, checkString, initializeSlot, sharePlainSlots, forwardAttributes, resetForwardedAttributes, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
3
3
  import * as controller from "../components/ui-image/ui-image.js";
4
4
  import "../styles/ui-image.css";
5
5
 
6
- const T0 = ["",[],"\n ",["div",["class","frame"],"\n ",4,"\n ",["div",["class","handles"],"\n ",["button",["type","button","class","handle","data-corner","top-left","aria-label","Resize image from top left"]],"\n ",["button",["type","button","class","handle","data-corner","top-right","aria-label","Resize image from top right"]],"\n ",["button",["type","button","class","handle","data-corner","bottom-left","aria-label","Resize image from bottom left"]],"\n ",["button",["type","button","class","handle","data-corner","bottom-right","aria-label","Resize image from bottom right"]],"\n "],"\n ",4,"\n "],"\n "];
6
+ const T0 = ["",[],"\n ",["span",["class","frame"],"\n ",4,"\n ",["span",["class","handles"],"\n ",["button",["type","button","class","handle","data-corner","top-left","aria-label","Resize image from top left"]],"\n ",["button",["type","button","class","handle","data-corner","top-right","aria-label","Resize image from top right"]],"\n ",["button",["type","button","class","handle","data-corner","bottom-left","aria-label","Resize image from bottom left"]],"\n ",["button",["type","button","class","handle","data-corner","bottom-right","aria-label","Resize image from bottom right"]],"\n "],"\n ",4,"\n "],"\n "];
7
7
  const T1 = ["",[],["img",[]]];
8
8
  const T2 = ["",[]];
9
- let P0, P1, P2;
9
+ const T3 = ["",[],"\n ",["div",["class","frame"],"\n ",4,"\n ",["div",["class","handles"],"\n ",["button",["type","button","class","handle","data-corner","top-left","aria-label","Resize image from top left"]],"\n ",["button",["type","button","class","handle","data-corner","top-right","aria-label","Resize image from top right"]],"\n ",["button",["type","button","class","handle","data-corner","bottom-left","aria-label","Resize image from bottom left"]],"\n ",["button",["type","button","class","handle","data-corner","bottom-right","aria-label","Resize image from bottom right"]],"\n "],"\n ",4,"\n "],"\n "];
10
+ const T4 = ["",[],["img",[]]];
11
+ const T5 = ["",[]];
12
+ let P0, P1, P2, P3, P4, P5;
10
13
  const S = { n: [], t: [], f: import.meta.url, g: "ui-image", d: { "resize": [detailCheck(checkObject([["width", checkInteger, false], ["height", checkInteger, false], ["phase", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["preview","commit","cancel"]}), false], ["trigger", checkConstrained(checkFormat("keyword", keywordFormat), "keyword", {"values":["pointer","keyboard"]}), false]], false)), true, true, false] }, x: dispatchDeclared, a: (host, I) => C(host, I), b: generatedInputs };
11
- const D = { g: "ui-image", props: { "alt": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "height": { "required":false, c: checkInteger, t: "integer", j: 0, m: "i" }, "placement": { "required":false,"values":["block","center","wrap-left","wrap-right"],"default":"block", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "resizable": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "selected": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "src": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "width": { "required":false, c: checkInteger, t: "integer", j: 0, m: "i" } } };
14
+ const A = [["span",{},[],"",[],["data-ui-image-state","data-ui-image-prop-alt","data-ui-image-prop-height","data-ui-image-prop-placement","data-ui-image-prop-resizable","data-ui-image-prop-selected","data-ui-image-prop-src","data-ui-image-prop-width"]],["figure",{},[],"",[],["data-ui-image-state","data-ui-image-prop-alt","data-ui-image-prop-height","data-ui-image-prop-placement","data-ui-image-prop-resizable","data-ui-image-prop-selected","data-ui-image-prop-src","data-ui-image-prop-width"]]];
15
+ const Q = [[],[]];
16
+ const D = { g: "ui-image", props: { "alt": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "height": { "required":false, c: checkInteger, t: "integer", j: 0, m: "i" }, "placement": { "required":false,"values":["block","center","wrap-left","wrap-right","inline"],"default":"block", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "resizable": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "selected": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "src": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "width": { "required":false, c: checkInteger, t: "integer", j: 0, m: "i" } } };
12
17
  const C = (host) => activateModule(controller, host);
13
18
 
14
19
  export function createUiImage(options = {}, html) {
15
20
  const { attributes: authoredAttributes = {}, children = [], slots = {}, ...componentProps } = options;
16
21
  const attributes = Object.fromEntries([...[], ...Object.entries(authoredAttributes)].filter(([name]) => !["alt","height","placement","resizable","selected","src","width"].includes(name)));
17
- const element = document.createElement("figure");
18
- element.setAttribute("component", "ui-image");
19
- element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
20
22
  const v = [null, null, null, null, null, null, null];
21
- const B = acceptProps(element, D, S.n, v, componentProps, [], html);
23
+ let B = acceptProps(undefined, D, S.n, v, componentProps, [], html);
24
+ let a = (truthy(equalValue(v[2], "inline")) ? 0 : 1);
25
+ let element;
26
+ if (a === 0) {
27
+ element = document.createElement("span");
28
+ element.setAttribute("component", "ui-image");
29
+ } else {
30
+ element = document.createElement("figure");
31
+ element.setAttribute("component", "ui-image");
32
+ }
33
+ B = acceptProps(element, D, S.n, v, componentProps, Q[a], html);
22
34
  const m1 = (d) => {
23
35
  const n = (P1 ??= buildTemplate(T1)).cloneNode(true);
24
36
  const t0 = n.firstChild;
@@ -56,6 +68,54 @@ export function createUiImage(options = {}, html) {
56
68
  };
57
69
  const p2 = (r, c, d) => {
58
70
  };
71
+ const m4 = (d) => {
72
+ const n = (P4 ??= buildTemplate(T4)).cloneNode(true);
73
+ const t0 = n.firstChild;
74
+ const r = { n, a0: t0, v0: null, v1: null, v2: null, v3: null };
75
+ p4(r, -1, d);
76
+ return r;
77
+ };
78
+ const p4 = (r, c, d) => {
79
+ if (c & 32) {
80
+ const x0 = v[5];
81
+ const s0 = toAttribute(x0, "src");
82
+ if (s0 !== r.v0) writeUrlAttribute(r.a0, "src", r.v0 = s0);
83
+ }
84
+ if (c & 1) {
85
+ const x1 = v[0];
86
+ const s1 = toAttribute(x1, "alt");
87
+ if (s1 !== r.v1) writeAttribute(r.a0, "alt", r.v1 = s1);
88
+ }
89
+ if (c & 64) {
90
+ const x2 = v[6];
91
+ const s2 = toAttribute(x2, "width");
92
+ if (s2 !== r.v2) writeAttribute(r.a0, "width", r.v2 = s2);
93
+ }
94
+ if (c & 2) {
95
+ const x3 = v[1];
96
+ const s3 = toAttribute(x3, "height");
97
+ if (s3 !== r.v3) writeAttribute(r.a0, "height", r.v3 = s3);
98
+ }
99
+ };
100
+ const m5 = (d) => {
101
+ const n = (P5 ??= buildTemplate(T5)).cloneNode(true);
102
+ const r = { n };
103
+ p5(r, -1, d);
104
+ return r;
105
+ };
106
+ const p5 = (r, c, d) => {
107
+ };
108
+ const m0 = (n, d) => {
109
+ n.append((P0 ??= buildTemplate(T0)).cloneNode(true));
110
+ const t0 = n.firstChild.nextSibling;
111
+ const t1 = t0.firstChild.nextSibling;
112
+ const t2 = t1.nextSibling.nextSibling.nextSibling;
113
+ const t3 = t2.nextSibling.nextSibling;
114
+ const r = { n, a3: t2, v0: undefined, v1: null, v2: undefined, a2: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a4: t3, e1: t3.nextSibling, b1: undefined, f1: undefined };
115
+ I.r["frame"] = t0;
116
+ p0(r, -1, d);
117
+ return r;
118
+ };
59
119
  const p0 = (r, c, d) => {
60
120
  if (c === -1) {
61
121
  resetForwardedAttributes(r.n, attributes, r.v0);
@@ -71,24 +131,73 @@ export function createUiImage(options = {}, html) {
71
131
  const s2 = x1;
72
132
  if (s2 !== r.v2) writeAttribute(r.n, "data-ui-image-state", (r.v2 = s2) === "" ? null : s2);
73
133
  }
74
- if (r.f0 === undefined) { r.f0 = 1; const at = fillSlot(r.a2, r.e0, "media", J, true, undefined, d, r.z ??= []);
75
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
76
- else if (r.b0 !== undefined) p1(r.b0, c, d);
77
- if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a4, r.e1, "controls", J, false, undefined, d);
78
- if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m2(d); at.before(r.b1.n); } }
79
- else if (r.b1 !== undefined) p2(r.b1, c, d);
134
+ if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a2, r.e0, "media", J, true, undefined, d, r.z ??= []);
135
+ if (typeof at === "function") r.f0 = at(r, (d, at) => m1(d, undefined, r), p1); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m1(d); at.before(r.b0.n); } }
136
+ else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p1(r.b0, c, d);
137
+ if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a4, r.e1, "controls", J, false, undefined, d);
138
+ if (typeof at === "function") r.f1 = at(r, (d, at) => m2(d, undefined, r), p2); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m2(d); at.before(r.b1.n); } }
139
+ else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p2(r.b1, c, d);
140
+ };
141
+ const m3 = (n, d) => {
142
+ n.append((P3 ??= buildTemplate(T3)).cloneNode(true));
143
+ const t0 = n.firstChild.nextSibling;
144
+ const t1 = t0.firstChild.nextSibling;
145
+ const t2 = t1.nextSibling.nextSibling.nextSibling;
146
+ const t3 = t2.nextSibling.nextSibling;
147
+ const r = { n, a3: t2, v0: undefined, v1: null, v2: undefined, a2: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a4: t3, e1: t3.nextSibling, b1: undefined, f1: undefined };
148
+ I.r["frame"] = t0;
149
+ p3(r, -1, d);
150
+ return r;
151
+ };
152
+ const p3 = (r, c, d) => {
153
+ if (c === -1) {
154
+ resetForwardedAttributes(r.n, attributes, r.v0);
155
+ r.v0 = forwardAttributes(r.n, attributes);
156
+ }
157
+ if (c & 24) {
158
+ const x0 = !(truthy(v[4]) && truthy(v[3]));
159
+ const s1 = toAttribute(x0, "hidden");
160
+ if (s1 !== r.v1) writeAttribute(r.a3, "hidden", r.v1 = s1);
161
+ }
162
+ if (c & 20) {
163
+ const x1 = hostState(["placement","selected"], [v[2], v[4]]);
164
+ const s2 = x1;
165
+ if (s2 !== r.v2) writeAttribute(r.n, "data-ui-image-state", (r.v2 = s2) === "" ? null : s2);
166
+ }
167
+ if (r.f0 === undefined) { r.f0 = 1; const at = initializeSlot(r.a2, r.e0, "media", J, true, undefined, d, r.z ??= []);
168
+ if (typeof at === "function") r.f0 = at(r, (d, at) => m4(d, undefined, r), p4); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b0 = m4(d); at.before(r.b0.n); } }
169
+ else if (typeof r.f0 === "function") r.f0(c, d); else if (r.b0 !== undefined) p4(r.b0, c, d);
170
+ if (r.f1 === undefined) { r.f1 = 1; const at = initializeSlot(r.a4, r.e1, "controls", J, false, undefined, d);
171
+ if (typeof at === "function") r.f1 = at(r, (d, at) => m5(d, undefined, r), p5); else if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m5(d); at.before(r.b1.n); } }
172
+ else if (typeof r.f1 === "function") r.f1(c, d); else if (r.b1 !== undefined) p5(r.b1, c, d);
173
+ };
174
+ const M = [m0, m3], N = [p0, p3];
175
+ let R;
176
+ const p = (c, d) => {
177
+ if (R === null) return;
178
+ if (R === undefined) { R = M[a](element, d); return; }
179
+ if (c & 4) {
180
+ const t = (truthy(equalValue(v[2], "inline")) ? 0 : 1);
181
+ if (t !== a) {
182
+ dispose(R);
183
+ for (const key in I.r) delete I.r[key];
184
+ const previous = I.e, next = armElement(previous, A[a], A[t]);
185
+ I.B.b = Q[t];
186
+ a = t;
187
+ R = null;
188
+ R = M[t](next, d);
189
+ replaceRoot(I, previous, next);
190
+ return;
191
+ }
192
+ }
193
+ N[a](R, c, d);
80
194
  };
81
- const t0 = element.firstChild.nextSibling;
82
- const t1 = t0.firstChild.nextSibling;
83
- const t2 = t1.nextSibling.nextSibling.nextSibling;
84
- const t3 = t2.nextSibling.nextSibling;
85
- const R = { n: element, a3: t2, v0: undefined, v1: null, v2: undefined, a2: t1, e0: t1.nextSibling, b0: undefined, f0: undefined, a4: t3, e1: t3.nextSibling, b1: undefined, f1: undefined };
86
195
  const I = { B };
87
196
  const J = project(I, children, slots);
88
- I.F = { values: attributes, draw: () => ((c, d) => p0(R, c, d))(-1) };
89
- attachGeneratedController(element, S, v, ((c, d) => p0(R, c, d)), undefined, undefined, I);
197
+ sharePlainSlots(I, J, ["media","controls"]);
198
+ I.F = { values: attributes, draw: () => p(-1) };
199
+ attachGeneratedController(element, S, v, p, undefined, undefined, I);
90
200
  manageProps(I);
91
- I.r["frame"] = t0;
92
201
  return element;
93
202
  }
94
203
  defineComponent("ui-image", createUiImage, ["alt","height","placement","resizable","selected","src","width"]);