@storybook/react-native-theming 10.4.5 → 10.4.6

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 (2) hide show
  1. package/dist/index.js +12 -13
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1125,7 +1125,7 @@ var require_css_to_react_native = /* @__PURE__ */ __commonJSMin(((exports) => {
1125
1125
  ];
1126
1126
  var devPropertiesWithUnitsRegExp = propertiesWithoutUnits != null ? new RegExp(propertiesWithoutUnits.join("|")) : null;
1127
1127
  var SYMBOL_MATCH = "SYMBOL_MATCH";
1128
- var TokenStream = /* @__PURE__ */ function() {
1128
+ var TokenStream = /*#__PURE__*/ function() {
1129
1129
  function TokenStream(nodes, parent) {
1130
1130
  this.index = 0;
1131
1131
  this.nodes = nodes;
@@ -1241,7 +1241,6 @@ var require_css_to_react_native = /* @__PURE__ */ __commonJSMin(((exports) => {
1241
1241
  }));
1242
1242
  //#endregion
1243
1243
  //#region ../../node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
1244
- var isDevelopment = false;
1245
1244
  function sheetForTag(tag) {
1246
1245
  if (tag.sheet) return tag.sheet;
1247
1246
  /* istanbul ignore next */
@@ -1255,7 +1254,7 @@ function createStyleElement(options) {
1255
1254
  tag.setAttribute("data-s", "");
1256
1255
  return tag;
1257
1256
  }
1258
- var StyleSheet$1 = /* @__PURE__ */ function() {
1257
+ var StyleSheet$1 = /*#__PURE__*/ function() {
1259
1258
  function StyleSheet(options) {
1260
1259
  var _this = this;
1261
1260
  this._insertTag = function(tag) {
@@ -1267,7 +1266,7 @@ var StyleSheet$1 = /* @__PURE__ */ function() {
1267
1266
  _this.container.insertBefore(tag, before);
1268
1267
  _this.tags.push(tag);
1269
1268
  };
1270
- this.isSpeedy = options.speedy === void 0 ? !isDevelopment : options.speedy;
1269
+ this.isSpeedy = options.speedy === void 0 ? true : options.speedy;
1271
1270
  this.tags = [];
1272
1271
  this.ctr = 0;
1273
1272
  this.nonce = options.nonce;
@@ -1876,7 +1875,7 @@ var toRules = function toRules(parsed, points) {
1876
1875
  var getRules = function getRules(value, points) {
1877
1876
  return dealloc(toRules(alloc(value), points));
1878
1877
  };
1879
- var fixedElements = /* @__PURE__ */ new WeakMap();
1878
+ var fixedElements = /* #__PURE__ */ new WeakMap();
1880
1879
  var compat = function compat(element) {
1881
1880
  if (element.type !== "rule" || !element.parent || element.length < 1) return;
1882
1881
  var value = element.value;
@@ -2445,9 +2444,9 @@ react["useInsertionEffect"] && react["useInsertionEffect"] || react.useLayoutEff
2445
2444
  //#endregion
2446
2445
  //#region ../../node_modules/@emotion/react/dist/emotion-element-d59e098f.esm.js
2447
2446
  var isBrowser = typeof document !== "undefined";
2448
- (/* @__PURE__ */ react.createContext(typeof HTMLElement !== "undefined" ? /* @__PURE__ */ createCache({ key: "css" }) : null)).Provider;
2447
+ (/* @__PURE__ */ react.createContext(typeof HTMLElement !== "undefined" ? /* #__PURE__ */ createCache({ key: "css" }) : null)).Provider;
2449
2448
  if (!isBrowser);
2450
- var ThemeContext = /* @__PURE__ */ react.createContext({});
2449
+ var ThemeContext = /* #__PURE__ */ react.createContext({});
2451
2450
  var useTheme = function useTheme() {
2452
2451
  return react.useContext(ThemeContext);
2453
2452
  };
@@ -2455,7 +2454,7 @@ var getTheme = function getTheme(outerTheme, theme) {
2455
2454
  if (typeof theme === "function") return theme(outerTheme);
2456
2455
  return _extends({}, outerTheme, theme);
2457
2456
  };
2458
- var createCacheWithTheme = /* @__PURE__ */ weakMemoize(function(outerTheme) {
2457
+ var createCacheWithTheme = /* #__PURE__ */ weakMemoize(function(outerTheme) {
2459
2458
  return weakMemoize(function(theme) {
2460
2459
  return getTheme(outerTheme, theme);
2461
2460
  });
@@ -2463,13 +2462,13 @@ var createCacheWithTheme = /* @__PURE__ */ weakMemoize(function(outerTheme) {
2463
2462
  var ThemeProvider = function ThemeProvider(props) {
2464
2463
  var theme = react.useContext(ThemeContext);
2465
2464
  if (props.theme !== theme) theme = createCacheWithTheme(theme)(props.theme);
2466
- return /* @__PURE__ */ react.createElement(ThemeContext.Provider, { value: theme }, props.children);
2465
+ return /*#__PURE__*/ react.createElement(ThemeContext.Provider, { value: theme }, props.children);
2467
2466
  };
2468
2467
  function withTheme(Component) {
2469
2468
  var componentName = Component.displayName || Component.name || "Component";
2470
- var WithTheme = /* @__PURE__ */ react.forwardRef(function render(props, ref) {
2469
+ var WithTheme = /*#__PURE__*/ react.forwardRef(function render(props, ref) {
2471
2470
  var theme = react.useContext(ThemeContext);
2472
- return /* @__PURE__ */ react.createElement(Component, _extends({
2471
+ return /*#__PURE__*/ react.createElement(Component, _extends({
2473
2472
  theme,
2474
2473
  ref
2475
2474
  }, props));
@@ -2583,7 +2582,7 @@ function createStyled(StyleSheet, options) {
2583
2582
  for (var _len = arguments.length, rawStyles = new Array(_len), _key = 0; _key < _len; _key++) rawStyles[_key] = arguments[_key];
2584
2583
  if (rawStyles[0] == null || rawStyles[0].raw === void 0) styles = rawStyles;
2585
2584
  else styles = interleave(rawStyles);
2586
- var Styled = /* @__PURE__ */ react.forwardRef(function(props, ref) {
2585
+ var Styled = /*#__PURE__*/ react.forwardRef(function(props, ref) {
2587
2586
  var finalTag = shouldUseAs && props.as || component;
2588
2587
  var mergedProps = props;
2589
2588
  if (props.theme == null) {
@@ -2599,7 +2598,7 @@ function createStyled(StyleSheet, options) {
2599
2598
  }
2600
2599
  newProps.style = [css.apply(mergedProps, styles), props.style];
2601
2600
  if (ref) newProps.ref = ref;
2602
- return /* @__PURE__ */ react.createElement(finalTag, newProps);
2601
+ return /*#__PURE__*/ react.createElement(finalTag, newProps);
2603
2602
  });
2604
2603
  Styled.displayName = "emotion(" + getDisplayName(component) + ")";
2605
2604
  var withComponent = function withComponent(newComponent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native-theming",
3
- "version": "10.4.5",
3
+ "version": "10.4.6",
4
4
  "description": "A wrapper library around emotion 11 to provide theming support for react-native storybook",
5
5
  "keywords": [
6
6
  "react",
@@ -30,7 +30,7 @@
30
30
  "devDependencies": {
31
31
  "@emotion/native": "^11.11.0",
32
32
  "@emotion/react": "^11.14.0",
33
- "tsdown": "^0.22.0"
33
+ "tsdown": "^0.22.3"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "*",