@v-c/tour 0.0.1 → 0.0.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.
- package/dist/Mask.js +1 -2
- package/dist/Tour.cjs +8 -1
- package/dist/Tour.js +8 -1
- package/dist/TourStep/DefaultPanel.cjs +24 -3
- package/dist/TourStep/DefaultPanel.js +24 -3
- package/dist/TourStep/index.cjs +24 -3
- package/dist/TourStep/index.js +24 -3
- package/dist/hooks/useTarget.cjs +2 -1
- package/dist/hooks/useTarget.js +2 -1
- package/package.json +4 -4
package/dist/Mask.js
CHANGED
|
@@ -147,9 +147,8 @@ var Mask_default = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
|
147
147
|
default: void 0
|
|
148
148
|
},
|
|
149
149
|
getPopupContainer: {
|
|
150
|
-
type: Boolean,
|
|
150
|
+
type: [Function, Boolean],
|
|
151
151
|
required: false,
|
|
152
|
-
skipCheck: true,
|
|
153
152
|
default: void 0
|
|
154
153
|
}
|
|
155
154
|
},
|
package/dist/Tour.cjs
CHANGED
|
@@ -235,8 +235,15 @@ var Tour = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs }) => {
|
|
|
235
235
|
default: void 0
|
|
236
236
|
},
|
|
237
237
|
closeIcon: {
|
|
238
|
-
type:
|
|
238
|
+
type: [
|
|
239
|
+
String,
|
|
240
|
+
Number,
|
|
241
|
+
null,
|
|
242
|
+
Boolean,
|
|
243
|
+
Array
|
|
244
|
+
],
|
|
239
245
|
required: false,
|
|
246
|
+
skipCheck: true,
|
|
240
247
|
default: void 0
|
|
241
248
|
},
|
|
242
249
|
closable: {
|
package/dist/Tour.js
CHANGED
|
@@ -233,8 +233,15 @@ var Tour_default = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
|
233
233
|
default: void 0
|
|
234
234
|
},
|
|
235
235
|
closeIcon: {
|
|
236
|
-
type:
|
|
236
|
+
type: [
|
|
237
|
+
String,
|
|
238
|
+
Number,
|
|
239
|
+
null,
|
|
240
|
+
Boolean,
|
|
241
|
+
Array
|
|
242
|
+
],
|
|
237
243
|
required: false,
|
|
244
|
+
skipCheck: true,
|
|
238
245
|
default: void 0
|
|
239
246
|
},
|
|
240
247
|
closable: {
|
|
@@ -118,13 +118,27 @@ var DefaultPanel = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs }) =
|
|
|
118
118
|
default: void 0
|
|
119
119
|
},
|
|
120
120
|
title: {
|
|
121
|
-
type:
|
|
121
|
+
type: [
|
|
122
|
+
String,
|
|
123
|
+
Number,
|
|
124
|
+
null,
|
|
125
|
+
Boolean,
|
|
126
|
+
Array
|
|
127
|
+
],
|
|
122
128
|
required: true,
|
|
129
|
+
skipCheck: true,
|
|
123
130
|
default: void 0
|
|
124
131
|
},
|
|
125
132
|
description: {
|
|
126
|
-
type:
|
|
133
|
+
type: [
|
|
134
|
+
String,
|
|
135
|
+
Number,
|
|
136
|
+
null,
|
|
137
|
+
Boolean,
|
|
138
|
+
Array
|
|
139
|
+
],
|
|
127
140
|
required: false,
|
|
141
|
+
skipCheck: true,
|
|
128
142
|
default: void 0
|
|
129
143
|
},
|
|
130
144
|
placement: {
|
|
@@ -154,8 +168,15 @@ var DefaultPanel = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs }) =
|
|
|
154
168
|
default: void 0
|
|
155
169
|
},
|
|
156
170
|
closeIcon: {
|
|
157
|
-
type:
|
|
171
|
+
type: [
|
|
172
|
+
String,
|
|
173
|
+
Number,
|
|
174
|
+
null,
|
|
175
|
+
Boolean,
|
|
176
|
+
Array
|
|
177
|
+
],
|
|
158
178
|
required: false,
|
|
179
|
+
skipCheck: true,
|
|
159
180
|
default: void 0
|
|
160
181
|
},
|
|
161
182
|
closable: {
|
|
@@ -115,13 +115,27 @@ var DefaultPanel_default = /* @__PURE__ */ defineComponent((props, { attrs }) =>
|
|
|
115
115
|
default: void 0
|
|
116
116
|
},
|
|
117
117
|
title: {
|
|
118
|
-
type:
|
|
118
|
+
type: [
|
|
119
|
+
String,
|
|
120
|
+
Number,
|
|
121
|
+
null,
|
|
122
|
+
Boolean,
|
|
123
|
+
Array
|
|
124
|
+
],
|
|
119
125
|
required: true,
|
|
126
|
+
skipCheck: true,
|
|
120
127
|
default: void 0
|
|
121
128
|
},
|
|
122
129
|
description: {
|
|
123
|
-
type:
|
|
130
|
+
type: [
|
|
131
|
+
String,
|
|
132
|
+
Number,
|
|
133
|
+
null,
|
|
134
|
+
Boolean,
|
|
135
|
+
Array
|
|
136
|
+
],
|
|
124
137
|
required: false,
|
|
138
|
+
skipCheck: true,
|
|
125
139
|
default: void 0
|
|
126
140
|
},
|
|
127
141
|
placement: {
|
|
@@ -151,8 +165,15 @@ var DefaultPanel_default = /* @__PURE__ */ defineComponent((props, { attrs }) =>
|
|
|
151
165
|
default: void 0
|
|
152
166
|
},
|
|
153
167
|
closeIcon: {
|
|
154
|
-
type:
|
|
168
|
+
type: [
|
|
169
|
+
String,
|
|
170
|
+
Number,
|
|
171
|
+
null,
|
|
172
|
+
Boolean,
|
|
173
|
+
Array
|
|
174
|
+
],
|
|
155
175
|
required: false,
|
|
176
|
+
skipCheck: true,
|
|
156
177
|
default: void 0
|
|
157
178
|
},
|
|
158
179
|
closable: {
|
package/dist/TourStep/index.cjs
CHANGED
|
@@ -71,13 +71,27 @@ var TourStep = /* @__PURE__ */ (0, vue.defineComponent)((props) => {
|
|
|
71
71
|
default: void 0
|
|
72
72
|
},
|
|
73
73
|
title: {
|
|
74
|
-
type:
|
|
74
|
+
type: [
|
|
75
|
+
String,
|
|
76
|
+
Number,
|
|
77
|
+
null,
|
|
78
|
+
Boolean,
|
|
79
|
+
Array
|
|
80
|
+
],
|
|
75
81
|
required: true,
|
|
82
|
+
skipCheck: true,
|
|
76
83
|
default: void 0
|
|
77
84
|
},
|
|
78
85
|
description: {
|
|
79
|
-
type:
|
|
86
|
+
type: [
|
|
87
|
+
String,
|
|
88
|
+
Number,
|
|
89
|
+
null,
|
|
90
|
+
Boolean,
|
|
91
|
+
Array
|
|
92
|
+
],
|
|
80
93
|
required: false,
|
|
94
|
+
skipCheck: true,
|
|
81
95
|
default: void 0
|
|
82
96
|
},
|
|
83
97
|
placement: {
|
|
@@ -107,8 +121,15 @@ var TourStep = /* @__PURE__ */ (0, vue.defineComponent)((props) => {
|
|
|
107
121
|
default: void 0
|
|
108
122
|
},
|
|
109
123
|
closeIcon: {
|
|
110
|
-
type:
|
|
124
|
+
type: [
|
|
125
|
+
String,
|
|
126
|
+
Number,
|
|
127
|
+
null,
|
|
128
|
+
Boolean,
|
|
129
|
+
Array
|
|
130
|
+
],
|
|
111
131
|
required: false,
|
|
132
|
+
skipCheck: true,
|
|
112
133
|
default: void 0
|
|
113
134
|
},
|
|
114
135
|
closable: {
|
package/dist/TourStep/index.js
CHANGED
|
@@ -69,13 +69,27 @@ var TourStep_default = /* @__PURE__ */ defineComponent((props) => {
|
|
|
69
69
|
default: void 0
|
|
70
70
|
},
|
|
71
71
|
title: {
|
|
72
|
-
type:
|
|
72
|
+
type: [
|
|
73
|
+
String,
|
|
74
|
+
Number,
|
|
75
|
+
null,
|
|
76
|
+
Boolean,
|
|
77
|
+
Array
|
|
78
|
+
],
|
|
73
79
|
required: true,
|
|
80
|
+
skipCheck: true,
|
|
74
81
|
default: void 0
|
|
75
82
|
},
|
|
76
83
|
description: {
|
|
77
|
-
type:
|
|
84
|
+
type: [
|
|
85
|
+
String,
|
|
86
|
+
Number,
|
|
87
|
+
null,
|
|
88
|
+
Boolean,
|
|
89
|
+
Array
|
|
90
|
+
],
|
|
78
91
|
required: false,
|
|
92
|
+
skipCheck: true,
|
|
79
93
|
default: void 0
|
|
80
94
|
},
|
|
81
95
|
placement: {
|
|
@@ -105,8 +119,15 @@ var TourStep_default = /* @__PURE__ */ defineComponent((props) => {
|
|
|
105
119
|
default: void 0
|
|
106
120
|
},
|
|
107
121
|
closeIcon: {
|
|
108
|
-
type:
|
|
122
|
+
type: [
|
|
123
|
+
String,
|
|
124
|
+
Number,
|
|
125
|
+
null,
|
|
126
|
+
Boolean,
|
|
127
|
+
Array
|
|
128
|
+
],
|
|
109
129
|
required: false,
|
|
130
|
+
skipCheck: true,
|
|
110
131
|
default: void 0
|
|
111
132
|
},
|
|
112
133
|
closable: {
|
package/dist/hooks/useTarget.cjs
CHANGED
|
@@ -2,13 +2,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
3
3
|
const require_util = require("../util.cjs");
|
|
4
4
|
let vue = require("vue");
|
|
5
|
+
let __v_c_util_dist_vnode = require("@v-c/util/dist/vnode");
|
|
5
6
|
function isValidNumber(val) {
|
|
6
7
|
return typeof val === "number" && !Number.isNaN(val);
|
|
7
8
|
}
|
|
8
9
|
function useTarget(target, open, gap, scrollIntoViewOptions, inlineMode, placeholderRef) {
|
|
9
10
|
const targetElement = (0, vue.shallowRef)(null);
|
|
10
11
|
const syncTargetElement = () => {
|
|
11
|
-
targetElement.value = (typeof target.value === "function" ? target.value() : target.value) || null;
|
|
12
|
+
targetElement.value = (0, __v_c_util_dist_vnode.resolveToElement)((typeof target.value === "function" ? target.value() : target.value) || null);
|
|
12
13
|
};
|
|
13
14
|
(0, vue.watch)(target, () => {
|
|
14
15
|
syncTargetElement();
|
package/dist/hooks/useTarget.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { isInViewPort } from "../util.js";
|
|
2
2
|
import { computed, nextTick, onMounted, shallowRef, watch } from "vue";
|
|
3
|
+
import { resolveToElement } from "@v-c/util/dist/vnode";
|
|
3
4
|
function isValidNumber(val) {
|
|
4
5
|
return typeof val === "number" && !Number.isNaN(val);
|
|
5
6
|
}
|
|
6
7
|
function useTarget(target, open, gap, scrollIntoViewOptions, inlineMode, placeholderRef) {
|
|
7
8
|
const targetElement = shallowRef(null);
|
|
8
9
|
const syncTargetElement = () => {
|
|
9
|
-
targetElement.value = (typeof target.value === "function" ? target.value() : target.value) || null;
|
|
10
|
+
targetElement.value = resolveToElement((typeof target.value === "function" ? target.value() : target.value) || null);
|
|
10
11
|
};
|
|
11
12
|
watch(target, () => {
|
|
12
13
|
syncTargetElement();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/tour",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"vue": "^3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@v-c/
|
|
33
|
-
"@v-c/
|
|
34
|
-
"@v-c/
|
|
32
|
+
"@v-c/portal": "0.0.6",
|
|
33
|
+
"@v-c/trigger": "0.0.15",
|
|
34
|
+
"@v-c/util": "0.0.15"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "vite build",
|