@edv4h/usketch-plugin-character 0.3.0 → 0.3.1
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/README.md +9 -0
- package/dist/character-input.d.ts +5 -2
- package/dist/character-input.d.ts.map +1 -1
- package/dist/character-input.js +116 -13
- package/dist/character-input.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -53,6 +53,15 @@ createCharacterPlugin({
|
|
|
53
53
|
`startSpeed` / `stopSpeed` (fractions of `moveSpeed`), `turnRate` / `steerRate`
|
|
54
54
|
(multiples of `turnRate`), `slipAngle` / `steerSlipAngle` (degrees), `recoveryRate`
|
|
55
55
|
(1/s). The drift key is only captured while drift is on.
|
|
56
|
+
- **Keyboard focus**: movement keys are captured on `window` while the character is
|
|
57
|
+
on, except where the page needs them: nothing is taken while a text field has focus
|
|
58
|
+
or focus is inside a dialog / menu (`dialog`, `role="dialog"`, `alertdialog`, `menu`;
|
|
59
|
+
a dialog that contains the board itself doesn't count), arrow keys are left to
|
|
60
|
+
widgets that use them (range / radio inputs, `role="slider"`, `radio`, `tab`,
|
|
61
|
+
`option`, `combobox`, `menubar` items, `grid`, `treeitem` …) while WASD keeps
|
|
62
|
+
driving, and Space is left to buttons, links and other controls it activates. Focus
|
|
63
|
+
is read through `composedPath()`, so web-component dialogs count too. Moving focus
|
|
64
|
+
to such a target releases the held keys it uses.
|
|
56
65
|
- **Camera modes**
|
|
57
66
|
- `fixed` — follow, world stays upright.
|
|
58
67
|
- `rotate` — follow and turn the world by `-heading` (character always faces up).
|
|
@@ -11,8 +11,11 @@ export interface KeyInput {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Listen for the bound keys on `window`. `isActive()` gates everything: while it is
|
|
14
|
-
* false no key is captured (and none is swallowed).
|
|
15
|
-
*
|
|
14
|
+
* false no key is captured (and none is swallowed). Keys are left alone while focus is
|
|
15
|
+
* in a text field or inside a dialog / menu, arrow keys while a widget that uses them
|
|
16
|
+
* (slider, radio, tab …) has focus, and the drift key on controls Space activates.
|
|
17
|
+
* Held keys are cleared on window blur and tab hide, and released when focus moves to
|
|
18
|
+
* a target that uses them, so a key released elsewhere can't get stuck "down".
|
|
16
19
|
*/
|
|
17
20
|
export declare function createKeyInput(initialKeys: CharacterKeys, isActive: () => boolean,
|
|
18
21
|
/** Whether the drift key does anything now (else it is left to the host, e.g. Space-pan). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"character-input.d.ts","sourceRoot":"","sources":["../src/character-input.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,QAAQ;IACxB,yDAAyD;IACzD,IAAI,IAAI,SAAS,CAAC;IAClB,qCAAqC;IACrC,OAAO,IAAI,OAAO,CAAC;IACnB,wDAAwD;IACxD,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IACnC,OAAO,IAAI,IAAI,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"character-input.d.ts","sourceRoot":"","sources":["../src/character-input.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,QAAQ;IACxB,yDAAyD;IACzD,IAAI,IAAI,SAAS,CAAC;IAClB,qCAAqC;IACrC,OAAO,IAAI,OAAO,CAAC;IACnB,wDAAwD;IACxD,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IACnC,OAAO,IAAI,IAAI,CAAC;CAChB;AAkJD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC7B,WAAW,EAAE,aAAa,EAC1B,QAAQ,EAAE,MAAM,OAAO;AACvB,6FAA6F;AAC7F,aAAa,GAAE,MAAM,OAAqB,GACxC,QAAQ,CAwFV"}
|
package/dist/character-input.js
CHANGED
|
@@ -26,21 +26,99 @@ const SPACE_ROLES = new Set([
|
|
|
26
26
|
"tab",
|
|
27
27
|
"textbox",
|
|
28
28
|
]);
|
|
29
|
-
|
|
30
|
-
function isSpaceTarget(target) {
|
|
29
|
+
const asElement = (target) => {
|
|
31
30
|
const el = target;
|
|
32
|
-
|
|
31
|
+
return el && typeof el.tagName === "string" ? el : null;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* The focused element and its ancestors, innermost first. `composedPath()` reaches into
|
|
35
|
+
* (open) shadow roots, so a web-component dialog or slider is seen as itself rather than
|
|
36
|
+
* as its retargeted host; without it, the light-DOM parent chain.
|
|
37
|
+
*/
|
|
38
|
+
function focusPath(e) {
|
|
39
|
+
const raw = typeof e.composedPath === "function" ? e.composedPath() : [];
|
|
40
|
+
const path = raw.map(asElement).filter((el) => el !== null);
|
|
41
|
+
if (path.length > 0)
|
|
42
|
+
return path;
|
|
43
|
+
const chain = [];
|
|
44
|
+
for (let el = asElement(e.target); el; el = asElement(el.parentElement))
|
|
45
|
+
chain.push(el);
|
|
46
|
+
return chain;
|
|
47
|
+
}
|
|
48
|
+
const roleOf = (el) => el && typeof el.getAttribute === "function" ? el.getAttribute("role") : null;
|
|
49
|
+
/** Elements Space activates (or types into): the drift key must not steal it from them. */
|
|
50
|
+
function isSpaceTarget(el) {
|
|
51
|
+
if (!el)
|
|
33
52
|
return false;
|
|
34
53
|
if (["INPUT", "TEXTAREA", "SELECT", "BUTTON", "A", "SUMMARY"].includes(el.tagName))
|
|
35
54
|
return true;
|
|
36
55
|
if (el.isContentEditable === true)
|
|
37
56
|
return true;
|
|
38
|
-
const role =
|
|
57
|
+
const role = roleOf(el);
|
|
39
58
|
return role !== null && SPACE_ROLES.has(role);
|
|
40
59
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Overlays that own the keyboard while focus is inside them (a dialog or menu opened
|
|
62
|
+
* mid-drive). Persistent containers such as a menubar or a sidebar listbox are not
|
|
63
|
+
* here: their items are arrow-key widgets, which keep WASD driving.
|
|
64
|
+
*/
|
|
65
|
+
const KEY_OWNER_SELECTOR = 'dialog, [role="dialog"], [role="alertdialog"], [role="menu"]';
|
|
66
|
+
/** Marks the board's layers, to tell a host dialog that wraps the whole board apart. */
|
|
67
|
+
const BOARD_SELECTOR = "[data-layer-id]";
|
|
68
|
+
/** `<input type>`s that move their value or selection with the arrow keys. */
|
|
69
|
+
const ARROW_INPUTS = new Set(["range", "radio"]);
|
|
70
|
+
/** ARIA widgets (and composite containers that keep focus) that use the arrow keys. */
|
|
71
|
+
const ARROW_ROLES = new Set([
|
|
72
|
+
"combobox",
|
|
73
|
+
"grid",
|
|
74
|
+
"gridcell",
|
|
75
|
+
"listbox",
|
|
76
|
+
"menubar",
|
|
77
|
+
"menuitem",
|
|
78
|
+
"menuitemcheckbox",
|
|
79
|
+
"menuitemradio",
|
|
80
|
+
"option",
|
|
81
|
+
"radio",
|
|
82
|
+
"radiogroup",
|
|
83
|
+
"scrollbar",
|
|
84
|
+
"separator",
|
|
85
|
+
"slider",
|
|
86
|
+
"spinbutton",
|
|
87
|
+
"tab",
|
|
88
|
+
"tablist",
|
|
89
|
+
"toolbar",
|
|
90
|
+
"tree",
|
|
91
|
+
"treegrid",
|
|
92
|
+
"treeitem",
|
|
93
|
+
]);
|
|
94
|
+
/**
|
|
95
|
+
* Focus is inside a dialog or menu: every bound key is left to it. A dialog that holds
|
|
96
|
+
* the board itself (the host shows the board in a modal) doesn't count, or the
|
|
97
|
+
* character could never be driven there.
|
|
98
|
+
*/
|
|
99
|
+
function isInKeyOwner(path) {
|
|
100
|
+
const owner = path.find((el) => typeof el.matches === "function" && el.matches(KEY_OWNER_SELECTOR));
|
|
101
|
+
if (!owner)
|
|
102
|
+
return false;
|
|
103
|
+
return typeof owner.querySelector !== "function" || owner.querySelector(BOARD_SELECTOR) === null;
|
|
104
|
+
}
|
|
105
|
+
/** The focused element uses the arrow keys itself, so arrow bindings are left to it. */
|
|
106
|
+
function isArrowTarget(el) {
|
|
107
|
+
if (!el)
|
|
108
|
+
return false;
|
|
109
|
+
if (el.tagName === "INPUT" && ARROW_INPUTS.has((el.type ?? "").toLowerCase()))
|
|
110
|
+
return true;
|
|
111
|
+
const role = roleOf(el);
|
|
112
|
+
return role !== null && ARROW_ROLES.has(role);
|
|
113
|
+
}
|
|
114
|
+
/** Whether a key acts as an arrow (by code, or by key: numpad 4/6 with NumLock off). */
|
|
115
|
+
const isArrowKey = (code, key) => code.startsWith("Arrow") || (key ?? "").startsWith("Arrow");
|
|
116
|
+
/** Focus where no bound key may be taken: typing, or a dialog / menu. */
|
|
117
|
+
function blocksAllKeys(path) {
|
|
118
|
+
return isTextInput(path[0]) || isInKeyOwner(path);
|
|
119
|
+
}
|
|
120
|
+
function isTextInput(el) {
|
|
121
|
+
if (!el)
|
|
44
122
|
return false;
|
|
45
123
|
const tag = el.tagName;
|
|
46
124
|
if (tag === "INPUT")
|
|
@@ -49,14 +127,18 @@ function isTextInput(target) {
|
|
|
49
127
|
}
|
|
50
128
|
/**
|
|
51
129
|
* Listen for the bound keys on `window`. `isActive()` gates everything: while it is
|
|
52
|
-
* false no key is captured (and none is swallowed).
|
|
53
|
-
*
|
|
130
|
+
* false no key is captured (and none is swallowed). Keys are left alone while focus is
|
|
131
|
+
* in a text field or inside a dialog / menu, arrow keys while a widget that uses them
|
|
132
|
+
* (slider, radio, tab …) has focus, and the drift key on controls Space activates.
|
|
133
|
+
* Held keys are cleared on window blur and tab hide, and released when focus moves to
|
|
134
|
+
* a target that uses them, so a key released elsewhere can't get stuck "down".
|
|
54
135
|
*/
|
|
55
136
|
export function createKeyInput(initialKeys, isActive,
|
|
56
137
|
/** Whether the drift key does anything now (else it is left to the host, e.g. Space-pan). */
|
|
57
138
|
isDriftActive = () => false) {
|
|
58
139
|
let keys = initialKeys;
|
|
59
|
-
|
|
140
|
+
/** Held codes → the `key` they produced (to tell numpad arrows from digits). */
|
|
141
|
+
const held = new Map();
|
|
60
142
|
const directionOf = (code) => {
|
|
61
143
|
for (const dir of ["up", "down", "left", "right"]) {
|
|
62
144
|
if (keys[dir].includes(code))
|
|
@@ -67,16 +149,21 @@ isDriftActive = () => false) {
|
|
|
67
149
|
return null;
|
|
68
150
|
};
|
|
69
151
|
const onKeyDown = (e) => {
|
|
70
|
-
if (!isActive()
|
|
152
|
+
if (!isActive())
|
|
71
153
|
return;
|
|
72
154
|
if (e.ctrlKey || e.metaKey || e.altKey)
|
|
73
155
|
return; // leave chords (Cmd+S …) alone
|
|
74
156
|
const dir = directionOf(e.code);
|
|
75
157
|
if (!dir)
|
|
76
158
|
return;
|
|
77
|
-
|
|
159
|
+
const path = focusPath(e);
|
|
160
|
+
if (blocksAllKeys(path))
|
|
161
|
+
return;
|
|
162
|
+
if (dir === "drift" && isSpaceTarget(path[0]))
|
|
78
163
|
return;
|
|
79
|
-
|
|
164
|
+
if (isArrowKey(e.code, e.key) && isArrowTarget(path[0]))
|
|
165
|
+
return;
|
|
166
|
+
held.set(e.code, e.key ?? "");
|
|
80
167
|
e.preventDefault();
|
|
81
168
|
e.stopImmediatePropagation();
|
|
82
169
|
};
|
|
@@ -91,12 +178,27 @@ isDriftActive = () => false) {
|
|
|
91
178
|
if (typeof document !== "undefined" && document.hidden)
|
|
92
179
|
clear();
|
|
93
180
|
};
|
|
181
|
+
// Focus moving to a target that uses a held key hands that key to it: release it, or
|
|
182
|
+
// the character keeps going and the key's keyup is swallowed (a button that Space
|
|
183
|
+
// activates on keyup would never fire). Keys the new target ignores stay held.
|
|
184
|
+
const onFocusIn = (e) => {
|
|
185
|
+
const path = focusPath(e);
|
|
186
|
+
if (blocksAllKeys(path)) {
|
|
187
|
+
clear();
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
const owned = [...held].filter(([code, key]) => (isArrowKey(code, key) && isArrowTarget(path[0])) ||
|
|
191
|
+
((keys.drift?.includes(code) ?? false) && isSpaceTarget(path[0])));
|
|
192
|
+
for (const [code] of owned)
|
|
193
|
+
held.delete(code);
|
|
194
|
+
};
|
|
94
195
|
const hasWindow = typeof window !== "undefined";
|
|
95
196
|
if (hasWindow) {
|
|
96
197
|
window.addEventListener("keydown", onKeyDown, true);
|
|
97
198
|
window.addEventListener("keyup", onKeyUp, true);
|
|
98
199
|
window.addEventListener("blur", clear);
|
|
99
200
|
document.addEventListener("visibilitychange", onVisibility);
|
|
201
|
+
document.addEventListener("focusin", onFocusIn);
|
|
100
202
|
}
|
|
101
203
|
const isHeld = (dir) => keys[dir]?.some((c) => held.has(c)) ?? false;
|
|
102
204
|
return {
|
|
@@ -120,6 +222,7 @@ isDriftActive = () => false) {
|
|
|
120
222
|
window.removeEventListener("keyup", onKeyUp, true);
|
|
121
223
|
window.removeEventListener("blur", clear);
|
|
122
224
|
document.removeEventListener("visibilitychange", onVisibility);
|
|
225
|
+
document.removeEventListener("focusin", onFocusIn);
|
|
123
226
|
},
|
|
124
227
|
};
|
|
125
228
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"character-input.js","sourceRoot":"","sources":["../src/character-input.ts"],"names":[],"mappings":"AAkBA,6FAA6F;AAC7F,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IAC/B,UAAU;IACV,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,MAAM;IACN,OAAO;CACP,CAAC,CAAC;AAEH,kDAAkD;AAClD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC3B,QAAQ;IACR,UAAU;IACV,UAAU;IACV,MAAM;IACN,UAAU;IACV,kBAAkB;IAClB,eAAe;IACf,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,SAAS;CACT,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"character-input.js","sourceRoot":"","sources":["../src/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ACpB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;YACtB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;SACtB,CAAC;QACF,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;QAC5B,OAAO,CAAC,IAAI;YACX,iFAAiF;YACjF,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACpD,IAAI,CAAC,KAAK,EAAE,CAAC;QACd,CAAC;QACD,OAAO;YACN,IAAI,CAAC,SAAS;gBAAE,OAAO;YACvB,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;YACvD,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;YACnD,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YAC1C,QAAQ,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;YAC/D,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QACpD,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edv4h/usketch-plugin-character",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@edv4h/usketch-shared": "4.
|
|
15
|
+
"@edv4h/usketch-shared": "4.19.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": ">=19"
|