@trunkjs/content-pane 1.0.9 → 1.0.11

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.11 (2025-12-11)
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.10 (2025-11-11)
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.9 (2025-11-10)
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_2.md ADDED
@@ -0,0 +1,134 @@
1
+ # TrunkJS Content-Pane
2
+
3
+ Das `<tj-content-pane>` Element übernimmt zwei Aufgaben:
4
+
5
+ - Scritt 1: Es baut aus einer flachen HTML Struktur (H1-6, p, hr etc) eine Baumstruktur auf.
6
+ - Scritt 2: Es ändert die tag-Names und Attribute der Elemente basierend auf den `layout` Attributen.
7
+
8
+
9
+ ## Schritt 1: Baumstruktur aufbauen
10
+
11
+ Basierend auf dem `I`-Index baut die Komponente z.B. aus einer serverseitig
12
+ generierten flachen HTML Struktur eine Baumstruktur auf
13
+
14
+ | Element | I-Index |
15
+ |------------------------|-----------------|
16
+ | H1,H2 | 2 |
17
+ | H3 | 3 |
18
+ | H4 | 4 |
19
+ | H5 | 5 |
20
+ | H6 | 6 |
21
+ | hr mit layout-attribut | letzter I + 0.5 |
22
+
23
+ Dabei werden Element wie folgt verschachtelt:
24
+
25
+ ```text
26
+ i1
27
+ i2
28
+ i2.5
29
+ i3
30
+ i3
31
+ i2
32
+ i3
33
+ i4
34
+ i3
35
+ ```
36
+
37
+ ### Übertragen von Attributen
38
+
39
+ Attribute wie 'layout' und mit 'section-' geprefixte Attribute werden auf das `<section>` Element übertragen.
40
+
41
+ Beispiel:
42
+
43
+ ```markdown
44
+ ## Header 2
45
+ {: layout="#id1.class1" section-class="abc"}
46
+ ````
47
+
48
+ Wird zu:
49
+
50
+ ```html
51
+ <section layout="#id1.class1" class="abc">
52
+ <h2>Header 2</h2>
53
+ </section>
54
+ ```
55
+
56
+ ***Achtung: In diesem Schritt werden die Tags noch nicht verändert!*** Dies erfolgt erst im Layout-Schritt.
57
+
58
+ ### Benutzerdefiniert I-Layer
59
+
60
+ Über das `layout` Attribut kann ein benutzerdefinierter I-Layer definiert werden.
61
+
62
+ Beispiel:
63
+
64
+ ```markdown
65
+ ## Header 2
66
+ {: layout="3;"}
67
+ ```
68
+ Dies würde das Element in den I-Layer 3 verschieben.
69
+
70
+ ### Das HR-Element
71
+
72
+ Standardmäßig wird ein `<hr>` nicht behandelt, außer es hat ein layout-Attribut.
73
+
74
+ Wenn kein dedizierter I-Layer angegeben ist, wird der I-Layer des vorherigen Elements + 0.5 verwendet.
75
+
76
+
77
+ ## Schritt 2: Apply-Layouts
78
+
79
+ In diesem Schritt werden die layout-Attribute (ohne I-Layer) ausgewertet und die Elemente entsprechend umgewandelt.
80
+
81
+ Beispiel:
82
+
83
+ ````markdown
84
+ ## Header 2
85
+ {: layout="custom-element#id1.class1[slot=slotname]"}
86
+ ````
87
+
88
+ entpsricht:
89
+
90
+ ```html
91
+ <section layout="custom-element#id1.class1[slot=slotname]">
92
+ <h2>Header 2</h2>
93
+ </section>
94
+ ```
95
+ Wird zu: (*transformiert durch applyLayout()*)
96
+
97
+ ```html
98
+ <custom-element class="class1" id="id1" slot="slotname">
99
+ <h2>Header 2</h2>
100
+ </custom-element>
101
+ ```
102
+
103
+ ### Verschachtelte Layouts
104
+
105
+ z.B. sollen Layout-Elemente die darunterliegenden Elemente verändern:
106
+
107
+ - Automatisches zuweisen von `slot`-Attributen
108
+ - Automatisches zuweisen von layout-Attributen
109
+
110
+
111
+ #### Nutzung des `SubLayoutApplyMixin()`
112
+
113
+
114
+ Das `SubLayoutApplyMixin()` kann genutzt werden, um verschachtelte Layouts zu realisieren.
115
+ Es analysiert nach dem update() die slot-Elemente im Shadow-DOM. Selektiert werden Slot-elemente mit `data-query` Attribut.
116
+
117
+ Beispiel:
118
+
119
+ ```javascript
120
+ class CustomElement extends SubLayoutApplyMixin(LitElement) {
121
+ ...
122
+ render() {
123
+ return html`
124
+ <slot data-query=":scope > h2,h3,h4" name="header"></slot>
125
+ <slot data-query=":scope > section" data-set-attribute-layout="nte-card"></slot>
126
+ `;
127
+ }
128
+ }
129
+ ```
130
+
131
+ ##### data-query
132
+
133
+ Data Query kann ein oder Mehrere durch `|` getrennte CSS-Selektoren enthalten. Das erste Element,
134
+ das gefunden wird, wird verwendet.
@@ -1,9 +1,9 @@
1
1
  import { ReactiveElement } from 'lit';
2
2
  declare const ContentAreaElement2_base: (abstract new (...args: any[]) => {
3
- "__#2898@#debugCached": boolean | null;
4
- "__#2898@#myElementId": number;
3
+ "__#3383@#debugCached": boolean | null;
4
+ "__#3383@#myElementId": number;
5
5
  invalidateDebugCache(): void;
6
- "__#2898@#myLoggerInstance": import('../../../../browser-utils/src/index.ts').Logger | null;
6
+ "__#3383@#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;
@@ -13,6 +13,7 @@ declare const ContentAreaElement2_base: (abstract new (...args: any[]) => {
13
13
  }) & typeof ReactiveElement;
14
14
  export declare class ContentAreaElement2 extends ContentAreaElement2_base {
15
15
  static get is(): string;
16
+ accessor skipLayout: boolean;
16
17
  createRenderRoot(): HTMLElement | DocumentFragment;
17
18
  constructor();
18
19
  arrange(): void;
package/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './components/tj-content-pane/TjContentPane';
2
2
  export * from './lib/apply-layout';
3
3
  export * from './lib/attrAssign';
4
4
  export * from './lib/SectionTreeBuilder';
5
+ export * from './mixins/SubLayoutApplyMixin';
package/index.js CHANGED
@@ -1,33 +1,33 @@
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) => {
1
+ import { create_element as V, LoggingMixin as ae, Stopwatch as se, waitForDomContentLoaded as ce } from "@trunkjs/browser-utils";
2
+ import { html as le, unsafeCSS as de, LitElement as ue, ReactiveElement as he } from "lit";
3
+ import { customElement as J, property as K } from "lit/decorators.js";
4
+ const pe = ":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 fe = Object.create, P = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, U = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), A = (e) => {
6
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);
7
+ }, ve = (e, t, r) => t in e ? P(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, D = (e, t) => P(e, "name", { value: t, configurable: !0 }), ge = (e) => [, , , fe((e == null ? void 0 : e[U("metadata")]) ?? null)], X = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], k = (e) => e !== void 0 && typeof e != "function" ? A("Function expected") : e, ye = (e, t, r, o, i) => ({ kind: X[e], name: t, metadata: o, addInitializer: (a) => r._ ? A("Already initialized") : i.push(k(a || null)) }), me = (e, t) => ve(t, U("metadata"), e[3]), L = (e, t, r, o) => {
8
+ for (var i = 0, a = e[t >> 1], s = a && a.length; i < s; i++) t & 1 ? a[i].call(r) : o = a[i].call(r, o);
9
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;
10
+ }, Y = (e, t, r, o, i, a) => {
11
+ var s, c, h, l, f, n = t & 7, _ = !!(t & 8), u = !!(t & 16), v = n > 3 ? e.length + 1 : n ? _ ? 1 : 2 : 0, x = X[n + 5], E = n > 3 && (e[v - 1] = []), N = e[v] || (e[v] = []), p = n && (!u && !_ && (i = i.prototype), n < 5 && (n > 3 || !u) && _e(n < 4 ? i : { get [r]() {
12
+ return B(this, a);
13
+ }, set [r](d) {
14
+ return H(this, a, d);
15
+ } }, r));
16
+ n ? u && n < 4 && D(a, (n > 2 ? "set " : n > 1 ? "get " : "") + r) : D(i, r);
17
+ for (var g = o.length - 1; g >= 0; g--)
18
+ l = ye(n, r, h = {}, e[3], N), n && (l.static = _, l.private = u, f = l.access = { has: u ? (d) => we(i, d) : (d) => r in d }, n ^ 3 && (f.get = u ? (d) => (n ^ 1 ? B : Ae)(d, i, n ^ 4 ? a : p.get) : (d) => d[r]), n > 2 && (f.set = u ? (d, y) => H(d, i, y, n ^ 4 ? a : p.set) : (d, y) => d[r] = y)), c = (0, o[g])(n ? n < 4 ? u ? a : p[x] : n > 4 ? void 0 : { get: p.get, set: p.set } : i, l), h._ = 1, n ^ 4 || c === void 0 ? k(c) && (n > 4 ? E.unshift(c) : n ? u ? a = c : p[x] = c : i = c) : typeof c != "object" || c === null ? A("Object expected") : (k(s = c.get) && (p.get = s), k(s = c.set) && (p.set = s), k(s = c.init) && E.unshift(s));
19
+ return n || me(e, i), p && P(i, r, p), u ? n ^ 4 ? a : p : i;
20
+ }, z = (e, t, r) => t.has(e) || A("Cannot " + r), we = (e, t) => Object(t) !== t ? A('Cannot use the "in" operator on this value') : e.has(t), B = (e, t, r) => (z(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Ce = (e, t, r) => t.has(e) ? A("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), H = (e, t, r, o) => (z(e, t, "write to private field"), o ? o.call(e, r) : t.set(e, r), r), Ae = (e, t, r) => (z(e, t, "access private method"), r), Z, T, ee, m, q;
21
+ ee = [J("tj-error-element")];
22
+ class w extends (T = ue, Z = [K({ type: String, reflect: !0 })], T) {
23
+ constructor(t = "An error occurred", r) {
24
+ super(), this.originalCode = void 0, Ce(this, q, L(m, 8, this)), L(m, 11, this), this.message = t, this.originalCode = r;
25
25
  }
26
26
  static get is() {
27
27
  return "tj-error-element";
28
28
  }
29
29
  render() {
30
- return Z`
30
+ return le`
31
31
  <div id="error-fixed-indicator" @click=${() => this.scrollIntoView({ behavior: "smooth" })}>
32
32
  Err: ${this.message}
33
33
  </div>
@@ -43,120 +43,107 @@ class m extends (b = te, B = [ne({ type: String, reflect: !0 })], b) {
43
43
  `;
