opik-genui 0.0.0-stage → 2.3.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.
@@ -0,0 +1,150 @@
1
+ // src/tokens.ts
2
+ var FONT_SANS = 'Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif';
3
+ var FONT_MONO = '"Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace';
4
+ var PRIMITIVES = {
5
+ "base-white": "#ffffff",
6
+ "neutral-50": "#fafafa",
7
+ "neutral-100": "#f4f4f5",
8
+ "neutral-150": "#efeff1",
9
+ "neutral-200": "#e4e4e7",
10
+ "neutral-300": "#d4d4d8",
11
+ "neutral-400": "#a1a1aa",
12
+ "neutral-500": "#71717a",
13
+ "neutral-600": "#52525b",
14
+ "neutral-700": "#3f3f46",
15
+ "neutral-800": "#27272a",
16
+ "neutral-900": "#18181b",
17
+ "neutral-950": "#09090b",
18
+ "primary-400": "#6487fc",
19
+ "primary-500": "#5155f5",
20
+ "primary-600": "#3f43e0",
21
+ "red-300": "#ff6467",
22
+ "red-400": "#fd4c50",
23
+ "red-500": "#fb2c36",
24
+ "red-700": "#dc2626",
25
+ "green-300": "#4df89a",
26
+ "green-400": "#05df72",
27
+ "green-500": "#00c950",
28
+ "green-700": "#11834b",
29
+ "amber-300": "#ffbb29",
30
+ "amber-400": "#ffab14",
31
+ "amber-500": "#fe9a00",
32
+ "amber-700": "#bb4d00",
33
+ "lime-300": "#bbf451",
34
+ "lime-400": "#9ae600",
35
+ "yellow-300": "#ffdf20",
36
+ "yellow-400": "#fdc700",
37
+ "teal-300": "#46ecd5",
38
+ "teal-400": "#00d5be",
39
+ "cyan-300": "#53eafd",
40
+ "cyan-400": "#00d3f2",
41
+ "violet-300": "#c4b4ff",
42
+ "violet-400": "#a684ff",
43
+ "fuchsia-300": "#f4a8ff",
44
+ "fuchsia-400": "#ed6aff",
45
+ "pink-300": "#ff90cd",
46
+ "pink-400": "#fb64b6"
47
+ };
48
+ var ACCENTS = ["lime", "yellow", "teal", "cyan", "violet", "fuchsia", "pink"];
49
+ var CHART_SERIES = [
50
+ "violet",
51
+ "cyan",
52
+ "fuchsia",
53
+ "lime",
54
+ "yellow",
55
+ "teal",
56
+ "pink"
57
+ ];
58
+ var STATUSES = { error: "red", success: "green", warning: "amber" };
59
+ var SEMANTIC = {
60
+ "background-primary": ["base-white", "neutral-950"],
61
+ "background-primary-hover": ["neutral-50", "neutral-900"],
62
+ "background-secondary": ["neutral-100", "neutral-800"],
63
+ "background-secondary-hover": ["neutral-200", "neutral-700"],
64
+ "background-subtle": ["neutral-50", "neutral-900"],
65
+ "text-primary": ["neutral-800", "neutral-100"],
66
+ "text-secondary": ["neutral-500", "neutral-400"],
67
+ "text-placeholder": ["neutral-500", "neutral-400"],
68
+ "text-disabled": ["neutral-400", "neutral-600"],
69
+ "text-brand": ["primary-500", "primary-400"],
70
+ "text-on-action": ["neutral-100", "neutral-100"],
71
+ "icon-primary": ["neutral-800", "neutral-200"],
72
+ "icon-secondary": ["neutral-500", "neutral-400"],
73
+ "icon-brand": ["primary-500", "primary-400"],
74
+ "icon-on-action": ["neutral-100", "neutral-100"],
75
+ "icon-on-color": ["neutral-800", "neutral-800"],
76
+ "border-default": ["neutral-150", "neutral-800"],
77
+ "border-strong": ["neutral-500", "neutral-500"],
78
+ "border-focus": ["primary-500", "primary-400"],
79
+ "action-primary": ["primary-500", "primary-500"],
80
+ "action-primary-hover": ["primary-600", "primary-400"],
81
+ ...Object.fromEntries(
82
+ ACCENTS.flatMap((hue) => [
83
+ [`accent-${hue}-tile`, [`${hue}-300`, `${hue}-400`]],
84
+ [`accent-${hue}-mark`, [`${hue}-400`, `${hue}-300`]]
85
+ ])
86
+ ),
87
+ ...Object.fromEntries(
88
+ CHART_SERIES.map((hue, i) => [
89
+ `chart-series-${i + 1}`,
90
+ [`${hue}-400`, `${hue}-400`]
91
+ ])
92
+ ),
93
+ ...Object.fromEntries(
94
+ Object.entries(STATUSES).map(([status, hue]) => [
95
+ `chart-${status}`,
96
+ [`${hue}-400`, `${hue}-400`]
97
+ ])
98
+ ),
99
+ "chart-grid": ["neutral-150", "neutral-800"],
100
+ ...Object.fromEntries(
101
+ Object.entries(STATUSES).flatMap(([status, hue]) => [
102
+ [`status-${status}-default`, [`${hue}-500`, `${hue}-500`]],
103
+ [`status-${status}-text`, [`${hue}-700`, `${hue}-400`]],
104
+ [`status-${status}-tile`, [`${hue}-300`, `${hue}-400`]],
105
+ [`status-${status}-mark`, [`${hue}-400`, `${hue}-300`]]
106
+ ])
107
+ )
108
+ };
109
+ var font = (family, weight, size, line) => `${weight} ${size}px/${line}px var(--ov-font-${family})`;
110
+ var SHARED = {
111
+ "--ov-font-sans": FONT_SANS,
112
+ "--ov-font-mono": FONT_MONO,
113
+ "--ov-type-heading-1": font("sans", 600, 20, 28),
114
+ "--ov-type-heading-2": font("sans", 600, 16, 24),
115
+ "--ov-type-heading-3": font("sans", 600, 14, 20),
116
+ "--ov-type-body-medium": font("sans", 400, 14, 20),
117
+ "--ov-type-body-medium-strong": font("sans", 500, 14, 20),
118
+ "--ov-type-body-small": font("sans", 400, 12, 16),
119
+ "--ov-type-body-small-strong": font("sans", 500, 12, 16),
120
+ "--ov-type-caption": font("sans", 400, 11, 14),
121
+ "--ov-type-overline": font("sans", 500, 10, 16),
122
+ "--ov-type-mono-medium": font("mono", 400, 14, 20),
123
+ "--ov-type-mono-medium-strong": font("mono", 500, 14, 20),
124
+ "--ov-type-mono-small": font("mono", 400, 12, 16),
125
+ "--ov-type-mono-small-strong": font("mono", 500, 12, 16),
126
+ "--ov-type-mono-caption": font("mono", 400, 11, 14),
127
+ "--ov-type-mono-caption-strong": font("mono", 500, 11, 14),
128
+ ...Object.fromEntries(
129
+ [2, 4, 6, 8, 12, 16, 24, 32].map((px) => [`--ov-spacing-${px}`, `${px}px`])
130
+ ),
131
+ "--ov-radius-2": "2px",
132
+ "--ov-radius-4": "4px",
133
+ "--ov-radius-8": "8px",
134
+ "--ov-radius-full": "9999px",
135
+ "--ov-opacity-inactive": "0.8",
136
+ "--ov-opacity-disabled": "0.6"
137
+ };
138
+ var colors = (mode) => Object.fromEntries(
139
+ Object.entries(SEMANTIC).map(([name, pair]) => [
140
+ `--ov-${name}`,
141
+ PRIMITIVES[pair[mode]]
142
+ ])
143
+ );
144
+ var TOKENS = {
145
+ light: { ...colors(0), ...SHARED },
146
+ dark: { ...colors(1), ...SHARED }
147
+ };
148
+ var TOKEN_NAMES = Object.keys(TOKENS.light);
149
+
150
+ export { TOKENS, TOKEN_NAMES };
@@ -0,0 +1 @@
1
+ export { CONTRACTS, ENGINE_VERSION, PROTOCOL_VERSION, VIEW_CSP, buildViewDocument, unknownVersionMessage } from './chunk-AF6GTNRK.js';