@timus-networks/theme 2.3.1 → 2.3.4
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/module.json +1 -1
- package/dist/module.mjs +14 -26
- package/dist/runtime/components/development/example.breadcrumb.vue +4 -1
- package/dist/runtime/components/development/example.button.vue.d.ts +302 -0
- package/dist/runtime/components/production/timus-breadcrumb-documentation.md +72 -0
- package/dist/runtime/components/production/timus-breadcrumb.vue +139 -64
- package/package.json +4 -3
- package/dist/runtime/components/production/timus-breadcrumb.d.ts +0 -36
- package/dist/runtime/components/production/timus-breadcrumb.js +0 -224
- package/dist/runtime/components/production/timus-breadcrumb.mjs +0 -224
- package/dist/runtime/components/production/timus-breadcrumb.vue.d.ts +0 -340
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readdirSync } from 'node:fs';
|
|
2
|
-
import { resolve, parse
|
|
3
|
-
import { defineNuxtModule, createResolver, useNuxt, addImports, addPlugin
|
|
2
|
+
import { resolve, parse } from 'node:path';
|
|
3
|
+
import { defineNuxtModule, createResolver, useNuxt, addImports, addPlugin } from 'nuxt/kit';
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
|
12
12
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
13
13
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
14
14
|
const name = "@timus-networks/theme";
|
|
15
|
-
const version = "2.3.
|
|
15
|
+
const version = "2.3.4";
|
|
16
16
|
const description = "A comprehensive Nuxt.js module providing a tailored theme experience with integrated TailwindCSS support for applications.";
|
|
17
17
|
const type = "module";
|
|
18
18
|
const exports = {
|
|
@@ -39,7 +39,7 @@ const scripts = {
|
|
|
39
39
|
sass: "node generate-sass.js",
|
|
40
40
|
prepack: "nuxt-module-build build",
|
|
41
41
|
"release-old": "npm run prepack && changelogen --release && npm run pub && git push --follow-tags",
|
|
42
|
-
version: "standard-version",
|
|
42
|
+
version: "standard-version --release-as ${npm_config_type:-patch}",
|
|
43
43
|
release: "npm run prepack && npm run version && npm run pub && git push --follow-tags origin main"
|
|
44
44
|
};
|
|
45
45
|
const repository = {
|
|
@@ -90,7 +90,8 @@ const PackageJson = {
|
|
|
90
90
|
section: "Build System",
|
|
91
91
|
hidden: true
|
|
92
92
|
}
|
|
93
|
-
]
|
|
93
|
+
],
|
|
94
|
+
"release-as": "patch"
|
|
94
95
|
},
|
|
95
96
|
repository: repository,
|
|
96
97
|
keywords: keywords,
|
|
@@ -154,37 +155,24 @@ const module = defineNuxtModule({
|
|
|
154
155
|
});
|
|
155
156
|
});
|
|
156
157
|
const components_dir_list = [
|
|
157
|
-
{ env: "development", path:
|
|
158
|
-
{ env: "production", path:
|
|
158
|
+
{ env: "development", path: `${folderPath}/components/development` },
|
|
159
|
+
{ env: "production", path: `${folderPath}/components/production` }
|
|
159
160
|
];
|
|
160
|
-
const comp = [];
|
|
161
|
-
const addComponentFromFolder = (folder) => {
|
|
162
|
-
const path = resolve(__dirname, folder);
|
|
163
|
-
const files = readdirSync(path).filter((file) => file.endsWith(".vue"));
|
|
164
|
-
files.forEach((file) => {
|
|
165
|
-
const { name } = parse(file);
|
|
166
|
-
const isExit = comp.find((item) => item.name === name);
|
|
167
|
-
!isExit ? comp.push({ name, path: resolve(path, file) }) : console.log("#BU COMPONENT VAR name:", name, resolve(path, file), "\xD6nceki: ", isExit);
|
|
168
|
-
nuxt.options.build.transpile.push(resolve(path, file));
|
|
169
|
-
addComponent({
|
|
170
|
-
name: join(name),
|
|
171
|
-
filePath: resolve(path, file),
|
|
172
|
-
mode: "client"
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
};
|
|
176
161
|
nuxt.hook("components:dirs", (dirs) => {
|
|
177
162
|
components_dir_list.forEach(({ env, path }) => {
|
|
178
163
|
if (isDev || !isDev && env === "production") {
|
|
179
|
-
|
|
164
|
+
dirs.push({
|
|
165
|
+
path: resolver.resolve(path)
|
|
166
|
+
/* , prefix: 'my-module' */
|
|
167
|
+
});
|
|
180
168
|
}
|
|
181
169
|
});
|
|
182
170
|
});
|
|
183
171
|
addPlugin(resolver.resolve(`${folderPath}/plugins/sample-plugin`));
|
|
184
172
|
addPlugin(resolver.resolve(`${folderPath}/plugins/disable-warnings-plugin`));
|
|
185
173
|
addPlugin(resolver.resolve(`${folderPath}/plugins/theme-provider-plugin`));
|
|
186
|
-
nuxt.options.css.push(resolver.resolve(`${folderPath}/public/scss/theme.
|
|
187
|
-
nuxt.options.css.push(resolver.resolve(`${folderPath}/public/scss/element-plus/index.
|
|
174
|
+
nuxt.options.css.push(resolver.resolve(`${folderPath}/public/scss/theme.scss`));
|
|
175
|
+
nuxt.options.css.push(resolver.resolve(`${folderPath}/public/scss/element-plus/index.scss`));
|
|
188
176
|
nuxt.hook("prepare:types", ({ references }) => {
|
|
189
177
|
references.push({ path: resolver.resolve(`${folderPath}/types.d.ts`) });
|
|
190
178
|
});
|
|
@@ -30,7 +30,10 @@
|
|
|
30
30
|
<script lang="ts" setup>
|
|
31
31
|
import { ref } from 'vue';
|
|
32
32
|
|
|
33
|
-
const sample_path = ref([
|
|
33
|
+
const sample_path = ref([
|
|
34
|
+
{ regex: /^\/about$/, label: 'header.about-label.text' },
|
|
35
|
+
{ regex: /^\/theme\/([A-Za-z0-9\-_]+)$/, label: 'header.number.text' },
|
|
36
|
+
]);
|
|
34
37
|
const snippets = ref({
|
|
35
38
|
basic: `<timus-breadcrumb :paths="[ { regex: /^\/about$/, label: 'header.about.text' } ]" />`,
|
|
36
39
|
composable: `
|
|
@@ -9,3 +9,305 @@ declare const _default: import("vue").DefineComponent<{}, {}, {
|
|
|
9
9
|
capitalize(value: string): string;
|
|
10
10
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
11
|
export default _default;
|
|
12
|
+
declare module 'vue' {
|
|
13
|
+
interface GlobalComponents {
|
|
14
|
+
}
|
|
15
|
+
interface GlobalDirectives {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
const __VLS_intrinsicElements: __VLS_IntrinsicElements;
|
|
20
|
+
const __VLS_directiveBindingRestFields: {
|
|
21
|
+
instance: null;
|
|
22
|
+
oldValue: null;
|
|
23
|
+
modifiers: any;
|
|
24
|
+
dir: any;
|
|
25
|
+
};
|
|
26
|
+
const __VLS_unref: typeof import('vue').unref;
|
|
27
|
+
const __VLS_nativeElements: {
|
|
28
|
+
a: HTMLAnchorElement;
|
|
29
|
+
abbr: HTMLElement;
|
|
30
|
+
address: HTMLElement;
|
|
31
|
+
area: HTMLAreaElement;
|
|
32
|
+
article: HTMLElement;
|
|
33
|
+
aside: HTMLElement;
|
|
34
|
+
audio: HTMLAudioElement;
|
|
35
|
+
b: HTMLElement;
|
|
36
|
+
base: HTMLBaseElement;
|
|
37
|
+
bdi: HTMLElement;
|
|
38
|
+
bdo: HTMLElement;
|
|
39
|
+
blockquote: HTMLQuoteElement;
|
|
40
|
+
body: HTMLBodyElement;
|
|
41
|
+
br: HTMLBRElement;
|
|
42
|
+
button: HTMLButtonElement;
|
|
43
|
+
canvas: HTMLCanvasElement;
|
|
44
|
+
caption: HTMLTableCaptionElement;
|
|
45
|
+
cite: HTMLElement;
|
|
46
|
+
code: HTMLElement;
|
|
47
|
+
col: HTMLTableColElement;
|
|
48
|
+
colgroup: HTMLTableColElement;
|
|
49
|
+
data: HTMLDataElement;
|
|
50
|
+
datalist: HTMLDataListElement;
|
|
51
|
+
dd: HTMLElement;
|
|
52
|
+
del: HTMLModElement;
|
|
53
|
+
details: HTMLDetailsElement;
|
|
54
|
+
dfn: HTMLElement;
|
|
55
|
+
dialog: HTMLDialogElement;
|
|
56
|
+
div: HTMLDivElement;
|
|
57
|
+
dl: HTMLDListElement;
|
|
58
|
+
dt: HTMLElement;
|
|
59
|
+
em: HTMLElement;
|
|
60
|
+
embed: HTMLEmbedElement;
|
|
61
|
+
fieldset: HTMLFieldSetElement;
|
|
62
|
+
figcaption: HTMLElement;
|
|
63
|
+
figure: HTMLElement;
|
|
64
|
+
footer: HTMLElement;
|
|
65
|
+
form: HTMLFormElement;
|
|
66
|
+
h1: HTMLHeadingElement;
|
|
67
|
+
h2: HTMLHeadingElement;
|
|
68
|
+
h3: HTMLHeadingElement;
|
|
69
|
+
h4: HTMLHeadingElement;
|
|
70
|
+
h5: HTMLHeadingElement;
|
|
71
|
+
h6: HTMLHeadingElement;
|
|
72
|
+
head: HTMLHeadElement;
|
|
73
|
+
header: HTMLElement;
|
|
74
|
+
hgroup: HTMLElement;
|
|
75
|
+
hr: HTMLHRElement;
|
|
76
|
+
html: HTMLHtmlElement;
|
|
77
|
+
i: HTMLElement;
|
|
78
|
+
iframe: HTMLIFrameElement;
|
|
79
|
+
img: HTMLImageElement;
|
|
80
|
+
input: HTMLInputElement;
|
|
81
|
+
ins: HTMLModElement;
|
|
82
|
+
kbd: HTMLElement;
|
|
83
|
+
label: HTMLLabelElement;
|
|
84
|
+
legend: HTMLLegendElement;
|
|
85
|
+
li: HTMLLIElement;
|
|
86
|
+
link: HTMLLinkElement;
|
|
87
|
+
main: HTMLElement;
|
|
88
|
+
map: HTMLMapElement;
|
|
89
|
+
mark: HTMLElement;
|
|
90
|
+
menu: HTMLMenuElement;
|
|
91
|
+
meta: HTMLMetaElement;
|
|
92
|
+
meter: HTMLMeterElement;
|
|
93
|
+
nav: HTMLElement;
|
|
94
|
+
noscript: HTMLElement;
|
|
95
|
+
object: HTMLObjectElement;
|
|
96
|
+
ol: HTMLOListElement;
|
|
97
|
+
optgroup: HTMLOptGroupElement;
|
|
98
|
+
option: HTMLOptionElement;
|
|
99
|
+
output: HTMLOutputElement;
|
|
100
|
+
p: HTMLParagraphElement;
|
|
101
|
+
picture: HTMLPictureElement;
|
|
102
|
+
pre: HTMLPreElement;
|
|
103
|
+
progress: HTMLProgressElement;
|
|
104
|
+
q: HTMLQuoteElement;
|
|
105
|
+
rp: HTMLElement;
|
|
106
|
+
rt: HTMLElement;
|
|
107
|
+
ruby: HTMLElement;
|
|
108
|
+
s: HTMLElement;
|
|
109
|
+
samp: HTMLElement;
|
|
110
|
+
script: HTMLScriptElement;
|
|
111
|
+
search: HTMLElement;
|
|
112
|
+
section: HTMLElement;
|
|
113
|
+
select: HTMLSelectElement;
|
|
114
|
+
slot: HTMLSlotElement;
|
|
115
|
+
small: HTMLElement;
|
|
116
|
+
source: HTMLSourceElement;
|
|
117
|
+
span: HTMLSpanElement;
|
|
118
|
+
strong: HTMLElement;
|
|
119
|
+
style: HTMLStyleElement;
|
|
120
|
+
sub: HTMLElement;
|
|
121
|
+
summary: HTMLElement;
|
|
122
|
+
sup: HTMLElement;
|
|
123
|
+
table: HTMLTableElement;
|
|
124
|
+
tbody: HTMLTableSectionElement;
|
|
125
|
+
td: HTMLTableCellElement;
|
|
126
|
+
template: HTMLTemplateElement;
|
|
127
|
+
textarea: HTMLTextAreaElement;
|
|
128
|
+
tfoot: HTMLTableSectionElement;
|
|
129
|
+
th: HTMLTableCellElement;
|
|
130
|
+
thead: HTMLTableSectionElement;
|
|
131
|
+
time: HTMLTimeElement;
|
|
132
|
+
title: HTMLTitleElement;
|
|
133
|
+
tr: HTMLTableRowElement;
|
|
134
|
+
track: HTMLTrackElement;
|
|
135
|
+
u: HTMLElement;
|
|
136
|
+
ul: HTMLUListElement;
|
|
137
|
+
var: HTMLElement;
|
|
138
|
+
video: HTMLVideoElement;
|
|
139
|
+
wbr: HTMLElement;
|
|
140
|
+
animate: SVGAnimateElement;
|
|
141
|
+
animateMotion: SVGAnimateMotionElement;
|
|
142
|
+
animateTransform: SVGAnimateTransformElement;
|
|
143
|
+
circle: SVGCircleElement;
|
|
144
|
+
clipPath: SVGClipPathElement;
|
|
145
|
+
defs: SVGDefsElement;
|
|
146
|
+
desc: SVGDescElement;
|
|
147
|
+
ellipse: SVGEllipseElement;
|
|
148
|
+
feBlend: SVGFEBlendElement;
|
|
149
|
+
feColorMatrix: SVGFEColorMatrixElement;
|
|
150
|
+
feComponentTransfer: SVGFEComponentTransferElement;
|
|
151
|
+
feComposite: SVGFECompositeElement;
|
|
152
|
+
feConvolveMatrix: SVGFEConvolveMatrixElement;
|
|
153
|
+
feDiffuseLighting: SVGFEDiffuseLightingElement;
|
|
154
|
+
feDisplacementMap: SVGFEDisplacementMapElement;
|
|
155
|
+
feDistantLight: SVGFEDistantLightElement;
|
|
156
|
+
feDropShadow: SVGFEDropShadowElement;
|
|
157
|
+
feFlood: SVGFEFloodElement;
|
|
158
|
+
feFuncA: SVGFEFuncAElement;
|
|
159
|
+
feFuncB: SVGFEFuncBElement;
|
|
160
|
+
feFuncG: SVGFEFuncGElement;
|
|
161
|
+
feFuncR: SVGFEFuncRElement;
|
|
162
|
+
feGaussianBlur: SVGFEGaussianBlurElement;
|
|
163
|
+
feImage: SVGFEImageElement;
|
|
164
|
+
feMerge: SVGFEMergeElement;
|
|
165
|
+
feMergeNode: SVGFEMergeNodeElement;
|
|
166
|
+
feMorphology: SVGFEMorphologyElement;
|
|
167
|
+
feOffset: SVGFEOffsetElement;
|
|
168
|
+
fePointLight: SVGFEPointLightElement;
|
|
169
|
+
feSpecularLighting: SVGFESpecularLightingElement;
|
|
170
|
+
feSpotLight: SVGFESpotLightElement;
|
|
171
|
+
feTile: SVGFETileElement;
|
|
172
|
+
feTurbulence: SVGFETurbulenceElement;
|
|
173
|
+
filter: SVGFilterElement;
|
|
174
|
+
foreignObject: SVGForeignObjectElement;
|
|
175
|
+
g: SVGGElement;
|
|
176
|
+
image: SVGImageElement;
|
|
177
|
+
line: SVGLineElement;
|
|
178
|
+
linearGradient: SVGLinearGradientElement;
|
|
179
|
+
marker: SVGMarkerElement;
|
|
180
|
+
mask: SVGMaskElement;
|
|
181
|
+
metadata: SVGMetadataElement;
|
|
182
|
+
mpath: SVGMPathElement;
|
|
183
|
+
path: SVGPathElement;
|
|
184
|
+
pattern: SVGPatternElement;
|
|
185
|
+
polygon: SVGPolygonElement;
|
|
186
|
+
polyline: SVGPolylineElement;
|
|
187
|
+
radialGradient: SVGRadialGradientElement;
|
|
188
|
+
rect: SVGRectElement;
|
|
189
|
+
set: SVGSetElement;
|
|
190
|
+
stop: SVGStopElement;
|
|
191
|
+
svg: SVGSVGElement;
|
|
192
|
+
switch: SVGSwitchElement;
|
|
193
|
+
symbol: SVGSymbolElement;
|
|
194
|
+
text: SVGTextElement;
|
|
195
|
+
textPath: SVGTextPathElement;
|
|
196
|
+
tspan: SVGTSpanElement;
|
|
197
|
+
use: SVGUseElement;
|
|
198
|
+
view: SVGViewElement;
|
|
199
|
+
};
|
|
200
|
+
type __VLS_IntrinsicElements = import('vue/jsx-runtime').JSX.IntrinsicElements;
|
|
201
|
+
type __VLS_Element = import('vue/jsx-runtime').JSX.Element;
|
|
202
|
+
type __VLS_GlobalComponents = import('vue').GlobalComponents & Pick<typeof import('vue'), 'Transition' | 'TransitionGroup' | 'KeepAlive' | 'Suspense' | 'Teleport'>;
|
|
203
|
+
type __VLS_GlobalDirectives = import('vue').GlobalDirectives;
|
|
204
|
+
type __VLS_IsAny<T> = 0 extends 1 & T ? true : false;
|
|
205
|
+
type __VLS_PickNotAny<A, B> = __VLS_IsAny<A> extends true ? B : A;
|
|
206
|
+
type __VLS_unknownDirective = (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void;
|
|
207
|
+
type __VLS_WithComponent<N0 extends string, LocalComponents, N1 extends string, N2 extends string, N3 extends string> = N1 extends keyof LocalComponents ? N1 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
|
|
208
|
+
[K in N0]: LocalComponents[N1];
|
|
209
|
+
} : N2 extends keyof LocalComponents ? N2 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
|
|
210
|
+
[K in N0]: LocalComponents[N2];
|
|
211
|
+
} : N3 extends keyof LocalComponents ? N3 extends N0 ? Pick<LocalComponents, N0 extends keyof LocalComponents ? N0 : never> : {
|
|
212
|
+
[K in N0]: LocalComponents[N3];
|
|
213
|
+
} : N1 extends keyof __VLS_GlobalComponents ? N1 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
|
|
214
|
+
[K in N0]: __VLS_GlobalComponents[N1];
|
|
215
|
+
} : N2 extends keyof __VLS_GlobalComponents ? N2 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
|
|
216
|
+
[K in N0]: __VLS_GlobalComponents[N2];
|
|
217
|
+
} : N3 extends keyof __VLS_GlobalComponents ? N3 extends N0 ? Pick<__VLS_GlobalComponents, N0 extends keyof __VLS_GlobalComponents ? N0 : never> : {
|
|
218
|
+
[K in N0]: __VLS_GlobalComponents[N3];
|
|
219
|
+
} : {
|
|
220
|
+
[K in N0]: unknown;
|
|
221
|
+
};
|
|
222
|
+
type __VLS_FunctionalComponentProps<T, K> = '__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends {
|
|
223
|
+
__ctx?: {
|
|
224
|
+
props?: infer P;
|
|
225
|
+
};
|
|
226
|
+
} ? NonNullable<P> : never : T extends (props: infer P, ...args: any) => any ? P : {};
|
|
227
|
+
type __VLS_IsFunction<T, K> = K extends keyof T ? __VLS_IsAny<T[K]> extends false ? unknown extends T[K] ? false : true : false : false;
|
|
228
|
+
type __VLS_UnionToIntersection<U> = (U extends unknown ? (arg: U) => unknown : never) extends ((arg: infer P) => unknown) ? P : never;
|
|
229
|
+
type __VLS_OverloadUnionInner<T, U = unknown> = U & T extends (...args: infer A) => infer R ? U extends T ? never : __VLS_OverloadUnionInner<T, Pick<T, keyof T> & U & ((...args: A) => R)> | ((...args: A) => R) : never;
|
|
230
|
+
type __VLS_OverloadUnion<T> = Exclude<__VLS_OverloadUnionInner<(() => never) & T>, T extends () => never ? never : () => never>;
|
|
231
|
+
type __VLS_ConstructorOverloads<T> = __VLS_OverloadUnion<T> extends infer F ? F extends (event: infer E, ...args: infer A) => any ? {
|
|
232
|
+
[K in E & string]: (...args: A) => void;
|
|
233
|
+
} : never : never;
|
|
234
|
+
type __VLS_NormalizeEmits<T> = __VLS_PrettifyGlobal<__VLS_UnionToIntersection<__VLS_ConstructorOverloads<T> & {
|
|
235
|
+
[K in keyof T]: T[K] extends any[] ? {
|
|
236
|
+
(...args: T[K]): void;
|
|
237
|
+
} : never;
|
|
238
|
+
}>>;
|
|
239
|
+
type __VLS_PrettifyGlobal<T> = {
|
|
240
|
+
[K in keyof T]: T[K];
|
|
241
|
+
} & {};
|
|
242
|
+
function __VLS_getVForSourceType(source: number): [number, number, number][];
|
|
243
|
+
function __VLS_getVForSourceType(source: string): [string, number, number][];
|
|
244
|
+
function __VLS_getVForSourceType<T extends any[]>(source: T): [
|
|
245
|
+
item: T[number],
|
|
246
|
+
key: number,
|
|
247
|
+
index: number
|
|
248
|
+
][];
|
|
249
|
+
function __VLS_getVForSourceType<T extends {
|
|
250
|
+
[Symbol.iterator](): Iterator<any>;
|
|
251
|
+
}>(source: T): [
|
|
252
|
+
item: T extends {
|
|
253
|
+
[Symbol.iterator](): Iterator<infer T1>;
|
|
254
|
+
} ? T1 : never,
|
|
255
|
+
key: number,
|
|
256
|
+
index: undefined
|
|
257
|
+
][];
|
|
258
|
+
function __VLS_getVForSourceType<T extends number | {
|
|
259
|
+
[Symbol.iterator](): Iterator<any>;
|
|
260
|
+
}>(source: T): [
|
|
261
|
+
item: number | (Exclude<T, number> extends {
|
|
262
|
+
[Symbol.iterator](): Iterator<infer T1>;
|
|
263
|
+
} ? T1 : never),
|
|
264
|
+
key: number,
|
|
265
|
+
index: undefined
|
|
266
|
+
][];
|
|
267
|
+
function __VLS_getVForSourceType<T>(source: T): [
|
|
268
|
+
item: T[keyof T],
|
|
269
|
+
key: keyof T,
|
|
270
|
+
index: number
|
|
271
|
+
][];
|
|
272
|
+
function __VLS_getSlotParams<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>;
|
|
273
|
+
function __VLS_getSlotParam<T>(slot: T): Parameters<__VLS_PickNotAny<NonNullable<T>, (...args: any[]) => any>>[0];
|
|
274
|
+
function __VLS_directiveAsFunction<T extends import('vue').Directive>(dir: T): T extends (...args: any) => any ? T | __VLS_unknownDirective : NonNullable<(T & Record<string, __VLS_unknownDirective>)['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>;
|
|
275
|
+
function __VLS_withScope<T, K>(ctx: T, scope: K): ctx is T & K;
|
|
276
|
+
function __VLS_makeOptional<T>(t: T): {
|
|
277
|
+
[K in keyof T]?: T[K];
|
|
278
|
+
};
|
|
279
|
+
function __VLS_nonNullable<T>(t: T): T extends null | undefined ? never : T;
|
|
280
|
+
function __VLS_asFunctionalComponent<T, K = T extends new (...args: any) => any ? InstanceType<T> : unknown>(t: T, instance?: K): T extends new (...args: any) => any ? (props: (K extends {
|
|
281
|
+
$props: infer Props;
|
|
282
|
+
} ? Props : any) & Record<string, unknown>, ctx?: any) => __VLS_Element & {
|
|
283
|
+
__ctx?: {
|
|
284
|
+
attrs?: any;
|
|
285
|
+
slots?: K extends {
|
|
286
|
+
$slots: infer Slots;
|
|
287
|
+
} ? Slots : any;
|
|
288
|
+
emit?: K extends {
|
|
289
|
+
$emit: infer Emit;
|
|
290
|
+
} ? Emit : any;
|
|
291
|
+
} & {
|
|
292
|
+
props?: (K extends {
|
|
293
|
+
$props: infer Props;
|
|
294
|
+
} ? Props : any) & Record<string, unknown>;
|
|
295
|
+
expose?(exposed: K): void;
|
|
296
|
+
};
|
|
297
|
+
} : T extends () => any ? (props: {}, ctx?: any) => ReturnType<T> : T extends (...args: any) => any ? T : (_: {} & Record<string, unknown>, ctx?: any) => {
|
|
298
|
+
__ctx?: {
|
|
299
|
+
attrs?: any;
|
|
300
|
+
expose?: any;
|
|
301
|
+
slots?: any;
|
|
302
|
+
emit?: any;
|
|
303
|
+
props?: {} & Record<string, unknown>;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
function __VLS_elementAsFunction<T>(tag: T, endTag?: T): (_: T & Record<string, unknown>) => void;
|
|
307
|
+
function __VLS_functionalComponentArgsRest<T extends (...args: any) => any>(t: T): 2 extends Parameters<T>['length'] ? [any] : [];
|
|
308
|
+
function __VLS_pickFunctionalComponentCtx<T, K>(comp: T, compInstance: K): NonNullable<__VLS_PickNotAny<'__ctx' extends keyof __VLS_PickNotAny<K, {}> ? K extends {
|
|
309
|
+
__ctx?: infer Ctx;
|
|
310
|
+
} ? Ctx : never : any, T extends (props: any, ctx: infer Ctx) => any ? Ctx : any>>;
|
|
311
|
+
function __VLS_normalizeSlot<S>(s: S): S extends () => infer R ? (props: {}) => R : S;
|
|
312
|
+
function __VLS_tryAsConstant<const T>(t: T): T;
|
|
313
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Path Array Documentation
|
|
2
|
+
|
|
3
|
+
This document describes the `path` array, which defines routing and navigation rules for a web application.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
Each object in the `path` array typically contains the following properties:
|
|
8
|
+
|
|
9
|
+
- `regex`: A regular expression to match URL paths
|
|
10
|
+
- `label`: A text label (usually a translation key) for the path
|
|
11
|
+
- `path` (optional): A redirect path or default path
|
|
12
|
+
- `hidden` (optional): A boolean indicating if the path should be hidden in navigation
|
|
13
|
+
- `rest`: Additional regex to match against the remaining path
|
|
14
|
+
|
|
15
|
+
## Key Concepts
|
|
16
|
+
|
|
17
|
+
1. **Regular Expression Matching**: The `regex` property is used to match the current route. This allows for flexible and powerful route matching.
|
|
18
|
+
|
|
19
|
+
2. **Hidden Routes**: By setting `hidden: true`, you can prevent certain routes from appearing in the breadcrumb. This is useful for intermediate pages or when you want to simplify the breadcrumb trail.
|
|
20
|
+
|
|
21
|
+
3. **Custom Redirects**: The `path` property allows you to specify a custom destination when a breadcrumb item is clicked. If not specified, it defaults to the matched path.
|
|
22
|
+
|
|
23
|
+
4. **Rest Path Handling**: The `rest` property is an additional condition. It's used to match against the remaining path after the main `regex` match. This allows for more granular control over when a rule should apply.
|
|
24
|
+
|
|
25
|
+
5. **Labeling**: The `label` property specifies the translation key for the breadcrumb text. This supports internationalization.
|
|
26
|
+
|
|
27
|
+
## Usage Notes
|
|
28
|
+
|
|
29
|
+
- Order matters in the `PathList`. The component will use the last matching rule it finds, so more specific rules should come later in the list.
|
|
30
|
+
|
|
31
|
+
- The `regex` property can include capturing groups, which can be used to extract dynamic parts of the route (like IDs).
|
|
32
|
+
|
|
33
|
+
- When using the `rest` property, the rule will only apply if both the main `regex` and the `rest` regex match.
|
|
34
|
+
|
|
35
|
+
- If no matching rule is found in `PathList`, the component will automatically generate a label based on the route segments.
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
1. **Basic Route**
|
|
40
|
+
|
|
41
|
+
```javascript
|
|
42
|
+
{
|
|
43
|
+
regex: /^\/settings$/,
|
|
44
|
+
path: '/settings/administrators?tab=administrators',
|
|
45
|
+
label: 'header.settings.text',
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This will match the "/settings" route, display "Settings" (or its translation), and redirect to the administrators tab when clicked.
|
|
50
|
+
|
|
51
|
+
2. **Hidden Route**
|
|
52
|
+
|
|
53
|
+
```javascript
|
|
54
|
+
{
|
|
55
|
+
regex: /^\/migrations$/,
|
|
56
|
+
hidden: true,
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This will prevent the "/migrations" route from appearing in the breadcrumb.
|
|
61
|
+
|
|
62
|
+
3. **Dynamic Route with Rest Condition**
|
|
63
|
+
```javascript
|
|
64
|
+
{
|
|
65
|
+
regex: /^\/customers\/([A-Za-z0-9\-_]+)$/,
|
|
66
|
+
rest: /^subscriptions$/,
|
|
67
|
+
hidden: true,
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
This will hide the customer ID from the breadcrumb when viewing subscriptions, resulting in a cleaner "Home > Customers > Subscriptions" breadcrumb instead of "Home > Customers > [CustomerID] > Subscriptions".
|
|
71
|
+
|
|
72
|
+
By carefully crafting your `PathList`, you can create intuitive and clean breadcrumb navigation for your application.
|