@popcorn245/cornfield-components 0.52.0 → 0.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,61 +1,61 @@
1
1
  {
2
2
  "name": "@popcorn245/cornfield-components",
3
- "cornfield": "0.52.0",
3
+ "cornfield": "0.52.1",
4
4
  "files": [
5
5
  {
6
- "path": "chunks/around-D7aqHejs.js",
6
+ "path": "chunks/around-BFqYTZ0K.js",
7
7
  "bytes": 2896,
8
- "sha256": "59e9819344e9a6411cf7cc900f185b6ed0dfdfc1b15c416fa989f3d89deda393"
8
+ "sha256": "9d1f527b8e9570a460b5258073739159e7399bbecde37f10c46fcd4851c648e0"
9
9
  },
10
10
  {
11
- "path": "chunks/corn-layers-g9AprK6G.js",
12
- "bytes": 29433,
13
- "sha256": "30c4090c6996663beb310a831065c6bb7a3a01cc76337bc3f70568eac300f56c"
11
+ "path": "chunks/corn-layers-Cni5rISZ.js",
12
+ "bytes": 29459,
13
+ "sha256": "0a0b82f36f3e3eb8d7f156095cfed0e02d4c6e6deebd0cda63f9bd3b09ce2426"
14
14
  },
15
15
  {
16
- "path": "chunks/corn-map-DE-pg-A0.js",
16
+ "path": "chunks/corn-map-B2-YxiEL.js",
17
17
  "bytes": 7117,
18
- "sha256": "11095abebde6d3e6e21b68804267c499642835251c5aa49357e4172878e473e9"
18
+ "sha256": "8bd1374bcbd80a39c90698dd63ce0eac41d524d18ad4fe52e737dc4f48841d9a"
19
19
  },
20
20
  {
21
- "path": "chunks/corn-node-panel-CdtFb9IZ.js",
21
+ "path": "chunks/corn-node-panel-BkvJThlp.js",
22
22
  "bytes": 22896,
23
- "sha256": "b6f7052cbfb3a0d615608dab11bfa3f408260eb679ccfb88e391abdb08c7aa97"
23
+ "sha256": "7736a35c70aacfed1e29b1828aa8a28dd8b9ab1337ef196714aa4fd783c383a0"
24
24
  },
25
25
  {
26
- "path": "chunks/corn-review-9krtLSPK.js",
27
- "bytes": 186355,
28
- "sha256": "1127e107a44c5977484de9410422774bb6c5feb30ab199b425659168b2d7924f"
26
+ "path": "chunks/corn-review-5wf7AT4o.js",
27
+ "bytes": 186364,
28
+ "sha256": "944daf44e60351759d434f2d313e40bf245324e7fb87f01efc6e4f029fdbc781"
29
29
  },
30
30
  {
31
- "path": "chunks/corn-search-BY1Po63S.js",
31
+ "path": "chunks/corn-search-CXs5d06S.js",
32
32
  "bytes": 35167,
33
- "sha256": "b5f51ec713ff2e12806d821263793de20cc3b8d32a2c437a1b450e2b030172a6"
33
+ "sha256": "20fefdc1a5e7f70c6fa354fe1fd3de2119ec3a3647e84c2adf1a90186be00697"
34
34
  },
35
35
  {
36
- "path": "chunks/engine-HIgX35hE.js",
37
- "bytes": 146071,
38
- "sha256": "1a8573406c612a25a71cfe5fbeea0e525317355ed69fbd768a55243c5ed9d4d1"
36
+ "path": "chunks/engine-BmXtSISH.js",
37
+ "bytes": 146493,
38
+ "sha256": "e6d9526497526120f38b079e5602d96f6ec62db2d97e498672a00d1d0fa5b685"
39
39
  },
40
40
  {
41
- "path": "chunks/layers-n1mJVJs8.js",
42
- "bytes": 6488,
43
- "sha256": "9b35e02ddd690692e8a42783d61fa44a8aa7be33ae893edf41fbd33b9b54baf4"
41
+ "path": "chunks/layers-Bj4Tluxe.js",
42
+ "bytes": 6493,
43
+ "sha256": "c93d0d2cc5526610865301cdee3c6d5b7cc48cb3f033fc7ad78be8acbf951e00"
44
44
  },
45
45
  {
46
- "path": "chunks/map-CeP9M2_w.js",
47
- "bytes": 89482,
48
- "sha256": "abdbc122ef1d9837563a083a741aacd8e978ccf27f05dff0db87bd2cba5de5e7"
46
+ "path": "chunks/map-BZRFOYkt.js",
47
+ "bytes": 90990,
48
+ "sha256": "ad465b215c232d22885152b79881ae62b0ef0693d029c031ea76ecea86d8e424"
49
49
  },
50
50
  {
51
- "path": "chunks/node-panel-CY5xnuKC.js",
52
- "bytes": 67522,
53
- "sha256": "27efaef702d49bbfb15deb0010c37fda0f3acb02d37e468c3caa40a27d035cac"
51
+ "path": "chunks/node-panel-BdvFvWCE.js",
52
+ "bytes": 67520,
53
+ "sha256": "3fc233a5d6e71389fab5d9a5e26d6186def39f1cc069d975504d820856e7ce88"
54
54
  },
55
55
  {
56
- "path": "chunks/review-source-DWisOXyR.js",
56
+ "path": "chunks/review-source-CK5tYIqk.js",
57
57
  "bytes": 1482,
58
- "sha256": "1778db3172b7f11ee7babef348392fccb699a38aee4c01b3818cb2d4707bb62c"
58
+ "sha256": "663faa3e8a677994c59bb668f5c975c3b2926613c8cfef1a4acbd1abc5dfb142"
59
59
  },
60
60
  {
61
61
  "path": "chunks/rolldown-runtime-CGnMp29N.js",
@@ -68,14 +68,14 @@
68
68
  "sha256": "47327281b56616b00075dd5e4b52c0142fc3414509eb8258d9b98c8b56fc372d"
69
69
  },
70
70
  {
71
- "path": "chunks/scope-CUhp8mkf.js",
71
+ "path": "chunks/scope-CqPbHcKL.js",
72
72
  "bytes": 3812,
73
- "sha256": "725eaf02fe6d1e27c019aef7822dcb3a600c8be4329a27b9ee9f9432df212f21"
73
+ "sha256": "ebd3f9facc995e636b482d58f4cfdc07c108655a9fde046a501311203537816b"
74
74
  },
75
75
  {
76
- "path": "chunks/sheets-TFCL_dIn.js",
76
+ "path": "chunks/sheets-D-sMZzSs.js",
77
77
  "bytes": 7813,
78
- "sha256": "1310a8c2bccdef4395aa39adb09d8a318ce98a1c5c9ee06254ecd6383f6dbdee"
78
+ "sha256": "e2511ecb63d522c3c88693cfd408015eb4f6b8770761e86c1d43b9b5c537072a"
79
79
  },
80
80
  {
81
81
  "path": "chunks/source-address-C70zNPIj.js",
@@ -83,44 +83,44 @@
83
83
  "sha256": "4227bb62d97d74a9ffe339ee437c9b7aab0c7049544d85af4c408b29d19a5a4b"
84
84
  },
85
85
  {
86
- "path": "chunks/status-CsFpnQxw.js",
86
+ "path": "chunks/status-DI5QLlAp.js",
87
87
  "bytes": 19972,
88
- "sha256": "6d4945f4ebc716955cfd854ab1a2e2303d68c3c4679b5add7750f273dbaa5710"
88
+ "sha256": "46f80cc2ff9e0026086500fee197876a484f947ac79c5e209d6283370de0da32"
89
89
  },
90
90
  {
91
91
  "path": "corn-layers.js",
92
92
  "bytes": 68,
93
- "sha256": "5ac89699eab77ac5fae6c37b7aa63992d0abf197e9281e8bc30df4b51df84a55"
93
+ "sha256": "783c8008b2145011d5a5b530b8844d3f17ffe5230d9a049c26bf470322ce2f13"
94
94
  },
95
95
  {
96
96
  "path": "corn-map.js",
97
97
  "bytes": 62,
98
- "sha256": "fb7a0889ca6c647ef4c2a97f6425b5fa7e52ccadbcafb32ab740245f67be88c6"
98
+ "sha256": "7196935576e93d680b57aa69116d16720a07b20e8307d9721b6ac53aa99ed62d"
99
99
  },
100
100
  {
101
101
  "path": "corn-node-panel.js",
102
102
  "bytes": 75,
103
- "sha256": "5b9b2483725feb7cc044f4cc7fbfcceabca4cf6e4f3a47510fd1ac16ca937985"
103
+ "sha256": "6f98a3fb4c1045a461e0c6cfe707de889b546af73637e47381310052bd20cdce"
104
104
  },
105
105
  {
106
106
  "path": "corn-review.js",
107
107
  "bytes": 68,
108
- "sha256": "9f623fe96100b6a16f4dfaa90e0d9ad0c12eaeef0d502fdb66e0d0940351de94"
108
+ "sha256": "55a17ddf23ae37eff8f82e7e66ce984809a4e06587bafb21674022029c1230fe"
109
109
  },
110
110
  {
111
111
  "path": "corn-scope.js",
112
112
  "bytes": 1877,
113
- "sha256": "b18a48e011ad13b12b6d27f1c28bc3c6a0c02333e896c74e0629d20aefcac4b3"
113
+ "sha256": "4c1faf95126eceba1b523ffb1aa7bdfda105e4d87a45ae3670c5c5a4d9e4f890"
114
114
  },
115
115
  {
116
116
  "path": "corn-search.js",
117
117
  "bytes": 68,
118
- "sha256": "6df7b069e2b83ccd580aee166bc2fe3e98b7aacadb5f737193c0cb7b4c2b08f6"
118
+ "sha256": "2afcefef5b2cccf1eaf80b90e6f7e5d8e4b3f868545134ea19f2bbffd91a8bd7"
119
119
  },
120
120
  {
121
121
  "path": "index.js",
122
122
  "bytes": 501,
123
- "sha256": "b778e7ff1570d101be73a43fc11725187ad358eb4c4d9e36e8ba63cd6a29f450"
123
+ "sha256": "a337babbe250f4518d489365d194ebb5ea12058aecab84d2bee608a5854d2980"
124
124
  },
125
125
  {
126
126
  "path": "tokens.css",
@@ -170,7 +170,7 @@
170
170
  {
171
171
  "path": "version.json",
172
172
  "bytes": 65,
173
- "sha256": "4aa18e8753358b1998cc6650fd887942fd0d64425a88a8607f03cee525625cf4"
173
+ "sha256": "93eea33531fd5e16173f6669db098b628413d6fecee5459cea0a3963b7d42266"
174
174
  }
175
175
  ]
176
176
  }
package/dist/version.json CHANGED
@@ -1 +1 @@
1
- {"name":"@popcorn245/cornfield-components","cornfield":"0.52.0"}
1
+ {"name":"@popcorn245/cornfield-components","cornfield":"0.52.1"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popcorn245/cornfield-components",
3
- "version": "0.52.0",
3
+ "version": "0.52.1",
4
4
  "description": "cornfield's interface as web components (spec 0011): <corn-map>, <corn-review>, <corn-scope> and the pieces around the map (<corn-node-panel>, <corn-layers>, <corn-search>), thin StencilRS shells over the engine in cornfield. The same files are served by every cornfield server at /cornfield/components/.",
5
5
  "license": "MIT",
6
6
  "author": "popcorn245 (https://github.com/popcorn245)",
@@ -1,204 +0,0 @@
1
- import { cn as e, dn as t, fn as n, ln as r, mn as i, un as a } from "./engine-HIgX35hE.js";
2
- // ../explorer/engine/sheets.js
3
- var o = 20;
4
- function s(e, n) {
5
- t(e).box = n || null;
6
- }
7
- function c(n, i) {
8
- let { box: a } = t(n), o = n.win && n.win.ResizeObserver;
9
- if (a && typeof o == "function") {
10
- let e = r(n), t = new o(() => {
11
- let t = r(n);
12
- t !== e && (e = t, i());
13
- });
14
- t.observe(a);
15
- let s = () => {
16
- t.disconnect(), n.release(s);
17
- };
18
- return n.own(s), s;
19
- }
20
- if (n.win && typeof n.win.matchMedia == "function") {
21
- let t = n.win.matchMedia(e);
22
- if (t && t.addEventListener) return n.listen(t, "change", () => i());
23
- }
24
- return () => {};
25
- }
26
- function l(e, n) {
27
- let r = t(e);
28
- return r.listeners.add(n), () => r.listeners.delete(n);
29
- }
30
- function u(e) {
31
- let o = t(e), { model: s } = o;
32
- f(e);
33
- for (let [t, n] of o.elements) {
34
- let r = s.isExpanded(t), i = s.stateOf(t);
35
- n.dataset.sheetState = i === "hidden" ? "peek" : i;
36
- let a = [...n.children].find((e) => e.classList.contains("hx-sheet-handle"));
37
- a && (a.setAttribute("aria-expanded", String(r)), a.setAttribute("aria-label", r ? "Collapse this panel" : "Expand this panel")), m(e, t, n, i === "stub");
38
- }
39
- let c = n(e, o);
40
- c && (c.dataset.sheetOpen = s.expanded() || ""), o.dock && r(e) && o.dock.style.setProperty("--hx-sheet-cap", `${i((o.box ? o.box.clientHeight : e.win.innerHeight) || 0, s.stubs())}px`), g(e), a(e), o.listeners.forEach((e) => e());
41
- }
42
- function d(e, t) {
43
- return e === "forge" ? t.classList.contains("forge-open") : e === "drawer" ? t.classList.contains("drawer-open") : !t.hidden && t.isConnected;
44
- }
45
- function f(e) {
46
- let n = t(e), { model: i } = n;
47
- if (r(e)) {
48
- for (let [t, r] of n.elements) {
49
- let a = d(t, r) && !n.away.has(t);
50
- if (!a && !d(t, r) && n.away.delete(t), a && !i.isShown(t)) for (let n of i.show(t)) p(e, n);
51
- else !a && i.isShown(t) && i.hide(t);
52
- }
53
- for (let [e, t] of n.elements) {
54
- let r = n.away.has(e), i = t.hasAttribute("data-sheet-away");
55
- t.toggleAttribute("data-sheet-away", r), r && !t.inert ? t.inert = !0 : !r && i && d(e, t) && (t.inert = !1);
56
- }
57
- } else {
58
- n.away.clear();
59
- for (let e of n.elements.values()) e.removeAttribute("data-sheet-away");
60
- }
61
- }
62
- function p(e, n) {
63
- let r = t(e);
64
- if (!r.elements.get(n)) return;
65
- r.away.add(n);
66
- let i = r.options.get(n);
67
- i && i.away && i.away();
68
- }
69
- function m(e, n, i, a) {
70
- let o = t(e), s = [...i.children].find((e) => e.classList.contains("hx-sheet-stub"));
71
- if (!s) {
72
- if (!a) return;
73
- s = e.doc.createElement("button"), s.type = "button", s.className = "hx-sheet-stub", s.dataset.corn = "sheet-stub", s.setAttribute("part", "sheet-stub"), s.addEventListener("click", (t) => {
74
- t.stopPropagation(), t.preventDefault(), y(e, n);
75
- let a = [...i.children].find((e) => e.classList.contains("hx-sheet-handle"));
76
- a && r(e) && a.focus();
77
- }), i.append(s);
78
- }
79
- if (s.hidden = !a, !a) return;
80
- let c = o.options.get(n), l = (c && c.stub ? c.stub() : null) || { title: i.getAttribute("aria-label") || n }, u = String(l.title || ""), d = l.badge ? String(l.badge) : "", f = `${u}\u0000${d}\u0000${l.label || ""}`;
81
- if (s.dataset.key === f) return;
82
- s.dataset.key = f, s.replaceChildren();
83
- let p = e.doc.createElement("span");
84
- if (p.className = "hx-sheet-stub-title", p.textContent = u, s.append(p), d) {
85
- let t = e.doc.createElement("span");
86
- t.className = "hx-waiting-badge", t.dataset.corn = "waiting-badge", t.setAttribute("part", "waiting-badge"), t.setAttribute("aria-hidden", "true"), t.textContent = d, s.append(t);
87
- }
88
- s.setAttribute("aria-label", l.label || (d ? `${u}, ${d}` : u));
89
- }
90
- function h(e, n) {
91
- let r = t(e);
92
- r.elements.has(n) && (r.away.delete(n), u(e));
93
- }
94
- function g(e) {
95
- let { dock: n } = t(e);
96
- if (!n) return;
97
- let r = null;
98
- for (let e of n.children) {
99
- e.removeAttribute("data-sheet-last");
100
- let t = e.classList.contains("hx-drawer") && !e.classList.contains("drawer-open") || e.classList.contains("hx-forge") && !e.classList.contains("forge-open");
101
- !e.hidden && !t && (r = e);
102
- }
103
- r && r.setAttribute("data-sheet-last", "");
104
- }
105
- function _(e, n, r, i = {}) {
106
- if (!r) return;
107
- let a = t(e);
108
- v(e, n, !1), a.model.add(n), a.elements.set(n, r), a.options.set(n, i), r.classList.add("hx-sheet");
109
- let o = [...r.children].find((e) => e.classList.contains("hx-sheet-handle"));
110
- o || (o = e.doc.createElement("button"), o.type = "button", o.className = "hx-sheet-handle", o.dataset.corn = "sheet-handle", o.setAttribute("part", "sheet-handle"), o.innerHTML = "<span data-corn=\"sheet-grip\" part=\"sheet-grip\"></span>", r.prepend(o)), a.offs.set(n, [...C(e, n, o), e.listen(r, "click", (t) => w(e, n, t), !0)]), u(e);
111
- }
112
- function v(e, n, r = !0) {
113
- let i = t(e);
114
- i.model.has(n) && ((i.offs.get(n) || []).forEach((e) => e()), i.offs.delete(n), i.model.remove(n), i.elements.delete(n), i.options.delete(n), i.away.delete(n), r && u(e));
115
- }
116
- function y(e, n) {
117
- f(e), t(e).model.expand(n) && u(e);
118
- }
119
- function b(e, n) {
120
- t(e).model.collapse(n) && u(e);
121
- }
122
- function x(e) {
123
- t(e).model.collapseAll() && u(e);
124
- }
125
- function S(e, n) {
126
- f(e), t(e).model.toggle(n) && u(e);
127
- }
128
- function C(e, t, n) {
129
- let r = null, i = !1, a = [];
130
- return a.push(e.listen(n, "pointerdown", (e) => {
131
- if (r = e.clientY, i = !1, n.setPointerCapture && e.pointerId !== void 0) try {
132
- n.setPointerCapture(e.pointerId);
133
- } catch {}
134
- })), a.push(e.listen(n, "pointerup", (n) => {
135
- if (r === null) return;
136
- let a = n.clientY - r;
137
- r = null, Math.abs(a) < o || (i = !0, a < 0 ? y(e, t) : b(e, t));
138
- })), a.push(e.listen(n, "pointercancel", () => {
139
- r = null;
140
- })), a.push(e.listen(n, "click", (n) => {
141
- n.stopPropagation(), i ? i = !1 : S(e, t);
142
- })), a;
143
- }
144
- function w(e, n, i) {
145
- if (!r(e) || t(e).model.isExpanded(n)) return;
146
- let a = i.target;
147
- if (a.closest && a.closest(".hx-sheet-handle, .hx-sheet-stub") || a.closest && a.closest("select, input, textarea, [data-peek-ok]")) return;
148
- let o = a.closest && a.closest("[data-action]");
149
- o && /close/.test(o.dataset.action) || (i.preventDefault(), i.stopPropagation(), y(e, n));
150
- }
151
- function T(e, t) {
152
- t.target === e.state.canvas && r(e) && x(e);
153
- }
154
- function E(e, n) {
155
- if (n.key !== "Escape" || n.defaultPrevented || !r(e)) return;
156
- let i = t(e), a = i.model.expanded(), o = a && i.elements.get(a);
157
- if (!o || !o.contains(n.target) || n.target.closest && n.target.closest("select, input, textarea")) return;
158
- n.preventDefault(), n.stopPropagation(), b(e, a);
159
- let s = [...o.children].find((e) => e.classList.contains("hx-sheet-handle"));
160
- s && s.focus();
161
- }
162
- function D(e, t) {
163
- r(e) && (t.stopPropagation(), x(e));
164
- }
165
- function O(e) {
166
- let n = t(e), r = e.el("sheet-dock");
167
- if (r) {
168
- if (r !== n.dock && (n.observers.forEach((e) => e.disconnect()), n.observers = [], n.model.ids().forEach((e) => n.model.remove(e)), n.elements.clear(), n.options.clear(), n.away.clear(), n.lastCovered = 0, n.dock = r), n.wiredDock !== n.dock) {
169
- n.wiredDock = n.dock;
170
- let t = e.win;
171
- if (t && typeof t.MutationObserver == "function") {
172
- let r = new t.MutationObserver(() => {
173
- g(e), a(e);
174
- });
175
- r.observe(n.dock, {
176
- childList: !0,
177
- subtree: !0,
178
- attributes: !0,
179
- attributeFilter: ["hidden", "class"]
180
- }), n.observers.push(r), e.own(() => r.disconnect());
181
- }
182
- if (t && typeof t.ResizeObserver == "function") {
183
- let r = new t.ResizeObserver(() => a(e));
184
- r.observe(n.dock), n.observers.push(r), e.own(() => r.disconnect());
185
- }
186
- }
187
- if (!n.documentWired) {
188
- n.documentWired = !0;
189
- for (let t of [
190
- "pointerdown",
191
- "touchstart",
192
- "mousedown"
193
- ]) e.listen(e.root, t, (t) => T(e, t), {
194
- passive: !0,
195
- capture: !0
196
- });
197
- e.listen(e.root, "keydown", (t) => E(e, t), !0), c(e, () => {
198
- x(e), a(e);
199
- });
200
- }
201
- u(e);
202
- }
203
- }
204
- export { D as a, _ as c, v as d, O as i, s as l, b as n, l as o, y as r, c as s, x as t, h as u };