dom-expressions 0.32.4 → 0.32.7

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dom-expressions",
3
3
  "description": "A Fine-Grained Runtime for Performant DOM Rendering",
4
- "version": "0.32.4",
4
+ "version": "0.32.7",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -20,7 +20,7 @@
20
20
  "devalue": "^2.0.1"
21
21
  },
22
22
  "devDependencies": {
23
- "babel-plugin-jsx-dom-expressions": "^0.32.0"
23
+ "babel-plugin-jsx-dom-expressions": "^0.32.7"
24
24
  },
25
- "gitHead": "fb410f2b94e8069bf0b5ec737ce1a2a6a1aba7a2"
25
+ "gitHead": "3acfcd6802238e587e01ebcc1d1a89459a1a07a9"
26
26
  }
package/src/client.js CHANGED
@@ -366,11 +366,10 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
366
366
  effect(() => (current = insertExpression(parent, array, current, marker, true)));
367
367
  return () => current;
368
368
  }
369
- if (sharedConfig.context && current && current.length) {
369
+ if (sharedConfig.context) {
370
370
  for (let i = 0; i < array.length; i++) {
371
371
  if (array[i].parentNode) return (current = array);
372
372
  }
373
- return current;
374
373
  }
375
374
  if (array.length === 0) {
376
375
  current = cleanChildren(parent, current, marker);
@@ -385,8 +384,7 @@ function insertExpression(parent, value, current, marker, unwrapArray) {
385
384
  }
386
385
  current = array;
387
386
  } else if (value instanceof Node) {
388
- if (sharedConfig.context && current && current.length)
389
- return (current = value.parentNode ? (multi ? [value] : value) : current);
387
+ if (sharedConfig.context && value.parentNode) return (current = multi ? [value] : value);
390
388
  if (Array.isArray(current)) {
391
389
  if (multi) return (current = cleanChildren(parent, current, marker, value));
392
390
  cleanChildren(parent, current, null, value);
package/src/constants.js CHANGED
@@ -51,6 +51,7 @@ const DelegatedEvents = new Set([
51
51
  "beforeinput",
52
52
  "click",
53
53
  "dblclick",
54
+ "contextmenu",
54
55
  "focusin",
55
56
  "focusout",
56
57
  "input",