@opentinyvue/vue-guide 2.22.1 → 2.24.0

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/lib/pc.js +85 -248
  2. package/package.json +5 -5
package/lib/pc.js CHANGED
@@ -33,243 +33,86 @@ function normalizeComponent(scriptExports, render, staticRenderFns, functionalTe
33
33
  };
34
34
  }
35
35
 
36
- function _regeneratorRuntime() {
37
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
38
- _regeneratorRuntime = function _regeneratorRuntime2() {
39
- return e;
40
- };
41
- var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function(t2, e2, r2) {
42
- t2[e2] = r2.value;
43
- }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag";
44
- function define(t2, e2, r2) {
45
- return Object.defineProperty(t2, e2, { value: r2, enumerable: true, configurable: true, writable: true }), t2[e2];
46
- }
47
- try {
48
- define({}, "");
49
- } catch (t2) {
50
- define = function define2(t3, e2, r2) {
51
- return t3[e2] = r2;
52
- };
53
- }
54
- function wrap(t2, e2, r2, n2) {
55
- var i2 = e2 && e2.prototype instanceof Generator ? e2 : Generator, a2 = Object.create(i2.prototype), c2 = new Context(n2 || []);
56
- return o(a2, "_invoke", { value: makeInvokeMethod(t2, r2, c2) }), a2;
57
- }
58
- function tryCatch(t2, e2, r2) {
59
- try {
60
- return { type: "normal", arg: t2.call(e2, r2) };
61
- } catch (t3) {
62
- return { type: "throw", arg: t3 };
63
- }
36
+ function _regenerator() {
37
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
38
+ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
39
+ function i(r2, n2, o2, i2) {
40
+ var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
41
+ return _regeneratorDefine2(u2, "_invoke", function(r3, n3, o3) {
42
+ var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
43
+ return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
44
+ } };
45
+ function d(r4, n4) {
46
+ for (c3 = r4, u3 = n4, t = 0; !y && f2 && !o4 && t < p.length; t++) {
47
+ var o4, i4 = p[t], d2 = G.p, l = i4[2];
48
+ r4 > 3 ? (o4 = l === n4) && (c3 = i4[4] || 3, u3 = i4[5] === e ? i4[3] : i4[5], i4[4] = 3, i4[5] = e) : i4[0] <= d2 && ((o4 = r4 < 2 && d2 < i4[1]) ? (c3 = 0, G.v = n4, G.n = i4[1]) : d2 < l && (o4 = r4 < 3 || i4[0] > n4 || n4 > l) && (i4[4] = r4, i4[5] = n4, G.n = l, c3 = 0));
49
+ }
50
+ if (o4 || r4 > 1) return a;
51
+ throw y = true, n4;
52
+ }
53
+ return function(o4, p2, l) {
54
+ if (f2 > 1) throw TypeError("Generator is already running");
55
+ for (y && 1 === p2 && d(p2, l), c3 = p2, u3 = l; (t = c3 < 2 ? e : u3) || !y; ) {
56
+ i3 || (c3 ? c3 < 3 ? (c3 > 1 && (G.n = -1), d(c3, u3)) : G.n = u3 : G.v = u3);
57
+ try {
58
+ if (f2 = 2, i3) {
59
+ if (c3 || (o4 = "next"), t = i3[o4]) {
60
+ if (!(t = t.call(i3, u3))) throw TypeError("iterator result is not an object");
61
+ if (!t.done) return t;
62
+ u3 = t.value, c3 < 2 && (c3 = 0);
63
+ } else 1 === c3 && (t = i3.return) && t.call(i3), c3 < 2 && (u3 = TypeError("The iterator does not provide a '" + o4 + "' method"), c3 = 1);
64
+ i3 = e;
65
+ } else if ((t = (y = G.n < 0) ? u3 : r3.call(n3, G)) !== a) break;
66
+ } catch (t2) {
67
+ i3 = e, c3 = 1, u3 = t2;
68
+ } finally {
69
+ f2 = 1;
70
+ }
71
+ }
72
+ return { value: t, done: y };
73
+ };
74
+ }(r2, o2, i2), true), u2;
64
75
  }
65
- e.wrap = wrap;
66
- var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {};
76
+ var a = {};
67
77
  function Generator() {
68
78
  }
69
79
  function GeneratorFunction() {
70
80
  }
71
81
  function GeneratorFunctionPrototype() {
72
82
  }
73
- var p = {};
74
- define(p, a, function() {
83
+ t = Object.getPrototypeOf;
84
+ var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function() {
75
85
  return this;
76
- });
77
- var d = Object.getPrototypeOf, v = d && d(d(values([])));
78
- v && v !== r && n.call(v, a) && (p = v);
79
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
80
- function defineIteratorMethods(t2) {
81
- ["next", "throw", "return"].forEach(function(e2) {
82
- define(t2, e2, function(t3) {
83
- return this._invoke(e2, t3);
84
- });
85
- });
86
- }
87
- function AsyncIterator(t2, e2) {
88
- function invoke(r3, o2, i2, a2) {
89
- var c2 = tryCatch(t2[r3], t2, o2);
90
- if ("throw" !== c2.type) {
91
- var u2 = c2.arg, h2 = u2.value;
92
- return h2 && "object" == typeof h2 && n.call(h2, "__await") ? e2.resolve(h2.__await).then(function(t3) {
93
- invoke("next", t3, i2, a2);
94
- }, function(t3) {
95
- invoke("throw", t3, i2, a2);
96
- }) : e2.resolve(h2).then(function(t3) {
97
- u2.value = t3, i2(u2);
98
- }, function(t3) {
99
- return invoke("throw", t3, i2, a2);
100
- });
101
- }
102
- a2(c2.arg);
103
- }
104
- var r2;
105
- o(this, "_invoke", { value: function value(t3, n2) {
106
- function callInvokeWithMethodAndArg() {
107
- return new e2(function(e3, r3) {
108
- invoke(t3, n2, e3, r3);
109
- });
110
- }
111
- return r2 = r2 ? r2.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
112
- } });
113
- }
114
- function makeInvokeMethod(e2, r2, n2) {
115
- var o2 = h;
116
- return function(i2, a2) {
117
- if (o2 === f) throw Error("Generator is already running");
118
- if (o2 === s) {
119
- if ("throw" === i2) throw a2;
120
- return { value: t, done: true };
121
- }
122
- for (n2.method = i2, n2.arg = a2; ; ) {
123
- var c2 = n2.delegate;
124
- if (c2) {
125
- var u2 = maybeInvokeDelegate(c2, n2);
126
- if (u2) {
127
- if (u2 === y) continue;
128
- return u2;
129
- }
130
- }
131
- if ("next" === n2.method) n2.sent = n2._sent = n2.arg;
132
- else if ("throw" === n2.method) {
133
- if (o2 === h) throw o2 = s, n2.arg;
134
- n2.dispatchException(n2.arg);
135
- } else "return" === n2.method && n2.abrupt("return", n2.arg);
136
- o2 = f;
137
- var p2 = tryCatch(e2, r2, n2);
138
- if ("normal" === p2.type) {
139
- if (o2 = n2.done ? s : l, p2.arg === y) continue;
140
- return { value: p2.arg, done: n2.done };
141
- }
142
- "throw" === p2.type && (o2 = s, n2.method = "throw", n2.arg = p2.arg);
143
- }
144
- };
86
+ }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
87
+ function f(e2) {
88
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e2, GeneratorFunctionPrototype) : (e2.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e2, o, "GeneratorFunction")), e2.prototype = Object.create(u), e2;
145
89
  }