44
44
  }
45
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 = {};
46
+ m = ge(T);
47
+ q = /* @__PURE__ */ new WeakMap();
48
+ Y(m, 4, "message", Z, w, q);
49
+ w = Y(m, 0, "TjErrorElement", ee, w);
50
+ w.styles = [de(pe)];
51
+ L(m, 1, w);
52
+ function be(e, { allowAttributes: t = !0, ignoreGaps: r = !0 } = {}) {
53
+ let o = "div", i = null, a = [], s = [], c = {};
54
54
  const h = /(^[a-z][\w-]*)|#[\w-]+|\.[\w:-]+|\[\s*([\w-]+)(?:\s*=\s*(['"]?)(.*?)\3)?\s*\]/gi;
55
55
  let l = 0;
56
56
  for (; ; ) {
57
- const d = h.exec(e);
58
- if (!d || d.index !== l) {
59
- if (!n && d && d.index > l)
57
+ const f = h.exec(e);
58
+ if (!f || f.index !== l) {
59
+ if (!r && f && f.index > l)
60
60
  break;
61
61
  break;
62
62
  }
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) };
63
+ const n = f[0];
64
+ if (n[0] === "#") i = n.slice(1);
65
+ else if (n[0] === ".") a.push(n.slice(1));
66
+ else if (n[0] === "[") {
67
+ if (!t) throw new Error(`Attributes not allowed: '${n}'`);
68
+ const _ = f[2], u = f[4] || void 0;
69
+ s.push({ name: _, value: u }), c[_] = u;
70
+ } else o = n;
71
+ l += n.length;
72
+ }
73
+ return { tag: o, id: i, classes: a, attrs: s, attrsMap: c, length: l, rest: e.slice(l) };
74
74
  }
