aoye 0.0.46 → 0.0.47
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/aoye.cjs.js +13 -7
- package/dist/aoye.cjs.js.map +1 -1
- package/dist/aoye.esm.js +13 -8
- package/dist/aoye.esm.js.map +1 -1
- package/dist/index.d.ts +10 -3
- package/dist/index.umd.js +13 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/aoye.esm.js
CHANGED
|
@@ -23,6 +23,12 @@ let ScheduleType = function (ScheduleType) {
|
|
|
23
23
|
ScheduleType[ScheduleType["Post"] = 8] = "Post";
|
|
24
24
|
return ScheduleType;
|
|
25
25
|
}({});
|
|
26
|
+
const EffectStrType2Enum = {
|
|
27
|
+
sync: ScheduleType.Sync,
|
|
28
|
+
pre: ScheduleType.Pre,
|
|
29
|
+
render: ScheduleType.Render,
|
|
30
|
+
post: ScheduleType.Post
|
|
31
|
+
};
|
|
26
32
|
let ScheduleStatus = function (ScheduleStatus) {
|
|
27
33
|
ScheduleStatus[ScheduleStatus["Idle"] = 0] = "Idle";
|
|
28
34
|
ScheduleStatus[ScheduleStatus["Ready"] = 1] = "Ready";
|
|
@@ -1254,14 +1260,12 @@ function $(data) {
|
|
|
1254
1260
|
};
|
|
1255
1261
|
}
|
|
1256
1262
|
}
|
|
1257
|
-
({
|
|
1258
|
-
type: ScheduleType.Sync
|
|
1259
|
-
});
|
|
1260
1263
|
function effectUt(callback, depOrOpt, opt) {
|
|
1261
1264
|
const hasDep = Array.isArray(depOrOpt);
|
|
1262
1265
|
opt = hasDep ? opt || {} : depOrOpt || {};
|
|
1266
|
+
const scheduleType = EffectStrType2Enum[opt.type];
|
|
1263
1267
|
if (!hasDep) {
|
|
1264
|
-
const ef = new Effect(callback,
|
|
1268
|
+
const ef = new Effect(callback, scheduleType);
|
|
1265
1269
|
const run = ef.dispose.bind(ef);
|
|
1266
1270
|
run.ins = ef;
|
|
1267
1271
|
return run;
|
|
@@ -1287,7 +1291,7 @@ function effectUt(callback, depOrOpt, opt) {
|
|
|
1287
1291
|
eff.state &= -257;
|
|
1288
1292
|
}
|
|
1289
1293
|
mounted = true;
|
|
1290
|
-
},
|
|
1294
|
+
}, scheduleType);
|
|
1291
1295
|
const run = ef.dispose.bind(ef);
|
|
1292
1296
|
run.ins = ef;
|
|
1293
1297
|
return run;
|
|
@@ -1295,8 +1299,9 @@ function effectUt(callback, depOrOpt, opt) {
|
|
|
1295
1299
|
function effect(callback, depOrOpt, opt) {
|
|
1296
1300
|
const hasDep = Array.isArray(depOrOpt);
|
|
1297
1301
|
opt = hasDep ? opt || {} : depOrOpt || {};
|
|
1302
|
+
const scheduleType = EffectStrType2Enum[opt.type];
|
|
1298
1303
|
if (!hasDep) {
|
|
1299
|
-
const ef = new Effect(callback,
|
|
1304
|
+
const ef = new Effect(callback, scheduleType);
|
|
1300
1305
|
return ef;
|
|
1301
1306
|
}
|
|
1302
1307
|
let mounted = false;
|
|
@@ -1320,7 +1325,7 @@ function effect(callback, depOrOpt, opt) {
|
|
|
1320
1325
|
eff.state &= -257;
|
|
1321
1326
|
}
|
|
1322
1327
|
mounted = true;
|
|
1323
|
-
},
|
|
1328
|
+
}, scheduleType);
|
|
1324
1329
|
return ef;
|
|
1325
1330
|
}
|
|
1326
1331
|
function scope(...args) {
|
|
@@ -1334,5 +1339,5 @@ function scope(...args) {
|
|
|
1334
1339
|
return run;
|
|
1335
1340
|
}
|
|
1336
1341
|
|
|
1337
|
-
export { $, Computed, Effect, IsStore, Keys, ScheduleStatus, ScheduleType, Scope, Signal, Store, StoreIgnoreKeys, batchEnd, batchStart, clean, deepSignal, effect, effectUt, execId, execIdInc, getPulling, ide, macro, micro, now, runWithPulling, scope, setExecId, setPulling, shareSignal, toRaw };
|
|
1342
|
+
export { $, Computed, Effect, EffectStrType2Enum, IsStore, Keys, ScheduleStatus, ScheduleType, Scope, Signal, Store, StoreIgnoreKeys, batchEnd, batchStart, clean, deepSignal, effect, effectUt, execId, execIdInc, getPulling, ide, macro, micro, now, runWithPulling, scope, setExecId, setPulling, shareSignal, toRaw };
|
|
1338
1343
|
//# sourceMappingURL=aoye.esm.js.map
|