@v-c/menu 0.0.1 → 0.0.3
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/Divider.cjs +33 -36
- package/dist/Divider.js +28 -34
- package/dist/Icon.cjs +39 -38
- package/dist/Icon.js +36 -38
- package/dist/Menu.cjs +506 -575
- package/dist/Menu.d.ts +2 -0
- package/dist/Menu.js +495 -570
- package/dist/MenuItem.cjs +314 -344
- package/dist/MenuItem.js +303 -339
- package/dist/MenuItemGroup.cjs +98 -116
- package/dist/MenuItemGroup.js +91 -113
- package/dist/SubMenu/InlineSubMenuList.cjs +58 -82
- package/dist/SubMenu/InlineSubMenuList.js +54 -81
- package/dist/SubMenu/PopupTrigger.cjs +133 -167
- package/dist/SubMenu/PopupTrigger.d.ts +2 -2
- package/dist/SubMenu/PopupTrigger.js +126 -165
- package/dist/SubMenu/SubMenuList.cjs +18 -26
- package/dist/SubMenu/SubMenuList.js +14 -25
- package/dist/SubMenu/index.cjs +479 -526
- package/dist/SubMenu/index.js +469 -521
- package/dist/_virtual/rolldown_runtime.cjs +21 -0
- package/dist/context/IdContext.cjs +15 -23
- package/dist/context/IdContext.js +15 -27
- package/dist/context/MenuContext.cjs +183 -174
- package/dist/context/MenuContext.js +180 -177
- package/dist/context/PathContext.cjs +54 -79
- package/dist/context/PathContext.js +54 -90
- package/dist/context/PrivateContext.cjs +11 -17
- package/dist/context/PrivateContext.js +11 -20
- package/dist/hooks/useAccessibility.cjs +171 -191
- package/dist/hooks/useAccessibility.js +168 -193
- package/dist/hooks/useActive.cjs +25 -28
- package/dist/hooks/useActive.js +23 -28
- package/dist/hooks/useDirectionStyle.cjs +11 -17
- package/dist/hooks/useDirectionStyle.js +9 -17
- package/dist/hooks/useKeyRecords.cjs +70 -88
- package/dist/hooks/useKeyRecords.js +68 -89
- package/dist/hooks/useMemoCallback.cjs +9 -9
- package/dist/hooks/useMemoCallback.js +7 -9
- package/dist/index.cjs +21 -21
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -20
- package/dist/interface.cjs +0 -1
- package/dist/interface.js +0 -1
- package/dist/placements.cjs +70 -70
- package/dist/placements.js +69 -72
- package/dist/utils/commonUtil.cjs +24 -26
- package/dist/utils/commonUtil.js +23 -26
- package/dist/utils/motionUtil.cjs +2 -9
- package/dist/utils/motionUtil.js +3 -10
- package/dist/utils/nodeUtil.cjs +49 -77
- package/dist/utils/nodeUtil.d.ts +4 -1
- package/dist/utils/nodeUtil.js +48 -77
- package/dist/utils/timeUtil.cjs +2 -3
- package/dist/utils/timeUtil.js +3 -4
- package/dist/utils/warnUtil.cjs +8 -14
- package/dist/utils/warnUtil.js +7 -14
- package/package.json +2 -2
|
@@ -1,184 +1,187 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
function mergeProps(origin, target) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
target[key] = value;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
return clone;
|
|
1
|
+
import { computed, defineComponent, inject, provide } from "vue";
|
|
2
|
+
import omit from "@v-c/util/dist/omit";
|
|
3
|
+
var MenuContextKey = Symbol("MenuContextKey");
|
|
4
|
+
function mergeProps$1(origin, target) {
|
|
5
|
+
const clone = { ...origin };
|
|
6
|
+
Object.keys(target).forEach((key) => {
|
|
7
|
+
const value = target[key];
|
|
8
|
+
if (value !== void 0) target[key] = value;
|
|
9
|
+
});
|
|
10
|
+
return clone;
|
|
15
11
|
}
|
|
16
12
|
function useMenuContext() {
|
|
17
|
-
|
|
13
|
+
return inject(MenuContextKey, null);
|
|
18
14
|
}
|
|
19
15
|
function useMenuContextProvider(context) {
|
|
20
|
-
|
|
16
|
+
provide(MenuContextKey, context);
|
|
21
17
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return () => {
|
|
31
|
-
return slots?.default?.();
|
|
32
|
-
};
|
|
18
|
+
var MenuContext_default = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
19
|
+
const context = useMenuContext();
|
|
20
|
+
useMenuContextProvider(computed(() => {
|
|
21
|
+
return mergeProps$1(context?.value ?? {}, omit(props, ["locked"]));
|
|
22
|
+
}));
|
|
23
|
+
return () => {
|
|
24
|
+
return slots?.default?.();
|
|
25
|
+
};
|
|
33
26
|
}, {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
27
|
+
props: {
|
|
28
|
+
locked: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
required: false,
|
|
31
|
+
default: void 0
|
|
32
|
+
},
|
|
33
|
+
prefixCls: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: false,
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
38
|
+
classNames: {
|
|
39
|
+
type: Object,
|
|
40
|
+
required: false,
|
|
41
|
+
default: void 0
|
|
42
|
+
},
|
|
43
|
+
styles: {
|
|
44
|
+
type: Object,
|
|
45
|
+
required: false,
|
|
46
|
+
default: void 0
|
|
47
|
+
},
|
|
48
|
+
rootClassName: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: false,
|
|
51
|
+
default: void 0
|
|
52
|
+
},
|
|
53
|
+
openKeys: {
|
|
54
|
+
type: Array,
|
|
55
|
+
required: false,
|
|
56
|
+
default: void 0
|
|
57
|
+
},
|
|
58
|
+
rtl: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
required: false,
|
|
61
|
+
default: void 0
|
|
62
|
+
},
|
|
63
|
+
mode: {
|
|
64
|
+
type: String,
|
|
65
|
+
required: false,
|
|
66
|
+
default: void 0
|
|
67
|
+
},
|
|
68
|
+
disabled: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
required: false,
|
|
71
|
+
default: void 0
|
|
72
|
+
},
|
|
73
|
+
overflowDisabled: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
required: false,
|
|
76
|
+
default: void 0
|
|
77
|
+
},
|
|
78
|
+
activeKey: {
|
|
79
|
+
type: String,
|
|
80
|
+
required: false,
|
|
81
|
+
default: void 0
|
|
82
|
+
},
|
|
83
|
+
onActive: {
|
|
84
|
+
type: Function,
|
|
85
|
+
required: false,
|
|
86
|
+
default: void 0
|
|
87
|
+
},
|
|
88
|
+
onInactive: {
|
|
89
|
+
type: Function,
|
|
90
|
+
required: false,
|
|
91
|
+
default: void 0
|
|
92
|
+
},
|
|
93
|
+
selectedKeys: {
|
|
94
|
+
type: Array,
|
|
95
|
+
required: false,
|
|
96
|
+
default: void 0
|
|
97
|
+
},
|
|
98
|
+
inlineIndent: {
|
|
99
|
+
type: Number,
|
|
100
|
+
required: false,
|
|
101
|
+
default: void 0
|
|
102
|
+
},
|
|
103
|
+
motion: {
|
|
104
|
+
type: Object,
|
|
105
|
+
required: false,
|
|
106
|
+
default: void 0
|
|
107
|
+
},
|
|
108
|
+
defaultMotions: {
|
|
109
|
+
type: Object,
|
|
110
|
+
required: false,
|
|
111
|
+
default: void 0
|
|
112
|
+
},
|
|
113
|
+
subMenuOpenDelay: {
|
|
114
|
+
type: Number,
|
|
115
|
+
required: false,
|
|
116
|
+
default: void 0
|
|
117
|
+
},
|
|
118
|
+
subMenuCloseDelay: {
|
|
119
|
+
type: Number,
|
|
120
|
+
required: false,
|
|
121
|
+
default: void 0
|
|
122
|
+
},
|
|
123
|
+
forceSubMenuRender: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
required: false,
|
|
126
|
+
default: void 0
|
|
127
|
+
},
|
|
128
|
+
builtinPlacements: {
|
|
129
|
+
type: Object,
|
|
130
|
+
required: false,
|
|
131
|
+
default: void 0
|
|
132
|
+
},
|
|
133
|
+
triggerSubMenuAction: {
|
|
134
|
+
type: String,
|
|
135
|
+
required: false,
|
|
136
|
+
default: void 0
|
|
137
|
+
},
|
|
138
|
+
popupRender: {
|
|
139
|
+
type: Function,
|
|
140
|
+
required: false,
|
|
141
|
+
default: void 0
|
|
142
|
+
},
|
|
143
|
+
itemIcon: {
|
|
144
|
+
type: [
|
|
145
|
+
String,
|
|
146
|
+
Number,
|
|
147
|
+
null,
|
|
148
|
+
Array,
|
|
149
|
+
Function,
|
|
150
|
+
Boolean
|
|
151
|
+
],
|
|
152
|
+
required: false,
|
|
153
|
+
skipCheck: true,
|
|
154
|
+
default: void 0
|
|
155
|
+
},
|
|
156
|
+
expandIcon: {
|
|
157
|
+
type: [
|
|
158
|
+
String,
|
|
159
|
+
Number,
|
|
160
|
+
null,
|
|
161
|
+
Array,
|
|
162
|
+
Function,
|
|
163
|
+
Boolean
|
|
164
|
+
],
|
|
165
|
+
required: false,
|
|
166
|
+
skipCheck: true,
|
|
167
|
+
default: void 0
|
|
168
|
+
},
|
|
169
|
+
onItemClick: {
|
|
170
|
+
type: Function,
|
|
171
|
+
required: false,
|
|
172
|
+
default: void 0
|
|
173
|
+
},
|
|
174
|
+
onOpenChange: {
|
|
175
|
+
type: Function,
|
|
176
|
+
required: false,
|
|
177
|
+
default: void 0
|
|
178
|
+
},
|
|
179
|
+
getPopupContainer: {
|
|
180
|
+
type: Function,
|
|
181
|
+
required: false,
|
|
182
|
+
default: void 0
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
inheritAttrs: false
|
|
179
186
|
});
|
|
180
|
-
export {
|
|
181
|
-
InheritableContextProvider as default,
|
|
182
|
-
useMenuContext,
|
|
183
|
-
useMenuContextProvider
|
|
184
|
-
};
|
|
187
|
+
export { MenuContext_default as default, useMenuContext, useMenuContextProvider };
|
|
@@ -1,92 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const PathRegisterContextKey = Symbol("PathRegisterContext");
|
|
1
|
+
const require_rolldown_runtime = require("../_virtual/rolldown_runtime.cjs");
|
|
2
|
+
let vue = require("vue");
|
|
3
|
+
var EmptyList = [];
|
|
4
|
+
var PathRegisterContextKey = Symbol("PathRegisterContext");
|
|
6
5
|
function useMeasure() {
|
|
7
|
-
|
|
6
|
+
return (0, vue.inject)(PathRegisterContextKey, null);
|
|
8
7
|
}
|
|
9
8
|
function useMeasureProvider(context) {
|
|
10
|
-
|
|
9
|
+
(0, vue.provide)(PathRegisterContextKey, context);
|
|
11
10
|
}
|
|
12
|
-
const MeasureProvider = /* @__PURE__ */ vue.defineComponent((props, {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
const PathTrackerContextKey = Symbol("PathTrackerContext");
|
|
11
|
+
const MeasureProvider = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots }) => {
|
|
12
|
+
useMeasureProvider(props);
|
|
13
|
+
return () => {
|
|
14
|
+
return slots?.default?.();
|
|
15
|
+
};
|
|
16
|
+
}, { props: {
|
|
17
|
+
registerPath: {
|
|
18
|
+
type: Function,
|
|
19
|
+
required: true,
|
|
20
|
+
default: void 0
|
|
21
|
+
},
|
|
22
|
+
unregisterPath: {
|
|
23
|
+
type: Function,
|
|
24
|
+
required: true,
|
|
25
|
+
default: void 0
|
|
26
|
+
}
|
|
27
|
+
} });
|
|
28
|
+
var PathTrackerContextKey = Symbol("PathTrackerContext");
|
|
34
29
|
function useFullPath(eventKey) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
const parentKeyPath = (0, vue.inject)(PathTrackerContextKey, (0, vue.ref)(EmptyList));
|
|
31
|
+
return (0, vue.computed)(() => {
|
|
32
|
+
return eventKey !== void 0 ? [...parentKeyPath.value, eventKey.value] : parentKeyPath.value;
|
|
33
|
+
});
|
|
39
34
|
}
|
|
40
|
-
const PathTrackerProvider = /* @__PURE__ */ vue.defineComponent((props, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
required: true,
|
|
52
|
-
default: void 0
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
const PathUserContextKey = Symbol("PathUserContext");
|
|
35
|
+
const PathTrackerProvider = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots }) => {
|
|
36
|
+
(0, vue.provide)(PathTrackerContextKey, (0, vue.computed)(() => props.value));
|
|
37
|
+
return () => {
|
|
38
|
+
return slots?.default?.();
|
|
39
|
+
};
|
|
40
|
+
}, { props: { value: {
|
|
41
|
+
type: Array,
|
|
42
|
+
required: true,
|
|
43
|
+
default: void 0
|
|
44
|
+
} } });
|
|
45
|
+
var PathUserContextKey = Symbol("PathUserContext");
|
|
57
46
|
function usePathUserContextProvider(context) {
|
|
58
|
-
|
|
47
|
+
(0, vue.provide)(PathUserContextKey, context);
|
|
59
48
|
}
|
|
60
49
|
function usePathUserContext() {
|
|
61
|
-
|
|
62
|
-
isSubPathKey: () => false
|
|
63
|
-
});
|
|
50
|
+
return (0, vue.inject)(PathUserContextKey, { isSubPathKey: () => false });
|
|
64
51
|
}
|
|
65
|
-
const PathUserProvider = /* @__PURE__ */ vue.defineComponent((props, {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
const PathTrackerContext = {
|
|
82
|
-
Provider: PathTrackerProvider
|
|
83
|
-
};
|
|
84
|
-
const PathRegisterContext = {
|
|
85
|
-
Provider: MeasureProvider
|
|
86
|
-
};
|
|
87
|
-
const PathUserContext = {
|
|
88
|
-
Provider: PathUserProvider
|
|
89
|
-
};
|
|
52
|
+
const PathUserProvider = /* @__PURE__ */ (0, vue.defineComponent)((props, { slots }) => {
|
|
53
|
+
usePathUserContextProvider(props);
|
|
54
|
+
return () => {
|
|
55
|
+
return slots?.default?.();
|
|
56
|
+
};
|
|
57
|
+
}, { props: { isSubPathKey: {
|
|
58
|
+
type: Function,
|
|
59
|
+
required: true,
|
|
60
|
+
default: void 0
|
|
61
|
+
} } });
|
|
62
|
+
const PathTrackerContext = { Provider: PathTrackerProvider };
|
|
63
|
+
const PathRegisterContext = { Provider: MeasureProvider };
|
|
64
|
+
const PathUserContext = { Provider: PathUserProvider };
|
|
90
65
|
exports.MeasureProvider = MeasureProvider;
|
|
91
66
|
exports.PathRegisterContext = PathRegisterContext;
|
|
92
67
|
exports.PathTrackerContext = PathTrackerContext;
|
|
@@ -1,100 +1,64 @@
|
|
|
1
|
-
import { defineComponent, inject,
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { computed, defineComponent, inject, provide, ref } from "vue";
|
|
2
|
+
var EmptyList = [];
|
|
3
|
+
var PathRegisterContextKey = Symbol("PathRegisterContext");
|
|
4
4
|
function useMeasure() {
|
|
5
|
-
|
|
5
|
+
return inject(PathRegisterContextKey, null);
|
|
6
6
|
}
|
|
7
7
|
function useMeasureProvider(context) {
|
|
8
|
-
|
|
8
|
+
provide(PathRegisterContextKey, context);
|
|
9
9
|
}
|
|
10
|
-
const MeasureProvider = /* @__PURE__ */ defineComponent((props, {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const PathTrackerContextKey = Symbol("PathTrackerContext");
|
|
10
|
+
const MeasureProvider = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
11
|
+
useMeasureProvider(props);
|
|
12
|
+
return () => {
|
|
13
|
+
return slots?.default?.();
|
|
14
|
+
};
|
|
15
|
+
}, { props: {
|
|
16
|
+
registerPath: {
|
|
17
|
+
type: Function,
|
|
18
|
+
required: true,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
unregisterPath: {
|
|
22
|
+
type: Function,
|
|
23
|
+
required: true,
|
|
24
|
+
default: void 0
|
|
25
|
+
}
|
|
26
|
+
} });
|
|
27
|
+
var PathTrackerContextKey = Symbol("PathTrackerContext");
|
|
32
28
|
function useFullPath(eventKey) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
const parentKeyPath = inject(PathTrackerContextKey, ref(EmptyList));
|
|
30
|
+
return computed(() => {
|
|
31
|
+
return eventKey !== void 0 ? [...parentKeyPath.value, eventKey.value] : parentKeyPath.value;
|
|
32
|
+
});
|
|
37
33
|
}
|
|
38
|
-
const PathTrackerProvider = /* @__PURE__ */ defineComponent((props, {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
required: true,
|
|
50
|
-
default: void 0
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
const PathUserContextKey = Symbol("PathUserContext");
|
|
34
|
+
const PathTrackerProvider = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
35
|
+
provide(PathTrackerContextKey, computed(() => props.value));
|
|
36
|
+
return () => {
|
|
37
|
+
return slots?.default?.();
|
|
38
|
+
};
|
|
39
|
+
}, { props: { value: {
|
|
40
|
+
type: Array,
|
|
41
|
+
required: true,
|
|
42
|
+
default: void 0
|
|
43
|
+
} } });
|
|
44
|
+
var PathUserContextKey = Symbol("PathUserContext");
|
|
55
45
|
function usePathUserContextProvider(context) {
|
|
56
|
-
|
|
46
|
+
provide(PathUserContextKey, context);
|
|
57
47
|
}
|
|
58
48
|
function usePathUserContext() {
|
|
59
|
-
|
|
60
|
-
isSubPathKey: () => false
|
|
61
|
-
});
|
|
49
|
+
return inject(PathUserContextKey, { isSubPathKey: () => false });
|
|
62
50
|
}
|
|
63
|
-
const PathUserProvider = /* @__PURE__ */ defineComponent((props, {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
const PathTrackerContext = {
|
|
80
|
-
Provider: PathTrackerProvider
|
|
81
|
-
};
|
|
82
|
-
const PathRegisterContext = {
|
|
83
|
-
Provider: MeasureProvider
|
|
84
|
-
};
|
|
85
|
-
const PathUserContext = {
|
|
86
|
-
Provider: PathUserProvider
|
|
87
|
-
};
|
|
88
|
-
export {
|
|
89
|
-
MeasureProvider,
|
|
90
|
-
PathRegisterContext,
|
|
91
|
-
PathTrackerContext,
|
|
92
|
-
PathTrackerProvider,
|
|
93
|
-
PathUserContext,
|
|
94
|
-
PathUserProvider,
|
|
95
|
-
useFullPath,
|
|
96
|
-
useMeasure,
|
|
97
|
-
useMeasureProvider,
|
|
98
|
-
usePathUserContext,
|
|
99
|
-
usePathUserContextProvider
|
|
100
|
-
};
|
|
51
|
+
const PathUserProvider = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
52
|
+
usePathUserContextProvider(props);
|
|
53
|
+
return () => {
|
|
54
|
+
return slots?.default?.();
|
|
55
|
+
};
|
|
56
|
+
}, { props: { isSubPathKey: {
|
|
57
|
+
type: Function,
|
|
58
|
+
required: true,
|
|
59
|
+
default: void 0
|
|
60
|
+
} } });
|
|
61
|
+
const PathTrackerContext = { Provider: PathTrackerProvider };
|
|
62
|
+
const PathRegisterContext = { Provider: MeasureProvider };
|
|
63
|
+
const PathUserContext = { Provider: PathUserProvider };
|
|
64
|
+
export { MeasureProvider, PathRegisterContext, PathTrackerContext, PathTrackerProvider, PathUserContext, PathUserProvider, useFullPath, useMeasure, useMeasureProvider, usePathUserContext, usePathUserContextProvider };
|