sia-reactor 0.0.48 → 0.0.50
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-BCXmUIue.d.cts → TimeTravelConsole-mDsH7cya.d.cts} +1 -1
- package/dist/{TimeTravelConsole-2pWtI2I0.d.ts → TimeTravelConsole-oCB-dzn3.d.ts} +1 -1
- package/dist/adapters/react.cjs +11 -9
- package/dist/adapters/react.cjs.map +1 -1
- package/dist/adapters/react.d.cts +2 -2
- package/dist/adapters/react.d.ts +2 -2
- package/dist/adapters/react.js +3 -3
- package/dist/adapters/vanilla.cjs +11 -9
- package/dist/adapters/vanilla.cjs.map +1 -1
- package/dist/adapters/vanilla.d.cts +2 -2
- package/dist/adapters/vanilla.d.ts +2 -2
- package/dist/adapters/vanilla.js +3 -3
- package/dist/{chunk-3IIYJ6B4.js → chunk-4EJJHQ66.js} +2 -2
- package/dist/{chunk-IYAWNLD2.js → chunk-7IRMY6BA.js} +6 -6
- package/dist/chunk-7IRMY6BA.js.map +1 -0
- package/dist/{chunk-U4SR3CZF.js → chunk-JSB4PBWC.js} +9 -7
- package/dist/chunk-JSB4PBWC.js.map +1 -0
- package/dist/{index-NHBCrY1C.d.ts → index-COpS7d1h.d.ts} +1 -1
- package/dist/{index-Baya8Ym8.d.cts → index-CgFQ_rTz.d.cts} +1 -1
- package/dist/modules.cjs +5 -6
- package/dist/modules.cjs.map +1 -1
- package/dist/modules.d.cts +2 -2
- package/dist/modules.d.ts +2 -2
- package/dist/modules.js +7 -8
- package/dist/modules.js.map +1 -1
- package/dist/styles/time-travel-console.css +9 -8
- package/dist/super.d.ts +5 -2
- package/dist/super.global.js +16 -15
- package/dist/super.global.js.map +1 -1
- package/dist/utils.cjs +8 -6
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +4 -1
- package/dist/utils.d.ts +4 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-IYAWNLD2.js.map +0 -1
- package/dist/chunk-U4SR3CZF.js.map +0 -1
- /package/dist/{chunk-3IIYJ6B4.js.map → chunk-4EJJHQ66.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { W as Reactive } from './consts-CV83gskZ.cjs';
|
|
2
|
-
import { g as TimeTravelModule } from './index-
|
|
2
|
+
import { g as TimeTravelModule } from './index-CgFQ_rTz.cjs';
|
|
3
3
|
|
|
4
4
|
/** Reactive options for the TimeTravel overlay instance. */
|
|
5
5
|
interface TimeTravelConsoleConfig {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { W as Reactive } from './consts-CV83gskZ.js';
|
|
2
|
-
import { g as TimeTravelModule } from './index-
|
|
2
|
+
import { g as TimeTravelModule } from './index-COpS7d1h.js';
|
|
3
3
|
|
|
4
4
|
/** Reactive options for the TimeTravel overlay instance. */
|
|
5
5
|
interface TimeTravelConsoleConfig {
|
package/dist/adapters/react.cjs
CHANGED
|
@@ -1183,29 +1183,31 @@ 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, modded = false) {
|
|
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
|
-
|
|
1192
|
+
if (!modded) {
|
|
1193
|
+
for (const mod of KEYS_CMODS) if (reals.includes(mod) && !reqs.includes(mod)) return false;
|
|
1194
|
+
}
|
|
1193
1195
|
return reqs.every((k) => reals.includes(k));
|
|
1194
1196
|
};
|
|
1195
1197
|
return Array.isArray(required) ? required.some((req) => match(req, actual)) : match(required, actual);
|
|
1196
1198
|
}
|
|
1197
1199
|
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 || {};
|
|
1200
|
+
const terms = { override: false, block: false, whitelisted: false, action: null }, { overrides = [], shortcuts = {}, blocks = [], strictMatch: stm = false, rankedMatch: ram = true, whitelist = [], moddedlist = [] } = settings || {};
|
|
1199
1201
|
combo = cleanKeyCombo(combo);
|
|
1200
1202
|
if (matchKeys(overrides, combo, stm, false)) terms.override = true;
|
|
1201
1203
|
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;
|
|
1204
|
+
if (whitelist.some((w, _, __, cw = cleanKeyCombo(w)) => matchKeys(cw, combo, stm, false, moddedlist.includes(cw)))) terms.whitelisted = true;
|
|
1205
|
+
if (!ram) return terms.action = Object.keys(shortcuts).find((id) => shortcuts[id] && matchKeys(shortcuts[id], combo, stm, false, moddedlist.includes(id))) || null, terms;
|
|
1204
1206
|
let bestA = null, bestE = false, bestL = 0;
|
|
1205
1207
|
for (const id of Object.keys(shortcuts))
|
|
1206
1208
|
for (const c of Array.isArray(shortcuts[id]) ? shortcuts[id] : [shortcuts[id]]) {
|
|
1207
1209
|
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;
|
|
1210
|
+
if (c && matchKeys(req, combo, stm, false, moddedlist.includes(id)) && (!bestA || isE && !bestE || isE === bestE && len > bestL)) bestA = id, bestE = isE, bestL = len;
|
|
1209
1211
|
}
|
|
1210
1212
|
return terms.action = bestA, terms;
|
|
1211
1213
|
}
|
|
@@ -1246,8 +1248,8 @@ function effect(callback, options = NIL) {
|
|
|
1246
1248
|
// src/ts/adapters/vanilla/TimeTravelConsole.ts
|
|
1247
1249
|
var keys = {
|
|
1248
1250
|
blocks: KEYS_BLOCKS,
|
|
1249
|
-
overrides: ["
|
|
1250
|
-
shortcuts: { undo: ["Ctrl+z", "Cmd+z"], redo: ["Ctrl+y", "
|
|
1251
|
+
overrides: ["Space", "Home", "End", "Escape", "Delete"],
|
|
1252
|
+
shortcuts: { undo: ["Ctrl+z", "Cmd+z"], redo: ["Ctrl+y", "Ctrl+Shift+z", "Cmd+Shift+z"], genesis: "Home", trackUntrack: "t", ending: "End", playPause: "Space", rewind: "Shift+Space", closeOverlay: "Escape", clrHistory: "Delete", export: "e", import: "i", clear: "c" }
|
|
1251
1253
|
};
|
|
1252
1254
|
var TimeTravelConsole = class _TimeTravelConsole {
|
|
1253
1255
|
static count = 0;
|
|
@@ -1274,7 +1276,7 @@ var TimeTravelConsole = class _TimeTravelConsole {
|
|
|
1274
1276
|
filters.append((filterBox.append((filterRow1.append(whitelistLabel, whitelist), filterRow1), (filterRow2.append(blacklistLabel, blacklist), filterRow2)), filterBox));
|
|
1275
1277
|
panel.append(title, status, (row1.append(playPause, rewind, genesis), row1), (row2.append(undo, redo, trackUntrack, stride), row2), payload, (row3.append(speed, range), row3), filters, (row4.append(exp, imp, clr), row4), io, (row5.append(delay, limit, (read.append(readBox, " Read Mirror"), read), (write.append(writeBox, " Write Mirror"), write)), row5), (foot.prepend(stats), foot.append(link), foot));
|
|
1276
1278
|
this.host.append(toggle, panel);
|
|
1277
|
-
this.keydown = (e, can = this.state.open && (this.config.devOnly ? CTX.isDevEnv : true), a = can && keyEventAllowed(e, keys)) => (a && e.stopImmediatePropagation(), a === "undo" ? this.time.undo(this.state.stride) : a === "redo" ? this.time.redo(this.state.stride) : a === "genesis" ? this.time.jumpTo(0) : a === "trackUntrack" ? this.time[s.tracking ? "untrack" : "track"]() : a === "ending" ? this.time.jumpTo(s.history.length) : a === "
|
|
1279
|
+
this.keydown = (e, can = this.state.open && (this.config.devOnly ? CTX.isDevEnv : true), a = can && keyEventAllowed(e, keys)) => (a && e.stopImmediatePropagation(), a === "undo" ? this.time.undo(this.state.stride) : a === "redo" ? this.time.redo(this.state.stride) : a === "genesis" ? this.time.jumpTo(0) : a === "trackUntrack" ? this.time[s.tracking ? "untrack" : "track"]() : a === "ending" ? this.time.jumpTo(s.history.length) : a === "rewind" ? this.time.rewind() : a === "playPause" ? this.time[s.paused ? "play" : "pause"]() : a === "clrHistory" ? this.time.clear() : a === "closeOverlay" ? this.state.open = false : a === "export" ? this.state.import = this.time.export(null, 2) : a === "import" ? this.state.import.trim().length && this.time.import(this.state.import) : a === "clear" && (this.state.import = ""));
|
|
1278
1280
|
this.keyup = (e, can = this.state.open && (this.config.devOnly ? CTX.isDevEnv : true), a = can && keyEventAllowed(e, keys)) => a && e.stopImmediatePropagation();
|
|
1279
1281
|
window.addEventListener("keydown", this.keydown), window.addEventListener("keyup", this.keyup);
|
|
1280
1282
|
const sync = [
|