@bagelink/vue 1.2.79 → 1.2.81
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/bin/experimentalGenTypedRoutes.ts +13 -2
- package/dist/components/form/BagelForm.vue.d.ts +1 -0
- package/dist/components/form/BagelForm.vue.d.ts.map +1 -1
- package/dist/components/form/BglMultiStepForm.vue.d.ts +7 -4
- package/dist/components/form/BglMultiStepForm.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts +14 -6
- package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts.map +1 -1
- package/dist/components/form/inputs/RichText/index.vue.d.ts.map +1 -1
- package/dist/index.cjs +161 -134
- package/dist/index.mjs +161 -134
- package/dist/style.css +111 -81
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/form/BagelForm.vue +2 -1
- package/src/components/form/BglMultiStepForm.vue +47 -32
- package/src/components/form/inputs/CodeEditor/Index.vue +160 -98
- package/src/components/form/inputs/RichText/index.vue +12 -11
- package/src/utils/index.ts +38 -13
|
@@ -161,7 +161,7 @@ export interface RouteNamedMap {`
|
|
|
161
161
|
|
|
162
162
|
for (const route of processedRoutes) {
|
|
163
163
|
// skip catch-all or unnamed
|
|
164
|
-
if (!route.name || route.name === '404') continue
|
|
164
|
+
if (!route.name || route.name === '404' || route.path === '/:catchAll(.*)*') continue
|
|
165
165
|
|
|
166
166
|
if (route.params.length > 0) {
|
|
167
167
|
const rawParams = route.params
|
|
@@ -278,6 +278,7 @@ function stripAtImports(content: string): string {
|
|
|
278
278
|
|
|
279
279
|
// Script usage
|
|
280
280
|
if (require.main === module) {
|
|
281
|
+
let exitCode = 0
|
|
281
282
|
const routesPath = argv[2] || './src/router/index.ts'
|
|
282
283
|
const outputPath = argv[3] || './src/router/vue-routes.d.ts'
|
|
283
284
|
|
|
@@ -292,6 +293,15 @@ if (require.main === module) {
|
|
|
292
293
|
// 2) Write the modified content
|
|
293
294
|
writeFileSync(tempFilePath, strippedContent)
|
|
294
295
|
|
|
296
|
+
// region Mocking global objects
|
|
297
|
+
Object.assign(globalThis, { window: {
|
|
298
|
+
history: { replaceState: () => {}, pushState: () => {} },
|
|
299
|
+
location: { protocol: '', replace: () => {}, assign: () => {} },
|
|
300
|
+
addEventListener: () => {},
|
|
301
|
+
} })
|
|
302
|
+
Object.assign(globalThis, { location: { protocol: '', replace: () => {}, assign: () => {} } })
|
|
303
|
+
// endregion Mocking global objects
|
|
304
|
+
|
|
295
305
|
import(tempFilePath).then(({ routes }) => {
|
|
296
306
|
if (!routes || routes.length === 0) {
|
|
297
307
|
throw new Error('No routes found in the specified file')
|
|
@@ -301,9 +311,10 @@ if (require.main === module) {
|
|
|
301
311
|
generateRouteTypesFromRoutes(routes, fullOutputPath)
|
|
302
312
|
}).catch((error) => {
|
|
303
313
|
console.error('Error processing routes:', error)
|
|
314
|
+
exitCode = 1
|
|
304
315
|
}).finally(() => {
|
|
305
316
|
// Clean up temp file
|
|
306
317
|
unlinkSync(tempFilePath)
|
|
307
|
-
exit(
|
|
318
|
+
exit(exitCode)
|
|
308
319
|
})
|
|
309
320
|
}
|
|
@@ -17,6 +17,7 @@ declare const _default: <T extends {
|
|
|
17
17
|
validateForm: () => boolean;
|
|
18
18
|
resolveSchema: (schema?: BglFormSchemaFnT<T>) => Promise<void>;
|
|
19
19
|
refreshSchema: () => Promise<BglFormSchemaT<T> | undefined>;
|
|
20
|
+
checkValidity: () => boolean;
|
|
20
21
|
}>): void;
|
|
21
22
|
attrs: any;
|
|
22
23
|
slots: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BagelForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BagelForm.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BagelForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BagelForm.vue"],"names":[],"mappings":"AAyOA,OAAO,KAAK,EAAE,gBAAgB,EAAS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
|
bagelFormProps?: Omit<ComponentProps<typeof BagelForm<T, P>>, ("schema" | `${string}modelValue` | `ref${string}` | `onVnode${string}` | "onSubmit")>;
|
|
14
|
-
schema
|
|
14
|
+
schema?: BglFormSchemaFnT<T>;
|
|
15
15
|
showProgress?: boolean;
|
|
16
16
|
rtl?: boolean;
|
|
17
17
|
stepLabels?: string[];
|
|
@@ -23,12 +23,14 @@ declare const _default: <T extends {
|
|
|
23
23
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
24
24
|
submit: () => void;
|
|
25
25
|
validateForm: () => boolean;
|
|
26
|
+
checkValidity: (() => boolean) | undefined;
|
|
26
27
|
isDirty: import('vue').ComputedRef<boolean | undefined>;
|
|
27
28
|
reset: () => void;
|
|
28
29
|
goToStep: (stepIndex: number) => boolean;
|
|
29
30
|
currentStep: import('vue').ComputedRef<number>;
|
|
30
31
|
totalSteps: import('vue').ComputedRef<number>;
|
|
31
|
-
|
|
32
|
+
isStepValid: import('vue').Ref<boolean, boolean>;
|
|
33
|
+
nextStep: () => Promise<void>;
|
|
32
34
|
prevStep: () => void;
|
|
33
35
|
}>): void;
|
|
34
36
|
attrs: any;
|
|
@@ -45,11 +47,12 @@ declare const _default: <T extends {
|
|
|
45
47
|
error?(_: {}): any;
|
|
46
48
|
steppers?(_: {
|
|
47
49
|
prevStep: () => void;
|
|
48
|
-
nextStep: () => void
|
|
50
|
+
nextStep: () => Promise<void>;
|
|
49
51
|
submit: () => void;
|
|
50
52
|
currentStep: number;
|
|
51
53
|
totalSteps: number;
|
|
52
|
-
|
|
54
|
+
isLastStep: boolean;
|
|
55
|
+
isStepValid: boolean;
|
|
53
56
|
}): any;
|
|
54
57
|
};
|
|
55
58
|
emit: ((event: "submit" | "stepChange", ...args: any[]) => void) & ((evt: "update:modelValue", value: T) => void);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BglMultiStepForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/form/BglMultiStepForm.vue"],"names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,GAAG;uBACL,GAAG;;;;;;;;;YACA,GAAG;;UAoD3B,2GAAqC;EAExC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAzhBzE,wBAyhB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -4,7 +4,7 @@ declare global {
|
|
|
4
4
|
hljs: HilightJS;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
interface CodeEditorProps {
|
|
8
8
|
language?: Language;
|
|
9
9
|
readonly?: boolean;
|
|
10
10
|
modelValue?: string;
|
|
@@ -12,13 +12,21 @@ type __VLS_Props = {
|
|
|
12
12
|
ignoreIllegals?: boolean;
|
|
13
13
|
label?: string;
|
|
14
14
|
height?: string;
|
|
15
|
-
}
|
|
16
|
-
declare const _default: import('vue').DefineComponent<
|
|
15
|
+
}
|
|
16
|
+
declare const _default: import('vue').DefineComponent<CodeEditorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
17
|
"update:modelValue": (...args: any[]) => void;
|
|
18
|
-
}, string, import('vue').PublicProps, Readonly<
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<CodeEditorProps> & Readonly<{
|
|
19
19
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
20
|
-
}>, {
|
|
21
|
-
|
|
20
|
+
}>, {
|
|
21
|
+
label: string;
|
|
22
|
+
height: string;
|
|
23
|
+
language: Language;
|
|
24
|
+
modelValue: string;
|
|
25
|
+
readonly: boolean;
|
|
26
|
+
autodetect: boolean;
|
|
27
|
+
ignoreIllegals: boolean;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
29
|
+
editorRef: HTMLDivElement;
|
|
22
30
|
}, HTMLDivElement>;
|
|
23
31
|
export default _default;
|
|
24
32
|
//# sourceMappingURL=Index.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/CodeEditor/Index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/CodeEditor/Index.vue"],"names":[],"mappings":"AAmPA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEtD,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,IAAI,EAAE,SAAS,CAAA;KACf;CACD;AAID,UAAU,eAAe;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CACf;;;;;;WAFQ,MAAM;YACL,MAAM;cANJ,QAAQ;gBAEN,MAAM;cADR,OAAO;gBAEL,OAAO;oBACH,OAAO;;;;AAwNzB,wBAUG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/RichText/index.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/RichText/index.vue"],"names":[],"mappings":"AAiSA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAQpD,KAAK,WAAW,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,aAAa,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;;;;;;;;AAoW1G,wBASG"}
|