storybook-addon-sdc 0.7.11 → 0.8.2

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/preset.js +8 -2
  2. package/package.json +1 -1
package/dist/preset.js CHANGED
@@ -88,8 +88,8 @@ var formatArgValue = (value, isSlot) => {
88
88
  if (Array.isArray(value)) {
89
89
  const arrayContent = value.map(
90
90
  (item) => item?.type === "component" ? generateComponent(item) : JSON.stringify(item)
91
- ).join(isSlot ? " + " : ", ");
92
- return `[${arrayContent}]`;
91
+ );
92
+ return `new TwigSafeArray(${arrayContent.join(", ")})`;
93
93
  }
94
94
  return JSON.stringify(value);
95
95
  };
@@ -285,6 +285,12 @@ var vite_plugin_storybook_yaml_stories_default = ({
285
285
  ${imports}
286
286
  ${storiesImports}
287
287
 
288
+ class TwigSafeArray extends Array {
289
+ toString() {
290
+ return this.join('');
291
+ }
292
+ }
293
+
288
294
  export default {
289
295
  component: COMPONENT,
290
296
  argTypes: ${JSON.stringify(argTypes, null, 2)},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-addon-sdc",
3
- "version": "0.7.11",
3
+ "version": "0.8.2",
4
4
  "description": "Drupal Single Directory Components as stories",
5
5
  "keywords": [
6
6
  "SDC",