@sit-onyx/storybook-utils 1.1.1 → 1.1.2-dev-20260301164048

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sit-onyx/storybook-utils",
3
3
  "description": "Storybook utilities for Vue",
4
- "version": "1.1.1",
4
+ "version": "1.1.2-dev-20260301164048",
5
5
  "type": "module",
6
6
  "author": "Schwarz IT KG",
7
7
  "license": "Apache-2.0",
@@ -32,16 +32,16 @@
32
32
  "storybook": ">= 9.0.0",
33
33
  "vue-component-type-helpers": ">= 2",
34
34
  "@sit-onyx/flags": "^1.0.0",
35
- "@sit-onyx/icons": "^1.5.0"
35
+ "@sit-onyx/icons": "^1.7.0-dev-20260301164048"
36
36
  },
37
37
  "dependencies": {
38
38
  "deepmerge-ts": "^7.1.5"
39
39
  },
40
40
  "devDependencies": {
41
- "storybook": "^10.2.0",
42
- "vue": "3.5.27",
43
- "vue-component-type-helpers": "^3.2.2",
44
- "@sit-onyx/icons": "^1.5.0",
41
+ "storybook": "^10.2.10",
42
+ "vue": "3.5.28",
43
+ "vue-component-type-helpers": "^3.2.5",
44
+ "@sit-onyx/icons": "^1.7.0-dev-20260301164048",
45
45
  "@sit-onyx/shared": "^0.1.0"
46
46
  },
47
47
  "scripts": {
@@ -9,7 +9,7 @@ describe("preview.ts", () => {
9
9
  const sourceCode = await sourceCodeTransformer(`<template>
10
10
  <OnyxTest icon='${iconPlaceholder}' test='${iconBellRing}' :obj="{foo:'${replaceAll(iconCalendar, '"', "\\'")}'}" flag='${flagDE}' />
11
11
  <OnyxOtherComponent />
12
- <OnyxComp>Test</OnyxComp>
12
+ <OnyxComp icon='${iconPlaceholder}'>Test</OnyxComp>
13
13
  </template>`);
14
14
 
15
15
  // ASSERT
@@ -27,7 +27,7 @@ import { flagDE } from "@sit-onyx/flags";
27
27
  :flag="flagDE"
28
28
  />
29
29
  <OnyxOtherComponent />
30
- <OnyxComp>Test</OnyxComp>
30
+ <OnyxComp :icon="iconPlaceholder">Test</OnyxComp>
31
31
  </template>`);
32
32
  });
33
33
 
package/src/preview.ts CHANGED
@@ -169,8 +169,9 @@ export const sourceCodeTransformer = async (originalSourceCode: string): Promise
169
169
  if (code.includes(content)) {
170
170
  imports.add(name);
171
171
 
172
- code = code.replace(
173
- new RegExp(` (\\S+)=['"]${escapeRegExp(content)}['"]`),
172
+ code = replaceAll(
173
+ code,
174
+ new RegExp(` (\\S+)=['"]${escapeRegExp(content)}['"]`, "g"),
174
175
  ` :$1="${name}"`,
175
176
  );
176
177
  } else if (code.includes(singleQuotedContent)) {