@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.
- package/README.md +8 -0
- package/dist/ai/audit/auditLogger.cjs +2 -0
- package/dist/ai/audit/auditLogger.js +2 -0
- package/dist/ai/discovery.json +33 -0
- package/dist/ai/examples/index.cjs +1 -0
- package/dist/ai/examples/index.js +1 -0
- package/dist/ai/examples/training.examples.cjs +1 -0
- package/dist/ai/examples/training.examples.js +1 -0
- package/dist/ai/examples/trees.example.cjs +1 -0
- package/dist/ai/examples/trees.example.js +1 -0
- package/dist/ai/examples/validation-run.example.cjs +1 -0
- package/dist/ai/examples/validation-run.example.js +1 -0
- package/dist/ai/index.cjs +1 -0
- package/dist/ai/index.js +1 -0
- package/dist/ai/manifest/components.manifest.cjs +1 -0
- package/dist/ai/manifest/components.manifest.js +1 -0
- package/dist/ai/manifest/composition.manifest.cjs +1 -0
- package/dist/ai/manifest/composition.manifest.js +1 -0
- package/dist/ai/manifest/governance.manifest.cjs +1 -0
- package/dist/ai/manifest/governance.manifest.js +1 -0
- package/dist/ai/manifest/index.cjs +1 -0
- package/dist/ai/manifest/index.js +1 -0
- package/dist/ai/manifest/layout.manifest.cjs +1 -0
- package/dist/ai/manifest/layout.manifest.js +1 -0
- package/dist/ai/manifest/patterns.manifest.cjs +1 -0
- package/dist/ai/manifest/patterns.manifest.js +1 -0
- package/dist/ai/manifest/prop-aliases.manifest.cjs +1 -0
- package/dist/ai/manifest/prop-aliases.manifest.js +1 -0
- package/dist/ai/manifest/system.manifest.cjs +1 -0
- package/dist/ai/manifest/system.manifest.js +1 -0
- package/dist/ai/manifest/tokens.intent.manifest.cjs +1 -0
- package/dist/ai/manifest/tokens.intent.manifest.js +1 -0
- package/dist/ai/manifest.json +2801 -0
- package/dist/ai/policies/policy.engine.cjs +1 -0
- package/dist/ai/policies/policy.engine.js +1 -0
- package/dist/ai/policies/rules/accessibility.rules.cjs +1 -0
- package/dist/ai/policies/rules/accessibility.rules.js +1 -0
- package/dist/ai/policies/rules/action.rules.cjs +1 -0
- package/dist/ai/policies/rules/action.rules.js +1 -0
- package/dist/ai/policies/rules/composition.rules.cjs +1 -0
- package/dist/ai/policies/rules/composition.rules.js +1 -0
- package/dist/ai/policies/rules/props.rules.cjs +1 -0
- package/dist/ai/policies/rules/props.rules.js +1 -0
- package/dist/ai/policies/rules/spacing.rules.cjs +1 -0
- package/dist/ai/policies/rules/spacing.rules.js +1 -0
- package/dist/ai/schemas/ai-output.schema.json +71 -0
- package/dist/ai/sdk/index.cjs +1 -0
- package/dist/ai/sdk/index.js +1 -0
- package/dist/ai/sdk/runtime-sdk.cjs +2 -0
- package/dist/ai/sdk/runtime-sdk.js +2 -0
- package/dist/ai/telemetry/usageMetrics.cjs +1 -0
- package/dist/ai/telemetry/usageMetrics.js +1 -0
- package/dist/ai/templates/layouts.json +181 -0
- package/dist/ai/validation/deterministicFeedback.cjs +1 -0
- package/dist/ai/validation/deterministicFeedback.js +1 -0
- package/dist/ai/validation/driftDetection.cjs +1 -0
- package/dist/ai/validation/driftDetection.js +1 -0
- package/dist/ai/validation/index.cjs +1 -0
- package/dist/ai/validation/index.js +1 -0
- package/dist/ai/validation/schemaValidation.cjs +1 -0
- package/dist/ai/validation/schemaValidation.js +1 -0
- package/dist/ai/validation/validateAIOutput.cjs +1 -0
- package/dist/ai/validation/validateAIOutput.js +1 -0
- package/dist/ai/validation/validateTree.cjs +1 -0
- package/dist/ai/validation/validateTree.js +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.cjs +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Chip/Chip.cjs +1 -1
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Dialog/Dialog.cjs +1 -1
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/DotStatus/DotStatus.cjs +1 -1
- package/dist/components/DotStatus/DotStatus.js +1 -1
- package/dist/components/EmptyState/EmptyState.cjs +1 -1
- package/dist/components/EmptyState/EmptyState.js +1 -1
- package/dist/components/Field/Field.cjs +1 -1
- package/dist/components/Field/Field.js +1 -1
- package/dist/components/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/FileUpload/FileUpload.js +1 -1
- package/dist/components/Menu/Menu.cjs +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Pagination/Pagination.cjs +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.cjs +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.js +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicator.cjs +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/dist/components/Steps/Steps.cjs +1 -1
- package/dist/components/Steps/Steps.js +1 -1
- package/dist/components/Text/Text.cjs +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/design-system/ai/audit/audit.types.d.ts +23 -0
- package/dist/design-system/ai/audit/auditLogger.d.ts +2 -0
- package/dist/design-system/ai/examples/index.d.ts +4 -0
- package/dist/design-system/ai/examples/training.examples.d.ts +22 -0
- package/dist/design-system/ai/examples/trees.example.d.ts +3 -0
- package/dist/design-system/ai/examples/validation-run.example.d.ts +3 -0
- package/dist/design-system/ai/index.d.ts +45 -0
- package/dist/design-system/ai/manifest/components.manifest.d.ts +2 -0
- package/dist/design-system/ai/manifest/composition.manifest.d.ts +11 -0
- package/dist/design-system/ai/manifest/governance.manifest.d.ts +10 -0
- package/dist/design-system/ai/manifest/index.d.ts +9 -0
- package/dist/design-system/ai/manifest/layout.manifest.d.ts +2 -0
- package/dist/design-system/ai/manifest/patterns.manifest.d.ts +2 -0
- package/dist/design-system/ai/manifest/prop-aliases.manifest.d.ts +10 -0
- package/dist/design-system/ai/manifest/system.manifest.d.ts +5 -0
- package/dist/design-system/ai/manifest/tokens.intent.manifest.d.ts +2 -0
- package/dist/design-system/ai/manifest/types.d.ts +136 -0
- package/dist/design-system/ai/policies/policy.engine.d.ts +3 -0
- package/dist/design-system/ai/policies/policy.types.d.ts +14 -0
- package/dist/design-system/ai/policies/rules/accessibility.rules.d.ts +2 -0
- package/dist/design-system/ai/policies/rules/action.rules.d.ts +2 -0
- package/dist/design-system/ai/policies/rules/composition.rules.d.ts +2 -0
- package/dist/design-system/ai/policies/rules/props.rules.d.ts +2 -0
- package/dist/design-system/ai/policies/rules/spacing.rules.d.ts +2 -0
- package/dist/design-system/ai/sdk/index.d.ts +1 -0
- package/dist/design-system/ai/sdk/runtime-sdk.d.ts +21 -0
- package/dist/design-system/ai/telemetry/usageMetrics.d.ts +9 -0
- package/dist/design-system/ai/validation/deterministicFeedback.d.ts +15 -0
- package/dist/design-system/ai/validation/driftDetection.d.ts +3 -0
- package/dist/design-system/ai/validation/index.d.ts +5 -0
- package/dist/design-system/ai/validation/schemaValidation.d.ts +7 -0
- package/dist/design-system/ai/validation/validateAIOutput.d.ts +25 -0
- package/dist/design-system/ai/validation/validateTree.d.ts +2 -0
- package/dist/design-system/components/Button/Button.d.ts +1 -1
- package/dist/design-system/components/Button/Button.types.d.ts +1 -0
- package/dist/design-system/components/Chip/Chip.d.ts +4 -3
- package/dist/design-system/components/Chip/Chip.types.d.ts +13 -9
- package/dist/design-system/components/Dialog/Dialog.types.d.ts +9 -8
- package/dist/design-system/components/Field/Field.d.ts +1 -1
- package/dist/design-system/components/Field/Field.types.d.ts +11 -9
- package/dist/design-system/components/FileUpload/FileUpload.d.ts +1 -1
- package/dist/design-system/components/FileUpload/FileUpload.types.d.ts +2 -0
- package/dist/design-system/components/Pagination/Pagination.d.ts +5 -3
- package/dist/design-system/components/Pagination/Pagination.types.d.ts +4 -1
- package/dist/design-system/components/ProgressCircle/ProgressCircle.d.ts +3 -2
- package/dist/design-system/components/ProgressCircle/ProgressCircle.types.d.ts +7 -3
- package/dist/design-system/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
- package/dist/design-system/components/ProgressIndicator/ProgressIndicator.types.d.ts +8 -4
- package/dist/design-system/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/design-system/components/Tooltip/Tooltip.types.d.ts +1 -0
- package/dist/design-system/generated/component-api.d.ts +1568 -0
- package/dist/design-system/index.d.ts +1 -2
- package/dist/design-system/tokens/runtime/color.d.ts +40 -0
- package/dist/design-system/tokens/runtime/generateCss.d.ts +2 -0
- package/dist/design-system/tokens/runtime/index.d.ts +476 -0
- package/dist/design-system/tokens/runtime/motion.d.ts +14 -0
- package/dist/design-system/tokens/runtime/radius.d.ts +14 -0
- package/dist/design-system/tokens/runtime/shadow.d.ts +22 -0
- package/dist/design-system/tokens/runtime/spacing.d.ts +21 -0
- package/dist/design-system/tokens/runtime/types.d.ts +21 -0
- package/dist/design-system/tokens/runtime/typography.d.ts +87 -0
- package/dist/design-system/version.d.ts +1 -0
- package/dist/generated/component-api.cjs +1 -0
- package/dist/generated/component-api.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +1 -0
- package/dist/tokens/runtime/color.cjs +1 -0
- package/dist/tokens/runtime/color.js +1 -0
- package/dist/tokens/runtime/index.cjs +1 -0
- package/dist/tokens/runtime/index.js +1 -0
- package/dist/tokens/runtime/radius.cjs +1 -0
- package/dist/tokens/runtime/radius.js +1 -0
- package/dist/tokens/runtime/spacing.cjs +1 -0
- package/dist/tokens/runtime/spacing.js +1 -0
- package/dist/version.cjs +1 -0
- package/dist/version.js +1 -0
- package/package.json +74 -14
- package/dist/components/PillToggle/PillToggle.cjs +0 -1
- package/dist/components/PillToggle/PillToggle.js +0 -1
- package/dist/components/Playground/Playground.cjs +0 -9
- package/dist/components/Playground/Playground.js +0 -9
- package/dist/components/Text/Text.spec.cjs +0 -1
- package/dist/components/Text/Text.spec.js +0 -1
- package/dist/design-system/components/PillToggle/PillToggle.d.ts +0 -13
- package/dist/design-system/components/PillToggle/PillToggle.types.d.ts +0 -9
- package/dist/design-system/components/PillToggle/index.d.ts +0 -3
- package/dist/design-system/components/Playground/Playground.d.ts +0 -12
- package/dist/design-system/components/Playground/Playground.types.d.ts +0 -7
- package/dist/design-system/components/Playground/index.d.ts +0 -3
- package/dist/design-system/components/Text/Text.spec.d.ts +0 -2
- 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,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,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,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 @@
|
|
|
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,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,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;
|
|
@@ -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;
|
|
@@ -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 {
|
|
7
|
-
* @param {
|
|
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,
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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?:
|
|
9
|
-
badgeVariant?:
|
|
12
|
+
badge?: number | string;
|
|
13
|
+
badgeVariant?: BadgeVariant;
|
|
10
14
|
className?: string;
|
|
11
|
-
onClick?:
|
|
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?: (
|
|
5
|
-
intent?:
|
|
6
|
-
icon?: string
|
|
7
|
-
title?:
|
|
8
|
-
description?:
|
|
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?: (
|
|
12
|
-
onCancel?: (
|
|
12
|
+
onConfirm?: () => void;
|
|
13
|
+
onCancel?: () => void;
|
|
13
14
|
showCancel?: boolean;
|
|
14
15
|
loading?: boolean;
|
|
15
16
|
closeOnBackdrop?: boolean;
|
|
16
17
|
closeOnEscape?: boolean;
|
|
17
|
-
container?:
|
|
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,
|
|
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 {
|
|
2
|
-
export
|
|
3
|
-
|
|
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?:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
id?:
|
|
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" | "
|
|
9
|
-
* @param {boolean}
|
|
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?:
|
|
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'
|
|
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?:
|
|
6
|
-
shape?:
|
|
7
|
-
label?:
|
|
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?:
|
|
6
|
-
size?:
|
|
7
|
-
label?:
|
|
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;
|