vibe-design-system 2.8.43 → 2.8.45
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/package.json
CHANGED
|
@@ -1108,6 +1108,7 @@ function buildSpecialStories(componentName, variants) {
|
|
|
1108
1108
|
|
|
1109
1109
|
function buildRecipeStoryContent(comp, componentName, importPath, title, source, exportStyle, recipe, defaultArgLines = [], lucideImports = [], iconPropNames = [], needReact = false) {
|
|
1110
1110
|
const lines = [];
|
|
1111
|
+
lines.push(`// @vds-regenerate — VDS auto-generated. Remove this line to prevent overwrite.`);
|
|
1111
1112
|
lines.push(`import type { Meta, StoryObj } from "@storybook/react";`);
|
|
1112
1113
|
if (needReact) {
|
|
1113
1114
|
lines.push(`import React from "react";`);
|
|
@@ -1387,6 +1388,7 @@ function buildStoryFileContent(comp) {
|
|
|
1387
1388
|
}
|
|
1388
1389
|
|
|
1389
1390
|
const lines = [];
|
|
1391
|
+
lines.push(`// @vds-regenerate — VDS auto-generated. Remove this line to prevent overwrite.`);
|
|
1390
1392
|
lines.push(`import type { Meta, StoryObj } from "@storybook/react";`);
|
|
1391
1393
|
lines.push(`import React from "react";`);
|
|
1392
1394
|
if (lucideImports.length > 0) {
|
|
@@ -3057,6 +3059,17 @@ function main() {
|
|
|
3057
3059
|
const requiredCount = Array.isArray(comp.props) ? comp.props.filter((p) => p.required === true).length : 0;
|
|
3058
3060
|
if (requiredCount > 3) continue;
|
|
3059
3061
|
|
|
3062
|
+
// Never overwrite manually edited story files
|
|
3063
|
+
if (fs.existsSync(storyPath)) {
|
|
3064
|
+
try {
|
|
3065
|
+
const existing = fs.readFileSync(storyPath, "utf-8");
|
|
3066
|
+
// If file was manually edited (different from VDS auto-gen pattern), skip it
|
|
3067
|
+
if (!existing.includes("@vds-regenerate")) {
|
|
3068
|
+
continue;
|
|
3069
|
+
}
|
|
3070
|
+
} catch (_) {}
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3060
3073
|
const content = buildStoryFileContent(comp);
|
|
3061
3074
|
if (content == null) continue;
|
|
3062
3075
|
fs.writeFileSync(storyPath, content, "utf-8");
|