@trunkjs/content-pane 1.0.7 → 1.0.9

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.0.9 (2025-11-10)
2
+
3
+ This was a version bump only for content-pane to align it with other projects, there were no code changes.
4
+
5
+ ## 1.0.8 (2025-08-29)
6
+
7
+ This was a version bump only for content-pane to align it with other projects, there were no code changes.
8
+
1
9
  ## 1.0.7 (2025-08-29)
2
10
 
3
11
  This was a version bump only for content-pane to align it with other projects, there were no code changes.
package/README.md CHANGED
@@ -33,7 +33,7 @@ tag, id or classes.
33
33
 
34
34
  ```markdown
35
35
  ## Header 2
36
- {: layout="#id1.class1"}
36
+ {: layout="#id1.class1[slot=slotname]"}
37
37
 
38
38
  This is content below the section element.
39
39
  ```
@@ -47,6 +47,25 @@ Will be transformed to:
47
47
  </section>
48
48
  ```
49
49
 
50
+ ## Layers (I)
51
+
52
+ Layers are defined using `layout="2.;"` syntax.
53
+
54
+ - Create new layer with: `layout="2.;"`
55
+ - Append to element of layer: `layout="+2.;"`
56
+ - Skip this element: `layout="-;"`
57
+
58
+ Example:
59
+
60
+ ```markdown
61
+ ## Header 2
62
+ {: layout="2;#id1.class1"}
63
+
64
+ ---
65
+ {: layout="2.5;.class2"}
66
+
67
+ ```
68
+
50
69
  ### Subelements
51
70
 
52
71
  The strcutrure of the content is defined by the h2-h6 elements.
@@ -1,9 +1,9 @@
1
1
  import { ReactiveElement } from 'lit';
2
2
  declare const ContentAreaElement2_base: (abstract new (...args: any[]) => {
3
- "__#2685@#debugCached": boolean | null;
4
- "__#2685@#myElementId": number;
3
+ "__#2898@#debugCached": boolean | null;
4
+ "__#2898@#myElementId": number;
5
5
  invalidateDebugCache(): void;
6
- "__#2685@#myLoggerInstance": import('../../../../browser-utils/src/index.ts').Logger | null;
6
+ "__#2898@#myLoggerInstance": import('../../../../browser-utils/src/index.ts').Logger | null;
7
7
  readonly _debug: boolean;
8
8
  getLogger(instanceId?: string): import('../../../../browser-utils/src/index.ts').Logger;
9
9
  log(...args: any[]): void;
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
2
2
  export declare class TjErrorElement extends LitElement {
3
3
  static styles: import('lit').CSSResult[];
4
4
  private originalCode?;
5
- private message;
5
+ accessor message: string;
6
6
  static get is(): string;
7
7
  constructor(message?: string, originalCode?: string);
8
8
  render(): import('lit-html').TemplateResult<1>;
package/index.js CHANGED
@@ -1,27 +1,33 @@
1
- var C = Object.defineProperty;
2
- var _ = (n, t, r) => t in n ? C(n, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[t] = r;
3
- var h = (n, t, r) => _(n, typeof t != "symbol" ? t + "" : t, r);
4
- import { create_element as y, LoggingMixin as E, Stopwatch as A, waitForDomContentLoaded as N } from "@trunkjs/browser-utils";
5
- import { unsafeCSS as I, LitElement as L, html as k, ReactiveElement as T } from "lit";
6
- import { property as P, customElement as b } from "lit/decorators.js";
7
- const S = ":host{--border-color: red;--background-color: lightgray;font-family:Arial,sans-serif}#error-fixed-indicator{position:fixed;top:10px;right:10px;cursor:pointer;z-index:100000;padding:5px 10px;width:auto;max-width:90vw;min-width:100px;height:auto;box-shadow:0 4px 8px #0003;border:5px solid white;color:#fff;background-color:red;animation:blink 1s infinite;border-radius:15px;font-size:20px;font-weight:700;font-family:Arial,sans-serif}@keyframes blink{0%,to{background-color:#000}50%{background-color:red}}#error{background-color:var(--background-color);border:3px solid var(--border-color);padding:10px;margin:10px;border-radius:5px}h1{color:red;font-size:24px;margin:0}.error-details{font-size:14px;max-height:200px;overflow:auto}";
8
- var w = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, M = (n, t, r) => t in n ? w(n, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[t] = r, v = (n, t, r, o) => {
9
- for (var e = o > 1 ? void 0 : o ? $(t, r) : t, s = n.length - 1, i; s >= 0; s--)
10
- (i = n[s]) && (e = (o ? i(t, r, e) : i(e)) || e);
11
- return o && e && w(t, r, e), e;
12
- }, O = (n, t, r) => M(n, t + "", r);
13
- let f = class extends L {
14
- constructor(t = "An error occurred", r) {
15
- super();
16
- h(this, "originalCode");
17
- h(this, "message");
18
- this.message = t, this.originalCode = r;
1
+ import { create_element as F, LoggingMixin as U, Stopwatch as X, waitForDomContentLoaded as Y } from "@trunkjs/browser-utils";
2
+ import { html as Z, unsafeCSS as ee, LitElement as te, ReactiveElement as re } from "lit";
3
+ import { customElement as R, property as ne } from "lit/decorators.js";
4
+ const oe = ":host{--border-color: red;--background-color: lightgray;font-family:Arial,sans-serif}#error-fixed-indicator{position:fixed;top:10px;right:10px;cursor:pointer;z-index:100000;padding:5px 10px;width:auto;max-width:90vw;min-width:100px;height:auto;box-shadow:0 4px 8px #0003;border:5px solid white;color:#fff;background-color:red;animation:blink 1s infinite;border-radius:15px;font-size:20px;font-weight:700;font-family:Arial,sans-serif}@keyframes blink{0%,to{background-color:#000}50%{background-color:red}}#error{background-color:var(--background-color);border:3px solid var(--border-color);padding:10px;margin:10px;border-radius:5px}h1{color:red;font-size:24px;margin:0}.error-details{font-size:14px;max-height:200px;overflow:auto}";
5
+ var ie = Object.create, I = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, W = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), y = (e) => {
6
+ throw TypeError(e);
7
+ }, se = (e, t, n) => t in e ? I(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, z = (e, t) => I(e, "name", { value: t, configurable: !0 }), ce = (e) => [, , , ie((e == null ? void 0 : e[W("metadata")]) ?? null)], j = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], w = (e) => e !== void 0 && typeof e != "function" ? y("Function expected") : e, le = (e, t, n, o, r) => ({ kind: j[e], name: t, metadata: o, addInitializer: (i) => n._ ? y("Already initialized") : r.push(w(i || null)) }), de = (e, t) => se(t, W("metadata"), e[3]), E = (e, t, n, o) => {
8
+ for (var r = 0, i = e[t >> 1], s = i && i.length; r < s; r++) t & 1 ? i[r].call(n) : o = i[r].call(n, o);
9
+ return o;
10
+ }, D = (e, t, n, o, r, i) => {
11
+ var s, c, h, l, d, a = t & 7, f = !!(t & 8), u = !!(t & 16), v = a > 3 ? e.length + 1 : a ? f ? 1 : 2 : 0, L = j[a + 5], P = a > 3 && (e[v - 1] = []), Q = e[v] || (e[v] = []), _ = a && (!u && !f && (r = r.prototype), a < 5 && (a > 3 || !u) && ae(a < 4 ? r : { get [n]() {
12
+ return M(this, i);
13
+ }, set [n](p) {
14
+ return O(this, i, p);
15
+ } }, n));
16
+ a ? u && a < 4 && z(i, (a > 2 ? "set " : a > 1 ? "get " : "") + n) : z(r, n);
17
+ for (var x = o.length - 1; x >= 0; x--)
18
+ l = le(a, n, h = {}, e[3], Q), a && (l.static = f, l.private = u, d = l.access = { has: u ? (p) => ue(r, p) : (p) => n in p }, a ^ 3 && (d.get = u ? (p) => (a ^ 1 ? M : pe)(p, r, a ^ 4 ? i : _.get) : (p) => p[n]), a > 2 && (d.set = u ? (p, C) => O(p, r, C, a ^ 4 ? i : _.set) : (p, C) => p[n] = C)), c = (0, o[x])(a ? a < 4 ? u ? i : _[L] : a > 4 ? void 0 : { get: _.get, set: _.set } : r, l), h._ = 1, a ^ 4 || c === void 0 ? w(c) && (a > 4 ? P.unshift(c) : a ? u ? i = c : _[L] = c : r = c) : typeof c != "object" || c === null ? y("Object expected") : (w(s = c.get) && (_.get = s), w(s = c.set) && (_.set = s), w(s = c.init) && P.unshift(s));
19
+ return a || de(e, r), _ && I(r, n, _), u ? a ^ 4 ? i : _ : r;
20
+ }, S = (e, t, n) => t.has(e) || y("Cannot " + n), ue = (e, t) => Object(t) !== t ? y('Cannot use the "in" operator on this value') : e.has(t), M = (e, t, n) => (S(e, t, "read from private field"), n ? n.call(e) : t.get(e)), he = (e, t, n) => t.has(e) ? y("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), O = (e, t, n, o) => (S(e, t, "write to private field"), o ? o.call(e, n) : t.set(e, n), n), pe = (e, t, n) => (S(e, t, "access private method"), n), B, b, H, g, $;
21
+ H = [R("tj-error-element")];
22
+ class m extends (b = te, B = [ne({ type: String, reflect: !0 })], b) {
23
+ constructor(t = "An error occurred", n) {
24
+ super(), this.originalCode = void 0, he(this, $, E(g, 8, this)), E(g, 11, this), this.message = t, this.originalCode = n;
19
25
  }
20
26
  static get is() {
21
27
  return "tj-error-element";
22
28
  }
23
29
  render() {
24
- return k`
30
+ return Z`
25
31
  <div id="error-fixed-indicator" @click=${() => this.scrollIntoView({ behavior: "smooth" })}>
26
32
  Err: ${this.message}
27
33
  </div>
@@ -36,127 +42,121 @@ let f = class extends L {
36
42
  </div>
37
43
  `;
