@atlaskit/storybook-addon-design-system 1.0.0 → 1.1.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/storybook-addon-design-system
2
2
 
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#121959](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/121959)
8
+ [`44763b631bec5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/44763b631bec5) -
9
+ Renamed `typography-minor3` theme to `typography-modernized`. There are no visual changes, purely
10
+ just a rename.
11
+
12
+ ## 1.1.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#121858](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/121858)
17
+ [`a1c4a37a57a0c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a1c4a37a57a0c) -
18
+ Fixed the build issue in the previous version.
19
+
3
20
  ## 1.0.0
4
21
 
5
22
  ### Major Changes
@@ -54,7 +54,7 @@ var withDesignTokens = function withDesignTokens(StoryFn, context) {
54
54
  colorMode: theme,
55
55
  spacing: 'spacing',
56
56
  shape: 'shape',
57
- typography: 'typography-minor3'
57
+ typography: 'typography-modernized'
58
58
  });
59
59
  case 5:
60
60
  return _context.abrupt("break", 15);
@@ -64,7 +64,7 @@ var withDesignTokens = function withDesignTokens(StoryFn, context) {
64
64
  colorMode: 'light',
65
65
  spacing: 'spacing',
66
66
  shape: 'shape',
67
- typography: 'typography-minor3'
67
+ typography: 'typography-modernized'
68
68
  });
69
69
  case 8:
70
70
  document.documentElement.querySelectorAll('style[data-theme]').forEach(function (el) {
@@ -35,7 +35,7 @@ const withDesignTokens = (StoryFn, context) => {
35
35
  colorMode: theme,
36
36
  spacing: 'spacing',
37
37
  shape: 'shape',
38
- typography: 'typography-minor3'
38
+ typography: 'typography-modernized'
39
39
  });
40
40
  break;
41
41
  case 'split':
@@ -44,7 +44,7 @@ const withDesignTokens = (StoryFn, context) => {
44
44
  colorMode: 'light',
45
45
  spacing: 'spacing',
46
46
  shape: 'shape',
47
- typography: 'typography-minor3'
47
+ typography: 'typography-modernized'
48
48
  });
49
49
  document.documentElement.querySelectorAll('style[data-theme]').forEach(el => {
50
50
  const clone = el.cloneNode(true);
@@ -44,7 +44,7 @@ var withDesignTokens = function withDesignTokens(StoryFn, context) {
44
44
  colorMode: theme,
45
45
  spacing: 'spacing',
46
46
  shape: 'shape',
47
- typography: 'typography-minor3'
47
+ typography: 'typography-modernized'
48
48
  });
49
49
  case 5:
50
50
  return _context.abrupt("break", 15);
@@ -54,7 +54,7 @@ var withDesignTokens = function withDesignTokens(StoryFn, context) {
54
54
  colorMode: 'light',
55
55
  spacing: 'spacing',
56
56
  shape: 'shape',
57
- typography: 'typography-minor3'
57
+ typography: 'typography-modernized'
58
58
  });
59
59
  case 8:
60
60
  document.documentElement.querySelectorAll('style[data-theme]').forEach(function (el) {
package/manager.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable */
2
- import './dist/manager';
2
+ import './dist/esm/manager';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/storybook-addon-design-system",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "Design token storybook addon",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -15,9 +15,6 @@
15
15
  "category": "Tooling"
16
16
  }
17
17
  },
18
- "scripts": {
19
- "build": "tsup"
20
- },
21
18
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
22
19
  "type": "module",
23
20
  "main": "src/index.tsx",
@@ -41,8 +38,7 @@
41
38
  "@storybook/icons": "^1.2.9",
42
39
  "@storybook/manager-api": "^8.1.10",
43
40
  "@storybook/preview-api": "^8.1.10",
44
- "@storybook/types": "8.0.0",
45
- "tsup": "^8.0.2"
41
+ "@storybook/types": "8.0.0"
46
42
  },
47
43
  "peerDependencies": {
48
44
  "react": "^16.8.0 || ^17.0.0 || ~18.2.0"
package/preset.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable */
2
- module.exports = require('./dist/preset.cjs');
2
+ module.exports = require('./dist/esm/preset.js');
package/preview.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* eslint-disable */
2
- export { default } from './dist/preview';
2
+ export { default } from './dist/esm/preview';
package/src/decorator.tsx CHANGED
@@ -43,7 +43,7 @@ const withDesignTokens = (StoryFn: StoryFunction<Renderer>, context: StoryContex
43
43
  colorMode: theme,
44
44
  spacing: 'spacing',
45
45
  shape: 'shape',
46
- typography: 'typography-minor3',
46
+ typography: 'typography-modernized',
47
47
  });
