@mich8060/unified-design-system 0.2.11 → 0.2.14

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.
Files changed (191) hide show
  1. package/README.md +8 -0
  2. package/dist/ai/audit/auditLogger.cjs +2 -0
  3. package/dist/ai/audit/auditLogger.js +2 -0
  4. package/dist/ai/discovery.json +33 -0
  5. package/dist/ai/examples/index.cjs +1 -0
  6. package/dist/ai/examples/index.js +1 -0
  7. package/dist/ai/examples/training.examples.cjs +1 -0
  8. package/dist/ai/examples/training.examples.js +1 -0
  9. package/dist/ai/examples/trees.example.cjs +1 -0
  10. package/dist/ai/examples/trees.example.js +1 -0
  11. package/dist/ai/examples/validation-run.example.cjs +1 -0
  12. package/dist/ai/examples/validation-run.example.js +1 -0
  13. package/dist/ai/index.cjs +1 -0
  14. package/dist/ai/index.js +1 -0
  15. package/dist/ai/manifest/components.manifest.cjs +1 -0
  16. package/dist/ai/manifest/components.manifest.js +1 -0
  17. package/dist/ai/manifest/composition.manifest.cjs +1 -0
  18. package/dist/ai/manifest/composition.manifest.js +1 -0
  19. package/dist/ai/manifest/governance.manifest.cjs +1 -0
  20. package/dist/ai/manifest/governance.manifest.js +1 -0
  21. package/dist/ai/manifest/index.cjs +1 -0
  22. package/dist/ai/manifest/index.js +1 -0
  23. package/dist/ai/manifest/layout.manifest.cjs +1 -0
  24. package/dist/ai/manifest/layout.manifest.js +1 -0
  25. package/dist/ai/manifest/patterns.manifest.cjs +1 -0
  26. package/dist/ai/manifest/patterns.manifest.js +1 -0
  27. package/dist/ai/manifest/prop-aliases.manifest.cjs +1 -0
  28. package/dist/ai/manifest/prop-aliases.manifest.js +1 -0
  29. package/dist/ai/manifest/system.manifest.cjs +1 -0
  30. package/dist/ai/manifest/system.manifest.js +1 -0
  31. package/dist/ai/manifest/tokens.intent.manifest.cjs +1 -0
  32. package/dist/ai/manifest/tokens.intent.manifest.js +1 -0
  33. package/dist/ai/manifest.json +2801 -0
  34. package/dist/ai/policies/policy.engine.cjs +1 -0
  35. package/dist/ai/policies/policy.engine.js +1 -0
  36. package/dist/ai/policies/rules/accessibility.rules.cjs +1 -0
  37. package/dist/ai/policies/rules/accessibility.rules.js +1 -0
  38. package/dist/ai/policies/rules/action.rules.cjs +1 -0
  39. package/dist/ai/policies/rules/action.rules.js +1 -0
  40. package/dist/ai/policies/rules/composition.rules.cjs +1 -0
  41. package/dist/ai/policies/rules/composition.rules.js +1 -0
  42. package/dist/ai/policies/rules/props.rules.cjs +1 -0
  43. package/dist/ai/policies/rules/props.rules.js +1 -0
  44. package/dist/ai/policies/rules/spacing.rules.cjs +1 -0
  45. package/dist/ai/policies/rules/spacing.rules.js +1 -0
  46. package/dist/ai/schemas/ai-output.schema.json +71 -0
  47. package/dist/ai/sdk/index.cjs +1 -0
  48. package/dist/ai/sdk/index.js +1 -0
  49. package/dist/ai/sdk/runtime-sdk.cjs +2 -0
  50. package/dist/ai/sdk/runtime-sdk.js +2 -0
  51. package/dist/ai/telemetry/usageMetrics.cjs +1 -0
  52. package/dist/ai/telemetry/usageMetrics.js +1 -0
  53. package/dist/ai/templates/layouts.json +181 -0
  54. package/dist/ai/validation/deterministicFeedback.cjs +1 -0
  55. package/dist/ai/validation/deterministicFeedback.js +1 -0
  56. package/dist/ai/validation/driftDetection.cjs +1 -0
  57. package/dist/ai/validation/driftDetection.js +1 -0
  58. package/dist/ai/validation/index.cjs +1 -0
  59. package/dist/ai/validation/index.js +1 -0
  60. package/dist/ai/validation/schemaValidation.cjs +1 -0
  61. package/dist/ai/validation/schemaValidation.js +1 -0
  62. package/dist/ai/validation/validateAIOutput.cjs +1 -0
  63. package/dist/ai/validation/validateAIOutput.js +1 -0
  64. package/dist/ai/validation/validateTree.cjs +1 -0
  65. package/dist/ai/validation/validateTree.js +1 -0
  66. package/dist/components/Breadcrumb/Breadcrumb.cjs +1 -1
  67. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  68. package/dist/components/Button/Button.cjs +1 -1
  69. package/dist/components/Button/Button.js +1 -1
  70. package/dist/components/Chip/Chip.cjs +1 -1
  71. package/dist/components/Chip/Chip.js +1 -1
  72. package/dist/components/Dialog/Dialog.cjs +1 -1
  73. package/dist/components/Dialog/Dialog.js +1 -1
  74. package/dist/components/DotStatus/DotStatus.cjs +1 -1
  75. package/dist/components/DotStatus/DotStatus.js +1 -1
  76. package/dist/components/EmptyState/EmptyState.cjs +1 -1
  77. package/dist/components/EmptyState/EmptyState.js +1 -1
  78. package/dist/components/Field/Field.cjs +1 -1
  79. package/dist/components/Field/Field.js +1 -1
  80. package/dist/components/FileUpload/FileUpload.cjs +1 -1
  81. package/dist/components/FileUpload/FileUpload.js +1 -1
  82. package/dist/components/Menu/Menu.cjs +1 -1
  83. package/dist/components/Menu/Menu.js +1 -1
  84. package/dist/components/Modal/Modal.cjs +1 -1
  85. package/dist/components/Modal/Modal.js +1 -1
  86. package/dist/components/Pagination/Pagination.cjs +1 -1
  87. package/dist/components/Pagination/Pagination.js +1 -1
  88. package/dist/components/ProgressCircle/ProgressCircle.cjs +1 -1
  89. package/dist/components/ProgressCircle/ProgressCircle.js +1 -1
  90. package/dist/components/ProgressIndicator/ProgressIndicator.cjs +1 -1
  91. package/dist/components/ProgressIndicator/ProgressIndicator.js +1 -1
  92. package/dist/components/Steps/Steps.cjs +1 -1
  93. package/dist/components/Steps/Steps.js +1 -1
  94. package/dist/components/Text/Text.cjs +1 -1
  95. package/dist/components/Text/Text.js +1 -1
  96. package/dist/components/Tooltip/Tooltip.cjs +1 -1
  97. package/dist/components/Tooltip/Tooltip.js +1 -1
  98. package/dist/design-system/ai/audit/audit.types.d.ts +23 -0
  99. package/dist/design-system/ai/audit/auditLogger.d.ts +2 -0
  100. package/dist/design-system/ai/examples/index.d.ts +4 -0
  101. package/dist/design-system/ai/examples/training.examples.d.ts +22 -0
  102. package/dist/design-system/ai/examples/trees.example.d.ts +3 -0
  103. package/dist/design-system/ai/examples/validation-run.example.d.ts +3 -0
  104. package/dist/design-system/ai/index.d.ts +45 -0
  105. package/dist/design-system/ai/manifest/components.manifest.d.ts +2 -0
  106. package/dist/design-system/ai/manifest/composition.manifest.d.ts +11 -0
  107. package/dist/design-system/ai/manifest/governance.manifest.d.ts +10 -0
  108. package/dist/design-system/ai/manifest/index.d.ts +9 -0
  109. package/dist/design-system/ai/manifest/layout.manifest.d.ts +2 -0
  110. package/dist/design-system/ai/manifest/patterns.manifest.d.ts +2 -0
  111. package/dist/design-system/ai/manifest/prop-aliases.manifest.d.ts +10 -0
  112. package/dist/design-system/ai/manifest/system.manifest.d.ts +5 -0
  113. package/dist/design-system/ai/manifest/tokens.intent.manifest.d.ts +2 -0
  114. package/dist/design-system/ai/manifest/types.d.ts +136 -0
  115. package/dist/design-system/ai/policies/policy.engine.d.ts +3 -0
  116. package/dist/design-system/ai/policies/policy.types.d.ts +14 -0
  117. package/dist/design-system/ai/policies/rules/accessibility.rules.d.ts +2 -0
  118. package/dist/design-system/ai/policies/rules/action.rules.d.ts +2 -0
  119. package/dist/design-system/ai/policies/rules/composition.rules.d.ts +2 -0
  120. package/dist/design-system/ai/policies/rules/props.rules.d.ts +2 -0
  121. package/dist/design-system/ai/policies/rules/spacing.rules.d.ts +2 -0
  122. package/dist/design-system/ai/sdk/index.d.ts +1 -0
  123. package/dist/design-system/ai/sdk/runtime-sdk.d.ts +21 -0
  124. package/dist/design-system/ai/telemetry/usageMetrics.d.ts +9 -0
  125. package/dist/design-system/ai/validation/deterministicFeedback.d.ts +15 -0
  126. package/dist/design-system/ai/validation/driftDetection.d.ts +3 -0
  127. package/dist/design-system/ai/validation/index.d.ts +5 -0
  128. package/dist/design-system/ai/validation/schemaValidation.d.ts +7 -0
  129. package/dist/design-system/ai/validation/validateAIOutput.d.ts +25 -0
  130. package/dist/design-system/ai/validation/validateTree.d.ts +2 -0
  131. package/dist/design-system/components/Button/Button.d.ts +1 -1
  132. package/dist/design-system/components/Button/Button.types.d.ts +1 -0
  133. package/dist/design-system/components/Chip/Chip.d.ts +4 -3
  134. package/dist/design-system/components/Chip/Chip.types.d.ts +13 -9
  135. package/dist/design-system/components/Dialog/Dialog.types.d.ts +9 -8
  136. package/dist/design-system/components/Field/Field.d.ts +1 -1
  137. package/dist/design-system/components/Field/Field.types.d.ts +11 -9
  138. package/dist/design-system/components/FileUpload/FileUpload.d.ts +1 -1
  139. package/dist/design-system/components/FileUpload/FileUpload.types.d.ts +2 -0
  140. package/dist/design-system/components/Pagination/Pagination.d.ts +5 -3
  141. package/dist/design-system/components/Pagination/Pagination.types.d.ts +4 -1
  142. package/dist/design-system/components/ProgressCircle/ProgressCircle.d.ts +3 -2
  143. package/dist/design-system/components/ProgressCircle/ProgressCircle.types.d.ts +7 -3
  144. package/dist/design-system/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
  145. package/dist/design-system/components/ProgressIndicator/ProgressIndicator.types.d.ts +8 -4
  146. package/dist/design-system/components/Tooltip/Tooltip.d.ts +1 -1
  147. package/dist/design-system/components/Tooltip/Tooltip.types.d.ts +1 -0
  148. package/dist/design-system/generated/component-api.d.ts +1568 -0
  149. package/dist/design-system/index.d.ts +1 -2
  150. package/dist/design-system/tokens/runtime/color.d.ts +40 -0
  151. package/dist/design-system/tokens/runtime/generateCss.d.ts +2 -0
  152. package/dist/design-system/tokens/runtime/index.d.ts +476 -0
  153. package/dist/design-system/tokens/runtime/motion.d.ts +14 -0
  154. package/dist/design-system/tokens/runtime/radius.d.ts +14 -0
  155. package/dist/design-system/tokens/runtime/shadow.d.ts +22 -0
  156. package/dist/design-system/tokens/runtime/spacing.d.ts +21 -0
  157. package/dist/design-system/tokens/runtime/types.d.ts +21 -0
  158. package/dist/design-system/tokens/runtime/typography.d.ts +87 -0
  159. package/dist/design-system/version.d.ts +1 -0
  160. package/dist/generated/component-api.cjs +1 -0
  161. package/dist/generated/component-api.js +1 -0
  162. package/dist/index.cjs +1 -1
  163. package/dist/index.js +1 -1
  164. package/dist/style.css +1 -1
  165. package/dist/tokens/index.d.ts +1 -0
  166. package/dist/tokens/index.js +1 -0
  167. package/dist/tokens/runtime/color.cjs +1 -0
  168. package/dist/tokens/runtime/color.js +1 -0
  169. package/dist/tokens/runtime/index.cjs +1 -0
  170. package/dist/tokens/runtime/index.js +1 -0
  171. package/dist/tokens/runtime/radius.cjs +1 -0
  172. package/dist/tokens/runtime/radius.js +1 -0
  173. package/dist/tokens/runtime/spacing.cjs +1 -0
  174. package/dist/tokens/runtime/spacing.js +1 -0
  175. package/dist/version.cjs +1 -0
  176. package/dist/version.js +1 -0
  177. package/package.json +74 -14
  178. package/dist/components/PillToggle/PillToggle.cjs +0 -1
  179. package/dist/components/PillToggle/PillToggle.js +0 -1
  180. package/dist/components/Playground/Playground.cjs +0 -9
  181. package/dist/components/Playground/Playground.js +0 -9
  182. package/dist/components/Text/Text.spec.cjs +0 -1
  183. package/dist/components/Text/Text.spec.js +0 -1
  184. package/dist/design-system/components/PillToggle/PillToggle.d.ts +0 -13
  185. package/dist/design-system/components/PillToggle/PillToggle.types.d.ts +0 -9
  186. package/dist/design-system/components/PillToggle/index.d.ts +0 -3
  187. package/dist/design-system/components/Playground/Playground.d.ts +0 -12
  188. package/dist/design-system/components/Playground/Playground.types.d.ts +0 -7
  189. package/dist/design-system/components/Playground/index.d.ts +0 -3
  190. package/dist/design-system/components/Text/Text.spec.d.ts +0 -2
  191. package/dist/design-system/specs/spec.types.d.ts +0 -18
