@cdx-ui/styles 0.0.1-beta.21 → 0.0.1-beta.23
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 +8 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ import pulse from '@cdx-ui/styles/presets/pulse.json';
|
|
|
53
53
|
|
|
54
54
|
### TypeScript types
|
|
55
55
|
|
|
56
|
-
The package exports DTCG-compatible type definitions for theme objects, overrides, and related structures:
|
|
56
|
+
The package exports DTCG-compatible type definitions for theme objects, overrides, and related structures, plus the `useCdxFonts` hook:
|
|
57
57
|
|
|
58
58
|
```typescript
|
|
59
59
|
import type {
|
|
@@ -66,8 +66,11 @@ import type {
|
|
|
66
66
|
Mode,
|
|
67
67
|
Platform,
|
|
68
68
|
} from '@cdx-ui/styles';
|
|
69
|
+
|
|
70
|
+
import { useCdxFonts } from '@cdx-ui/styles';
|
|
69
71
|
```
|
|
70
72
|
|
|
73
|
+
- `useCdxFonts` — Hook that loads all preset display fonts (three per preset) plus platform web fonts (Inter, IBM Plex Mono) via `expo-font`. Call in your root layout and gate rendering on the returned `fontsLoaded` boolean. See [Getting Started](../../docs/getting-started.md) for usage.
|
|
71
74
|
- `ThemeMetadata` — metadata stored under `$extensions.com.candescent.theme` (name, preset, schema version).
|
|
72
75
|
- `ThemeOverrideMetadata` — metadata for FI overrides under `$extensions.com.candescent.themeOverride` (base preset, FI id/name, schema version).
|
|
73
76
|
|
|
@@ -90,8 +93,11 @@ tokens/presets/
|
|
|
90
93
|
poise.json # Default build preset
|
|
91
94
|
prestige.json
|
|
92
95
|
pulse.json
|
|
96
|
+
.manifest.json # SHA-256 checksums (written by fetch)
|
|
93
97
|
```
|
|
94
98
|
|
|
99
|
+
`.manifest.json` records the SHA-256 hash of each preset JSON after fetch. It is used by CI and downstream tooling to detect whether preset files changed between fetches — if the checksums match, the build step can be skipped.
|
|
100
|
+
|
|
95
101
|
Each file is assembled from four Figma collections: **Primitives** (shared), **FI Primitives** (Candescent mode — brand/accent/base colors), **Semantics ({Preset})** (Light + Dark modes), and **Platform** (Web/iOS/Android fonts). Alias references are preserved as DTCG `"{path.to.token}"` syntax.
|
|
96
102
|
|
|
97
103
|
#### Figma MCP alternative
|
|
@@ -165,6 +171,7 @@ styles/
|
|
|
165
171
|
│ └── useCdxFonts.ts # Font loader hook (expo-font) — loads all preset display fonts
|
|
166
172
|
├── tokens/
|
|
167
173
|
│ └── presets/
|
|
174
|
+
│ ├── .manifest.json # SHA-256 checksums (written by fetch)
|
|
168
175
|
│ ├── poise.json # Poise theme object (build default)
|
|
169
176
|
│ ├── prestige.json # Prestige theme object
|
|
170
177
|
│ └── pulse.json # Pulse theme object
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/styles",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.23",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@expo-google-fonts/manrope": "0.4.2",
|
|
54
54
|
"@expo-google-fonts/outfit": "0.4.3",
|
|
55
55
|
"@expo-google-fonts/public-sans": "0.4.2",
|
|
56
|
-
"@cdx-ui/utils": "0.0.1-beta.
|
|
56
|
+
"@cdx-ui/utils": "0.0.1-beta.23"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"react": "^18.2.0 || ^19.0.0",
|