@khanacademy/wonder-blocks-core 12.1.0 → 12.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,11 @@
1
1
  # @khanacademy/wonder-blocks-core
2
2
 
3
+ ## 12.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ee8d95a: Rollback rollup version from v4 to v2 to prevent an issue with CJS builds in unit tests
8
+
3
9
  ## 12.1.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.js CHANGED
@@ -1,11 +1,16 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var _extends = require('@babel/runtime/helpers/extends');
4
6
  var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose');
5
7
  var React = require('react');
6
8
  var aphrodite = require('aphrodite');
7
9
 
8
- function _interopNamespaceDefault(e) {
10
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
+
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
9
14
  var n = Object.create(null);
10
15
  if (e) {
11
16
  Object.keys(e).forEach(function (k) {
@@ -18,11 +23,13 @@ function _interopNamespaceDefault(e) {
18
23
  }
19
24
  });
20
25
  }
21
- n.default = e;
26
+ n["default"] = e;
22
27
  return Object.freeze(n);
23
28
  }
24
29
 
25
- var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
30
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
31
+ var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose);
32
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
26
33
 
27
34
  function flatten(list) {
28
35
  const result = [];
@@ -95,11 +102,11 @@ const Text = React__namespace.forwardRef(function Text(_ref, ref) {
95
102
  tag: Tag = "span",
96
103
  testId
97
104
  } = _ref,
98
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
105
+ otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$2);
99
106
  const isHeader = isHeaderRegex.test(Tag);
100
107
  const styleAttributes = processStyleList([styles$1.text, isHeader && styles$1.header, style]);
101
108
  const classNames = otherProps.className ? [otherProps.className, styleAttributes.className].join(" ") : styleAttributes.className;
102
- return (React__namespace.createElement(Tag, _extends({}, otherProps, {
109
+ return (React__namespace.createElement(Tag, _extends__default["default"]({}, otherProps, {
103
110
  style: styleAttributes.style,
104
111
  className: classNames,
105
112
  "data-testid": testId,
@@ -116,13 +123,13 @@ function addStyle(Component, defaultStyle) {
116
123
  className,
117
124
  style
118
125
  } = _ref,
119
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$1);
126
+ otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$1);
120
127
  const reset = typeof Component === "string" ? overrides[Component] : null;
121
128
  const {
122
129
  className: aphroditeClassName,
123
130
  style: inlineStyles
124
131
  } = processStyleList([reset, defaultStyle, style]);
125
- return React__namespace.createElement(Component, _extends({}, otherProps, {
132
+ return React__namespace.createElement(Component, _extends__default["default"]({}, otherProps, {
126
133
  ref: ref,
127
134
  className: [aphroditeClassName, className].filter(Boolean).join(" "),
128
135
  style: inlineStyles
@@ -165,29 +172,29 @@ const View = React__namespace.forwardRef(function View(props, ref) {
165
172
  testId,
166
173
  tag = "div"
167
174
  } = props,
168
- restProps = _objectWithoutPropertiesLoose(props, _excluded);
169
- const commonProps = _extends({}, restProps, {
175
+ restProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded);
176
+ const commonProps = _extends__default["default"]({}, restProps, {
170
177
  "data-testid": testId
171
178
  });
172
179
  switch (tag) {
173
180
  case "article":
174
- return React__namespace.createElement(StyledArticle, _extends({}, commonProps, {
181
+ return React__namespace.createElement(StyledArticle, _extends__default["default"]({}, commonProps, {
175
182
  ref: ref
176
183
  }));
177
184
  case "aside":
178
- return React__namespace.createElement(StyledAside, _extends({}, commonProps, {
185
+ return React__namespace.createElement(StyledAside, _extends__default["default"]({}, commonProps, {
179
186
  ref: ref
180
187
  }));
181
188
  case "nav":
182
- return React__namespace.createElement(StyledNav, _extends({}, commonProps, {
189
+ return React__namespace.createElement(StyledNav, _extends__default["default"]({}, commonProps, {
183
190
  ref: ref
184
191
  }));
185
192
  case "section":
186
- return React__namespace.createElement(StyledSection, _extends({}, commonProps, {
193
+ return React__namespace.createElement(StyledSection, _extends__default["default"]({}, commonProps, {
187
194
  ref: ref
188
195
  }));
189
196
  case "div":
190
- return React__namespace.createElement(StyledDiv, _extends({}, commonProps, {
197
+ return React__namespace.createElement(StyledDiv, _extends__default["default"]({}, commonProps, {
191
198
  ref: ref
192
199
  }));
193
200
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-core",
3
- "version": "12.1.0",
3
+ "version": "12.1.1",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -20,8 +20,8 @@
20
20
  "react-router-dom": "5.3.4"
21
21
  },
22
22
  "devDependencies": {
23
- "@khanacademy/wb-dev-build-settings": "2.1.0",
24
- "@khanacademy/wonder-blocks-testing-core": "2.1.0"
23
+ "@khanacademy/wb-dev-build-settings": "2.1.1",
24
+ "@khanacademy/wonder-blocks-testing-core": "2.1.1"
25
25
  },
26
26
  "author": "",
27
27
  "license": "MIT",