@jsenv/dom 0.17.35 → 0.17.36

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.
Files changed (2) hide show
  1. package/dist/jsenv_dom.js +21 -17
  2. package/package.json +1 -1
package/dist/jsenv_dom.js CHANGED
@@ -9482,7 +9482,7 @@ const css$4 = /* css */`[data-drag-handle], [data-drag-source] {
9482
9482
  touch-action: pinch-zoom;
9483
9483
  }
9484
9484
 
9485
- [data-drag-ignore], [data-own-target], [data-drag-source] [popover], [data-drag-source] dialog {
9485
+ [data-drag-ignore], [data-self-interactions~="drag"], [data-self-interactions~="*"], [data-drag-source] [popover], [data-drag-source] dialog {
9486
9486
  -webkit-touch-callout: default;
9487
9487
  touch-action: auto;
9488
9488
  }
@@ -11881,7 +11881,7 @@ const css$1 = /* css */`.navi_drop_hint {
11881
11881
  cursor: default;
11882
11882
  }
11883
11883
 
11884
- [data-drag-ignore], [data-own-target], [data-drag-source] [popover], [data-drag-source] dialog {
11884
+ [data-drag-ignore], [data-self-interactions~="drag"], [data-self-interactions~="*"], [data-drag-source] [popover], [data-drag-source] dialog {
11885
11885
  cursor: auto;
11886
11886
  }
11887
11887
 
@@ -11946,15 +11946,19 @@ import.meta.css = [css$1, "@jsenv/dom/src/interaction/drag/drag_to.js"];
11946
11946
 
11947
11947
  // What a press must not be read from at all. `data-drag-ignore` is said by
11948
11948
  // something whose press is its own business — a text one wants to select, a
11949
- // control that reads the pointer itself. `data-own-target` is the same fact said
11950
- // once for every gesture there is: an element declaring that a press landing on
11951
- // it is aimed AT it, whatever it happens to sit inside (see also
11952
- // DRAG_EXCLUDED_SELECTOR in drag_to_travel.js). A popover or a dialog says it
11953
- // without being asked: it is a layer OVER the surface, so a press in it is aimed
11954
- // at the layer — yet it stays a descendant of whatever it is anchored in (a
11955
- // callout next to a button, in the card that carries both), and the press
11956
- // bubbles through the surface as if it had landed on it.
11957
- const DRAG_IGNORED_SELECTOR = "[data-drag-ignore],[data-own-target],[popover],dialog";
11949
+ // control that reads the pointer itself — and it means every gesture at once.
11950
+ // `data-self-interactions` says a narrower thing, and says which: an element
11951
+ // declaring the interactions that are ITS own, whatever it happens to sit
11952
+ // inside, the rest being left to what it sits in. Only the ones naming `drag`
11953
+ // take the grab away from the surface (see also DRAG_EXCLUDED_SELECTOR in
11954
+ // drag_to_travel.js) — an affordance that took the click alone is one a finger
11955
+ // may still pick the object up by, which is what it is for when it covers a real
11956
+ // part of that object. A popover or a dialog says it without being asked: it is
11957
+ // a layer OVER the surface, so a press in it is aimed at the layer — yet it
11958
+ // stays a descendant of whatever it is anchored in (a callout next to a button,
11959
+ // in the card that carries both), and the press bubbles through the surface as
11960
+ // if it had landed on it.
11961
+ const DRAG_IGNORED_SELECTOR = '[data-drag-ignore],[data-self-interactions~="drag"],[data-self-interactions~="*"],[popover],dialog';
11958
11962
 
11959
11963
  /**
11960
11964
  * Starts a drag-to-reorder interaction on a list item.
@@ -13403,12 +13407,12 @@ const DRAG_RESISTANCE = 0.3;
13403
13407
  // out. A drag SOURCE is not either: it says which way it goes and only takes
13404
13408
  // that (see DRAG_SOURCE_AXES_ATTRIBUTE) — but a dedicated handle is, being a
13405
13409
  // place whose only purpose is to be taken hold of, from the first pixel. And so
13406
- // is an OWN TARGET: an element saying a press landing on it is aimed at IT,
13407
- // which is the same sentence said to every gesture at once rather than to this
13408
- // one (see DRAG_IGNORED_SELECTOR in drag_to.js). And so is a popover or a
13409
- // dialog: a layer OVER the box, whose press only bubbles through the box because
13410
- // the layer is anchored in it.
13411
- const DRAG_EXCLUDED_SELECTOR = ["input", "textarea", "select", '[contenteditable=""]', '[contenteditable="true"]', "[data-drag-handle]", "[data-no-drag-travel]", "[data-own-target]", "[popover]", "dialog"].join(",");
13410
+ // is an element naming `drag` among its own interactions: it said the grab is
13411
+ // ITS, here, rather than the box's — and one that named only the click said
13412
+ // nothing to this gesture and is passed through (see DRAG_IGNORED_SELECTOR in
13413
+ // drag_to.js). And so is a popover or a dialog: a layer OVER the box, whose
13414
+ // press only bubbles through the box because the layer is anchored in it.
13415
+ const DRAG_EXCLUDED_SELECTOR = ["input", "textarea", "select", '[contenteditable=""]', '[contenteditable="true"]', "[data-drag-handle]", "[data-no-drag-travel]", '[data-self-interactions~="drag"]', '[data-self-interactions~="*"]', "[popover]", "dialog"].join(",");
13412
13416
 
13413
13417
  // Which axes a box travels on, one attribute per gesture, said in the DOM by
13414
13418
  // whoever owns the box: it is what a box ABOVE another reads to know the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/dom",
3
- "version": "0.17.35",
3
+ "version": "0.17.36",
4
4
  "type": "module",
5
5
  "description": "DOM utilities for writing frontend code",
6
6
  "repository": {