@react-native-rethemed/material-ui-tokens 0.1.0 → 0.1.2
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/README.md +2 -0
- package/dist/index.cjs +49 -0
- package/dist/{cjs/index.d.ts → index.d.cts} +4 -2
- package/dist/{esm/index.d.ts → index.d.mts} +4 -2
- package/dist/index.mjs +41 -0
- package/dist/tokens.gen.cjs +828 -0
- package/dist/tokens.gen.d.cts +822 -0
- package/dist/tokens.gen.d.mts +822 -0
- package/dist/tokens.gen.mjs +821 -0
- package/package.json +13 -15
- package/dist/cjs/index.js +0 -49
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/tokens.gen.d.ts +0 -820
- package/dist/cjs/tokens.gen.js +0 -687
- package/dist/esm/index.js +0 -39
- package/dist/esm/package.json +0 -1
- package/dist/esm/tokens.gen.d.ts +0 -820
- package/dist/esm/tokens.gen.js +0 -684
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-rethemed/material-ui-tokens",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Material UI's default theme (palette, colors, typography) for React Native, ready for react-native-rethemed.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -21,18 +21,11 @@
|
|
|
21
21
|
"directory": "packages/react-native-rethemed/material-ui"
|
|
22
22
|
},
|
|
23
23
|
"sideEffects": false,
|
|
24
|
-
"
|
|
25
|
-
"types": "./dist/cjs/index.d.ts",
|
|
24
|
+
"types": "./dist/index.d.cts",
|
|
26
25
|
"exports": {
|
|
27
26
|
".": {
|
|
28
|
-
"import":
|
|
29
|
-
|
|
30
|
-
"default": "./dist/esm/index.js"
|
|
31
|
-
},
|
|
32
|
-
"require": {
|
|
33
|
-
"types": "./dist/cjs/index.d.ts",
|
|
34
|
-
"default": "./dist/cjs/index.js"
|
|
35
|
-
}
|
|
27
|
+
"import": "./dist/index.mjs",
|
|
28
|
+
"require": "./dist/index.cjs"
|
|
36
29
|
},
|
|
37
30
|
"./package.json": "./package.json"
|
|
38
31
|
},
|
|
@@ -43,26 +36,30 @@
|
|
|
43
36
|
"access": "public"
|
|
44
37
|
},
|
|
45
38
|
"dependencies": {
|
|
46
|
-
"@react-native-rethemed/core": "^0.1.
|
|
39
|
+
"@react-native-rethemed/core": "^0.1.2"
|
|
47
40
|
},
|
|
48
41
|
"devDependencies": {
|
|
42
|
+
"@arethetypeswrong/core": "0.18.5",
|
|
49
43
|
"@biomejs/biome": "2.5.4",
|
|
50
44
|
"@emotion/react": "11.14.0",
|
|
51
45
|
"@emotion/styled": "11.14.1",
|
|
52
46
|
"@mui/material": "9.4.0",
|
|
53
|
-
"@react-native-rethemed/cli": "0.1.
|
|
47
|
+
"@react-native-rethemed/cli": "0.1.2",
|
|
54
48
|
"@types/node": "24.10.4",
|
|
55
49
|
"@types/react": "19.2.17",
|
|
56
50
|
"biome-config": "0.0.0",
|
|
57
51
|
"jiti": "2.7.0",
|
|
52
|
+
"publint": "0.3.25",
|
|
58
53
|
"react": "19.2.3",
|
|
59
54
|
"react-dom": "19.2.3",
|
|
60
55
|
"react-native": "0.86.2",
|
|
56
|
+
"tsdown": "0.23.0",
|
|
57
|
+
"tsdown-config": "0.0.0",
|
|
61
58
|
"typescript": "6.0.3",
|
|
62
59
|
"vitest": "4.1.10"
|
|
63
60
|
},
|
|
64
61
|
"scripts": {
|
|
65
|
-
"build": "
|
|
62
|
+
"build": "tsdown",
|
|
66
63
|
"generate": "jiti scripts/generate.ts",
|
|
67
64
|
"example:codegen": "react-native-rethemed codegen example/theme.ts --docs example/themed.md",
|
|
68
65
|
"lint": "biome check src scripts example",
|
|
@@ -70,5 +67,6 @@
|
|
|
70
67
|
"tsc": "tsc --noEmit",
|
|
71
68
|
"test": "vitest",
|
|
72
69
|
"test:ci": "vitest run"
|
|
73
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"main": "./dist/index.cjs"
|
|
74
72
|
}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zIndices = exports.typography = exports.spacing = exports.shadows = exports.semanticColors = exports.radii = exports.fontWeights = exports.colors = exports.materialUiTheme = void 0;
|
|
4
|
-
const config_1 = require("@react-native-rethemed/core/config");
|
|
5
|
-
const tokens_gen_1 = require("./tokens.gen");
|
|
6
|
-
Object.defineProperty(exports, "colors", { enumerable: true, get: function () { return tokens_gen_1.colors; } });
|
|
7
|
-
Object.defineProperty(exports, "fontWeights", { enumerable: true, get: function () { return tokens_gen_1.fontWeights; } });
|
|
8
|
-
Object.defineProperty(exports, "radii", { enumerable: true, get: function () { return tokens_gen_1.radii; } });
|
|
9
|
-
Object.defineProperty(exports, "semanticColors", { enumerable: true, get: function () { return tokens_gen_1.semanticColors; } });
|
|
10
|
-
Object.defineProperty(exports, "shadows", { enumerable: true, get: function () { return tokens_gen_1.shadows; } });
|
|
11
|
-
Object.defineProperty(exports, "spacing", { enumerable: true, get: function () { return tokens_gen_1.spacing; } });
|
|
12
|
-
Object.defineProperty(exports, "typography", { enumerable: true, get: function () { return tokens_gen_1.typography; } });
|
|
13
|
-
Object.defineProperty(exports, "zIndices", { enumerable: true, get: function () { return tokens_gen_1.zIndices; } });
|
|
14
|
-
/**
|
|
15
|
-
* Material UI's default theme (`createTheme()` from `@mui/material`, which
|
|
16
|
-
* follows Material Design 2), converted for React Native. Values are
|
|
17
|
-
* generated by `scripts/generate.ts`; see `src/tokens.gen.ts`.
|
|
18
|
-
*
|
|
19
|
-
* - `semanticColors`: the default `palette` in light and dark mode, as
|
|
20
|
-
* `'<group>.<key>'` with Material UI's own names: `'primary.main'`,
|
|
21
|
-
* `'primary.contrastText'`, `'text.secondary'`, `'background.paper'`,
|
|
22
|
-
* `'action.hover'`, `'divider.default'`.
|
|
23
|
-
* - `colors`: `@mui/material/colors` as `'<hue>.<shade>'` (`'red.500'`,
|
|
24
|
-
* `'deepPurple.A200'`), plus `black` and `white`. Fixed in both schemes.
|
|
25
|
-
* - `typography`: the 13 variants (`h1`…`overline`) as text presets,
|
|
26
|
-
* `themed.text.h1()`. rem/em → points at `htmlFontSize` (16); line heights
|
|
27
|
-
* absolute; `button` / `overline` keep `textTransform: 'uppercase'`.
|
|
28
|
-
* - `spacing`: `theme.spacing(n)`, so `padding: 2` is 16. `radii`: multiples
|
|
29
|
-
* of `shape.borderRadius`, so `borderRadius: 2` is 8 — both like `sx`.
|
|
30
|
-
* - `shadows`: elevations 0–24, first layer only; `elevation` matches the
|
|
31
|
-
* Material elevation on Android exactly.
|
|
32
|
-
* - Not included (no RN equivalent): `fontFamily` (Roboto, Android's default
|
|
33
|
-
* anyway), breakpoints, transitions, mixins, component overrides, the
|
|
34
|
-
* `action.*Opacity` numbers and dark mode's `text.icon`.
|
|
35
|
-
*/
|
|
36
|
-
exports.materialUiTheme = (0, config_1.defineTheme)({
|
|
37
|
-
tokens: {
|
|
38
|
-
colors: tokens_gen_1.colors,
|
|
39
|
-
radii: tokens_gen_1.radii,
|
|
40
|
-
spacing: tokens_gen_1.spacing,
|
|
41
|
-
fontWeights: tokens_gen_1.fontWeights,
|
|
42
|
-
zIndices: tokens_gen_1.zIndices,
|
|
43
|
-
shadows: tokens_gen_1.shadows,
|
|
44
|
-
},
|
|
45
|
-
semanticTokens: {
|
|
46
|
-
colors: tokens_gen_1.semanticColors,
|
|
47
|
-
text: tokens_gen_1.typography,
|
|
48
|
-
},
|
|
49
|
-
});
|
package/dist/cjs/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs"}
|