48
48
  break;
49
49
  case 'split':
@@ -52,7 +52,7 @@ const withDesignTokens = (StoryFn: StoryFunction<Renderer>, context: StoryContex
52
52
  colorMode: 'light',
53
53
  spacing: 'spacing',
54
54
  shape: 'shape',
55
- typography: 'typography-minor3',
55
+ typography: 'typography-modernized',
56
56
  });
57
57
 
58
58
  document.documentElement.querySelectorAll('style[data-theme]').forEach((el) => {
package/tsup.config.ts DELETED
@@ -1,110 +0,0 @@
1
- /* eslint-disable @repo/internal/fs/filename-pattern-match */
2
- import { readFile } from 'fs/promises';
3
-
4
- import { defineConfig, type Options } from 'tsup';
5
-
6
- // The current browsers supported by Storybook v7
7
- const BROWSER_TARGET: Options['target'] = ['chrome100', 'safari15', 'firefox91'];
8
- const NODE_TARGET: Options['target'] = ['node18'];
9
-
10
- type BundlerConfig = {
11
- bundler?: {
12
- exportEntries?: string[];
13
- nodeEntries?: string[];
14
- managerEntries?: string[];
15
- previewEntries?: string[];
16
- };
17
- };
18
-
19
- // eslint-disable-next-line import/no-anonymous-default-export
20
- export default defineConfig(async (options) => {
21
- // reading the three types of entries from package.json, which has the following structure:
22
- // {
23
- // ...
24
- // "bundler": {
25
- // "exportEntries": ["./src/index.ts"],
26
- // "managerEntries": ["./src/manager.ts"],
27
- // "previewEntries": ["./src/preview.ts"]
28
- // "nodeEntries": ["./src/preset.ts"]
29
- // }
30
- // }
31
- const packageJson = (await readFile('./package.json', 'utf8').then(JSON.parse)) as BundlerConfig;
32
- const {
33
- bundler: {
34
- exportEntries = [],
35
- managerEntries = [],
36
- previewEntries = [],
37
- nodeEntries = [],
38
- } = {},
39
- } = packageJson;
40
-
41
- const commonConfig: Options = {
42
- splitting: false,
43
- minify: !options.watch,
44
- treeshake: true,
45
- sourcemap: true,
46
- clean: true,
47
- };
48
-
49
- const configs: Options[] = [];
50
-
51
- // export entries are entries meant to be manually imported by the user
52
- // they are not meant to be loaded by the manager or preview
53
- // they'll be usable in both node and browser environments, depending on which features and modules they depend on
54
- if (exportEntries.length) {
55
- configs.push({
56
- ...commonConfig,
57
- entry: exportEntries,
58
- dts: {
59
- resolve: true,
60
- },
61
- format: ['esm', 'cjs'],
62
- target: [...BROWSER_TARGET, ...NODE_TARGET],
63
- platform: 'neutral',
64
- });
65
- }
66
-
67
- // manager entries are entries meant to be loaded into the manager UI
68
- // they'll have manager-specific packages externalized and they won't be usable in node
69
- // they won't have types generated for them as they're usually loaded automatically by Storybook
70
- if (managerEntries.length) {
71
- configs.push({
72
- ...commonConfig,
73
- entry: managerEntries,
74
- format: ['esm'],
75
- target: BROWSER_TARGET,
76
- platform: 'browser',
77
- });
78
- }
79
-
80
- // preview entries are entries meant to be loaded into the preview iframe
81
- // they'll have preview-specific packages externalized and they won't be usable in node
82
- // they'll have types generated for them so they can be imported when setting up Portable Stories
83
- if (previewEntries.length) {
84
- configs.push({
85
- ...commonConfig,
86
- entry: previewEntries,
87
- dts: {
88
- resolve: true,
89
- },
90
- format: ['esm', 'cjs'],
91
- target: BROWSER_TARGET,
92
- platform: 'browser',
93
- });
94
- }
95
-
96
- // node entries are entries meant to be used in node-only
97
- // this is useful for presets, which are loaded by Storybook when setting up configurations
98
- // they won't have types generated for them as they're usually loaded automatically by Storybook
99
- if (nodeEntries.length) {
100
- configs.push({
101
- ...commonConfig,
102
- entry: nodeEntries,
103
- format: ['cjs'],
104
- target: NODE_TARGET,
105
- platform: 'node',
106
- });
107
- }
108
-
109
- return configs;
110
- });