vibe-design-system 2.4.8 → 2.4.10
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/init.js
CHANGED
|
@@ -36,12 +36,17 @@ export default config;
|
|
|
36
36
|
`;
|
|
37
37
|
|
|
38
38
|
const STORYBOOK_PREVIEW_TS = `import type { Preview } from "@storybook/react";
|
|
39
|
+
import React from "react";
|
|
40
|
+
import { MemoryRouter } from "react-router-dom";
|
|
39
41
|
import "../src/index.css";
|
|
40
42
|
|
|
41
43
|
const preview: Preview = {
|
|
42
44
|
parameters: {
|
|
43
|
-
layout: "
|
|
45
|
+
layout: "fullscreen",
|
|
44
46
|
},
|
|
47
|
+
decorators: [
|
|
48
|
+
(Story) => React.createElement(MemoryRouter, null, React.createElement(Story, null)),
|
|
49
|
+
],
|
|
45
50
|
};
|
|
46
51
|
|
|
47
52
|
export default preview;
|
package/package.json
CHANGED
|
@@ -534,7 +534,12 @@ function buildRecipeStoryContent(comp, componentName, importPath, title, source,
|
|
|
534
534
|
function buildStoryFileContent(comp) {
|
|
535
535
|
const componentName = toSafeComponentName(comp.name, comp.file);
|
|
536
536
|
const fileNoExt = comp.file.replace(/\.(tsx|jsx)$/, "");
|
|
537
|
-
|
|
537
|
+
let importPath = "";
|
|
538
|
+
if (fileNoExt.startsWith("pages/")) {
|
|
539
|
+
importPath = "@/" + fileNoExt;
|
|
540
|
+
} else {
|
|
541
|
+
importPath = "@/components/" + fileNoExt;
|
|
542
|
+
}
|
|
538
543
|
const group = comp.group || "Components";
|
|
539
544
|
const category = comp.category || null;
|
|
540
545
|
const titleParts = [group, category, componentName].filter(Boolean);
|
|
@@ -908,7 +913,6 @@ function main() {
|
|
|
908
913
|
}
|
|
909
914
|
|
|
910
915
|
for (const comp of components) {
|
|
911
|
-
if (comp.file && comp.file.startsWith("pages/")) continue;
|
|
912
916
|
const componentName = toSafeComponentName(comp.name, comp.file);
|
|
913
917
|
if (onlyName && componentName !== onlyName) continue;
|
|
914
918
|
if (SKIP_LIST.includes(componentName)) continue;
|