38
44
  }
39
- };
40
- O(f, "styles", [I(S)]);
41
- v([
42
- P({ type: String, reflect: !0 })
43
- ], f.prototype, "message", 2);
44
- f = v([
45
- b("tj-error-element")
46
- ], f);
47
- function R(n, { allowAttributes: t = !0, ignoreGaps: r = !0 } = {}) {
48
- let o = "div", e = null, s = [], i = [], l = {};
49
- const d = /(^[a-z][\w-]*)|#[\w-]+|\.[\w:-]+|\[\s*([\w-]+)(?:\s*=\s*(['"]?)(.*?)\3)?\s*\]/gi;
50
- let a = 0;
45
+ }
46
+ g = ce(b);
47
+ $ = /* @__PURE__ */ new WeakMap();
48
+ D(g, 4, "message", B, m, $);
49
+ m = D(g, 0, "TjErrorElement", H, m);
50
+ m.styles = [ee(oe)];
51
+ E(g, 1, m);
52
+ function fe(e, { allowAttributes: t = !0, ignoreGaps: n = !0 } = {}) {
53
+ let o = "div", r = null, i = [], s = [], c = {};
54
+ const h = /(^[a-z][\w-]*)|#[\w-]+|\.[\w:-]+|\[\s*([\w-]+)(?:\s*=\s*(['"]?)(.*?)\3)?\s*\]/gi;
55
+ let l = 0;
51
56
  for (; ; ) {
52
- const u = d.exec(n);
53
- if (!u || u.index !== a) {
54
- if (!r && u && u.index > a)
57
+ const d = h.exec(e);
58
+ if (!d || d.index !== l) {
59
+ if (!n && d && d.index > l)
55
60
  break;
56
61
  break;
57
62
  }
58
- const c = u[0];
59
- if (c[0] === "#") e = c.slice(1);
60
- else if (c[0] === ".") s.push(c.slice(1));
61
- else if (c[0] === "[") {
62
- if (!t) throw new Error(`Attributes not allowed: '${c}'`);
63
- const p = u[2], m = u[4] || void 0;
64
- i.push({ name: p, value: m }), l[p] = m;
65
- } else o = c;
66
- a += c.length;
67
- }
68
- return { tag: o, id: e, classes: s, attrs: i, attrsMap: l, length: a, rest: n.slice(a) };
63
+ const a = d[0];
64
+ if (a[0] === "#") r = a.slice(1);
65
+ else if (a[0] === ".") i.push(a.slice(1));
66
+ else if (a[0] === "[") {
67
+ if (!t) throw new Error(`Attributes not allowed: '${a}'`);
68
+ const f = d[2], u = d[4] || void 0;
69
+ s.push({ name: f, value: u }), c[f] = u;
70
+ } else o = a;
71
+ l += a.length;
72
+ }
73
+ return { tag: o, id: r, classes: i, attrs: s, attrsMap: c, length: l, rest: e.slice(l) };
69
74
  }
