@jfrader/storybook-docs 0.11.0 → 0.11.1

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -408,7 +408,7 @@ function buildUsageSnippet({ componentName, from, args, source, renderSource, js
408
408
  if (!from.trim()) return example;
409
409
  if (rootTag !== rootName) return example;
410
410
  const imports = [...example.matchAll(/import\s*\{([^}]+)\}\s*from\s*(['"])(.*?)\2/g)];
411
- const imported = imports.some((match) => match[3] === from && match[1].split(",").some((name) => name.trim() === rootName));
411
+ const imported = imports.some((match) => match[1].split(",").some((name) => name.trim() === rootName));
412
412
  return imported ? example : `import { ${rootName} } from '${from}';
413
413
 
414
414
  ${example}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jfrader/storybook-docs",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "type": "module",
5
5
  "description": "A documentation front for any design system that has Storybook: navigation, live examples and API tables are generated from the story files themselves.",
6
6
  "exports": {