@toptal/davinci-storybook-addons 1.1.9-alpha-fix-wrong-data-structure-in-analytics-e998b099.14 → 1.1.9

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 (3) hide show
  1. package/CHANGELOG.md +189 -0
  2. package/bin/build.js +71 -0
  3. package/package.json +23 -24
package/CHANGELOG.md ADDED
@@ -0,0 +1,189 @@
1
+ # @toptal/davinci-storybook-addons
2
+
3
+ ## 1.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1846](https://github.com/toptal/davinci/pull/1846) [`2d05e4d7`](https://github.com/toptal/davinci/commit/2d05e4d7a4ca2a6c0cdec406d587edae3d4ec389) Thanks [@dependabot](https://github.com/apps/dependabot)! - ---
8
+
9
+ - chore: bump @storybook/addon-outline from 6.5.13 to 6.5.15
10
+
11
+ ## 1.1.8
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [[`15a5195d`](https://github.com/toptal/davinci/commit/15a5195dd0c7c306573a4af637f82b7155b1959c)]:
16
+ - @toptal/davinci-storybook-full-text-search-addon@1.0.0
17
+
18
+ ## 1.1.7
19
+
20
+ ### Patch Changes
21
+
22
+ - [#1810](https://github.com/toptal/davinci/pull/1810) [`d050f335`](https://github.com/toptal/davinci/commit/d050f33551272cc5ba6878c92cf66b79ade27b42) Thanks [@ozgurkececioglu](https://github.com/ozgurkececioglu)! - ---
23
+
24
+ - enable options passing for essential storybook addons inside `./storybook/main.js`
25
+
26
+ ```js
27
+ ...
28
+ addons: [
29
+ {
30
+ name: '@toptal/davinci-storybook-addons',
31
+ options: {
32
+ '@storybook/addon-docs': {
33
+ transcludeMarkdown: true,
34
+ },
35
+ },
36
+ },
37
+ ],
38
+ ...
39
+ ```
40
+
41
+ ## 1.1.6
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [[`ea052db8`](https://github.com/toptal/davinci/commit/ea052db8913937e898cfdbd7a400e668563e169b)]:
46
+ - @toptal/davinci-storybook-full-text-search-addon@0.2.4
47
+
48
+ ## 1.1.5
49
+
50
+ ### Patch Changes
51
+
52
+ - [#1765](https://github.com/toptal/davinci/pull/1765) [`b88f67c8`](https://github.com/toptal/davinci/commit/b88f67c86c5b40afbfdc37ee846469653ce3b1de) Thanks [@dmaklygin](https://github.com/dmaklygin)! - ---
53
+
54
+ - fix live editor to be able work with Storybook decorators
55
+ - add support for typescript source code
56
+
57
+ - Updated dependencies [[`b88f67c8`](https://github.com/toptal/davinci/commit/b88f67c86c5b40afbfdc37ee846469653ce3b1de)]:
58
+ - @toptal/davinci-storybook-live-edit-addon@0.2.3
59
+
60
+ ## 1.1.4
61
+
62
+ ### Patch Changes
63
+
64
+ - Updated dependencies [[`0ff9ee8e`](https://github.com/toptal/davinci/commit/0ff9ee8e5beb1c95f43c49d0fead7f5d1d22ff88)]:
65
+ - @toptal/davinci-storybook-full-text-search-addon@0.2.3
66
+
67
+ ## 1.1.3
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies [[`7f3a0d07`](https://github.com/toptal/davinci/commit/7f3a0d07ee303f7926134d7d4bb1a52e678ae5a3)]:
72
+ - @toptal/davinci-storybook-full-text-search-addon@0.2.2
73
+
74
+ ## 1.1.2
75
+
76
+ ### Patch Changes
77
+
78
+ - [#1678](https://github.com/toptal/davinci/pull/1678) [`bf41fe67`](https://github.com/toptal/davinci/commit/bf41fe6751012e3a9f79787d4e312703d9fa2cc8) Thanks [@OndrejTuma](https://github.com/OndrejTuma)! - ---
79
+
80
+ - resolve correctly paths to custom addons `@toptal/davinci-storybook-full-text-search-addon` and `storybook-live-edit-addon`
81
+
82
+ - Updated dependencies [[`bf41fe67`](https://github.com/toptal/davinci/commit/bf41fe6751012e3a9f79787d4e312703d9fa2cc8)]:
83
+ - @toptal/davinci-storybook-full-text-search-addon@0.2.1
84
+
85
+ ## 1.1.1
86
+
87
+ ### Patch Changes
88
+
89
+ - [#1674](https://github.com/toptal/davinci/pull/1674) [`147eb6ab`](https://github.com/toptal/davinci/commit/147eb6abe3832fb176c1c8833ad88833bce4713c) Thanks [@augustobmoura](https://github.com/augustobmoura)! - ---
90
+
91
+ - add davinci-storybook-full-text-search-addon dependency to davinci-storybook-addons
92
+
93
+ ## 1.1.0
94
+
95
+ ### Minor Changes
96
+
97
+ - [#1670](https://github.com/toptal/davinci/pull/1670) [`08353aa6`](https://github.com/toptal/davinci/commit/08353aa6f2b5924a013c5188c7bb26dfff25139c) Thanks [@ozgurkececioglu](https://github.com/ozgurkececioglu)! - ---
98
+
99
+ - implement [davinci-storybook-full-text-search](https://github.com/toptal/davinci/blob/09f831eb34231f7eaa60b2f5cb77d33709d96563/packages/storybook-full-text-search-addon/README.md) addon and add it to `@toptal/davinci-storybook-addons`
100
+
101
+ ## 1.0.0
102
+
103
+ ### Major Changes
104
+
105
+ - [#1640](https://github.com/toptal/davinci/pull/1640) [`b350207b`](https://github.com/toptal/davinci/commit/b350207b64d50695d006a1dc6860d6e848b139ed) Thanks [@dmaklygin](https://github.com/dmaklygin)! - ---
106
+
107
+ - implement [davinci-storybook-live-edit](https://github.com/toptal/davinci/blob/6f3bc1cac1dfc6ab9e9c2003cd657ef86c821da0/packages/storybook-live-edit-addon/README.md) addon and add it to `@toptal/davinci-storybook-addons`
108
+
109
+ **! This major update brings a breaking changes !**
110
+
111
+ **NOTE:**
112
+ To start properly using `davinci-storybook-live-edit` addon:
113
+
114
+ _You must specify a **scope** for each story, beforehand. It means, all variables that are used inside story must be specified inside the scope_
115
+
116
+ ```tsx
117
+
118
+ // extra variables that are used inside stories
119
+ const extraVariable = 1;
120
+ const MyCustomComponent = () => null
121
+
122
+ export default {
123
+ title: 'Example/Button',
124
+ component: Button,
125
+ parameters: {
126
+ scope: {
127
+ // all variables that are used inside stories must be defined inside the scope
128
+ Button,
129
+ extraVariable,
130
+ MyCustomComponent
131
+ },
132
+ },
133
+ } as ComponentMeta<typeof Button>;
134
+
135
+ export const Primary = (args) => {
136
+ return (
137
+ <MyCustomComponent> // <-- MyCustomComponent must be defined
138
+ <Button {...args}> // <-- Button must be defined
139
+ {extraVariable} // <-- extraVariable must be defined
140
+ </Button>
141
+ </MyCustomComponent>
142
+ )
143
+ };
144
+
145
+ Primary.args = {
146
+ primary: true,
147
+ label: 'Button',
148
+ };
149
+ ```
150
+
151
+ ***
152
+
153
+ ***
154
+
155
+ - the `@toptal/davinci-skeleton` now is containing information about `@toptal/davinci-skeleton-theme`
156
+
157
+ ***
158
+
159
+ ***
160
+
161
+ - the `@toptal/davinci-storybook` initialization command now adds `@toptal/davinci-storybook-live-edit-addon` as a dependency
162
+
163
+ ***
164
+
165
+ ***
166
+
167
+ - the `@toptal/davinci-storybook-addons` contains `@toptal/davinci-storybook-live-edit-addon` as an addon
168
+
169
+ ### Patch Changes
170
+
171
+ - Updated dependencies [[`b350207b`](https://github.com/toptal/davinci/commit/b350207b64d50695d006a1dc6860d6e848b139ed)]:
172
+ - @toptal/davinci-storybook-live-edit-addon@0.2.0
173
+
174
+ ## 0.3.0
175
+
176
+ ### Minor Changes
177
+
178
+ - [#1566](https://github.com/toptal/davinci/pull/1566) [`4d1e6537`](https://github.com/toptal/davinci/commit/4d1e6537ea258371c86badb7a178e2bc786bf7b6) Thanks [@dmaklygin](https://github.com/dmaklygin)! - ---
179
+
180
+ - add `highlight story` storybook addon
181
+
182
+ ## 0.2.0
183
+
184
+ ### Minor Changes
185
+
186
+ - [#1381](https://github.com/toptal/davinci/pull/1381) [`c7f8b472`](https://github.com/toptal/davinci/commit/c7f8b472918bf28ff855f60585b0d6a8bafce2f4) Thanks [@OndrejTuma](https://github.com/OndrejTuma)! - ---
187
+
188
+ - add essential plugins from storybook
189
+ - up-to-date list of addons in README.md
package/bin/build.js ADDED
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env node
2
+ const fs = require('fs')
3
+ const remark = require('remark')
4
+ const { files } = require('@toptal/davinci-cli-shared')
5
+ const {
6
+ text,
7
+ list,
8
+ listItem,
9
+ link,
10
+ paragraph,
11
+ inlineCode,
12
+ heading,
13
+ } = require('mdast-builder')
14
+ const headingRange = require('mdast-util-heading-range')
15
+
16
+ const { STORYBOOK_ADDONS, CUSTOM_ADDONS } = require('../src/constants')
17
+
18
+ const storybookAddonLinkSkelet =
19
+ 'https://github.com/storybookjs/storybook/tree/master/addons/'
20
+
21
+ const updateAddonsList = () => tree => {
22
+ const sectionDescription = paragraph([
23
+ text("Here's a list of all addons used in "),
24
+ inlineCode('davinci-storybook-addons'),
25
+ text(' package'),
26
+ ])
27
+ const storybookAddonsList = list(
28
+ 'unordered',
29
+ STORYBOOK_ADDONS.map(addon =>
30
+ listItem(link(storybookAddonLinkSkelet + addon, '', text(addon)))
31
+ )
32
+ )
33
+ const customAddonsList = list(
34
+ 'unordered',
35
+ CUSTOM_ADDONS.map(({ name, url }) =>
36
+ listItem(url ? link(url, '', text(name)) : text(name))
37
+ )
38
+ )
39
+
40
+ headingRange(tree, 'Contents', (start, nodes, end) => [
41
+ start,
42
+ sectionDescription,
43
+ heading(3, text('Official Storybook addons')),
44
+ storybookAddonsList,
45
+ heading(3, text('Custom addons')),
46
+ customAddonsList,
47
+ end,
48
+ ])
49
+ }
50
+
51
+ const updateReadme = async () => {
52
+ const readmePath = files.getPackageFilePath(
53
+ '@toptal/davinci-storybook-addons',
54
+ 'README.md'
55
+ )
56
+ const readmeContent = fs.readFileSync(readmePath, 'utf8')
57
+
58
+ const processedContent = await remark()
59
+ .use(updateAddonsList)
60
+ .process(readmeContent)
61
+
62
+ fs.writeFileSync(readmePath, String(processedContent), {
63
+ encoding: 'utf8',
64
+ })
65
+ }
66
+
67
+ try {
68
+ updateReadme()
69
+ } catch (e) {
70
+ console.error('Update Readme Error: ', e)
71
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-storybook-addons",
3
- "version": "1.1.9-alpha-fix-wrong-data-structure-in-analytics-e998b099.14+e998b099",
3
+ "version": "1.1.9",
4
4
  "description": "Addons for davinci-based storybook for the best developer experience",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -15,7 +15,9 @@
15
15
  "license": "ISC",
16
16
  "main": "src/index.js",
17
17
  "files": [
18
- "src"
18
+ "src",
19
+ "bin",
20
+ "CHANGELOG.md"
19
21
  ],
20
22
  "repository": {
21
23
  "type": "git",
@@ -23,38 +25,35 @@
23
25
  },
24
26
  "scripts": {
25
27
  "build:documentation": "./bin/build.js",
26
- "build:package": "../../bin/build-package.js",
27
- "prepublishOnly": "../../bin/prepublish.js",
28
28
  "test": "echo \"Error: run tests from root\" && exit 1"
29
29
  },
30
30
  "bugs": {
31
31
  "url": "https://github.com/toptal/davinci/issues"
32
32
  },
33
33
  "dependencies": {
34
- "@storybook/addon-a11y": "^6.5.9",
35
- "@storybook/addon-actions": "^6.5.9",
36
- "@storybook/addon-backgrounds": "^6.5.9",
37
- "@storybook/addon-controls": "^6.5.9",
38
- "@storybook/addon-docs": "^6.5.9",
39
- "@storybook/addon-links": "^6.5.9",
40
- "@storybook/addon-measure": "^6.5.9",
41
- "@storybook/addon-outline": "^6.5.9",
34
+ "@storybook/addon-a11y": "^6.5.15",
35
+ "@storybook/addon-actions": "^6.5.15",
36
+ "@storybook/addon-backgrounds": "^6.5.15",
37
+ "@storybook/addon-controls": "^6.5.15",
38
+ "@storybook/addon-docs": "^6.5.15",
39
+ "@storybook/addon-links": "^6.5.15",
40
+ "@storybook/addon-measure": "^6.5.15",
41
+ "@storybook/addon-outline": "^6.5.15",
42
42
  "@storybook/addon-queryparams": "^6.2.9",
43
- "@storybook/addon-storysource": "^6.5.10",
44
- "@storybook/addon-toolbars": "^6.5.9",
45
- "@storybook/addon-viewport": "^6.5.9",
46
- "@storybook/addons": "^6.5.9",
47
- "@storybook/core-events": "^6.5.9",
48
- "@storybook/react": "^6.5.10",
49
- "@storybook/theming": "^6.5.10",
50
- "@toptal/davinci-cli-shared": "1.10.2-alpha-fix-wrong-data-structure-in-analytics-e998b099.7+e998b099",
51
- "@toptal/davinci-storybook-full-text-search-addon": "1.0.1-alpha-fix-wrong-data-structure-in-analytics-e998b099.14+e998b099",
52
- "@toptal/davinci-storybook-live-edit-addon": "0.2.4-alpha-fix-wrong-data-structure-in-analytics-e998b099.46+e998b099"
43
+ "@storybook/addon-storysource": "^6.5.15",
44
+ "@storybook/addon-toolbars": "^6.5.15",
45
+ "@storybook/addon-viewport": "^6.5.15",
46
+ "@storybook/addons": "^6.5.15",
47
+ "@storybook/core-events": "^6.5.15",
48
+ "@storybook/react": "^6.5.15",
49
+ "@storybook/theming": "^6.5.15",
50
+ "@toptal/davinci-cli-shared": "^1.5.2",
51
+ "@toptal/davinci-storybook-full-text-search-addon": "1.0.0",
52
+ "@toptal/davinci-storybook-live-edit-addon": "0.2.3"
53
53
  },
54
54
  "devDependencies": {
55
55
  "mdast-builder": "^1.1.1",
56
56
  "mdast-util-heading-range": "^2.1.5",
57
57
  "remark": "^13.0.0"
58
- },
59
- "gitHead": "e998b09949b7b22fd1305544729bb6665fcfe092"
58
+ }
60
59
  }