146
- function maybeInvokeDelegate(e2, r2) {
147
- var n2 = r2.method, o2 = e2.iterator[n2];
148
- if (o2 === t) return r2.delegate = null, "throw" === n2 && e2.iterator.return && (r2.method = "return", r2.arg = t, maybeInvokeDelegate(e2, r2), "throw" === r2.method) || "return" !== n2 && (r2.method = "throw", r2.arg = new TypeError("The iterator does not provide a '" + n2 + "' method")), y;
149
- var i2 = tryCatch(o2, e2.iterator, r2.arg);
150
- if ("throw" === i2.type) return r2.method = "throw", r2.arg = i2.arg, r2.delegate = null, y;
151
- var a2 = i2.arg;
152
- return a2 ? a2.done ? (r2[e2.resultName] = a2.value, r2.next = e2.nextLoc, "return" !== r2.method && (r2.method = "next", r2.arg = t), r2.delegate = null, y) : a2 : (r2.method = "throw", r2.arg = new TypeError("iterator result is not an object"), r2.delegate = null, y);
153
- }
154
- function pushTryEntry(t2) {
155
- var e2 = { tryLoc: t2[0] };
156
- 1 in t2 && (e2.catchLoc = t2[1]), 2 in t2 && (e2.finallyLoc = t2[2], e2.afterLoc = t2[3]), this.tryEntries.push(e2);
157
- }
158
- function resetTryEntry(t2) {
159
- var e2 = t2.completion || {};
160
- e2.type = "normal", delete e2.arg, t2.completion = e2;
161
- }
162
- function Context(t2) {
163
- this.tryEntries = [{ tryLoc: "root" }], t2.forEach(pushTryEntry, this), this.reset(true);
164
- }
165
- function values(e2) {
166
- if (e2 || "" === e2) {
167
- var r2 = e2[a];
168
- if (r2) return r2.call(e2);
169
- if ("function" == typeof e2.next) return e2;
170
- if (!isNaN(e2.length)) {
171
- var o2 = -1, i2 = function next() {
172
- for (; ++o2 < e2.length; ) if (n.call(e2, o2)) return next.value = e2[o2], next.done = false, next;
173
- return next.value = t, next.done = true, next;
174
- };
175
- return i2.next = i2;
176
- }
177
- }
178
- throw new TypeError(typeof e2 + " is not iterable");
179
- }
180
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: true }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: true }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function(t2) {
181
- var e2 = "function" == typeof t2 && t2.constructor;
182
- return !!e2 && (e2 === GeneratorFunction || "GeneratorFunction" === (e2.displayName || e2.name));
183
- }, e.mark = function(t2) {
184
- return Object.setPrototypeOf ? Object.setPrototypeOf(t2, GeneratorFunctionPrototype) : (t2.__proto__ = GeneratorFunctionPrototype, define(t2, u, "GeneratorFunction")), t2.prototype = Object.create(g), t2;
185
- }, e.awrap = function(t2) {
186
- return { __await: t2 };
187
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function() {
188
- return this;
189
- }), e.AsyncIterator = AsyncIterator, e.async = function(t2, r2, n2, o2, i2) {
190
- void 0 === i2 && (i2 = Promise);
191
- var a2 = new AsyncIterator(wrap(t2, r2, n2, o2), i2);
192
- return e.isGeneratorFunction(r2) ? a2 : a2.next().then(function(t3) {
193
- return t3.done ? t3.value : a2.next();
194
- });
195
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function() {
90
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function() {
196
91
  return this;
197
- }), define(g, "toString", function() {
92
+ }), _regeneratorDefine2(u, "toString", function() {
198
93
  return "[object Generator]";
199
- }), e.keys = function(t2) {
200
- var e2 = Object(t2), r2 = [];
201
- for (var n2 in e2) r2.push(n2);
202
- return r2.reverse(), function next() {
203
- for (; r2.length; ) {
204
- var t3 = r2.pop();
205
- if (t3 in e2) return next.value = t3, next.done = false, next;
206
- }
207
- return next.done = true, next;
208
- };
209
- }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e2) {
210
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e2) for (var r2 in this) "t" === r2.charAt(0) && n.call(this, r2) && !isNaN(+r2.slice(1)) && (this[r2] = t);
211
- }, stop: function stop() {
212
- this.done = true;
213
- var t2 = this.tryEntries[0].completion;
214
- if ("throw" === t2.type) throw t2.arg;
215
- return this.rval;
216
- }, dispatchException: function dispatchException(e2) {
217
- if (this.done) throw e2;
218
- var r2 = this;
219
- function handle(n2, o3) {
220
- return a2.type = "throw", a2.arg = e2, r2.next = n2, o3 && (r2.method = "next", r2.arg = t), !!o3;
221
- }
222
- for (var o2 = this.tryEntries.length - 1; o2 >= 0; --o2) {
223
- var i2 = this.tryEntries[o2], a2 = i2.completion;
224
- if ("root" === i2.tryLoc) return handle("end");
225
- if (i2.tryLoc <= this.prev) {
226
- var c2 = n.call(i2, "catchLoc"), u2 = n.call(i2, "finallyLoc");
227
- if (c2 && u2) {
228
- if (this.prev < i2.catchLoc) return handle(i2.catchLoc, true);
229
- if (this.prev < i2.finallyLoc) return handle(i2.finallyLoc);
230
- } else if (c2) {
231
- if (this.prev < i2.catchLoc) return handle(i2.catchLoc, true);
232
- } else {
233
- if (!u2) throw Error("try statement without catch or finally");
234
- if (this.prev < i2.finallyLoc) return handle(i2.finallyLoc);
235
- }
236
- }
237
- }
238
- }, abrupt: function abrupt(t2, e2) {
239
- for (var r2 = this.tryEntries.length - 1; r2 >= 0; --r2) {
240
- var o2 = this.tryEntries[r2];
241
- if (o2.tryLoc <= this.prev && n.call(o2, "finallyLoc") && this.prev < o2.finallyLoc) {
242
- var i2 = o2;
243
- break;
244
- }
245
- }
246
- i2 && ("break" === t2 || "continue" === t2) && i2.tryLoc <= e2 && e2 <= i2.finallyLoc && (i2 = null);
247
- var a2 = i2 ? i2.completion : {};
248
- return a2.type = t2, a2.arg = e2, i2 ? (this.method = "next", this.next = i2.finallyLoc, y) : this.complete(a2);
249
- }, complete: function complete(t2, e2) {
250
- if ("throw" === t2.type) throw t2.arg;
251
- return "break" === t2.type || "continue" === t2.type ? this.next = t2.arg : "return" === t2.type ? (this.rval = this.arg = t2.arg, this.method = "return", this.next = "end") : "normal" === t2.type && e2 && (this.next = e2), y;
252
- }, finish: function finish(t2) {
253
- for (var e2 = this.tryEntries.length - 1; e2 >= 0; --e2) {
254
- var r2 = this.tryEntries[e2];
255
- if (r2.finallyLoc === t2) return this.complete(r2.completion, r2.afterLoc), resetTryEntry(r2), y;
256
- }
257
- }, catch: function _catch(t2) {
258
- for (var e2 = this.tryEntries.length - 1; e2 >= 0; --e2) {
259
- var r2 = this.tryEntries[e2];
260
- if (r2.tryLoc === t2) {
261
- var n2 = r2.completion;
262
- if ("throw" === n2.type) {
263
- var o2 = n2.arg;
264
- resetTryEntry(r2);
265
- }
266
- return o2;
267
- }
94
+ }), (_regenerator = function _regenerator2() {
95
+ return { w: i, m: f };
96
+ })();
97
+ }
98
+ function _regeneratorDefine2(e, r, n, t) {
99
+ var i = Object.defineProperty;
100
+ try {
101
+ i({}, "", {});
102
+ } catch (e2) {
103
+ i = 0;
104
+ }
105
+ _regeneratorDefine2 = function _regeneratorDefine(e2, r2, n2, t2) {
106
+ if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
107
+ else {
108
+ var o = function o2(r3, n3) {
109
+ _regeneratorDefine2(e2, r3, function(e3) {
110
+ return this._invoke(r3, n3, e3);
111
+ });
112
+ };
113
+ o("next", 0), o("throw", 1), o("return", 2);
268
114
  }
269
- throw Error("illegal catch attempt");
270
- }, delegateYield: function delegateYield(e2, r2, n2) {
271
- return this.delegate = { iterator: values(e2), resultName: r2, nextLoc: n2 }, "next" === this.method && (this.arg = t), y;
272
- } }, e;
115
+ }, _regeneratorDefine2(e, r, n, t);
273
116
  }
