sia-reactor 0.0.47 → 0.0.49
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/{TimeTravelConsole-FgH7tE4N.d.ts → TimeTravelConsole-2pWtI2I0.d.ts} +2 -2
- package/dist/{TimeTravelConsole-CFwqDhnh.d.cts → TimeTravelConsole-BCXmUIue.d.cts} +2 -2
- package/dist/adapters/react.cjs +6 -6
- package/dist/adapters/react.cjs.map +1 -1
- package/dist/adapters/react.d.cts +3 -3
- package/dist/adapters/react.d.ts +3 -3
- package/dist/adapters/react.js +4 -4
- package/dist/adapters/vanilla.cjs +6 -6
- package/dist/adapters/vanilla.cjs.map +1 -1
- package/dist/adapters/vanilla.d.cts +4 -4
- package/dist/adapters/vanilla.d.ts +4 -4
- package/dist/adapters/vanilla.js +4 -4
- package/dist/{chunk-U4SR3CZF.js → chunk-2EAHPVH6.js} +7 -7
- package/dist/chunk-2EAHPVH6.js.map +1 -0
- package/dist/{chunk-TEZYMFP3.js → chunk-GC754LMW.js} +3 -3
- package/dist/{chunk-57KOBPY7.js → chunk-YHGYHYEE.js} +10 -4
- package/dist/chunk-YHGYHYEE.js.map +1 -0
- package/dist/{chunk-JKBN232I.js → chunk-ZTUAHMMN.js} +4 -4
- package/dist/{consts-Bq1B4lOB.d.ts → consts-CV83gskZ.d.cts} +6 -2
- package/dist/{consts-Bq1B4lOB.d.cts → consts-CV83gskZ.d.ts} +6 -2
- package/dist/{index-D_5wXk_Q.d.cts → index-Baya8Ym8.d.cts} +1 -1
- package/dist/{index-DApQ-Emc.d.ts → index-NHBCrY1C.d.ts} +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modules.cjs.map +1 -1
- package/dist/modules.d.cts +4 -4
- package/dist/modules.d.ts +4 -4
- package/dist/modules.js +3 -3
- package/dist/super.d.ts +10 -3
- package/dist/super.global.js +15 -9
- package/dist/super.global.js.map +1 -1
- package/dist/utils.cjs +16 -9
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +4 -2
- package/dist/utils.d.ts +4 -2
- package/dist/utils.js +4 -2
- package/package.json +1 -1
- package/dist/chunk-57KOBPY7.js.map +0 -1
- package/dist/chunk-U4SR3CZF.js.map +0 -1
- /package/dist/{chunk-TEZYMFP3.js.map → chunk-GC754LMW.js.map} +0 -0
- /package/dist/{chunk-JKBN232I.js.map → chunk-ZTUAHMMN.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as Reactive } from './consts-
|
|
2
|
-
import { g as TimeTravelModule } from './index-
|
|
1
|
+
import { W as Reactive } from './consts-CV83gskZ.js';
|
|
2
|
+
import { g as TimeTravelModule } from './index-NHBCrY1C.js';
|
|
3
3
|
|
|
4
4
|
/** Reactive options for the TimeTravel overlay instance. */
|
|
5
5
|
interface TimeTravelConsoleConfig {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as Reactive } from './consts-
|
|
2
|
-
import { g as TimeTravelModule } from './index-
|
|
1
|
+
import { W as Reactive } from './consts-CV83gskZ.cjs';
|
|
2
|
+
import { g as TimeTravelModule } from './index-Baya8Ym8.cjs';
|
|
3
3
|
|
|
4
4
|
/** Reactive options for the TimeTravel overlay instance. */
|
|
5
5
|
interface TimeTravelConsoleConfig {
|
package/dist/adapters/react.cjs
CHANGED
|
@@ -1183,29 +1183,29 @@ function cleanKeyCombo(combo, mods = KEYS_MODS) {
|
|
|
1183
1183
|
};
|
|
1184
1184
|
return Array.isArray(combo) ? combo.map(clean) : clean(combo);
|
|
1185
1185
|
}
|
|
1186
|
-
function matchKeys(required, actual, strict = false, clean = true) {
|
|
1186
|
+
function matchKeys(required, actual, strict = false, clean = true, allowedMods) {
|
|
1187
1187
|
if (clean) actual = cleanKeyCombo(actual);
|
|
1188
1188
|
const match = (req, actual2) => {
|
|
1189
1189
|
req = cleanKeyCombo(req);
|
|
1190
1190
|
if (strict) return req === actual2;
|
|
1191
1191
|
const reqs = req.split("+"), reals = actual2.split("+");
|
|
1192
|
-
for (const mod of KEYS_CMODS) if (reals.includes(mod) && !reqs.includes(mod)) return false;
|
|
1192
|
+
for (const mod of KEYS_CMODS) if (reals.includes(mod) && !reqs.includes(mod) && !allowedMods?.includes(mod)) return false;
|
|
1193
1193
|
return reqs.every((k) => reals.includes(k));
|
|
1194
1194
|
};
|
|
1195
1195
|
return Array.isArray(required) ? required.some((req) => match(req, actual)) : match(required, actual);
|
|
1196
1196
|
}
|
|
1197
1197
|
function getTermsForKey(combo, settings) {
|
|
1198
|
-
const terms = { override: false, block: false, whitelisted: false, action: null }, { overrides = [], shortcuts = {}, blocks = [], strictMatch: stm = false, rankedMatch: ram = true, whitelist = [] } = settings || {};
|
|
1198
|
+
const terms = { override: false, block: false, whitelisted: false, action: null }, { overrides = [], shortcuts = {}, blocks = [], strictMatch: stm = false, rankedMatch: ram = true, whitelist = [], moddedlist = [] } = settings || {};
|
|
1199
1199
|
combo = cleanKeyCombo(combo);
|
|
1200
1200
|
if (matchKeys(overrides, combo, stm, false)) terms.override = true;
|
|
1201
1201
|
if (matchKeys(blocks, combo, stm, false)) terms.block = true;
|
|
1202
|
-
if (matchKeys(
|
|
1203
|
-
if (!ram) return terms.action = Object.keys(shortcuts).find((id) => shortcuts[id] && matchKeys(shortcuts[id], combo, stm, false)) || null, terms;
|
|
1202
|
+
if (whitelist.some((w) => matchKeys(w, combo, false, true, moddedlist.includes(cleanKeyCombo(w)) ? KEYS_CMODS : void 0))) terms.whitelisted = true;
|
|
1203
|
+
if (!ram) return terms.action = Object.keys(shortcuts).find((id) => shortcuts[id] && matchKeys(shortcuts[id], combo, stm, false, moddedlist.includes(id) ? KEYS_CMODS : void 0)) || null, terms;
|
|
1204
1204
|
let bestA = null, bestE = false, bestL = 0;
|
|
1205
1205
|
for (const id of Object.keys(shortcuts))
|
|
1206
1206
|
for (const c of Array.isArray(shortcuts[id]) ? shortcuts[id] : [shortcuts[id]]) {
|
|
1207
1207
|
const req = c && cleanKeyCombo(c), isE = req === combo, len = req ? req.split("+").length : 0;
|
|
1208
|
-
if (c && matchKeys(req, combo, stm, false) && (!bestA || isE && !bestE || isE === bestE && len > bestL)) bestA = id, bestE = isE, bestL = len;
|
|
1208
|
+
if (c && matchKeys(req, combo, stm, false, moddedlist.includes(id) ? KEYS_CMODS : void 0) && (!bestA || isE && !bestE || isE === bestE && len > bestL)) bestA = id, bestE = isE, bestL = len;
|
|
1209
1209
|
}
|
|
1210
1210
|
return terms.action = bestA, terms;
|
|
1211
1211
|
}
|