@uni-design-system/uni-core 2.0.3 → 3.0.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.
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @uni-design-system/uni-core
2
+
3
+ The single source of truth for the **Uni Design System**. This package contains foundational design tokens, branding themes, layout dimensions, and global styling variables.
4
+
5
+ It is structured as a pure, dependency-free library designed to be consumed by any framework implementation.
6
+
7
+ ## 📦 Installation
8
+
9
+ ```bash
10
+ # Using npm
11
+ npm install @uni-design-system/uni-core
12
+
13
+ # Using pnpm
14
+ pnpm add @uni-design-system/uni-core
15
+ ```
16
+
17
+ ## 🚚 Distribution Formats
18
+
19
+ This package is compiled using **Vite** as a dual-package distribution to ensure broad ecosystem compatibility with no strict ESM extension path errors:
20
+ - **ESM (`dist/esm/index.js`)**: For modern, tree-shakable environments.
21
+ - **CommonJS (`dist/cjs/index.cjs`)**: Explicit fallback extensions for legacy bundlers (like Webpack 5).
22
+ - **Types (`dist/types/`)**: Pre-isolated TypeScript definitions.
23
+
24
+ ## 🧩 Usage Example
25
+
26
+ ```typescript
27
+ import { Theme, ColorToken, Size } from '@uni-design-system/uni-core';
28
+
29
+ // Accessing standard token primitives
30
+ const brandColor = ColorToken.BrandPrimary;
31
+ const paddingSize = Size.Medium;
32
+ ```