@storybook/addon-svelte-csf 5.0.3 → 5.0.4

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.
@@ -167,6 +167,10 @@ export async function parseForIndexer(filename, options) {
167
167
  filename,
168
168
  });
169
169
  }
170
+ if (name === 'play') {
171
+ state.meta.tags ??= [];
172
+ state.meta.tags.push('play-fn');
173
+ }
170
174
  },
171
175
  Fragment(node, context) {
172
176
  const { nodes } = node;
@@ -200,6 +204,10 @@ export async function parseForIndexer(filename, options) {
200
204
  filename,
201
205
  });
202
206
  }
207
+ if (name === 'play') {
208
+ state.meta.tags ??= [];
209
+ state.meta.tags.push('play-fn');
210
+ }
203
211
  }
204
212
  }
205
213
  }
@@ -208,7 +216,7 @@ export async function parseForIndexer(filename, options) {
208
216
  (legacyTemplate && name === state.legacyStoryImport?.local.name)) {
209
217
  const storyAttributes = extractStoryAttributesNodes({
210
218
  component: node,
211
- attributes: ['exportName', 'name', 'tags', 'template', 'asChild', 'children'],
219
+ attributes: ['exportName', 'name', 'tags', 'template', 'asChild', 'children', 'play'],
212
220
  });
213
221
  const templateSnippet = extractStoryTemplateSnippetBlock(node);
214
222
  const hasChildren = storyAttributes.children || node.fragment.nodes.length > 0;
@@ -236,6 +244,9 @@ export async function parseForIndexer(filename, options) {
236
244
  node: storyAttributes.tags,
237
245
  filename,
238
246
  });
247
+ if (storyAttributes.play !== undefined) {
248
+ tags.push('play-fn');
249
+ }
239
250
  state.stories.push({
240
251
  exportName,
241
252
  name: storyName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-svelte-csf",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "description": "Allows to write stories in Svelte syntax",
5
5
  "keywords": [
6
6
  "storybook-addons",