@umber-style/react-native 0.1.0 → 0.2.0-alpha.0

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.
@@ -1,8 +1,10 @@
1
1
  let _umber_style_core = require("@umber-style/core");
2
2
  let react_native = require("react-native");
3
3
  // src/conditions.ts
4
- const themesById = /* @__PURE__ */ new Map();
5
- const idsByTheme = /* @__PURE__ */ new WeakMap();
4
+ const { themesById, idsByTheme } = (0, _umber_style_core.readSharedState)("react-native.theme-ids@1", () => ({
5
+ themesById: /* @__PURE__ */ new Map(),
6
+ idsByTheme: /* @__PURE__ */ new WeakMap()
7
+ }));
6
8
  /** The key of `when(theme)`: it names the theme object itself, which `matchesCondition` compares by identity. */
7
9
  function createNativeThemeKey(theme) {
8
10
  let id = idsByTheme.get(theme);
@@ -1,8 +1,10 @@
1
- import { createThemeKey, readCondition } from "@umber-style/core";
1
+ import { createThemeKey, readCondition, readSharedState } from "@umber-style/core";
2
2
  import { platformAppearance } from "./platform.mjs";
3
3
  // src/conditions.ts
4
- const themesById = /* @__PURE__ */ new Map();
5
- const idsByTheme = /* @__PURE__ */ new WeakMap();
4
+ const { themesById, idsByTheme } = readSharedState("react-native.theme-ids@1", () => ({
5
+ themesById: /* @__PURE__ */ new Map(),
6
+ idsByTheme: /* @__PURE__ */ new WeakMap()
7
+ }));
6
8
  /** The key of `when(theme)`: it names the theme object itself, which `matchesCondition` compares by identity. */
7
9
  function createNativeThemeKey(theme) {
8
10
  let id = idsByTheme.get(theme);
package/dist/index.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_defaultStyle = require("./defaultStyle.cjs");
3
2
  let _umber_style_core = require("@umber-style/core");
3
+ const require_defaultStyle = require("./defaultStyle.cjs");
4
4
  const require_CacheProvider = require("./CacheProvider.cjs");
5
5
  const require_alpha = require("./alpha.cjs");
6
6
  const require_calc = require("./calc.cjs");
7
7
  const require_createStyle = require("./createStyle.cjs");
8
- const { configure, styled, StyleSheet, useStyle, useTheme, ThemeProvider, ThemeScope, useThemeClass, useMediaQuery, ThemeContext, apply, css, themeClass, when, whenScheme, keyframes, globalStyles, Global } = require_defaultStyle.createDefaultStyle();
8
+ const { configure, styled, StyleSheet, useStyle, useTheme, ThemeProvider, ThemeScope, useThemeClass, useMediaQuery, ThemeContext, apply, css, themeClass, when, whenScheme, keyframes, globalStyles, Global } = (0, _umber_style_core.readSharedState)("react-native.default-style@1", require_defaultStyle.createDefaultStyle);
9
9
  exports.CacheProvider = require_CacheProvider.CacheProvider;
10
10
  exports.Global = Global;
11
11
  exports.StyleSheet = StyleSheet;
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
+ import { at, readSharedState } from "@umber-style/core";
1
2
  import { createDefaultStyle } from "./defaultStyle.mjs";
2
- import { at } from "@umber-style/core";
3
3
  import { CacheProvider } from "./CacheProvider.mjs";
4
4
  import { alpha } from "./alpha.mjs";
5
5
  import { add, divide, multiply, negate, subtract } from "./calc.mjs";
6
6
  import { createStyle } from "./createStyle.mjs";
7
- const { configure, styled, StyleSheet, useStyle, useTheme, ThemeProvider, ThemeScope, useThemeClass, useMediaQuery, ThemeContext, apply, css, themeClass, when, whenScheme, keyframes, globalStyles, Global } = createDefaultStyle();
7
+ const { configure, styled, StyleSheet, useStyle, useTheme, ThemeProvider, ThemeScope, useThemeClass, useMediaQuery, ThemeContext, apply, css, themeClass, when, whenScheme, keyframes, globalStyles, Global } = readSharedState("react-native.default-style@1", createDefaultStyle);
8
8
  export { CacheProvider, Global, StyleSheet, ThemeContext, ThemeProvider, ThemeScope, add, alpha, apply, at, configure, createDefaultStyle, createStyle, css, divide, globalStyles, keyframes, multiply, negate, styled, subtract, themeClass, useMediaQuery, useStyle, useTheme, useThemeClass, when, whenScheme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umber-style/react-native",
3
- "version": "0.1.0",
3
+ "version": "0.2.0-alpha.0",
4
4
  "description": "UmberStyle for React Native: the same names as the React binding, over the real theme values.",
5
5
  "keywords": [
6
6
  "styling",
@@ -41,7 +41,7 @@
41
41
  "access": "public"
42
42
  },
43
43
  "dependencies": {
44
- "@umber-style/core": "0.1.0"
44
+ "@umber-style/core": "^0.2.0-alpha.1"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": "^19.2.8",
@@ -54,6 +54,7 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@soroush.tech/bench": "^2.2.3",
57
+ "@soroush.tech/styled-system": "^6.0.1",
57
58
  "@testing-library/react": "^16.3.3",
58
59
  "@types/node": "^26.6.6",
59
60
  "@types/react": "^19.3.0",
@@ -67,6 +68,7 @@
67
68
  "tsdown": "^0.23.7",
68
69
  "typescript": "~7.0.2",
69
70
  "vitest": "^5.1.0",
71
+ "@umber-style/is-prop-valid": "0.2.0-alpha.0",
70
72
  "@umber-style/eslint-config": "0.0.0"
71
73
  },
72
74
  "scripts": {