@contractspec/lib.design-system 3.8.10 → 3.9.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 +146 -46
- package/dist/browser/index.js +1 -1196
- package/dist/components/atoms/ActionButtons.d.ts +1 -1
- package/dist/components/atoms/Cta.d.ts +2 -2
- package/dist/components/atoms/Input.mobile.d.ts +2 -1
- package/dist/components/atoms/LoaderCircular.d.ts +1 -1
- package/dist/components/atoms/RankBadge.d.ts +1 -1
- package/dist/components/atoms/ScoreBar.d.ts +1 -1
- package/dist/components/atoms/Textarea.mobile.d.ts +2 -1
- package/dist/components/legal/atoms/LegalHeading.d.ts +1 -1
- package/dist/components/legal/atoms/LegalList.d.ts +1 -1
- package/dist/components/legal/atoms/LegalSection.d.ts +2 -2
- package/dist/components/legal/atoms/LegalText.d.ts +2 -2
- package/dist/components/legal/molecules/LegalTOC.d.ts +1 -1
- package/dist/components/marketing/MarketingCardsSection.d.ts +1 -1
- package/dist/components/molecules/EntityCard.d.ts +1 -1
- package/dist/components/molecules/StatCard.d.ts +1 -1
- package/dist/components/native/FlatListScreen.mobile.d.ts +1 -1
- package/dist/components/organisms/GridLayout.d.ts +1 -1
- package/dist/components/organisms/ListCardPage.d.ts +1 -1
- package/dist/components/organisms/ListGridPage.d.ts +1 -1
- package/dist/contracts.typecheck.d.ts +1 -0
- package/dist/i18n/translation.d.ts +16 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1196
- package/dist/theme/contracts.d.ts +11 -0
- package/dist/theme/tokenBridge.d.ts +3 -3
- package/dist/theme/variants.d.ts +2 -2
- package/package.json +15 -15
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ThemeTokens as ContractThemeTokens, ThemeRef, ThemeRegistry, ThemeSpec } from '@contractspec/lib.contracts-spec/themes';
|
|
2
|
+
import type { BridgedTokens, PlatformKind } from './tokenBridge';
|
|
3
|
+
import { type ThemeTokens } from './tokens';
|
|
4
|
+
export interface ThemeResolutionContext {
|
|
5
|
+
targets?: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function mergeThemeTokens(base: ThemeTokens, tokens?: ContractThemeTokens): ThemeTokens;
|
|
8
|
+
export declare function resolveThemeSpecTokens(spec: ThemeSpec, context?: ThemeResolutionContext, baseTokens?: ThemeTokens): ThemeTokens;
|
|
9
|
+
export declare function resolveThemeRefTokens(registry: ThemeRegistry, ref: ThemeRef, context?: ThemeResolutionContext): ThemeTokens;
|
|
10
|
+
export declare function resolvePlatformTheme(spec: ThemeSpec, platform: PlatformKind, context?: ThemeResolutionContext): BridgedTokens;
|
|
11
|
+
export declare function resolvePlatformTheme(registry: ThemeRegistry, ref: ThemeRef, platform: PlatformKind, context?: ThemeResolutionContext): BridgedTokens;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ColorTokens, type RadiusTokens, type SpaceTokens,
|
|
1
|
+
import { type ColorTokens, type RadiusTokens, type SpaceTokens, type ThemeTokens } from './tokens';
|
|
2
2
|
export type PlatformKind = 'web' | 'native';
|
|
3
|
-
type WebTokens =
|
|
3
|
+
type WebTokens = ThemeTokens;
|
|
4
4
|
interface NativeTokens {
|
|
5
5
|
colors: ColorTokens;
|
|
6
6
|
spacing: SpaceTokens;
|
|
@@ -12,5 +12,5 @@ interface NativeTokens {
|
|
|
12
12
|
icons: Record<string, number>;
|
|
13
13
|
}
|
|
14
14
|
export type BridgedTokens = WebTokens | NativeTokens;
|
|
15
|
-
export declare function mapTokensForPlatform(platform: PlatformKind): BridgedTokens;
|
|
15
|
+
export declare function mapTokensForPlatform(platform: PlatformKind, tokens?: ThemeTokens): BridgedTokens;
|
|
16
16
|
export {};
|
package/dist/theme/variants.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ export type EmphasisVariant = 'default' | 'subtle' | 'strong';
|
|
|
8
8
|
* Consumers can extend this with component-specific classes.
|
|
9
9
|
*/
|
|
10
10
|
export declare const dsBaseVariants: (props?: ({
|
|
11
|
-
size?: "sm" | "
|
|
11
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
12
12
|
density?: "compact" | "comfortable" | null | undefined;
|
|
13
13
|
tone?: "success" | "neutral" | "danger" | "info" | "warning" | null | undefined;
|
|
14
|
-
emphasis?: "
|
|
14
|
+
emphasis?: "default" | "strong" | "subtle" | null | undefined;
|
|
15
15
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
16
|
export type DSBaseVariantsProps = VariantProps<typeof dsBaseVariants>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/lib.design-system",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Design tokens and theming primitives",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"registry:build": "bun run scripts/build-registry.ts",
|
|
21
21
|
"test": "bun test --pass-with-no-tests",
|
|
22
22
|
"lint": "bun run lint:fix",
|
|
23
|
-
"lint:fix": "biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .",
|
|
24
|
-
"lint:check": "biome check .",
|
|
23
|
+
"lint:fix": "node ../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../scripts/biome.cjs check --write .",
|
|
24
|
+
"lint:check": "node ../../../scripts/biome.cjs check .",
|
|
25
25
|
"prebuild": "contractspec-bun-build prebuild",
|
|
26
26
|
"typecheck": "tsc --noEmit -p tsconfig.build.json"
|
|
27
27
|
},
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"tree-shake": true,
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@contractspec/lib.ai-agent": "8.0.
|
|
34
|
-
"@contractspec/lib.contracts-spec": "5.
|
|
35
|
-
"@contractspec/lib.contracts-runtime-client-react": "3.
|
|
36
|
-
"@contractspec/lib.presentation-runtime-react": "36.0.
|
|
37
|
-
"@contractspec/lib.ui-kit": "3.
|
|
38
|
-
"@contractspec/lib.ui-kit-web": "3.
|
|
33
|
+
"@contractspec/lib.ai-agent": "8.0.7",
|
|
34
|
+
"@contractspec/lib.contracts-spec": "5.3.0",
|
|
35
|
+
"@contractspec/lib.contracts-runtime-client-react": "3.9.0",
|
|
36
|
+
"@contractspec/lib.presentation-runtime-react": "36.0.7",
|
|
37
|
+
"@contractspec/lib.ui-kit": "3.9.0",
|
|
38
|
+
"@contractspec/lib.ui-kit-web": "3.10.0",
|
|
39
39
|
"@hookform/resolvers": "5.2.2",
|
|
40
40
|
"class-variance-authority": "^0.7.1",
|
|
41
41
|
"clsx": "^2.1.1",
|
|
42
|
-
"lucide-react": "^1.
|
|
43
|
-
"next": "16.2.
|
|
42
|
+
"lucide-react": "^1.8.0",
|
|
43
|
+
"next": "16.2.3",
|
|
44
44
|
"react": "19.2.0",
|
|
45
45
|
"react-dom": "19.2.0",
|
|
46
|
-
"react-hook-form": "^7.72.
|
|
46
|
+
"react-hook-form": "^7.72.1",
|
|
47
47
|
"shiki": "^4.0.2",
|
|
48
48
|
"tailwind-merge": "^3.5.0",
|
|
49
49
|
"tailwindcss-animate": "^1.0.7",
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@contractspec/tool.typescript": "3.7.13",
|
|
54
|
-
"@types/node": "^25.
|
|
54
|
+
"@types/node": "^25.6.0",
|
|
55
55
|
"@types/react-dom": "^19.0.14",
|
|
56
|
-
"postcss": "^8.5.
|
|
56
|
+
"postcss": "^8.5.9",
|
|
57
57
|
"postcss-load-config": "^6.0.1",
|
|
58
58
|
"react-native": "^0.81.6",
|
|
59
59
|
"react-native-css": "^3.0.4",
|
|
60
60
|
"tailwindcss": "4.2.2",
|
|
61
61
|
"typescript": "^5.9.3",
|
|
62
|
-
"@contractspec/tool.bun": "3.7.
|
|
62
|
+
"@contractspec/tool.bun": "3.7.14"
|
|
63
63
|
},
|
|
64
64
|
"files": [
|
|
65
65
|
"dist",
|