@kortix/ui 0.16.3 → 0.16.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_vendor/kortix-shared.js +1 -4
- package/dist/customize/sections/view/review-center-connected.js +64 -71
- package/dist/customize/sections/view/secret-delivery.d.ts +11 -20
- package/dist/customize/sections/view/secret-delivery.js +20 -29
- package/dist/customize/sections/view/secrets-view.js +9 -24
- package/dist/customize/settings/rail-copy-context.d.ts +2 -0
- package/dist/customize/settings/rail-copy-context.js +2 -0
- package/dist/customize/settings/tabs/chrome-connections-tab.js +1 -1
- package/dist/files/renderers/show-content-renderer.js +3 -1
- package/dist/i18n/en.d.ts +130 -22
- package/dist/i18n/en.js +142 -34
- package/dist/i18n/ui-catalog/product-catalog-translation-keys.generated.js +2 -0
- package/dist/internal/auth/auth-card-shell.d.ts +24 -3
- package/dist/internal/auth/auth-card-shell.js +15 -8
- package/dist/internal/auth/auth-primitives.d.ts +15 -2
- package/dist/internal/auth/auth-primitives.js +22 -5
- package/dist/internal/chrome/chrome-connect.d.ts +3 -5
- package/dist/internal/chrome/chrome-connect.js +7 -10
- package/dist/internal/chrome/extension.d.ts +1 -8
- package/dist/internal/chrome/extension.js +1 -8
- package/dist/internal/chrome/use-chrome-offered.d.ts +6 -12
- package/dist/internal/chrome/use-chrome-offered.js +13 -15
- package/dist/internal/components/agent-mark.d.ts +2 -1
- package/dist/internal/components/agent-mark.js +14 -3
- package/dist/internal/hooks/use-review-session-summary.d.ts +1 -1
- package/dist/internal/hooks/use-review-session-summary.js +1 -1
- package/dist/internal/layout/project-nav-row.d.ts +3 -1
- package/dist/internal/layout/project-nav-row.js +2 -2
- package/dist/internal/layout/project-page-header.js +5 -4
- package/dist/internal/stores/user-preferences-store.d.ts +17 -0
- package/dist/internal/stores/user-preferences-store.js +5 -0
- package/dist/markdown/setup-links/secret-intake-form.d.ts +4 -1
- package/dist/markdown/setup-links/secret-intake-form.js +60 -16
- package/dist/markdown/setup-links/setup-link-button.js +6 -1
- package/dist/primitives/color-picker.d.ts +19 -0
- package/dist/primitives/color-picker.js +27 -0
- package/dist/primitives/faded-scroll-area.js +4 -0
- package/dist/primitives/glyph-picker.d.ts +11 -0
- package/dist/primitives/glyph-picker.js +10 -6
- package/dist/primitives/gradient-wallpaper-gl.d.ts +61 -0
- package/dist/primitives/gradient-wallpaper-gl.js +446 -0
- package/dist/primitives/gradient-wallpaper.d.ts +20 -0
- package/dist/primitives/gradient-wallpaper.js +242 -0
- package/dist/primitives/resizable.d.ts +1 -1
- package/dist/session/agents/agent-hover-card.d.ts +26 -0
- package/dist/session/agents/agent-hover-card.js +70 -0
- package/dist/session/agents/agent-strip.js +33 -7
- package/dist/session/agents/agent-surface.d.ts +26 -1
- package/dist/session/agents/agent-surface.js +57 -6
- package/dist/session/agents/held-messages.js +2 -2
- package/dist/session/agents/subagent-dialog-content.js +2 -2
- package/dist/session/composer/ComposerCard.js +4 -4
- package/dist/session/composer/composer-toolbar.d.ts +8 -1
- package/dist/session/composer/composer-toolbar.js +2 -2
- package/dist/session/composer/dictation/dictation-control.d.ts +10 -0
- package/dist/session/composer/dictation/dictation-control.js +28 -0
- package/dist/session/composer/dictation/dictation-state.d.ts +26 -0
- package/dist/session/composer/dictation/dictation-state.js +71 -0
- package/dist/session/composer/dictation/recorder.d.ts +30 -0
- package/dist/session/composer/dictation/recorder.js +129 -0
- package/dist/session/composer/dictation/use-composer-dictation.d.ts +25 -0
- package/dist/session/composer/dictation/use-composer-dictation.js +218 -0
- package/dist/session/composer/queued-prompt-list.js +5 -1
- package/dist/session/panel/easy/apps-card.js +3 -10
- package/dist/session/panel/easy/background-tasks-card.d.ts +23 -0
- package/dist/session/panel/easy/background-tasks-card.js +119 -0
- package/dist/session/panel/easy/change-requests-card.js +1 -1
- package/dist/session/panel/easy/changes-card.js +4 -6
- package/dist/session/panel/easy/context-card.js +8 -9
- package/dist/session/panel/easy/context-meter.d.ts +2 -0
- package/dist/session/panel/easy/context-meter.js +18 -4
- package/dist/session/panel/easy/detail-view.js +7 -4
- package/dist/session/panel/easy/easy-panel-logic.d.ts +4 -15
- package/dist/session/panel/easy/easy-panel-logic.js +4 -17
- package/dist/session/panel/easy/easy-panel.js +5 -4
- package/dist/session/panel/easy/outputs-card.d.ts +1 -13
- package/dist/session/panel/easy/outputs-card.js +14 -40
- package/dist/session/panel/easy/panel-card.d.ts +13 -40
- package/dist/session/panel/easy/panel-card.js +17 -55
- package/dist/session/panel/easy/plan-card.js +4 -7
- package/dist/session/panel/model-switch-event.d.ts +2 -2
- package/dist/session/panel/model-switch-event.js +13 -9
- package/dist/session/panel/session-panel-provider.d.ts +2 -1
- package/dist/session/panel/session-panel-provider.js +3 -3
- package/dist/session/panel/shared/collect-tool-parts.js +2 -2
- package/dist/session/panel/shared/derive-panels.js +14 -1
- package/dist/session/panel/shared/use-panel-handoffs.d.ts +0 -1
- package/dist/session/panel/shared/use-panel-handoffs.js +26 -17
- package/dist/session/thread/chat-minimap.js +7 -1
- package/dist/session/thread/session-body.js +1 -1
- package/dist/session/thread/session-chat.js +59 -15
- package/dist/session/tool/shared/infrastructure-contexts.d.ts +7 -0
- package/dist/session/tool/shared/infrastructure-contexts.js +9 -0
- package/dist/session/tool/shared/infrastructure-row-header.js +4 -1
- package/dist/session/tool/shared/infrastructure-rows.js +19 -19
- package/dist/session/tool/show-group-renderer.d.ts +5 -5
- package/dist/session/tool/show-group-renderer.js +7 -4
- package/dist/session/tool/tool-part-renderer.js +25 -9
- package/dist/session/tool/tool-renderers.d.ts +1 -1
- package/dist/session/tool/tool-renderers.js +1 -1
- package/dist/session/tool/tools/bash-tool.js +3 -2
- package/dist/session/tool/tools/codemode-tool.d.ts +15 -0
- package/dist/session/tool/tools/codemode-tool.js +54 -2
- package/dist/session/tool/tools/kortix-action-tool.d.ts +1 -0
- package/dist/session/tool/tools/kortix-action-tool.js +19 -8
- package/dist/session/tool/tools/multi-agent-tool-bodies.d.ts +8 -1
- package/dist/session/tool/tools/multi-agent-tool-bodies.js +76 -10
- package/dist/session/tool/tools/task-tool.js +17 -5
- package/dist/session/turn/peer-message-row.d.ts +3 -0
- package/dist/session/turn/peer-message-row.js +8 -2
- package/dist/session/turn/subagent-notice-row.js +5 -3
- package/dist/styles.css +1 -1
- package/dist/test-utils/intl.d.ts +130 -22
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.js +2 -1
- package/dist/theme/wallpaper-gradients.d.ts +106 -0
- package/dist/theme/wallpaper-gradients.js +347 -0
- package/dist/theme/wallpapers.d.ts +23 -3
- package/dist/theme/wallpapers.js +53 -29
- package/dist/workspace/admin/project-admin-dashboard.js +1 -1
- package/dist/workspace/layout/project-home.js +1 -1
- package/dist/workspace/new/use-create-workspace.d.ts +5 -3
- package/dist/workspace/new/use-create-workspace.js +1 -1
- package/dist/workspace/projects/modal/project-icon-field.d.ts +3 -1
- package/dist/workspace/projects/modal/project-icon-field.js +3 -3
- package/dist/workspace/review/review-center.d.ts +9 -1
- package/dist/workspace/review/review-center.js +107 -14
- package/dist/workspace/review/review-detail.d.ts +19 -0
- package/dist/workspace/review/review-detail.js +18 -3
- package/dist/workspace/review/review-swipe-deck.d.ts +27 -0
- package/dist/workspace/review/review-swipe-deck.js +304 -0
- package/dist/workspace/review/review-swipe.d.ts +17 -0
- package/dist/workspace/review/review-swipe.js +10 -0
- package/dist/workspace/session-spaces/space-picker.js +3 -3
- package/dist/workspace/setup/setup-banner-snooze.d.ts +10 -0
- package/dist/workspace/setup/setup-banner-snooze.js +44 -0
- package/dist/workspace/setup/setup-banner.js +19 -36
- package/dist/workspace/setup/setup-steps.d.ts +0 -5
- package/dist/workspace/setup/setup-steps.js +0 -7
- package/dist/workspace/setup/workspace-setup-modal.d.ts +39 -0
- package/dist/workspace/setup/workspace-setup-modal.js +202 -0
- package/dist/workspace/sidebar/footer/project-review-nav.d.ts +13 -0
- package/dist/workspace/sidebar/footer/project-review-nav.js +29 -0
- package/dist/workspace/sidebar/project-nav-items.d.ts +3 -1
- package/dist/workspace/sidebar/project-nav-items.js +24 -5
- package/dist/workspace/sidebar/project-session-list.js +2 -1
- package/dist/workspace/sidebar/project-sidebar.js +6 -5
- package/dist/workspace/sidebar/project-spaces-nav.js +3 -10
- package/dist/workspace/sidebar/sidebar-more-group.js +1 -1
- package/package.json +14 -10
- package/skills/kortix-ui/SKILL.md +1 -1
- package/skills/kortix-ui/references/modules.md +3 -1
- package/dist/primitives/toast-clearance.d.ts +0 -36
- package/dist/primitives/toast-clearance.js +0 -94
- package/dist/workspace/setup/workspace-setup-page.d.ts +0 -10
- package/dist/workspace/setup/workspace-setup-page.js +0 -91
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gradient wallpapers: the data half. One WebGL fragment shader
|
|
3
|
+
* (`primitives/gradient-wallpaper-gl.ts`) draws every colored wallpaper and
|
|
4
|
+
* the user's custom one. A wallpaper is a `GradientConfig`: a pattern (where
|
|
5
|
+
* the color sits), a finish (ordered dither or film grain) and a palette.
|
|
6
|
+
*
|
|
7
|
+
* This file holds no DOM or WebGL code, so the presets and the custom-config
|
|
8
|
+
* normalizer are unit-testable and safe to import on the server.
|
|
9
|
+
*/
|
|
10
|
+
/** Where the color sits on the page. */
|
|
11
|
+
export const GRADIENT_PATTERNS = [
|
|
12
|
+
'bloom',
|
|
13
|
+
'beam',
|
|
14
|
+
'sheet',
|
|
15
|
+
'bands',
|
|
16
|
+
'horizon',
|
|
17
|
+
'arc',
|
|
18
|
+
'mesh',
|
|
19
|
+
'clouds',
|
|
20
|
+
];
|
|
21
|
+
/** `dither` = ordered dots on a pixel grid; `grain` = smooth with film grain. */
|
|
22
|
+
export const GRADIENT_FINISHES = ['dither', 'grain'];
|
|
23
|
+
/**
|
|
24
|
+
* Ready-made palettes for the Custom wallpaper's Palette picker, warm to cool
|
|
25
|
+
* and then neutral. Each runs from the faint edge of the shape to its core,
|
|
26
|
+
* like a preset's `colors`.
|
|
27
|
+
*/
|
|
28
|
+
export const CUSTOM_PALETTES = [
|
|
29
|
+
['#6b1d07', '#b8400f', '#f0661c', '#ffb37a'],
|
|
30
|
+
['#3d0c4f', '#9d174d', '#f43f5e', '#fdba74'],
|
|
31
|
+
['#854d0e', '#ca8a04', '#facc15', '#fef08a'],
|
|
32
|
+
['#7f1d1d', '#dc2626', '#fb7185', '#fecdd3'],
|
|
33
|
+
['#9a3412', '#fb923c', '#fdba74', '#ffedd5'],
|
|
34
|
+
['#14532d', '#15803d', '#4ade80', '#bbf7d0'],
|
|
35
|
+
['#3f6212', '#65a30d', '#a3e635', '#ecfccb'],
|
|
36
|
+
['#134e4a', '#0d9488', '#5eead4', '#ccfbf1'],
|
|
37
|
+
['#0b5c56', '#12b886', '#2fb8cc', '#9be8d8'],
|
|
38
|
+
['#0c4a6e', '#0369a1', '#38bdf8', '#bae6fd'],
|
|
39
|
+
['#1d3fb8', '#2a52c9', '#4f7dff', '#a9c4ff'],
|
|
40
|
+
['#312e81', '#4f46e5', '#818cf8', '#c7d2fe'],
|
|
41
|
+
['#352a85', '#6652e0', '#a78bfa', '#ead7ff'],
|
|
42
|
+
['#701a75', '#c026d3', '#e879f9', '#f5d0fe'],
|
|
43
|
+
['#881337', '#e11d48', '#fb7185', '#ffe4e6'],
|
|
44
|
+
['#22b8cf', '#3b5bdb', '#7950f2', '#e64980'],
|
|
45
|
+
['#1b1f4b', '#c8324e', '#ff8a7a', '#b9b9c2'],
|
|
46
|
+
['#27272a', '#52525b', '#a1a1aa', '#e4e4e7'],
|
|
47
|
+
];
|
|
48
|
+
/** The preset dots of a Custom swatch's colour picker: one per hue family. */
|
|
49
|
+
export const CUSTOM_COLOR_PRESETS = [
|
|
50
|
+
'#ef4444',
|
|
51
|
+
'#f97316',
|
|
52
|
+
'#eab308',
|
|
53
|
+
'#22c55e',
|
|
54
|
+
'#14b8a6',
|
|
55
|
+
'#3b82f6',
|
|
56
|
+
'#8b5cf6',
|
|
57
|
+
'#ec4899',
|
|
58
|
+
];
|
|
59
|
+
export const GRADIENT_MIN_COLORS = 2;
|
|
60
|
+
export const GRADIENT_MAX_COLORS = 5;
|
|
61
|
+
export const OPACITY_LIMITS = [0.2, 1];
|
|
62
|
+
/** Every gradient wallpaper draws at 50% until the person changes it. */
|
|
63
|
+
export const DEFAULT_WALLPAPER_OPACITY = 0.5;
|
|
64
|
+
/** A stored opacity, clamped, or undefined when it is not a number. */
|
|
65
|
+
function validOpacity(value) {
|
|
66
|
+
if (typeof value !== 'number' || !Number.isFinite(value))
|
|
67
|
+
return undefined;
|
|
68
|
+
return Math.min(OPACITY_LIMITS[1], Math.max(OPACITY_LIMITS[0], value));
|
|
69
|
+
}
|
|
70
|
+
export const DEFAULT_CUSTOM_WALLPAPER = {
|
|
71
|
+
colors: ['#1d3fb8', '#4f7dff', '#a9c4ff'],
|
|
72
|
+
finish: 'dither',
|
|
73
|
+
pattern: 'bloom',
|
|
74
|
+
opacity: DEFAULT_WALLPAPER_OPACITY,
|
|
75
|
+
};
|
|
76
|
+
const HEX_COLOR = /^#[0-9a-f]{6}$/i;
|
|
77
|
+
const isFinish = (value) => GRADIENT_FINISHES.includes(value);
|
|
78
|
+
/** The valid colours of a stored palette, or undefined when fewer than 2. */
|
|
79
|
+
function validColors(value) {
|
|
80
|
+
const colors = (Array.isArray(value) ? value : [])
|
|
81
|
+
.filter((color) => typeof color === 'string' && HEX_COLOR.test(color))
|
|
82
|
+
.slice(0, GRADIENT_MAX_COLORS);
|
|
83
|
+
return colors.length >= GRADIENT_MIN_COLORS ? colors : undefined;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Persisted preferences are untyped JSON that may predate a field or hold a
|
|
87
|
+
* hand-edited value. Returns a config the shader can always draw. Fields an
|
|
88
|
+
* older build stored (shape, finish, placement) are dropped.
|
|
89
|
+
*/
|
|
90
|
+
export function normalizeCustomWallpaper(value) {
|
|
91
|
+
const input = (value ?? {});
|
|
92
|
+
return {
|
|
93
|
+
colors: validColors(input.colors) ?? DEFAULT_CUSTOM_WALLPAPER.colors,
|
|
94
|
+
finish: isFinish(input.finish) ? input.finish : DEFAULT_CUSTOM_WALLPAPER.finish,
|
|
95
|
+
pattern: GRADIENT_PATTERNS.includes(input.pattern)
|
|
96
|
+
? input.pattern
|
|
97
|
+
: DEFAULT_CUSTOM_WALLPAPER.pattern,
|
|
98
|
+
opacity: validOpacity(input.opacity) ?? DEFAULT_CUSTOM_WALLPAPER.opacity,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function hslToHex(hue, saturation, lightness) {
|
|
102
|
+
const a = saturation * Math.min(lightness, 1 - lightness);
|
|
103
|
+
const channel = (n) => {
|
|
104
|
+
const k = (n + hue / 30) % 12;
|
|
105
|
+
const value = lightness - a * Math.max(-1, Math.min(k - 3, 9 - k, 1));
|
|
106
|
+
return Math.round(value * 255)
|
|
107
|
+
.toString(16)
|
|
108
|
+
.padStart(2, '0');
|
|
109
|
+
};
|
|
110
|
+
return `#${channel(0)}${channel(8)}${channel(4)}`;
|
|
111
|
+
}
|
|
112
|
+
function hexToHsl(hex) {
|
|
113
|
+
const v = Number.parseInt(hex.slice(1), 16);
|
|
114
|
+
const r = ((v >> 16) & 255) / 255;
|
|
115
|
+
const g = ((v >> 8) & 255) / 255;
|
|
116
|
+
const b = (v & 255) / 255;
|
|
117
|
+
const max = Math.max(r, g, b);
|
|
118
|
+
const min = Math.min(r, g, b);
|
|
119
|
+
const lightness = (max + min) / 2;
|
|
120
|
+
const delta = max - min;
|
|
121
|
+
if (delta === 0)
|
|
122
|
+
return [0, 0, lightness];
|
|
123
|
+
const saturation = delta / (1 - Math.abs(2 * lightness - 1));
|
|
124
|
+
const hue = max === r ? ((g - b) / delta + 6) % 6 : max === g ? (b - r) / delta + 2 : (r - g) / delta + 4;
|
|
125
|
+
return [hue * 60, saturation, lightness];
|
|
126
|
+
}
|
|
127
|
+
/** Degrees between two hues, 0–180. */
|
|
128
|
+
const hueGap = (a, b) => {
|
|
129
|
+
const d = Math.abs(a - b) % 360;
|
|
130
|
+
return d > 180 ? 360 - d : d;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* The color the Custom wallpaper's + button adds: random, but from the
|
|
134
|
+
* palette's own temperature. It finds the palette's mean hue, weighted by
|
|
135
|
+
* saturation so a near-grey swatch does not pull it, then picks a hue within
|
|
136
|
+
* 30° of it and 45° of the first saturated color, a strong saturation and a mid lightness. Of 6 candidates it keeps
|
|
137
|
+
* the one least like the colors already there. A palette of greys gets a
|
|
138
|
+
* random hue. `random` is injectable for tests.
|
|
139
|
+
*/
|
|
140
|
+
export function nextCustomColor(colors, random = Math.random) {
|
|
141
|
+
const hsl = colors.map(hexToHsl);
|
|
142
|
+
let x = 0;
|
|
143
|
+
let y = 0;
|
|
144
|
+
for (const [hue, saturation] of hsl) {
|
|
145
|
+
x += Math.cos((hue * Math.PI) / 180) * saturation;
|
|
146
|
+
y += Math.sin((hue * Math.PI) / 180) * saturation;
|
|
147
|
+
}
|
|
148
|
+
const grey = Math.hypot(x, y) < 0.15;
|
|
149
|
+
const mean = grey ? random() * 360 : ((Math.atan2(y, x) * 180) / Math.PI + 360) % 360;
|
|
150
|
+
// The first saturated color anchors the temperature: each added color
|
|
151
|
+
// moves the mean, and without an anchor a palette drifts from orange to
|
|
152
|
+
// green in a few presses.
|
|
153
|
+
const anchor = hsl.find(([, saturation]) => saturation > 0.25)?.[0] ?? mean;
|
|
154
|
+
let best = '';
|
|
155
|
+
let bestDistance = -1;
|
|
156
|
+
for (let attempt = 0; attempt < 6; attempt++) {
|
|
157
|
+
let hue = (mean + (random() * 2 - 1) * 30 + 360) % 360;
|
|
158
|
+
if (hueGap(hue, anchor) > 45)
|
|
159
|
+
hue = (anchor + (random() * 2 - 1) * 30 + 360) % 360;
|
|
160
|
+
const lightness = 0.38 + random() * 0.32;
|
|
161
|
+
const candidate = hslToHex(hue, 0.65 + random() * 0.25, lightness);
|
|
162
|
+
// Hue counts per 40°, lightness per 0.2: the nearest existing color.
|
|
163
|
+
const distance = Math.min(...hsl.map(([h, , l]) => hueGap(h, hue) / 40 + Math.abs(l - lightness) / 0.2));
|
|
164
|
+
if (distance > bestDistance) {
|
|
165
|
+
best = candidate;
|
|
166
|
+
bestDistance = distance;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return best;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Shuffle: a random Custom palette. A deep base colour, a brighter neighbour
|
|
173
|
+
* 25–60° along the hue wheel, then `nextCustomColor` up to 3 or 4 colours,
|
|
174
|
+
* so every result stays in one temperature. `random` is injectable for tests.
|
|
175
|
+
*/
|
|
176
|
+
export function randomCustomColors(random = Math.random) {
|
|
177
|
+
const hue = random() * 360;
|
|
178
|
+
let colors = [hslToHex(hue, 0.75, 0.38), hslToHex((hue + 25 + random() * 35) % 360, 0.85, 0.56)];
|
|
179
|
+
const count = 3 + Math.floor(random() * 2);
|
|
180
|
+
while (colors.length < count)
|
|
181
|
+
colors = [...colors, nextCustomColor(colors, random)];
|
|
182
|
+
return colors;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Shuffle: a whole new Custom wallpaper. A shape other than `previous`'s, a
|
|
186
|
+
* random finish and a `randomCustomColors` palette.
|
|
187
|
+
*/
|
|
188
|
+
export function randomCustomWallpaper(previous, random = Math.random) {
|
|
189
|
+
const shapes = GRADIENT_PATTERNS.filter((pattern) => pattern !== previous?.pattern);
|
|
190
|
+
return {
|
|
191
|
+
pattern: shapes[Math.floor(random() * shapes.length)],
|
|
192
|
+
finish: GRADIENT_FINISHES[Math.floor(random() * GRADIENT_FINISHES.length)],
|
|
193
|
+
colors: randomCustomColors(random),
|
|
194
|
+
// Shuffle keeps how strong the person wants the wallpaper.
|
|
195
|
+
opacity: previous?.opacity ?? DEFAULT_CUSTOM_WALLPAPER.opacity,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
/** How much of each shape is cleared behind the centred content: the same
|
|
199
|
+
* value as the preset that uses the shape. */
|
|
200
|
+
const CALM = {
|
|
201
|
+
bloom: 0.35,
|
|
202
|
+
beam: 0.5,
|
|
203
|
+
sheet: 0.4,
|
|
204
|
+
bands: 0.8,
|
|
205
|
+
horizon: 0.3,
|
|
206
|
+
arc: 0.3,
|
|
207
|
+
mesh: 0.75,
|
|
208
|
+
clouds: 0.7,
|
|
209
|
+
};
|
|
210
|
+
export function customGradientConfig(custom) {
|
|
211
|
+
return {
|
|
212
|
+
pattern: custom.pattern,
|
|
213
|
+
finish: custom.finish,
|
|
214
|
+
colors: custom.colors,
|
|
215
|
+
calm: CALM[custom.pattern],
|
|
216
|
+
anchor: [1, 1],
|
|
217
|
+
opacity: custom.opacity,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
export const GRADIENT_PRESETS = {
|
|
221
|
+
// An orange bloom dithered out of the bottom-right corner.
|
|
222
|
+
ember: {
|
|
223
|
+
pattern: 'bloom',
|
|
224
|
+
finish: 'dither',
|
|
225
|
+
colors: ['#6b1d07', '#b8400f', '#f0661c', '#ffb37a'],
|
|
226
|
+
lightColors: ['#ffc9a3', '#ff9d5c', '#f4701f', '#d9500b'],
|
|
227
|
+
calm: 0.35,
|
|
228
|
+
anchor: [1, 1],
|
|
229
|
+
},
|
|
230
|
+
// A spectral beam crossing the page: blue haze above, a hot edge below.
|
|
231
|
+
prism: {
|
|
232
|
+
pattern: 'beam',
|
|
233
|
+
finish: 'dither',
|
|
234
|
+
colors: ['#16307a', '#2f7fd6', '#e6dfc4', '#f08a3c', '#d7263d'],
|
|
235
|
+
lightColors: ['#9db8f2', '#4f93e0', '#f2d9a0', '#f08a3c', '#d7263d'],
|
|
236
|
+
calm: 0.5,
|
|
237
|
+
},
|
|
238
|
+
// A deep-blue sheet rising from the bottom-right corner.
|
|
239
|
+
tide: {
|
|
240
|
+
pattern: 'sheet',
|
|
241
|
+
finish: 'dither',
|
|
242
|
+
colors: ['#0d2350', '#1f4f9e', '#4f8fd8', '#9cc3f0'],
|
|
243
|
+
lightColors: ['#c3d8f5', '#7fb0ea', '#3f7fd0', '#1f4f9e'],
|
|
244
|
+
calm: 0.4,
|
|
245
|
+
anchor: [1, 1],
|
|
246
|
+
},
|
|
247
|
+
// Flowing vertical color bands with film grain.
|
|
248
|
+
aurora: {
|
|
249
|
+
pattern: 'bands',
|
|
250
|
+
finish: 'grain',
|
|
251
|
+
// Dark: no orange. Half-covered orange over a near-black page turns brown.
|
|
252
|
+
colors: ['#22b8cf', '#3b5bdb', '#7950f2', '#e64980', '#22b8cf'],
|
|
253
|
+
lightColors: ['#e8502a', '#2f9e6b', '#35bfd0', '#3b5bdb', '#9b5de5'],
|
|
254
|
+
calm: 0.8,
|
|
255
|
+
},
|
|
256
|
+
// A red horizon between grey haze and a navy ground.
|
|
257
|
+
dusk: {
|
|
258
|
+
pattern: 'horizon',
|
|
259
|
+
finish: 'grain',
|
|
260
|
+
colors: ['#1b1f4b', '#c8324e', '#ff8a7a', '#b9b9c2'],
|
|
261
|
+
lightColors: ['#6b70b8', '#d6455f', '#ff9d8f', '#d9d9e0'],
|
|
262
|
+
calm: 0.3,
|
|
263
|
+
},
|
|
264
|
+
// The lit rim of a sphere rising from the bottom edge.
|
|
265
|
+
eclipse: {
|
|
266
|
+
pattern: 'arc',
|
|
267
|
+
finish: 'grain',
|
|
268
|
+
colors: ['#5b2333', '#c94f35', '#f08a52', '#ffd9a8'],
|
|
269
|
+
lightColors: ['#f7d6c6', '#f2a37c', '#ee7f4f', '#f9b877'],
|
|
270
|
+
calm: 0.3,
|
|
271
|
+
},
|
|
272
|
+
// Teal and green light pooled in the corners.
|
|
273
|
+
lagoon: {
|
|
274
|
+
pattern: 'mesh',
|
|
275
|
+
finish: 'grain',
|
|
276
|
+
colors: ['#0b5c56', '#12b886', '#2fb8cc', '#9be8d8'],
|
|
277
|
+
calm: 0.75,
|
|
278
|
+
},
|
|
279
|
+
// Dithered clouds on the lower half of the page.
|
|
280
|
+
cumulus: {
|
|
281
|
+
pattern: 'clouds',
|
|
282
|
+
finish: 'dither',
|
|
283
|
+
// Dark: no near-white core. It glares on a dark page.
|
|
284
|
+
colors: ['#1d3fb8', '#2a52c9', '#4f7dff', '#a9c4ff'],
|
|
285
|
+
lightColors: ['#d3e0ff', '#a9c4ff', '#6f95ff', '#4f7dff'],
|
|
286
|
+
calm: 0.7,
|
|
287
|
+
},
|
|
288
|
+
// Green ribbons, dithered.
|
|
289
|
+
moss: {
|
|
290
|
+
pattern: 'bands',
|
|
291
|
+
finish: 'dither',
|
|
292
|
+
colors: ['#1f3d0c', '#4c7a12', '#86c232', '#4c7a12'],
|
|
293
|
+
lightColors: ['#d9efb0', '#a9d85c', '#74b816', '#a9d85c'],
|
|
294
|
+
calm: 0.85,
|
|
295
|
+
},
|
|
296
|
+
// A violet bloom from the top-right corner, smooth.
|
|
297
|
+
iris: {
|
|
298
|
+
pattern: 'bloom',
|
|
299
|
+
finish: 'grain',
|
|
300
|
+
colors: ['#352a85', '#6652e0', '#a78bfa', '#ead7ff'],
|
|
301
|
+
lightColors: ['#e3d4ff', '#b79cfb', '#7d68ea', '#4c3cb8'],
|
|
302
|
+
calm: 0.35,
|
|
303
|
+
anchor: [1, 0],
|
|
304
|
+
},
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* Persisted overrides, cleaned: unknown ids, invalid palettes and unknown
|
|
308
|
+
* finishes are dropped, opacity is clamped, so a preset always draws.
|
|
309
|
+
*/
|
|
310
|
+
export function normalizePresetOverrides(value) {
|
|
311
|
+
if (!value || typeof value !== 'object')
|
|
312
|
+
return {};
|
|
313
|
+
const out = {};
|
|
314
|
+
for (const [id, raw] of Object.entries(value)) {
|
|
315
|
+
if (!(id in GRADIENT_PRESETS) || !raw || typeof raw !== 'object')
|
|
316
|
+
continue;
|
|
317
|
+
const input = raw;
|
|
318
|
+
const override = {};
|
|
319
|
+
const colors = validColors(input.colors);
|
|
320
|
+
if (colors)
|
|
321
|
+
override.colors = colors;
|
|
322
|
+
if (isFinish(input.finish))
|
|
323
|
+
override.finish = input.finish;
|
|
324
|
+
const opacity = validOpacity(input.opacity);
|
|
325
|
+
if (opacity !== undefined)
|
|
326
|
+
override.opacity = opacity;
|
|
327
|
+
if (Object.keys(override).length > 0)
|
|
328
|
+
out[id] = override;
|
|
329
|
+
}
|
|
330
|
+
return out;
|
|
331
|
+
}
|
|
332
|
+
/** A preset with the person's override applied, or as shipped. Picked
|
|
333
|
+
* colours draw in both themes. */
|
|
334
|
+
export function presetWithOverride(config, override) {
|
|
335
|
+
if (!override)
|
|
336
|
+
return config;
|
|
337
|
+
return {
|
|
338
|
+
...config,
|
|
339
|
+
...(override.colors ? { colors: override.colors, lightColors: override.colors } : {}),
|
|
340
|
+
...(override.finish ? { finish: override.finish } : {}),
|
|
341
|
+
...(override.opacity !== undefined ? { opacity: override.opacity } : {}),
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
/** The palette a config draws with in the given theme. */
|
|
345
|
+
export function gradientColors(config, isDark) {
|
|
346
|
+
return isDark ? config.colors : (config.lightColors ?? config.colors);
|
|
347
|
+
}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { type GradientConfig, type GradientWallpaperId } from './wallpaper-gradients.js';
|
|
2
|
+
export type WallpaperType = 'svg' | 'shader' | 'gradient' | 'custom' | 'image' | 'none';
|
|
3
|
+
/** Ids that still render (marketing pages, the still-image exporter) but are
|
|
4
|
+
* no longer offered in the picker. */
|
|
5
|
+
type LegacyWallpaperId = 'brandmark' | 'nebula' | 'silk' | 'grain' | 'neuro';
|
|
6
|
+
/** The ids the picker offers. */
|
|
7
|
+
export type PickerWallpaperId = Exclude<Wallpaper['id'], LegacyWallpaperId>;
|
|
8
|
+
export type PickerWallpaper = Wallpaper & {
|
|
9
|
+
id: PickerWallpaperId;
|
|
10
|
+
};
|
|
2
11
|
export interface Wallpaper {
|
|
3
|
-
id: '
|
|
12
|
+
id: 'dither' | 'blank' | 'custom' | GradientWallpaperId | LegacyWallpaperId;
|
|
4
13
|
name: string;
|
|
5
14
|
type: WallpaperType;
|
|
15
|
+
/** For 'gradient' wallpapers — what the gradient shader draws. */
|
|
16
|
+
gradient?: GradientConfig;
|
|
6
17
|
/** For 'svg' wallpapers — path to the SVG file */
|
|
7
18
|
svgUrl?: string;
|
|
8
19
|
/** For 'image' wallpapers — path to the light-mode image */
|
|
@@ -22,5 +33,14 @@ export interface Wallpaper {
|
|
|
22
33
|
};
|
|
23
34
|
}
|
|
24
35
|
export declare const DEFAULT_WALLPAPER_ID = "dither";
|
|
25
|
-
|
|
36
|
+
/** The picker, in order: the default, the ten gradients, Blank, Custom. */
|
|
37
|
+
export declare const WALLPAPERS: PickerWallpaper[];
|
|
38
|
+
/** Resolves any id that can render, picker or legacy. Unknown ids resolve to
|
|
39
|
+
* the default. */
|
|
26
40
|
export declare function getWallpaperById(id: string): Wallpaper;
|
|
41
|
+
/**
|
|
42
|
+
* Resolves a persisted preference. A retired id falls back to the default, so
|
|
43
|
+
* a user who had one selected lands on a wallpaper the picker can show.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getSelectableWallpaper(id: string): PickerWallpaper;
|
|
46
|
+
export {};
|
package/dist/theme/wallpapers.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GRADIENT_PRESETS } from './wallpaper-gradients.js';
|
|
1
2
|
export const DEFAULT_WALLPAPER_ID = 'dither';
|
|
2
3
|
function shaderThumbs(id) {
|
|
3
4
|
return {
|
|
@@ -5,6 +6,19 @@ function shaderThumbs(id) {
|
|
|
5
6
|
light: `/wallpapers/${id}-light.jpg`,
|
|
6
7
|
};
|
|
7
8
|
}
|
|
9
|
+
const GRADIENT_NAMES = {
|
|
10
|
+
ember: 'Ember',
|
|
11
|
+
prism: 'Prism',
|
|
12
|
+
tide: 'Tide',
|
|
13
|
+
aurora: 'Aurora',
|
|
14
|
+
dusk: 'Dusk',
|
|
15
|
+
eclipse: 'Eclipse',
|
|
16
|
+
lagoon: 'Lagoon',
|
|
17
|
+
cumulus: 'Cumulus',
|
|
18
|
+
moss: 'Moss',
|
|
19
|
+
iris: 'Iris',
|
|
20
|
+
};
|
|
21
|
+
/** The picker, in order: the default, the ten gradients, Blank, Custom. */
|
|
8
22
|
export const WALLPAPERS = [
|
|
9
23
|
{
|
|
10
24
|
id: 'dither',
|
|
@@ -12,6 +26,30 @@ export const WALLPAPERS = [
|
|
|
12
26
|
type: 'shader',
|
|
13
27
|
thumbs: shaderThumbs('dither'),
|
|
14
28
|
},
|
|
29
|
+
...Object.keys(GRADIENT_PRESETS).map((id) => ({
|
|
30
|
+
id,
|
|
31
|
+
name: GRADIENT_NAMES[id],
|
|
32
|
+
type: 'gradient',
|
|
33
|
+
gradient: GRADIENT_PRESETS[id],
|
|
34
|
+
})),
|
|
35
|
+
{
|
|
36
|
+
id: 'blank',
|
|
37
|
+
name: 'Blank',
|
|
38
|
+
type: 'none',
|
|
39
|
+
},
|
|
40
|
+
// Last, so its controls open directly under its card.
|
|
41
|
+
{
|
|
42
|
+
id: 'custom',
|
|
43
|
+
name: 'Custom',
|
|
44
|
+
type: 'custom',
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
/**
|
|
48
|
+
* Retired from the picker on 2026-11-21. They stay resolvable by id because
|
|
49
|
+
* the marketing heroes render `brandmark` and the still-image exporter
|
|
50
|
+
* (`apps/web/scripts/generate-wallpapers.mjs`) renders the rest.
|
|
51
|
+
*/
|
|
52
|
+
const LEGACY_WALLPAPERS = [
|
|
15
53
|
{
|
|
16
54
|
id: 'brandmark',
|
|
17
55
|
name: 'Brandmark',
|
|
@@ -19,36 +57,22 @@ export const WALLPAPERS = [
|
|
|
19
57
|
svgUrl: '/kortix-brandmark-bg.svg',
|
|
20
58
|
thumbnailUrl: '/kortix-brandmark-bg.svg',
|
|
21
59
|
},
|
|
22
|
-
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
thumbs: shaderThumbs('nebula'),
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
id: 'silk',
|
|
30
|
-
name: 'Silk',
|
|
31
|
-
type: 'shader',
|
|
32
|
-
thumbs: shaderThumbs('silk'),
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: 'grain',
|
|
36
|
-
name: 'Grain',
|
|
37
|
-
type: 'shader',
|
|
38
|
-
thumbs: shaderThumbs('grain'),
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: 'neuro',
|
|
42
|
-
name: 'Neuro',
|
|
43
|
-
type: 'shader',
|
|
44
|
-
thumbs: shaderThumbs('neuro'),
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: 'blank',
|
|
48
|
-
name: 'Blank',
|
|
49
|
-
type: 'none',
|
|
50
|
-
},
|
|
60
|
+
{ id: 'nebula', name: 'Pixel Beams', type: 'shader', thumbs: shaderThumbs('nebula') },
|
|
61
|
+
{ id: 'silk', name: 'Silk', type: 'shader', thumbs: shaderThumbs('silk') },
|
|
62
|
+
{ id: 'grain', name: 'Grain', type: 'shader', thumbs: shaderThumbs('grain') },
|
|
63
|
+
{ id: 'neuro', name: 'Neuro', type: 'shader', thumbs: shaderThumbs('neuro') },
|
|
51
64
|
];
|
|
65
|
+
/** Resolves any id that can render, picker or legacy. Unknown ids resolve to
|
|
66
|
+
* the default. */
|
|
52
67
|
export function getWallpaperById(id) {
|
|
68
|
+
return (WALLPAPERS.find((w) => w.id === id) ??
|
|
69
|
+
LEGACY_WALLPAPERS.find((w) => w.id === id) ??
|
|
70
|
+
WALLPAPERS[0]);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Resolves a persisted preference. A retired id falls back to the default, so
|
|
74
|
+
* a user who had one selected lands on a wallpaper the picker can show.
|
|
75
|
+
*/
|
|
76
|
+
export function getSelectableWallpaper(id) {
|
|
53
77
|
return WALLPAPERS.find((w) => w.id === id) ?? WALLPAPERS[0];
|
|
54
78
|
}
|
|
@@ -417,7 +417,7 @@ export function ProjectAdminDashboard({ projectId, section, content, hostSection
|
|
|
417
417
|
// Every page header in the pane reads its title from the rail row,
|
|
418
418
|
// so the page is named exactly like the row that opened it. A page
|
|
419
419
|
// below a section (a connector) names itself.
|
|
420
|
-
_jsx(SettingsPageTitleProvider, { value: content ? null : activeRow.label, children: _jsx(Suspense, { fallback: _jsx(CapabilitiesSkeleton, {}), children: isProjectAdminResource(active) && ProjectPage ? (
|
|
420
|
+
_jsx(SettingsPageTitleProvider, { value: content ? null : activeRow.label, children: _jsx(Suspense, { fallback: _jsx(CapabilitiesSkeleton, {}), children: isProjectAdminResource(active) && ProjectPage ? (_jsx("div", { className: cn('flex min-h-0 flex-1 flex-col overflow-hidden', active === 'apps' && HOST_PANE_CLASS), children: content ?? _jsx(ProjectPage, { projectId: projectId }) })) : (
|
|
421
421
|
// Bounded, not scrolling: the account panes' split sheet
|
|
422
422
|
// (Invite, New key) splits this column, and the page and the
|
|
423
423
|
// sheet each scroll inside their own half.
|
|
@@ -309,5 +309,5 @@ function ProjectHomeView({ projectId, onSend, busy, beforeSend, onboarding: onbo
|
|
|
309
309
|
return (
|
|
310
310
|
// A file dropped anywhere on the page attaches to the composer, as on a
|
|
311
311
|
// session page.
|
|
312
|
-
_jsxs(ComposerDropZone, { className: "bg-background relative flex min-h-0 flex-1 flex-col overflow-hidden lg:px-4.5", children: [_jsx(ProjectHomeWallpaper, {}), _jsx(SidebarToggle, { placement: "floating" }), _jsx(AccessRequestsBell, { requests: accessRequests.data?.requests ?? [], to: accessRequestsTo }), firstChatPending || !onboarded || noAgent || !HomeAnnouncement ? null : _jsx(HomeAnnouncement, {}),
|
|
312
|
+
_jsxs(ComposerDropZone, { className: "bg-background relative flex min-h-0 flex-1 flex-col overflow-hidden lg:px-4.5", children: [_jsx(ProjectHomeWallpaper, {}), _jsx(SidebarToggle, { placement: "floating" }), _jsx(AccessRequestsBell, { requests: accessRequests.data?.requests ?? [], to: accessRequestsTo }), firstChatPending || !onboarded || noAgent || !HomeAnnouncement ? null : _jsx(HomeAnnouncement, {}), _jsx("div", { className: "relative z-10 mx-auto flex w-full max-w-2xl flex-col gap-2 px-4 pt-14 empty:hidden", children: _jsx(SplitNoticeBanner, { workspaceId: projectId }) }), _jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-6 z-20 flex justify-center px-4 empty:hidden", children: _jsx(SetupBanner, { projectId: projectId, className: "pointer-events-auto w-full max-w-xl" }, projectId) }), noAgentReason ? (_jsx(NoAgentHome, { reason: noAgentReason, repoUrl: projectRowQuery.data?.repo_url, branch: projectRowQuery.data?.default_branch, dashboardUrl: projectRowQuery.data?.dashboard_url })) : firstChat ? (_jsx(FirstChat, { projectId: projectId, composer: composer })) : (_jsx(ProjectHomeWelcomeBody, { projectId: projectId, onPickSuggestion: applySuggestion, composer: composer }))] }));
|
|
313
313
|
}
|
|
@@ -366,9 +366,11 @@ export type CreateOrchestrationClient = {
|
|
|
366
366
|
* on the project by itself (KRTX-1419).
|
|
367
367
|
*
|
|
368
368
|
* Implemented as `router.replace`, never `push`: the form state this
|
|
369
|
-
* replaces is not somewhere the user may navigate back into.
|
|
369
|
+
* replaces is not somewhere the user may navigate back into. A host that
|
|
370
|
+
* stays on its page (the CLI sign-in, KRTX-4940) reads the created
|
|
371
|
+
* `project` instead, to select its account.
|
|
370
372
|
*/
|
|
371
|
-
enterProject: (projectId: string) => void;
|
|
373
|
+
enterProject: (projectId: string, project: KortixProject) => void;
|
|
372
374
|
now: () => number;
|
|
373
375
|
};
|
|
374
376
|
export type CreateResult = {
|
|
@@ -435,7 +437,7 @@ export declare function runCreate(state: NewWorkspaceFormState, sourceAccountId:
|
|
|
435
437
|
* (`resolveTargetAccountId`). The managed source lets the server choose.
|
|
436
438
|
*/
|
|
437
439
|
export declare function useCreateWorkspace(options?: {
|
|
438
|
-
enterProject?: (projectId: string) => void;
|
|
440
|
+
enterProject?: (projectId: string, project: KortixProject) => void;
|
|
439
441
|
}): {
|
|
440
442
|
create: (state: NewWorkspaceFormState) => Promise<void>;
|
|
441
443
|
status: CreateStatus;
|
|
@@ -558,7 +558,7 @@ export async function runCreate(state, sourceAccountId, userId, client) {
|
|
|
558
558
|
// `completeThenNotify` accepts for the wizard's own exits.
|
|
559
559
|
await client.completeOnboarding(project.project_id).catch(() => { });
|
|
560
560
|
}
|
|
561
|
-
client.enterProject(project.project_id);
|
|
561
|
+
client.enterProject(project.project_id, project);
|
|
562
562
|
return { ok: true, project };
|
|
563
563
|
}
|
|
564
564
|
catch (error) {
|
|
@@ -19,13 +19,15 @@ export type ProjectIconValue = {
|
|
|
19
19
|
* popover. Controlled: the host owns the icon so it can send it with its
|
|
20
20
|
* payload (create) or diff it against the stored project (edit), and reset
|
|
21
21
|
* it on close/cancel. */
|
|
22
|
-
export declare function ProjectIconField({ value, onChange, onGlyphChange, onClear, disabled, triggerClassName, fallbackLabel, align, }: {
|
|
22
|
+
export declare function ProjectIconField({ value, onChange, onGlyphChange, onClear, disabled, triggerClassName, ariaLabel, fallbackLabel, align, }: {
|
|
23
23
|
/**
|
|
24
24
|
* Sizing override for the trigger. `/workspaces/new` renders this as the page's own
|
|
25
25
|
* `size-12` subject above the name field; everywhere else it sits inline
|
|
26
26
|
* beside a `size="sm"` input and keeps the `size-9` default that matches it.
|
|
27
27
|
*/
|
|
28
28
|
triggerClassName?: string;
|
|
29
|
+
/** Accessible name when this picker edits an entity other than a workspace. */
|
|
30
|
+
ariaLabel?: string;
|
|
29
31
|
/**
|
|
30
32
|
* What the unset face shows instead of the generic smiley: the workspace's
|
|
31
33
|
* own initial, through `EntityAvatar`, chalk colour and all — the same tile
|
|
@@ -59,7 +59,7 @@ function resolveGlyphFace(glyph) {
|
|
|
59
59
|
* popover. Controlled: the host owns the icon so it can send it with its
|
|
60
60
|
* payload (create) or diff it against the stored project (edit), and reset
|
|
61
61
|
* it on close/cancel. */
|
|
62
|
-
export function ProjectIconField({ value, onChange, onGlyphChange, onClear, disabled, triggerClassName, fallbackLabel, align = 'start', }) {
|
|
62
|
+
export function ProjectIconField({ value, onChange, onGlyphChange, onClear, disabled, triggerClassName, ariaLabel, fallbackLabel, align = 'start', }) {
|
|
63
63
|
const tI18nComplete = useTranslations('hardcodedUi.i18nComplete');
|
|
64
64
|
const [open, setOpen] = useState(false);
|
|
65
65
|
const reduceMotion = useReducedMotion();
|
|
@@ -130,11 +130,11 @@ export function ProjectIconField({ value, onChange, onGlyphChange, onClear, disa
|
|
|
130
130
|
variant: "outline", size: "icon",
|
|
131
131
|
// Never conditioned on `value`. The whole point of the control is
|
|
132
132
|
// that it stays live after a pick, so you reopen it and switch.
|
|
133
|
-
disabled: disabled, "aria-label": emoji
|
|
133
|
+
disabled: disabled, "aria-label": ariaLabel ?? (emoji
|
|
134
134
|
? tI18nComplete('text13447731697e', { value0: emoji })
|
|
135
135
|
: glyphFace
|
|
136
136
|
? tI18nComplete('text13447731697e', { value0: glyphFace.name })
|
|
137
|
-
: tI18nComplete.raw('text39a1c11af6d3'),
|
|
137
|
+
: tI18nComplete.raw('text39a1c11af6d3')),
|
|
138
138
|
// size-9 matches the sibling name Input (`size="sm"` => h-9), which is
|
|
139
139
|
// what the field has to line up with. That is 33.11px, under the 40px
|
|
140
140
|
// a pointer target wants, so hit-area-1 pads the target out to 40.47
|
|
@@ -2,7 +2,15 @@ import type { SessionAsk, ReviewVerdict } from '@kortix/sdk';
|
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import { type BulkResult } from './review-actions.js';
|
|
4
4
|
import { type ReviewItem, type ReviewSegment } from './types.js';
|
|
5
|
-
export
|
|
5
|
+
export type ReviewView = 'list' | 'cards';
|
|
6
|
+
export declare function ReviewCenter({ initialItems, segment: segmentProp, onSegmentChange, loadMore, onAct, onBulkAct, onOpenSession, onRecoverChange, recoveringCrId, onRefresh, isLoading, isFetching, isFetched, isError, sessionLabels, verdictAllowed, needsYouDeck, sessionAsks, onSelectAsk, selectedAskId, defaultView, deckEnabled, }?: {
|
|
7
|
+
/** The `review_swipe` flag: Needs you may show as the swipe deck. Off, it is the list. */
|
|
8
|
+
deckEnabled?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* How Needs you opens: the list, or the swipe deck (one card at a time).
|
|
11
|
+
* The viewer's own choice, once made, is kept in this browser.
|
|
12
|
+
*/
|
|
13
|
+
defaultView?: ReviewView;
|
|
6
14
|
/**
|
|
7
15
|
* The asks deck (questions and approvals agents wait on): in the empty
|
|
8
16
|
* detail pane, or above the list on a narrow inbox. It stays mounted while
|