75
- function _e(e) {
75
+ function xe(e) {
76
76
  return typeof e.beforeLayoutCallback == "function";
77
77
  }
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 });
78
+ function Ee(e, t, r) {
79
+ var f, n;
80
+ const o = /^(\+|-|)([0-9]+\.?[0-9]*);?/, i = r.replace(o, ""), a = be(i), s = a.attrsMap;
81
+ s.class = "", a.attrsMap.class && (s.class = a.attrsMap.class + " "), s.class += a.classes.join(" "), s.id = a.id ?? void 0, ((f = s.class) == null ? void 0 : f.trim()) === "" && delete s.class, ((n = s.id) == null ? void 0 : n.trim()) === "" && delete s.id;
82
+ const c = a.tag || "div";
83
+ let h = !1, l = V(c, { ...s, layoutOrig: r });
85
84
  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;
85
+ console.warn(`Custom element <${c}> is not registered.`), l = new w(`Custom element <${c}> is not registered.`, e.outerHTML), e.replaceWith(l), l.append(e), h = !0;
87
86
  else {
88
- const f = Array.from(e.children);
89
- _e(l) && (h = l.beforeLayoutCallback(e, l, f) === !1), console.log(
90
- "Replacement element created:",
91
- l,
92
- "with children:",
93
- f,
94
- "skipChildren:",
95
- h
96
- ), l.__ORIG_ELEMENT__ = e, l.append(...Array.from(e.children)), e.replaceWith(l);
87
+ const _ = Array.from(e.children);
88
+ xe(l) && (h = l.beforeLayoutCallback(e, l, _) === !1), l.__ORIG_ELEMENT__ = e, l.append(...Array.from(e.children)), e.replaceWith(l);
97
89
  }
98
90
  return {
99
91
  replacementElement: l,
100
92
  skipChildren: h
101
93
  };
102
94
  }
103
- function k(e, t = {}) {
104
- console.log("applyLayout called with element:", e, "and options:", t);
105
- const { recursive: n = !0 } = t;
95
+ function $(e, t = {}) {
96
+ const { recursive: r = !0 } = t;
106
97
  let o = [];
107
98
  if (Array.isArray(e))
108
- return e.forEach((c) => o.push(...k(c, t))), o;
99
+ return e.forEach((c) => o.push(...$(c, t))), o;
109
100
  if (!(e instanceof HTMLElement))
110
101
  return [];
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)));
116
- }
117
- return o;
102
+ const i = e.getAttribute("layout");
103
+ let a = !1, s = e;
104
+ return i && ({ replacementElement: s, skipChildren: a } = Ee(e, t, i)), r && !a && Array.from(s.children).forEach((h) => o.push(...$(h, t))), o;
118
105
  }
