@opentiny/vue-renderless 3.17.1 → 3.17.2

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __spreadValues
3
3
  } from "../../chunk-G2ADBYYC.js";
4
- import { on, off, isDisplayNone } from "./dom";
4
+ import { on, off, isDisplayNone, isServer } from "./dom";
5
5
  import PopupManager from "./popup-manager";
6
6
  import globalConfig from "../global";
7
7
  import { typeOf } from "../type";
@@ -186,13 +186,16 @@ const getOffsetRect = (el) => {
186
186
  const stopFn = (ev) => {
187
187
  ev.stopPropagation();
188
188
  };
189
- const resizeOb = new ResizeObserver((entries) => {
190
- entries.forEach((entry) => {
191
- if (entry.target.popperVm && entry.contentRect.height > 50) {
192
- entry.target.popperVm.update();
193
- }
189
+ let resizeOb;
190
+ if (!isServer) {
191
+ resizeOb = new ResizeObserver((entries) => {
192
+ entries.forEach((entry) => {
193
+ if (entry.target.popperVm && entry.contentRect.height > 50) {
194
+ entry.target.popperVm.update();
195
+ }
196
+ });
194
197
  });
195
- });
198
+ }
196
199
  class Popper {
197
200
  constructor(reference, popper, options) {
198
201
  this.modifiers = {};
@@ -210,7 +213,7 @@ class Popper {
210
213
  setStyle(this._popper, { position: this.state.position, top: 0 });
211
214
  if (this._popper) {
212
215
  this._popper.popperVm = this;
213
- resizeOb.observe(this._popper);
216
+ resizeOb && resizeOb.observe(this._popper);
214
217
  }
215
218
  this.update();
216
219
  this._setupEventListeners();
package/common/index.js CHANGED
@@ -237,7 +237,7 @@ const CASCADER = {
237
237
  PropsHover: "hoverThreshold",
238
238
  MenuConnector: "cascader-menu-"
239
239
  };
240
- const version = "3.17.1";
240
+ const version = "3.17.2";
241
241
  const log = (data, type = "log") => {
242
242
  uLog.logger[type](data);
243
243
  };
package/common/runtime.js CHANGED
@@ -22,7 +22,7 @@ import vuePopup from "./deps/vue-popup";
22
22
  import validate from "./validate";
23
23
  import memorize from "./deps/memorize";
24
24
  import * as common from ".";
25
- const version = "3.17.1";
25
+ const version = "3.17.2";
26
26
  const Renderless = {
27
27
  browser,
28
28
  array,
package/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "@opentiny/vue-renderless",
3
- "version": "3.17.1",
3
+ "version": "3.17.2",
4
4
  "description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
5
+ "author": "OpenTiny Team",
6
+ "license": "MIT",
5
7
  "homepage": "https://opentiny.design/tiny-vue",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git@github.com:opentiny/tiny-vue.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/opentiny/tiny-vue/issues"
14
+ },
6
15
  "keywords": [
7
16
  "vue",
8
17
  "vue3",
@@ -14,19 +23,10 @@
14
23
  "renderless-components",
15
24
  "headless-components"
16
25
  ],
17
- "author": "OpenTiny Team",
18
- "license": "MIT",
19
- "repository": {
20
- "type": "git",
21
- "url": "git@github.com:opentiny/tiny-vue.git"
22
- },
23
- "bugs": {
24
- "url": "https://github.com/opentiny/tiny-vue/issues"
25
- },
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "xss": "1.0.11",
29
- "color": "4.2.3"
28
+ "color": "4.2.3",
29
+ "xss": "1.0.11"
30
30
  },
31
31
  "devDependencies": {
32
32
  "esno": "^0.16.3",