@usefragments/core 1.2.0 → 1.4.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/dist/{chunk-BQQTMGLA.js → chunk-57QDBEHQ.js} +79 -6
- package/dist/chunk-57QDBEHQ.js.map +1 -0
- package/dist/{chunk-DBVTSUMT.js → chunk-CBSNXFOD.js} +20 -6
- package/dist/chunk-CBSNXFOD.js.map +1 -0
- package/dist/codes/index.d.ts +1 -1
- package/dist/codes/index.js +2 -2
- package/dist/compiled-types/index.d.ts +1 -1
- package/dist/generate/index.d.ts +1 -1
- package/dist/{governance-DYSirwJu.d.ts → governance-DxdJV6lx.d.ts} +10 -0
- package/dist/index-0lmh0Lbo.d.ts +6981 -0
- package/dist/index.d.ts +65 -29
- package/dist/index.js +397 -127
- package/dist/index.js.map +1 -1
- package/dist/react-types.d.ts +1 -1
- package/dist/registry.d.ts +18 -18
- package/dist/schemas/index.d.ts +3 -3377
- package/dist/schemas/index.js +1 -1
- package/dist/test-utils.d.ts +1 -1
- package/package.json +1 -1
- package/src/agent-format.test.ts +75 -3
- package/src/agent-format.ts +28 -6
- package/src/constants.ts +3 -0
- package/src/evidence.ts +27 -0
- package/src/facts/builders.ts +3 -1
- package/src/facts/fact-index.ts +22 -2
- package/src/facts/facts.test.ts +1 -1
- package/src/facts/types.ts +16 -1
- package/src/index.ts +4 -0
- package/src/rules/__tests__/fix-emission-invariant.test.ts +174 -0
- package/src/rules/__tests__/tokens-require-dual-fallback.test.ts +90 -0
- package/src/rules/components-prefer-library.test.ts +148 -0
- package/src/rules/components-prefer-library.ts +52 -1
- package/src/rules/emit-gate.test.ts +16 -0
- package/src/rules/emit-gate.ts +6 -3
- package/src/rules/finding.ts +3 -0
- package/src/rules/rules.test.ts +2 -1
- package/src/rules/spacing-resolution.ts +5 -8
- package/src/rules/styles-no-raw-color.test.ts +213 -0
- package/src/rules/styles-no-raw-color.ts +157 -23
- package/src/rules/styles-no-raw-dimensions.ts +31 -12
- package/src/rules/styles-no-raw-spacing.ts +33 -11
- package/src/rules/styles-no-raw-typography.ts +37 -15
- package/src/rules/taxonomy.test.ts +13 -0
- package/src/rules/tokens-require-dual-fallback.ts +54 -17
- package/src/rules/utils.ts +51 -0
- package/src/schema.ts +6 -2
- package/src/schemas/index.ts +81 -3
- package/src/token-types.ts +18 -0
- package/src/tokens/__tests__/source-names.test.ts +42 -0
- package/src/tokens/categories.ts +54 -24
- package/src/tokens/design-token-parser.test.ts +24 -5
- package/src/tokens/design-token-parser.ts +40 -8
- package/src/tokens/scss.test.ts +94 -0
- package/src/tokens/scss.ts +11 -4
- package/src/types.ts +11 -0
- package/dist/chunk-BQQTMGLA.js.map +0 -1
- package/dist/chunk-DBVTSUMT.js.map +0 -1
package/dist/react-types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, ReactNode, JSX } from 'react';
|
|
2
|
-
export { F as FragmentDefinition, a as FragmentDefinitionV2 } from './governance-
|
|
2
|
+
export { F as FragmentDefinition, a as FragmentDefinitionV2 } from './governance-DxdJV6lx.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import './topology/index.js';
|
|
5
5
|
import './types-xJ2xyp_G.js';
|
package/dist/registry.d.ts
CHANGED
|
@@ -212,6 +212,7 @@ declare const registryComponentSchema: z.ZodObject<{
|
|
|
212
212
|
provenance: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
213
213
|
}, "strip", z.ZodTypeAny, {
|
|
214
214
|
status: string;
|
|
215
|
+
provenance: Record<string, unknown>;
|
|
215
216
|
componentId: string;
|
|
216
217
|
name: string;
|
|
217
218
|
publicRef: string;
|
|
@@ -245,7 +246,6 @@ declare const registryComponentSchema: z.ZodObject<{
|
|
|
245
246
|
name: string;
|
|
246
247
|
path?: string | undefined;
|
|
247
248
|
}[];
|
|
248
|
-
provenance: Record<string, unknown>;
|
|
249
249
|
category?: string | undefined;
|
|
250
250
|
contract?: unknown;
|
|
251
251
|
}, {
|
|
@@ -261,6 +261,7 @@ declare const registryComponentSchema: z.ZodObject<{
|
|
|
261
261
|
contentRef: string;
|
|
262
262
|
}[];
|
|
263
263
|
status?: string | undefined;
|
|
264
|
+
provenance?: Record<string, unknown> | undefined;
|
|
264
265
|
category?: string | undefined;
|
|
265
266
|
contract?: unknown;
|
|
266
267
|
tier?: "custom" | "utility" | "composition" | "core" | undefined;
|
|
@@ -285,7 +286,6 @@ declare const registryComponentSchema: z.ZodObject<{
|
|
|
285
286
|
path?: string | undefined;
|
|
286
287
|
kind?: "type" | "utility" | "style" | "component" | "hook" | undefined;
|
|
287
288
|
}[] | undefined;
|
|
288
|
-
provenance?: Record<string, unknown> | undefined;
|
|
289
289
|
}>;
|
|
290
290
|
declare const registryEntrypointSchema: z.ZodObject<{
|
|
291
291
|
specifier: z.ZodString;
|
|
@@ -494,6 +494,7 @@ declare const registryManifestDraftSchema: z.ZodObject<{
|
|
|
494
494
|
provenance: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
495
495
|
}, "strip", z.ZodTypeAny, {
|
|
496
496
|
status: string;
|
|
497
|
+
provenance: Record<string, unknown>;
|
|
497
498
|
componentId: string;
|
|
498
499
|
name: string;
|
|
499
500
|
publicRef: string;
|
|
@@ -527,7 +528,6 @@ declare const registryManifestDraftSchema: z.ZodObject<{
|
|
|
527
528
|
name: string;
|
|
528
529
|
path?: string | undefined;
|
|
529
530
|
}[];
|
|
530
|
-
provenance: Record<string, unknown>;
|
|
531
531
|
category?: string | undefined;
|
|
532
532
|
contract?: unknown;
|
|
533
533
|
}, {
|
|
@@ -543,6 +543,7 @@ declare const registryManifestDraftSchema: z.ZodObject<{
|
|
|
543
543
|
contentRef: string;
|
|
544
544
|
}[];
|
|
545
545
|
status?: string | undefined;
|
|
546
|
+
provenance?: Record<string, unknown> | undefined;
|
|
546
547
|
category?: string | undefined;
|
|
547
548
|
contract?: unknown;
|
|
548
549
|
tier?: "custom" | "utility" | "composition" | "core" | undefined;
|
|
@@ -567,7 +568,6 @@ declare const registryManifestDraftSchema: z.ZodObject<{
|
|
|
567
568
|
path?: string | undefined;
|
|
568
569
|
kind?: "type" | "utility" | "style" | "component" | "hook" | undefined;
|
|
569
570
|
}[] | undefined;
|
|
570
|
-
provenance?: Record<string, unknown> | undefined;
|
|
571
571
|
}>>;
|
|
572
572
|
dependencies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
573
573
|
name: z.ZodString;
|
|
@@ -607,6 +607,7 @@ declare const registryManifestDraftSchema: z.ZodObject<{
|
|
|
607
607
|
}, "strip", z.ZodTypeAny, {
|
|
608
608
|
components: Record<string, {
|
|
609
609
|
status: string;
|
|
610
|
+
provenance: Record<string, unknown>;
|
|
610
611
|
componentId: string;
|
|
611
612
|
name: string;
|
|
612
613
|
publicRef: string;
|
|
@@ -640,7 +641,6 @@ declare const registryManifestDraftSchema: z.ZodObject<{
|
|
|
640
641
|
name: string;
|
|
641
642
|
path?: string | undefined;
|
|
642
643
|
}[];
|
|
643
|
-
provenance: Record<string, unknown>;
|
|
644
644
|
category?: string | undefined;
|
|
645
645
|
contract?: unknown;
|
|
646
646
|
}>;
|
|
@@ -710,6 +710,7 @@ declare const registryManifestDraftSchema: z.ZodObject<{
|
|
|
710
710
|
contentRef: string;
|
|
711
711
|
}[];
|
|
712
712
|
status?: string | undefined;
|
|
713
|
+
provenance?: Record<string, unknown> | undefined;
|
|
713
714
|
category?: string | undefined;
|
|
714
715
|
contract?: unknown;
|
|
715
716
|
tier?: "custom" | "utility" | "composition" | "core" | undefined;
|
|
@@ -734,7 +735,6 @@ declare const registryManifestDraftSchema: z.ZodObject<{
|
|
|
734
735
|
path?: string | undefined;
|
|
735
736
|
kind?: "type" | "utility" | "style" | "component" | "hook" | undefined;
|
|
736
737
|
}[] | undefined;
|
|
737
|
-
provenance?: Record<string, unknown> | undefined;
|
|
738
738
|
}>;
|
|
739
739
|
schemaVersion: "fragments.registry.v1";
|
|
740
740
|
name: string;
|
|
@@ -967,6 +967,7 @@ declare const registryManifestSchema: z.ZodObject<{
|
|
|
967
967
|
provenance: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
968
968
|
}, "strip", z.ZodTypeAny, {
|
|
969
969
|
status: string;
|
|
970
|
+
provenance: Record<string, unknown>;
|
|
970
971
|
componentId: string;
|
|
971
972
|
name: string;
|
|
972
973
|
publicRef: string;
|
|
@@ -1000,7 +1001,6 @@ declare const registryManifestSchema: z.ZodObject<{
|
|
|
1000
1001
|
name: string;
|
|
1001
1002
|
path?: string | undefined;
|
|
1002
1003
|
}[];
|
|
1003
|
-
provenance: Record<string, unknown>;
|
|
1004
1004
|
category?: string | undefined;
|
|
1005
1005
|
contract?: unknown;
|
|
1006
1006
|
}, {
|
|
@@ -1016,6 +1016,7 @@ declare const registryManifestSchema: z.ZodObject<{
|
|
|
1016
1016
|
contentRef: string;
|
|
1017
1017
|
}[];
|
|
1018
1018
|
status?: string | undefined;
|
|
1019
|
+
provenance?: Record<string, unknown> | undefined;
|
|
1019
1020
|
category?: string | undefined;
|
|
1020
1021
|
contract?: unknown;
|
|
1021
1022
|
tier?: "custom" | "utility" | "composition" | "core" | undefined;
|
|
@@ -1040,7 +1041,6 @@ declare const registryManifestSchema: z.ZodObject<{
|
|
|
1040
1041
|
path?: string | undefined;
|
|
1041
1042
|
kind?: "type" | "utility" | "style" | "component" | "hook" | undefined;
|
|
1042
1043
|
}[] | undefined;
|
|
1043
|
-
provenance?: Record<string, unknown> | undefined;
|
|
1044
1044
|
}>>;
|
|
1045
1045
|
dependencies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1046
1046
|
name: z.ZodString;
|
|
@@ -1082,6 +1082,7 @@ declare const registryManifestSchema: z.ZodObject<{
|
|
|
1082
1082
|
}, "strip", z.ZodTypeAny, {
|
|
1083
1083
|
components: Record<string, {
|
|
1084
1084
|
status: string;
|
|
1085
|
+
provenance: Record<string, unknown>;
|
|
1085
1086
|
componentId: string;
|
|
1086
1087
|
name: string;
|
|
1087
1088
|
publicRef: string;
|
|
@@ -1115,7 +1116,6 @@ declare const registryManifestSchema: z.ZodObject<{
|
|
|
1115
1116
|
name: string;
|
|
1116
1117
|
path?: string | undefined;
|
|
1117
1118
|
}[];
|
|
1118
|
-
provenance: Record<string, unknown>;
|
|
1119
1119
|
category?: string | undefined;
|
|
1120
1120
|
contract?: unknown;
|
|
1121
1121
|
}>;
|
|
@@ -1186,6 +1186,7 @@ declare const registryManifestSchema: z.ZodObject<{
|
|
|
1186
1186
|
contentRef: string;
|
|
1187
1187
|
}[];
|
|
1188
1188
|
status?: string | undefined;
|
|
1189
|
+
provenance?: Record<string, unknown> | undefined;
|
|
1189
1190
|
category?: string | undefined;
|
|
1190
1191
|
contract?: unknown;
|
|
1191
1192
|
tier?: "custom" | "utility" | "composition" | "core" | undefined;
|
|
@@ -1210,7 +1211,6 @@ declare const registryManifestSchema: z.ZodObject<{
|
|
|
1210
1211
|
path?: string | undefined;
|
|
1211
1212
|
kind?: "type" | "utility" | "style" | "component" | "hook" | undefined;
|
|
1212
1213
|
}[] | undefined;
|
|
1213
|
-
provenance?: Record<string, unknown> | undefined;
|
|
1214
1214
|
}>;
|
|
1215
1215
|
schemaVersion: "fragments.registry.v1";
|
|
1216
1216
|
name: string;
|
|
@@ -1446,6 +1446,7 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1446
1446
|
provenance: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1447
1447
|
}, "strip", z.ZodTypeAny, {
|
|
1448
1448
|
status: string;
|
|
1449
|
+
provenance: Record<string, unknown>;
|
|
1449
1450
|
componentId: string;
|
|
1450
1451
|
name: string;
|
|
1451
1452
|
publicRef: string;
|
|
@@ -1479,7 +1480,6 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1479
1480
|
name: string;
|
|
1480
1481
|
path?: string | undefined;
|
|
1481
1482
|
}[];
|
|
1482
|
-
provenance: Record<string, unknown>;
|
|
1483
1483
|
category?: string | undefined;
|
|
1484
1484
|
contract?: unknown;
|
|
1485
1485
|
}, {
|
|
@@ -1495,6 +1495,7 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1495
1495
|
contentRef: string;
|
|
1496
1496
|
}[];
|
|
1497
1497
|
status?: string | undefined;
|
|
1498
|
+
provenance?: Record<string, unknown> | undefined;
|
|
1498
1499
|
category?: string | undefined;
|
|
1499
1500
|
contract?: unknown;
|
|
1500
1501
|
tier?: "custom" | "utility" | "composition" | "core" | undefined;
|
|
@@ -1519,7 +1520,6 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1519
1520
|
path?: string | undefined;
|
|
1520
1521
|
kind?: "type" | "utility" | "style" | "component" | "hook" | undefined;
|
|
1521
1522
|
}[] | undefined;
|
|
1522
|
-
provenance?: Record<string, unknown> | undefined;
|
|
1523
1523
|
}>>;
|
|
1524
1524
|
dependencies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1525
1525
|
name: z.ZodString;
|
|
@@ -1561,6 +1561,7 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1561
1561
|
}, "strip", z.ZodTypeAny, {
|
|
1562
1562
|
components: Record<string, {
|
|
1563
1563
|
status: string;
|
|
1564
|
+
provenance: Record<string, unknown>;
|
|
1564
1565
|
componentId: string;
|
|
1565
1566
|
name: string;
|
|
1566
1567
|
publicRef: string;
|
|
@@ -1594,7 +1595,6 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1594
1595
|
name: string;
|
|
1595
1596
|
path?: string | undefined;
|
|
1596
1597
|
}[];
|
|
1597
|
-
provenance: Record<string, unknown>;
|
|
1598
1598
|
category?: string | undefined;
|
|
1599
1599
|
contract?: unknown;
|
|
1600
1600
|
}>;
|
|
@@ -1665,6 +1665,7 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1665
1665
|
contentRef: string;
|
|
1666
1666
|
}[];
|
|
1667
1667
|
status?: string | undefined;
|
|
1668
|
+
provenance?: Record<string, unknown> | undefined;
|
|
1668
1669
|
category?: string | undefined;
|
|
1669
1670
|
contract?: unknown;
|
|
1670
1671
|
tier?: "custom" | "utility" | "composition" | "core" | undefined;
|
|
@@ -1689,7 +1690,6 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1689
1690
|
path?: string | undefined;
|
|
1690
1691
|
kind?: "type" | "utility" | "style" | "component" | "hook" | undefined;
|
|
1691
1692
|
}[] | undefined;
|
|
1692
|
-
provenance?: Record<string, unknown> | undefined;
|
|
1693
1693
|
}>;
|
|
1694
1694
|
schemaVersion: "fragments.registry.v1";
|
|
1695
1695
|
name: string;
|
|
@@ -1769,6 +1769,7 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1769
1769
|
manifest: {
|
|
1770
1770
|
components: Record<string, {
|
|
1771
1771
|
status: string;
|
|
1772
|
+
provenance: Record<string, unknown>;
|
|
1772
1773
|
componentId: string;
|
|
1773
1774
|
name: string;
|
|
1774
1775
|
publicRef: string;
|
|
@@ -1802,7 +1803,6 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1802
1803
|
name: string;
|
|
1803
1804
|
path?: string | undefined;
|
|
1804
1805
|
}[];
|
|
1805
|
-
provenance: Record<string, unknown>;
|
|
1806
1806
|
category?: string | undefined;
|
|
1807
1807
|
contract?: unknown;
|
|
1808
1808
|
}>;
|
|
@@ -1883,6 +1883,7 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1883
1883
|
contentRef: string;
|
|
1884
1884
|
}[];
|
|
1885
1885
|
status?: string | undefined;
|
|
1886
|
+
provenance?: Record<string, unknown> | undefined;
|
|
1886
1887
|
category?: string | undefined;
|
|
1887
1888
|
contract?: unknown;
|
|
1888
1889
|
tier?: "custom" | "utility" | "composition" | "core" | undefined;
|
|
@@ -1907,7 +1908,6 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1907
1908
|
path?: string | undefined;
|
|
1908
1909
|
kind?: "type" | "utility" | "style" | "component" | "hook" | undefined;
|
|
1909
1910
|
}[] | undefined;
|
|
1910
|
-
provenance?: Record<string, unknown> | undefined;
|
|
1911
1911
|
}>;
|
|
1912
1912
|
schemaVersion: "fragments.registry.v1";
|
|
1913
1913
|
name: string;
|
|
@@ -1975,6 +1975,7 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1975
1975
|
manifest: {
|
|
1976
1976
|
components: Record<string, {
|
|
1977
1977
|
status: string;
|
|
1978
|
+
provenance: Record<string, unknown>;
|
|
1978
1979
|
componentId: string;
|
|
1979
1980
|
name: string;
|
|
1980
1981
|
publicRef: string;
|
|
@@ -2008,7 +2009,6 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2008
2009
|
name: string;
|
|
2009
2010
|
path?: string | undefined;
|
|
2010
2011
|
}[];
|
|
2011
|
-
provenance: Record<string, unknown>;
|
|
2012
2012
|
category?: string | undefined;
|
|
2013
2013
|
contract?: unknown;
|
|
2014
2014
|
}>;
|
|
@@ -2089,6 +2089,7 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2089
2089
|
contentRef: string;
|
|
2090
2090
|
}[];
|
|
2091
2091
|
status?: string | undefined;
|
|
2092
|
+
provenance?: Record<string, unknown> | undefined;
|
|
2092
2093
|
category?: string | undefined;
|
|
2093
2094
|
contract?: unknown;
|
|
2094
2095
|
tier?: "custom" | "utility" | "composition" | "core" | undefined;
|
|
@@ -2113,7 +2114,6 @@ declare const registryArtifactSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2113
2114
|
path?: string | undefined;
|
|
2114
2115
|
kind?: "type" | "utility" | "style" | "component" | "hook" | undefined;
|
|
2115
2116
|
}[] | undefined;
|
|
2116
|
-
provenance?: Record<string, unknown> | undefined;
|
|
2117
2117
|
}>;
|
|
2118
2118
|
schemaVersion: "fragments.registry.v1";
|
|
2119
2119
|
name: string;
|