@vueless/storybook 1.2.7-beta.2 → 1.2.7-beta.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/index.js +4 -4
- package/package.json +13 -10
- package/webTypes/lib/build.js +21 -1
package/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
export function defineConfigWithVueless(config) {
|
|
19
19
|
return (async () => ({
|
|
20
20
|
...config,
|
|
21
|
-
stories: [...config.stories, ...(await getVuelessStoriesGlob(config?.vuelessEnv))],
|
|
21
|
+
stories: [...(config.stories || []), ...(await getVuelessStoriesGlob(config?.vuelessEnv))],
|
|
22
22
|
addons: [
|
|
23
23
|
...new Set([
|
|
24
24
|
...(config.addons || []),
|
|
@@ -30,12 +30,12 @@ export function defineConfigWithVueless(config) {
|
|
|
30
30
|
],
|
|
31
31
|
staticDirs: ["public"],
|
|
32
32
|
framework: {
|
|
33
|
-
...config.framework,
|
|
33
|
+
...(config.framework || {}),
|
|
34
34
|
name: "@storybook/vue3-vite",
|
|
35
35
|
options: {
|
|
36
|
-
...config.framework?.options,
|
|
36
|
+
...(config.framework?.options || {}),
|
|
37
37
|
builder: {
|
|
38
|
-
...config.framework?.options?.builder,
|
|
38
|
+
...(config.framework?.options?.builder || {}),
|
|
39
39
|
viteConfigPath: ".storybook/vite.config.js",
|
|
40
40
|
},
|
|
41
41
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueless/storybook",
|
|
3
|
-
"version": "1.2.7-beta.
|
|
3
|
+
"version": "1.2.7-beta.3",
|
|
4
4
|
"description": "Simplifies Storybook configuration for Vueless UI library.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|
|
@@ -17,27 +17,28 @@
|
|
|
17
17
|
"lint:fix": "eslint --fix src/",
|
|
18
18
|
"lint:ci": "eslint --no-fix --max-warnings=0",
|
|
19
19
|
"release:prepare": "rm -rf dist && mkdir -p dist && cp -r src/. package.json LICENSE README.md dist/",
|
|
20
|
-
"release:beta": "release-it --
|
|
21
|
-
"release:patch": "release-it patch --ci
|
|
22
|
-
"release:minor": "release-it minor --ci
|
|
23
|
-
"release:major": "release-it major --ci
|
|
20
|
+
"release:beta": "release-it --increment=prerelease --preRelease=beta --ci --no-git.tag --no-github.release",
|
|
21
|
+
"release:patch": "release-it patch --ci",
|
|
22
|
+
"release:minor": "release-it minor --ci",
|
|
23
|
+
"release:major": "release-it major --ci"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@storybook/addon-docs": "9.1.
|
|
27
|
-
"@storybook/addon-links": "9.1.
|
|
28
|
-
"@storybook/addon-themes": "9.1.
|
|
29
|
-
"@storybook/vue3-vite": "9.1.
|
|
26
|
+
"@storybook/addon-docs": "^9.1.10",
|
|
27
|
+
"@storybook/addon-links": "^9.1.10",
|
|
28
|
+
"@storybook/addon-themes": "^9.1.10",
|
|
29
|
+
"@storybook/vue3-vite": "^9.1.10",
|
|
30
30
|
"@vueless/storybook-dark-mode": "^9.0.8",
|
|
31
31
|
"chokidar": "^4.0.3",
|
|
32
32
|
"esbuild": "^0.25.9",
|
|
33
33
|
"globby": "^14.1.0",
|
|
34
34
|
"mkdirp": "^3.0.1",
|
|
35
35
|
"prettier2": "npm:prettier@2.8.8",
|
|
36
|
-
"storybook": "9.1.
|
|
36
|
+
"storybook": "^9.1.10",
|
|
37
37
|
"vue-docgen-api": "^4.79.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@release-it/bumper": "^7.0.5",
|
|
41
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
41
42
|
"@stylistic/eslint-plugin": "^5.2.3",
|
|
42
43
|
"@types/node": "^24.3.0",
|
|
43
44
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
@@ -51,6 +52,7 @@
|
|
|
51
52
|
"tailwindcss": "^4.1.12",
|
|
52
53
|
"typescript": "^5.9.2",
|
|
53
54
|
"typescript-eslint": "^8.40.0",
|
|
55
|
+
"vite": "^7.1.9",
|
|
54
56
|
"vue": "latest",
|
|
55
57
|
"vue-router": "latest",
|
|
56
58
|
"vue-tsc": "^3.0.6",
|
|
@@ -71,6 +73,7 @@
|
|
|
71
73
|
"vue": "latest",
|
|
72
74
|
"vue-template-compiler": "latest"
|
|
73
75
|
},
|
|
76
|
+
"conventional-changelog-conventionalcommits": "8.0.0",
|
|
74
77
|
"storybook": "$storybook"
|
|
75
78
|
},
|
|
76
79
|
"resolutions": {
|
package/webTypes/lib/build.js
CHANGED
|
@@ -112,6 +112,25 @@ export function getDefaultConfigJson(fileContents) {
|
|
|
112
112
|
return (0, eval)("(" + objectString + ")"); // Converting into JS object
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
/**
|
|
116
|
+
* Retrieves the default values from the provided component custom properties.
|
|
117
|
+
*/
|
|
118
|
+
export function getCustomPropsDefaults(props) {
|
|
119
|
+
const customPropsDefaults = {};
|
|
120
|
+
|
|
121
|
+
if (!props) {
|
|
122
|
+
return customPropsDefaults;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
for (const [key, value] of Object.entries(props)) {
|
|
126
|
+
if (value.default) {
|
|
127
|
+
customPropsDefaults[key] = value.default;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return customPropsDefaults;
|
|
132
|
+
}
|
|
133
|
+
|
|
115
134
|
function getDefaultConfigFileName(folderPath) {
|
|
116
135
|
const folder = fs.readdirSync(path.dirname(folderPath));
|
|
117
136
|
|
|
@@ -159,11 +178,12 @@ async function extractInformation(absolutePath, config, vuelessConfig) {
|
|
|
159
178
|
defaultConfig = getDefaultConfigJson(defaultConfigContent);
|
|
160
179
|
}
|
|
161
180
|
|
|
162
|
-
const globalConfigComponents = vuelessConfig?.
|
|
181
|
+
const globalConfigComponents = vuelessConfig?.components || {};
|
|
163
182
|
|
|
164
183
|
const defaults = _.merge(
|
|
165
184
|
defaultConfig?.defaults || {},
|
|
166
185
|
globalConfigComponents[name]?.defaults || {},
|
|
186
|
+
getCustomPropsDefaults(globalConfigComponents[name]?.props),
|
|
167
187
|
);
|
|
168
188
|
|
|
169
189
|
doc.docsBlocks?.forEach((block) => {
|