miqro 6.2.9 → 6.2.11
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/build/editor.bundle.js +7 -4
- package/build/jsx.dom.js +38 -34
- package/build/lib.cjs +34 -31
- package/package.json +5 -5
package/build/editor.bundle.js
CHANGED
|
@@ -1562,7 +1562,7 @@ var require_core = __commonJS({
|
|
|
1562
1562
|
}
|
|
1563
1563
|
});
|
|
1564
1564
|
|
|
1565
|
-
//
|
|
1565
|
+
// ../jsx-dom/build/jsx-dom.esm.bundle.js
|
|
1566
1566
|
var debugLogEnabled = false;
|
|
1567
1567
|
function debug(runtime2, message, ...args) {
|
|
1568
1568
|
if (debugLogEnabled) {
|
|
@@ -1691,6 +1691,8 @@ function createFlushEffectsRemove(node, options, runtime2) {
|
|
|
1691
1691
|
if (node.component && meta) {
|
|
1692
1692
|
debug(runtime2, "flush effects callbacks for [%s]", node.getName());
|
|
1693
1693
|
flushEffectCallbacks(meta.effectCallbacks, options.disableEffects, runtime2);
|
|
1694
|
+
debug(runtime2, "flush effects for [%s]", node.getName());
|
|
1695
|
+
flushEffectCallbacks(meta.effectQueueCallbacks, options.disableEffects, runtime2);
|
|
1694
1696
|
}
|
|
1695
1697
|
return changes;
|
|
1696
1698
|
}
|
|
@@ -2807,16 +2809,17 @@ function useQuery(name, defaultValue, watch = true) {
|
|
|
2807
2809
|
const [last, setLast, getLast] = useState(getQueryValue(runtime2, name, defaultValue));
|
|
2808
2810
|
useEffect(function useQueryEffect() {
|
|
2809
2811
|
if (watch) {
|
|
2810
|
-
let
|
|
2812
|
+
let useQueryEffectPathListener2 = function() {
|
|
2811
2813
|
const current = getQueryValue(runtime2, name, defaultValue);
|
|
2812
2814
|
if (getLast() !== current) {
|
|
2813
2815
|
debug(runtime2, "useQuery listener for %s", key);
|
|
2814
2816
|
setLast(current);
|
|
2815
2817
|
}
|
|
2816
2818
|
};
|
|
2817
|
-
|
|
2819
|
+
var useQueryEffectPathListener = useQueryEffectPathListener2;
|
|
2820
|
+
runtime2.addPathListener(useQueryEffectPathListener2);
|
|
2818
2821
|
return function useQueryEffectUnLoad() {
|
|
2819
|
-
runtime2.removePathListener(
|
|
2822
|
+
runtime2.removePathListener(useQueryEffectPathListener2);
|
|
2820
2823
|
};
|
|
2821
2824
|
}
|
|
2822
2825
|
}, []);
|
package/build/jsx.dom.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// ../jsx/build/esm/vdom/log.js
|
|
2
2
|
var debugLogEnabled = false;
|
|
3
3
|
function debug(runtime2, message, ...args) {
|
|
4
4
|
if (debugLogEnabled) {
|
|
@@ -12,7 +12,7 @@ function enableDebugLog() {
|
|
|
12
12
|
debugLogEnabled = true;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
//
|
|
15
|
+
// ../jsx/build/esm/vdom/actions.js
|
|
16
16
|
function createAppendAction(node, runtime2) {
|
|
17
17
|
return {
|
|
18
18
|
isDestructive: true,
|
|
@@ -132,6 +132,8 @@ function createFlushEffectsRemove(node, options, runtime2) {
|
|
|
132
132
|
if (node.component && meta) {
|
|
133
133
|
debug(runtime2, "flush effects callbacks for [%s]", node.getName());
|
|
134
134
|
flushEffectCallbacks(meta.effectCallbacks, options.disableEffects, runtime2);
|
|
135
|
+
debug(runtime2, "flush effects for [%s]", node.getName());
|
|
136
|
+
flushEffectCallbacks(meta.effectQueueCallbacks, options.disableEffects, runtime2);
|
|
135
137
|
}
|
|
136
138
|
return changes;
|
|
137
139
|
}
|
|
@@ -293,7 +295,7 @@ function createSetInnerHTMLAction(node, innerHTML, runtime2) {
|
|
|
293
295
|
};
|
|
294
296
|
}
|
|
295
297
|
|
|
296
|
-
//
|
|
298
|
+
// ../jsx/build/esm/vdom/nodes/base-node.js
|
|
297
299
|
function setDefaultOptions(options) {
|
|
298
300
|
if (defaultOptionsFuse) {
|
|
299
301
|
throw new Error("cannot override default options once and before an element has been created!");
|
|
@@ -409,7 +411,7 @@ function getDefaultOptions() {
|
|
|
409
411
|
return DEFAULT_OPTIONS;
|
|
410
412
|
}
|
|
411
413
|
|
|
412
|
-
//
|
|
414
|
+
// ../jsx/build/esm/jsx.js
|
|
413
415
|
var Fragment = Symbol("Fragment");
|
|
414
416
|
function createElement(tag, attributes, ...children) {
|
|
415
417
|
if (!tag) {
|
|
@@ -462,10 +464,10 @@ objectDefineProperty(JSX, "jsxFragmentFactory", {
|
|
|
462
464
|
});
|
|
463
465
|
Object.freeze(JSX);
|
|
464
466
|
|
|
465
|
-
//
|
|
467
|
+
// ../jsx/build/esm/vdom/types.js
|
|
466
468
|
var CHANGE_TYPES_SET = /* @__PURE__ */ new Set(["FragmentComponent", "Component", "Element", "Ref", "Fragment", "ContextProvider"]);
|
|
467
469
|
|
|
468
|
-
//
|
|
470
|
+
// ../jsx/build/esm/vdom/nodes/context-provider.js
|
|
469
471
|
var ContextProvider = class extends BaseNode {
|
|
470
472
|
constructor(parent) {
|
|
471
473
|
super("ContextProvider", parent);
|
|
@@ -489,7 +491,7 @@ var ContextProvider = class extends BaseNode {
|
|
|
489
491
|
}
|
|
490
492
|
};
|
|
491
493
|
|
|
492
|
-
//
|
|
494
|
+
// ../jsx/build/esm/vdom/nodes/fragment.js
|
|
493
495
|
var Fragment2 = class extends BaseNode {
|
|
494
496
|
constructor(parent) {
|
|
495
497
|
super("Fragment", parent);
|
|
@@ -505,7 +507,7 @@ var Fragment2 = class extends BaseNode {
|
|
|
505
507
|
}
|
|
506
508
|
};
|
|
507
509
|
|
|
508
|
-
//
|
|
510
|
+
// ../jsx/build/esm/component/render.js
|
|
509
511
|
var currentContext = null;
|
|
510
512
|
function useConditional(name) {
|
|
511
513
|
return pushContextCall(currentContext, name);
|
|
@@ -576,7 +578,7 @@ function pushContextCall(context, name) {
|
|
|
576
578
|
return key;
|
|
577
579
|
}
|
|
578
580
|
|
|
579
|
-
//
|
|
581
|
+
// ../jsx/build/esm/vdom/nodes/component-fragment.js
|
|
580
582
|
var FragmentComponent = class extends Fragment2 {
|
|
581
583
|
constructor(parent) {
|
|
582
584
|
super(parent);
|
|
@@ -612,7 +614,7 @@ var FragmentComponent = class extends Fragment2 {
|
|
|
612
614
|
}
|
|
613
615
|
};
|
|
614
616
|
|
|
615
|
-
//
|
|
617
|
+
// ../jsx/build/esm/vdom/nodes/element.js
|
|
616
618
|
var ATTRIBUTES_WITHOUT_VALUE = /* @__PURE__ */ new Set([
|
|
617
619
|
"disabled",
|
|
618
620
|
"checked",
|
|
@@ -743,7 +745,7 @@ var Element = class extends BaseNode {
|
|
|
743
745
|
}
|
|
744
746
|
};
|
|
745
747
|
|
|
746
|
-
//
|
|
748
|
+
// ../jsx/build/esm/vdom/nodes/component.js
|
|
747
749
|
var Component = class extends Element {
|
|
748
750
|
constructor(parent) {
|
|
749
751
|
super(parent);
|
|
@@ -794,7 +796,7 @@ var Component = class extends Element {
|
|
|
794
796
|
}
|
|
795
797
|
};
|
|
796
798
|
|
|
797
|
-
//
|
|
799
|
+
// ../jsx/build/esm/vdom/nodes/ref.js
|
|
798
800
|
var Ref = class extends BaseNode {
|
|
799
801
|
constructor(parent) {
|
|
800
802
|
super("Ref", parent);
|
|
@@ -813,7 +815,7 @@ var Ref = class extends BaseNode {
|
|
|
813
815
|
}
|
|
814
816
|
};
|
|
815
817
|
|
|
816
|
-
//
|
|
818
|
+
// ../jsx/build/esm/vdom/nodes/text.js
|
|
817
819
|
var Text = class extends BaseNode {
|
|
818
820
|
constructor(parent) {
|
|
819
821
|
super("Text", parent);
|
|
@@ -836,7 +838,7 @@ var Text = class extends BaseNode {
|
|
|
836
838
|
}
|
|
837
839
|
};
|
|
838
840
|
|
|
839
|
-
//
|
|
841
|
+
// ../jsx/build/esm/vdom/tree.js
|
|
840
842
|
var Tree = class extends BaseNode {
|
|
841
843
|
name;
|
|
842
844
|
constructor(name, ref, runtime2, shadowInit) {
|
|
@@ -896,7 +898,7 @@ function normalizeChild(runtime2, c) {
|
|
|
896
898
|
};
|
|
897
899
|
}
|
|
898
900
|
|
|
899
|
-
//
|
|
901
|
+
// ../jsx/build/esm/vdom/diff.js
|
|
900
902
|
function diff(abortSignal, tree, changes, actions, options, runtime2, lo = false) {
|
|
901
903
|
if (changes === void 0 || changes === null || abortSignal.aborted) {
|
|
902
904
|
return actions;
|
|
@@ -946,7 +948,7 @@ function areActionDestructive(actions) {
|
|
|
946
948
|
return false;
|
|
947
949
|
}
|
|
948
950
|
|
|
949
|
-
//
|
|
951
|
+
// ../jsx/build/esm/vdom/execute.js
|
|
950
952
|
function execute(abortSignal, runtime2, actions) {
|
|
951
953
|
if (abortSignal.aborted) {
|
|
952
954
|
return 0;
|
|
@@ -979,7 +981,7 @@ function execute(abortSignal, runtime2, actions) {
|
|
|
979
981
|
return changes;
|
|
980
982
|
}
|
|
981
983
|
|
|
982
|
-
//
|
|
984
|
+
// ../jsx/build/esm/vdom/render.js
|
|
983
985
|
function render(runtime2, tree, treeOptions, change, preActions = [], props, children) {
|
|
984
986
|
const meta = tree.state;
|
|
985
987
|
if (!meta) {
|
|
@@ -1004,7 +1006,7 @@ function render(runtime2, tree, treeOptions, change, preActions = [], props, chi
|
|
|
1004
1006
|
}
|
|
1005
1007
|
}
|
|
1006
1008
|
|
|
1007
|
-
//
|
|
1009
|
+
// ../jsx/build/esm/component/container.js
|
|
1008
1010
|
var objectDefineProperty2 = Object.defineProperty;
|
|
1009
1011
|
function createContainer(element, runtime2, args) {
|
|
1010
1012
|
const name = `DOMContainer [${String(element)}]`;
|
|
@@ -1048,7 +1050,7 @@ function createContainer(element, runtime2, args) {
|
|
|
1048
1050
|
return container;
|
|
1049
1051
|
}
|
|
1050
1052
|
|
|
1051
|
-
//
|
|
1053
|
+
// ../jsx/build/esm/hooks/runtime.js
|
|
1052
1054
|
function useRuntime() {
|
|
1053
1055
|
useConditional("useRuntime");
|
|
1054
1056
|
const currentContext2 = useRenderContext();
|
|
@@ -1058,7 +1060,7 @@ function useRuntime() {
|
|
|
1058
1060
|
return currentContext2.runtime;
|
|
1059
1061
|
}
|
|
1060
1062
|
|
|
1061
|
-
//
|
|
1063
|
+
// ../jsx/build/esm/hooks/refresh.js
|
|
1062
1064
|
var REFRESH_TIMEOUT_MS = 0;
|
|
1063
1065
|
function useRefresh() {
|
|
1064
1066
|
useConditional("useRefresh");
|
|
@@ -1095,7 +1097,7 @@ function useRefresh() {
|
|
|
1095
1097
|
};
|
|
1096
1098
|
}
|
|
1097
1099
|
|
|
1098
|
-
//
|
|
1100
|
+
// ../jsx/build/esm/hooks/state.js
|
|
1099
1101
|
function useState(defaultValue) {
|
|
1100
1102
|
const key = useConditional("useState");
|
|
1101
1103
|
const currentContext2 = useRenderContext();
|
|
@@ -1147,7 +1149,7 @@ function useState(defaultValue) {
|
|
|
1147
1149
|
}
|
|
1148
1150
|
}
|
|
1149
1151
|
|
|
1150
|
-
//
|
|
1152
|
+
// ../jsx/build/esm/hooks/effect.js
|
|
1151
1153
|
function useEffect(effect, condition) {
|
|
1152
1154
|
const currentContext2 = useRenderContext();
|
|
1153
1155
|
if (!currentContext2) {
|
|
@@ -1193,7 +1195,7 @@ function equalArray(a, c) {
|
|
|
1193
1195
|
return true;
|
|
1194
1196
|
}
|
|
1195
1197
|
|
|
1196
|
-
//
|
|
1198
|
+
// ../jsx/build/esm/hooks/pathname.js
|
|
1197
1199
|
function usePathname() {
|
|
1198
1200
|
const runtime2 = useRuntime();
|
|
1199
1201
|
const pathname = runtime2.getLocation().pathname;
|
|
@@ -1212,7 +1214,7 @@ function usePathname() {
|
|
|
1212
1214
|
return String(currentLocation);
|
|
1213
1215
|
}
|
|
1214
1216
|
|
|
1215
|
-
//
|
|
1217
|
+
// ../jsx/build/esm/component/router.js
|
|
1216
1218
|
function useIsLocationPathNameActive(path) {
|
|
1217
1219
|
useConditional("useIsLocationPathNameMatch");
|
|
1218
1220
|
const runtime2 = useRuntime();
|
|
@@ -1286,7 +1288,7 @@ function normalizePath(path) {
|
|
|
1286
1288
|
return path;
|
|
1287
1289
|
}
|
|
1288
1290
|
|
|
1289
|
-
//
|
|
1291
|
+
// ../jsx/build/esm/hooks/ref.js
|
|
1290
1292
|
function useRef() {
|
|
1291
1293
|
const [ref, setRef] = useState(null);
|
|
1292
1294
|
function useRefFunction(newRef) {
|
|
@@ -1297,23 +1299,24 @@ function useRef() {
|
|
|
1297
1299
|
return useRefFunction;
|
|
1298
1300
|
}
|
|
1299
1301
|
|
|
1300
|
-
//
|
|
1302
|
+
// ../jsx/build/esm/hooks/query.js
|
|
1301
1303
|
function useAllQuery(watch = true) {
|
|
1302
1304
|
const key = useConditional(`useAllQuery`);
|
|
1303
1305
|
const runtime2 = useRuntime();
|
|
1304
1306
|
const [last, setLast, getLast] = useState(getQueryValue(runtime2));
|
|
1305
1307
|
useEffect(function useQueryEffect() {
|
|
1306
1308
|
if (watch) {
|
|
1307
|
-
let
|
|
1309
|
+
let useQueryEffectPathListener2 = function() {
|
|
1308
1310
|
const current = getQueryValue(runtime2);
|
|
1309
1311
|
if (getLast() !== current) {
|
|
1310
1312
|
debug(runtime2, "useQuery listener for %s", key);
|
|
1311
1313
|
setLast(current);
|
|
1312
1314
|
}
|
|
1313
1315
|
};
|
|
1314
|
-
|
|
1316
|
+
var useQueryEffectPathListener = useQueryEffectPathListener2;
|
|
1317
|
+
runtime2.addPathListener(useQueryEffectPathListener2);
|
|
1315
1318
|
return function useQueryEffectUnLoad() {
|
|
1316
|
-
runtime2.removePathListener(
|
|
1319
|
+
runtime2.removePathListener(useQueryEffectPathListener2);
|
|
1317
1320
|
};
|
|
1318
1321
|
}
|
|
1319
1322
|
}, []);
|
|
@@ -1325,16 +1328,17 @@ function useQuery(name, defaultValue, watch = true) {
|
|
|
1325
1328
|
const [last, setLast, getLast] = useState(getQueryValue(runtime2, name, defaultValue));
|
|
1326
1329
|
useEffect(function useQueryEffect() {
|
|
1327
1330
|
if (watch) {
|
|
1328
|
-
let
|
|
1331
|
+
let useQueryEffectPathListener2 = function() {
|
|
1329
1332
|
const current = getQueryValue(runtime2, name, defaultValue);
|
|
1330
1333
|
if (getLast() !== current) {
|
|
1331
1334
|
debug(runtime2, "useQuery listener for %s", key);
|
|
1332
1335
|
setLast(current);
|
|
1333
1336
|
}
|
|
1334
1337
|
};
|
|
1335
|
-
|
|
1338
|
+
var useQueryEffectPathListener = useQueryEffectPathListener2;
|
|
1339
|
+
runtime2.addPathListener(useQueryEffectPathListener2);
|
|
1336
1340
|
return function useQueryEffectUnLoad() {
|
|
1337
|
-
runtime2.removePathListener(
|
|
1341
|
+
runtime2.removePathListener(useQueryEffectPathListener2);
|
|
1338
1342
|
};
|
|
1339
1343
|
}
|
|
1340
1344
|
}, []);
|
|
@@ -1377,7 +1381,7 @@ function setQueryValue(runtime2, name, value, watch = true) {
|
|
|
1377
1381
|
}
|
|
1378
1382
|
}
|
|
1379
1383
|
|
|
1380
|
-
//
|
|
1384
|
+
// ../jsx/build/esm/hooks/useelement.js
|
|
1381
1385
|
function useElement() {
|
|
1382
1386
|
useConditional("useElement");
|
|
1383
1387
|
const currentContext2 = useRenderContext();
|
|
@@ -1387,7 +1391,7 @@ function useElement() {
|
|
|
1387
1391
|
return currentContext2.node.ref ? currentContext2.node.ref : null;
|
|
1388
1392
|
}
|
|
1389
1393
|
|
|
1390
|
-
//
|
|
1394
|
+
// ../jsx/build/esm/hooks/context.js
|
|
1391
1395
|
function createContext(defaultValue) {
|
|
1392
1396
|
const symbol = Symbol();
|
|
1393
1397
|
return {
|
package/build/lib.cjs
CHANGED
|
@@ -9405,7 +9405,7 @@ var CONTENT_TYPE_MAP = {
|
|
|
9405
9405
|
".7z": "application/x-7z-compressed"
|
|
9406
9406
|
};
|
|
9407
9407
|
|
|
9408
|
-
//
|
|
9408
|
+
// ../jsx/build/esm/vdom/log.js
|
|
9409
9409
|
var debugLogEnabled = false;
|
|
9410
9410
|
function debug(runtime, message2, ...args) {
|
|
9411
9411
|
if (debugLogEnabled) {
|
|
@@ -9419,7 +9419,7 @@ function enableDebugLog() {
|
|
|
9419
9419
|
debugLogEnabled = true;
|
|
9420
9420
|
}
|
|
9421
9421
|
|
|
9422
|
-
//
|
|
9422
|
+
// ../jsx/build/esm/vdom/actions.js
|
|
9423
9423
|
function createAppendAction(node, runtime) {
|
|
9424
9424
|
return {
|
|
9425
9425
|
isDestructive: true,
|
|
@@ -9539,6 +9539,8 @@ function createFlushEffectsRemove(node, options, runtime) {
|
|
|
9539
9539
|
if (node.component && meta) {
|
|
9540
9540
|
debug(runtime, "flush effects callbacks for [%s]", node.getName());
|
|
9541
9541
|
flushEffectCallbacks(meta.effectCallbacks, options.disableEffects, runtime);
|
|
9542
|
+
debug(runtime, "flush effects for [%s]", node.getName());
|
|
9543
|
+
flushEffectCallbacks(meta.effectQueueCallbacks, options.disableEffects, runtime);
|
|
9542
9544
|
}
|
|
9543
9545
|
return changes;
|
|
9544
9546
|
}
|
|
@@ -9700,7 +9702,7 @@ function createSetInnerHTMLAction(node, innerHTML, runtime) {
|
|
|
9700
9702
|
};
|
|
9701
9703
|
}
|
|
9702
9704
|
|
|
9703
|
-
//
|
|
9705
|
+
// ../jsx/build/esm/vdom/nodes/base-node.js
|
|
9704
9706
|
var BaseNode = class {
|
|
9705
9707
|
type;
|
|
9706
9708
|
parent;
|
|
@@ -9808,7 +9810,7 @@ function getDefaultOptions() {
|
|
|
9808
9810
|
return DEFAULT_OPTIONS;
|
|
9809
9811
|
}
|
|
9810
9812
|
|
|
9811
|
-
//
|
|
9813
|
+
// ../jsx/build/esm/jsx.js
|
|
9812
9814
|
var Fragment = Symbol("Fragment");
|
|
9813
9815
|
function createElement(tag2, attributes, ...children) {
|
|
9814
9816
|
if (!tag2) {
|
|
@@ -9861,10 +9863,10 @@ objectDefineProperty(JSX, "jsxFragmentFactory", {
|
|
|
9861
9863
|
});
|
|
9862
9864
|
Object.freeze(JSX);
|
|
9863
9865
|
|
|
9864
|
-
//
|
|
9866
|
+
// ../jsx/build/esm/vdom/types.js
|
|
9865
9867
|
var CHANGE_TYPES_SET = /* @__PURE__ */ new Set(["FragmentComponent", "Component", "Element", "Ref", "Fragment", "ContextProvider"]);
|
|
9866
9868
|
|
|
9867
|
-
//
|
|
9869
|
+
// ../jsx/build/esm/vdom/nodes/context-provider.js
|
|
9868
9870
|
var ContextProvider = class extends BaseNode {
|
|
9869
9871
|
constructor(parent) {
|
|
9870
9872
|
super("ContextProvider", parent);
|
|
@@ -9888,7 +9890,7 @@ var ContextProvider = class extends BaseNode {
|
|
|
9888
9890
|
}
|
|
9889
9891
|
};
|
|
9890
9892
|
|
|
9891
|
-
//
|
|
9893
|
+
// ../jsx/build/esm/vdom/nodes/fragment.js
|
|
9892
9894
|
var Fragment2 = class extends BaseNode {
|
|
9893
9895
|
constructor(parent) {
|
|
9894
9896
|
super("Fragment", parent);
|
|
@@ -9904,7 +9906,7 @@ var Fragment2 = class extends BaseNode {
|
|
|
9904
9906
|
}
|
|
9905
9907
|
};
|
|
9906
9908
|
|
|
9907
|
-
//
|
|
9909
|
+
// ../jsx/build/esm/component/render.js
|
|
9908
9910
|
var currentContext = null;
|
|
9909
9911
|
function useConditional(name) {
|
|
9910
9912
|
return pushContextCall(currentContext, name);
|
|
@@ -9975,7 +9977,7 @@ function pushContextCall(context, name) {
|
|
|
9975
9977
|
return key;
|
|
9976
9978
|
}
|
|
9977
9979
|
|
|
9978
|
-
//
|
|
9980
|
+
// ../jsx/build/esm/vdom/nodes/component-fragment.js
|
|
9979
9981
|
var FragmentComponent = class extends Fragment2 {
|
|
9980
9982
|
constructor(parent) {
|
|
9981
9983
|
super(parent);
|
|
@@ -10011,7 +10013,7 @@ var FragmentComponent = class extends Fragment2 {
|
|
|
10011
10013
|
}
|
|
10012
10014
|
};
|
|
10013
10015
|
|
|
10014
|
-
//
|
|
10016
|
+
// ../jsx/build/esm/vdom/nodes/element.js
|
|
10015
10017
|
var ATTRIBUTES_WITHOUT_VALUE = /* @__PURE__ */ new Set([
|
|
10016
10018
|
"disabled",
|
|
10017
10019
|
"checked",
|
|
@@ -10142,7 +10144,7 @@ var Element = class extends BaseNode {
|
|
|
10142
10144
|
}
|
|
10143
10145
|
};
|
|
10144
10146
|
|
|
10145
|
-
//
|
|
10147
|
+
// ../jsx/build/esm/vdom/nodes/component.js
|
|
10146
10148
|
var Component = class extends Element {
|
|
10147
10149
|
constructor(parent) {
|
|
10148
10150
|
super(parent);
|
|
@@ -10193,7 +10195,7 @@ var Component = class extends Element {
|
|
|
10193
10195
|
}
|
|
10194
10196
|
};
|
|
10195
10197
|
|
|
10196
|
-
//
|
|
10198
|
+
// ../jsx/build/esm/vdom/nodes/ref.js
|
|
10197
10199
|
var Ref = class extends BaseNode {
|
|
10198
10200
|
constructor(parent) {
|
|
10199
10201
|
super("Ref", parent);
|
|
@@ -10212,7 +10214,7 @@ var Ref = class extends BaseNode {
|
|
|
10212
10214
|
}
|
|
10213
10215
|
};
|
|
10214
10216
|
|
|
10215
|
-
//
|
|
10217
|
+
// ../jsx/build/esm/vdom/nodes/text.js
|
|
10216
10218
|
var Text = class extends BaseNode {
|
|
10217
10219
|
constructor(parent) {
|
|
10218
10220
|
super("Text", parent);
|
|
@@ -10235,7 +10237,7 @@ var Text = class extends BaseNode {
|
|
|
10235
10237
|
}
|
|
10236
10238
|
};
|
|
10237
10239
|
|
|
10238
|
-
//
|
|
10240
|
+
// ../jsx/build/esm/vdom/tree.js
|
|
10239
10241
|
var Tree = class extends BaseNode {
|
|
10240
10242
|
name;
|
|
10241
10243
|
constructor(name, ref, runtime, shadowInit) {
|
|
@@ -10295,7 +10297,7 @@ function normalizeChild(runtime, c) {
|
|
|
10295
10297
|
};
|
|
10296
10298
|
}
|
|
10297
10299
|
|
|
10298
|
-
//
|
|
10300
|
+
// ../jsx/build/esm/vdom/diff.js
|
|
10299
10301
|
function diff(abortSignal, tree, changes, actions, options, runtime, lo = false) {
|
|
10300
10302
|
if (changes === void 0 || changes === null || abortSignal.aborted) {
|
|
10301
10303
|
return actions;
|
|
@@ -10345,7 +10347,7 @@ function areActionDestructive(actions) {
|
|
|
10345
10347
|
return false;
|
|
10346
10348
|
}
|
|
10347
10349
|
|
|
10348
|
-
//
|
|
10350
|
+
// ../jsx/build/esm/vdom/execute.js
|
|
10349
10351
|
function execute(abortSignal, runtime, actions) {
|
|
10350
10352
|
if (abortSignal.aborted) {
|
|
10351
10353
|
return 0;
|
|
@@ -10378,7 +10380,7 @@ function execute(abortSignal, runtime, actions) {
|
|
|
10378
10380
|
return changes;
|
|
10379
10381
|
}
|
|
10380
10382
|
|
|
10381
|
-
//
|
|
10383
|
+
// ../jsx/build/esm/vdom/render.js
|
|
10382
10384
|
function render(runtime, tree, treeOptions, change, preActions = [], props, children) {
|
|
10383
10385
|
const meta = tree.state;
|
|
10384
10386
|
if (!meta) {
|
|
@@ -10403,7 +10405,7 @@ function render(runtime, tree, treeOptions, change, preActions = [], props, chil
|
|
|
10403
10405
|
}
|
|
10404
10406
|
}
|
|
10405
10407
|
|
|
10406
|
-
//
|
|
10408
|
+
// ../jsx/build/esm/component/container.js
|
|
10407
10409
|
var objectDefineProperty2 = Object.defineProperty;
|
|
10408
10410
|
function createContainer(element, runtime, args) {
|
|
10409
10411
|
const name = `DOMContainer [${String(element)}]`;
|
|
@@ -10447,7 +10449,7 @@ function createContainer(element, runtime, args) {
|
|
|
10447
10449
|
return container;
|
|
10448
10450
|
}
|
|
10449
10451
|
|
|
10450
|
-
//
|
|
10452
|
+
// ../jsx/build/esm/hooks/runtime.js
|
|
10451
10453
|
function useRuntime() {
|
|
10452
10454
|
useConditional("useRuntime");
|
|
10453
10455
|
const currentContext2 = useRenderContext();
|
|
@@ -10457,7 +10459,7 @@ function useRuntime() {
|
|
|
10457
10459
|
return currentContext2.runtime;
|
|
10458
10460
|
}
|
|
10459
10461
|
|
|
10460
|
-
//
|
|
10462
|
+
// ../jsx/build/esm/hooks/refresh.js
|
|
10461
10463
|
var REFRESH_TIMEOUT_MS = 0;
|
|
10462
10464
|
function useRefresh() {
|
|
10463
10465
|
useConditional("useRefresh");
|
|
@@ -10494,7 +10496,7 @@ function useRefresh() {
|
|
|
10494
10496
|
};
|
|
10495
10497
|
}
|
|
10496
10498
|
|
|
10497
|
-
//
|
|
10499
|
+
// ../jsx/build/esm/hooks/state.js
|
|
10498
10500
|
function useState(defaultValue) {
|
|
10499
10501
|
const key = useConditional("useState");
|
|
10500
10502
|
const currentContext2 = useRenderContext();
|
|
@@ -10546,7 +10548,7 @@ function useState(defaultValue) {
|
|
|
10546
10548
|
}
|
|
10547
10549
|
}
|
|
10548
10550
|
|
|
10549
|
-
//
|
|
10551
|
+
// ../jsx/build/esm/hooks/effect.js
|
|
10550
10552
|
function useEffect(effect, condition) {
|
|
10551
10553
|
const currentContext2 = useRenderContext();
|
|
10552
10554
|
if (!currentContext2) {
|
|
@@ -10592,7 +10594,7 @@ function equalArray(a, c) {
|
|
|
10592
10594
|
return true;
|
|
10593
10595
|
}
|
|
10594
10596
|
|
|
10595
|
-
//
|
|
10597
|
+
// ../jsx/build/esm/hooks/pathname.js
|
|
10596
10598
|
function usePathname() {
|
|
10597
10599
|
const runtime = useRuntime();
|
|
10598
10600
|
const pathname = runtime.getLocation().pathname;
|
|
@@ -10611,7 +10613,7 @@ function usePathname() {
|
|
|
10611
10613
|
return String(currentLocation);
|
|
10612
10614
|
}
|
|
10613
10615
|
|
|
10614
|
-
//
|
|
10616
|
+
// ../jsx/build/esm/component/router.js
|
|
10615
10617
|
function useIsLocationPathNameActive(path) {
|
|
10616
10618
|
useConditional("useIsLocationPathNameMatch");
|
|
10617
10619
|
const runtime = useRuntime();
|
|
@@ -10685,7 +10687,7 @@ function normalizePath2(path) {
|
|
|
10685
10687
|
return path;
|
|
10686
10688
|
}
|
|
10687
10689
|
|
|
10688
|
-
//
|
|
10690
|
+
// ../jsx/build/esm/hooks/ref.js
|
|
10689
10691
|
function useRef() {
|
|
10690
10692
|
const [ref, setRef] = useState(null);
|
|
10691
10693
|
function useRefFunction(newRef) {
|
|
@@ -10696,23 +10698,24 @@ function useRef() {
|
|
|
10696
10698
|
return useRefFunction;
|
|
10697
10699
|
}
|
|
10698
10700
|
|
|
10699
|
-
//
|
|
10701
|
+
// ../jsx/build/esm/hooks/query.js
|
|
10700
10702
|
function useQuery(name, defaultValue, watch2 = true) {
|
|
10701
10703
|
const key = useConditional(`useQuery-${name}-${defaultValue}`);
|
|
10702
10704
|
const runtime = useRuntime();
|
|
10703
10705
|
const [last, setLast, getLast] = useState(getQueryValue(runtime, name, defaultValue));
|
|
10704
10706
|
useEffect(function useQueryEffect() {
|
|
10705
10707
|
if (watch2) {
|
|
10706
|
-
let
|
|
10708
|
+
let useQueryEffectPathListener2 = function() {
|
|
10707
10709
|
const current = getQueryValue(runtime, name, defaultValue);
|
|
10708
10710
|
if (getLast() !== current) {
|
|
10709
10711
|
debug(runtime, "useQuery listener for %s", key);
|
|
10710
10712
|
setLast(current);
|
|
10711
10713
|
}
|
|
10712
10714
|
};
|
|
10713
|
-
|
|
10715
|
+
var useQueryEffectPathListener = useQueryEffectPathListener2;
|
|
10716
|
+
runtime.addPathListener(useQueryEffectPathListener2);
|
|
10714
10717
|
return function useQueryEffectUnLoad() {
|
|
10715
|
-
runtime.removePathListener(
|
|
10718
|
+
runtime.removePathListener(useQueryEffectPathListener2);
|
|
10716
10719
|
};
|
|
10717
10720
|
}
|
|
10718
10721
|
}, []);
|
|
@@ -10755,7 +10758,7 @@ function setQueryValue(runtime, name, value, watch2 = true) {
|
|
|
10755
10758
|
}
|
|
10756
10759
|
}
|
|
10757
10760
|
|
|
10758
|
-
//
|
|
10761
|
+
// ../jsx/build/esm/hooks/useelement.js
|
|
10759
10762
|
function useElement() {
|
|
10760
10763
|
useConditional("useElement");
|
|
10761
10764
|
const currentContext2 = useRenderContext();
|
|
@@ -10765,7 +10768,7 @@ function useElement() {
|
|
|
10765
10768
|
return currentContext2.node.ref ? currentContext2.node.ref : null;
|
|
10766
10769
|
}
|
|
10767
10770
|
|
|
10768
|
-
//
|
|
10771
|
+
// ../jsx/build/esm/hooks/context.js
|
|
10769
10772
|
function createContext(defaultValue) {
|
|
10770
10773
|
const symbol = Symbol();
|
|
10771
10774
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "miqro",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/esm/src/lib.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"pretest": "npm run build",
|
|
12
12
|
"test": "BROWSER=none node --enable-source-maps --test test/cases/*.test.js",
|
|
13
13
|
"coverage": "BROWSER=none node --enable-source-maps --experimental-test-coverage --test test/cases/*.test.js",
|
|
14
|
-
"
|
|
14
|
+
"prepare2": "npm run build",
|
|
15
15
|
"release:package": "sh sea/release-tar.sh",
|
|
16
16
|
"prerelease:package": "npm run compile",
|
|
17
17
|
"prebuild": "rm -Rf build/;",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@miqro/core": "^5.0.15",
|
|
47
|
-
"@miqro/jsx": "^1.0.
|
|
48
|
-
"@miqro/jsx-dom": "^1.0.
|
|
49
|
-
"@miqro/jsx-node": "^1.0.
|
|
47
|
+
"@miqro/jsx": "^1.0.1",
|
|
48
|
+
"@miqro/jsx-dom": "^1.0.4",
|
|
49
|
+
"@miqro/jsx-node": "^1.0.6",
|
|
50
50
|
"@miqro/parser": "^2.0.4",
|
|
51
51
|
"@miqro/query": "^0.0.4",
|
|
52
52
|
"@miqro/runner": "^2.0.1",
|