@digipair/skill-web-spectrum 0.21.1 → 0.21.6

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 (3) hide show
  1. package/index.cjs.js +35 -24
  2. package/index.esm.js +35 -24
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -1158,7 +1158,7 @@ var t$z = globalThis, i$m = t$z.trustedTypes, s$h = i$m ? i$m.createPolicy("lit-
1158
1158
  createHTML: function(t) {
1159
1159
  return t;
1160
1160
  }
1161
- }) : void 0, e$H = "$lit$", h$o = "lit$".concat((Math.random() + "").slice(9), "$"), o$R = "?" + h$o, n$s = "<".concat(o$R, ">"), r$D = document, l$f = function() {
1161
+ }) : void 0, e$H = "$lit$", h$o = "lit$".concat(Math.random().toFixed(9).slice(2), "$"), o$R = "?" + h$o, n$s = "<".concat(o$R, ">"), r$D = document, l$f = function() {
1162
1162
  return r$D.createComment("");
1163
1163
  }, c$A = function(t) {
1164
1164
  return null === t || "object" != typeof t && "function" != typeof t;
@@ -1634,7 +1634,7 @@ var z$1 = {
1634
1634
  F: L$1
1635
1635
  }, Z = t$z.litHtmlPolyfillSupport;
1636
1636
  var _litHtmlVersions;
1637
- Z === null || Z === void 0 ? void 0 : Z(V, M$2), ((_litHtmlVersions = (_t = t$z).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t.litHtmlVersions = []).push("3.1.2");
1637
+ Z === null || Z === void 0 ? void 0 : Z(V, M$2), ((_litHtmlVersions = (_t = t$z).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t.litHtmlVersions = []).push("3.1.4");
1638
1638
  var j = function(t, i, s) {
1639
1639
  var _s_renderBefore;
1640
1640
  var e = (_s_renderBefore = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore !== void 0 ? _s_renderBefore : i;
@@ -1822,7 +1822,7 @@ r$C === null || r$C === void 0 ? void 0 : r$C({
1822
1822
  LitElement: s$g
1823
1823
  });
1824
1824
  var _litElementVersions;
1825
- ((_litElementVersions = (_globalThis1 = globalThis).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _globalThis1.litElementVersions = []).push("4.0.4");
1825
+ ((_litElementVersions = (_globalThis1 = globalThis).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _globalThis1.litElementVersions = []).push("4.0.6");
1826
1826
 
1827
1827
  // Generated by genversion.
1828
1828
  var version = "0.43.0";
@@ -29056,7 +29056,7 @@ function _detectOverflow() {
29056
29056
  options: options,
29057
29057
  fn: function fn(state) {
29058
29058
  return _async_to_generator$q(function() {
29059
- var _middlewareData$arrow, _middlewareData$flip, placement, middlewareData, rects, initialPlacement, platform, elements, _evaluate, tmp, checkMainAxis, tmp1, checkCrossAxis, specifiedFallbackPlacements, _evaluate_fallbackStrategy, fallbackStrategy, _evaluate_fallbackAxisSideDirection, fallbackAxisSideDirection, _evaluate_flipAlignment, flipAlignment, detectOverflowOptions, side, isBasePlacement, rtl, fallbackPlacements, _fallbackPlacements, placements, overflow, overflows, overflowsData, sides, _middlewareData$flip2, _overflowsData$filter, nextIndex, nextPlacement, resetPlacement, _overflowsData$map$so, placement1;
29059
+ var _middlewareData$arrow, _middlewareData$flip, placement, middlewareData, rects, initialPlacement, platform, elements, _evaluate, tmp, checkMainAxis, tmp1, checkCrossAxis, specifiedFallbackPlacements, _evaluate_fallbackStrategy, fallbackStrategy, _evaluate_fallbackAxisSideDirection, fallbackAxisSideDirection, _evaluate_flipAlignment, flipAlignment, detectOverflowOptions, side, initialSideAxis, isBasePlacement, rtl, fallbackPlacements, hasFallbackAxisSideDirection, _fallbackPlacements, placements, overflow, overflows, overflowsData, sides, _middlewareData$flip2, _overflowsData$filter, nextIndex, nextPlacement, resetPlacement, _overflowsData$filter2, placement1;
29060
29060
  return _ts_generator$q(this, function(_state) {
29061
29061
  switch(_state.label){
29062
29062
  case 0:
@@ -29080,6 +29080,7 @@ function _detectOverflow() {
29080
29080
  ];
29081
29081
  }
29082
29082
  side = getSide(placement);
29083
+ initialSideAxis = getSideAxis(initialPlacement);
29083
29084
  isBasePlacement = getSide(initialPlacement) === initialPlacement;
29084
29085
  return [
29085
29086
  4,
@@ -29090,7 +29091,8 @@ function _detectOverflow() {
29090
29091
  fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [
29091
29092
  getOppositePlacement(initialPlacement)
29092
29093
  ] : getExpandedPlacements(initialPlacement));
29093
- if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") {
29094
+ hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
29095
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
29094
29096
  (_fallbackPlacements = fallbackPlacements).push.apply(_fallbackPlacements, _to_consumable_array$k(getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)));
29095
29097
  }
29096
29098
  placements = [
@@ -29150,7 +29152,15 @@ function _detectOverflow() {
29150
29152
  switch(fallbackStrategy){
29151
29153
  case "bestFit":
29152
29154
  {
29153
- placement1 = (_overflowsData$map$so = overflowsData.map(function(d) {
29155
+ placement1 = (_overflowsData$filter2 = overflowsData.filter(function(d) {
29156
+ if (hasFallbackAxisSideDirection) {
29157
+ var currentSideAxis = getSideAxis(d.placement);
29158
+ return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
29159
+ // reading directions favoring greater width.
29160
+ currentSideAxis === "y";
29161
+ }
29162
+ return true;
29163
+ }).map(function(d) {
29154
29164
  return [
29155
29165
  d.placement,
29156
29166
  d.overflows.filter(function(overflow) {
@@ -29161,7 +29171,7 @@ function _detectOverflow() {
29161
29171
  ];
29162
29172
  }).sort(function(a, b) {
29163
29173
  return a[1] - b[1];
29164
- })[0]) == null ? void 0 : _overflowsData$map$so[0];
29174
+ })[0]) == null ? void 0 : _overflowsData$filter2[0];
29165
29175
  if (placement1) {
29166
29176
  resetPlacement = placement1;
29167
29177
  }
@@ -29538,6 +29548,18 @@ function isTableElement(element) {
29538
29548
  "th"
29539
29549
  ].includes(getNodeName(element));
29540
29550
  }
29551
+ function isTopLayer(element) {
29552
+ return [
29553
+ ":popover-open",
29554
+ ":modal"
29555
+ ].some(function(selector) {
29556
+ try {
29557
+ return element.matches(selector);
29558
+ } catch (e) {
29559
+ return false;
29560
+ }
29561
+ });
29562
+ }
29541
29563
  function isContainingBlock(element) {
29542
29564
  var webkit = isWebKit();
29543
29565
  var css = getComputedStyle$1(element);
@@ -29560,6 +29582,9 @@ function isContainingBlock(element) {
29560
29582
  function getContainingBlock(element) {
29561
29583
  var currentNode = getParentNode(element);
29562
29584
  while(isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)){
29585
+ if (isTopLayer(currentNode)) {
29586
+ return null;
29587
+ }
29563
29588
  if (isContainingBlock(currentNode)) {
29564
29589
  return currentNode;
29565
29590
  }
@@ -29589,8 +29614,8 @@ function getNodeScroll(element) {
29589
29614
  };
29590
29615
  }
29591
29616
  return {
29592
- scrollLeft: element.pageXOffset,
29593
- scrollTop: element.pageYOffset
29617
+ scrollLeft: element.scrollX,
29618
+ scrollTop: element.scrollY
29594
29619
  };
29595
29620
  }
29596
29621
  function getParentNode(node) {
@@ -29981,19 +30006,6 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
29981
30006
  y: y
29982
30007
  });
29983
30008
  }
29984
- var topLayerSelectors = [
29985
- ":popover-open",
29986
- ":modal"
29987
- ];
29988
- function isTopLayer(element) {
29989
- return topLayerSelectors.some(function(selector) {
29990
- try {
29991
- return element.matches(selector);
29992
- } catch (e) {
29993
- return false;
29994
- }
29995
- });
29996
- }
29997
30009
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
29998
30010
  var elements = _ref.elements, rect = _ref.rect, offsetParent = _ref.offsetParent, strategy = _ref.strategy;
29999
30011
  var isFixed = strategy === "fixed";
@@ -50878,14 +50890,13 @@ function _ts_generator$7(thisArg, body) {
50878
50890
  };
50879
50891
  }
50880
50892
  }
50881
- var _window;
50882
50893
  // Virtualizer depends on `ResizeObserver`, which is supported in
50883
50894
  // all modern browsers. For developers whose browser support
50884
50895
  // matrix includes older browsers, we include a compatible
50885
50896
  // polyfill in the package; this bit of module state facilitates
50886
50897
  // a simple mechanism (see ./polyfillLoaders/ResizeObserver.js.)
50887
50898
  // for loading the polyfill.
50888
- var _ResizeObserver = (_window = window) === null || _window === void 0 ? void 0 : _window.ResizeObserver;
50899
+ var _ResizeObserver = typeof window !== "undefined" ? window.ResizeObserver : undefined;
50889
50900
  var virtualizerRef = Symbol("virtualizerRef");
50890
50901
  var SIZER_ATTRIBUTE = "virtualizer-sizer";
50891
50902
  var DefaultLayoutConstructor;
package/index.esm.js CHANGED
@@ -1156,7 +1156,7 @@ var t$z = globalThis, i$m = t$z.trustedTypes, s$h = i$m ? i$m.createPolicy("lit-
1156
1156
  createHTML: function(t) {
1157
1157
  return t;
1158
1158
  }
1159
- }) : void 0, e$H = "$lit$", h$o = "lit$".concat((Math.random() + "").slice(9), "$"), o$R = "?" + h$o, n$s = "<".concat(o$R, ">"), r$D = document, l$f = function() {
1159
+ }) : void 0, e$H = "$lit$", h$o = "lit$".concat(Math.random().toFixed(9).slice(2), "$"), o$R = "?" + h$o, n$s = "<".concat(o$R, ">"), r$D = document, l$f = function() {
1160
1160
  return r$D.createComment("");
1161
1161
  }, c$A = function(t) {
1162
1162
  return null === t || "object" != typeof t && "function" != typeof t;
@@ -1632,7 +1632,7 @@ var z$1 = {
1632
1632
  F: L$1
1633
1633
  }, Z = t$z.litHtmlPolyfillSupport;
1634
1634
  var _litHtmlVersions;
1635
- Z === null || Z === void 0 ? void 0 : Z(V, M$2), ((_litHtmlVersions = (_t = t$z).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t.litHtmlVersions = []).push("3.1.2");
1635
+ Z === null || Z === void 0 ? void 0 : Z(V, M$2), ((_litHtmlVersions = (_t = t$z).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t.litHtmlVersions = []).push("3.1.4");
1636
1636
  var j = function(t, i, s) {
1637
1637
  var _s_renderBefore;
1638
1638
  var e = (_s_renderBefore = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore !== void 0 ? _s_renderBefore : i;
@@ -1820,7 +1820,7 @@ r$C === null || r$C === void 0 ? void 0 : r$C({
1820
1820
  LitElement: s$g
1821
1821
  });
1822
1822
  var _litElementVersions;
1823
- ((_litElementVersions = (_globalThis1 = globalThis).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _globalThis1.litElementVersions = []).push("4.0.4");
1823
+ ((_litElementVersions = (_globalThis1 = globalThis).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _globalThis1.litElementVersions = []).push("4.0.6");
1824
1824
 
1825
1825
  // Generated by genversion.
1826
1826
  var version = "0.43.0";
@@ -29054,7 +29054,7 @@ function _detectOverflow() {
29054
29054
  options: options,
29055
29055
  fn: function fn(state) {
29056
29056
  return _async_to_generator$q(function() {
29057
- var _middlewareData$arrow, _middlewareData$flip, placement, middlewareData, rects, initialPlacement, platform, elements, _evaluate, tmp, checkMainAxis, tmp1, checkCrossAxis, specifiedFallbackPlacements, _evaluate_fallbackStrategy, fallbackStrategy, _evaluate_fallbackAxisSideDirection, fallbackAxisSideDirection, _evaluate_flipAlignment, flipAlignment, detectOverflowOptions, side, isBasePlacement, rtl, fallbackPlacements, _fallbackPlacements, placements, overflow, overflows, overflowsData, sides, _middlewareData$flip2, _overflowsData$filter, nextIndex, nextPlacement, resetPlacement, _overflowsData$map$so, placement1;
29057
+ var _middlewareData$arrow, _middlewareData$flip, placement, middlewareData, rects, initialPlacement, platform, elements, _evaluate, tmp, checkMainAxis, tmp1, checkCrossAxis, specifiedFallbackPlacements, _evaluate_fallbackStrategy, fallbackStrategy, _evaluate_fallbackAxisSideDirection, fallbackAxisSideDirection, _evaluate_flipAlignment, flipAlignment, detectOverflowOptions, side, initialSideAxis, isBasePlacement, rtl, fallbackPlacements, hasFallbackAxisSideDirection, _fallbackPlacements, placements, overflow, overflows, overflowsData, sides, _middlewareData$flip2, _overflowsData$filter, nextIndex, nextPlacement, resetPlacement, _overflowsData$filter2, placement1;
29058
29058
  return _ts_generator$q(this, function(_state) {
29059
29059
  switch(_state.label){
29060
29060
  case 0:
@@ -29078,6 +29078,7 @@ function _detectOverflow() {
29078
29078
  ];
29079
29079
  }
29080
29080
  side = getSide(placement);
29081
+ initialSideAxis = getSideAxis(initialPlacement);
29081
29082
  isBasePlacement = getSide(initialPlacement) === initialPlacement;
29082
29083
  return [
29083
29084
  4,
@@ -29088,7 +29089,8 @@ function _detectOverflow() {
29088
29089
  fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [
29089
29090
  getOppositePlacement(initialPlacement)
29090
29091
  ] : getExpandedPlacements(initialPlacement));
29091
- if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") {
29092
+ hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
29093
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
29092
29094
  (_fallbackPlacements = fallbackPlacements).push.apply(_fallbackPlacements, _to_consumable_array$k(getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl)));
29093
29095
  }
29094
29096
  placements = [
@@ -29148,7 +29150,15 @@ function _detectOverflow() {
29148
29150
  switch(fallbackStrategy){
29149
29151
  case "bestFit":
29150
29152
  {
29151
- placement1 = (_overflowsData$map$so = overflowsData.map(function(d) {
29153
+ placement1 = (_overflowsData$filter2 = overflowsData.filter(function(d) {
29154
+ if (hasFallbackAxisSideDirection) {
29155
+ var currentSideAxis = getSideAxis(d.placement);
29156
+ return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
29157
+ // reading directions favoring greater width.
29158
+ currentSideAxis === "y";
29159
+ }
29160
+ return true;
29161
+ }).map(function(d) {
29152
29162
  return [
29153
29163
  d.placement,
29154
29164
  d.overflows.filter(function(overflow) {
@@ -29159,7 +29169,7 @@ function _detectOverflow() {
29159
29169
  ];
29160
29170
  }).sort(function(a, b) {
29161
29171
  return a[1] - b[1];
29162
- })[0]) == null ? void 0 : _overflowsData$map$so[0];
29172
+ })[0]) == null ? void 0 : _overflowsData$filter2[0];
29163
29173
  if (placement1) {
29164
29174
  resetPlacement = placement1;
29165
29175
  }
@@ -29536,6 +29546,18 @@ function isTableElement(element) {
29536
29546
  "th"
29537
29547
  ].includes(getNodeName(element));
29538
29548
  }
29549
+ function isTopLayer(element) {
29550
+ return [
29551
+ ":popover-open",
29552
+ ":modal"
29553
+ ].some(function(selector) {
29554
+ try {
29555
+ return element.matches(selector);
29556
+ } catch (e) {
29557
+ return false;
29558
+ }
29559
+ });
29560
+ }
29539
29561
  function isContainingBlock(element) {
29540
29562
  var webkit = isWebKit();
29541
29563
  var css = getComputedStyle$1(element);
@@ -29558,6 +29580,9 @@ function isContainingBlock(element) {
29558
29580
  function getContainingBlock(element) {
29559
29581
  var currentNode = getParentNode(element);
29560
29582
  while(isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)){
29583
+ if (isTopLayer(currentNode)) {
29584
+ return null;
29585
+ }
29561
29586
  if (isContainingBlock(currentNode)) {
29562
29587
  return currentNode;
29563
29588
  }
@@ -29587,8 +29612,8 @@ function getNodeScroll(element) {
29587
29612
  };
29588
29613
  }
29589
29614
  return {
29590
- scrollLeft: element.pageXOffset,
29591
- scrollTop: element.pageYOffset
29615
+ scrollLeft: element.scrollX,
29616
+ scrollTop: element.scrollY
29592
29617
  };
29593
29618
  }
29594
29619
  function getParentNode(node) {
@@ -29979,19 +30004,6 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
29979
30004
  y: y
29980
30005
  });
29981
30006
  }
29982
- var topLayerSelectors = [
29983
- ":popover-open",
29984
- ":modal"
29985
- ];
29986
- function isTopLayer(element) {
29987
- return topLayerSelectors.some(function(selector) {
29988
- try {
29989
- return element.matches(selector);
29990
- } catch (e) {
29991
- return false;
29992
- }
29993
- });
29994
- }
29995
30007
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
29996
30008
  var elements = _ref.elements, rect = _ref.rect, offsetParent = _ref.offsetParent, strategy = _ref.strategy;
29997
30009
  var isFixed = strategy === "fixed";
@@ -50876,14 +50888,13 @@ function _ts_generator$7(thisArg, body) {
50876
50888
  };
50877
50889
  }
50878
50890
  }
50879
- var _window;
50880
50891
  // Virtualizer depends on `ResizeObserver`, which is supported in
50881
50892
  // all modern browsers. For developers whose browser support
50882
50893
  // matrix includes older browsers, we include a compatible
50883
50894
  // polyfill in the package; this bit of module state facilitates
50884
50895
  // a simple mechanism (see ./polyfillLoaders/ResizeObserver.js.)
50885
50896
  // for loading the polyfill.
50886
- var _ResizeObserver = (_window = window) === null || _window === void 0 ? void 0 : _window.ResizeObserver;
50897
+ var _ResizeObserver = typeof window !== "undefined" ? window.ResizeObserver : undefined;
50887
50898
  var virtualizerRef = Symbol("virtualizerRef");
50888
50899
  var SIZER_ATTRIBUTE = "virtualizer-sizer";
50889
50900
  var DefaultLayoutConstructor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web-spectrum",
3
- "version": "0.21.1",
3
+ "version": "0.21.6",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"