@@ -0,0 +1,10 @@
1
+ import type { GovernanceConfig, VersionLineage } from "./types";
2
+ export declare const AI_MANIFEST_VERSION = "1.0.0";
3
+ export declare const AI_GOVERNANCE_VERSION = "1.0.0";
4
+ export declare const AI_POLICY_VERSION = "1.0.0";
5
+ export declare const AI_CONTRACT_SCHEMA_VERSION = "1.0.0";
6
+ export declare const AI_COMPONENT_API_SCHEMA_VERSION = "1.0.0";
7
+ export declare const AI_SCHEMA_VERSION = "1.0.0";
8
+ export declare const AI_API_SCHEMA_VERSION = "1.0.0";
9
+ export declare const UDSGovernance: GovernanceConfig;
10
+ export declare function getVersionLineage(): VersionLineage;
@@ -0,0 +1,9 @@
1
+ export { UDSManifest, UDS_AI_MANIFEST } from "./system.manifest";
2
+ export { UDSGovernance, getVersionLineage, AI_MANIFEST_VERSION, AI_GOVERNANCE_VERSION, AI_POLICY_VERSION, AI_CONTRACT_SCHEMA_VERSION, AI_COMPONENT_API_SCHEMA_VERSION, AI_SCHEMA_VERSION, AI_API_SCHEMA_VERSION, } from "./governance.manifest";
3
+ export { ComponentRegistry } from "./components.manifest";
4
+ export { PatternRegistry } from "./patterns.manifest";
5
+ export { LayoutRules } from "./layout.manifest";
6
+ export { CompositionRules } from "./composition.manifest";
7
+ export { PropAliasRules, getCanonicalPropName, getAliasEntries } from "./prop-aliases.manifest";
8
+ export { TokenIntentMap } from "./tokens.intent.manifest";
9
+ export type { ComponentManifestItem, ComponentRegistryType, LayoutManifestRules, ManifestGovernance, PatternManifestItem, PatternRegistryType, TokenIntentMapType, UDSManifestType, UINodeTree, ValidationError, ValidationResult, GovernanceConfig, VersionLineage, } from "./types";
@@ -0,0 +1,2 @@
1
+ import type { LayoutManifestRules } from "./types";
2
+ export declare const LayoutRules: LayoutManifestRules;
@@ -0,0 +1,2 @@
1
+ import type { PatternRegistryType } from "./types";
2
+ export declare const PatternRegistry: PatternRegistryType;
@@ -0,0 +1,10 @@
1
+ export interface PropAliasManifest {
2
+ global: Record<string, string>;
3
+ byComponent: Record<string, Record<string, string>>;
4
+ }
5
+ export declare const PropAliasRules: PropAliasManifest;
6
+ export declare function getCanonicalPropName(componentName: string, propName: string): string;
7
+ export declare function getAliasEntries(componentName: string): Array<{
8
+ alias: string;
9
+ canonical: string;
10
+ }>;
@@ -0,0 +1,5 @@
1
+ import type { UDSManifestType } from "./types";
2
+ export declare const UDSManifest: UDSManifestType;
3
+ export declare const UDSAIContract: UDSManifestType;
4
+ export declare const UDS_AI_CONTRACT: UDSManifestType;
5
+ export declare const UDS_AI_MANIFEST: UDSManifestType;
@@ -0,0 +1,2 @@
1
+ import type { TokenIntentMapType } from "./types";
2
+ export declare const TokenIntentMap: TokenIntentMapType;
@@ -0,0 +1,136 @@
1
+ export interface ManifestGovernance {
2
+ maxPrimaryActionsPerSection: number;
3
+ spacingUnit: number;
4
+ defaultRadius: string;
5
+ }
6
+ export interface ComponentSlotMeta {
7
+ required: boolean;
8
+ description?: string;
9
+ }
10
+ export interface ComponentManifestItem {
11
+ name: string;
12
+ category: string;
13
+ intent: string;
14
+ priority?: string;
15
+ variants: string[];
16
+ sizes?: string[];
17
+ slots?: Record<string, ComponentSlotMeta>;
18
+ usage: {
19
+ preferredContexts: string[];
20
+ maxPerSection?: number;
21
+ };
22
+ constraints?: {
23
+ onlyOnePrimaryPerSection?: boolean;
24
+ allowedChildren?: string[];
25
+ disallowedChildren?: string[];
26
+ };
27
+ accessibility?: {
28
+ role: string;
29
+ keyboardSupport: string[];
30
+ };
31
+ tokenDependencies: string[];
32
+ }
33
+ export type ComponentRegistryType = Record<string, ComponentManifestItem>;
34
+ export interface PatternStructureNode {
35
+ type: string;
36
+ role?: string;
37
+ props?: Record<string, unknown>;
38
+ }
39
+ export interface PatternManifestItem {
40
+ name: string;
41
+ layout: "vertical" | "horizontal" | "grid";
42
+ requiredComponents: string[];
43
+ structure: PatternStructureNode[];
44
+ spacing: string;
45
+ widthConstraint?: string;
46
+ rules?: Record<string, unknown>;
47
+ }
48
+ export type PatternRegistryType = Record<string, PatternManifestItem>;
49
+ export interface LayoutManifestRules {
50
+ spacingSystem: {
51
+ unit: number;
52
+ allowedTokens: string[];
53
+ defaultToken: string;
54
+ };
55
+ verticalRhythm: {
56
+ sectionGapToken: string;
57
+ contentGapToken: string;
58
+ compactGapToken: string;
59
+ };
60
+ allowedComposition: Record<string, string[]>;
61
+ allowedParents: Record<string, string[]>;
62
+ disallowedNesting: Array<{
63
+ parent: string;
64
+ child: string;
65
+ }>;
66
+ maxWidth: {
67
+ content: string;
68
+ form: string;
69
+ dialog: string;
70
+ };
71
+ actionPlacement: {
72
+ primaryActionPosition: "end";
73
+ secondaryActionPosition: "start" | "end";
74
+ maxPrimaryActionsPerSection: number;
75
+ };
76
+ }
77
+ export interface TokenIntentMapType {
78
+ surface: Record<string, string>;
79
+ action: Record<string, string>;
80
+ text: Record<string, string>;
81
+ border: Record<string, string>;
82
+ state: Record<string, string>;
83
+ }
84
+ export interface UDSManifestType {
85
+ version: string;
86
+ tokenVersion: string;
87
+ components: ComponentRegistryType;
88
+ patterns: PatternRegistryType;
89
+ layout: LayoutManifestRules;
90
+ tokens: TokenIntentMapType;
91
+ governance: ManifestGovernance;
92
+ }
93
+ export interface ValidationError {
94
+ code: "MAX_PRIMARY_ACTIONS" | "INVALID_COMPOSITION" | "INVALID_SPACING_TOKEN" | "DISALLOWED_NESTING";
95
+ path: string;
96
+ message: string;
97
+ meta?: Record<string, unknown>;
98
+ }
99
+ export interface ValidationResult {
100
+ valid: boolean;
101
+ errors: ValidationError[];
102
+ }
103
+ export interface UINodeTree {
104
+ type: string;
105
+ props?: Record<string, unknown>;
106
+ children?: UINodeTree[];
107
+ }
108
+ export interface GovernanceConfig {
109
+ systemVersion: string;
110
+ tokenVersion: string;
111
+ manifestVersion: string;
112
+ governanceVersion: string;
113
+ policyVersion: string;
114
+ enforcement: {
115
+ strictMode: boolean;
116
+ allowAdHocValues: boolean;
117
+ allowInlineStyles: boolean;
118
+ allowUnknownComponents: boolean;
119
+ };
120
+ limits: {
121
+ maxPrimaryActionsPerSection: number;
122
+ maxActionsPerToolbar: number;
123
+ maxNestingDepth: number;
124
+ };
125
+ compliance: {
126
+ accessibilityStandard: string;
127
+ spacingUnit: number;
128
+ };
129
+ }
130
+ export interface VersionLineage {
131
+ udsVersion: string;
132
+ tokenVersion: string;
133
+ manifestVersion: string;
134
+ governanceVersion: string;
135
+ policyVersion: string;
136
+ }
@@ -0,0 +1,3 @@
1
+ import type { GovernanceConfig, UINodeTree } from "../manifest/types";
2
+ import type { PolicyViolation } from "./policy.types";
3
+ export declare function runPolicyEngine(tree: UINodeTree, governanceConfig?: GovernanceConfig): PolicyViolation[];
@@ -0,0 +1,14 @@
1
+ import type { GovernanceConfig, UINodeTree } from "../manifest/types";
2
+ export interface PolicyViolation {
3
+ severity: "error" | "warning";
4
+ code: string;
5
+ message: string;
6
+ path: string;
7
+ component?: string;
8
+ token?: string;
9
+ }
10
+ export interface PolicyRuleContext {
11
+ tree: UINodeTree;
12
+ governanceConfig: GovernanceConfig;
13
+ }
14
+ export type PolicyRule = (context: PolicyRuleContext) => PolicyViolation[];
@@ -0,0 +1,2 @@
1
+ import type { PolicyRule } from "../policy.types";
2
+ export declare const enforceAccessibilityRule: PolicyRule;
@@ -0,0 +1,2 @@
1
+ import type { PolicyRule } from "../policy.types";
2
+ export declare const enforcePrimaryActionLimitRule: PolicyRule;
@@ -0,0 +1,2 @@
1
+ import type { PolicyRule } from "../policy.types";
2
+ export declare const enforceCompositionRule: PolicyRule;
@@ -0,0 +1,2 @@
1
+ import type { PolicyRule } from "../policy.types";
2
+ export declare const enforceCanonicalPropsRule: PolicyRule;
@@ -0,0 +1,2 @@
1
+ import type { PolicyRule } from "../policy.types";
2
+ export declare const enforceSpacingTokenRule: PolicyRule;
@@ -0,0 +1 @@
1
+ export { createUDSRuntimeHelperSDK, type UDSRuntimeHelperSDK, type CreateUDSRuntimeHelperSDKOptions, type CanonicalizedPropsResult, } from "./runtime-sdk";
@@ -0,0 +1,21 @@
1
+ import { ComponentRegistry } from "../manifest/components.manifest";
2
+ import { UDSManifest } from "../manifest/system.manifest";
3
+ import type { GovernanceConfig, VersionLineage } from "../manifest/types";
4
+ import { type AIValidationResult } from "../validation/validateAIOutput";
5
+ export interface CanonicalizedPropsResult {
6
+ canonicalProps: Record<string, unknown>;
7
+ aliasesApplied: Record<string, string>;
8
+ }
9
+ export interface UDSRuntimeHelperSDK {
10
+ readonly governance: GovernanceConfig;
11
+ getVersionLineage(): VersionLineage;
12
+ getManifest(): typeof UDSManifest;
13
+ getComponent(componentName: string): (typeof ComponentRegistry)[string] | undefined;
14
+ canonicalizeProps(componentName: string, props: Record<string, unknown>): CanonicalizedPropsResult;
15
+ validate(output: unknown): AIValidationResult;
16
+ validateOrThrow(output: unknown): AIValidationResult;
17
+ }
18
+ export interface CreateUDSRuntimeHelperSDKOptions {
19
+ governance?: GovernanceConfig;
20
+ }
21
+ export declare function createUDSRuntimeHelperSDK(options?: CreateUDSRuntimeHelperSDKOptions): UDSRuntimeHelperSDK;
@@ -0,0 +1,9 @@
1
+ export interface UsageMetric {
2
+ metricType: "component_used" | "rule_violation" | "token_override" | "strict_mode_failure";
3
+ name: string;
4
+ value?: number;
5
+ timestamp?: string;
6
+ }
7
+ export declare function recordUsageMetric(metric: UsageMetric): void;
8
+ export declare function getUsageMetrics(): Record<string, number>;
9
+ export declare function resetUsageMetrics(): void;
@@ -0,0 +1,15 @@
1
+ import type { PolicyViolation } from "../policies/policy.types";
2
+ export interface DeterministicViolationFeedback {
3
+ id: string;
4
+ code: string;
5
+ path: string;
6
+ message: string;
7
+ fix: string;
8
+ severity: "error" | "warning";
9
+ }
10
+ export declare function sortAndDedupeViolations(violations: PolicyViolation[]): PolicyViolation[];
11
+ export declare function buildDeterministicFeedback(violations: PolicyViolation[]): {
12
+ fingerprint: string;
13
+ summary: string;
14
+ items: DeterministicViolationFeedback[];
15
+ };
@@ -0,0 +1,3 @@
1
+ import type { UINodeTree } from "../manifest/types";
2
+ import type { PolicyViolation } from "../policies/policy.types";
3
+ export declare function detectDrift(tree: UINodeTree): PolicyViolation[];
@@ -0,0 +1,5 @@
1
+ export { validateTree } from "./validateTree";
2
+ export { validateSchema } from "./schemaValidation";
3
+ export { detectDrift } from "./driftDetection";
4
+ export { validateAIOutput } from "./validateAIOutput";
5
+ export { buildDeterministicFeedback, sortAndDedupeViolations } from "./deterministicFeedback";
@@ -0,0 +1,7 @@
1
+ import type { UINodeTree } from "../manifest/types";
2
+ import type { PolicyViolation } from "../policies/policy.types";
3
+ export declare function validateSchema(output: unknown): {
4
+ valid: boolean;
5
+ violations: PolicyViolation[];
6
+ tree?: UINodeTree;
7
+ };
@@ -0,0 +1,25 @@
1
+ import type { GovernanceConfig, VersionLineage } from "../manifest/types";
2
+ import type { PolicyViolation } from "../policies/policy.types";
3
+ export interface AIValidationResult {
4
+ status: "pass" | "fail";
5
+ violations: PolicyViolation[];
6
+ warnings: PolicyViolation[];
7
+ deterministicFeedback?: {
8
+ fingerprint: string;
9
+ summary: string;
10
+ items: Array<{
11
+ id: string;
12
+ code: string;
13
+ path: string;
14
+ message: string;
15
+ fix: string;
16
+ severity: "error" | "warning";
17
+ }>;
18
+ };
19
+ governanceVersionUsed: string;
20
+ manifestVersionUsed: string;
21
+ policyVersionUsed: string;
22
+ timestamp: string;
23
+ versionLineage: VersionLineage;
24
+ }
25
+ export declare function validateAIOutput(output: unknown, governanceConfig?: GovernanceConfig): AIValidationResult;
@@ -0,0 +1,2 @@
1
+ import type { UINodeTree, ValidationResult } from "../manifest/types";
2
+ export declare function validateTree(tree: UINodeTree): ValidationResult;
@@ -1,3 +1,3 @@
1
1
  import type { ButtonProps } from "./Button.types";
