@weasel-js/routing 1.9.1 → 1.9.3
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/{chunk-RTCD26NN.js → chunk-LOP2JTTA.js} +32 -3
- package/dist/chunk-LOP2JTTA.js.map +1 -0
- package/dist/{index-X6vX2tYX.d.ts → index-CrbDNXT_.d.ts} +11 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{internal-DTWYD6-s.d.ts → internal-B1B6gfOS.d.ts} +1 -1
- package/dist/internal.d.ts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +2 -2
- package/dist/react.js.map +1 -1
- package/package.json +7 -7
- package/dist/chunk-RTCD26NN.js.map +0 -1
|
@@ -1824,6 +1824,28 @@ function isEditableTarget(target) {
|
|
|
1824
1824
|
const ce = target.getAttribute("contenteditable");
|
|
1825
1825
|
return ce === "true" || ce === "";
|
|
1826
1826
|
}
|
|
1827
|
+
var ACTIVATED_BY_KEY = [
|
|
1828
|
+
"button",
|
|
1829
|
+
"a[href]",
|
|
1830
|
+
"summary",
|
|
1831
|
+
"select",
|
|
1832
|
+
'input[type="button"]',
|
|
1833
|
+
'input[type="submit"]',
|
|
1834
|
+
'input[type="reset"]',
|
|
1835
|
+
'input[type="checkbox"]',
|
|
1836
|
+
'input[type="radio"]',
|
|
1837
|
+
'[role="button"]',
|
|
1838
|
+
'[role="link"]',
|
|
1839
|
+
'[role="checkbox"]',
|
|
1840
|
+
'[role="switch"]',
|
|
1841
|
+
'[role="menuitem"]',
|
|
1842
|
+
'[role="tab"]',
|
|
1843
|
+
'[role="option"]'
|
|
1844
|
+
].join(", ");
|
|
1845
|
+
function activatesFocusedControl(e) {
|
|
1846
|
+
if (e.key !== " " && e.key !== "Enter") return false;
|
|
1847
|
+
return e.target instanceof Element && e.target.matches(ACTIVATED_BY_KEY);
|
|
1848
|
+
}
|
|
1827
1849
|
function keyMatches(eventKey, spec) {
|
|
1828
1850
|
const want = typeof spec === "string" ? [spec] : spec;
|
|
1829
1851
|
const ek = eventKey.toLowerCase();
|
|
@@ -1844,6 +1866,13 @@ function matchesKeyBinding(e, b) {
|
|
|
1844
1866
|
}
|
|
1845
1867
|
return true;
|
|
1846
1868
|
}
|
|
1869
|
+
function historyKey(e) {
|
|
1870
|
+
const ev = e;
|
|
1871
|
+
if (matchesKeyBinding(ev, { key: "z", mod: true })) return "undo";
|
|
1872
|
+
if (matchesKeyBinding(ev, { key: "z", mod: true, shift: true }) || matchesKeyBinding(ev, { key: "y", mod: true }))
|
|
1873
|
+
return "redo";
|
|
1874
|
+
return null;
|
|
1875
|
+
}
|
|
1847
1876
|
|
|
1848
1877
|
// src/ingestion/ingestItems.ts
|
|
1849
1878
|
var INGEST_STRING_MIMES = /* @__PURE__ */ new Set([
|
|
@@ -1944,6 +1973,6 @@ function dlog(namespace, ...args) {
|
|
|
1944
1973
|
console.debug(`[${namespace}]`, ...args);
|
|
1945
1974
|
}
|
|
1946
1975
|
|
|
1947
|
-
export { ALWAYS, COARSE_TARGET_SCALE, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, DepNode, INGEST_STRING_MIMES, LONG_PRESS_MS, NEVER, PREDICATE_TARGET, ScopeNode, TOOL_OFFHAND_ID, actionBindings, buildDepsFromRequires, buildRouteRegistry, buildRuleCtx, buildToolOffhandBindings, clientToCanvas, clientToCanvasRect, createDepRegistry, createDispatcher, createLongPressStore, depNodeOf, describeRule, dlog, evaluate, findConflicts, isDev, isEditableTarget, isTool, itemsFromClipboardData, itemsFromDataTransfer, itemsFromFiles, liveScope, makeToolOffhandAction, matchBest, matchSorted, matchSortedWithBarred, matchesKeyBinding, offhandKeyFor, openPointerSession, pointerGestureId, publishLiveDispatch, pushOwner, recordModeSwitch, reportRouteConflicts, resolveDeviceProfile, resolveParams, routesForSpec, ruleCanHoldIn, rulesExclusive, scopeBindings, targetConsultsAffordance, validateActionDefaultBinding, validateActionId };
|
|
1948
|
-
//# sourceMappingURL=chunk-
|
|
1949
|
-
//# sourceMappingURL=chunk-
|
|
1976
|
+
export { ALWAYS, COARSE_TARGET_SCALE, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, DepNode, INGEST_STRING_MIMES, LONG_PRESS_MS, NEVER, PREDICATE_TARGET, ScopeNode, TOOL_OFFHAND_ID, actionBindings, activatesFocusedControl, buildDepsFromRequires, buildRouteRegistry, buildRuleCtx, buildToolOffhandBindings, clientToCanvas, clientToCanvasRect, createDepRegistry, createDispatcher, createLongPressStore, depNodeOf, describeRule, dlog, evaluate, findConflicts, historyKey, isDev, isEditableTarget, isTool, itemsFromClipboardData, itemsFromDataTransfer, itemsFromFiles, liveScope, makeToolOffhandAction, matchBest, matchSorted, matchSortedWithBarred, matchesKeyBinding, offhandKeyFor, openPointerSession, pointerGestureId, publishLiveDispatch, pushOwner, recordModeSwitch, reportRouteConflicts, resolveDeviceProfile, resolveParams, routesForSpec, ruleCanHoldIn, rulesExclusive, scopeBindings, targetConsultsAffordance, validateActionDefaultBinding, validateActionId };
|
|
1977
|
+
//# sourceMappingURL=chunk-LOP2JTTA.js.map
|
|
1978
|
+
//# sourceMappingURL=chunk-LOP2JTTA.js.map
|