elit 3.6.5 → 3.6.7
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/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/README.md +6 -0
- package/dist/build.cjs +421 -331
- package/dist/build.d.ts +1 -16
- package/dist/build.js +420 -330
- package/dist/build.mjs +420 -330
- package/dist/chokidar.cjs +219 -182
- package/dist/chokidar.d.ts +25 -10
- package/dist/chokidar.js +217 -182
- package/dist/chokidar.mjs +218 -183
- package/dist/cli.cjs +21608 -20241
- package/dist/cli.d.ts +19 -37
- package/dist/cli.mjs +21262 -19910
- package/dist/config.cjs +357 -350
- package/dist/config.d.ts +19 -240
- package/dist/config.js +520 -515
- package/dist/config.mjs +346 -341
- package/dist/contracts-BeW9k0yZ.d.ts +54 -0
- package/dist/contracts-D7KIS-TK.d.ts +36 -0
- package/dist/coverage.cjs +448 -485
- package/dist/coverage.d.ts +13 -59
- package/dist/coverage.js +447 -484
- package/dist/coverage.mjs +447 -484
- package/dist/database.cjs +819 -828
- package/dist/database.d.ts +8 -24
- package/dist/database.js +818 -829
- package/dist/database.mjs +818 -829
- package/dist/desktop-auto-render.cjs +1700 -1522
- package/dist/desktop-auto-render.d.ts +4 -9
- package/dist/desktop-auto-render.js +1695 -1517
- package/dist/desktop-auto-render.mjs +1696 -1518
- package/dist/desktop.cjs +3 -1
- package/dist/desktop.d.ts +4 -1
- package/dist/desktop.js +1 -1
- package/dist/desktop.mjs +1 -1
- package/dist/dev-build.cjs +830 -0
- package/dist/dev-build.d.ts +53 -0
- package/dist/dev-build.js +3318 -0
- package/dist/dev-build.mjs +797 -0
- package/dist/dom.cjs +717 -590
- package/dist/dom.d.ts +2 -15
- package/dist/dom.js +714 -587
- package/dist/dom.mjs +716 -589
- package/dist/el.cjs +62 -52
- package/dist/el.d.ts +5 -10
- package/dist/el.js +60 -52
- package/dist/el.mjs +60 -52
- package/dist/fs.cjs +72 -63
- package/dist/fs.d.ts +22 -19
- package/dist/fs.js +71 -62
- package/dist/fs.mjs +71 -62
- package/dist/hmr.cjs +40 -14
- package/dist/hmr.d.ts +11 -23
- package/dist/hmr.js +38 -14
- package/dist/hmr.mjs +38 -14
- package/dist/http.cjs +251 -99
- package/dist/http.d.ts +38 -104
- package/dist/http.js +249 -99
- package/dist/http.mjs +249 -99
- package/dist/https.cjs +524 -228
- package/dist/https.d.ts +44 -36
- package/dist/https.js +520 -226
- package/dist/https.mjs +522 -228
- package/dist/index.cjs +7502 -7690
- package/dist/index.d.ts +8 -3
- package/dist/index.js +7486 -7676
- package/dist/index.mjs +7497 -7686
- package/dist/mime-types.cjs +10 -4
- package/dist/mime-types.d.ts +8 -11
- package/dist/mime-types.js +9 -3
- package/dist/mime-types.mjs +9 -3
- package/dist/native.cjs +8616 -8869
- package/dist/native.d.ts +7 -8
- package/dist/native.js +8682 -8935
- package/dist/native.mjs +8615 -8868
- package/dist/path.cjs +83 -77
- package/dist/path.d.ts +29 -29
- package/dist/path.js +82 -76
- package/dist/path.mjs +82 -76
- package/dist/pm.cjs +3300 -0
- package/dist/pm.d.ts +256 -0
- package/dist/pm.js +5638 -0
- package/dist/pm.mjs +3196 -0
- package/dist/preview-build.cjs +712 -0
- package/dist/preview-build.d.ts +59 -0
- package/dist/preview-build.js +3194 -0
- package/dist/preview-build.mjs +676 -0
- package/dist/render-context.cjs +13 -2
- package/dist/render-context.d.ts +9 -31
- package/dist/render-context.js +11 -2
- package/dist/render-context.mjs +11 -2
- package/dist/router.cjs +787 -645
- package/dist/router.d.ts +8 -12
- package/dist/router.js +786 -644
- package/dist/router.mjs +786 -644
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +1 -1
- package/dist/runtime.mjs +1 -1
- package/dist/server.cjs +3315 -2603
- package/dist/server.d.ts +49 -4
- package/dist/server.js +7611 -2834
- package/dist/server.mjs +3317 -2607
- package/dist/smtp-server.cjs +128 -0
- package/dist/smtp-server.d.ts +27 -0
- package/dist/smtp-server.js +4199 -0
- package/dist/smtp-server.mjs +100 -0
- package/dist/state-DvEkDehk.d.ts +195 -0
- package/dist/state.cjs +768 -658
- package/dist/state.d.ts +11 -69
- package/dist/state.js +760 -650
- package/dist/state.mjs +767 -657
- package/dist/style.cjs +1011 -968
- package/dist/style.d.ts +13 -127
- package/dist/style.js +1009 -970
- package/dist/style.mjs +1011 -971
- package/dist/test-reporter.cjs +332 -316
- package/dist/test-reporter.d.ts +28 -33
- package/dist/test-reporter.js +328 -312
- package/dist/test-reporter.mjs +328 -312
- package/dist/test-runtime.cjs +927 -968
- package/dist/test-runtime.d.ts +24 -99
- package/dist/test-runtime.js +922 -965
- package/dist/test-runtime.mjs +922 -965
- package/dist/test.cjs +4428 -4273
- package/dist/test.d.ts +2 -8
- package/dist/test.js +4307 -4154
- package/dist/test.mjs +4419 -4267
- package/dist/types-BONVzPtp.d.ts +59 -0
- package/dist/types-BR4wMiVx.d.ts +32 -0
- package/dist/types-C4gKykuG.d.ts +23 -0
- package/dist/types-CIhpN1-K.d.ts +64 -0
- package/dist/types-Ckj8md_j.d.ts +84 -0
- package/dist/types-CpjQTAkX.d.ts +24 -0
- package/dist/types-D0LjrYjS.d.ts +14 -0
- package/dist/types-DAisuVr5.d.ts +75 -0
- package/dist/types-tJn88E1N.d.ts +242 -0
- package/dist/types.d.ts +71 -226
- package/dist/universal.cjs +1 -1
- package/dist/universal.d.ts +1 -5
- package/dist/universal.js +1 -1
- package/dist/universal.mjs +1 -1
- package/dist/websocket-XfyK23zD.d.ts +119 -0
- package/dist/ws.cjs +129 -108
- package/dist/ws.d.ts +21 -131
- package/dist/ws.js +128 -109
- package/dist/ws.mjs +128 -109
- package/dist/wss.cjs +757 -479
- package/dist/wss.d.ts +31 -28
- package/dist/wss.js +755 -479
- package/dist/wss.mjs +758 -482
- package/package.json +16 -1
- package/vendor/epaint-0.31.1/src/image.rs +418 -0
- package/dist/server-CcBFc2F5.d.ts +0 -449
package/dist/hmr.cjs
CHANGED
|
@@ -17,43 +17,67 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/hmr.ts
|
|
20
|
+
// src/client/hmr/index.ts
|
|
21
21
|
var hmr_exports = {};
|
|
22
22
|
__export(hmr_exports, {
|
|
23
23
|
default: () => hmr_default
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(hmr_exports);
|
|
26
|
+
|
|
27
|
+
// src/client/hmr/utils.ts
|
|
28
|
+
function isBrowserRuntime() {
|
|
29
|
+
return typeof window !== "undefined";
|
|
30
|
+
}
|
|
31
|
+
function getHmrSkipReason(targetWindow) {
|
|
32
|
+
if (targetWindow.location.protocol === "file:") {
|
|
33
|
+
return "file";
|
|
34
|
+
}
|
|
35
|
+
if (targetWindow.__ELIT_MODE__ === "preview") {
|
|
36
|
+
return "preview";
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
function createHmrWebSocketUrl(targetWindow) {
|
|
41
|
+
const protocol = targetWindow.location.protocol === "https:" ? "wss:" : "ws:";
|
|
42
|
+
const host = targetWindow.location.hostname;
|
|
43
|
+
const port = targetWindow.location.port || "3000";
|
|
44
|
+
return `${protocol}//${host}:${port}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// src/client/hmr/client.ts
|
|
26
48
|
var ElitHMR = class {
|
|
27
|
-
constructor() {
|
|
49
|
+
constructor(targetWindow = isBrowserRuntime() ? window : void 0) {
|
|
28
50
|
this.enabled = false;
|
|
29
51
|
this.ws = null;
|
|
30
52
|
this.acceptCallbacks = [];
|
|
31
53
|
this.disposeCallbacks = [];
|
|
32
54
|
this.declined = false;
|
|
33
|
-
|
|
55
|
+
this.targetWindow = targetWindow;
|
|
56
|
+
if (!this.targetWindow) {
|
|
34
57
|
return;
|
|
35
58
|
}
|
|
36
|
-
|
|
59
|
+
const skipReason = getHmrSkipReason(this.targetWindow);
|
|
60
|
+
if (skipReason === "file") {
|
|
37
61
|
console.log("[Elit HMR] Disabled for file:// protocol");
|
|
38
62
|
return;
|
|
39
63
|
}
|
|
40
|
-
if (
|
|
64
|
+
if (skipReason === "preview") {
|
|
41
65
|
return;
|
|
42
66
|
}
|
|
43
67
|
this.connect();
|
|
44
68
|
}
|
|
45
69
|
connect() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this.ws = new WebSocket(
|
|
70
|
+
if (!this.targetWindow) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
this.ws = new WebSocket(createHmrWebSocketUrl(this.targetWindow));
|
|
50
74
|
this.ws.onopen = () => {
|
|
51
75
|
this.enabled = true;
|
|
52
76
|
console.log("[Elit HMR] Connected \u2713");
|
|
53
77
|
};
|
|
54
78
|
this.ws.onmessage = (event) => {
|
|
55
79
|
try {
|
|
56
|
-
const data = JSON.parse(event.data);
|
|
80
|
+
const data = JSON.parse(String(event.data));
|
|
57
81
|
this.handleMessage(data);
|
|
58
82
|
} catch (error) {
|
|
59
83
|
console.error("[Elit HMR] Error parsing message:", error);
|
|
@@ -78,10 +102,10 @@ var ElitHMR = class {
|
|
|
78
102
|
this.reload();
|
|
79
103
|
return;
|
|
80
104
|
}
|
|
81
|
-
this.disposeCallbacks.forEach((
|
|
105
|
+
this.disposeCallbacks.forEach((callback) => callback());
|
|
82
106
|
this.disposeCallbacks = [];
|
|
83
107
|
if (this.acceptCallbacks.length > 0) {
|
|
84
|
-
this.acceptCallbacks.forEach((
|
|
108
|
+
this.acceptCallbacks.forEach((callback) => callback());
|
|
85
109
|
console.log("[Elit HMR] Update accepted via callback");
|
|
86
110
|
} else {
|
|
87
111
|
console.log("[Elit HMR] Update detected - manually refresh to see changes");
|
|
@@ -96,7 +120,7 @@ var ElitHMR = class {
|
|
|
96
120
|
}
|
|
97
121
|
}
|
|
98
122
|
reload() {
|
|
99
|
-
|
|
123
|
+
this.targetWindow?.location.reload();
|
|
100
124
|
}
|
|
101
125
|
accept(callback) {
|
|
102
126
|
if (callback) {
|
|
@@ -111,8 +135,10 @@ var ElitHMR = class {
|
|
|
111
135
|
this.disposeCallbacks.push(callback);
|
|
112
136
|
}
|
|
113
137
|
};
|
|
138
|
+
|
|
139
|
+
// src/client/hmr/index.ts
|
|
114
140
|
var hmr = new ElitHMR();
|
|
115
|
-
if (
|
|
141
|
+
if (isBrowserRuntime()) {
|
|
116
142
|
window.__ELIT_HMR__ = hmr;
|
|
117
143
|
}
|
|
118
144
|
var hmr_default = hmr;
|
package/dist/hmr.d.ts
CHANGED
|
@@ -1,31 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Import this in your app to enable hot module replacement
|
|
4
|
-
*/
|
|
5
|
-
interface HMRClient {
|
|
6
|
-
/** Check if HMR is enabled */
|
|
7
|
-
enabled: boolean;
|
|
8
|
-
/** Manually reload the page */
|
|
9
|
-
reload: () => void;
|
|
10
|
-
/** Accept HMR updates for current module */
|
|
11
|
-
accept: (callback?: () => void) => void;
|
|
12
|
-
/** Decline HMR updates (forces full reload) */
|
|
13
|
-
decline: () => void;
|
|
14
|
-
/** Dispose callback before module is replaced */
|
|
15
|
-
dispose: (callback: () => void) => void;
|
|
16
|
-
}
|
|
17
|
-
declare global {
|
|
18
|
-
interface Window {
|
|
19
|
-
__ELIT_HMR__: HMRClient;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
import { H as HMRClient } from './types-D0LjrYjS.js';
|
|
2
|
+
|
|
22
3
|
declare class ElitHMR implements HMRClient {
|
|
23
4
|
enabled: boolean;
|
|
24
5
|
private ws;
|
|
25
6
|
private acceptCallbacks;
|
|
26
7
|
private disposeCallbacks;
|
|
27
8
|
private declined;
|
|
28
|
-
|
|
9
|
+
private targetWindow;
|
|
10
|
+
constructor(targetWindow?: Window | undefined);
|
|
29
11
|
private connect;
|
|
30
12
|
private handleMessage;
|
|
31
13
|
reload(): void;
|
|
@@ -33,6 +15,12 @@ declare class ElitHMR implements HMRClient {
|
|
|
33
15
|
decline(): void;
|
|
34
16
|
dispose(callback: () => void): void;
|
|
35
17
|
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Client-side HMR runtime for Elit
|
|
21
|
+
* Import this in your app to enable hot module replacement
|
|
22
|
+
*/
|
|
23
|
+
|
|
36
24
|
declare const hmr: ElitHMR;
|
|
37
25
|
|
|
38
|
-
export {
|
|
26
|
+
export { HMRClient, hmr as default };
|
package/dist/hmr.js
CHANGED
|
@@ -1,37 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
-
// src/hmr.ts
|
|
3
|
+
// src/client/hmr/utils.ts
|
|
4
|
+
function isBrowserRuntime() {
|
|
5
|
+
return typeof window !== "undefined";
|
|
6
|
+
}
|
|
7
|
+
function getHmrSkipReason(targetWindow) {
|
|
8
|
+
if (targetWindow.location.protocol === "file:") {
|
|
9
|
+
return "file";
|
|
10
|
+
}
|
|
11
|
+
if (targetWindow.__ELIT_MODE__ === "preview") {
|
|
12
|
+
return "preview";
|
|
13
|
+
}
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
function createHmrWebSocketUrl(targetWindow) {
|
|
17
|
+
const protocol = targetWindow.location.protocol === "https:" ? "wss:" : "ws:";
|
|
18
|
+
const host = targetWindow.location.hostname;
|
|
19
|
+
const port = targetWindow.location.port || "3000";
|
|
20
|
+
return `${protocol}//${host}:${port}`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// src/client/hmr/client.ts
|
|
4
24
|
var ElitHMR = class {
|
|
5
|
-
constructor() {
|
|
25
|
+
constructor(targetWindow = isBrowserRuntime() ? window : void 0) {
|
|
6
26
|
this.enabled = false;
|
|
7
27
|
this.ws = null;
|
|
8
28
|
this.acceptCallbacks = [];
|
|
9
29
|
this.disposeCallbacks = [];
|
|
10
30
|
this.declined = false;
|
|
11
|
-
|
|
31
|
+
this.targetWindow = targetWindow;
|
|
32
|
+
if (!this.targetWindow) {
|
|
12
33
|
return;
|
|
13
34
|
}
|
|
14
|
-
|
|
35
|
+
const skipReason = getHmrSkipReason(this.targetWindow);
|
|
36
|
+
if (skipReason === "file") {
|
|
15
37
|
console.log("[Elit HMR] Disabled for file:// protocol");
|
|
16
38
|
return;
|
|
17
39
|
}
|
|
18
|
-
if (
|
|
40
|
+
if (skipReason === "preview") {
|
|
19
41
|
return;
|
|
20
42
|
}
|
|
21
43
|
this.connect();
|
|
22
44
|
}
|
|
23
45
|
connect() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
this.ws = new WebSocket(
|
|
46
|
+
if (!this.targetWindow) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.ws = new WebSocket(createHmrWebSocketUrl(this.targetWindow));
|
|
28
50
|
this.ws.onopen = () => {
|
|
29
51
|
this.enabled = true;
|
|
30
52
|
console.log("[Elit HMR] Connected \u2713");
|
|
31
53
|
};
|
|
32
54
|
this.ws.onmessage = (event) => {
|
|
33
55
|
try {
|
|
34
|
-
const data = JSON.parse(event.data);
|
|
56
|
+
const data = JSON.parse(String(event.data));
|
|
35
57
|
this.handleMessage(data);
|
|
36
58
|
} catch (error) {
|
|
37
59
|
console.error("[Elit HMR] Error parsing message:", error);
|
|
@@ -56,10 +78,10 @@
|
|
|
56
78
|
this.reload();
|
|
57
79
|
return;
|
|
58
80
|
}
|
|
59
|
-
this.disposeCallbacks.forEach((
|
|
81
|
+
this.disposeCallbacks.forEach((callback) => callback());
|
|
60
82
|
this.disposeCallbacks = [];
|
|
61
83
|
if (this.acceptCallbacks.length > 0) {
|
|
62
|
-
this.acceptCallbacks.forEach((
|
|
84
|
+
this.acceptCallbacks.forEach((callback) => callback());
|
|
63
85
|
console.log("[Elit HMR] Update accepted via callback");
|
|
64
86
|
} else {
|
|
65
87
|
console.log("[Elit HMR] Update detected - manually refresh to see changes");
|
|
@@ -74,7 +96,7 @@
|
|
|
74
96
|
}
|
|
75
97
|
}
|
|
76
98
|
reload() {
|
|
77
|
-
|
|
99
|
+
this.targetWindow?.location.reload();
|
|
78
100
|
}
|
|
79
101
|
accept(callback) {
|
|
80
102
|
if (callback) {
|
|
@@ -89,8 +111,10 @@
|
|
|
89
111
|
this.disposeCallbacks.push(callback);
|
|
90
112
|
}
|
|
91
113
|
};
|
|
114
|
+
|
|
115
|
+
// src/client/hmr/index.ts
|
|
92
116
|
var hmr = new ElitHMR();
|
|
93
|
-
if (
|
|
117
|
+
if (isBrowserRuntime()) {
|
|
94
118
|
window.__ELIT_HMR__ = hmr;
|
|
95
119
|
}
|
|
96
120
|
var hmr_default = hmr;
|
package/dist/hmr.mjs
CHANGED
|
@@ -1,35 +1,57 @@
|
|
|
1
|
-
// src/hmr.ts
|
|
1
|
+
// src/client/hmr/utils.ts
|
|
2
|
+
function isBrowserRuntime() {
|
|
3
|
+
return typeof window !== "undefined";
|
|
4
|
+
}
|
|
5
|
+
function getHmrSkipReason(targetWindow) {
|
|
6
|
+
if (targetWindow.location.protocol === "file:") {
|
|
7
|
+
return "file";
|
|
8
|
+
}
|
|
9
|
+
if (targetWindow.__ELIT_MODE__ === "preview") {
|
|
10
|
+
return "preview";
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
function createHmrWebSocketUrl(targetWindow) {
|
|
15
|
+
const protocol = targetWindow.location.protocol === "https:" ? "wss:" : "ws:";
|
|
16
|
+
const host = targetWindow.location.hostname;
|
|
17
|
+
const port = targetWindow.location.port || "3000";
|
|
18
|
+
return `${protocol}//${host}:${port}`;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// src/client/hmr/client.ts
|
|
2
22
|
var ElitHMR = class {
|
|
3
|
-
constructor() {
|
|
23
|
+
constructor(targetWindow = isBrowserRuntime() ? window : void 0) {
|
|
4
24
|
this.enabled = false;
|
|
5
25
|
this.ws = null;
|
|
6
26
|
this.acceptCallbacks = [];
|
|
7
27
|
this.disposeCallbacks = [];
|
|
8
28
|
this.declined = false;
|
|
9
|
-
|
|
29
|
+
this.targetWindow = targetWindow;
|
|
30
|
+
if (!this.targetWindow) {
|
|
10
31
|
return;
|
|
11
32
|
}
|
|
12
|
-
|
|
33
|
+
const skipReason = getHmrSkipReason(this.targetWindow);
|
|
34
|
+
if (skipReason === "file") {
|
|
13
35
|
console.log("[Elit HMR] Disabled for file:// protocol");
|
|
14
36
|
return;
|
|
15
37
|
}
|
|
16
|
-
if (
|
|
38
|
+
if (skipReason === "preview") {
|
|
17
39
|
return;
|
|
18
40
|
}
|
|
19
41
|
this.connect();
|
|
20
42
|
}
|
|
21
43
|
connect() {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.ws = new WebSocket(
|
|
44
|
+
if (!this.targetWindow) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.ws = new WebSocket(createHmrWebSocketUrl(this.targetWindow));
|
|
26
48
|
this.ws.onopen = () => {
|
|
27
49
|
this.enabled = true;
|
|
28
50
|
console.log("[Elit HMR] Connected \u2713");
|
|
29
51
|
};
|
|
30
52
|
this.ws.onmessage = (event) => {
|
|
31
53
|
try {
|
|
32
|
-
const data = JSON.parse(event.data);
|
|
54
|
+
const data = JSON.parse(String(event.data));
|
|
33
55
|
this.handleMessage(data);
|
|
34
56
|
} catch (error) {
|
|
35
57
|
console.error("[Elit HMR] Error parsing message:", error);
|
|
@@ -54,10 +76,10 @@ var ElitHMR = class {
|
|
|
54
76
|
this.reload();
|
|
55
77
|
return;
|
|
56
78
|
}
|
|
57
|
-
this.disposeCallbacks.forEach((
|
|
79
|
+
this.disposeCallbacks.forEach((callback) => callback());
|
|
58
80
|
this.disposeCallbacks = [];
|
|
59
81
|
if (this.acceptCallbacks.length > 0) {
|
|
60
|
-
this.acceptCallbacks.forEach((
|
|
82
|
+
this.acceptCallbacks.forEach((callback) => callback());
|
|
61
83
|
console.log("[Elit HMR] Update accepted via callback");
|
|
62
84
|
} else {
|
|
63
85
|
console.log("[Elit HMR] Update detected - manually refresh to see changes");
|
|
@@ -72,7 +94,7 @@ var ElitHMR = class {
|
|
|
72
94
|
}
|
|
73
95
|
}
|
|
74
96
|
reload() {
|
|
75
|
-
|
|
97
|
+
this.targetWindow?.location.reload();
|
|
76
98
|
}
|
|
77
99
|
accept(callback) {
|
|
78
100
|
if (callback) {
|
|
@@ -87,8 +109,10 @@ var ElitHMR = class {
|
|
|
87
109
|
this.disposeCallbacks.push(callback);
|
|
88
110
|
}
|
|
89
111
|
};
|
|
112
|
+
|
|
113
|
+
// src/client/hmr/index.ts
|
|
90
114
|
var hmr = new ElitHMR();
|
|
91
|
-
if (
|
|
115
|
+
if (isBrowserRuntime()) {
|
|
92
116
|
window.__ELIT_HMR__ = hmr;
|
|
93
117
|
}
|
|
94
118
|
var hmr_default = hmr;
|