@public-ui/hydrate 1.7.24 → 1.7.25

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/index.js +30 -21
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -7469,7 +7469,7 @@ const handleColorChange = (value) => {
7469
7469
  break;
7470
7470
  }
7471
7471
  case null:
7472
- console.warn(`_color was empty or invalid (${JSON.stringify(value)})`);
7472
+ Log.warn(`_color was empty or invalid (${JSON.stringify(value)})`, { forceLog: true });
7473
7473
  colorContrast = createContrastColorPair({
7474
7474
  background: '#000',
7475
7475
  foreground: '#000',
@@ -7576,7 +7576,7 @@ class KolBadge {
7576
7576
  const UNIQUE_LABELS = new Set();
7577
7577
  function addNavLabel(ariaLabel) {
7578
7578
  if (UNIQUE_LABELS.has(ariaLabel)) {
7579
- console.error(`There already is a nav element with the label "${ariaLabel}"`);
7579
+ Log.error(`There already is a nav element with the label "${ariaLabel}"`, { forceLog: true });
7580
7580
  }
7581
7581
  else {
7582
7582
  UNIQUE_LABELS.add(ariaLabel);
@@ -14252,12 +14252,21 @@ function getPaddingObject(padding) {
14252
14252
  };
14253
14253
  }
14254
14254
  function rectToClientRect(rect) {
14255
+ const {
14256
+ x,
14257
+ y,
14258
+ width,
14259
+ height
14260
+ } = rect;
14255
14261
  return {
14256
- ...rect,
14257
- top: rect.y,
14258
- left: rect.x,
14259
- right: rect.x + rect.width,
14260
- bottom: rect.y + rect.height
14262
+ width,
14263
+ height,
14264
+ top: y,
14265
+ left: x,
14266
+ right: x + width,
14267
+ bottom: y + height,
14268
+ x,
14269
+ y
14261
14270
  };
14262
14271
  }
14263
14272
 
@@ -15324,6 +15333,15 @@ function isOverflowElement(element) {
15324
15333
  function isTableElement(element) {
15325
15334
  return ['table', 'td', 'th'].includes(getNodeName(element));
15326
15335
  }
15336
+ function isTopLayer(element) {
15337
+ return [':popover-open', ':modal'].some(selector => {
15338
+ try {
15339
+ return element.matches(selector);
15340
+ } catch (e) {
15341
+ return false;
15342
+ }
15343
+ });
15344
+ }
15327
15345
  function isContainingBlock(element) {
15328
15346
  const webkit = isWebKit();
15329
15347
  const css = getComputedStyle(element);
@@ -15334,11 +15352,13 @@ function isContainingBlock(element) {
15334
15352
  function getContainingBlock(element) {
15335
15353
  let currentNode = getParentNode(element);
15336
15354
  while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
15355
+ if (isTopLayer(currentNode)) {
15356
+ return null;
15357
+ }
15337
15358
  if (isContainingBlock(currentNode)) {
15338
15359
  return currentNode;
15339
- } else {
15340
- currentNode = getParentNode(currentNode);
15341
15360
  }
15361
+ currentNode = getParentNode(currentNode);
15342
15362
  }
15343
15363
  return null;
15344
15364
  }
@@ -15533,17 +15553,6 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
15533
15553
  });
15534
15554
  }
15535
15555
 
15536
- const topLayerSelectors = [':popover-open', ':modal'];
15537
- function isTopLayer(element) {
15538
- return topLayerSelectors.some(selector => {
15539
- try {
15540
- return element.matches(selector);
15541
- } catch (e) {
15542
- return false;
15543
- }
15544
- });
15545
- }
15546
-
15547
15556
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
15548
15557
  let {
15549
15558
  elements,
@@ -16884,7 +16893,7 @@ class KolSpan {
16884
16893
  this._label = undefined;
16885
16894
  }
16886
16895
  render() {
16887
- return (hAsync(KolSpanWcTag, { key: '8aedf03324bf4523a9472fcf15eba5058d7009a1', _icons: this._icons || this._icon, _hideLabel: this._hideLabel, _label: this._label, class: "kol-span" }, hAsync("slot", { key: 'bb1432cb61dafef1135c3e9fc59a24148aec8c02', name: "expert", slot: "expert" })));
16896
+ return (hAsync(KolSpanWcTag, { key: 'a788b90468806bfe35b375f4945987213af57c7b', _icons: this._icons || this._icon, _hideLabel: this._hideLabel, _label: this._label, class: "kol-span" }, hAsync("slot", { key: '81012eadd30eb01ef5f1807237303484ffbb1e34', name: "expert", slot: "expert" })));
16888
16897
  }
16889
16898
  static get style() { return {
16890
16899
  default: KolSpanDefaultStyle0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/hydrate",
3
- "version": "1.7.24",
3
+ "version": "1.7.25",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": {
@@ -46,10 +46,10 @@
46
46
  ],
47
47
  "devDependencies": {
48
48
  "rimraf": "5.0.7",
49
- "@public-ui/components": "1.7.24"
49
+ "@public-ui/components": "1.7.25"
50
50
  },
51
51
  "peerDependencies": {
52
- "@public-ui/components": "1.7.24"
52
+ "@public-ui/components": "1.7.25"
53
53
  },
54
54
  "sideEffects": false,
55
55
  "type": "commonjs",