274
117
  function _extends() {
275
118
  return _extends = Object.assign ? Object.assign.bind() : function(n) {
@@ -319,16 +162,16 @@ function convertValueToCoords(_x, _x2) {
319
162
  return _convertValueToCoords.apply(this, arguments);
320
163
  }
321
164
  function _convertValueToCoords() {
322
- _convertValueToCoords = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2(state, options) {
165
+ _convertValueToCoords = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee2(state, options) {
323
166
  var placement, platform, elements, rtl, side, alignment, isVertical, mainAxisMulti, crossAxisMulti, rawValue, _ref, mainAxis, crossAxis, alignmentAxis;
324
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
325
- while (1) switch (_context2.prev = _context2.next) {
167
+ return _regenerator().w(function(_context2) {
168
+ while (1) switch (_context2.n) {
326
169
  case 0:
327
170
  placement = state.placement, platform = state.platform, elements = state.elements;
328
- _context2.next = 3;
171
+ _context2.n = 1;
329
172
  return platform.isRTL == null ? void 0 : platform.isRTL(elements.floating);
330
- case 3:
331
- rtl = _context2.sent;
173
+ case 1:
174
+ rtl = _context2.v;
332
175
  side = getSide(placement);
333
176
  alignment = getAlignment(placement);
334
177
  isVertical = getSideAxis(placement) === "y";
@@ -347,16 +190,13 @@ function _convertValueToCoords() {
347
190
  if (alignment && typeof alignmentAxis === "number") {
348
191
  crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
349
192
  }
350
- return _context2.abrupt("return", isVertical ? {
193
+ return _context2.a(2, isVertical ? {
351
194
  x: crossAxis * crossAxisMulti,
352
195
  y: mainAxis * mainAxisMulti
353
196
  } : {
354
197
  x: mainAxis * mainAxisMulti,
355
198
  y: crossAxis * crossAxisMulti
356
199
  });
357
- case 13:
358
- case "end":
359
- return _context2.stop();
360
200
  }
361
201
  }, _callee2);
362
202
  }));
@@ -370,32 +210,29 @@ var offset$1 = function offset$12(options) {
370
210
  name: "offset",
371
211
  options,
372
212
  fn: function fn(state) {
373
- return _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
213
+ return _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee() {
374
214
  var _middlewareData$offse, _middlewareData$arrow, x, y, placement, middlewareData, diffCoords;
375
- return _regeneratorRuntime().wrap(function _callee$(_context) {
376
- while (1) switch (_context.prev = _context.next) {
215
+ return _regenerator().w(function(_context) {
216
+ while (1) switch (_context.n) {
377
217
  case 0:
378
218
  x = state.x, y = state.y, placement = state.placement, middlewareData = state.middlewareData;
379
- _context.next = 3;
219
+ _context.n = 1;
380
220
  return convertValueToCoords(state, options);
381
- case 3:
382
- diffCoords = _context.sent;
221
+ case 1:
222
+ diffCoords = _context.v;
383
223
  if (!(placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset)) {
384
- _context.next = 6;
224
+ _context.n = 2;
385
225
  break;
386
226
  }
387
- return _context.abrupt("return", {});
388
- case 6:
389
- return _context.abrupt("return", {
227
+ return _context.a(2, {});
228
+ case 2:
229
+ return _context.a(2, {
390
230
  x: x + diffCoords.x,
391
231
  y: y + diffCoords.y,
392
232
  data: _extends({}, diffCoords, {
393
233
  placement
394
234
  })
395
235
  });
396
- case 7:
397
- case "end":
398
- return _context.stop();
399
236
  }
400
237
  }, _callee);
401
238
  }))();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-guide",
3
3
  "type": "module",
4
- "version": "2.22.1",
4
+ "version": "2.24.0",
5
5
  "description": "",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,
@@ -9,10 +9,10 @@
9
9
  "module": "./lib/index.js",
10
10
  "dependencies": {
11
11
  "@floating-ui/dom": "^1.0.10",
12
- "@opentinyvue/utils": "~3.22.0",
13
- "@opentinyvue/vue-common": "~2.22.0",
14
- "@opentinyvue/vue-renderless": "~3.22.0",
15
- "@opentinyvue/vue-theme": "~3.22.0",
12
+ "@opentinyvue/utils": "~3.24.0",
13
+ "@opentinyvue/vue-common": "~2.24.0",
14
+ "@opentinyvue/vue-renderless": "~3.24.0",
15
+ "@opentinyvue/vue-theme": "~3.24.0",
16
16
  "shepherd.js": "11.1.1"
17
17
  },
18
18
  "types": "index.d.ts"