@storybook/ember 7.4.0-alpha.0 → 7.4.0-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/ember",
3
- "version": "7.4.0-alpha.0",
3
+ "version": "7.4.0-alpha.1",
4
4
  "description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
5
5
  "homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember",
6
6
  "bugs": {
@@ -21,22 +21,23 @@
21
21
  "types": "dist/index.d.ts",
22
22
  "files": [
23
23
  "dist/**/*",
24
- "template/**/*",
24
+ "template/cli/**/*",
25
25
  "README.md",
26
26
  "*.js",
27
- "*.d.ts"
27
+ "*.d.ts",
28
+ "!src/**/*"
28
29
  ],
29
30
  "scripts": {
30
31
  "check": "../../../scripts/prepare/check.ts",
31
32
  "prep": "../../../scripts/prepare/tsc.ts"
32
33
  },
33
34
  "dependencies": {
34
- "@storybook/builder-webpack5": "7.4.0-alpha.0",
35
- "@storybook/core-common": "7.4.0-alpha.0",
36
- "@storybook/docs-tools": "7.4.0-alpha.0",
35
+ "@storybook/builder-webpack5": "7.4.0-alpha.1",
36
+ "@storybook/core-common": "7.4.0-alpha.1",
37
+ "@storybook/docs-tools": "7.4.0-alpha.1",
37
38
  "@storybook/global": "^5.0.0",
38
- "@storybook/preview-api": "7.4.0-alpha.0",
39
- "@storybook/types": "7.4.0-alpha.0",
39
+ "@storybook/preview-api": "7.4.0-alpha.1",
40
+ "@storybook/types": "7.4.0-alpha.1",
40
41
  "ts-dedent": "^2.0.0"
41
42
  },
42
43
  "devDependencies": {
@@ -1,12 +0,0 @@
1
- import { enhanceArgTypes } from '@storybook/docs-tools';
2
- import { extractArgTypes, extractComponentDescription } from './jsondoc';
3
-
4
- export const parameters = {
5
- docs: {
6
- story: { iframeHeight: '80px' },
7
- extractArgTypes,
8
- extractComponentDescription,
9
- },
10
- };
11
-
12
- export const argTypesEnhancers = [enhanceArgTypes];
@@ -1 +0,0 @@
1
- export { setJSONDoc } from './jsondoc';
@@ -1,50 +0,0 @@
1
- /* eslint-disable no-underscore-dangle */
2
- import { global } from '@storybook/global';
3
-
4
- export const setJSONDoc = (jsondoc) => {
5
- global.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
6
- };
7
- export const getJSONDoc = () => {
8
- return global.__EMBER_GENERATED_DOC_JSON__;
9
- };
10
-
11
- export const extractArgTypes = (componentName) => {
12
- const json = getJSONDoc();
13
- if (!(json && json.included)) {
14
- return null;
15
- }
16
- const componentDoc = json.included.find((doc) => doc.attributes.name === componentName);
17
-
18
- if (!componentDoc) {
19
- return null;
20
- }
21
- return componentDoc.attributes.arguments.reduce((acc, prop) => {
22
- acc[prop.name] = {
23
- name: prop.name,
24
- defaultValue: prop.defaultValue,
25
- description: prop.description,
26
- table: {
27
- defaultValue: { summary: prop.defaultValue },
28
- type: {
29
- summary: prop.type,
30
- required: prop.tags.length ? prop.tags.some((tag) => tag.name === 'required') : false,
31
- },
32
- },
33
- };
34
- return acc;
35
- }, {});
36
- };
37
-
38
- export const extractComponentDescription = (componentName) => {
39
- const json = getJSONDoc();
40
- if (!(json && json.included)) {
41
- return null;
42
- }
43
- const componentDoc = json.included.find((doc) => doc.attributes.name === componentName);
44
-
45
- if (!componentDoc) {
46
- return null;
47
- }
48
-
49
- return componentDoc.attributes.description;
50
- };
@@ -1,9 +0,0 @@
1
- import { extractArgTypes, extractComponentDescription } from './jsondoc';
2
-
3
- export const parameters = {
4
- docs: {
5
- story: { iframeHeight: '80px' },
6
- extractArgTypes,
7
- extractComponentDescription,
8
- },
9
- };
@@ -1 +0,0 @@
1
- export { setJSONDoc } from './jsondoc';
@@ -1,50 +0,0 @@
1
- /* eslint-disable no-underscore-dangle */
2
- import { global } from '@storybook/global';
3
-
4
- export const setJSONDoc = (jsondoc) => {
5
- global.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
6
- };
7
- export const getJSONDoc = () => {
8
- return global.__EMBER_GENERATED_DOC_JSON__;
9
- };
10
-
11
- export const extractArgTypes = (componentName) => {
12
- const json = getJSONDoc();
13
- if (!(json && json.included)) {
14
- return null;
15
- }
16
- const componentDoc = json.included.find((doc) => doc.attributes.name === componentName);
17
-
18
- if (!componentDoc) {
19
- return null;
20
- }
21
- return componentDoc.attributes.arguments.reduce((acc, prop) => {
22
- acc[prop.name] = {
23
- name: prop.name,
24
- defaultValue: prop.defaultValue,
25
- description: prop.description,
26
- table: {
27
- defaultValue: { summary: prop.defaultValue },
28
- type: {
29
- summary: prop.type,
30
- required: prop.tags.length ? prop.tags.some((tag) => tag.name === 'required') : false,
31
- },
32
- },
33
- };
34
- return acc;
35
- }, {});
36
- };
37
-
38
- export const extractComponentDescription = (componentName) => {
39
- const json = getJSONDoc();
40
- if (!(json && json.included)) {
41
- return null;
42
- }
43
- const componentDoc = json.included.find((doc) => doc.attributes.name === componentName);
44
-
45
- if (!componentDoc) {
46
- return null;
47
- }
48
-
49
- return componentDoc.attributes.description;
50
- };
package/src/typings.d.ts DELETED
@@ -1,4 +0,0 @@
1
- declare module 'ember-source/dist/ember-template-compiler';
2
-
3
- declare var STORYBOOK_ENV: 'ember';
4
- declare var STORYBOOK_NAME: any;