@storybook/core-server 7.0.0-alpha.47 → 7.0.0-alpha.48

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.
@@ -230,9 +230,12 @@ class StoryIndexGenerator {
230
230
  });
231
231
 
232
232
  if (this.options.docs.enabled && csf.stories.length) {
233
- // We always add a template for *.stories.mdx, but only if docs page is enabled for
234
- // regular CSF files
235
- if (storyIndexer.addDocsTemplate || this.options.docs.docsPage && componentTags.includes('docsPage')) {
233
+ var docsPage = this.options.docs.docsPage;
234
+ var docsPageOptedIn = docsPage === 'automatic' || docsPage && componentTags.includes('docsPage'); // We need a docs entry attached to the CSF file if either:
235
+ // a) it is a stories.mdx transpiled to CSF, OR
236
+ // b) we have docs page enabled for this file
237
+
238
+ if (componentTags.includes('mdx') || docsPageOptedIn) {
236
239
  var name = this.options.docs.defaultName;
237
240
  var id = (0, _csf.toId)(csf.meta.title, name);
238
241
  entries.unshift({
@@ -211,9 +211,12 @@ export class StoryIndexGenerator {
211
211
  });
212
212
 
213
213
  if (this.options.docs.enabled && csf.stories.length) {
214
- // We always add a template for *.stories.mdx, but only if docs page is enabled for
215
- // regular CSF files
216
- if (storyIndexer.addDocsTemplate || this.options.docs.docsPage && componentTags.includes('docsPage')) {
214
+ var docsPage = this.options.docs.docsPage;
215
+ var docsPageOptedIn = docsPage === 'automatic' || docsPage && componentTags.includes('docsPage'); // We need a docs entry attached to the CSF file if either:
216
+ // a) it is a stories.mdx transpiled to CSF, OR
217
+ // b) we have docs page enabled for this file
218
+
219
+ if (componentTags.includes('mdx') || docsPageOptedIn) {
217
220
  var name = this.options.docs.defaultName;
218
221
  var id = toId(csf.meta.title, name);
219
222
  entries.unshift({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/core-server",
3
- "version": "7.0.0-alpha.47",
3
+ "version": "7.0.0-alpha.48",
4
4
  "description": "Storybook framework-agnostic API",
5
5
  "keywords": [
6
6
  "storybook"
@@ -35,17 +35,17 @@
35
35
  "dependencies": {
36
36
  "@aw-web-design/x-default-browser": "1.4.88",
37
37
  "@discoveryjs/json-ext": "^0.5.3",
38
- "@storybook/builder-manager": "7.0.0-alpha.47",
39
- "@storybook/core-client": "7.0.0-alpha.47",
40
- "@storybook/core-common": "7.0.0-alpha.47",
41
- "@storybook/core-events": "7.0.0-alpha.47",
38
+ "@storybook/builder-manager": "7.0.0-alpha.48",
39
+ "@storybook/core-client": "7.0.0-alpha.48",
40
+ "@storybook/core-common": "7.0.0-alpha.48",
41
+ "@storybook/core-events": "7.0.0-alpha.48",
42
42
  "@storybook/csf": "next",
43
- "@storybook/csf-tools": "7.0.0-alpha.47",
43
+ "@storybook/csf-tools": "7.0.0-alpha.48",
44
44
  "@storybook/docs-mdx": "0.0.1-canary.12433cf.0",
45
- "@storybook/node-logger": "7.0.0-alpha.47",
46
- "@storybook/store": "7.0.0-alpha.47",
47
- "@storybook/telemetry": "7.0.0-alpha.47",
48
- "@storybook/types": "7.0.0-alpha.47",
45
+ "@storybook/node-logger": "7.0.0-alpha.48",
46
+ "@storybook/store": "7.0.0-alpha.48",
47
+ "@storybook/telemetry": "7.0.0-alpha.48",
48
+ "@storybook/types": "7.0.0-alpha.48",
49
49
  "@types/node": "^16.0.0",
50
50
  "@types/node-fetch": "^2.5.7",
51
51
  "@types/pretty-hrtime": "^1.0.0",
@@ -77,7 +77,7 @@
77
77
  "ws": "^8.2.3"
78
78
  },
79
79
  "devDependencies": {
80
- "@storybook/builder-webpack5": "7.0.0-alpha.47",
80
+ "@storybook/builder-webpack5": "7.0.0-alpha.48",
81
81
  "@types/compression": "^1.7.0",
82
82
  "@types/ip": "^1.1.0",
83
83
  "@types/serve-favicon": "^2.5.2",
@@ -103,5 +103,5 @@
103
103
  "publishConfig": {
104
104
  "access": "public"
105
105
  },
106
- "gitHead": "1c706a4a778831e012343c905f86225fa71491a7"
106
+ "gitHead": "b58a29b785462f8a8b711b6bb2d7223fd6dc17fd"
107
107
  }