119
- function Te(e) {
106
+ function Re(e) {
120
107
  return e && typeof e == "object" && "__I__" in e && typeof e.__I__ == "object" && "i" in e.__I__;
121
108
  }
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);
109
+ class ke {
110
+ constructor(t, r = !1) {
111
+ this.debug = r, this.currentContainerNode = null, this.containerPath = [], this.containerIndex = [0], this.lastFixedI = 20, this.currentContainerNode = this.rootNode = t, this.containerPath.push(this.rootNode);
125
112
  }
126
113
  getI(t) {
127
- const n = t.tagName, o = t.getAttribute("layout"), r = { i: -99, variant: "new", tag: "hr", hi: null };
114
+ const r = t.tagName, o = t.getAttribute("layout"), i = { i: -99, variant: "new", tag: "hr", hi: null };
128
115
  if (o) {
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));
116
+ const a = /^(\+|-|)([0-9]\.?[0-9]?|)(;|$)/, s = o.match(a);
117
+ s && (i.variant = s[1] === "+" ? "append" : s[1] === "-" ? "skip" : "new", s[2] !== "" && (i.i = parseFloat(s[2]) * 10));
131
118
  }
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;
119
+ if (r.startsWith("H") && r.length === 2) {
120
+ let a = r.substring(1);
121
+ return i.tag = "h", i.hi = parseInt(a), a === "1" && (a = "2"), i.i === -99 && (i.i = parseInt(a) * 10, this.lastFixedI = i.i), i;
135
122
  }
136
- return r.i === -99 && n === "HR" ? (r.i = this.lastFixedI + 5, r) : null;
123
+ return i.i === -99 && r === "HR" && o !== null ? (i.i = this.lastFixedI + 5, i) : null;
137
124
  }
138
- getAttributeRecords(t, n = !1) {
125
+ getAttributeRecords(t, r = !1) {
139
126
  const o = {};
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));
127
+ for (const i of t.attributes)
128
+ i.name.startsWith("section-") ? o[i.name.replace(/^section-/, "")] = i.value : i.name.startsWith("layout") ? (o[i.name] = i.value, t.removeAttribute(i.name)) : r && (o[i.name] = i.value);
129
+ if (!r)
130
+ for (const i of Array.from(t.classList))
131
+ i.startsWith("section-") && (o.class = (o.class || "") + " " + i.replace(/^section-/, ""), t.classList.remove(i));
145
132
  return o;
146
133
  }
