@atlaskit/tokens 11.4.0 → 11.4.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,15 @@
1
1
  # @atlaskit/tokens
2
2
 
3
+ ## 11.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6bce18279cb35`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6bce18279cb35) -
8
+ Prevents a bundling/runtime failure for `themeStateDefaults` **shape** and **motion** defaults by
9
+ defining them as module-scope functions instead of inline object methods, so `react-magnetic-di`’s
10
+ `fg()` rewrite uses a valid `di(host, fg)` host and no longer references undefined `motion` /
11
+ `shape` identifiers.
12
+
3
13
  ## 11.4.0
4
14
 
5
15
  ### Minor Changes
@@ -178,6 +178,19 @@ var themeConfig = {
178
178
  * it will always resolve to false when server side rendered or when flags are loaded async.
179
179
  */
180
180
 
181
+ function getShapeDefault() {
182
+ if ((0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default')) {
183
+ return 'shape';
184
+ }
185
+ return undefined;
186
+ }
187
+ function getMotionDefault() {
188
+ if ((0, _platformFeatureFlags.fg)('platform-dst-motion-theme-default')) {
189
+ return 'motion';
190
+ }
191
+ return undefined;
192
+ }
193
+
181
194
  /**
182
195
  * themeStateDefaults: the default values for ThemeState used by theming utilities
183
196
  */
@@ -186,20 +199,10 @@ var themeStateDefaults = exports.themeStateDefaults = {
186
199
  contrastMode: 'auto',
187
200
  dark: 'dark',
188
201
  light: 'light',
189
- shape: function shape() {
190
- if ((0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default')) {
191
- return 'shape';
192
- }
193
- return undefined;
194
- },
202
+ shape: getShapeDefault,
195
203
  spacing: 'spacing',
196
204
  typography: 'typography',
197
- motion: function motion() {
198
- if ((0, _platformFeatureFlags.fg)('platform-dst-motion-theme-default')) {
199
- return 'motion';
200
- }
201
- return undefined;
202
- },
205
+ motion: getMotionDefault,
203
206
  UNSAFE_themeOptions: undefined
204
207
  };
205
208
 
@@ -173,6 +173,19 @@ const themeConfig = {
173
173
  * it will always resolve to false when server side rendered or when flags are loaded async.
174
174
  */
175
175
 
176
+ function getShapeDefault() {
177
+ if (fg('platform-dst-shape-theme-default')) {
178
+ return 'shape';
179
+ }
180
+ return undefined;
181
+ }
182
+ function getMotionDefault() {
183
+ if (fg('platform-dst-motion-theme-default')) {
184
+ return 'motion';
185
+ }
186
+ return undefined;
187
+ }
188
+
176
189
  /**
177
190
  * themeStateDefaults: the default values for ThemeState used by theming utilities
178
191
  */
@@ -181,20 +194,10 @@ export const themeStateDefaults = {
181
194
  contrastMode: 'auto',
182
195
  dark: 'dark',
183
196
  light: 'light',
184
- shape: () => {
185
- if (fg('platform-dst-shape-theme-default')) {
186
- return 'shape';
187
- }
188
- return undefined;
189
- },
197
+ shape: getShapeDefault,
190
198
  spacing: 'spacing',
191
199
  typography: 'typography',
192
- motion: () => {
193
- if (fg('platform-dst-motion-theme-default')) {
194
- return 'motion';
195
- }
196
- return undefined;
197
- },
200
+ motion: getMotionDefault,
198
201
  UNSAFE_themeOptions: undefined
199
202
  };
200
203
 
@@ -173,6 +173,19 @@ var themeConfig = {
173
173
  * it will always resolve to false when server side rendered or when flags are loaded async.
174
174
  */
175
175
 
176
+ function getShapeDefault() {
177
+ if (fg('platform-dst-shape-theme-default')) {
178
+ return 'shape';
179
+ }
180
+ return undefined;
181
+ }
182
+ function getMotionDefault() {
183
+ if (fg('platform-dst-motion-theme-default')) {
184
+ return 'motion';
185
+ }
186
+ return undefined;
187
+ }
188
+
176
189
  /**
177
190
  * themeStateDefaults: the default values for ThemeState used by theming utilities
178
191
  */
@@ -181,20 +194,10 @@ export var themeStateDefaults = {
181
194
  contrastMode: 'auto',
182
195
  dark: 'dark',
183
196
  light: 'light',
184
- shape: function shape() {
185
- if (fg('platform-dst-shape-theme-default')) {
186
- return 'shape';
187
- }
188
- return undefined;
189
- },
197
+ shape: getShapeDefault,
190
198
  spacing: 'spacing',
191
199
  typography: 'typography',
192
- motion: function motion() {
193
- if (fg('platform-dst-motion-theme-default')) {
194
- return 'motion';
195
- }
196
- return undefined;
197
- },
200
+ motion: getMotionDefault,
198
201
  UNSAFE_themeOptions: undefined
199
202
  };
200
203
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/tokens",
3
- "version": "11.4.0",
3
+ "version": "11.4.1",
4
4
  "description": "Design tokens are the single source of truth to name and store design decisions.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,7 +43,7 @@
43
43
  "devDependencies": {
44
44
  "@af/formatting": "workspace:^",
45
45
  "@af/visual-regression": "workspace:^",
46
- "@atlaskit/avatar": "^25.10.0",
46
+ "@atlaskit/avatar": "^25.11.0",
47
47
  "@atlaskit/button": "^23.10.0",
48
48
  "@atlaskit/calendar": "^17.2.0",
49
49
  "@atlaskit/checkbox": "^17.3.0",
@@ -59,11 +59,11 @@
59
59
  "@atlaskit/inline-message": "^15.6.0",
60
60
  "@atlaskit/link": "^3.3.0",
61
61
  "@atlaskit/lozenge": "^13.5.0",
62
- "@atlaskit/popup": "^4.14.0",
62
+ "@atlaskit/popup": "^4.15.0",
63
63
  "@atlaskit/primitives": "^18.1.0",
64
64
  "@atlaskit/radio": "^8.4.0",
65
65
  "@atlaskit/section-message": "^8.12.0",
66
- "@atlaskit/select": "^21.8.0",
66
+ "@atlaskit/select": "^21.9.0",
67
67
  "@atlaskit/tag": "^14.6.0",
68
68
  "@atlaskit/textarea": "^8.2.0",
69
69
  "@atlaskit/textfield": "^8.2.0",
@@ -126,9 +126,6 @@
126
126
  "platform-dst-shape-theme-default": {
127
127
  "type": "boolean"
128
128
  },
129
- "platform_dst_subtree_theming": {
130
- "type": "boolean"
131
- },
132
129
  "platform-dst-motion-theme-default": {
133
130
  "type": "boolean"
134
131
  }