70
- function j(n) {
71
- return typeof n.beforeLayoutCallback == "function";
75
+ function _e(e) {
76
+ return typeof e.beforeLayoutCallback == "function";
72
77
  }
73
- function D(n, t, r) {
74
- var u, c;
75
- console.log("Applying layout to element:", n, "with layout:", r);
76
- const o = /^(\+|-|)([0-9]+\.?[0-9]*);?/, e = r.replace(o, ""), s = R(e), i = { class: "" };
77
- s.attrsMap.class && (i.class = s.attrsMap.class + " "), i.class += s.classes.join(" "), i.id = s.id, ((u = i.class) == null ? void 0 : u.trim()) === "" && delete i.class, ((c = i.id) == null ? void 0 : c.trim()) === "" && delete i.id;
78
- const l = s.tag || "div";
79
- let d = !1, a = y(l, { ...i, layoutOrig: r });
80
- if (l.includes("-") && !customElements.get(l))
81
- console.warn(`Custom element <${l}> is not registered.`), a = new f(`Custom element <${l}> is not registered.`, n.outerHTML), n.replaceWith(a), a.append(n), d = !0;
78
+ function ve(e, t, n) {
79
+ var d, a;
80
+ console.log("Applying layout to element:", e, "with layout:", n);
81
+ const o = /^(\+|-|)([0-9]+\.?[0-9]*);?/, r = n.replace(o, ""), i = fe(r), s = i.attrsMap;
82
+ s.class = "", i.attrsMap.class && (s.class = i.attrsMap.class + " "), s.class += i.classes.join(" "), s.id = i.id ?? void 0, ((d = s.class) == null ? void 0 : d.trim()) === "" && delete s.class, ((a = s.id) == null ? void 0 : a.trim()) === "" && delete s.id;
83
+ const c = i.tag || "div";
84
+ let h = !1, l = F(c, { ...s, layoutOrig: n });
85
+ if (c.includes("-") && !customElements.get(c))
86
+ console.warn(`Custom element <${c}> is not registered.`), l = new m(`Custom element <${c}> is not registered.`, e.outerHTML), e.replaceWith(l), l.append(e), h = !0;
82
87
  else {
83
- const p = Array.from(n.children);
84
- j(a) && (d = a.beforeLayoutCallback(n, a, p) === !1), console.log(
88
+ const f = Array.from(e.children);
89
+ _e(l) && (h = l.beforeLayoutCallback(e, l, f) === !1), console.log(
85
90
  "Replacement element created:",
86
- a,
91
+ l,
87
92
  "with children:",
88
- p,
93
+ f,
89
94
  "skipChildren:",
90
- d
91
- ), a.__ORIG_ELEMENT__ = n, a.append(...Array.from(n.children)), n.replaceWith(a);
95
+ h
96
+ ), l.__ORIG_ELEMENT__ = e, l.append(...Array.from(e.children)), e.replaceWith(l);
92
97
  }
93
98
  return {
94
- replacementElement: a,
95
- skipChildren: d
99
+ replacementElement: l,
100
+ skipChildren: h
96
101
  };
97
102
  }
98
- function g(n, t = {}) {
99
- console.log("applyLayout called with element:", n, "and options:", t);
100
- const { recursive: r = !0 } = t;
103
+ function k(e, t = {}) {
104
+ console.log("applyLayout called with element:", e, "and options:", t);
105
+ const { recursive: n = !0 } = t;
101
106
  let o = [];
102
- if (Array.isArray(n))
103
- return n.forEach((l) => o.push(...g(l, t))), o;
104
- if (!(n instanceof HTMLElement))
107
+ if (Array.isArray(e))
108
+ return e.forEach((c) => o.push(...k(c, t))), o;
109
+ if (!(e instanceof HTMLElement))
105
110
  return [];
106
- const e = n.getAttribute("layout");
107
- let s = !1, i = n;
108
- if (e && ({ replacementElement: i, skipChildren: s } = D(n, t, e)), r && !s) {
109
- const l = Array.from(i.children);
110
- console.log("Applying layout to children:", l, "of element:", i), l.forEach((d) => o.push(...g(d, t)));
111
+ const r = e.getAttribute("layout");
112
+ let i = !1, s = e;
113
+ if (r && ({ replacementElement: s, skipChildren: i } = ve(e, t, r)), n && !i) {
114
+ const c = Array.from(s.children);
115
+ console.log("Applying layout to children:", c, "of element:", s), c.forEach((h) => o.push(...k(h, t)));
111
116
  }
112
117
  return o;
113
118
  }
114
- function V(n) {
115
- return n && typeof n == "object" && "__I__" in n && typeof n.__I__ == "object" && "i" in n.__I__;
119
+ function Te(e) {
120
+ return e && typeof e == "object" && "__I__" in e && typeof e.__I__ == "object" && "i" in e.__I__;
116
121
  }
117
- class F {
118
- constructor(t, r = !1) {
119
- h(this, "rootNode");
120
- h(this, "currentContainerNode", null);
121
- h(this, "containerPath", []);
122
- h(this, "containerIndex", [0]);
123
- h(this, "lastFixedI", 20);
124
- this.debug = r, this.currentContainerNode = this.rootNode = t, this.containerPath.push(this.rootNode);
122
+ class ge {
123
+ constructor(t, n = !1) {
124
+ this.debug = n, this.currentContainerNode = null, this.containerPath = [], this.containerIndex = [0], this.lastFixedI = 20, this.currentContainerNode = this.rootNode = t, this.containerPath.push(this.rootNode);
125
125
  }
126
126
  getI(t) {
127
- const r = t.tagName, o = t.getAttribute("layout"), e = { i: -99, variant: "new", tag: "hr", hi: null };
127
+ const n = t.tagName, o = t.getAttribute("layout"), r = { i: -99, variant: "new", tag: "hr", hi: null };
128
128
  if (o) {
129
- const s = /^(\+|-|)([0-9]\.?[0-9]?|)(;|$)/, i = o.match(s);
130
- i && (console.debug("Layout matches", i), e.variant = i[1] === "+" ? "append" : i[1] === "-" ? "skip" : "new", i[2] !== "" && (e.i = parseFloat(i[2]) * 10));
129
+ const i = /^(\+|-|)([0-9]\.?[0-9]?|)(;|$)/, s = o.match(i);
130
+ s && (console.debug("Layout matches", s), r.variant = s[1] === "+" ? "append" : s[1] === "-" ? "skip" : "new", s[2] !== "" && (r.i = parseFloat(s[2]) * 10));
131
131
  }
132
- if (r.startsWith("H") && r.length === 2) {
133
- let s = r.substring(1);
134
- return e.tag = "h", e.hi = parseInt(s), s === "1" && (s = "2"), e.i === -99 && (e.i = parseInt(s) * 10, this.lastFixedI = e.i), e;
132
+ if (n.startsWith("H") && n.length === 2) {
133
+ let i = n.substring(1);
134
+ return r.tag = "h", r.hi = parseInt(i), i === "1" && (i = "2"), r.i === -99 && (r.i = parseInt(i) * 10, this.lastFixedI = r.i), r;
135
135
  }
136
- return e.i === -99 && r === "HR" ? (e.i = this.lastFixedI + 5, e) : null;
136
+ return r.i === -99 && n === "HR" ? (r.i = this.lastFixedI + 5, r) : null;
137
137
  }
138
- getAttributeRecords(t, r = !1) {
138
+ getAttributeRecords(t, n = !1) {
139
139
  const o = {};
140
- for (const e of t.attributes)
141
- e.name.startsWith("section-") ? o[e.name] = e.value.replace(/^section-/, "") : e.name.startsWith("layout") ? (o[e.name] = e.value, t.removeAttribute(e.name)) : r && (o[e.name] = e.value);
142
- if (!r)
143
- for (const e of Array.from(t.classList))
144
- e.startsWith("section-") && (o.class = (o.class || "") + " " + e.replace(/^section-/, ""), t.classList.remove(e));
140
+ for (const r of t.attributes)
141
+ r.name.startsWith("section-") ? o[r.name] = r.value.replace(/^section-/, "") : r.name.startsWith("layout") ? (o[r.name] = r.value, t.removeAttribute(r.name)) : n && (o[r.name] = r.value);
142
+ if (!n)
143
+ for (const r of Array.from(t.classList))
144
+ r.startsWith("section-") && (o.class = (o.class || "") + " " + r.replace(/^section-/, ""), t.classList.remove(r));
145
145
  return o;
146
146
  }
147
- createNewContainerNode(t, r) {
148
- const o = this.getAttributeRecords(t, t.tagName === "HR"), e = y("section", o);
149
- return e.__IT = r, e;
147
+ createNewContainerNode(t, n) {
148
+ const o = this.getAttributeRecords(t, t.tagName === "HR"), r = F("section", o);
149
+ return r.__IT = n, r;
150
150
  }
151
- arrangeSingleNode(t, r) {
152
- r.i;
151
+ arrangeSingleNode(t, n) {
152
+ n.i;
153
153
  let o = 0;
154
- for (o = 0; o < this.containerIndex.length && !(this.containerIndex[o] >= r.i); o++)
154
+ for (o = 0; o < this.containerIndex.length && !(this.containerIndex[o] >= n.i); o++)
155
155
  ;
156
- let e = null;
157
- r.variant === "append" ? (console.log("Appending to container at index", o, "with i", r.i), e = this.containerPath[o]) : e = this.createNewContainerNode(t, r);
158
- const s = this.containerPath[o - 1];
159
- this.containerPath.length = o, this.containerIndex.length = o, e.appendChild(t), s.appendChild(e), this.containerPath.push(e), this.containerIndex.push(r.i), this.currentContainerNode = e;
156
+ let r = null;
157
+ n.variant === "append" ? (console.log("Appending to container at index", o, "with i", n.i), r = this.containerPath[o]) : r = this.createNewContainerNode(t, n);
158
+ const i = this.containerPath[o - 1];
159
+ this.containerPath.length = o, this.containerIndex.length = o, r.appendChild(t), i.appendChild(r), this.containerPath.push(r), this.containerIndex.push(n.i), this.currentContainerNode = r;
160
160
  }
161
161
  appendToCurrentContainer(t) {
162
162
  if (this.currentContainerNode === null)
@@ -164,26 +164,34 @@ class F {
164
164
  this.currentContainerNode.appendChild(t);
165
165
  }
166
166
  arrange(t) {
167
- for (let r of t) {
168
- if (r.nodeType !== Node.ELEMENT_NODE) {
169
- this.appendToCurrentContainer(r);
167
+ for (let n of t) {
168
+ if (n.nodeType !== Node.ELEMENT_NODE) {
169
+ this.appendToCurrentContainer(n);
170
170
  continue;
171
171
  }
172
- const o = r, e = this.getI(o);
173
- if (!e || e.variant === "skip") {
174
- this.appendToCurrentContainer(r);
172
+ const o = n, r = this.getI(o);
173
+ if (!r || r.variant === "skip") {
174
+ this.appendToCurrentContainer(n);
175
175
  continue;
176
176
  }
177
- this.arrangeSingleNode(o, e);
177
+ this.arrangeSingleNode(o, r);
178
178
  }
179
179
  }
180
180
  }
181
- var W = Object.getOwnPropertyDescriptor, z = (n, t, r, o) => {
182
- for (var e = o > 1 ? void 0 : o ? W(t, r) : t, s = n.length - 1, i; s >= 0; s--)
183
- (i = n[s]) && (e = i(e) || e);
184
- return e;
185
- };
186
- let x = class extends E(T) {
181
+ var me = Object.create, N = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, q = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), G = (e) => {
182
+ throw TypeError(e);
183
+ }, we = (e, t, n) => t in e ? N(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, xe = (e, t) => N(e, "name", { value: t, configurable: !0 }), Ce = (e) => [, , , me((e == null ? void 0 : e[q("metadata")]) ?? null)], Ee = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], V = (e) => e !== void 0 && typeof e != "function" ? G("Function expected") : e, be = (e, t, n, o, r) => ({ kind: Ee[e], name: t, metadata: o, addInitializer: (i) => n._ ? G("Already initialized") : r.push(V(i || null)) }), ke = (e, t) => we(t, q("metadata"), e[3]), Ae = (e, t, n, o) => {
184
+ for (var r = 0, i = e[t >> 1], s = i && i.length; r < s; r++) i[r].call(n);
185
+ return o;
186
+ }, Ie = (e, t, n, o, r, i) => {
187
+ var s, c, h, l = t & 7, d = !1, a = 0, f = e[a] || (e[a] = []), u = l && (r = r.prototype, l < 5 && (l > 3 || !d) && ye(r, n));
188
+ xe(r, n);
189
+ for (var v = o.length - 1; v >= 0; v--)
190
+ h = be(l, n, c = {}, e[3], f), s = (0, o[v])(r, h), c._ = 1, V(s) && (r = s);
191
+ return ke(e, r), u && N(r, n, u), d ? l ^ 4 ? i : u : r;
192
+ }, J, T, K;
193
+ J = [R("tj-content-pane")];
194
+ class A extends (K = U(re)) {
187
195
  static get is() {
188
196
  return "tj-content-pane";
189
197
  }
@@ -194,35 +202,35 @@ let x = class extends E(T) {
194
202
  super();
195
203
  }
196
204
  arrange() {
197
- const n = new A("SectionTreeBuilder");
205
+ const t = new X("SectionTreeBuilder");
198
206
  this.log("arrange() called");
199
- const t = new F(this), r = Array.from(this.children);
200
- t.arrange(r), g(Array.from(this.children), { recursive: !0 }), n.lap("after arrange");
207
+ const n = new ge(this), o = Array.from(this.children);
208
+ n.arrange(o), k(Array.from(this.children), { recursive: !0 }), t.lap("after arrange");
201
209
  }
202
210
  async connectedCallback() {
203
- await N(), super.connectedCallback(), this.arrange();
211
+ await Y(), super.connectedCallback(), this.arrange();
204
212
  }
205
- };
206
- x = z([
207
- b("tj-content-pane")
208
- ], x);
209
- function J(n, t, r) {
210
- const o = [], e = t.split("|");
211
- for (const s of e) {
212
- const i = n.querySelectorAll(s.trim());
213
- if (i.length > 0)
214
- for (const l of i) {
215
- o.push(l);
216
- for (const [d, a] of Object.entries(r))
217
- l.setAttribute(d, a);
213
+ }
214
+ T = Ce(K);
215
+ A = Ie(T, 0, "ContentAreaElement2", J, A);
216
+ Ae(T, 1, A);
217
+ function Le(e, t, n) {
218
+ const o = [], r = t.split("|");
219
+ for (const i of r) {
220
+ const s = e.querySelectorAll(i.trim());
221
+ if (s.length > 0)
222
+ for (const c of s) {
223
+ o.push(c);
224
+ for (const [h, l] of Object.entries(n))
225
+ c.setAttribute(h, l);
218
226
  }
219
227
  }
220
228
  return o;
221
229
  }
222
230
  export {
223
- x as ContentAreaElement2,
224
- F as SectionTreeBuilder,
225
- g as applyLayout,
226
- J as attrAssign,
227
- V as isSectionTreeElement
231
+ A as ContentAreaElement2,
232
+ ge as SectionTreeBuilder,
233
+ k as applyLayout,
234
+ Le as attrAssign,
235
+ Te as isSectionTreeElement
228
236
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trunkjs/content-pane",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "main": "./index.js",
5
5
  "dependencies": {
6
6
  "@trunkjs/browser-utils": "^1.0.14",