2
2
  import "./_button.scss";
3
- export default function Button({ label, appearance, layout, size, icon, iconSize, icons, children, tracking, className, onClick, disabled, "aria-label": ariaLabel, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
3
+ export default function Button({ label, appearance, layout, size, icon, iconSize, icons, children, tracking, loading, className, onClick, disabled, "aria-label": ariaLabel, ...rest }: ButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -13,4 +13,5 @@ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement
13
13
  icons?: ReactNode;
14
14
  children?: ReactNode;
15
15
  tracking?: ButtonTracking;
16
+ loading?: boolean;
16
17
  }
@@ -3,8 +3,9 @@ import type { ChipProps } from "./Chip.types";
3
3
  /**
4
4
  * Chip component for displaying labels, tags, or filters
5
5
  * @param {string} label - The text content of the chip
6
- * @param {string} appearance - Visual style variant: 'outline' or 'primary'
7
- * @param {string} shape - Shape variant: 'pill' (fully rounded) or 'rounded' (slightly rounded)
6
+ * @param {boolean} selected - Selected state (unselected by default)
7
+ * @param {boolean} rounded - Shape toggle: true (fully rounded), false (less rounded)
8
+ * @param {string} size - Size variant: 'default' or 'compact'
8
9
  * @param {string} iconPlacement - Icon placement: 'both', 'left', 'right', or 'none'
9
10
  * @param {string} icon - Icon name to display (when iconPlacement is not 'none')
10
11
  * @param {number|string} badge - Badge count to display
@@ -14,4 +15,4 @@ import type { ChipProps } from "./Chip.types";
14
15
  * @param {boolean} disabled - Whether the chip is disabled
15
16
  * @param {object} props - Additional props to pass to the chip element
16
17
  */
17
- export default function Chip({ label, appearance, shape, iconPlacement, icon, badge, badgeVariant, className, onClick, disabled, ...props }: ChipProps): import("react/jsx-runtime").JSX.Element;
18
+ export default function Chip({ label, selected, rounded, size, iconPlacement, icon, badge, badgeVariant, className, onClick, disabled, ...props }: ChipProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,17 @@
1
- import type { HTMLAttributes, ReactNode } from "react";
2
- export interface ChipProps extends HTMLAttributes<HTMLDivElement> {
3
- label?: unknown;
4
- appearance?: string;
5
- shape?: string;
6
- iconPlacement?: string;
1
+ import type { HTMLAttributes, MouseEventHandler, ReactNode } from "react";
2
+ import type { BadgeVariant } from "../Badge/Badge.types";
3
+ export type ChipSize = "default" | "compact";
4
+ export type ChipIconPlacement = "both" | "left" | "right" | "none";
5
+ export interface ChipProps extends HTMLAttributes<HTMLElement> {
6
+ label?: ReactNode;
7
+ selected?: boolean;
8
+ rounded?: boolean;
9
+ size?: ChipSize;
10
+ iconPlacement?: ChipIconPlacement;
7
11
  icon?: string | ReactNode;
8
- badge?: unknown;
9
- badgeVariant?: string;
12
+ badge?: number | string;
13
+ badgeVariant?: BadgeVariant;
10
14
  className?: string;
11
- onClick?: (...args: unknown[]) => void;
15
+ onClick?: MouseEventHandler<HTMLElement>;
12
16
  disabled?: boolean;
13
17
  }
@@ -1,20 +1,21 @@
1
1
  import type { HTMLAttributes, ReactNode } from "react";
2
+ export type DialogIntent = "info" | "success" | "warning" | "destructive";
2
3
  export interface DialogProps extends HTMLAttributes<HTMLDivElement> {
3
4
  open?: boolean;
4
- onClose?: (...args: unknown[]) => void;
5
- intent?: string;
6
- icon?: string | ReactNode;
7
- title?: unknown;
8
- description?: unknown;
5
+ onClose?: () => void;
6
+ intent?: DialogIntent;
7
+ icon?: string;
8
+ title?: ReactNode;
9
+ description?: ReactNode;
9
10
  confirmLabel?: string;
10
11
  cancelLabel?: string;
11
- onConfirm?: (...args: unknown[]) => void;
12
- onCancel?: (...args: unknown[]) => void;
12
+ onConfirm?: () => void;
13
+ onCancel?: () => void;
13
14
  showCancel?: boolean;
14
15
  loading?: boolean;
15
16
  closeOnBackdrop?: boolean;
16
17
  closeOnEscape?: boolean;
17
- container?: unknown;
18
+ container?: HTMLElement;
18
19
  className?: string;
19
20
  children?: ReactNode;
20
21
  }
@@ -14,4 +14,4 @@ import type { FieldProps } from "./Field.types";
14
14
  * @param {React.ReactNode} children - The input element to wrap
15
15
  * @param {object} props - Additional props to pass to the field wrapper
16
16
  */
17
- export default function Field({ label, required, helperMessage, infoIcon, onInfoClick, maxLength, value, id, className, children, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
17
+ export default function Field({ label, state, required, helperMessage, maxLength, value, infoIcon, onInfoClick, id, className, children, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,15 @@
1
- import type { ButtonHTMLAttributes, ReactNode } from "react";
2
- export interface FieldProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
- label?: unknown;
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ export type FieldState = "default" | "error";
3
+ export interface FieldProps extends HTMLAttributes<HTMLDivElement> {
4
+ label?: ReactNode;
5
+ state?: FieldState;
4
6
  required?: boolean;
5
- helperMessage?: unknown;
6
- infoIcon?: unknown;
7
- onInfoClick?: (...args: unknown[]) => void;
8
- maxLength?: unknown;
9
- value?: unknown;
10
- id?: unknown;
7
+ helperMessage?: ReactNode;
8
+ maxLength?: number;
9
+ value?: string | number;
10
+ infoIcon?: string;
11
+ onInfoClick?: () => void;
12
+ id?: string;
11
13
  className?: string;
12
14
  children?: ReactNode;
13
15
  }
@@ -12,4 +12,4 @@ import type { FileUploadProps } from "./FileUpload.types";
12
12
  * @param {string} className - Additional CSS classes
13
13
  * @param {object} props - Additional props to pass to the file input
14
14
  */
15
- export default function FileUpload({ onFileSelect, accept, maxSize, acceptText, instructionText, multiple, disabled, className, ...props }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
15
+ export default function FileUpload({ onFileSelect, accept, maxSize, acceptText, instructionText, size, multiple, disabled, className, ...props }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,12 @@
1
1
  import type { InputHTMLAttributes } from "react";
2
+ export type FileUploadSize = "default" | "small";
2
3
  export interface FileUploadProps extends InputHTMLAttributes<HTMLInputElement> {
3
4
  onFileSelect?: (...args: unknown[]) => void;
4
5
  accept?: unknown[];
5
6
  maxSize?: number;
6
7
  acceptText?: unknown;
7
8
  instructionText?: string;
9
+ size?: FileUploadSize;
8
10
  multiple?: boolean;
9
11
  disabled?: boolean;
10
12
  className?: string;
@@ -5,8 +5,10 @@ import type { PaginationProps } from "./Pagination.types";
5
5
  * @param {number} currentPage - Current active page (1-indexed)
6
6
  * @param {number} totalPages - Total number of pages
7
7
  * @param {function} onPageChange - Callback when page changes: (page: number) => void
8
- * @param {string} variant - Variant style: "default" | "underline" | "with-jump" | "underline-with-jump" | "underline-double"
9
- * @param {boolean} showFirstLast - Show first/last page buttons (for variants with double buttons)
8
+ * @param {string} variant - Variant style: "default" | "line"
9
+ * @param {boolean} showJumpInput - Toggle jump-to-page input
10
+ * @param {boolean} showDoubleButtons - Toggle first/last page buttons
11
+ * @param {boolean} showFirstLast - Backward-compatible alias for showDoubleButtons
10
12
  * @param {string} className - Additional CSS classes
11
13
  */
12
- export default function Pagination({ currentPage, totalPages, onPageChange, variant, showFirstLast, className, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
14
+ export default function Pagination({ currentPage, totalPages, onPageChange, variant, showJumpInput, showDoubleButtons, showFirstLast, className, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,12 @@
1
1
  import type { ButtonHTMLAttributes } from "react";
2
+ export type PaginationVariant = "default" | "line";
2
3
  export interface PaginationProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
4
  currentPage?: number;
4
5
  totalPages?: number;
5
6
  onPageChange?: (...args: unknown[]) => void;
6
- variant?: string;
7
+ variant?: PaginationVariant;
8
+ showJumpInput?: boolean;
9
+ showDoubleButtons?: boolean;
7
10
  showFirstLast?: boolean;
8
11
  className?: string;
9
12
  }
@@ -5,11 +5,12 @@ import type { ProgressCircleProps } from "./ProgressCircle.types";
5
5
  * @param {number} value - Progress value (0-100)
6
6
  * @param {number} max - Maximum value (default: 100)
7
7
  * @param {string} size - Size variant: 'xxs', 'xs', 'sm', 'md', or 'lg'
8
- * @param {string} shape - Shape variant: 'circle' (full circle) or 'half-circle' (semi-circle)
8
+ * @param {string} shape - Shape variant: 'circle' or 'half-circle'
9
9
  * @param {string} label - Optional label text to display
10
+ * @param {string} valueLabel - Optional custom center value text
10
11
  * @param {boolean} showLabel - Whether to show the label (if provided)
11
12
  * @param {string} className - Additional CSS classes
12
13
  * @param {string} 'aria-label' - Accessible label for screen readers
13
14
  * @param {object} props - Additional props to pass to the progress element
14
15
  */
15
- export default function ProgressCircle({ value, max, size, shape, label, showLabel, className, "aria-label": ariaLabel, ...props }: ProgressCircleProps): import("react/jsx-runtime").JSX.Element;
16
+ export default function ProgressCircle({ value, max, size, shape, label, valueLabel, showLabel, className, "aria-label": ariaLabel, ...props }: ProgressCircleProps): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,14 @@
1
1
  import type { HTMLAttributes } from "react";
2
+ import type { ReactNode } from "react";
3
+ export type ProgressCircleSize = "xxs" | "xs" | "sm" | "md" | "lg";
4
+ export type ProgressCircleShape = "circle" | "half-circle";
2
5
  export interface ProgressCircleProps extends HTMLAttributes<HTMLDivElement> {
3
6
  value?: number;
4
7
  max?: number;
5
- size?: string;
6
- shape?: string;
7
- label?: unknown;
8
+ size?: ProgressCircleSize;
9
+ shape?: ProgressCircleShape;
10
+ label?: ReactNode;
11
+ valueLabel?: ReactNode;
8
12
  showLabel?: boolean;
9
13
  className?: string;
10
14
  }
@@ -8,9 +8,10 @@ import type { ProgressIndicatorProps } from "./ProgressIndicator.types";
8
8
  * @param {string} size - Size variant: 'small', 'medium', or 'large'
9
9
  * @param {string} label - Optional label text to display above the progress bar
10
10
  * @param {boolean} showValue - Whether to show the percentage value
11
+ * @param {string} labelPosition - Where to place the percentage label
11
12
  * @param {boolean} showLabel - Whether to show the label (if provided)
12
13
  * @param {string} className - Additional CSS classes
13
14
  * @param {string} 'aria-label' - Accessible label for screen readers
14
15
  * @param {object} props - Additional props to pass to the progress element
15
16
  */
16
- export default function ProgressIndicator({ value, max, variant, size, label, showValue, showLabel, className, "aria-label": ariaLabel, ...props }: ProgressIndicatorProps): import("react/jsx-runtime").JSX.Element;
17
+ export default function ProgressIndicator({ value, max, variant, size, label, showValue, labelPosition, showLabel, className, "aria-label": ariaLabel, ...props }: ProgressIndicatorProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,15 @@
1
- import type { HTMLAttributes } from "react";
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ export type ProgressIndicatorVariant = "default" | "blue" | "green" | "success" | "orange" | "warning" | "red" | "error" | "purple";
3
+ export type ProgressIndicatorSize = "small" | "medium" | "large";
4
+ export type ProgressIndicatorLabelPosition = "false" | "right" | "bottom" | "top-floating" | "bottom-floating";
2
5
  export interface ProgressIndicatorProps extends HTMLAttributes<HTMLDivElement> {
3
6
  value?: number;
4
7
  max?: number;
5
- variant?: string;
6
- size?: string;
7
- label?: unknown;
8
+ variant?: ProgressIndicatorVariant;
9
+ size?: ProgressIndicatorSize;
10
+ label?: ReactNode;
8
11
  showValue?: boolean;
9
12
  showLabel?: boolean;
13
+ labelPosition?: ProgressIndicatorLabelPosition;
10
14
  className?: string;
11
15
  }
@@ -9,4 +9,4 @@ import type { TooltipProps } from "./Tooltip.types";
9
9
  * @param {string} className - Additional CSS classes
10
10
  * @param {object} props - Additional props to pass to the wrapper element
11
11
  */
12
- export default function Tooltip({ children, content, placement, disabled, className, ...props }: TooltipProps): import("react/jsx-runtime").JSX.Element;
12
+ export default function Tooltip({ children, content, placement, disabled, defaultVisible, className, ...props }: TooltipProps): import("react/jsx-runtime").JSX.Element;
@@ -4,5 +4,6 @@ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
4
4
  content?: unknown;
5
5
  placement?: string;
6
6
  disabled?: boolean;
7
+ defaultVisible?: boolean;
7
8
  className?: string;
8
9
  }