@opentinyvue/vue-guide 2.21.0 → 2.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 +63 -64
- package/package.json +9 -8
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 = "2.
|
|
75
|
+
var version = "2.undefined";
|
|
76
76
|
Guide.model = {
|
|
77
77
|
prop: "modelValue",
|
|
78
78
|
event: "update:modelValue"
|
package/lib/pc.js
CHANGED
|
@@ -3,6 +3,36 @@ import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
|
3
3
|
import '@opentinyvue/vue-theme/guide/index.css';
|
|
4
4
|
import Shepherd from 'shepherd.js';
|
|
5
5
|
|
|
6
|
+
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
7
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
8
|
+
if (render) {
|
|
9
|
+
options.render = render;
|
|
10
|
+
options.staticRenderFns = staticRenderFns;
|
|
11
|
+
options._compiled = true;
|
|
12
|
+
}
|
|
13
|
+
var hook;
|
|
14
|
+
if (injectStyles) {
|
|
15
|
+
hook = injectStyles;
|
|
16
|
+
}
|
|
17
|
+
if (hook) {
|
|
18
|
+
if (options.functional) {
|
|
19
|
+
options._injectStyles = hook;
|
|
20
|
+
var originalRender = options.render;
|
|
21
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
22
|
+
hook.call(context);
|
|
23
|
+
return originalRender(h, context);
|
|
24
|
+
};
|
|
25
|
+
} else {
|
|
26
|
+
var existing = options.beforeCreate;
|
|
27
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
exports: scriptExports,
|
|
32
|
+
options
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
6
36
|
function _regeneratorRuntime() {
|
|
7
37
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
8
38
|
_regeneratorRuntime = function _regeneratorRuntime2() {
|
|
@@ -241,6 +271,15 @@ function _regeneratorRuntime() {
|
|
|
241
271
|
return this.delegate = { iterator: values(e2), resultName: r2, nextLoc: n2 }, "next" === this.method && (this.arg = t), y;
|
|
242
272
|
} }, e;
|
|
243
273
|
}
|
|
274
|
+
function _extends() {
|
|
275
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
276
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
277
|
+
var t = arguments[e];
|
|
278
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
279
|
+
}
|
|
280
|
+
return n;
|
|
281
|
+
}, _extends.apply(null, arguments);
|
|
282
|
+
}
|
|
244
283
|
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
245
284
|
try {
|
|
246
285
|
var i = n[a](c), u = i.value;
|
|
@@ -264,15 +303,6 @@ function _asyncToGenerator(n) {
|
|
|
264
303
|
});
|
|
265
304
|
};
|
|
266
305
|
}
|
|
267
|
-
function _extends() {
|
|
268
|
-
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
269
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
270
|
-
var t = arguments[e];
|
|
271
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
272
|
-
}
|
|
273
|
-
return n;
|
|
274
|
-
}, _extends.apply(null, arguments);
|
|
275
|
-
}
|
|
276
306
|
function evaluate(value, param) {
|
|
277
307
|
return typeof value === "function" ? value(param) : value;
|
|
278
308
|
}
|
|
@@ -285,27 +315,27 @@ function getAlignment(placement) {
|
|
|
285
315
|
function getSideAxis(placement) {
|
|
286
316
|
return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
|
|
287
317
|
}
|
|
288
|
-
function convertValueToCoords(
|
|
318
|
+
function convertValueToCoords(_x, _x2) {
|
|
289
319
|
return _convertValueToCoords.apply(this, arguments);
|
|
290
320
|
}
|
|
291
321
|
function _convertValueToCoords() {
|
|
292
|
-
_convertValueToCoords = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
293
|
-
var placement,
|
|
294
|
-
return _regeneratorRuntime().wrap(function
|
|
295
|
-
while (1) switch (
|
|
322
|
+
_convertValueToCoords = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2(state, options) {
|
|
323
|
+
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) {
|
|
296
326
|
case 0:
|
|
297
|
-
placement = state.placement,
|
|
298
|
-
|
|
299
|
-
return
|
|
327
|
+
placement = state.placement, platform = state.platform, elements = state.elements;
|
|
328
|
+
_context2.next = 3;
|
|
329
|
+
return platform.isRTL == null ? void 0 : platform.isRTL(elements.floating);
|
|
300
330
|
case 3:
|
|
301
|
-
rtl =
|
|
331
|
+
rtl = _context2.sent;
|
|
302
332
|
side = getSide(placement);
|
|
303
333
|
alignment = getAlignment(placement);
|
|
304
334
|
isVertical = getSideAxis(placement) === "y";
|
|
305
335
|
mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
|
|
306
336
|
crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
307
337
|
rawValue = evaluate(options, state);
|
|
308
|
-
|
|
338
|
+
_ref = typeof rawValue === "number" ? {
|
|
309
339
|
mainAxis: rawValue,
|
|
310
340
|
crossAxis: 0,
|
|
311
341
|
alignmentAxis: null
|
|
@@ -313,11 +343,11 @@ function _convertValueToCoords() {
|
|
|
313
343
|
mainAxis: rawValue.mainAxis || 0,
|
|
314
344
|
crossAxis: rawValue.crossAxis || 0,
|
|
315
345
|
alignmentAxis: rawValue.alignmentAxis
|
|
316
|
-
}, mainAxis =
|
|
346
|
+
}, mainAxis = _ref.mainAxis, crossAxis = _ref.crossAxis, alignmentAxis = _ref.alignmentAxis;
|
|
317
347
|
if (alignment && typeof alignmentAxis === "number") {
|
|
318
348
|
crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
319
349
|
}
|
|
320
|
-
return
|
|
350
|
+
return _context2.abrupt("return", isVertical ? {
|
|
321
351
|
x: crossAxis * crossAxisMulti,
|
|
322
352
|
y: mainAxis * mainAxisMulti
|
|
323
353
|
} : {
|
|
@@ -326,9 +356,9 @@ function _convertValueToCoords() {
|
|
|
326
356
|
});
|
|
327
357
|
case 13:
|
|
328
358
|
case "end":
|
|
329
|
-
return
|
|
359
|
+
return _context2.stop();
|
|
330
360
|
}
|
|
331
|
-
},
|
|
361
|
+
}, _callee2);
|
|
332
362
|
}));
|
|
333
363
|
return _convertValueToCoords.apply(this, arguments);
|
|
334
364
|
}
|
|
@@ -340,23 +370,23 @@ var offset$1 = function offset$12(options) {
|
|
|
340
370
|
name: "offset",
|
|
341
371
|
options,
|
|
342
372
|
fn: function fn(state) {
|
|
343
|
-
return _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function
|
|
373
|
+
return _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee() {
|
|
344
374
|
var _middlewareData$offse, _middlewareData$arrow, x, y, placement, middlewareData, diffCoords;
|
|
345
|
-
return _regeneratorRuntime().wrap(function
|
|
346
|
-
while (1) switch (
|
|
375
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
376
|
+
while (1) switch (_context.prev = _context.next) {
|
|
347
377
|
case 0:
|
|
348
378
|
x = state.x, y = state.y, placement = state.placement, middlewareData = state.middlewareData;
|
|
349
|
-
|
|
379
|
+
_context.next = 3;
|
|
350
380
|
return convertValueToCoords(state, options);
|
|
351
381
|
case 3:
|
|
352
|
-
diffCoords =
|
|
382
|
+
diffCoords = _context.sent;
|
|
353
383
|
if (!(placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset)) {
|
|
354
|
-
|
|
384
|
+
_context.next = 6;
|
|
355
385
|
break;
|
|
356
386
|
}
|
|
357
|
-
return
|
|
387
|
+
return _context.abrupt("return", {});
|
|
358
388
|
case 6:
|
|
359
|
-
return
|
|
389
|
+
return _context.abrupt("return", {
|
|
360
390
|
x: x + diffCoords.x,
|
|
361
391
|
y: y + diffCoords.y,
|
|
362
392
|
data: _extends({}, diffCoords, {
|
|
@@ -365,45 +395,14 @@ var offset$1 = function offset$12(options) {
|
|
|
365
395
|
});
|
|
366
396
|
case 7:
|
|
367
397
|
case "end":
|
|
368
|
-
return
|
|
398
|
+
return _context.stop();
|
|
369
399
|
}
|
|
370
|
-
},
|
|
400
|
+
}, _callee);
|
|
371
401
|
}))();
|
|
372
402
|
}
|
|
373
403
|
};
|
|
374
404
|
};
|
|
375
405
|
var offset = offset$1;
|
|
376
|
-
|
|
377
|
-
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
378
|
-
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
379
|
-
if (render) {
|
|
380
|
-
options.render = render;
|
|
381
|
-
options.staticRenderFns = staticRenderFns;
|
|
382
|
-
options._compiled = true;
|
|
383
|
-
}
|
|
384
|
-
var hook;
|
|
385
|
-
if (injectStyles) {
|
|
386
|
-
hook = injectStyles;
|
|
387
|
-
}
|
|
388
|
-
if (hook) {
|
|
389
|
-
if (options.functional) {
|
|
390
|
-
options._injectStyles = hook;
|
|
391
|
-
var originalRender = options.render;
|
|
392
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
393
|
-
hook.call(context);
|
|
394
|
-
return originalRender(h, context);
|
|
395
|
-
};
|
|
396
|
-
} else {
|
|
397
|
-
var existing = options.beforeCreate;
|
|
398
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
return {
|
|
402
|
-
exports: scriptExports,
|
|
403
|
-
options
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
|
|
407
406
|
var __vue2_script = defineComponent({
|
|
408
407
|
props: [].concat(props, ["showStep", "domData", "mainAxis", "crossAxis", "alignmentAxis", "popPosition", "modalOverlayOpeningPadding", "modalOverlayOpeningRadius", "arrow", "lightClass", "width", "height"]),
|
|
409
408
|
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": "2.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": "~2.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": "~2.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
|
}
|