@tenerife.music/ui 4.0.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,298 +0,0 @@
1
- /**
2
- * Color Palette Tokens
3
- *
4
- * Complete color palette system for Tenerife UI based on design system specifications.
5
- * Includes: primary midnight blues, accent purples, secondary refined cyan,
6
- * surface colors for dark/light themes, and semantic colors.
7
- *
8
- * @see docs/tenerife_audit/design_system.md - colour palette section
9
- */
10
- type Mode = "day" | "night";
11
- /**
12
- * Color scale from 50 (lightest) to 950 (darkest)
13
- * Used for primary, accent, secondary, and other color scales
14
- */
15
- type ColorScale = {
16
- 50: string;
17
- 100: string;
18
- 200: string;
19
- 300: string;
20
- 400: string;
21
- 500: string;
22
- 600: string;
23
- 700: string;
24
- 800: string;
25
- 900: string;
26
- 950: string;
27
- };
28
- /**
29
- * Primary color palette - Midnight Blues
30
- * Tenerife brand primary colors
31
- * Rebalanced for proper lightness progression
32
- */
33
- declare const primaryColors: ColorScale;
34
- /**
35
- * Accent color palette - Purples
36
- * Used for accents and highlights
37
- * Rebalanced for semantic strength: 600/700 levels for default/active states
38
- * Button Color Rebalance v1: Adjusted for minimum 16 L* delta from secondary for clear distinction
39
- */
40
- declare const accentColors: ColorScale;
41
- /**
42
- * Secondary color palette - Refined Cyan
43
- * Tenerife brand secondary colors
44
- * Rebalanced for semantic strength: 600/700 levels for default/active states
45
- * Button Color Rebalance v1: Adjusted for better perceptual contrast between variants
46
- */
47
- declare const secondaryColors: ColorScale;
48
- /**
49
- * Surface color tokens
50
- * Used for backgrounds at different elevation levels
51
- */
52
- type SurfaceColors = {
53
- base: string;
54
- elevated1: string;
55
- elevated2: string;
56
- elevated3: string;
57
- overlay: string;
58
- glass: string;
59
- };
60
- declare const surfaceColors: Record<Mode, SurfaceColors>;
61
- /**
62
- * Semantic color tokens
63
- * Success, error, warning, info
64
- */
65
- type SemanticColors = {
66
- success: string;
67
- successForeground: string;
68
- error: string;
69
- errorForeground: string;
70
- warning: string;
71
- warningForeground: string;
72
- info: string;
73
- infoForeground: string;
74
- };
75
- declare const semanticColors: Record<Mode, SemanticColors>;
76
- /**
77
- * Chart color tokens
78
- * Used for data visualization (charts, graphs)
79
- */
80
- type ChartColors = {
81
- chart1: string;
82
- chart2: string;
83
- chart3: string;
84
- chart4: string;
85
- chart5: string;
86
- };
87
- declare const chartColors: Record<Mode, ChartColors>;
88
- /**
89
- * Text color tokens
90
- * Primary, secondary, tertiary, muted text
91
- */
92
- type TextColors = {
93
- primary: string;
94
- secondary: string;
95
- tertiary: string;
96
- muted: string;
97
- inverse: string;
98
- };
99
- declare const textColors: Record<Mode, TextColors>;
100
- /**
101
- * Base color tokens
102
- * Background, foreground, card, popover
103
- */
104
- type BaseColorTokens = {
105
- background: string;
106
- foreground: string;
107
- card: string;
108
- cardForeground: string;
109
- popover: string;
110
- popoverForeground: string;
111
- border: string;
112
- input: string;
113
- ring: string;
114
- };
115
- declare const baseColors: Record<Mode, BaseColorTokens>;
116
- /**
117
- * Complete color tokens
118
- * Combines all color categories
119
- */
120
- type ColorTokens = BaseColorTokens & {
121
- primary: string;
122
- primaryForeground: string;
123
- secondary: string;
124
- secondaryForeground: string;
125
- accent: string;
126
- accentForeground: string;
127
- muted: string;
128
- mutedForeground: string;
129
- destructive: string;
130
- destructiveForeground: string;
131
- chart1: string;
132
- chart2: string;
133
- chart3: string;
134
- chart4: string;
135
- chart5: string;
136
- };
137
- /**
138
- * CSS variable color tokens
139
- * Maps to CSS custom properties
140
- */
141
- declare const cssVariableColorTokens: Record<Mode, ColorTokens>;
142
- /**
143
- * CSS custom properties for colors
144
- * These will be injected into the theme system
145
- */
146
- declare const colorCSSVariables: {
147
- readonly "--primary-50": string;
148
- readonly "--primary-100": string;
149
- readonly "--primary-200": string;
150
- readonly "--primary-300": string;
151
- readonly "--primary-400": string;
152
- readonly "--primary-500": string;
153
- readonly "--primary-600": string;
154
- readonly "--primary-700": string;
155
- readonly "--primary-800": string;
156
- readonly "--primary-900": string;
157
- readonly "--primary-950": string;
158
- readonly "--accent-50": string;
159
- readonly "--accent-100": string;
160
- readonly "--accent-200": string;
161
- readonly "--accent-300": string;
162
- readonly "--accent-400": string;
163
- readonly "--accent-500": string;
164
- readonly "--accent-600": string;
165
- readonly "--accent-700": string;
166
- readonly "--accent-800": string;
167
- readonly "--accent-900": string;
168
- readonly "--accent-950": string;
169
- readonly "--secondary-50": string;
170
- readonly "--secondary-100": string;
171
- readonly "--secondary-200": string;
172
- readonly "--secondary-300": string;
173
- readonly "--secondary-400": string;
174
- readonly "--secondary-500": string;
175
- readonly "--secondary-600": string;
176
- readonly "--secondary-700": string;
177
- readonly "--secondary-800": string;
178
- readonly "--secondary-900": string;
179
- readonly "--secondary-950": string;
180
- };
181
- /**
182
- * Tailwind theme colors
183
- * Maps to Tailwind config
184
- */
185
- declare const tailwindThemeColors: {
186
- readonly background: "hsl(var(--tm-surface-base))";
187
- readonly foreground: "hsl(var(--tm-text-primary))";
188
- readonly card: {
189
- readonly DEFAULT: "hsl(var(--tm-surface-raised))";
190
- readonly foreground: "hsl(var(--tm-text-primary))";
191
- };
192
- readonly popover: {
193
- readonly DEFAULT: "hsl(var(--tm-surface-overlay))";
194
- readonly foreground: "hsl(var(--tm-text-primary))";
195
- };
196
- readonly primary: {
197
- readonly DEFAULT: "hsl(var(--tm-primary))";
198
- readonly foreground: "hsl(var(--tm-primary-foreground))";
199
- readonly 50: "hsl(var(--primary-50))";
200
- readonly 100: "hsl(var(--primary-100))";
201
- readonly 200: "hsl(var(--primary-200))";
202
- readonly 300: "hsl(var(--primary-300))";
203
- readonly 400: "hsl(var(--primary-400))";
204
- readonly 500: "hsl(var(--primary-500))";
205
- readonly 600: "hsl(var(--primary-600))";
206
- readonly 700: "hsl(var(--primary-700))";
207
- readonly 800: "hsl(var(--primary-800))";
208
- readonly 900: "hsl(var(--primary-900))";
209
- readonly 950: "hsl(var(--primary-950))";
210
- };
211
- readonly secondary: {
212
- readonly DEFAULT: "hsl(var(--tm-secondary))";
213
- readonly foreground: "hsl(var(--tm-secondary-foreground))";
214
- readonly 50: "hsl(var(--secondary-50))";
215
- readonly 100: "hsl(var(--secondary-100))";
216
- readonly 200: "hsl(var(--secondary-200))";
217
- readonly 300: "hsl(var(--secondary-300))";
218
- readonly 400: "hsl(var(--secondary-400))";
219
- readonly 500: "hsl(var(--secondary-500))";
220
- readonly 600: "hsl(var(--secondary-600))";
221
- readonly 700: "hsl(var(--secondary-700))";
222
- readonly 800: "hsl(var(--secondary-800))";
223
- readonly 900: "hsl(var(--secondary-900))";
224
- readonly 950: "hsl(var(--secondary-950))";
225
- };
226
- readonly accent: {
227
- readonly DEFAULT: "hsl(var(--tm-accent))";
228
- readonly foreground: "hsl(var(--tm-accent-foreground))";
229
- readonly 50: "hsl(var(--accent-50))";
230
- readonly 100: "hsl(var(--accent-100))";
231
- readonly 200: "hsl(var(--accent-200))";
232
- readonly 300: "hsl(var(--accent-300))";
233
- readonly 400: "hsl(var(--accent-400))";
234
- readonly 500: "hsl(var(--accent-500))";
235
- readonly 600: "hsl(var(--accent-600))";
236
- readonly 700: "hsl(var(--accent-700))";
237
- readonly 800: "hsl(var(--accent-800))";
238
- readonly 900: "hsl(var(--accent-900))";
239
- readonly 950: "hsl(var(--accent-950))";
240
- };
241
- readonly muted: {
242
- readonly DEFAULT: "hsl(var(--tm-muted))";
243
- readonly foreground: "hsl(var(--tm-muted-foreground))";
244
- };
245
- readonly disabled: {
246
- readonly DEFAULT: "hsl(var(--tm-disabled))";
247
- readonly foreground: "hsl(var(--tm-disabled-foreground))";
248
- };
249
- readonly destructive: {
250
- readonly DEFAULT: "hsl(var(--tm-destructive))";
251
- readonly foreground: "hsl(var(--tm-destructive-foreground))";
252
- };
253
- readonly success: {
254
- readonly DEFAULT: "hsl(var(--tm-status-success))";
255
- readonly foreground: "hsl(var(--tm-status-success-foreground))";
256
- };
257
- readonly error: {
258
- readonly DEFAULT: "hsl(var(--tm-status-error))";
259
- readonly foreground: "hsl(var(--tm-status-error-foreground))";
260
- };
261
- readonly warning: {
262
- readonly DEFAULT: "hsl(var(--tm-status-warning))";
263
- readonly foreground: "hsl(var(--tm-status-warning-foreground))";
264
- };
265
- readonly info: {
266
- readonly DEFAULT: "hsl(var(--tm-status-info))";
267
- readonly foreground: "hsl(var(--tm-status-info-foreground))";
268
- };
269
- readonly surface: {
270
- readonly base: "hsl(var(--tm-surface-base))";
271
- readonly elevated1: "hsl(var(--tm-surface-raised))";
272
- readonly elevated2: "hsl(var(--tm-surface-raised))";
273
- readonly elevated3: "hsl(var(--tm-surface-raised))";
274
- readonly overlay: "hsl(var(--tm-surface-overlay))";
275
- readonly glass: "hsl(var(--tm-surface-overlay))";
276
- };
277
- readonly text: {
278
- readonly primary: "hsl(var(--tm-text-primary))";
279
- readonly secondary: "hsl(var(--tm-text-secondary))";
280
- readonly tertiary: "hsl(var(--tm-text-muted))";
281
- readonly muted: "hsl(var(--tm-text-muted))";
282
- readonly destructive: "hsl(var(--tm-destructive))";
283
- readonly accent: "hsl(var(--tm-accent))";
284
- readonly inverse: "hsl(var(--tm-text-inverse))";
285
- };
286
- readonly border: "hsl(var(--tm-border-default))";
287
- readonly input: "hsl(var(--tm-border-default))";
288
- readonly ring: "hsl(var(--tm-focus-ring))";
289
- readonly chart: {
290
- readonly 1: "hsl(var(--chart-1))";
291
- readonly 2: "hsl(var(--chart-2))";
292
- readonly 3: "hsl(var(--chart-3))";
293
- readonly 4: "hsl(var(--chart-4))";
294
- readonly 5: "hsl(var(--chart-5))";
295
- };
296
- };
297
-
298
- export { type BaseColorTokens as B, type ColorScale as C, type Mode as M, type SurfaceColors as S, type TextColors as T, type SemanticColors as a, type ChartColors as b, type ColorTokens as c, cssVariableColorTokens as d, accentColors as e, baseColors as f, chartColors as g, colorCSSVariables as h, semanticColors as i, surfaceColors as j, textColors as k, primaryColors as p, secondaryColors as s, tailwindThemeColors as t };
@@ -1,135 +0,0 @@
1
- import { L as LayoutIntent, U as UIIRNode, a as GenerateUIResult, R as ReplayRecord, b as GenerateUIInput, c as ReplayRunResult } from '../types-kjA4Koki.cjs';
2
- export { A as AuthorityReference, d as GenerateUIDslInput, e as GenerateUIError, f as GenerateUIErrorCode, k as GenerateUIException, g as GenerateUIIntentInput, h as GenerateUIIntentSchemaInput, G as GenerateUIOptions, i as GenerateUIScore, I as IntentContract, l as IntentContractCapabilities, m as IntentContractHierarchy, n as IntentContractOutput, o as IntentContractRegion, p as IntentContractSurface, q as IntentType, r as LayoutConstraints, s as RegionKind, t as RegionPriority, u as RegionSpec, v as ResponsiveFlags, w as UIIRLayoutMeta, x as UIIRTokenHints, V as ValidationSummary, j as generateUI } from '../types-kjA4Koki.cjs';
3
- import '../types-BEG5B5HA.cjs';
4
- import '../ui-node-union-BNt_iPQO.cjs';
5
- import '../index-4rLh47Jk.cjs';
6
- import '../typography-BsoBDDcG.cjs';
7
- import '../safe-native-DQVUNMW7.cjs';
8
-
9
- interface EngineCapabilityGraphNode {
10
- readonly component: string;
11
- readonly category: "layout" | "typography" | "action" | "data" | "overlay";
12
- readonly allowedProps: readonly string[];
13
- readonly allowedChildren: readonly string[] | "*";
14
- readonly isLeaf: boolean;
15
- readonly allowsAnyChildren: boolean;
16
- }
17
- interface EngineCapabilityGraphEdge {
18
- readonly from: string;
19
- readonly to: string;
20
- }
21
- interface EngineCapabilityGraph {
22
- readonly nodes: readonly EngineCapabilityGraphNode[];
23
- readonly edges: readonly EngineCapabilityGraphEdge[];
24
- }
25
- declare function exportCapabilityGraph(): EngineCapabilityGraph;
26
-
27
- type EngineCapabilityCategory = "layout" | "typography" | "action" | "data" | "overlay";
28
- interface EngineComponentCapabilityRawEntry {
29
- readonly category: EngineCapabilityCategory;
30
- readonly allowedProps: readonly string[];
31
- readonly allowedChildren: readonly string[] | "*";
32
- }
33
- type EngineComponentCapabilityRawRegistry = Record<string, EngineComponentCapabilityRawEntry>;
34
- interface EngineComponentCapabilityEntry {
35
- readonly component: string;
36
- readonly category: EngineCapabilityCategory;
37
- readonly allowedProps: readonly string[];
38
- readonly allowedPropSet: ReadonlySet<string>;
39
- readonly allowedChildren: readonly string[] | "*";
40
- readonly allowedChildSet: ReadonlySet<string> | null;
41
- }
42
- interface EngineComponentCapabilityRegistry {
43
- readonly components: readonly string[];
44
- readonly entries: Readonly<Record<string, EngineComponentCapabilityEntry>>;
45
- }
46
- declare function normalizeCapabilitiesRegistry(rawRegistry: unknown): EngineComponentCapabilityRegistry;
47
- declare function loadCapabilities(): EngineComponentCapabilityRegistry;
48
- declare function getComponentCapabilities(name: string): EngineComponentCapabilityEntry | undefined;
49
- declare function isChildAllowed(parent: string, child: string): boolean;
50
-
51
- declare const UI_INTENT_PRIORITIES: readonly ["low", "medium", "high"];
52
- type UIIntentPriority = (typeof UI_INTENT_PRIORITIES)[number];
53
- type UIIntentPrimaryAction = {
54
- label: string;
55
- target?: string;
56
- kind?: string;
57
- };
58
- type UIIntent = {
59
- type: string;
60
- goal: string;
61
- primaryAction: UIIntentPrimaryAction;
62
- data: Readonly<Record<string, unknown>>;
63
- priority: UIIntentPriority;
64
- };
65
- type UIIntentValidationIssue = {
66
- path: string;
67
- message: string;
68
- };
69
- type UIIntentValidationResult = {
70
- valid: boolean;
71
- data?: UIIntent;
72
- errors: UIIntentValidationIssue[];
73
- };
74
- declare function isUIIntentPriority(value: unknown): value is UIIntentPriority;
75
- declare function createUIIntent(intent: UIIntent): UIIntent;
76
- declare function validateUIIntent(input: unknown): UIIntentValidationResult;
77
-
78
- type ResolvedUIIntent = {
79
- plannerDsl: LayoutIntent;
80
- plannerTree: UIIRNode;
81
- };
82
- declare function resolveUIIntentToPlannerDsl(input: UIIntent): LayoutIntent;
83
- declare function resolveUIIntent(input: UIIntent): ResolvedUIIntent;
84
-
85
- type ReplayErrorCode = "REPLAY_INVALID_RECORD" | "REPLAY_VALIDATION_FAILED" | "REPLAY_COMPILE_FAILED" | "REPLAY_HASH_MISMATCH";
86
- declare class ReplayError extends Error {
87
- readonly code: ReplayErrorCode;
88
- readonly details?: unknown;
89
- constructor(code: ReplayErrorCode, message: string, details?: unknown);
90
- }
91
- declare class ReplayMismatchError extends ReplayError {
92
- readonly expectedHash: string;
93
- readonly actualHash: string;
94
- readonly sourceKind: string;
95
- constructor(details: {
96
- expectedHash: string;
97
- actualHash: string;
98
- sourceKind: string;
99
- });
100
- }
101
-
102
- type RecordReplayRunResult = {
103
- result: GenerateUIResult;
104
- replay: ReplayRecord;
105
- };
106
- declare function recordReplayRun(input: GenerateUIInput): RecordReplayRunResult;
107
- declare function replayRun(record: ReplayRecord): ReplayRunResult;
108
-
109
- type EngineCapabilityConstraintsCode = "UNKNOWN_COMPONENT" | "DISALLOWED_PROP" | "INVALID_CHILD_RELATIONSHIP";
110
- interface EngineCapabilityConstraintsViolation {
111
- readonly nodeId: string;
112
- readonly path: string;
113
- readonly component: string;
114
- readonly code: EngineCapabilityConstraintsCode;
115
- readonly message: string;
116
- }
117
- interface EngineCapabilityConstraintsResult {
118
- readonly valid: boolean;
119
- readonly errors: readonly EngineCapabilityConstraintsViolation[];
120
- }
121
- declare function validateCapabilityConstraints(root: UIIRNode): EngineCapabilityConstraintsResult;
122
-
123
- type CanonicalIRViolation = EngineCapabilityConstraintsViolation;
124
- type CanonicalIRValidationResult = EngineCapabilityConstraintsResult;
125
- /**
126
- * Asserts that a UI-IR tree contains only canonical registry-backed components
127
- * and relationships defined by `component-capabilities.json`.
128
- *
129
- * This guard runs on canonical post-normalization UI-IR only. Planner aliases,
130
- * planner-owned extension surfaces, unknown components, disallowed props, and
131
- * invalid child relationships are all rejected here.
132
- */
133
- declare function assertCanonicalIR(root: UIIRNode): void;
134
-
135
- export { type CanonicalIRValidationResult, type CanonicalIRViolation, type EngineCapabilityCategory, type EngineCapabilityConstraintsCode, type EngineCapabilityConstraintsResult, type EngineCapabilityConstraintsViolation, type EngineCapabilityGraph, type EngineCapabilityGraphEdge, type EngineCapabilityGraphNode, type EngineCapabilityConstraintsCode as EngineCapabilityValidationCode, type EngineCapabilityConstraintsResult as EngineCapabilityValidationResult, type EngineCapabilityConstraintsViolation as EngineCapabilityValidationViolation, type EngineComponentCapabilityEntry, type EngineComponentCapabilityRawEntry, type EngineComponentCapabilityRawRegistry, type EngineComponentCapabilityRegistry, GenerateUIInput, GenerateUIResult, LayoutIntent, type RecordReplayRunResult, ReplayError, ReplayMismatchError, ReplayRecord, ReplayRunResult, type ResolvedUIIntent, UIIRNode, type UIIntent, type UIIntentPrimaryAction, type UIIntentPriority, type UIIntentValidationIssue, type UIIntentValidationResult, UI_INTENT_PRIORITIES, assertCanonicalIR, createUIIntent, exportCapabilityGraph, getComponentCapabilities, isChildAllowed, isUIIntentPriority, loadCapabilities, normalizeCapabilitiesRegistry, recordReplayRun, replayRun, resolveUIIntent, resolveUIIntentToPlannerDsl, validateCapabilityConstraints as validateCapabilities, validateCapabilityConstraints, validateUIIntent };
@@ -1,37 +0,0 @@
1
- import { LinkProps as LinkProps$1 } from 'next/link';
2
- import * as React from 'react';
3
- import { L as LinkProps } from '../../Link-B8gB8LrX.cjs';
4
- import 'class-variance-authority/types';
5
- import '../../safe-native-DQVUNMW7.cjs';
6
-
7
- interface NextLinkAdapterProps extends Omit<LinkProps, "href"> {
8
- /**
9
- * Next.js Link props
10
- */
11
- href: LinkProps$1["href"];
12
- /**
13
- * Next.js specific props
14
- */
15
- prefetch?: LinkProps$1["prefetch"];
16
- replace?: LinkProps$1["replace"];
17
- scroll?: LinkProps$1["scroll"];
18
- shallow?: LinkProps$1["shallow"];
19
- locale?: LinkProps$1["locale"];
20
- }
21
- /**
22
- * NextLinkAdapter
23
- *
24
- * A compatibility adapter that bridges Next.js `next/link` with TenerifeUI link tokens.
25
- * This adapter renders a single <a> element as the child of NextLink.
26
- * Next.js 13+ automatically handles <a> children without creating nested anchors.
27
- *
28
- * @example
29
- * ```tsx
30
- * <NextLinkAdapter href="/dashboard" variant="primary">
31
- * Dashboard
32
- * </NextLinkAdapter>
33
- * ```
34
- */
35
- declare const NextLinkAdapter: React.ForwardRefExoticComponent<NextLinkAdapterProps & React.RefAttributes<HTMLAnchorElement>>;
36
-
37
- export { NextLinkAdapter, type NextLinkAdapterProps };