@opentinyvue/vue-guide 3.21.0 → 3.22.1
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.
- package/lib/index.js +4 -4
- package/lib/pc.js +66 -67
- package/package.json +9 -8
- package/src/index.d.ts +2 -2
- package/src/pc.vue.d.ts +15 -15
package/lib/index.js
CHANGED
|
@@ -7,8 +7,8 @@ function _extends() {
|
|
|
7
7
|
return n;
|
|
8
8
|
}, _extends.apply(null, arguments);
|
|
9
9
|
}
|
|
10
|
-
import { defineComponent, $
|
|
11
|
-
import
|
|
10
|
+
import { defineComponent, $props, $setup, $prefix } from "@opentinyvue/vue-common";
|
|
11
|
+
import { browserInfo } from "@opentinyvue/utils";
|
|
12
12
|
import PcTemplate from "./pc.js";
|
|
13
13
|
var template = function template2(mode) {
|
|
14
14
|
var _process$env;
|
|
@@ -57,7 +57,7 @@ var Guide = defineComponent({
|
|
|
57
57
|
},
|
|
58
58
|
width: {
|
|
59
59
|
type: String,
|
|
60
|
-
default:
|
|
60
|
+
default: browserInfo.isMobile ? "350" : "510"
|
|
61
61
|
},
|
|
62
62
|
height: {
|
|
63
63
|
type: String,
|
|
@@ -72,7 +72,7 @@ var Guide = defineComponent({
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
var version = "3.
|
|
75
|
+
var version = "3.undefined";
|
|
76
76
|
Guide.model = {
|
|
77
77
|
prop: "modelValue",
|
|
78
78
|
event: "update:modelValue"
|
package/lib/pc.js
CHANGED
|
@@ -4,6 +4,39 @@ import '@opentinyvue/vue-theme/guide/index.css';
|
|
|
4
4
|
import Shepherd from 'shepherd.js';
|
|
5
5
|
import { openBlock, createElementBlock, renderSlot } from 'vue';
|
|
6
6
|
|
|
7
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
8
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
9
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
10
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
11
|
+
t && (r = t);
|
|
12
|
+
var o = 0;
|
|
13
|
+
return function() {
|
|
14
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
18
|
+
}
|
|
19
|
+
function _unsupportedIterableToArray(r, a) {
|
|
20
|
+
if (r) {
|
|
21
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
22
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
23
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function _arrayLikeToArray(r, a) {
|
|
27
|
+
(null == a || a > r.length) && (a = r.length);
|
|
28
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
32
|
+
var target = sfc.__vccOpts || sfc;
|
|
33
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
34
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
35
|
+
target[key] = val;
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
39
|
+
|
|
7
40
|
function _regeneratorRuntime() {
|
|
8
41
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
9
42
|
_regeneratorRuntime = function _regeneratorRuntime2() {
|
|
@@ -242,6 +275,15 @@ function _regeneratorRuntime() {
|
|
|
242
275
|
return this.delegate = { iterator: values(e2), resultName: r2, nextLoc: n2 }, "next" === this.method && (this.arg = t), y;
|
|
243
276
|
} }, e;
|
|
244
277
|
}
|
|
278
|
+
function _extends() {
|
|
279
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
280
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
281
|
+
var t = arguments[e];
|
|
282
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
283
|
+
}
|
|
284
|
+
return n;
|
|
285
|
+
}, _extends.apply(null, arguments);
|
|
286
|
+
}
|
|
245
287
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
246
288
|
try {
|
|
247
289
|
var i = n[a](c), u = i.value;
|
|
@@ -265,15 +307,6 @@ function _asyncToGenerator(n) {
|
|
|
265
307
|
});
|
|
266
308
|
};
|
|
267
309
|
}
|
|
268
|
-
function _extends() {
|
|
269
|
-
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
270
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
271
|
-
var t = arguments[e];
|
|
272
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
273
|
-
}
|
|
274
|
-
return n;
|
|
275
|
-
}, _extends.apply(null, arguments);
|
|
276
|
-
}
|
|
277
310
|
function evaluate(value, param) {
|
|
278
311
|
return typeof value === "function" ? value(param) : value;
|
|
279
312
|
}
|
|
@@ -286,27 +319,27 @@ function getAlignment(placement) {
|
|
|
286
319
|
function getSideAxis(placement) {
|
|
287
320
|
return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
|
|
288
321
|
}
|
|
289
|
-
function convertValueToCoords(
|
|
322
|
+
function convertValueToCoords(_x, _x2) {
|
|
290
323
|
return _convertValueToCoords.apply(this, arguments);
|
|
291
324
|
}
|
|
292
325
|
function _convertValueToCoords() {
|
|
293
|
-
_convertValueToCoords = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
294
|
-
var placement,
|
|
295
|
-
return _regeneratorRuntime().wrap(function
|
|
296
|
-
while (1) switch (
|
|
326
|
+
_convertValueToCoords = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2(state, options) {
|
|
327
|
+
var placement, platform, elements, rtl, side, alignment, isVertical, mainAxisMulti, crossAxisMulti, rawValue, _ref, mainAxis, crossAxis, alignmentAxis;
|
|
328
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
329
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
297
330
|
case 0:
|
|
298
|
-
placement = state.placement,
|
|
299
|
-
|
|
300
|
-
return
|
|
331
|
+
placement = state.placement, platform = state.platform, elements = state.elements;
|
|
332
|
+
_context2.next = 3;
|
|
333
|
+
return platform.isRTL == null ? void 0 : platform.isRTL(elements.floating);
|
|
301
334
|
case 3:
|
|
302
|
-
rtl =
|
|
335
|
+
rtl = _context2.sent;
|
|
303
336
|
side = getSide(placement);
|
|
304
337
|
alignment = getAlignment(placement);
|
|
305
338
|
isVertical = getSideAxis(placement) === "y";
|
|
306
339
|
mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
|
|
307
340
|
crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
308
341
|
rawValue = evaluate(options, state);
|
|
309
|
-
|
|
342
|
+
_ref = typeof rawValue === "number" ? {
|
|
310
343
|
mainAxis: rawValue,
|
|
311
344
|
crossAxis: 0,
|
|
312
345
|
alignmentAxis: null
|
|
@@ -314,11 +347,11 @@ function _convertValueToCoords() {
|
|
|
314
347
|
mainAxis: rawValue.mainAxis || 0,
|
|
315
348
|
crossAxis: rawValue.crossAxis || 0,
|
|
316
349
|
alignmentAxis: rawValue.alignmentAxis
|
|
317
|
-
}, mainAxis =
|
|
350
|
+
}, mainAxis = _ref.mainAxis, crossAxis = _ref.crossAxis, alignmentAxis = _ref.alignmentAxis;
|
|
318
351
|
if (alignment && typeof alignmentAxis === "number") {
|
|
319
352
|
crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
320
353
|
}
|
|
321
|
-
return
|
|
354
|
+
return _context2.abrupt("return", isVertical ? {
|
|
322
355
|
x: crossAxis * crossAxisMulti,
|
|
323
356
|
y: mainAxis * mainAxisMulti
|
|
324
357
|
} : {
|
|
@@ -327,9 +360,9 @@ function _convertValueToCoords() {
|
|
|
327
360
|
});
|
|
328
361
|
case 13:
|
|
329
362
|
case "end":
|
|
330
|
-
return
|
|
363
|
+
return _context2.stop();
|
|
331
364
|
}
|
|
332
|
-
},
|
|
365
|
+
}, _callee2);
|
|
333
366
|
}));
|
|
334
367
|
return _convertValueToCoords.apply(this, arguments);
|
|
335
368
|
}
|
|
@@ -341,23 +374,23 @@ var offset$1 = function offset$12(options) {
|
|
|
341
374
|
name: "offset",
|
|
342
375
|
options,
|
|
343
376
|
fn: function fn(state) {
|
|
344
|
-
return _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
377
|
+
return _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
|
|
345
378
|
var _middlewareData$offse, _middlewareData$arrow, x, y, placement, middlewareData, diffCoords;
|
|
346
|
-
return _regeneratorRuntime().wrap(function
|
|
347
|
-
while (1) switch (
|
|
379
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
380
|
+
while (1) switch (_context.prev = _context.next) {
|
|
348
381
|
case 0:
|
|
349
382
|
x = state.x, y = state.y, placement = state.placement, middlewareData = state.middlewareData;
|
|
350
|
-
|
|
383
|
+
_context.next = 3;
|
|
351
384
|
return convertValueToCoords(state, options);
|
|
352
385
|
case 3:
|
|
353
|
-
diffCoords =
|
|
386
|
+
diffCoords = _context.sent;
|
|
354
387
|
if (!(placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset)) {
|
|
355
|
-
|
|
388
|
+
_context.next = 6;
|
|
356
389
|
break;
|
|
357
390
|
}
|
|
358
|
-
return
|
|
391
|
+
return _context.abrupt("return", {});
|
|
359
392
|
case 6:
|
|
360
|
-
return
|
|
393
|
+
return _context.abrupt("return", {
|
|
361
394
|
x: x + diffCoords.x,
|
|
362
395
|
y: y + diffCoords.y,
|
|
363
396
|
data: _extends({}, diffCoords, {
|
|
@@ -366,48 +399,14 @@ var offset$1 = function offset$12(options) {
|
|
|
366
399
|
});
|
|
367
400
|
case 7:
|
|
368
401
|
case "end":
|
|
369
|
-
return
|
|
402
|
+
return _context.stop();
|
|
370
403
|
}
|
|
371
|
-
},
|
|
404
|
+
}, _callee);
|
|
372
405
|
}))();
|
|
373
406
|
}
|
|
374
407
|
};
|
|
375
408
|
};
|
|
376
409
|
var offset = offset$1;
|
|
377
|
-
|
|
378
|
-
function _createForOfIteratorHelperLoose(r, e) {
|
|
379
|
-
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
380
|
-
if (t) return (t = t.call(r)).next.bind(t);
|
|
381
|
-
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
382
|
-
t && (r = t);
|
|
383
|
-
var o = 0;
|
|
384
|
-
return function() {
|
|
385
|
-
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
386
|
-
};
|
|
387
|
-
}
|
|
388
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
389
|
-
}
|
|
390
|
-
function _unsupportedIterableToArray(r, a) {
|
|
391
|
-
if (r) {
|
|
392
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
393
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
394
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
function _arrayLikeToArray(r, a) {
|
|
398
|
-
(null == a || a > r.length) && (a = r.length);
|
|
399
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
400
|
-
return n;
|
|
401
|
-
}
|
|
402
|
-
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
403
|
-
var target = sfc.__vccOpts || sfc;
|
|
404
|
-
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
405
|
-
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
406
|
-
target[key] = val;
|
|
407
|
-
}
|
|
408
|
-
return target;
|
|
409
|
-
};
|
|
410
|
-
|
|
411
410
|
var _sfc_main = defineComponent({
|
|
412
411
|
props: [].concat(props, ["showStep", "domData", "mainAxis", "crossAxis", "alignmentAxis", "popPosition", "modalOverlayOpeningPadding", "modalOverlayOpeningRadius", "arrow", "lightClass", "width", "height"]),
|
|
413
412
|
setup: function setup$1(props2, context) {
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-guide",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "3.22.1",
|
|
4
5
|
"description": "",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"sideEffects": false,
|
|
5
8
|
"main": "./lib/index.js",
|
|
6
9
|
"module": "./lib/index.js",
|
|
7
|
-
"sideEffects": false,
|
|
8
|
-
"type": "module",
|
|
9
10
|
"dependencies": {
|
|
10
|
-
"@opentinyvue/vue-renderless": "~3.21.0",
|
|
11
|
-
"@opentinyvue/vue-common": "~3.21.0",
|
|
12
|
-
"shepherd.js": "11.1.1",
|
|
13
11
|
"@floating-ui/dom": "^1.0.10",
|
|
14
|
-
"@opentinyvue/
|
|
12
|
+
"@opentinyvue/utils": "~3.22.0",
|
|
13
|
+
"@opentinyvue/vue-common": "~3.22.0",
|
|
14
|
+
"@opentinyvue/vue-renderless": "~3.22.0",
|
|
15
|
+
"@opentinyvue/vue-theme": "~3.22.0",
|
|
16
|
+
"shepherd.js": "11.1.1"
|
|
15
17
|
},
|
|
16
|
-
"license": "MIT",
|
|
17
18
|
"types": "index.d.ts"
|
|
18
19
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -105,13 +105,13 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
|
105
105
|
tiny_theme: StringConstructor;
|
|
106
106
|
tiny_chart_theme: ObjectConstructor;
|
|
107
107
|
}>>, {
|
|
108
|
-
tiny_mode_root: boolean;
|
|
109
108
|
width: string;
|
|
110
109
|
height: string;
|
|
111
110
|
arrow: boolean;
|
|
112
|
-
showStep: boolean;
|
|
113
111
|
mainAxis: number;
|
|
114
112
|
crossAxis: number;
|
|
113
|
+
tiny_mode_root: boolean;
|
|
114
|
+
showStep: boolean;
|
|
115
115
|
alignmentAxis: number;
|
|
116
116
|
popPosition: string;
|
|
117
117
|
modalOverlayOpeningPadding: number;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
2
|
+
width?: any;
|
|
3
|
+
height?: any;
|
|
4
|
+
arrow?: any;
|
|
5
|
+
mainAxis?: any;
|
|
6
|
+
crossAxis?: any;
|
|
2
7
|
tiny_mode?: any;
|
|
3
8
|
tiny_mode_root?: any;
|
|
4
9
|
tiny_template?: any;
|
|
@@ -6,13 +11,8 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
|
6
11
|
_constants?: any;
|
|
7
12
|
tiny_theme?: any;
|
|
8
13
|
tiny_chart_theme?: any;
|
|
9
|
-
width?: any;
|
|
10
|
-
height?: any;
|
|
11
|
-
arrow?: any;
|
|
12
14
|
domData?: any;
|
|
13
15
|
showStep?: any;
|
|
14
|
-
mainAxis?: any;
|
|
15
|
-
crossAxis?: any;
|
|
16
16
|
alignmentAxis?: any;
|
|
17
17
|
popPosition?: any;
|
|
18
18
|
modalOverlayOpeningPadding?: any;
|
|
@@ -28,6 +28,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
|
28
28
|
gcls: (key: any) => any;
|
|
29
29
|
m: (...cssClasses: any[]) => string;
|
|
30
30
|
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
31
|
+
width?: any;
|
|
32
|
+
height?: any;
|
|
33
|
+
arrow?: any;
|
|
34
|
+
mainAxis?: any;
|
|
35
|
+
crossAxis?: any;
|
|
31
36
|
tiny_mode?: any;
|
|
32
37
|
tiny_mode_root?: any;
|
|
33
38
|
tiny_template?: any;
|
|
@@ -35,19 +40,19 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
|
35
40
|
_constants?: any;
|
|
36
41
|
tiny_theme?: any;
|
|
37
42
|
tiny_chart_theme?: any;
|
|
38
|
-
width?: any;
|
|
39
|
-
height?: any;
|
|
40
|
-
arrow?: any;
|
|
41
43
|
domData?: any;
|
|
42
44
|
showStep?: any;
|
|
43
|
-
mainAxis?: any;
|
|
44
|
-
crossAxis?: any;
|
|
45
45
|
alignmentAxis?: any;
|
|
46
46
|
popPosition?: any;
|
|
47
47
|
modalOverlayOpeningPadding?: any;
|
|
48
48
|
modalOverlayOpeningRadius?: any;
|
|
49
49
|
lightClass?: any;
|
|
50
50
|
}>>>, {
|
|
51
|
+
readonly width?: any;
|
|
52
|
+
readonly height?: any;
|
|
53
|
+
readonly arrow?: any;
|
|
54
|
+
readonly mainAxis?: any;
|
|
55
|
+
readonly crossAxis?: any;
|
|
51
56
|
readonly tiny_mode?: any;
|
|
52
57
|
readonly tiny_mode_root?: any;
|
|
53
58
|
readonly tiny_template?: any;
|
|
@@ -55,13 +60,8 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
|
55
60
|
readonly _constants?: any;
|
|
56
61
|
readonly tiny_theme?: any;
|
|
57
62
|
readonly tiny_chart_theme?: any;
|
|
58
|
-
readonly width?: any;
|
|
59
|
-
readonly height?: any;
|
|
60
|
-
readonly arrow?: any;
|
|
61
63
|
readonly domData?: any;
|
|
62
64
|
readonly showStep?: any;
|
|
63
|
-
readonly mainAxis?: any;
|
|
64
|
-
readonly crossAxis?: any;
|
|
65
65
|
readonly alignmentAxis?: any;
|
|
66
66
|
readonly popPosition?: any;
|
|
67
67
|
readonly modalOverlayOpeningPadding?: any;
|