@tachui/viewport 0.8.1-alpha → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/index.js +511 -332
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -3
- package/dist/index.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (n, e, t) =>
|
|
4
|
-
import { createSignal as
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
var me = Object.defineProperty;
|
|
2
|
+
var ge = (n, e, t) => e in n ? me(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var o = (n, e, t) => ge(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { createSignal as L, mountComponentTree as be, createRoot as ye, withComponentContext as ve, createContext as We, useContext as Se } from "@tachui/core";
|
|
5
|
+
import { registerModifierWithMetadata as j } from "@tachui/modifiers";
|
|
6
|
+
function U(n = {}) {
|
|
7
|
+
const e = Ee(), t = Pe(e, n), i = Oe(), s = ze(), a = De();
|
|
7
8
|
return {
|
|
8
9
|
platform: e,
|
|
9
10
|
capabilities: t,
|
|
@@ -12,20 +13,20 @@ function O(n = {}) {
|
|
|
12
13
|
isTouch: a
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
16
|
+
function Ee() {
|
|
17
|
+
return Ce() ? "electron" : Me() ? "mobile" : ke() ? "embedded" : "web";
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function Ce() {
|
|
19
20
|
return typeof window < "u" ? !!window.electronAPI || !!window.electron || !!window.require || navigator.userAgent.toLowerCase().includes("electron") : typeof process < "u" ? !!process.electron || !!process.versions?.electron || process.env.ELECTRON === "true" : !1;
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function Me() {
|
|
22
23
|
if (typeof window > "u") return !1;
|
|
23
24
|
const n = "ontouchstart" in window && !("onmousedown" in window), e = window.innerWidth <= 768 || window.innerHeight <= 768, t = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
24
25
|
navigator.userAgent
|
|
25
26
|
), i = window.matchMedia?.("(pointer: coarse)")?.matches, s = window.matchMedia?.("(max-width: 768px)")?.matches;
|
|
26
27
|
return n || e && t || i || s;
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function ke() {
|
|
29
30
|
if (typeof window > "u") return !1;
|
|
30
31
|
try {
|
|
31
32
|
return window.self !== window.top;
|
|
@@ -33,7 +34,7 @@ function ae() {
|
|
|
33
34
|
return !0;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
+
function Pe(n, e) {
|
|
37
38
|
const t = {
|
|
38
39
|
multiWindow: !1,
|
|
39
40
|
nativeWindows: !1,
|
|
@@ -59,9 +60,9 @@ function le(n, e) {
|
|
|
59
60
|
case "web":
|
|
60
61
|
return {
|
|
61
62
|
...t,
|
|
62
|
-
multiWindow: e.enablePopupTest ?
|
|
63
|
-
crossWindowCommunication:
|
|
64
|
-
fullscreenSupport:
|
|
63
|
+
multiWindow: e.enablePopupTest ? xe() : !1,
|
|
64
|
+
crossWindowCommunication: Te() || Ie(),
|
|
65
|
+
fullscreenSupport: q(),
|
|
65
66
|
windowResizing: !1,
|
|
66
67
|
// Browser windows can't be resized programmatically
|
|
67
68
|
windowMinimizing: !1
|
|
@@ -69,7 +70,7 @@ function le(n, e) {
|
|
|
69
70
|
case "mobile":
|
|
70
71
|
return {
|
|
71
72
|
...t,
|
|
72
|
-
fullscreenSupport:
|
|
73
|
+
fullscreenSupport: q(),
|
|
73
74
|
modalOverlays: !0
|
|
74
75
|
};
|
|
75
76
|
case "embedded":
|
|
@@ -81,7 +82,7 @@ function le(n, e) {
|
|
|
81
82
|
return t;
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
+
function xe() {
|
|
85
86
|
if (typeof window > "u" || typeof window.navigator < "u" && window.navigator.userAgent.includes("jsdom"))
|
|
86
87
|
return !1;
|
|
87
88
|
try {
|
|
@@ -91,28 +92,28 @@ function de() {
|
|
|
91
92
|
return !1;
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
+
function Te() {
|
|
95
96
|
return typeof window < "u" && "BroadcastChannel" in window;
|
|
96
97
|
}
|
|
97
|
-
function
|
|
98
|
+
function Ie() {
|
|
98
99
|
return typeof window < "u" && "MessageChannel" in window;
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
+
function q() {
|
|
101
102
|
return typeof document > "u" ? !1 : !!(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled);
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
+
function Oe() {
|
|
104
105
|
return typeof navigator > "u" ? "unknown" : navigator.userAgent;
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
+
function ze() {
|
|
107
108
|
return typeof window > "u" ? { width: 1920, height: 1080 } : {
|
|
108
109
|
width: window.screen?.width || window.innerWidth || 1920,
|
|
109
110
|
height: window.screen?.height || window.innerHeight || 1080
|
|
110
111
|
};
|
|
111
112
|
}
|
|
112
|
-
function
|
|
113
|
+
function De() {
|
|
113
114
|
return typeof window > "u" ? !1 : "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
114
115
|
}
|
|
115
|
-
function
|
|
116
|
+
function He() {
|
|
116
117
|
if (typeof navigator > "u")
|
|
117
118
|
return {
|
|
118
119
|
name: "unknown",
|
|
@@ -140,7 +141,7 @@ function fe() {
|
|
|
140
141
|
}
|
|
141
142
|
return { name: e, version: t, engine: i };
|
|
142
143
|
}
|
|
143
|
-
function
|
|
144
|
+
function Ae() {
|
|
144
145
|
if (typeof navigator > "u")
|
|
145
146
|
return {
|
|
146
147
|
name: "unknown",
|
|
@@ -167,7 +168,7 @@ function me() {
|
|
|
167
168
|
}
|
|
168
169
|
return { name: e, version: t };
|
|
169
170
|
}
|
|
170
|
-
function
|
|
171
|
+
function _e() {
|
|
171
172
|
return typeof window > "u" ? {
|
|
172
173
|
webgl: !1,
|
|
173
174
|
webgl2: !1,
|
|
@@ -188,7 +189,7 @@ function ge() {
|
|
|
188
189
|
resizeObserver: "ResizeObserver" in window
|
|
189
190
|
};
|
|
190
191
|
}
|
|
191
|
-
function
|
|
192
|
+
function F(n) {
|
|
192
193
|
return {
|
|
193
194
|
canOpenWindow: (e = !1) => e ? n.capabilities.nativeWindows : n.capabilities.multiWindow || n.capabilities.modalOverlays,
|
|
194
195
|
canCommunicateBetweenWindows: () => n.capabilities.crossWindowCommunication,
|
|
@@ -199,7 +200,7 @@ function H(n) {
|
|
|
199
200
|
getOptimalViewportType: (e = !1) => e && n.capabilities.nativeWindows ? "window" : n.capabilities.modalOverlays ? "modal" : n.platform === "mobile" ? "sheet" : "portal"
|
|
200
201
|
};
|
|
201
202
|
}
|
|
202
|
-
class
|
|
203
|
+
class Fe {
|
|
203
204
|
// Fallback strategies
|
|
204
205
|
createModal(e) {
|
|
205
206
|
throw new Error("Modal fallback not implemented");
|
|
@@ -208,7 +209,7 @@ class be {
|
|
|
208
209
|
throw new Error("Portal fallback not implemented");
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
|
-
class
|
|
212
|
+
class V extends Fe {
|
|
212
213
|
constructor(t = {}) {
|
|
213
214
|
super();
|
|
214
215
|
o(this, "environment");
|
|
@@ -217,7 +218,7 @@ class D extends be {
|
|
|
217
218
|
o(this, "popups", /* @__PURE__ */ new Map());
|
|
218
219
|
o(this, "portalContainer", null);
|
|
219
220
|
o(this, "broadcastChannel", null);
|
|
220
|
-
this.environment =
|
|
221
|
+
this.environment = U(t), this.initializePortalContainer();
|
|
221
222
|
}
|
|
222
223
|
/**
|
|
223
224
|
* Check if we can create a window with given config
|
|
@@ -321,21 +322,21 @@ class D extends be {
|
|
|
321
322
|
* Create popup window (native browser window)
|
|
322
323
|
*/
|
|
323
324
|
createPopupWindow(t) {
|
|
324
|
-
const i = new
|
|
325
|
+
const i = new Ve(t);
|
|
325
326
|
return this.popups.set(t.id, i), i;
|
|
326
327
|
}
|
|
327
328
|
/**
|
|
328
329
|
* Create modal overlay
|
|
329
330
|
*/
|
|
330
331
|
createModal(t) {
|
|
331
|
-
const i = new
|
|
332
|
+
const i = new Ne(t);
|
|
332
333
|
return this.modals.set(t.id, i), i;
|
|
333
334
|
}
|
|
334
335
|
/**
|
|
335
336
|
* Create portal
|
|
336
337
|
*/
|
|
337
338
|
createPortal(t) {
|
|
338
|
-
const i = new
|
|
339
|
+
const i = new Ge(t, this.portalContainer);
|
|
339
340
|
return this.portals.set(t.id, i), i;
|
|
340
341
|
}
|
|
341
342
|
/**
|
|
@@ -428,7 +429,7 @@ class D extends be {
|
|
|
428
429
|
`, document.head.appendChild(i);
|
|
429
430
|
}
|
|
430
431
|
}
|
|
431
|
-
class
|
|
432
|
+
class Ve {
|
|
432
433
|
constructor(e) {
|
|
433
434
|
o(this, "id");
|
|
434
435
|
o(this, "type", "window");
|
|
@@ -439,7 +440,7 @@ class ye {
|
|
|
439
440
|
o(this, "eventHandlers", /* @__PURE__ */ new Map());
|
|
440
441
|
o(this, "setState");
|
|
441
442
|
this.id = e.id, this.config = e;
|
|
442
|
-
const [t, i] =
|
|
443
|
+
const [t, i] = L({
|
|
443
444
|
id: e.id,
|
|
444
445
|
title: e.title || e.id,
|
|
445
446
|
isVisible: !1,
|
|
@@ -637,7 +638,7 @@ class ye {
|
|
|
637
638
|
removeChildWindow(e) {
|
|
638
639
|
}
|
|
639
640
|
}
|
|
640
|
-
class
|
|
641
|
+
class Ne {
|
|
641
642
|
constructor(e) {
|
|
642
643
|
o(this, "id");
|
|
643
644
|
o(this, "type", "modal");
|
|
@@ -655,7 +656,7 @@ class ve {
|
|
|
655
656
|
o(this, "parentWindow", null);
|
|
656
657
|
o(this, "tabContainer", null);
|
|
657
658
|
this.id = e.id, this.config = e;
|
|
658
|
-
const [t, i] =
|
|
659
|
+
const [t, i] = L({
|
|
659
660
|
id: e.id,
|
|
660
661
|
title: e.title || e.id,
|
|
661
662
|
isVisible: !1,
|
|
@@ -859,7 +860,7 @@ class ve {
|
|
|
859
860
|
e && e.remove();
|
|
860
861
|
}
|
|
861
862
|
}
|
|
862
|
-
class
|
|
863
|
+
class Ge {
|
|
863
864
|
constructor(e, t) {
|
|
864
865
|
o(this, "id");
|
|
865
866
|
o(this, "type", "portal");
|
|
@@ -877,7 +878,7 @@ class We {
|
|
|
877
878
|
o(this, "parentWindow", null);
|
|
878
879
|
o(this, "tabContainer", null);
|
|
879
880
|
this.container = t, this.id = e.id, this.config = e;
|
|
880
|
-
const [i, s] =
|
|
881
|
+
const [i, s] = L({
|
|
881
882
|
id: e.id,
|
|
882
883
|
title: e.title || e.id,
|
|
883
884
|
isVisible: !1,
|
|
@@ -904,7 +905,7 @@ class We {
|
|
|
904
905
|
if (this.portalElement) {
|
|
905
906
|
this.portalElement.innerHTML = "";
|
|
906
907
|
try {
|
|
907
|
-
const t =
|
|
908
|
+
const t = be(e, this.portalElement);
|
|
908
909
|
this.cleanupFunction = t;
|
|
909
910
|
} catch (t) {
|
|
910
911
|
console.error("Error during mountComponentTree:", t);
|
|
@@ -1084,7 +1085,7 @@ class We {
|
|
|
1084
1085
|
e && e.remove();
|
|
1085
1086
|
}
|
|
1086
1087
|
}
|
|
1087
|
-
class
|
|
1088
|
+
class R {
|
|
1088
1089
|
constructor(e, t = {}) {
|
|
1089
1090
|
o(this, "adapter");
|
|
1090
1091
|
o(this, "windows", /* @__PURE__ */ new Map());
|
|
@@ -1095,7 +1096,7 @@ class A {
|
|
|
1095
1096
|
o(this, "globalStateCallbacks", /* @__PURE__ */ new Map());
|
|
1096
1097
|
o(this, "environment");
|
|
1097
1098
|
o(this, "platformConfig");
|
|
1098
|
-
this.platformConfig = t, this.environment =
|
|
1099
|
+
this.platformConfig = t, this.environment = U(t), e ? this.adapter = e : this.adapter = this.createDefaultAdapter(), this.adapter.setupCrossWindowCommunication(), this.adapter.optimizeForPlatform();
|
|
1099
1100
|
}
|
|
1100
1101
|
/**
|
|
1101
1102
|
* Open a new window/viewport
|
|
@@ -1142,20 +1143,20 @@ class A {
|
|
|
1142
1143
|
createWindowGroup(e) {
|
|
1143
1144
|
if (this.windowGroups.has(e))
|
|
1144
1145
|
return this.windowGroups.get(e);
|
|
1145
|
-
const t = new
|
|
1146
|
+
const t = new Le(e, this);
|
|
1146
1147
|
return this.windowGroups.set(e, t), t;
|
|
1147
1148
|
}
|
|
1148
1149
|
/**
|
|
1149
1150
|
* Check if we can open a window with given options
|
|
1150
1151
|
*/
|
|
1151
1152
|
canOpenWindow(e = {}) {
|
|
1152
|
-
return
|
|
1153
|
+
return F(this.environment).canOpenWindow(e.preferNativeWindow);
|
|
1153
1154
|
}
|
|
1154
1155
|
/**
|
|
1155
1156
|
* Get optimal window type for given options
|
|
1156
1157
|
*/
|
|
1157
1158
|
getOptimalWindowType(e = {}) {
|
|
1158
|
-
const t =
|
|
1159
|
+
const t = F(this.environment);
|
|
1159
1160
|
return e.preferNativeWindow && this.environment.capabilities.nativeWindows ? "window" : e.modal !== !1 && this.environment.capabilities.modalOverlays ? "modal" : t.getOptimalViewportType(e.preferNativeWindow);
|
|
1160
1161
|
}
|
|
1161
1162
|
/**
|
|
@@ -1200,9 +1201,9 @@ class A {
|
|
|
1200
1201
|
createDefaultAdapter() {
|
|
1201
1202
|
switch (this.environment.platform) {
|
|
1202
1203
|
case "electron":
|
|
1203
|
-
return new
|
|
1204
|
+
return new V(this.platformConfig);
|
|
1204
1205
|
default:
|
|
1205
|
-
return new
|
|
1206
|
+
return new V(this.platformConfig);
|
|
1206
1207
|
}
|
|
1207
1208
|
}
|
|
1208
1209
|
// ==================== Phase 2: Global State Management ====================
|
|
@@ -1266,7 +1267,7 @@ class A {
|
|
|
1266
1267
|
});
|
|
1267
1268
|
}
|
|
1268
1269
|
}
|
|
1269
|
-
class
|
|
1270
|
+
class Le {
|
|
1270
1271
|
constructor(e, t, i = "any") {
|
|
1271
1272
|
o(this, "windows", /* @__PURE__ */ new Map());
|
|
1272
1273
|
o(this, "defaultOptions", {});
|
|
@@ -1304,8 +1305,8 @@ class Se {
|
|
|
1304
1305
|
return await a.show(), await a.focus(), a.markAsUsed(), a;
|
|
1305
1306
|
let r = await this.getPooledWindow();
|
|
1306
1307
|
if (r) {
|
|
1307
|
-
const
|
|
1308
|
-
return r.render(
|
|
1308
|
+
const d = t(e);
|
|
1309
|
+
return r.render(d), this.setWindowGroupMetadata(r, {
|
|
1309
1310
|
id: s,
|
|
1310
1311
|
groupId: this.id,
|
|
1311
1312
|
isPooled: !1,
|
|
@@ -1313,13 +1314,13 @@ class Se {
|
|
|
1313
1314
|
}), await r.show(), await r.focus(), this.windows.set(i, r), this.emitEvent("window:reused", r, e), r;
|
|
1314
1315
|
}
|
|
1315
1316
|
if (this.windows.size >= this.maxInstances) {
|
|
1316
|
-
const
|
|
1317
|
-
|
|
1317
|
+
const d = this.windows.values().next().value;
|
|
1318
|
+
d && (this.poolConfig.enabled ? await this.returnToPool(d) : await d.close());
|
|
1318
1319
|
}
|
|
1319
|
-
const
|
|
1320
|
+
const u = t(e);
|
|
1320
1321
|
return r = await this.manager.openWindow(
|
|
1321
1322
|
s,
|
|
1322
|
-
|
|
1323
|
+
u,
|
|
1323
1324
|
this.defaultOptions
|
|
1324
1325
|
), this.setWindowGroupMetadata(r, {
|
|
1325
1326
|
groupId: this.id,
|
|
@@ -1553,17 +1554,17 @@ class Se {
|
|
|
1553
1554
|
});
|
|
1554
1555
|
}
|
|
1555
1556
|
arrangeWindowsAsTiles(e) {
|
|
1556
|
-
const t = typeof window < "u" ? window.screen.width : 1920, i = typeof window < "u" ? window.screen.height : 1080, s = Math.ceil(Math.sqrt(e.length)), a = Math.ceil(e.length / s), r = t / s,
|
|
1557
|
-
e.forEach((
|
|
1558
|
-
const
|
|
1559
|
-
this.setWindowGroupMetadata(
|
|
1557
|
+
const t = typeof window < "u" ? window.screen.width : 1920, i = typeof window < "u" ? window.screen.height : 1080, s = Math.ceil(Math.sqrt(e.length)), a = Math.ceil(e.length / s), r = t / s, u = i / a;
|
|
1558
|
+
e.forEach((d, l) => {
|
|
1559
|
+
const p = l % s, b = Math.floor(l / s);
|
|
1560
|
+
this.setWindowGroupMetadata(d, {
|
|
1560
1561
|
tilePosition: {
|
|
1561
|
-
col:
|
|
1562
|
-
row:
|
|
1563
|
-
x:
|
|
1564
|
-
y:
|
|
1562
|
+
col: p,
|
|
1563
|
+
row: b,
|
|
1564
|
+
x: p * r,
|
|
1565
|
+
y: b * u,
|
|
1565
1566
|
width: r,
|
|
1566
|
-
height:
|
|
1567
|
+
height: u
|
|
1567
1568
|
},
|
|
1568
1569
|
arrangementStyle: "tile"
|
|
1569
1570
|
});
|
|
@@ -1614,17 +1615,17 @@ class Se {
|
|
|
1614
1615
|
}
|
|
1615
1616
|
}
|
|
1616
1617
|
}
|
|
1617
|
-
let
|
|
1618
|
-
function
|
|
1619
|
-
return
|
|
1618
|
+
let g = null;
|
|
1619
|
+
function h(n = {}) {
|
|
1620
|
+
return g || (g = new R(void 0, n)), g;
|
|
1620
1621
|
}
|
|
1621
|
-
function
|
|
1622
|
-
|
|
1622
|
+
function se(n) {
|
|
1623
|
+
g?.dispose(), g = n;
|
|
1623
1624
|
}
|
|
1624
|
-
function
|
|
1625
|
-
|
|
1625
|
+
function Ue() {
|
|
1626
|
+
g?.dispose(), g = null;
|
|
1626
1627
|
}
|
|
1627
|
-
function
|
|
1628
|
+
function S(n) {
|
|
1628
1629
|
return {
|
|
1629
1630
|
type: "window-scene",
|
|
1630
1631
|
sceneType: "window",
|
|
@@ -1649,27 +1650,27 @@ function y(n) {
|
|
|
1649
1650
|
},
|
|
1650
1651
|
// Open this window
|
|
1651
1652
|
async open() {
|
|
1652
|
-
const e =
|
|
1653
|
+
const e = h(), t = ye(() => ve((i) => n.children(), `Window-${n.id}`)({}));
|
|
1653
1654
|
await e.openWindow(n.id, t, n);
|
|
1654
1655
|
},
|
|
1655
1656
|
// Close this window
|
|
1656
1657
|
async close() {
|
|
1657
|
-
await
|
|
1658
|
+
await h().dismissWindow(n.id);
|
|
1658
1659
|
}
|
|
1659
1660
|
};
|
|
1660
1661
|
}
|
|
1661
|
-
function
|
|
1662
|
-
const e =
|
|
1662
|
+
function H(n) {
|
|
1663
|
+
const e = h(), t = e.createWindowGroup(n.id);
|
|
1663
1664
|
n.groupingStrategy && t.setGroupingStrategy(n.groupingStrategy), n.tabConfig && t.configureTabbing(n.tabConfig), n.poolConfig && t.configurePool(n.poolConfig), n.stateSyncScope && t.enableStateSync(n.stateSyncScope), n.maxInstances && t.setMaxInstances(n.maxInstances);
|
|
1664
1665
|
const {
|
|
1665
1666
|
groupingStrategy: i,
|
|
1666
1667
|
tabConfig: s,
|
|
1667
1668
|
poolConfig: a,
|
|
1668
1669
|
stateSyncScope: r,
|
|
1669
|
-
maxInstances:
|
|
1670
|
-
...
|
|
1670
|
+
maxInstances: u,
|
|
1671
|
+
...d
|
|
1671
1672
|
} = n;
|
|
1672
|
-
return t.setDefaultOptions(
|
|
1673
|
+
return t.setDefaultOptions(d), {
|
|
1673
1674
|
type: "window-group",
|
|
1674
1675
|
sceneType: "window-group",
|
|
1675
1676
|
id: n.id,
|
|
@@ -1700,8 +1701,8 @@ function T(n) {
|
|
|
1700
1701
|
n.children
|
|
1701
1702
|
);
|
|
1702
1703
|
else {
|
|
1703
|
-
const
|
|
1704
|
-
await e.openWindow(n.id,
|
|
1704
|
+
const p = n.children();
|
|
1705
|
+
await e.openWindow(n.id, p, n);
|
|
1705
1706
|
}
|
|
1706
1707
|
},
|
|
1707
1708
|
// Open window for specific data
|
|
@@ -1736,18 +1737,18 @@ function T(n) {
|
|
|
1736
1737
|
enableStateSync(l) {
|
|
1737
1738
|
t.enableStateSync(l);
|
|
1738
1739
|
},
|
|
1739
|
-
syncGroupState(l,
|
|
1740
|
-
t.syncState(l,
|
|
1740
|
+
syncGroupState(l, p) {
|
|
1741
|
+
t.syncState(l, p);
|
|
1741
1742
|
},
|
|
1742
1743
|
getGroupState(l) {
|
|
1743
1744
|
return t.getSharedState(l);
|
|
1744
1745
|
},
|
|
1745
|
-
onGroupStateChange(l,
|
|
1746
|
-
return t.onStateChange(l,
|
|
1746
|
+
onGroupStateChange(l, p) {
|
|
1747
|
+
return t.onStateChange(l, p);
|
|
1747
1748
|
}
|
|
1748
1749
|
};
|
|
1749
1750
|
}
|
|
1750
|
-
function
|
|
1751
|
+
function T(n) {
|
|
1751
1752
|
return {
|
|
1752
1753
|
type: "app",
|
|
1753
1754
|
scenes: n.children,
|
|
@@ -1767,8 +1768,8 @@ function M(n) {
|
|
|
1767
1768
|
},
|
|
1768
1769
|
// Initialize all scenes
|
|
1769
1770
|
async initialize() {
|
|
1770
|
-
if (!
|
|
1771
|
-
const { initializeViewportSystem: t } = await Promise.resolve().then(() =>
|
|
1771
|
+
if (!h(n.platformConfig)) {
|
|
1772
|
+
const { initializeViewportSystem: t } = await Promise.resolve().then(() => Ut);
|
|
1772
1773
|
t();
|
|
1773
1774
|
}
|
|
1774
1775
|
},
|
|
@@ -1785,12 +1786,12 @@ function M(n) {
|
|
|
1785
1786
|
}
|
|
1786
1787
|
};
|
|
1787
1788
|
}
|
|
1788
|
-
const
|
|
1789
|
+
const I = {
|
|
1789
1790
|
/**
|
|
1790
1791
|
* Create a document window group
|
|
1791
1792
|
*/
|
|
1792
1793
|
documentGroup(n, e, t, i) {
|
|
1793
|
-
return
|
|
1794
|
+
return H({
|
|
1794
1795
|
id: n,
|
|
1795
1796
|
title: e,
|
|
1796
1797
|
for: t,
|
|
@@ -1804,7 +1805,7 @@ const k = {
|
|
|
1804
1805
|
* Create a settings window
|
|
1805
1806
|
*/
|
|
1806
1807
|
settingsWindow(n) {
|
|
1807
|
-
return
|
|
1808
|
+
return S({
|
|
1808
1809
|
id: "settings",
|
|
1809
1810
|
title: "Settings",
|
|
1810
1811
|
width: 600,
|
|
@@ -1817,7 +1818,7 @@ const k = {
|
|
|
1817
1818
|
* Create an inspector window
|
|
1818
1819
|
*/
|
|
1819
1820
|
inspectorWindow(n) {
|
|
1820
|
-
return
|
|
1821
|
+
return S({
|
|
1821
1822
|
id: "inspector",
|
|
1822
1823
|
title: "Inspector",
|
|
1823
1824
|
width: 300,
|
|
@@ -1831,7 +1832,7 @@ const k = {
|
|
|
1831
1832
|
* Create a palette window
|
|
1832
1833
|
*/
|
|
1833
1834
|
paletteWindow(n, e, t) {
|
|
1834
|
-
return
|
|
1835
|
+
return S({
|
|
1835
1836
|
id: n,
|
|
1836
1837
|
title: e,
|
|
1837
1838
|
width: 250,
|
|
@@ -1841,13 +1842,13 @@ const k = {
|
|
|
1841
1842
|
children: t
|
|
1842
1843
|
});
|
|
1843
1844
|
}
|
|
1844
|
-
},
|
|
1845
|
+
}, oe = {
|
|
1845
1846
|
/**
|
|
1846
1847
|
* Basic app with main window and settings
|
|
1847
1848
|
*/
|
|
1848
|
-
basicApp: () =>
|
|
1849
|
+
basicApp: () => T({
|
|
1849
1850
|
children: [
|
|
1850
|
-
|
|
1851
|
+
S({
|
|
1851
1852
|
id: "main",
|
|
1852
1853
|
title: "My App",
|
|
1853
1854
|
children: () => ({
|
|
@@ -1863,7 +1864,7 @@ const k = {
|
|
|
1863
1864
|
})
|
|
1864
1865
|
})
|
|
1865
1866
|
}),
|
|
1866
|
-
|
|
1867
|
+
I.settingsWindow(() => ({
|
|
1867
1868
|
type: "component",
|
|
1868
1869
|
id: "settings-content",
|
|
1869
1870
|
props: {},
|
|
@@ -1880,9 +1881,9 @@ const k = {
|
|
|
1880
1881
|
/**
|
|
1881
1882
|
* Document-based app
|
|
1882
1883
|
*/
|
|
1883
|
-
documentApp: () =>
|
|
1884
|
+
documentApp: () => T({
|
|
1884
1885
|
children: [
|
|
1885
|
-
|
|
1886
|
+
H({
|
|
1886
1887
|
id: "document",
|
|
1887
1888
|
title: "Document",
|
|
1888
1889
|
for: class {
|
|
@@ -1904,7 +1905,7 @@ const k = {
|
|
|
1904
1905
|
})
|
|
1905
1906
|
})
|
|
1906
1907
|
}),
|
|
1907
|
-
|
|
1908
|
+
I.settingsWindow(() => ({
|
|
1908
1909
|
type: "component",
|
|
1909
1910
|
id: "settings",
|
|
1910
1911
|
props: {},
|
|
@@ -1918,12 +1919,12 @@ const k = {
|
|
|
1918
1919
|
}))
|
|
1919
1920
|
]
|
|
1920
1921
|
})
|
|
1921
|
-
},
|
|
1922
|
-
function
|
|
1922
|
+
}, re = We(null);
|
|
1923
|
+
function ae({
|
|
1923
1924
|
children: n,
|
|
1924
1925
|
manager: e
|
|
1925
1926
|
}) {
|
|
1926
|
-
const t = e ||
|
|
1927
|
+
const t = e || h(), i = {
|
|
1927
1928
|
openWindow: async (s, a, r) => await t.openWindow(s, a, r),
|
|
1928
1929
|
dismissWindow: async (s) => await t.dismissWindow(s),
|
|
1929
1930
|
viewportEnvironment: t.environment,
|
|
@@ -1932,47 +1933,47 @@ function B({
|
|
|
1932
1933
|
};
|
|
1933
1934
|
return {
|
|
1934
1935
|
type: "context-provider",
|
|
1935
|
-
context:
|
|
1936
|
+
context: re,
|
|
1936
1937
|
value: i,
|
|
1937
1938
|
children: Array.isArray(n) ? n : [n]
|
|
1938
1939
|
};
|
|
1939
1940
|
}
|
|
1940
|
-
function
|
|
1941
|
-
const n =
|
|
1941
|
+
function C() {
|
|
1942
|
+
const n = Se(re);
|
|
1942
1943
|
if (!n)
|
|
1943
1944
|
throw new Error(
|
|
1944
1945
|
"useViewportEnvironment must be used within a ViewportEnvironmentProvider"
|
|
1945
1946
|
);
|
|
1946
1947
|
return n();
|
|
1947
1948
|
}
|
|
1948
|
-
function
|
|
1949
|
-
const { openWindow: n } =
|
|
1949
|
+
function O() {
|
|
1950
|
+
const { openWindow: n } = C();
|
|
1950
1951
|
return n;
|
|
1951
1952
|
}
|
|
1952
|
-
function
|
|
1953
|
-
const { dismissWindow: n } =
|
|
1953
|
+
function z() {
|
|
1954
|
+
const { dismissWindow: n } = C();
|
|
1954
1955
|
return n;
|
|
1955
1956
|
}
|
|
1956
|
-
function
|
|
1957
|
-
const { viewportEnvironment: n } =
|
|
1957
|
+
function $() {
|
|
1958
|
+
const { viewportEnvironment: n } = C();
|
|
1958
1959
|
return n;
|
|
1959
1960
|
}
|
|
1960
|
-
function
|
|
1961
|
-
const { currentWindow: n } =
|
|
1961
|
+
function Re() {
|
|
1962
|
+
const { currentWindow: n } = C();
|
|
1962
1963
|
return n;
|
|
1963
1964
|
}
|
|
1964
|
-
function
|
|
1965
|
-
return
|
|
1965
|
+
function $e() {
|
|
1966
|
+
return h();
|
|
1966
1967
|
}
|
|
1967
|
-
function
|
|
1968
|
-
return (t) =>
|
|
1968
|
+
function Be(n, e) {
|
|
1969
|
+
return (t) => ae({
|
|
1969
1970
|
children: n(t),
|
|
1970
1971
|
manager: e
|
|
1971
1972
|
});
|
|
1972
1973
|
}
|
|
1973
|
-
function
|
|
1974
|
+
function je(n) {
|
|
1974
1975
|
return (e) => {
|
|
1975
|
-
const t =
|
|
1976
|
+
const t = O(), i = z(), s = $();
|
|
1976
1977
|
return n({
|
|
1977
1978
|
...e,
|
|
1978
1979
|
openWindow: t,
|
|
@@ -1981,46 +1982,70 @@ function Pe(n) {
|
|
|
1981
1982
|
});
|
|
1982
1983
|
};
|
|
1983
1984
|
}
|
|
1984
|
-
const
|
|
1985
|
+
const qe = {
|
|
1985
1986
|
openWindow: "openWindow",
|
|
1986
1987
|
dismissWindow: "dismissWindow",
|
|
1987
1988
|
viewportEnvironment: "viewportEnvironment",
|
|
1988
1989
|
currentWindow: "currentWindow"
|
|
1989
1990
|
};
|
|
1990
|
-
function
|
|
1991
|
-
return
|
|
1991
|
+
function Qe(n) {
|
|
1992
|
+
return C()[n];
|
|
1992
1993
|
}
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1994
|
+
const Ke = "0.8.8", Xe = Ke, c = {
|
|
1995
|
+
Clean: 0,
|
|
1996
|
+
Check: 1,
|
|
1997
|
+
Dirty: 2,
|
|
1998
|
+
Disposed: 3
|
|
1999
|
+
};
|
|
2000
|
+
var Je = Object.defineProperty, Ze = (n, e, t) => e in n ? Je(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, f = (n, e, t) => Ze(n, typeof e != "symbol" ? e + "" : e, t);
|
|
2001
|
+
let Ye = 0;
|
|
2002
|
+
const et = Math.random().toString(36).substr(2, 6);
|
|
2003
|
+
let Q = null, K = null;
|
|
2004
|
+
const tt = /* @__PURE__ */ new Set();
|
|
2005
|
+
tt.add(et);
|
|
2006
|
+
const E = {
|
|
2007
|
+
get currentComputation() {
|
|
2008
|
+
return Q;
|
|
2009
|
+
},
|
|
2010
|
+
set currentComputation(n) {
|
|
2011
|
+
Q = n;
|
|
2012
|
+
},
|
|
2013
|
+
get currentOwner() {
|
|
2014
|
+
return K;
|
|
2015
|
+
},
|
|
2016
|
+
set currentOwner(n) {
|
|
2017
|
+
K = n;
|
|
2018
|
+
}
|
|
2019
|
+
};
|
|
2020
|
+
function le() {
|
|
2021
|
+
return E.currentComputation;
|
|
1997
2022
|
}
|
|
1998
|
-
function
|
|
1999
|
-
return
|
|
2023
|
+
function B() {
|
|
2024
|
+
return E.currentOwner;
|
|
2000
2025
|
}
|
|
2001
|
-
class
|
|
2026
|
+
let de = class {
|
|
2002
2027
|
constructor(e, t = null) {
|
|
2003
|
-
f(this, "id"), f(this, "owner"), f(this, "fn"), f(this, "sources", /* @__PURE__ */ new Set()), f(this, "observers", /* @__PURE__ */ new Set()), f(this, "state",
|
|
2028
|
+
f(this, "id"), f(this, "owner"), f(this, "fn"), f(this, "sources", /* @__PURE__ */ new Set()), f(this, "observers", /* @__PURE__ */ new Set()), f(this, "state", c.Dirty), f(this, "value"), this.id = ++Ye, this.fn = e, this.owner = t, t && !t.disposed && t.sources.add(this);
|
|
2004
2029
|
}
|
|
2005
2030
|
execute() {
|
|
2006
|
-
if (this.state ===
|
|
2031
|
+
if (this.state === c.Disposed)
|
|
2007
2032
|
return this.value;
|
|
2008
2033
|
for (const t of this.sources)
|
|
2009
2034
|
t && typeof t == "object" && "removeObserver" in t && t.removeObserver(this);
|
|
2010
2035
|
this.sources.clear();
|
|
2011
|
-
const e =
|
|
2012
|
-
|
|
2036
|
+
const e = E.currentComputation;
|
|
2037
|
+
E.currentComputation = this;
|
|
2013
2038
|
try {
|
|
2014
|
-
return this.state =
|
|
2039
|
+
return this.state = c.Clean, this.value = this.fn(), this.value;
|
|
2015
2040
|
} catch (t) {
|
|
2016
|
-
throw this.state =
|
|
2041
|
+
throw this.state = c.Disposed, (typeof process > "u" || process.env.NODE_ENV !== "test") && console.error("Error in computation:", t), t;
|
|
2017
2042
|
} finally {
|
|
2018
|
-
|
|
2043
|
+
E.currentComputation = e;
|
|
2019
2044
|
}
|
|
2020
2045
|
}
|
|
2021
2046
|
dispose() {
|
|
2022
|
-
if (this.state !==
|
|
2023
|
-
this.state =
|
|
2047
|
+
if (this.state !== c.Disposed) {
|
|
2048
|
+
this.state = c.Disposed;
|
|
2024
2049
|
for (const e of this.sources)
|
|
2025
2050
|
e && typeof e == "object" && "removeObserver" in e && e.removeObserver(this);
|
|
2026
2051
|
this.sources.clear();
|
|
@@ -2029,19 +2054,21 @@ class K {
|
|
|
2029
2054
|
this.observers.clear(), this.owner && !this.owner.disposed && this.owner.sources.delete(this);
|
|
2030
2055
|
}
|
|
2031
2056
|
}
|
|
2057
|
+
};
|
|
2058
|
+
function nt() {
|
|
2059
|
+
return E.currentOwner;
|
|
2032
2060
|
}
|
|
2033
|
-
var
|
|
2034
|
-
let
|
|
2035
|
-
class Fe {
|
|
2061
|
+
var it = Object.defineProperty, st = (n, e, t) => e in n ? it(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, A = (n, e, t) => st(n, typeof e != "symbol" ? e + "" : e, t);
|
|
2062
|
+
let ot = 0, rt = class {
|
|
2036
2063
|
constructor(e) {
|
|
2037
|
-
|
|
2064
|
+
A(this, "id"), A(this, "observers", /* @__PURE__ */ new Set()), A(this, "_value"), this.id = ++ot, this._value = e;
|
|
2038
2065
|
}
|
|
2039
2066
|
/**
|
|
2040
2067
|
* Get the current value and track dependency
|
|
2041
2068
|
*/
|
|
2042
2069
|
getValue() {
|
|
2043
|
-
const e =
|
|
2044
|
-
return e && e.state !==
|
|
2070
|
+
const e = le();
|
|
2071
|
+
return e && e.state !== c.Disposed && (this.observers.add(e), e.sources.add(this)), this._value;
|
|
2045
2072
|
}
|
|
2046
2073
|
/**
|
|
2047
2074
|
* Get the current value without tracking dependency
|
|
@@ -2061,7 +2088,7 @@ class Fe {
|
|
|
2061
2088
|
*/
|
|
2062
2089
|
notify() {
|
|
2063
2090
|
for (const e of this.observers)
|
|
2064
|
-
e.state !==
|
|
2091
|
+
e.state !== c.Disposed && (e.state = c.Dirty, at(e));
|
|
2065
2092
|
}
|
|
2066
2093
|
/**
|
|
2067
2094
|
* Remove an observer (cleanup)
|
|
@@ -2080,29 +2107,29 @@ class Fe {
|
|
|
2080
2107
|
type: "Signal"
|
|
2081
2108
|
};
|
|
2082
2109
|
}
|
|
2110
|
+
};
|
|
2111
|
+
const P = /* @__PURE__ */ new Set();
|
|
2112
|
+
let x = !1;
|
|
2113
|
+
function at(n) {
|
|
2114
|
+
P.add(n), !x && queueMicrotask(lt);
|
|
2083
2115
|
}
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
E.add(n), !C && queueMicrotask(Ge);
|
|
2088
|
-
}
|
|
2089
|
-
function Ge() {
|
|
2090
|
-
if (!C) {
|
|
2091
|
-
C = !0;
|
|
2116
|
+
function lt() {
|
|
2117
|
+
if (!x) {
|
|
2118
|
+
x = !0;
|
|
2092
2119
|
try {
|
|
2093
|
-
for (;
|
|
2094
|
-
const n = Array.from(
|
|
2095
|
-
|
|
2120
|
+
for (; P.size > 0; ) {
|
|
2121
|
+
const n = Array.from(P).sort((e, t) => e.id - t.id);
|
|
2122
|
+
P.clear();
|
|
2096
2123
|
for (const e of n)
|
|
2097
|
-
e.state ===
|
|
2124
|
+
e.state === c.Dirty && e.execute();
|
|
2098
2125
|
}
|
|
2099
2126
|
} finally {
|
|
2100
|
-
|
|
2127
|
+
x = !1;
|
|
2101
2128
|
}
|
|
2102
2129
|
}
|
|
2103
2130
|
}
|
|
2104
|
-
function
|
|
2105
|
-
const e = new
|
|
2131
|
+
function dt(n) {
|
|
2132
|
+
const e = new rt(n), t = e.getValue.bind(e);
|
|
2106
2133
|
t.peek = e.peek.bind(e);
|
|
2107
2134
|
const i = e.set.bind(e);
|
|
2108
2135
|
return Object.defineProperty(t, Symbol.for("tachui.signal"), {
|
|
@@ -2110,24 +2137,24 @@ function Ne(n) {
|
|
|
2110
2137
|
enumerable: !1
|
|
2111
2138
|
}), [t, i];
|
|
2112
2139
|
}
|
|
2113
|
-
function
|
|
2140
|
+
function X(n) {
|
|
2114
2141
|
return typeof n == "function" && Symbol.for("tachui.signal") in n;
|
|
2115
2142
|
}
|
|
2116
|
-
const
|
|
2117
|
-
var
|
|
2118
|
-
class
|
|
2143
|
+
const ct = (n, e) => n === e;
|
|
2144
|
+
var ut = Object.defineProperty, ht = (n, e, t) => e in n ? ut(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, w = (n, e, t) => ht(n, typeof e != "symbol" ? e + "" : e, t), k = /* @__PURE__ */ ((n) => (n[n.Immediate = 0] = "Immediate", n[n.High = 1] = "High", n[n.Normal = 2] = "Normal", n[n.Low = 3] = "Low", n[n.Idle = 4] = "Idle", n))(k || {});
|
|
2145
|
+
class pt extends Error {
|
|
2119
2146
|
constructor(e, t, i) {
|
|
2120
2147
|
super(e), this.cause = t, this.node = i, this.name = "ReactiveError";
|
|
2121
2148
|
}
|
|
2122
2149
|
}
|
|
2123
|
-
const
|
|
2150
|
+
const wt = class v {
|
|
2124
2151
|
constructor() {
|
|
2125
|
-
|
|
2126
|
-
for (const e of Object.values(
|
|
2152
|
+
w(this, "updateQueues", /* @__PURE__ */ new Map()), w(this, "isFlushPending", !1), w(this, "isDestroyed", !1), w(this, "errorHandlers", /* @__PURE__ */ new Set()), w(this, "maxRetries", 3), w(this, "totalUpdateCycles", 0), w(this, "totalUpdateTime", 0), w(this, "errorCount", 0), w(this, "nodeRegistry", /* @__PURE__ */ new WeakSet());
|
|
2153
|
+
for (const e of Object.values(k))
|
|
2127
2154
|
typeof e == "number" && this.updateQueues.set(e, /* @__PURE__ */ new Set());
|
|
2128
2155
|
}
|
|
2129
2156
|
static getInstance() {
|
|
2130
|
-
return
|
|
2157
|
+
return v.instance || (v.instance = new v()), v.instance;
|
|
2131
2158
|
}
|
|
2132
2159
|
/**
|
|
2133
2160
|
* Schedule reactive node for update
|
|
@@ -2160,7 +2187,7 @@ const qe = class b {
|
|
|
2160
2187
|
await this.updateNodeWithRetry(a);
|
|
2161
2188
|
} catch (r) {
|
|
2162
2189
|
this.handleReactiveError(
|
|
2163
|
-
new
|
|
2190
|
+
new pt(`Failed to update ${a.type} node ${a.id}`, r, a)
|
|
2164
2191
|
);
|
|
2165
2192
|
}
|
|
2166
2193
|
if (this.hasHigherPriorityWork(t))
|
|
@@ -2306,7 +2333,7 @@ const qe = class b {
|
|
|
2306
2333
|
}
|
|
2307
2334
|
e.clear();
|
|
2308
2335
|
}
|
|
2309
|
-
this.updateQueues.clear(), this.errorHandlers.clear(),
|
|
2336
|
+
this.updateQueues.clear(), this.errorHandlers.clear(), v.instance = null;
|
|
2310
2337
|
}
|
|
2311
2338
|
/**
|
|
2312
2339
|
* Get debug information
|
|
@@ -2314,7 +2341,7 @@ const qe = class b {
|
|
|
2314
2341
|
getDebugInfo() {
|
|
2315
2342
|
const e = {};
|
|
2316
2343
|
for (const [t, i] of this.updateQueues)
|
|
2317
|
-
e[
|
|
2344
|
+
e[k[t]] = i.size;
|
|
2318
2345
|
return {
|
|
2319
2346
|
isFlushPending: this.isFlushPending,
|
|
2320
2347
|
isDestroyed: this.isDestroyed,
|
|
@@ -2324,30 +2351,35 @@ const qe = class b {
|
|
|
2324
2351
|
};
|
|
2325
2352
|
}
|
|
2326
2353
|
};
|
|
2327
|
-
|
|
2328
|
-
var
|
|
2329
|
-
class
|
|
2330
|
-
constructor(e, t = {}, i =
|
|
2331
|
-
super(e, i),
|
|
2354
|
+
w(wt, "instance", null);
|
|
2355
|
+
var ft = Object.defineProperty, mt = (n, e, t) => e in n ? ft(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, y = (n, e, t) => mt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
2356
|
+
class gt extends de {
|
|
2357
|
+
constructor(e, t = {}, i = B()) {
|
|
2358
|
+
super(e, i), y(this, "type", "computed"), y(this, "priority"), y(this, "_hasValue", !1), y(this, "_error", null), y(this, "equalsFn"), y(this, "options"), this.priority = t.priority ?? k.Normal, this.equalsFn = t.equals ?? ct, this.options = t;
|
|
2332
2359
|
}
|
|
2333
2360
|
/**
|
|
2334
2361
|
* Get the computed value, tracking dependency and lazily computing
|
|
2335
2362
|
*/
|
|
2336
2363
|
getValue() {
|
|
2337
|
-
const e =
|
|
2338
|
-
return e && e.state !==
|
|
2364
|
+
const e = le();
|
|
2365
|
+
return e && e.state !== c.Disposed && (this.observers.add(e), e.sources.add(this)), (this.state === c.Dirty || !this._hasValue) && (this.execute(), this._hasValue = !0), this.value;
|
|
2339
2366
|
}
|
|
2340
2367
|
/**
|
|
2341
2368
|
* Get the current value without tracking dependency
|
|
2342
2369
|
*/
|
|
2343
2370
|
peek() {
|
|
2344
|
-
return (this.state ===
|
|
2371
|
+
return (this.state === c.Dirty || !this._hasValue) && (this.execute(), this._hasValue = !0), this.value;
|
|
2345
2372
|
}
|
|
2346
2373
|
/**
|
|
2347
2374
|
* Remove an observer (cleanup)
|
|
2348
2375
|
*/
|
|
2349
2376
|
removeObserver(e) {
|
|
2350
|
-
this.observers.delete(e);
|
|
2377
|
+
this.observers.delete(e), this.options.releaseOnNoObservers === !0 && this.observers.size === 0 && e.state === c.Disposed && this.releaseSources();
|
|
2378
|
+
}
|
|
2379
|
+
releaseSources() {
|
|
2380
|
+
for (const e of this.sources)
|
|
2381
|
+
"removeObserver" in e && e.removeObserver(this);
|
|
2382
|
+
this.sources.clear(), this._hasValue = !1, this.state = c.Dirty;
|
|
2351
2383
|
}
|
|
2352
2384
|
/**
|
|
2353
2385
|
* Execute the computation and notify observers
|
|
@@ -2356,8 +2388,8 @@ class Qe extends K {
|
|
|
2356
2388
|
const e = this._hasValue ? this.value : void 0, t = super.execute();
|
|
2357
2389
|
if (!this._hasValue || !this.equalsFn(e, t))
|
|
2358
2390
|
for (const i of this.observers)
|
|
2359
|
-
i.state !==
|
|
2360
|
-
i.state ===
|
|
2391
|
+
i.state !== c.Disposed && (i.state = c.Dirty, "execute" in i && typeof i.execute == "function" && queueMicrotask(() => {
|
|
2392
|
+
i.state === c.Dirty && i.execute();
|
|
2361
2393
|
}));
|
|
2362
2394
|
return t;
|
|
2363
2395
|
}
|
|
@@ -2376,7 +2408,7 @@ class Qe extends K {
|
|
|
2376
2408
|
this.sources.clear();
|
|
2377
2409
|
for (const e of this.observers)
|
|
2378
2410
|
e.sources.delete(this);
|
|
2379
|
-
this.observers.clear(), this._hasValue = !1, this._error = null, this.state =
|
|
2411
|
+
this.observers.clear(), this._hasValue = !1, this._error = null, this.state = c.Disposed;
|
|
2380
2412
|
}
|
|
2381
2413
|
/**
|
|
2382
2414
|
* Dispose the computed value
|
|
@@ -2397,7 +2429,7 @@ class Qe extends K {
|
|
|
2397
2429
|
state: this.state,
|
|
2398
2430
|
sourceCount: this.sources.size,
|
|
2399
2431
|
observerCount: this.observers.size,
|
|
2400
|
-
priority:
|
|
2432
|
+
priority: k[this.priority],
|
|
2401
2433
|
debugName: this.options.debugName,
|
|
2402
2434
|
equalsFn: this.equalsFn.name || "anonymous"
|
|
2403
2435
|
};
|
|
@@ -2406,8 +2438,8 @@ class Qe extends K {
|
|
|
2406
2438
|
return `Computed(${this.options.debugName || this.id}): ${this._hasValue ? this.value : "no value"}`;
|
|
2407
2439
|
}
|
|
2408
2440
|
}
|
|
2409
|
-
function
|
|
2410
|
-
const t = new
|
|
2441
|
+
function bt(n, e) {
|
|
2442
|
+
const t = new gt(n, e), i = t.getValue.bind(t);
|
|
2411
2443
|
return i.peek = t.peek.bind(t), Object.defineProperty(i, Symbol.for("tachui.computed"), {
|
|
2412
2444
|
value: t,
|
|
2413
2445
|
enumerable: !1
|
|
@@ -2416,19 +2448,30 @@ function Ke(n, e) {
|
|
|
2416
2448
|
function N(n) {
|
|
2417
2449
|
return typeof n == "function" && Symbol.for("tachui.computed") in n;
|
|
2418
2450
|
}
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2451
|
+
function yt(n) {
|
|
2452
|
+
return n[Symbol.for("tachui.computed")] || null;
|
|
2453
|
+
}
|
|
2454
|
+
function vt(n) {
|
|
2455
|
+
const e = yt(n);
|
|
2456
|
+
!e || e.observers.size !== 0 || e.releaseSources();
|
|
2457
|
+
}
|
|
2458
|
+
const [Wt, Kt] = dt("light");
|
|
2459
|
+
bt(() => {
|
|
2460
|
+
const n = Wt();
|
|
2461
|
+
return n === "system" ? St() : n;
|
|
2423
2462
|
});
|
|
2424
|
-
function
|
|
2463
|
+
function St() {
|
|
2425
2464
|
return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2426
2465
|
}
|
|
2466
|
+
function Et(n) {
|
|
2467
|
+
const e = B();
|
|
2468
|
+
e && !e.disposed ? e.cleanups.push(n) : __DEV__ && console.warn("onCleanup called outside of reactive context");
|
|
2469
|
+
}
|
|
2427
2470
|
typeof globalThis.__DEV__ > "u" && (globalThis.__DEV__ = process.env.NODE_ENV !== "production");
|
|
2428
|
-
var
|
|
2429
|
-
class
|
|
2471
|
+
var Ct = Object.defineProperty, Mt = (n, e, t) => e in n ? Ct(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, J = (n, e, t) => Mt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
2472
|
+
class kt {
|
|
2430
2473
|
constructor() {
|
|
2431
|
-
|
|
2474
|
+
J(this, "pending", /* @__PURE__ */ new Set()), J(this, "isFlushScheduled", !1);
|
|
2432
2475
|
}
|
|
2433
2476
|
schedule(e) {
|
|
2434
2477
|
this.pending.add(e), this.isFlushScheduled || (this.isFlushScheduled = !0, queueMicrotask(() => this.flush()));
|
|
@@ -2449,20 +2492,122 @@ class et {
|
|
|
2449
2492
|
this.pending.size > 0 && (this.isFlushScheduled = !0, queueMicrotask(() => this.flush()));
|
|
2450
2493
|
}
|
|
2451
2494
|
}
|
|
2452
|
-
new
|
|
2453
|
-
function
|
|
2454
|
-
const t =
|
|
2495
|
+
new kt();
|
|
2496
|
+
function ce(n, e = {}) {
|
|
2497
|
+
const t = B();
|
|
2455
2498
|
let i;
|
|
2456
2499
|
const s = () => {
|
|
2457
2500
|
const r = n(i);
|
|
2458
2501
|
return i = r, r;
|
|
2459
|
-
}, a = new
|
|
2502
|
+
}, a = new de(s, t);
|
|
2460
2503
|
return e.name && Object.defineProperty(a, "name", {
|
|
2461
2504
|
value: e.name,
|
|
2462
2505
|
enumerable: !1
|
|
2463
2506
|
}), a.execute(), a;
|
|
2464
2507
|
}
|
|
2465
|
-
|
|
2508
|
+
const M = /* @__PURE__ */ new WeakMap();
|
|
2509
|
+
function Z(n, e, t) {
|
|
2510
|
+
try {
|
|
2511
|
+
n(e);
|
|
2512
|
+
} catch (i) {
|
|
2513
|
+
console.error(`Reactive style updater failed (${t}):`, i);
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
const G = 200, m = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new Set();
|
|
2517
|
+
let Y = !1, _ = !1;
|
|
2518
|
+
function Pt(n) {
|
|
2519
|
+
m.get(n)?.forEach((e) => e()), m.delete(n), D.delete(n);
|
|
2520
|
+
}
|
|
2521
|
+
function ue() {
|
|
2522
|
+
const n = Date.now();
|
|
2523
|
+
for (const e of Array.from(W)) {
|
|
2524
|
+
const t = e.deref();
|
|
2525
|
+
if (!t) {
|
|
2526
|
+
W.delete(e);
|
|
2527
|
+
continue;
|
|
2528
|
+
}
|
|
2529
|
+
const i = D.get(t), s = m.get(t);
|
|
2530
|
+
if (!i || !s || s.size === 0) {
|
|
2531
|
+
W.delete(e);
|
|
2532
|
+
continue;
|
|
2533
|
+
}
|
|
2534
|
+
if (t.isConnected) {
|
|
2535
|
+
i.wasConnected = !0;
|
|
2536
|
+
continue;
|
|
2537
|
+
}
|
|
2538
|
+
(i.wasConnected || n - i.trackedAt >= G) && (Pt(t), W.delete(e));
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2541
|
+
function xt() {
|
|
2542
|
+
if (_ || typeof setTimeout != "function") return;
|
|
2543
|
+
_ = !0;
|
|
2544
|
+
const n = () => {
|
|
2545
|
+
if (ue(), W.size === 0) {
|
|
2546
|
+
_ = !1;
|
|
2547
|
+
return;
|
|
2548
|
+
}
|
|
2549
|
+
setTimeout(n, G);
|
|
2550
|
+
};
|
|
2551
|
+
setTimeout(n, G);
|
|
2552
|
+
}
|
|
2553
|
+
function Tt() {
|
|
2554
|
+
Y || typeof document > "u" || !document.documentElement || typeof MutationObserver > "u" || (new MutationObserver(() => {
|
|
2555
|
+
ue();
|
|
2556
|
+
}).observe(document.documentElement, { childList: !0, subtree: !0 }), Y = !0);
|
|
2557
|
+
}
|
|
2558
|
+
function It(n, e) {
|
|
2559
|
+
Tt(), xt();
|
|
2560
|
+
const t = m.get(n) ?? /* @__PURE__ */ new Set(), i = t.size > 0;
|
|
2561
|
+
return t.add(e), m.set(n, t), i || (D.set(n, {
|
|
2562
|
+
trackedAt: Date.now(),
|
|
2563
|
+
wasConnected: n.isConnected
|
|
2564
|
+
}), W.add(new WeakRef(n))), () => {
|
|
2565
|
+
const s = m.get(n);
|
|
2566
|
+
s && (s.delete(e), s.size === 0 && (m.delete(n), D.delete(n)));
|
|
2567
|
+
};
|
|
2568
|
+
}
|
|
2569
|
+
function Ot({
|
|
2570
|
+
element: n,
|
|
2571
|
+
accessor: e,
|
|
2572
|
+
updater: t,
|
|
2573
|
+
updaterId: i
|
|
2574
|
+
}) {
|
|
2575
|
+
const s = M.get(n) ?? /* @__PURE__ */ new Map();
|
|
2576
|
+
M.has(n) || M.set(n, s);
|
|
2577
|
+
let a = s.get(e);
|
|
2578
|
+
if (!a) {
|
|
2579
|
+
const d = /* @__PURE__ */ new Map();
|
|
2580
|
+
a = { effect: ce(() => {
|
|
2581
|
+
const l = e();
|
|
2582
|
+
d.forEach(
|
|
2583
|
+
(p, b) => Z(p, l, b)
|
|
2584
|
+
);
|
|
2585
|
+
}), updaters: d }, s.set(e, a);
|
|
2586
|
+
}
|
|
2587
|
+
a.updaters.set(i, t), Z(t, e(), i);
|
|
2588
|
+
let r = null;
|
|
2589
|
+
const u = () => {
|
|
2590
|
+
r && (r(), r = null);
|
|
2591
|
+
const d = M.get(n), l = d?.get(e);
|
|
2592
|
+
l && (l.updaters.delete(i), l.updaters.size === 0 && (l.effect.dispose(), d?.delete(e), N(e) && vt(e)), d && d.size === 0 && M.delete(n));
|
|
2593
|
+
};
|
|
2594
|
+
nt() ? Et(u) : r = It(n, u);
|
|
2595
|
+
}
|
|
2596
|
+
const ee = Symbol.for("tachui.modifier.instanceId"), zt = "core";
|
|
2597
|
+
let te = 0;
|
|
2598
|
+
function Dt(n) {
|
|
2599
|
+
const e = n[ee];
|
|
2600
|
+
if (typeof e == "number") return e;
|
|
2601
|
+
te += 1;
|
|
2602
|
+
const t = te;
|
|
2603
|
+
return Object.defineProperty(n, ee, {
|
|
2604
|
+
value: t,
|
|
2605
|
+
enumerable: !1,
|
|
2606
|
+
configurable: !1,
|
|
2607
|
+
writable: !1
|
|
2608
|
+
}), t;
|
|
2609
|
+
}
|
|
2610
|
+
class Ht {
|
|
2466
2611
|
constructor(e) {
|
|
2467
2612
|
this.properties = e;
|
|
2468
2613
|
}
|
|
@@ -2481,12 +2626,12 @@ class tt {
|
|
|
2481
2626
|
applyStyleChange(e, t, i) {
|
|
2482
2627
|
if (e instanceof HTMLElement) {
|
|
2483
2628
|
const s = this.toCSSProperty(t);
|
|
2484
|
-
if (
|
|
2485
|
-
|
|
2629
|
+
if (X(i) || N(i))
|
|
2630
|
+
ce(() => {
|
|
2486
2631
|
const a = i(), r = String(a);
|
|
2487
2632
|
if (r.includes("!important")) {
|
|
2488
|
-
const
|
|
2489
|
-
e.style.setProperty(s,
|
|
2633
|
+
const u = r.replace(/\s*!important\s*$/, "").trim();
|
|
2634
|
+
e.style.setProperty(s, u, "important");
|
|
2490
2635
|
} else
|
|
2491
2636
|
e.style.setProperty(s, r);
|
|
2492
2637
|
});
|
|
@@ -2532,35 +2677,33 @@ class tt {
|
|
|
2532
2677
|
*/
|
|
2533
2678
|
applyStyles(e, t) {
|
|
2534
2679
|
if (e instanceof HTMLElement || e.style) {
|
|
2535
|
-
const i = e.style
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2680
|
+
const i = e.style, s = (a, r) => {
|
|
2681
|
+
if (i.setProperty)
|
|
2682
|
+
if (typeof r == "string" && r.includes("!important")) {
|
|
2683
|
+
const u = r.replace(/\s*!important\s*$/, "").trim();
|
|
2684
|
+
i.setProperty(a, u, "important");
|
|
2685
|
+
} else
|
|
2686
|
+
i.setProperty(a, r);
|
|
2687
|
+
else
|
|
2688
|
+
i[a] = r;
|
|
2689
|
+
};
|
|
2690
|
+
for (const [a, r] of Object.entries(t))
|
|
2691
|
+
if (r !== void 0) {
|
|
2692
|
+
const u = this.toCSSProperty(a);
|
|
2693
|
+
if (X(r) || N(r)) {
|
|
2694
|
+
const d = r, l = Dt(this);
|
|
2695
|
+
Ot({
|
|
2696
|
+
element: e,
|
|
2697
|
+
accessor: d,
|
|
2698
|
+
updaterId: `${zt}:${l}:${u}`,
|
|
2699
|
+
updater: (p) => {
|
|
2700
|
+
const b = this.toCSSValueForProperty(u, p);
|
|
2701
|
+
s(u, b);
|
|
2702
|
+
}
|
|
2553
2703
|
});
|
|
2554
|
-
else {
|
|
2555
|
-
const
|
|
2556
|
-
|
|
2557
|
-
if (typeof h == "string" && h.includes("!important")) {
|
|
2558
|
-
const c = h.replace(/\s*!important\s*$/, "").trim();
|
|
2559
|
-
i.setProperty(r, c, "important");
|
|
2560
|
-
} else
|
|
2561
|
-
i.setProperty(r, h);
|
|
2562
|
-
else
|
|
2563
|
-
i[r] = h;
|
|
2704
|
+
} else {
|
|
2705
|
+
const d = this.toCSSValueForProperty(u, r);
|
|
2706
|
+
s(u, d);
|
|
2564
2707
|
}
|
|
2565
2708
|
}
|
|
2566
2709
|
}
|
|
@@ -2590,7 +2733,7 @@ class tt {
|
|
|
2590
2733
|
};
|
|
2591
2734
|
}
|
|
2592
2735
|
}
|
|
2593
|
-
class
|
|
2736
|
+
class he extends Ht {
|
|
2594
2737
|
constructor() {
|
|
2595
2738
|
super(...arguments);
|
|
2596
2739
|
o(this, "type", "viewportLifecycle");
|
|
@@ -2616,59 +2759,94 @@ class X extends tt {
|
|
|
2616
2759
|
).observe(t);
|
|
2617
2760
|
}
|
|
2618
2761
|
}
|
|
2619
|
-
function
|
|
2620
|
-
return new
|
|
2762
|
+
function pe(n) {
|
|
2763
|
+
return new he({ onAppear: n });
|
|
2764
|
+
}
|
|
2765
|
+
function we(n) {
|
|
2766
|
+
return new he({ onDisappear: n });
|
|
2621
2767
|
}
|
|
2622
|
-
|
|
2623
|
-
|
|
2768
|
+
const At = {
|
|
2769
|
+
name: "@tachui/viewport",
|
|
2770
|
+
version: Xe,
|
|
2771
|
+
author: "TachUI Team",
|
|
2772
|
+
verified: !0
|
|
2773
|
+
}, ne = {
|
|
2774
|
+
category: "interaction",
|
|
2775
|
+
priority: 110,
|
|
2776
|
+
signature: "(handler: () => void) => Modifier",
|
|
2777
|
+
description: "Triggers handlers when an element appears in or disappears from the viewport."
|
|
2778
|
+
};
|
|
2779
|
+
let ie = !1;
|
|
2780
|
+
function fe(n) {
|
|
2781
|
+
const e = n?.registry, t = n?.plugin ?? At, i = n?.force === !0, s = !!(e || n?.plugin);
|
|
2782
|
+
!s && ie && !i || (j(
|
|
2783
|
+
"onAppear",
|
|
2784
|
+
pe,
|
|
2785
|
+
{
|
|
2786
|
+
...ne,
|
|
2787
|
+
description: "Executes a callback when the component enters the viewport."
|
|
2788
|
+
},
|
|
2789
|
+
e,
|
|
2790
|
+
t
|
|
2791
|
+
), j(
|
|
2792
|
+
"onDisappear",
|
|
2793
|
+
we,
|
|
2794
|
+
{
|
|
2795
|
+
...ne,
|
|
2796
|
+
description: "Executes a callback when the component leaves the viewport."
|
|
2797
|
+
},
|
|
2798
|
+
e,
|
|
2799
|
+
t
|
|
2800
|
+
), s || (ie = !0));
|
|
2624
2801
|
}
|
|
2625
|
-
|
|
2802
|
+
fe();
|
|
2803
|
+
const _t = {
|
|
2626
2804
|
// Manager
|
|
2627
|
-
getManager:
|
|
2805
|
+
getManager: h,
|
|
2628
2806
|
// Environment
|
|
2629
|
-
useOpenWindow:
|
|
2630
|
-
useDismissWindow:
|
|
2631
|
-
useViewportInfo:
|
|
2807
|
+
useOpenWindow: O,
|
|
2808
|
+
useDismissWindow: z,
|
|
2809
|
+
useViewportInfo: $,
|
|
2632
2810
|
// Components
|
|
2633
|
-
Window:
|
|
2634
|
-
WindowGroup:
|
|
2635
|
-
App:
|
|
2811
|
+
Window: S,
|
|
2812
|
+
WindowGroup: H,
|
|
2813
|
+
App: T,
|
|
2636
2814
|
// Utilities
|
|
2637
|
-
Utils:
|
|
2638
|
-
Examples:
|
|
2815
|
+
Utils: I,
|
|
2816
|
+
Examples: oe
|
|
2639
2817
|
};
|
|
2640
|
-
function
|
|
2641
|
-
const e = new
|
|
2642
|
-
return
|
|
2818
|
+
function Ft(n) {
|
|
2819
|
+
const e = new R(n?.customAdapter);
|
|
2820
|
+
return se(e), e;
|
|
2643
2821
|
}
|
|
2644
|
-
const
|
|
2822
|
+
const Vt = {
|
|
2645
2823
|
isWindow: (n) => n.type === "window",
|
|
2646
2824
|
isModal: (n) => n.type === "modal",
|
|
2647
2825
|
isPortal: (n) => n.type === "portal",
|
|
2648
2826
|
isSheet: (n) => n.type === "sheet",
|
|
2649
2827
|
isPopover: (n) => n.type === "popover"
|
|
2650
|
-
},
|
|
2828
|
+
}, Nt = {
|
|
2651
2829
|
/**
|
|
2652
2830
|
* Check if running in Electron
|
|
2653
2831
|
*/
|
|
2654
|
-
isElectron: () =>
|
|
2832
|
+
isElectron: () => h().environment.platform === "electron",
|
|
2655
2833
|
/**
|
|
2656
2834
|
* Check if on mobile
|
|
2657
2835
|
*/
|
|
2658
|
-
isMobile: () =>
|
|
2836
|
+
isMobile: () => h().environment.platform === "mobile",
|
|
2659
2837
|
/**
|
|
2660
2838
|
* Check if multi-window is supported
|
|
2661
2839
|
*/
|
|
2662
|
-
supportsMultiWindow: () =>
|
|
2840
|
+
supportsMultiWindow: () => h().environment.capabilities.multiWindow,
|
|
2663
2841
|
/**
|
|
2664
2842
|
* Check if native windows are supported
|
|
2665
2843
|
*/
|
|
2666
|
-
supportsNativeWindows: () =>
|
|
2844
|
+
supportsNativeWindows: () => h().environment.capabilities.nativeWindows,
|
|
2667
2845
|
/**
|
|
2668
2846
|
* Get optimal window type for current platform
|
|
2669
2847
|
*/
|
|
2670
|
-
getOptimalWindowType: (n = !1) =>
|
|
2671
|
-
},
|
|
2848
|
+
getOptimalWindowType: (n = !1) => h().getOptimalWindowType({ preferNativeWindow: n })
|
|
2849
|
+
}, Gt = {
|
|
2672
2850
|
/**
|
|
2673
2851
|
* Standard document window
|
|
2674
2852
|
*/
|
|
@@ -2735,7 +2913,7 @@ const rt = {
|
|
|
2735
2913
|
minimizable: !1,
|
|
2736
2914
|
maximizable: !1
|
|
2737
2915
|
})
|
|
2738
|
-
},
|
|
2916
|
+
}, Lt = {
|
|
2739
2917
|
DEFAULT_WINDOW_WIDTH: 800,
|
|
2740
2918
|
DEFAULT_WINDOW_HEIGHT: 600,
|
|
2741
2919
|
MIN_WINDOW_WIDTH: 300,
|
|
@@ -2743,81 +2921,82 @@ const rt = {
|
|
|
2743
2921
|
MODAL_Z_INDEX: 1e3,
|
|
2744
2922
|
PORTAL_Z_INDEX: 999,
|
|
2745
2923
|
ANIMATION_DURATION: 200
|
|
2746
|
-
},
|
|
2924
|
+
}, Ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2747
2925
|
__proto__: null,
|
|
2748
|
-
App:
|
|
2749
|
-
EnvironmentKeys:
|
|
2750
|
-
ExampleScenes:
|
|
2751
|
-
PlatformUtils:
|
|
2752
|
-
TachUIViewportManager:
|
|
2753
|
-
Viewport:
|
|
2754
|
-
ViewportConstants:
|
|
2755
|
-
ViewportEnvironmentProvider:
|
|
2756
|
-
ViewportTypeGuards:
|
|
2757
|
-
WebViewportAdapter:
|
|
2758
|
-
Window:
|
|
2759
|
-
WindowConfigs:
|
|
2760
|
-
WindowGroup:
|
|
2761
|
-
WindowUtils:
|
|
2762
|
-
checkFeatureSupport:
|
|
2763
|
-
createCapabilityChecker:
|
|
2764
|
-
createWindowAwareComponent:
|
|
2765
|
-
detectViewportEnvironment:
|
|
2766
|
-
disposeViewportManager:
|
|
2767
|
-
getBrowserInfo:
|
|
2768
|
-
getEnvironmentValue:
|
|
2769
|
-
getOSInfo:
|
|
2770
|
-
getViewportManager:
|
|
2771
|
-
initializeViewportSystem:
|
|
2772
|
-
onAppear:
|
|
2773
|
-
onDisappear:
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2926
|
+
App: T,
|
|
2927
|
+
EnvironmentKeys: qe,
|
|
2928
|
+
ExampleScenes: oe,
|
|
2929
|
+
PlatformUtils: Nt,
|
|
2930
|
+
TachUIViewportManager: R,
|
|
2931
|
+
Viewport: _t,
|
|
2932
|
+
ViewportConstants: Lt,
|
|
2933
|
+
ViewportEnvironmentProvider: ae,
|
|
2934
|
+
ViewportTypeGuards: Vt,
|
|
2935
|
+
WebViewportAdapter: V,
|
|
2936
|
+
Window: S,
|
|
2937
|
+
WindowConfigs: Gt,
|
|
2938
|
+
WindowGroup: H,
|
|
2939
|
+
WindowUtils: I,
|
|
2940
|
+
checkFeatureSupport: _e,
|
|
2941
|
+
createCapabilityChecker: F,
|
|
2942
|
+
createWindowAwareComponent: je,
|
|
2943
|
+
detectViewportEnvironment: U,
|
|
2944
|
+
disposeViewportManager: Ue,
|
|
2945
|
+
getBrowserInfo: He,
|
|
2946
|
+
getEnvironmentValue: Qe,
|
|
2947
|
+
getOSInfo: Ae,
|
|
2948
|
+
getViewportManager: h,
|
|
2949
|
+
initializeViewportSystem: Ft,
|
|
2950
|
+
onAppear: pe,
|
|
2951
|
+
onDisappear: we,
|
|
2952
|
+
registerViewportModifiers: fe,
|
|
2953
|
+
setViewportManager: se,
|
|
2954
|
+
useCurrentWindow: Re,
|
|
2955
|
+
useDismissWindow: z,
|
|
2956
|
+
useEnvironmentDismissWindow: z,
|
|
2957
|
+
useEnvironmentOpenWindow: O,
|
|
2958
|
+
useOpenWindow: O,
|
|
2959
|
+
useViewportEnvironment: C,
|
|
2960
|
+
useViewportInfo: $,
|
|
2961
|
+
useViewportManager: $e,
|
|
2962
|
+
withViewportEnvironment: Be
|
|
2784
2963
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2785
2964
|
export {
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2965
|
+
T as App,
|
|
2966
|
+
qe as EnvironmentKeys,
|
|
2967
|
+
oe as ExampleScenes,
|
|
2968
|
+
Nt as PlatformUtils,
|
|
2969
|
+
R as TachUIViewportManager,
|
|
2970
|
+
_t as Viewport,
|
|
2971
|
+
Lt as ViewportConstants,
|
|
2972
|
+
ae as ViewportEnvironmentProvider,
|
|
2973
|
+
Vt as ViewportTypeGuards,
|
|
2974
|
+
V as WebViewportAdapter,
|
|
2975
|
+
S as Window,
|
|
2976
|
+
Gt as WindowConfigs,
|
|
2977
|
+
H as WindowGroup,
|
|
2978
|
+
I as WindowUtils,
|
|
2979
|
+
_e as checkFeatureSupport,
|
|
2980
|
+
F as createCapabilityChecker,
|
|
2981
|
+
je as createWindowAwareComponent,
|
|
2982
|
+
U as detectViewportEnvironment,
|
|
2983
|
+
Ue as disposeViewportManager,
|
|
2984
|
+
He as getBrowserInfo,
|
|
2985
|
+
Qe as getEnvironmentValue,
|
|
2986
|
+
Ae as getOSInfo,
|
|
2987
|
+
h as getViewportManager,
|
|
2988
|
+
Ft as initializeViewportSystem,
|
|
2989
|
+
pe as onAppear,
|
|
2990
|
+
we as onDisappear,
|
|
2991
|
+
fe as registerViewportModifiers,
|
|
2992
|
+
se as setViewportManager,
|
|
2993
|
+
Re as useCurrentWindow,
|
|
2994
|
+
z as useDismissWindow,
|
|
2995
|
+
z as useEnvironmentDismissWindow,
|
|
2996
|
+
O as useEnvironmentOpenWindow,
|
|
2997
|
+
O as useOpenWindow,
|
|
2998
|
+
C as useViewportEnvironment,
|
|
2999
|
+
$ as useViewportInfo,
|
|
3000
|
+
$e as useViewportManager,
|
|
3001
|
+
Be as withViewportEnvironment
|
|
2822
3002
|
};
|
|
2823
|
-
//# sourceMappingURL=index.js.map
|