@velarscript/web 0.23.2 → 0.23.4

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/analyzer.js CHANGED
@@ -4257,8 +4257,14 @@ function webTypeFields(name) {
4257
4257
  ]);
4258
4258
  if (name === "Event")
4259
4259
  return eventFields();
4260
+ // `isComposing` is on `InputEvent` below and belongs here for the same
4261
+ // reason: while an input method is composing, a keystroke is aimed at the
4262
+ // composer's candidate window rather than at the application. An Enter that
4263
+ // commits a candidate arrives as `keydown` with `isComposing` true, and a
4264
+ // handler that sends on Enter without asking sends half a word — which is the
4265
+ // default for every CJK typist rather than an edge case.
4260
4266
  if (name === "KeyboardEvent")
4261
- return new Map([...eventFields(), ["key", stringType], ["code", stringType], ["repeat", boolType], ["altKey", boolType], ["ctrlKey", boolType], ["metaKey", boolType], ["shiftKey", boolType]]);
4267
+ return new Map([...eventFields(), ["key", stringType], ["code", stringType], ["repeat", boolType], ["isComposing", boolType], ["altKey", boolType], ["ctrlKey", boolType], ["metaKey", boolType], ["shiftKey", boolType]]);
4262
4268
  if (name === "PointerEvent")
4263
4269
  return new Map([...eventFields(), ["pointerId", numberType], ["pointerType", stringType], ["pressure", numberType], ["button", numberType], ["buttons", numberType], ["clientX", numberType], ["clientY", numberType], ["movementX", numberType], ["movementY", numberType], ["altKey", boolType], ["ctrlKey", boolType], ["metaKey", boolType], ["shiftKey", boolType]]);
4264
4270
  if (name === "InputEvent")