@chipmobilesdk/rn-theme 0.2.0 → 0.2.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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@chipmobilesdk/rn-theme",
3
- "version": "0.2.0",
4
- "private": false,
5
- "license": "UNLICENSED",
6
- "main": "src/index.ts",
3
+ "version": "0.2.1",
4
+ "private": false,
5
+ "license": "UNLICENSED",
6
+ "main": "src/index.ts",
7
7
  "types": "src/index.ts",
8
8
  "exports": {
9
9
  ".": {
@@ -18,6 +18,7 @@
18
18
  "src/types",
19
19
  "src/unistyles",
20
20
  "src/utils",
21
+ "skills",
21
22
  "README.md",
22
23
  "CHANGELOG.md"
23
24
  ],
@@ -42,8 +43,8 @@
42
43
  "optional": false
43
44
  }
44
45
  },
45
- "publishConfig": {
46
- "access": "public",
47
- "registry": "https://registry.npmjs.org/"
48
- }
49
- }
46
+ "publishConfig": {
47
+ "access": "public",
48
+ "registry": "https://registry.npmjs.org/"
49
+ }
50
+ }
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: sdk-rn-theme
3
+ description: "Theming for @chipmobilesdk/rn-theme: brand palettes, Unistyles config, color/typography tokens, dark mode. Use when setting up theming, adding a design token, wiring light/dark, or debugging theme setup order."
4
+ metadata:
5
+ package: "@chipmobilesdk/rn-theme"
6
+ packageVersion: "0.2.0"
7
+ user-invocable: true
8
+ disable-model-invocation: false
9
+ ---
10
+
11
+ # @chipmobilesdk/rn-theme
12
+
13
+ Generates light and dark palettes from brand colors and produces a Unistyles config.
14
+ This is the single source of truth for color, typography, spacing and radius tokens.
15
+
16
+ ## Use this when
17
+
18
+ - Bootstrapping theming in a new app
19
+ - Adding or renaming a design token
20
+ - Wiring light/dark mode or a theme start strategy
21
+ - A screen renders unstyled, or `useStyles` returns an unexpected theme
22
+
23
+ ## Do not use this for
24
+
25
+ - Chart-specific theming — that is `sdk-rn-chart` (`ChartThemeProvider`)
26
+ - Per-component one-off styles that do not belong in the token set
27
+
28
+ ## Setup order matters
29
+
30
+ Unistyles must be configured **before** the first component that consumes a style
31
+ renders. Getting this wrong produces an app that renders with no styling and no error.
32
+ Read the `## Setup Order` and `## Theme Start Strategy` sections of the README before
33
+ changing entry-point wiring.
34
+
35
+ ## Public API (v0.2.0)
36
+
37
+ Runtime:
38
+
39
+ - `generateLightPalette(brand)` / `generateDarkPalette(brand)` — derive full palettes
40
+ - `createUnistylesConfig(...)` — build the Unistyles configuration object
41
+
42
+ Types: `BrandColors`, `ThemeColors`, `TypographyConfig`, `TypographyToken`, `Typography`,
43
+ `StyleConfig`, `StyleTheme`, `DeepPartial`, `UnistylesThemeFromBrand`
44
+
45
+ Anything not exported from `src/index.ts` is private and may change without a major bump —
46
+ see `## Private Modules` and `## Semver and Migration` in the README.
47
+
48
+ ## Where the detail lives
49
+
50
+ Read only the section you need from
51
+ `node_modules/@chipmobilesdk/rn-theme/README.md`:
52
+
53
+ | Need | Section |
54
+ |---|---|
55
+ | Entry-point wiring | `## Setup Order`, `## Theme Start Strategy` |
56
+ | Full export list | `## Public Runtime Exports`, `## Public Type Exports` |
57
+ | Config rejected at runtime | `## Configuration Validation` |
58
+ | Peer dependency rules | `## Compatibility`, `## Dependency Classification` |
59
+ | Upgrading across versions | `## Semver and Migration` |