147
- createNewContainerNode(t, n) {
148
- const o = this.getAttributeRecords(t, t.tagName === "HR"), r = F("section", o);
149
- return r.__IT = n, r;
134
+ createNewContainerNode(t, r) {
135
+ const o = this.getAttributeRecords(t, t.tagName === "HR"), i = V("section", o);
136
+ return i.__IT = r, i;
150
137
  }
151
- arrangeSingleNode(t, n) {
152
- n.i;
138
+ arrangeSingleNode(t, r) {
139
+ r.i;
153
140
  let o = 0;
154
- for (o = 0; o < this.containerIndex.length && !(this.containerIndex[o] >= n.i); o++)
141
+ for (o = 0; o < this.containerIndex.length && !(this.containerIndex[o] >= r.i); o++)
155
142
  ;
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;
143
+ let i = null;
144
+ r.variant === "append" ? i = this.containerPath[o] : i = this.createNewContainerNode(t, r);
145
+ const a = this.containerPath[o - 1];
146
+ this.containerPath.length = o, this.containerIndex.length = o, t.tagName === "HR" && (t.setAttribute("aria-hidden", "true"), t.setAttribute("hidden", "hidden")), i.appendChild(t), a.appendChild(i), this.containerPath.push(i), this.containerIndex.push(r.i), this.currentContainerNode = i;
160
147
  }
161
148
  appendToCurrentContainer(t) {
162
149
  if (this.currentContainerNode === null)
@@ -164,73 +151,128 @@ class ge {
164
151
  this.currentContainerNode.appendChild(t);
165
152
  }
166
153
  arrange(t) {
167
- for (let n of t) {
168
- if (n.nodeType !== Node.ELEMENT_NODE) {
169
- this.appendToCurrentContainer(n);
154
+ for (let r of t) {
155
+ if (r.nodeType !== Node.ELEMENT_NODE) {
156
+ this.appendToCurrentContainer(r);
170
157
  continue;
171
158
  }
172
- const o = n, r = this.getI(o);
173
- if (!r || r.variant === "skip") {
174
- this.appendToCurrentContainer(n);
159
+ const o = r, i = this.getI(o);
160
+ if (!i || i.variant === "skip") {
161
+ this.appendToCurrentContainer(r);
175
162
  continue;
176
163
  }
177
- this.arrangeSingleNode(o, r);
164
+ this.arrangeSingleNode(o, i);
178
165
  }
179
166
  }
180
167
  }
181
- var me = Object.create, N = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, q = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), G = (e) => {
168
+ var Se = Object.create, W = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, te = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), b = (e) => {
182
169
  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);
170
+ }, Ie = (e, t, r) => t in e ? W(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, G = (e, t) => W(e, "name", { value: t, configurable: !0 }), Ne = (e) => [, , , Se((e == null ? void 0 : e[te("metadata")]) ?? null)], re = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], S = (e) => e !== void 0 && typeof e != "function" ? b("Function expected") : e, Le = (e, t, r, o, i) => ({ kind: re[e], name: t, metadata: o, addInitializer: (a) => r._ ? b("Already initialized") : i.push(S(a || null)) }), Te = (e, t) => Ie(t, te("metadata"), e[3]), M = (e, t, r, o) => {
171
+ for (var i = 0, a = e[t >> 1], s = a && a.length; i < s; i++) t & 1 ? a[i].call(r) : o = a[i].call(r, o);
185
172
  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)) {
173
+ }, ie = (e, t, r, o, i, a) => {
174
+ var s, c, h, l, f, n = t & 7, _ = !!(t & 8), u = !!(t & 16), v = n > 3 ? e.length + 1 : n ? _ ? 1 : 2 : 0, x = re[n + 5], E = n > 3 && (e[v - 1] = []), N = e[v] || (e[v] = []), p = n && (!u && !_ && (i = i.prototype), n < 5 && (n > 3 || !u) && $e(n < 4 ? i : { get [r]() {
175
+ return j(this, a);
176
+ }, set [r](d) {
177
+ return Q(this, a, d);
178
+ } }, r));
179
+ n ? u && n < 4 && G(a, (n > 2 ? "set " : n > 1 ? "get " : "") + r) : G(i, r);
180
+ for (var g = o.length - 1; g >= 0; g--)
181
+ l = Le(n, r, h = {}, e[3], N), n && (l.static = _, l.private = u, f = l.access = { has: u ? (d) => Me(i, d) : (d) => r in d }, n ^ 3 && (f.get = u ? (d) => (n ^ 1 ? j : Pe)(d, i, n ^ 4 ? a : p.get) : (d) => d[r]), n > 2 && (f.set = u ? (d, y) => Q(d, i, y, n ^ 4 ? a : p.set) : (d, y) => d[r] = y)), c = (0, o[g])(n ? n < 4 ? u ? a : p[x] : n > 4 ? void 0 : { get: p.get, set: p.set } : i, l), h._ = 1, n ^ 4 || c === void 0 ? S(c) && (n > 4 ? E.unshift(c) : n ? u ? a = c : p[x] = c : i = c) : typeof c != "object" || c === null ? b("Object expected") : (S(s = c.get) && (p.get = s), S(s = c.set) && (p.set = s), S(s = c.init) && E.unshift(s));
182
+ return n || Te(e, i), p && W(i, r, p), u ? n ^ 4 ? a : p : i;
183
+ }, F = (e, t, r) => t.has(e) || b("Cannot " + r), Me = (e, t) => Object(t) !== t ? b('Cannot use the "in" operator on this value') : e.has(t), j = (e, t, r) => (F(e, t, "read from private field"), r ? r.call(e) : t.get(e)), Oe = (e, t, r) => t.has(e) ? b("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), Q = (e, t, r, o) => (F(e, t, "write to private field"), o ? o.call(e, r) : t.set(e, r), r), Pe = (e, t, r) => (F(e, t, "access private method"), r), ne, O, oe, C, R;
184
+ oe = [J("tj-content-pane")];
185
+ class I extends (O = ae(he), ne = [K({ type: Boolean, reflect: !0, attribute: "skip-layout" })], O) {
186
+ constructor() {
187
+ super(), Oe(this, R, M(C, 8, this, !1)), M(C, 11, this);
188
+ }
195
189
  static get is() {
196
190
  return "tj-content-pane";
197
191
  }
198
192
  createRenderRoot() {
199
193
  return this;
200
194
  }
201
- constructor() {
202
- super();
203
- }
204
195
  arrange() {
205
- const t = new X("SectionTreeBuilder");
196
+ const t = new se("SectionTreeBuilder");
206
197
  this.log("arrange() called");
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");
198
+ const r = new ke(this), o = Array.from(this.children);
199
+ if (r.arrange(o), this.skipLayout) {
200
+ this.warn("Skipping layout as per skipLayout property.");
201
+ return;
202
+ }
203
+ $(Array.from(this.children), { recursive: !0 }), t.lap("after arrange");
209
204
  }
210
205
  async connectedCallback() {
211
- await Y(), super.connectedCallback(), this.arrange();
206
+ await ce(), super.connectedCallback(), this.arrange();
212
207
  }
213
208
  }
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());
209
+ C = Ne(O);
210
+ R = /* @__PURE__ */ new WeakMap();
211
+ ie(C, 4, "skipLayout", ne, I, R);
212
+ I = ie(C, 0, "ContentAreaElement2", oe, I);
213
+ M(C, 1, I);
214
+ function De(e, t, r) {
215
+ const o = [], i = t.split("|");
216
+ for (const a of i) {
217
+ const s = e.querySelectorAll(a.trim());
221
218
  if (s.length > 0)
222
219
  for (const c of s) {
223
220
  o.push(c);
224
- for (const [h, l] of Object.entries(n))
221
+ for (const [h, l] of Object.entries(r))
225
222
  c.setAttribute(h, l);
226
223
  }
227
224
  }
228
225
  return o;
229
226
  }
227
+ function ze(e, t) {
228
+ const r = e.split("|");
229
+ for (const o of r) {
230
+ const i = t.querySelectorAll(o.trim());
231
+ if (i.length > 0)
232
+ return Array.from(i);
233
+ }
234
+ return [];
235
+ }
236
+ function Be(e) {
237
+ class t extends e {
238
+ beforeLayoutCallback(o, i, a) {
239
+ return !1;
240
+ }
241
+ updated() {
242
+ var i;
243
+ const o = ((i = this.shadowRoot) == null ? void 0 : i.querySelectorAll("slot[data-query]")) ?? [];
244
+ for (const a of Array.from(o)) {
245
+ const s = a.getAttribute("data-query");
246
+ if (!s) continue;
247
+ let c = [];
248
+ try {
249
+ c = ze(s, this);
250
+ } catch (h) {
251
+ throw this.error(`"${h}" in slot`, a), h;
252
+ }
253
+ c.forEach((h) => {
254
+ if (a.getAttributeNames().filter((l) => l.startsWith("data-set-attribute-")).forEach((l) => {
255
+ const f = l.replace(/^data-set-attribute-/, "");
256
+ if (!h.hasAttribute(f)) {
257
+ const n = a.getAttribute(l);
258
+ n !== null && h.setAttribute(f, n);
259
+ }
260
+ }), !h.hasAttribute("slot")) {
261
+ const l = a.getAttribute("name");
262
+ l && h.setAttribute("slot", l);
263
+ }
264
+ });
265
+ }
266
+ $(Array.from(this.children), { recursive: !0 });
267
+ }
268
+ }
269
+ return t;
270
+ }
230
271
  export {
231
- A as ContentAreaElement2,
232
- ge as SectionTreeBuilder,
233
- k as applyLayout,
234
- Le as attrAssign,
235
- Te as isSectionTreeElement
272
+ I as ContentAreaElement2,
273
+ ke as SectionTreeBuilder,
274
+ Be as SubLayoutApplyMixin,
275
+ $ as applyLayout,
276
+ De as attrAssign,
277
+ Re as isSectionTreeElement
236
278
  };
@@ -3,8 +3,8 @@ export type IType = {
3
3
  * Number 10 - 60 - 2.5 -> 25
4
4
  */
5
5
  i: number;
6
- variant: "append" | "new" | "skip";
7
- tag: "hr" | "h";
6
+ variant: 'append' | 'new' | 'skip';
7
+ tag: 'hr' | 'h';
8
8
  hi?: number | null;
9
9
  };
10
10
  export interface SectionTreeElement {
@@ -0,0 +1 @@
1
+ export declare function multiQuerySelectAll(qurey: string, element: HTMLElement): HTMLElement[];
@@ -0,0 +1,344 @@
1
+ type Constructor<T = object> = abstract new (...args: any[]) => T;
2
+ export declare function SubLayoutApplyMixin<TBase extends Constructor<HTMLElement>>(Base: TBase): (abstract new (...args: any[]) => {
3
+ beforeLayoutCallback(element: HTMLElement, replacementElement: HTMLElement, children: HTMLElement[]): boolean;
4
+ updated(): void;
5
+ accessKey: string;
6
+ readonly accessKeyLabel: string;
7
+ autocapitalize: string;
8
+ dir: string;
9
+ draggable: boolean;
10
+ hidden: boolean;
11
+ inert: boolean;
12
+ innerText: string;
13
+ lang: string;
14
+ readonly offsetHeight: number;
15
+ readonly offsetLeft: number;
16
+ readonly offsetParent: Element | null;
17
+ readonly offsetTop: number;
18
+ readonly offsetWidth: number;
19
+ outerText: string;
20
+ popover: string | null;
21
+ spellcheck: boolean;
22
+ title: string;
23
+ translate: boolean;
24
+ writingSuggestions: string;
25
+ attachInternals(): ElementInternals;
26
+ click(): void;
27
+ hidePopover(): void;
28
+ showPopover(): void;
29
+ togglePopover(options?: boolean): boolean;
30
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
31
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
32
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
33
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
34
+ readonly attributes: NamedNodeMap;
35
+ get classList(): DOMTokenList;
36
+ set classList(value: string);
37
+ className: string;
38
+ readonly clientHeight: number;
39
+ readonly clientLeft: number;
40
+ readonly clientTop: number;
41
+ readonly clientWidth: number;
42
+ readonly currentCSSZoom: number;
43
+ id: string;
44
+ innerHTML: string;
45
+ readonly localName: string;
46
+ readonly namespaceURI: string | null;
47
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
48
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
49
+ outerHTML: string;
50
+ readonly ownerDocument: Document;
51
+ get part(): DOMTokenList;
52
+ set part(value: string);
53
+ readonly prefix: string | null;
54
+ readonly scrollHeight: number;
55
+ scrollLeft: number;
56
+ scrollTop: number;
57
+ readonly scrollWidth: number;
58
+ readonly shadowRoot: ShadowRoot | null;
59
+ slot: string;
60
+ readonly tagName: string;
61
+ attachShadow(init: ShadowRootInit): ShadowRoot;
62
+ checkVisibility(options?: CheckVisibilityOptions): boolean;
63
+ closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
64
+ closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
65
+ closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
66
+ closest<E extends Element = Element>(selectors: string): E | null;
67
+ computedStyleMap(): StylePropertyMapReadOnly;
68
+ getAttribute(qualifiedName: string): string | null;
69
+ getAttributeNS(namespace: string | null, localName: string): string | null;
70
+ getAttributeNames(): string[];
71
+ getAttributeNode(qualifiedName: string): Attr | null;
72
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
73
+ getBoundingClientRect(): DOMRect;
74
+ getClientRects(): DOMRectList;
75
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
76
+ getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
77
+ getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
78
+ getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
79
+ getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
80
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
81
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
82
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
83
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
84
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
85
+ getHTML(options?: GetHTMLOptions): string;
86
+ hasAttribute(qualifiedName: string): boolean;
87
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
88
+ hasAttributes(): boolean;
89
+ hasPointerCapture(pointerId: number): boolean;
90
+ insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
91
+ insertAdjacentHTML(position: InsertPosition, string: string): void;
92
+ insertAdjacentText(where: InsertPosition, data: string): void;
93
+ matches(selectors: string): boolean;
94
+ releasePointerCapture(pointerId: number): void;
95
+ removeAttribute(qualifiedName: string): void;
96
+ removeAttributeNS(namespace: string | null, localName: string): void;
97
+ removeAttributeNode(attr: Attr): Attr;
98
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
99
+ requestPointerLock(options?: PointerLockOptions): Promise<void>;
100
+ scroll(options?: ScrollToOptions): void;
101
+ scroll(x: number, y: number): void;
102
+ scrollBy(options?: ScrollToOptions): void;
103
+ scrollBy(x: number, y: number): void;
104
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
105
+ scrollTo(options?: ScrollToOptions): void;
106
+ scrollTo(x: number, y: number): void;
107
+ setAttribute(qualifiedName: string, value: string): void;
108
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
109
+ setAttributeNode(attr: Attr): Attr | null;
110
+ setAttributeNodeNS(attr: Attr): Attr | null;
111
+ setHTMLUnsafe(html: string): void;
112
+ setPointerCapture(pointerId: number): void;
113
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
114
+ webkitMatchesSelector(selectors: string): boolean;
115
+ readonly baseURI: string;
116
+ readonly childNodes: NodeListOf<ChildNode>;
117
+ readonly firstChild: ChildNode | null;
118
+ readonly isConnected: boolean;
119
+ readonly lastChild: ChildNode | null;
120
+ readonly nextSibling: ChildNode | null;
121
+ readonly nodeName: string;
122
+ readonly nodeType: number;
123
+ nodeValue: string | null;
124
+ readonly parentElement: HTMLElement | null;
125
+ readonly parentNode: ParentNode | null;
126
+ readonly previousSibling: ChildNode | null;
127
+ textContent: string | null;
128
+ appendChild<T extends Node>(node: T): T;
129
+ cloneNode(subtree?: boolean): Node;
130
+ compareDocumentPosition(other: Node): number;
131
+ contains(other: Node | null): boolean;
132
+ getRootNode(options?: GetRootNodeOptions): Node;
133
+ hasChildNodes(): boolean;
134
+ insertBefore<T extends Node>(node: T, child: Node | null): T;
135
+ isDefaultNamespace(namespace: string | null): boolean;
136
+ isEqualNode(otherNode: Node | null): boolean;
137
+ isSameNode(otherNode: Node | null): boolean;
138
+ lookupNamespaceURI(prefix: string | null): string | null;
139
+ lookupPrefix(namespace: string | null): string | null;
140
+ normalize(): void;
141
+ removeChild<T extends Node>(child: T): T;
142
+ replaceChild<T extends Node>(node: Node, child: T): T;
143
+ readonly ELEMENT_NODE: 1;
144
+ readonly ATTRIBUTE_NODE: 2;
145
+ readonly TEXT_NODE: 3;
146
+ readonly CDATA_SECTION_NODE: 4;
147
+ readonly ENTITY_REFERENCE_NODE: 5;
148
+ readonly ENTITY_NODE: 6;
149
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
150
+ readonly COMMENT_NODE: 8;
151
+ readonly DOCUMENT_NODE: 9;
152
+ readonly DOCUMENT_TYPE_NODE: 10;
153
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
154
+ readonly NOTATION_NODE: 12;
155
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
156
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
157
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
158
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
159
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
160
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
161
+ dispatchEvent(event: Event): boolean;
162
+ ariaAtomic: string | null;
163
+ ariaAutoComplete: string | null;
164
+ ariaBrailleLabel: string | null;
165
+ ariaBrailleRoleDescription: string | null;
166
+ ariaBusy: string | null;
167
+ ariaChecked: string | null;
168
+ ariaColCount: string | null;
169
+ ariaColIndex: string | null;
170
+ ariaColIndexText: string | null;
171
+ ariaColSpan: string | null;
172
+ ariaCurrent: string | null;
173
+ ariaDescription: string | null;
174
+ ariaDisabled: string | null;
175
+ ariaExpanded: string | null;
176
+ ariaHasPopup: string | null;
177
+ ariaHidden: string | null;
178
+ ariaInvalid: string | null;
179
+ ariaKeyShortcuts: string | null;
180
+ ariaLabel: string | null;
181
+ ariaLevel: string | null;
182
+ ariaLive: string | null;
183
+ ariaModal: string | null;
184
+ ariaMultiLine: string | null;
185
+ ariaMultiSelectable: string | null;
186
+ ariaOrientation: string | null;
187
+ ariaPlaceholder: string | null;
188
+ ariaPosInSet: string | null;
189
+ ariaPressed: string | null;
190
+ ariaReadOnly: string | null;
191
+ ariaRelevant: string | null;
192
+ ariaRequired: string | null;
193
+ ariaRoleDescription: string | null;
194
+ ariaRowCount: string | null;
195
+ ariaRowIndex: string | null;
196
+ ariaRowIndexText: string | null;
197
+ ariaRowSpan: string | null;
198
+ ariaSelected: string | null;
199
+ ariaSetSize: string | null;
200
+ ariaSort: string | null;
201
+ ariaValueMax: string | null;
202
+ ariaValueMin: string | null;
203
+ ariaValueNow: string | null;
204
+ ariaValueText: string | null;
205
+ role: string | null;
206
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
207
+ getAnimations(options?: GetAnimationsOptions): Animation[];
208
+ after(...nodes: (Node | string)[]): void;
209
+ before(...nodes: (Node | string)[]): void;
210
+ remove(): void;
211
+ replaceWith(...nodes: (Node | string)[]): void;
212
+ readonly nextElementSibling: Element | null;
213
+ readonly previousElementSibling: Element | null;
214
+ readonly childElementCount: number;
215
+ readonly children: HTMLCollection;
216
+ readonly firstElementChild: Element | null;
217
+ readonly lastElementChild: Element | null;
218
+ append(...nodes: (Node | string)[]): void;
219
+ prepend(...nodes: (Node | string)[]): void;
220
+ querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
221
+ querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
222
+ querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
223
+ querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
224
+ querySelector<E extends Element = Element>(selectors: string): E | null;
225
+ querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
226
+ querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
227
+ querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
228
+ querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
229
+ querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
230
+ replaceChildren(...nodes: (Node | string)[]): void;
231
+ readonly assignedSlot: HTMLSlotElement | null;
232
+ readonly attributeStyleMap: StylePropertyMap;
233
+ get style(): CSSStyleDeclaration;
234
+ set style(cssText: string);
235
+ contentEditable: string;
236
+ enterKeyHint: string;
237
+ inputMode: string;
238
+ readonly isContentEditable: boolean;
239
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
240
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
241
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
242
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
243
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
244
+ onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
245
+ onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
246
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
247
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
248
+ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
249
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
250
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
251
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
252
+ onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
253
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
254
+ oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
255
+ oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
256
+ oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
257
+ oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
258
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
259
+ oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
260
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
261
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
262
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
263
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
264
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
265
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
266
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
267
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
268
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
269
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
270
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
+ onerror: OnErrorEventHandler;
272
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
273
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
274
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
275
+ oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
276
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
277
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
278
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
279
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
280
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
281
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
282
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
283
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
284
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
285
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
286
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
287
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
288
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
289
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
290
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
291
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
292
+ onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
293
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
294
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
295
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
296
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
297
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
298
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
299
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
300
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
301
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
302
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
303
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
304
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
305
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
306
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
307
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
308
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
309
+ onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
310
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
311
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
312
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
313
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
314
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
315
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
316
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
317
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
318
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
319
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
320
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
321
+ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
322
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
323
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
324
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
325
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
326
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
327
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
328
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
329
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
330
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
331
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
332
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
333
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
334
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
335
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
336
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
337
+ autofocus: boolean;
338
+ readonly dataset: DOMStringMap;
339
+ nonce?: string;
340
+ tabIndex: number;
341
+ blur(): void;
342
+ focus(options?: FocusOptions): void;
343
+ }) & TBase;
344
+ export {};
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@trunkjs/content-pane",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "main": "./index.js",
5
5
  "dependencies": {
6
6
  "@trunkjs/browser-utils": "^1.0.14",
7
7
  "lit": "^3.3.1"
8
8
  },
9
+ "devDependencies": {
10
+ "@trunkjs/markdown-loader": "*"
11
+ },
9
12
  "type": "module",
10
13
  "types": "./index.d.ts",
11
14
  "web-types": "./web-types.json"
package/web-types.json CHANGED
@@ -11,6 +11,10 @@
11
11
  {
12
12
  "name": "debug",
13
13
  "type": "boolean"
14
+ },
15
+ {
16
+ "name": "skip-layout",
17
+ "type": "boolean"
14
18
  }
15
19
  ]
16
20
  }