@vueless/storybook 0.0.31 → 0.0.33
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.
|
@@ -75,7 +75,7 @@ function templateSourceCode(templateSource, args, argTypes) {
|
|
|
75
75
|
|
|
76
76
|
const slotTemplateCode =
|
|
77
77
|
// eslint-disable-next-line vue/max-len
|
|
78
|
-
|
|
78
|
+
`<template v-for="(slot, index) of slots" :key="index" v-slot:[slot]><template v-if="args[slot + 'Slot']">{{ args[slot + 'Slot'] }}</template></template>`;
|
|
79
79
|
const templateDefaultRegEx = /<template #default>([\s\S]*?)<\/template>/g;
|
|
80
80
|
|
|
81
81
|
return templateSource
|
package/.storybook/preview.js
CHANGED
|
@@ -10,18 +10,15 @@ import { createRouter, createWebHistory } from "vue-router";
|
|
|
10
10
|
// Tailwind styles
|
|
11
11
|
import "./index.pcss";
|
|
12
12
|
|
|
13
|
-
// Create vueless instance
|
|
14
|
-
const vueless = createVueless();
|
|
15
|
-
|
|
16
|
-
const router = createRouter({
|
|
17
|
-
history: createWebHistory(),
|
|
18
|
-
routes: [{ path: "/" }],
|
|
19
|
-
});
|
|
20
|
-
|
|
21
13
|
// Create storybook app instance
|
|
22
14
|
const storybookApp = (app) => {
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
const vueless = createVueless();
|
|
16
|
+
const router = createRouter({ history: createWebHistory(), routes: [] });
|
|
17
|
+
|
|
18
|
+
if (!app._context.config.globalProperties.$route) {
|
|
19
|
+
app.use(router);
|
|
20
|
+
app.use(vueless);
|
|
21
|
+
}
|
|
25
22
|
};
|
|
26
23
|
|
|
27
24
|
// Setup storybook
|
|
@@ -36,8 +33,6 @@ export default {
|
|
|
36
33
|
backgrounds,
|
|
37
34
|
options: {
|
|
38
35
|
storySort: (a, b) => {
|
|
39
|
-
if (!a.type === "docs") return;
|
|
40
|
-
|
|
41
36
|
const idA = a.id.split("--")[0];
|
|
42
37
|
const idB = b.id.split("--")[0];
|
|
43
38
|
|