@trunkjs/content-pane 1.0.8 → 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,7 @@
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
+
1
5
  ## 1.0.8 (2025-08-29)
2
6
 
3
7
  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
- "__#2794@#debugCached": boolean | null;
4
- "__#2794@#myElementId": number;
3
+ "__#2898@#debugCached": boolean | null;
4
+ "__#2898@#myElementId": number;
5
5
  invalidateDebugCache(): void;
6
- "__#2794@#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;
package/index.js CHANGED
@@ -9,15 +9,15 @@ var ie = Object.create, I = Object.defineProperty, ae = Object.getOwnPropertyDes
9
9
  return o;
10
10
  }, D = (e, t, n, o, r, i) => {
11
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 O(this, i);
12
+ return M(this, i);
13
13
  }, set [n](p) {
14
- return M(this, i, p);
14
+ return O(this, i, p);
15
15
  } }, n));
16
16
  a ? u && a < 4 && z(i, (a > 2 ? "set " : a > 1 ? "get " : "") + n) : z(r, n);
17
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 ? O : pe)(p, r, a ^ 4 ? i : _.get) : (p) => p[n]), a > 2 && (d.set = u ? (p, C) => M(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));
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
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), O = (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), M = (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, $;
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
21
  H = [R("tj-error-element")];
22
22
  class m extends (b = te, B = [ne({ type: String, reflect: !0 })], b) {
23
23
  constructor(t = "An error occurred", n) {
@@ -78,8 +78,8 @@ function _e(e) {
78
78
  function ve(e, t, n) {
79
79
  var d, a;
80
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 = { class: "" };
82
- i.attrsMap.class && (s.class = i.attrsMap.class + " "), s.class += i.classes.join(" "), s.id = i.id, ((d = s.class) == null ? void 0 : d.trim()) === "" && delete s.class, ((a = s.id) == null ? void 0 : a.trim()) === "" && delete s.id;
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
83
  const c = i.tag || "div";
84
84
  let h = !1, l = F(c, { ...s, layoutOrig: n });
85
85
  if (c.includes("-") && !customElements.get(c))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trunkjs/content-pane",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "main": "./index.js",
5
5
  "dependencies": {
6
6
  "@trunkjs/browser-utils": "^1.0.14",