miqro 6.2.11 → 6.2.13
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 +4 -5
- package/build/esm/src/common/arguments.d.ts +2 -0
- package/build/esm/src/common/arguments.js +31 -1
- package/build/esm/src/common/fs.d.ts +6 -0
- package/build/esm/src/common/fs.js +69 -0
- package/build/esm/src/common/help.d.ts +1 -1
- package/build/esm/src/common/help.js +1 -0
- package/build/esm/src/common/jsx.js +22 -22
- package/build/esm/src/inflate/inflate-sea.js +17 -2
- package/build/esm/src/inflate/inflate.d.ts +2 -1
- package/build/esm/src/inflate/inflate.js +2 -2
- package/build/esm/src/inflate/setup-http.d.ts +1 -1
- package/build/esm/src/inflate/setup-http.js +125 -89
- package/build/esm/src/main.js +13 -5
- package/build/esm/src/services/app.d.ts +1 -0
- package/build/esm/src/services/app.js +3 -1
- package/build/jsx.dom.js +34 -36
- package/build/lib.cjs +343 -225
- package/package.json +1 -1
- package/sea/basic-compile.base64.sh +1 -1
- package/sea/basic-compile.sh +1 -1
- package/src/common/arguments.ts +34 -1
- package/src/common/fs.ts +65 -0
- package/src/common/help.ts +1 -0
- package/src/common/jsx.ts +22 -22
- package/src/inflate/inflate-sea.ts +18 -2
- package/src/inflate/inflate.ts +3 -2
- package/src/inflate/setup-http.ts +127 -91
- package/src/main.ts +13 -5
- package/src/services/app.ts +4 -1
package/build/jsx.dom.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// node_modules/@miqro/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
|
+
// node_modules/@miqro/jsx/build/esm/vdom/actions.js
|
|
16
16
|
function createAppendAction(node, runtime2) {
|
|
17
17
|
return {
|
|
18
18
|
isDestructive: true,
|
|
@@ -295,7 +295,7 @@ function createSetInnerHTMLAction(node, innerHTML, runtime2) {
|
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
//
|
|
298
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/base-node.js
|
|
299
299
|
function setDefaultOptions(options) {
|
|
300
300
|
if (defaultOptionsFuse) {
|
|
301
301
|
throw new Error("cannot override default options once and before an element has been created!");
|
|
@@ -411,7 +411,7 @@ function getDefaultOptions() {
|
|
|
411
411
|
return DEFAULT_OPTIONS;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
-
//
|
|
414
|
+
// node_modules/@miqro/jsx/build/esm/jsx.js
|
|
415
415
|
var Fragment = Symbol("Fragment");
|
|
416
416
|
function createElement(tag, attributes, ...children) {
|
|
417
417
|
if (!tag) {
|
|
@@ -464,10 +464,10 @@ objectDefineProperty(JSX, "jsxFragmentFactory", {
|
|
|
464
464
|
});
|
|
465
465
|
Object.freeze(JSX);
|
|
466
466
|
|
|
467
|
-
//
|
|
467
|
+
// node_modules/@miqro/jsx/build/esm/vdom/types.js
|
|
468
468
|
var CHANGE_TYPES_SET = /* @__PURE__ */ new Set(["FragmentComponent", "Component", "Element", "Ref", "Fragment", "ContextProvider"]);
|
|
469
469
|
|
|
470
|
-
//
|
|
470
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/context-provider.js
|
|
471
471
|
var ContextProvider = class extends BaseNode {
|
|
472
472
|
constructor(parent) {
|
|
473
473
|
super("ContextProvider", parent);
|
|
@@ -491,7 +491,7 @@ var ContextProvider = class extends BaseNode {
|
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
493
|
|
|
494
|
-
//
|
|
494
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/fragment.js
|
|
495
495
|
var Fragment2 = class extends BaseNode {
|
|
496
496
|
constructor(parent) {
|
|
497
497
|
super("Fragment", parent);
|
|
@@ -507,7 +507,7 @@ var Fragment2 = class extends BaseNode {
|
|
|
507
507
|
}
|
|
508
508
|
};
|
|
509
509
|
|
|
510
|
-
//
|
|
510
|
+
// node_modules/@miqro/jsx/build/esm/component/render.js
|
|
511
511
|
var currentContext = null;
|
|
512
512
|
function useConditional(name) {
|
|
513
513
|
return pushContextCall(currentContext, name);
|
|
@@ -578,7 +578,7 @@ function pushContextCall(context, name) {
|
|
|
578
578
|
return key;
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
//
|
|
581
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/component-fragment.js
|
|
582
582
|
var FragmentComponent = class extends Fragment2 {
|
|
583
583
|
constructor(parent) {
|
|
584
584
|
super(parent);
|
|
@@ -614,7 +614,7 @@ var FragmentComponent = class extends Fragment2 {
|
|
|
614
614
|
}
|
|
615
615
|
};
|
|
616
616
|
|
|
617
|
-
//
|
|
617
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/element.js
|
|
618
618
|
var ATTRIBUTES_WITHOUT_VALUE = /* @__PURE__ */ new Set([
|
|
619
619
|
"disabled",
|
|
620
620
|
"checked",
|
|
@@ -745,7 +745,7 @@ var Element = class extends BaseNode {
|
|
|
745
745
|
}
|
|
746
746
|
};
|
|
747
747
|
|
|
748
|
-
//
|
|
748
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/component.js
|
|
749
749
|
var Component = class extends Element {
|
|
750
750
|
constructor(parent) {
|
|
751
751
|
super(parent);
|
|
@@ -796,7 +796,7 @@ var Component = class extends Element {
|
|
|
796
796
|
}
|
|
797
797
|
};
|
|
798
798
|
|
|
799
|
-
//
|
|
799
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/ref.js
|
|
800
800
|
var Ref = class extends BaseNode {
|
|
801
801
|
constructor(parent) {
|
|
802
802
|
super("Ref", parent);
|
|
@@ -815,7 +815,7 @@ var Ref = class extends BaseNode {
|
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
817
|
|
|
818
|
-
//
|
|
818
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/text.js
|
|
819
819
|
var Text = class extends BaseNode {
|
|
820
820
|
constructor(parent) {
|
|
821
821
|
super("Text", parent);
|
|
@@ -838,7 +838,7 @@ var Text = class extends BaseNode {
|
|
|
838
838
|
}
|
|
839
839
|
};
|
|
840
840
|
|
|
841
|
-
//
|
|
841
|
+
// node_modules/@miqro/jsx/build/esm/vdom/tree.js
|
|
842
842
|
var Tree = class extends BaseNode {
|
|
843
843
|
name;
|
|
844
844
|
constructor(name, ref, runtime2, shadowInit) {
|
|
@@ -898,7 +898,7 @@ function normalizeChild(runtime2, c) {
|
|
|
898
898
|
};
|
|
899
899
|
}
|
|
900
900
|
|
|
901
|
-
//
|
|
901
|
+
// node_modules/@miqro/jsx/build/esm/vdom/diff.js
|
|
902
902
|
function diff(abortSignal, tree, changes, actions, options, runtime2, lo = false) {
|
|
903
903
|
if (changes === void 0 || changes === null || abortSignal.aborted) {
|
|
904
904
|
return actions;
|
|
@@ -948,7 +948,7 @@ function areActionDestructive(actions) {
|
|
|
948
948
|
return false;
|
|
949
949
|
}
|
|
950
950
|
|
|
951
|
-
//
|
|
951
|
+
// node_modules/@miqro/jsx/build/esm/vdom/execute.js
|
|
952
952
|
function execute(abortSignal, runtime2, actions) {
|
|
953
953
|
if (abortSignal.aborted) {
|
|
954
954
|
return 0;
|
|
@@ -981,7 +981,7 @@ function execute(abortSignal, runtime2, actions) {
|
|
|
981
981
|
return changes;
|
|
982
982
|
}
|
|
983
983
|
|
|
984
|
-
//
|
|
984
|
+
// node_modules/@miqro/jsx/build/esm/vdom/render.js
|
|
985
985
|
function render(runtime2, tree, treeOptions, change, preActions = [], props, children) {
|
|
986
986
|
const meta = tree.state;
|
|
987
987
|
if (!meta) {
|
|
@@ -1006,7 +1006,7 @@ function render(runtime2, tree, treeOptions, change, preActions = [], props, chi
|
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
|
|
1009
|
-
//
|
|
1009
|
+
// node_modules/@miqro/jsx/build/esm/component/container.js
|
|
1010
1010
|
var objectDefineProperty2 = Object.defineProperty;
|
|
1011
1011
|
function createContainer(element, runtime2, args) {
|
|
1012
1012
|
const name = `DOMContainer [${String(element)}]`;
|
|
@@ -1050,7 +1050,7 @@ function createContainer(element, runtime2, args) {
|
|
|
1050
1050
|
return container;
|
|
1051
1051
|
}
|
|
1052
1052
|
|
|
1053
|
-
//
|
|
1053
|
+
// node_modules/@miqro/jsx/build/esm/hooks/runtime.js
|
|
1054
1054
|
function useRuntime() {
|
|
1055
1055
|
useConditional("useRuntime");
|
|
1056
1056
|
const currentContext2 = useRenderContext();
|
|
@@ -1060,7 +1060,7 @@ function useRuntime() {
|
|
|
1060
1060
|
return currentContext2.runtime;
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
|
-
//
|
|
1063
|
+
// node_modules/@miqro/jsx/build/esm/hooks/refresh.js
|
|
1064
1064
|
var REFRESH_TIMEOUT_MS = 0;
|
|
1065
1065
|
function useRefresh() {
|
|
1066
1066
|
useConditional("useRefresh");
|
|
@@ -1097,7 +1097,7 @@ function useRefresh() {
|
|
|
1097
1097
|
};
|
|
1098
1098
|
}
|
|
1099
1099
|
|
|
1100
|
-
//
|
|
1100
|
+
// node_modules/@miqro/jsx/build/esm/hooks/state.js
|
|
1101
1101
|
function useState(defaultValue) {
|
|
1102
1102
|
const key = useConditional("useState");
|
|
1103
1103
|
const currentContext2 = useRenderContext();
|
|
@@ -1149,7 +1149,7 @@ function useState(defaultValue) {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
|
-
//
|
|
1152
|
+
// node_modules/@miqro/jsx/build/esm/hooks/effect.js
|
|
1153
1153
|
function useEffect(effect, condition) {
|
|
1154
1154
|
const currentContext2 = useRenderContext();
|
|
1155
1155
|
if (!currentContext2) {
|
|
@@ -1195,7 +1195,7 @@ function equalArray(a, c) {
|
|
|
1195
1195
|
return true;
|
|
1196
1196
|
}
|
|
1197
1197
|
|
|
1198
|
-
//
|
|
1198
|
+
// node_modules/@miqro/jsx/build/esm/hooks/pathname.js
|
|
1199
1199
|
function usePathname() {
|
|
1200
1200
|
const runtime2 = useRuntime();
|
|
1201
1201
|
const pathname = runtime2.getLocation().pathname;
|
|
@@ -1214,7 +1214,7 @@ function usePathname() {
|
|
|
1214
1214
|
return String(currentLocation);
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
|
-
//
|
|
1217
|
+
// node_modules/@miqro/jsx/build/esm/component/router.js
|
|
1218
1218
|
function useIsLocationPathNameActive(path) {
|
|
1219
1219
|
useConditional("useIsLocationPathNameMatch");
|
|
1220
1220
|
const runtime2 = useRuntime();
|
|
@@ -1288,7 +1288,7 @@ function normalizePath(path) {
|
|
|
1288
1288
|
return path;
|
|
1289
1289
|
}
|
|
1290
1290
|
|
|
1291
|
-
//
|
|
1291
|
+
// node_modules/@miqro/jsx/build/esm/hooks/ref.js
|
|
1292
1292
|
function useRef() {
|
|
1293
1293
|
const [ref, setRef] = useState(null);
|
|
1294
1294
|
function useRefFunction(newRef) {
|
|
@@ -1299,24 +1299,23 @@ function useRef() {
|
|
|
1299
1299
|
return useRefFunction;
|
|
1300
1300
|
}
|
|
1301
1301
|
|
|
1302
|
-
//
|
|
1302
|
+
// node_modules/@miqro/jsx/build/esm/hooks/query.js
|
|
1303
1303
|
function useAllQuery(watch = true) {
|
|
1304
1304
|
const key = useConditional(`useAllQuery`);
|
|
1305
1305
|
const runtime2 = useRuntime();
|
|
1306
1306
|
const [last, setLast, getLast] = useState(getQueryValue(runtime2));
|
|
1307
1307
|
useEffect(function useQueryEffect() {
|
|
1308
1308
|
if (watch) {
|
|
1309
|
-
let
|
|
1309
|
+
let useQueryEffectPathListener = function() {
|
|
1310
1310
|
const current = getQueryValue(runtime2);
|
|
1311
1311
|
if (getLast() !== current) {
|
|
1312
1312
|
debug(runtime2, "useQuery listener for %s", key);
|
|
1313
1313
|
setLast(current);
|
|
1314
1314
|
}
|
|
1315
1315
|
};
|
|
1316
|
-
|
|
1317
|
-
runtime2.addPathListener(useQueryEffectPathListener2);
|
|
1316
|
+
runtime2.addPathListener(useQueryEffectPathListener);
|
|
1318
1317
|
return function useQueryEffectUnLoad() {
|
|
1319
|
-
runtime2.removePathListener(
|
|
1318
|
+
runtime2.removePathListener(useQueryEffectPathListener);
|
|
1320
1319
|
};
|
|
1321
1320
|
}
|
|
1322
1321
|
}, []);
|
|
@@ -1328,17 +1327,16 @@ function useQuery(name, defaultValue, watch = true) {
|
|
|
1328
1327
|
const [last, setLast, getLast] = useState(getQueryValue(runtime2, name, defaultValue));
|
|
1329
1328
|
useEffect(function useQueryEffect() {
|
|
1330
1329
|
if (watch) {
|
|
1331
|
-
let
|
|
1330
|
+
let useQueryEffectPathListener = function() {
|
|
1332
1331
|
const current = getQueryValue(runtime2, name, defaultValue);
|
|
1333
1332
|
if (getLast() !== current) {
|
|
1334
1333
|
debug(runtime2, "useQuery listener for %s", key);
|
|
1335
1334
|
setLast(current);
|
|
1336
1335
|
}
|
|
1337
1336
|
};
|
|
1338
|
-
|
|
1339
|
-
runtime2.addPathListener(useQueryEffectPathListener2);
|
|
1337
|
+
runtime2.addPathListener(useQueryEffectPathListener);
|
|
1340
1338
|
return function useQueryEffectUnLoad() {
|
|
1341
|
-
runtime2.removePathListener(
|
|
1339
|
+
runtime2.removePathListener(useQueryEffectPathListener);
|
|
1342
1340
|
};
|
|
1343
1341
|
}
|
|
1344
1342
|
}, []);
|
|
@@ -1381,7 +1379,7 @@ function setQueryValue(runtime2, name, value, watch = true) {
|
|
|
1381
1379
|
}
|
|
1382
1380
|
}
|
|
1383
1381
|
|
|
1384
|
-
//
|
|
1382
|
+
// node_modules/@miqro/jsx/build/esm/hooks/useelement.js
|
|
1385
1383
|
function useElement() {
|
|
1386
1384
|
useConditional("useElement");
|
|
1387
1385
|
const currentContext2 = useRenderContext();
|
|
@@ -1391,7 +1389,7 @@ function useElement() {
|
|
|
1391
1389
|
return currentContext2.node.ref ? currentContext2.node.ref : null;
|
|
1392
1390
|
}
|
|
1393
1391
|
|
|
1394
|
-
//
|
|
1392
|
+
// node_modules/@miqro/jsx/build/esm/hooks/context.js
|
|
1395
1393
|
function createContext(defaultValue) {
|
|
1396
1394
|
const symbol = Symbol();
|
|
1397
1395
|
return {
|