mhx 2026.1.14 → 2026.1.15
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/dist/index.mjs +12 -3
- package/npm/postbuild.mjs +16 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9623,10 +9623,19 @@ function f4ah6o$mhx$core$$init_mhx() {
|
|
|
9623
9623
|
})();
|
|
9624
9624
|
|
|
9625
9625
|
|
|
9626
|
+
const process = (root) =>
|
|
9627
|
+
f4ah6o$mhx$core$$Mhx$process_tree(f4ah6o$mhx$core$$global_mhx, root);
|
|
9628
|
+
const handle_event = (event, target) =>
|
|
9629
|
+
f4ah6o$mhx$core$$Mhx$handle_event(
|
|
9630
|
+
f4ah6o$mhx$core$$global_mhx,
|
|
9631
|
+
event,
|
|
9632
|
+
target,
|
|
9633
|
+
);
|
|
9634
|
+
const get_instance = () => f4ah6o$mhx$core$$global_mhx;
|
|
9635
|
+
|
|
9636
|
+
|
|
9626
9637
|
export const init_mhx = f4ah6o$mhx$core$$init_mhx;
|
|
9627
|
-
export
|
|
9628
|
-
export const handle_event = f4ah6o$mhx$core$$handle_event;
|
|
9629
|
-
export const get_instance = f4ah6o$mhx$core$$get_instance;
|
|
9638
|
+
export { process, handle_event, get_instance };
|
|
9630
9639
|
export const version = f4ah6o$mhx$$version;
|
|
9631
9640
|
export const on_fetch_success = f4ah6o$mhx$network$$on_fetch_success;
|
|
9632
9641
|
export const on_fetch_error = f4ah6o$mhx$network$$on_fetch_error;
|
package/npm/postbuild.mjs
CHANGED
|
@@ -12,19 +12,32 @@ const rawMainJs = readFileSync(buildMain, "utf8");
|
|
|
12
12
|
let esmMainJs = rawMainJs;
|
|
13
13
|
const ffiHeader =
|
|
14
14
|
'import mhxFfi from "./mhx_ffi.js";\nconst mhx_ffi = mhxFfi;\n';
|
|
15
|
+
const stableExports = `
|
|
16
|
+
const process = (root) =>
|
|
17
|
+
f4ah6o$mhx$core$$Mhx$process_tree(f4ah6o$mhx$core$$global_mhx, root);
|
|
18
|
+
const handle_event = (event, target) =>
|
|
19
|
+
f4ah6o$mhx$core$$Mhx$handle_event(
|
|
20
|
+
f4ah6o$mhx$core$$global_mhx,
|
|
21
|
+
event,
|
|
22
|
+
target,
|
|
23
|
+
);
|
|
24
|
+
const get_instance = () => f4ah6o$mhx$core$$global_mhx;
|
|
25
|
+
`;
|
|
15
26
|
if (!esmMainJs.startsWith('import mhxFfi from "./mhx_ffi.js";')) {
|
|
16
27
|
esmMainJs = ffiHeader + esmMainJs;
|
|
17
28
|
}
|
|
18
29
|
const exportsBlock = `
|
|
19
30
|
export const init_mhx = f4ah6o$mhx$core$$init_mhx;
|
|
20
|
-
export
|
|
21
|
-
export const handle_event = f4ah6o$mhx$core$$handle_event;
|
|
22
|
-
export const get_instance = f4ah6o$mhx$core$$get_instance;
|
|
31
|
+
export { process, handle_event, get_instance };
|
|
23
32
|
export const version = f4ah6o$mhx$$version;
|
|
24
33
|
export const on_fetch_success = f4ah6o$mhx$network$$on_fetch_success;
|
|
25
34
|
export const on_fetch_error = f4ah6o$mhx$network$$on_fetch_error;
|
|
26
35
|
export const on_mutation_observed = f4ah6o$mhx$core$$on_mutation_observed;
|
|
27
36
|
`;
|
|
37
|
+
const hasStableExports = esmMainJs.includes("const process = (root) =>");
|
|
38
|
+
if (!hasStableExports) {
|
|
39
|
+
esmMainJs += `\n${stableExports}`;
|
|
40
|
+
}
|
|
28
41
|
if (!esmMainJs.includes("export const init_mhx")) {
|
|
29
42
|
esmMainJs += `\n${exportsBlock}`;
|
|
30
43
|
}
|