@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
|
@@ -2,15 +2,27 @@
|
|
|
2
2
|
import { AuthArt } from './auth-art.js';
|
|
3
3
|
export { AuthArt };
|
|
4
4
|
/** Tiny legal line pinned to the bottom of every auth surface: one sentence on every page. */
|
|
5
|
-
export declare function AuthLegalFooter(
|
|
5
|
+
export declare function AuthLegalFooter({ centered }?: {
|
|
6
|
+
centered?: boolean;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
6
8
|
/**
|
|
7
9
|
* The quiet page frame every auth surface shares: mark, centered column, legal
|
|
8
10
|
* footer. The frame has no sidebar and many of its screens have no in-page
|
|
9
11
|
* exit; the root layout's `DesktopBackButton` is their exit on the desktop
|
|
10
12
|
* shell. `backHref` tells that Back where this flow started.
|
|
11
13
|
*/
|
|
12
|
-
export declare function AuthFrame({ children, footerVariant, backHref, art, }: {
|
|
14
|
+
export declare function AuthFrame({ children, footerVariant, backHref, art, aside, centered, mark, }: {
|
|
13
15
|
children: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* A pane left of the form on wide screens (`lg` and up), half the width.
|
|
18
|
+
* The host supplies it: the Kortix sign-in page passes its story pane, a
|
|
19
|
+
* branded or self-hosted frame passes nothing. Hidden below `lg`.
|
|
20
|
+
*/
|
|
21
|
+
aside?: React.ReactNode;
|
|
22
|
+
/** Centers the column: every step header, quiet-link row and the legal footer. */
|
|
23
|
+
centered?: boolean;
|
|
24
|
+
/** The mark every step header shows by default (the Kortix symbol on /auth). */
|
|
25
|
+
mark?: React.ReactNode;
|
|
14
26
|
/**
|
|
15
27
|
* The dither pane beside the form on wide screens. Auth and consent screens
|
|
16
28
|
* keep it; an in-app gate that only borrows this frame (a checkout, a
|
|
@@ -29,12 +41,21 @@ export declare function AuthFrame({ children, footerVariant, backHref, art, }: {
|
|
|
29
41
|
*/
|
|
30
42
|
backHref?: string;
|
|
31
43
|
}): import("react").JSX.Element;
|
|
32
|
-
export declare function AuthCardShell({ title, description, children, footer, }: {
|
|
44
|
+
export declare function AuthCardShell({ title, description, children, footer, frame, }: {
|
|
33
45
|
title: string;
|
|
34
46
|
description: React.ReactNode;
|
|
35
47
|
children?: React.ReactNode;
|
|
36
48
|
/** Optional footer below the content (e.g. a "Back to sign in" link). */
|
|
37
49
|
footer?: React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* The host's sign-in frame (story pane, centered column, app tile), so a
|
|
52
|
+
* sub-flow matches the page it came from. A centered frame holds still.
|
|
53
|
+
*/
|
|
54
|
+
frame?: {
|
|
55
|
+
aside?: React.ReactNode;
|
|
56
|
+
centered?: boolean;
|
|
57
|
+
mark?: React.ReactNode;
|
|
58
|
+
};
|
|
38
59
|
}): import("react").JSX.Element;
|
|
39
60
|
/** Consistent "Back to sign in" link used across the auth sub-flows. */
|
|
40
61
|
export declare function BackToSignIn(): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useTranslations } from '../../i18n/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Shared quiet surface for the auth sub-flows (forgot / reset password).
|
|
@@ -12,12 +12,13 @@ import { CaretLeftIcon as ChevronLeft } from '@phosphor-icons/react';
|
|
|
12
12
|
import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
13
13
|
import { useDesktopBackTarget } from '../desktop/desktop-back-button.js';
|
|
14
14
|
import { AuthArt } from './auth-art.js';
|
|
15
|
-
import { AuthMobileLogo, Rise, StepHeader } from './auth-primitives.js';
|
|
15
|
+
import { AuthFrameContext, AuthMobileLogo, Rise, StepHeader } from './auth-primitives.js';
|
|
16
16
|
import { openExternalRoute } from '../lib/desktop.js';
|
|
17
|
+
import { cn } from '../lib/utils.js';
|
|
17
18
|
// The phone-verification page builds its own frame around a sign-out control.
|
|
18
19
|
export { AuthArt };
|
|
19
20
|
/** Tiny legal line pinned to the bottom of every auth surface: one sentence on every page. */
|
|
20
|
-
export function AuthLegalFooter() {
|
|
21
|
+
export function AuthLegalFooter({ centered = false } = {}) {
|
|
21
22
|
const t = useTranslations('auth');
|
|
22
23
|
const onLegalClick = (event, href) => {
|
|
23
24
|
if (openExternalRoute(href))
|
|
@@ -28,7 +29,9 @@ export function AuthLegalFooter() {
|
|
|
28
29
|
return (
|
|
29
30
|
// The same 380px column as the form, so the legal line shares its left
|
|
30
31
|
// edge. A link never breaks inside its name.
|
|
31
|
-
_jsx("footer", { className:
|
|
32
|
+
_jsx("footer", { className: cn('text-muted-foreground mx-auto w-full max-w-[380px] pb-8 text-xs text-balance',
|
|
33
|
+
// 12px, one step under the 13px floor: the product owner asked for a quieter legal line on /auth.
|
|
34
|
+
centered && 'text-center text-[0.75rem]'), children: t.rich('byContinuingYouAgree', {
|
|
32
35
|
termsOfService: () => terms,
|
|
33
36
|
privacyPolicy: () => privacy,
|
|
34
37
|
}) }));
|
|
@@ -41,12 +44,16 @@ export function AuthLegalFooter() {
|
|
|
41
44
|
*/
|
|
42
45
|
export function AuthFrame({ children, footerVariant = 'default', backHref,
|
|
43
46
|
// Off for now: the pane comes back by passing `art`.
|
|
44
|
-
art = false, }) {
|
|
47
|
+
art = false, aside, centered = false, mark, }) {
|
|
45
48
|
useDesktopBackTarget(backHref);
|
|
46
|
-
return (_jsxs("div", { className: "bg-background flex min-h-svh", children: [_jsxs("div", { className: "relative flex min-h-svh flex-1 flex-col px-6", children: [_jsx(AuthMobileLogo, {}), _jsx("main", { className: "flex flex-1 flex-col items-center justify-center py-24", children: _jsx("div", { className:
|
|
49
|
+
return (_jsxs("div", { className: "bg-background flex min-h-svh", children: [aside ? _jsx("div", { className: "sticky top-0 hidden h-svh w-1/2 shrink-0 lg:block", children: aside }) : null, _jsxs("div", { className: "relative flex min-h-svh flex-1 flex-col px-6", children: [_jsx(AuthMobileLogo, {}), _jsx("main", { className: "flex flex-1 flex-col items-center justify-center py-24", children: _jsx("div", { className: cn('w-full', centered ? 'max-w-[340px]' : 'max-w-[380px]'), children: _jsx(AuthFrameContext.Provider, { value: { centered, mark }, children: children }) }) }), footerVariant === 'none' ? null : centered ? (
|
|
50
|
+
// Out of flow, so the form centres on the full height, level with
|
|
51
|
+
// the story pane's headline. main's bottom padding clears it.
|
|
52
|
+
_jsx("div", { className: "absolute inset-x-0 bottom-0 px-6", children: _jsx(AuthLegalFooter, { centered: true }) })) : (_jsx(AuthLegalFooter, {}))] }), art ? _jsx(AuthArt, { className: "sticky top-0 hidden h-svh w-1/2 shrink-0 lg:block" }) : null] }));
|
|
47
53
|
}
|
|
48
|
-
export function AuthCardShell({ title, description, children, footer, }) {
|
|
49
|
-
|
|
54
|
+
export function AuthCardShell({ title, description, children, footer, frame, }) {
|
|
55
|
+
const body = (_jsxs(_Fragment, { children: [children, footer ? _jsx("div", { className: cn('mt-6', frame?.centered && 'text-center'), children: footer }) : null] }));
|
|
56
|
+
return (_jsx(AuthFrame, { aside: frame?.aside, centered: frame?.centered, mark: frame?.mark, children: frame?.centered ? (_jsxs(_Fragment, { children: [_jsx(StepHeader, { title: title, description: description }), body] })) : (_jsxs(_Fragment, { children: [_jsx(Rise, { children: _jsx(StepHeader, { title: title, description: description }) }), _jsx(Rise, { delay: 0.06, children: body })] })) }));
|
|
50
57
|
}
|
|
51
58
|
/** Consistent "Back to sign in" link used across the auth sub-flows. */
|
|
52
59
|
export function BackToSignIn() {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
/** @internal Kortix apps only. No semver: it may change in any release. */
|
|
2
2
|
export declare const AUTH_EASE: readonly [0.23, 1, 0.32, 1];
|
|
3
|
+
/**
|
|
4
|
+
* What the enclosing AuthFrame tells the steps inside it: whether the column
|
|
5
|
+
* is centered, and the mark a header shows by default. Every step header and
|
|
6
|
+
* quiet-link row in a centered frame lines up without per-step props.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AuthFrameContext: import("react").Context<{
|
|
9
|
+
centered: boolean;
|
|
10
|
+
mark?: React.ReactNode;
|
|
11
|
+
}>;
|
|
3
12
|
/** Gentle entrance: header first, body ~60ms behind. Opacity-only under reduced motion. */
|
|
4
13
|
export declare function Rise({ delay, className, children, }: {
|
|
5
14
|
delay?: number;
|
|
@@ -23,7 +32,7 @@ export declare function Rise({ delay, className, children, }: {
|
|
|
23
32
|
* traffic lights and the frame's Back control.
|
|
24
33
|
*/
|
|
25
34
|
export declare function AuthMobileLogo(): import("react").JSX.Element;
|
|
26
|
-
export declare function StepHeader({ title, description, mark, markOnMobile, }: {
|
|
35
|
+
export declare function StepHeader({ title, description, mark: markProp, markOnMobile, align: alignProp, }: {
|
|
27
36
|
/** A string, or a string led by a status mark (a decided approval). */
|
|
28
37
|
title: React.ReactNode;
|
|
29
38
|
/**
|
|
@@ -36,6 +45,8 @@ export declare function StepHeader({ title, description, mark, markOnMobile, }:
|
|
|
36
45
|
* where no corner logo stands in for it on mobile. */
|
|
37
46
|
markOnMobile?: boolean;
|
|
38
47
|
description?: React.ReactNode;
|
|
48
|
+
/** `center` centers the mark, title and description on one axis. */
|
|
49
|
+
align?: 'start' | 'center';
|
|
39
50
|
}): import("react").JSX.Element;
|
|
40
51
|
/** "or" between a provider button and the email form. */
|
|
41
52
|
export declare function OrDivider({ label }: {
|
|
@@ -55,10 +66,12 @@ export type QuietLink = {
|
|
|
55
66
|
* middots ("Use a password · Use SSO"). Falsy entries drop out; an empty row
|
|
56
67
|
* renders nothing.
|
|
57
68
|
*/
|
|
58
|
-
export declare function QuietLinks({ links, disabled, className, }: {
|
|
69
|
+
export declare function QuietLinks({ links, disabled, className, align: alignProp, }: {
|
|
59
70
|
links: Array<QuietLink | null | false | undefined>;
|
|
60
71
|
disabled?: boolean;
|
|
61
72
|
className?: string;
|
|
73
|
+
/** `center` centers the row and drops the lead middot instead of clipping it. */
|
|
74
|
+
align?: 'start' | 'center';
|
|
62
75
|
}): import("react").JSX.Element | null;
|
|
63
76
|
export declare function FieldLabel({ htmlFor, children }: {
|
|
64
77
|
htmlFor: string;
|
|
@@ -7,7 +7,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
7
7
|
*/
|
|
8
8
|
import { WarningIcon as DangerTriangleSolid, InfoIcon as InfoCircleSolid, } from '@phosphor-icons/react';
|
|
9
9
|
import { m, useReducedMotion } from 'motion/react';
|
|
10
|
-
import { useEffect, useRef } from 'react';
|
|
10
|
+
import { createContext, useContext, useEffect, useRef } from 'react';
|
|
11
11
|
import { inputFocusClasses, inputSurfaceClasses } from '../../primitives/input.js';
|
|
12
12
|
import { KortixLogo } from '../../primitives/kortix-logo.js';
|
|
13
13
|
import { Button } from '../../primitives/button.js';
|
|
@@ -17,6 +17,14 @@ import { useTranslations } from '../../i18n/index.js';
|
|
|
17
17
|
import { cn } from '../lib/utils.js';
|
|
18
18
|
import { UiLink as Link } from '../../providers/ui-provider.js';
|
|
19
19
|
export const AUTH_EASE = [0.23, 1, 0.32, 1];
|
|
20
|
+
/**
|
|
21
|
+
* What the enclosing AuthFrame tells the steps inside it: whether the column
|
|
22
|
+
* is centered, and the mark a header shows by default. Every step header and
|
|
23
|
+
* quiet-link row in a centered frame lines up without per-step props.
|
|
24
|
+
*/
|
|
25
|
+
export const AuthFrameContext = createContext({
|
|
26
|
+
centered: false,
|
|
27
|
+
});
|
|
20
28
|
/** Gentle entrance: header first, body ~60ms behind. Opacity-only under reduced motion. */
|
|
21
29
|
export function Rise({ delay = 0, className, children, }) {
|
|
22
30
|
const prefersReducedMotion = useReducedMotion();
|
|
@@ -43,8 +51,13 @@ export function AuthMobileLogo() {
|
|
|
43
51
|
const tHardcodedUi = useTranslations('hardcodedUi');
|
|
44
52
|
return (_jsx("div", { className: "kx-auth-mobile-logo absolute top-6 left-6 z-10 md:hidden", children: _jsx(Link, { href: "/", "aria-label": tHardcodedUi.raw('i18nComplete.text7ecec93ed268'), className: "hit-area-3 inline-flex", children: _jsx(KortixLogo, { variant: "icon", size: 22, className: "text-foreground" }) }) }));
|
|
45
53
|
}
|
|
46
|
-
export function StepHeader({ title, description, mark, markOnMobile = false, }) {
|
|
47
|
-
|
|
54
|
+
export function StepHeader({ title, description, mark: markProp, markOnMobile = false, align: alignProp, }) {
|
|
55
|
+
const frame = useContext(AuthFrameContext);
|
|
56
|
+
const align = alignProp ?? (frame.centered ? 'center' : 'start');
|
|
57
|
+
const mark = markProp ?? frame.mark;
|
|
58
|
+
return (_jsxs("div", { className: cn('mb-8', align === 'center' && 'text-center'), children: [mark ? (_jsx("div", { className: cn(markOnMobile ? 'block' : 'hidden md:block', align === 'center' && (markOnMobile ? 'flex justify-center' : 'md:flex md:justify-center')), children: mark })) : (_jsx(KortixLogo, { variant: "icon", size: 22, className: cn('text-foreground hidden md:block', align === 'center' && 'md:mx-auto') })), _jsx("h1", { className: cn('text-foreground text-2xl tracking-tight text-balance md:mt-6',
|
|
59
|
+
// The sign-in frame sets its headings in medium; other screens keep semibold.
|
|
60
|
+
frame.centered ? 'font-medium' : 'font-semibold', mark && markOnMobile && 'mt-6'), children: title }), description ? (_jsx("p", { className: "text-muted-foreground mt-2 text-sm text-pretty", children: description })) : null] }));
|
|
48
61
|
}
|
|
49
62
|
/** "or" between a provider button and the email form. */
|
|
50
63
|
export function OrDivider({ label }) {
|
|
@@ -55,14 +68,18 @@ export function OrDivider({ label }) {
|
|
|
55
68
|
* middots ("Use a password · Use SSO"). Falsy entries drop out; an empty row
|
|
56
69
|
* renders nothing.
|
|
57
70
|
*/
|
|
58
|
-
export function QuietLinks({ links, disabled = false, className, }) {
|
|
71
|
+
export function QuietLinks({ links, disabled = false, className, align: alignProp, }) {
|
|
72
|
+
const frame = useContext(AuthFrameContext);
|
|
73
|
+
const align = alignProp ?? (frame.centered ? 'center' : 'start');
|
|
59
74
|
const shown = links.filter(Boolean);
|
|
60
75
|
if (shown.length === 0)
|
|
61
76
|
return null;
|
|
62
77
|
// Every entry leads with its middot, and the row is pulled left by one
|
|
63
78
|
// middot's width and clipped: an entry that wraps to a new line starts
|
|
64
79
|
// clean, with no dot in front of it.
|
|
65
|
-
return (_jsx("div", { className: cn('text-muted-foreground mt-5 overflow-x-clip text-sm', className), children: _jsx("p", { className:
|
|
80
|
+
return (_jsx("div", { className: cn('text-muted-foreground mt-5 overflow-x-clip text-sm', className), children: _jsx("p", { className: cn('flex flex-wrap items-center gap-x-2', align === 'center'
|
|
81
|
+
? 'justify-center [&>span:first-child>span:first-child]:hidden'
|
|
82
|
+
: '-ml-4'), children: shown.map((link) => (_jsxs("span", { className: "flex items-center gap-x-2 whitespace-nowrap", children: [_jsx("span", { "aria-hidden": true, className: "w-2 text-center select-none", children: "\u00B7" }), link.onClick ? (_jsx("button", { type: "button", onClick: link.onClick, disabled: disabled || link.disabled, className: "hover:text-foreground -my-2 py-2 transition-colors disabled:opacity-50", children: link.label })) : (_jsx("span", { className: "tabular-nums", children: link.label })), link.hint ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": true, className: "select-none", children: "\u00B7" }), _jsx("span", { className: "tabular-nums", children: link.hint })] })) : null] }, link.key))) }) }));
|
|
66
83
|
}
|
|
67
84
|
export function FieldLabel({ htmlFor, children }) {
|
|
68
85
|
return (_jsx("label", { htmlFor: htmlFor, className: "text-foreground text-sm font-medium", children: children }));
|
|
@@ -36,15 +36,13 @@ export declare function ChromeCopyLink({ size, className }: {
|
|
|
36
36
|
}): import("react").JSX.Element;
|
|
37
37
|
/**
|
|
38
38
|
* The action that moves this browser forward: Connect once the extension is
|
|
39
|
-
* there, otherwise
|
|
40
|
-
*
|
|
39
|
+
* there, otherwise "Add to Chrome" (the Web Store listing). Renders nothing for
|
|
40
|
+
* a connected browser.
|
|
41
41
|
*/
|
|
42
|
-
export declare function ChromeInstallActions({ state, size, className,
|
|
42
|
+
export declare function ChromeInstallActions({ state, size, className, }: {
|
|
43
43
|
state: ChromeConnectState;
|
|
44
44
|
size?: 'sm' | 'lg';
|
|
45
45
|
className?: string;
|
|
46
|
-
/** The "How to install" link. Off where the page already links the docs. */
|
|
47
|
-
showGuide?: boolean;
|
|
48
46
|
}): import("react").JSX.Element | null;
|
|
49
47
|
/**
|
|
50
48
|
* The three steps and the one action that moves them. Used in the connect
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { platformConfig } from '@kortix/sdk';
|
|
4
4
|
import { useChromeConnections } from '@kortix/sdk/react';
|
|
5
|
-
import { AppWindowIcon,
|
|
5
|
+
import { AppWindowIcon, LinkSimpleIcon, PuzzlePieceIcon, SignInIcon, } from '@phosphor-icons/react';
|
|
6
6
|
import { useMutation, useQuery } from '@tanstack/react-query';
|
|
7
7
|
import { useState, useSyncExternalStore } from 'react';
|
|
8
8
|
import { Button } from '../../primitives/button.js';
|
|
@@ -16,7 +16,7 @@ import { useTranslations } from '../../i18n/index.js';
|
|
|
16
16
|
import { isDesktop } from '../lib/desktop.js';
|
|
17
17
|
import { cn } from '../lib/utils.js';
|
|
18
18
|
import { BrowserIcon, BrowserLogoTile } from './browser-icon.js';
|
|
19
|
-
import { apiOrigin,
|
|
19
|
+
import { apiOrigin, chromeSettingsLink, connectExtension, isChromiumBrowser, KORTIX_EXTENSION_STORE_URL, pingExtension, } from './extension.js';
|
|
20
20
|
const subscribeNever = () => () => { };
|
|
21
21
|
function detectEnvironment() {
|
|
22
22
|
return isChromiumBrowser(navigator.userAgent) && !isDesktop() ? 'supported' : 'unsupported';
|
|
@@ -101,10 +101,10 @@ export function ChromeCopyLink({ size = 'sm', className }) {
|
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* The action that moves this browser forward: Connect once the extension is
|
|
104
|
-
* there, otherwise
|
|
105
|
-
*
|
|
104
|
+
* there, otherwise "Add to Chrome" (the Web Store listing). Renders nothing for
|
|
105
|
+
* a connected browser.
|
|
106
106
|
*/
|
|
107
|
-
export function ChromeInstallActions({ state, size = 'sm', className,
|
|
107
|
+
export function ChromeInstallActions({ state, size = 'sm', className, }) {
|
|
108
108
|
const t = useTranslations('chrome');
|
|
109
109
|
const { checking, installed, connected, connect } = state;
|
|
110
110
|
const [openedStore, setOpenedStore] = useState(false);
|
|
@@ -114,10 +114,7 @@ export function ChromeInstallActions({ state, size = 'sm', className, showGuide
|
|
|
114
114
|
const connectButton = (_jsxs(Button, { size: size, className: full, disabled: connect.isPending, onClick: () => connect.mutate(), children: [connect.isPending ? _jsx(Loading, { className: "size-4 shrink-0" }) : null, connect.isPending ? t('connecting') : t('connect')] }));
|
|
115
115
|
if (installed)
|
|
116
116
|
return _jsx("div", { className: className, children: connectButton });
|
|
117
|
-
|
|
118
|
-
return (_jsxs("div", { className: cn('space-y-2', className), children: [_jsx(Button, { asChild: true, size: size, className: full, "aria-disabled": checking, children: _jsxs("a", { href: KORTIX_EXTENSION_STORE_URL, target: "_blank", rel: "noreferrer", onClick: () => setOpenedStore(true), children: [_jsx(ChromeButtonMark, {}), t('addToChrome')] }) }), openedStore ? (_jsx("p", { className: "text-muted-foreground text-center text-xs text-pretty", children: t('finishInChrome') })) : null] }));
|
|
119
|
-
}
|
|
120
|
-
return (_jsxs("div", { className: cn(size === 'lg' ? 'flex flex-col gap-2' : 'flex flex-wrap items-center gap-x-3 gap-y-2', className), children: [connectButton, showGuide ? (_jsx(Button, { asChild: true, variant: "ghost", size: size, className: cn('gap-1.5', size === 'sm' && 'text-muted-foreground'), children: _jsxs("a", { href: CHROME_INSTALL_DOCS_PATH, target: "_blank", rel: "noreferrer", children: [t('howToInstall'), _jsx(ArrowUpRightIcon, { className: "size-3.5 shrink-0" })] }) })) : null] }));
|
|
117
|
+
return (_jsxs("div", { className: cn('space-y-2', className), children: [_jsx(Button, { asChild: true, size: size, className: full, "aria-disabled": checking, children: _jsxs("a", { href: KORTIX_EXTENSION_STORE_URL, target: "_blank", rel: "noreferrer", onClick: () => setOpenedStore(true), children: [_jsx(ChromeButtonMark, {}), t('addToChrome')] }) }), openedStore ? (_jsx("p", { className: "text-muted-foreground text-center text-xs text-pretty", children: t('finishInChrome') })) : null] }));
|
|
121
118
|
}
|
|
122
119
|
/**
|
|
123
120
|
* The three steps and the one action that moves them. Used in the connect
|
|
@@ -135,7 +132,7 @@ export function ChromeConnectSteps({ state, onDone, showActions = true, }) {
|
|
|
135
132
|
key: 'install',
|
|
136
133
|
icon: PuzzlePieceIcon,
|
|
137
134
|
done: installed,
|
|
138
|
-
description: installed ?
|
|
135
|
+
description: t(installed ? 'steps.install.done' : 'steps.install.description'),
|
|
139
136
|
},
|
|
140
137
|
{
|
|
141
138
|
key: 'connect',
|
|
@@ -8,15 +8,8 @@
|
|
|
8
8
|
* and the desktop shell never expose it, so `pingExtension` answers `null`.
|
|
9
9
|
*/
|
|
10
10
|
export declare const KORTIX_EXTENSION_ID: string;
|
|
11
|
+
/** The public Chrome Web Store listing (since 2026-11-21). */
|
|
11
12
|
export declare const KORTIX_EXTENSION_STORE_URL: string;
|
|
12
|
-
/**
|
|
13
|
-
* The Web Store listing is public. While `false`, no surface offers "Add to
|
|
14
|
-
* Chrome": each one shows "Connect" and a "How to install" link to the docs.
|
|
15
|
-
* Flip it with the listing, nothing else changes.
|
|
16
|
-
*/
|
|
17
|
-
export declare const CHROME_STORE_LISTED = false;
|
|
18
|
-
/** Where "How to install" points: the docs page that explains Load unpacked. */
|
|
19
|
-
export declare const CHROME_INSTALL_DOCS_PATH = "/docs/connect/chrome";
|
|
20
13
|
/** Opens Settings → Kortix in Chrome. The link a person copies to open it in Chrome. */
|
|
21
14
|
export declare function chromeSettingsLink(origin: string): string;
|
|
22
15
|
export interface ExtensionStatus {
|
|
@@ -7,15 +7,8 @@
|
|
|
7
7
|
* and the desktop shell never expose it, so `pingExtension` answers `null`.
|
|
8
8
|
*/
|
|
9
9
|
export const KORTIX_EXTENSION_ID = process.env.NEXT_PUBLIC_KORTIX_EXTENSION_ID || 'gefbbnjgoiljpbnalgafbhbfdhikgjek';
|
|
10
|
+
/** The public Chrome Web Store listing (since 2026-11-21). */
|
|
10
11
|
export const KORTIX_EXTENSION_STORE_URL = `https://chromewebstore.google.com/detail/${KORTIX_EXTENSION_ID}`;
|
|
11
|
-
/**
|
|
12
|
-
* The Web Store listing is public. While `false`, no surface offers "Add to
|
|
13
|
-
* Chrome": each one shows "Connect" and a "How to install" link to the docs.
|
|
14
|
-
* Flip it with the listing, nothing else changes.
|
|
15
|
-
*/
|
|
16
|
-
export const CHROME_STORE_LISTED = false;
|
|
17
|
-
/** Where "How to install" points: the docs page that explains Load unpacked. */
|
|
18
|
-
export const CHROME_INSTALL_DOCS_PATH = '/docs/connect/chrome';
|
|
19
12
|
/** Opens Settings → Kortix in Chrome. The link a person copies to open it in Chrome. */
|
|
20
13
|
export function chromeSettingsLink(origin) {
|
|
21
14
|
return `${origin}/settings/chrome`;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
/** @internal Kortix apps only. No semver: it may change in any release. */
|
|
2
|
-
/**
|
|
3
|
-
* The web app's master switch for Kortix in Chrome. Off, no surface renders
|
|
4
|
-
* and nothing calls /v1/chrome/*: no Settings page, no command-palette entry,
|
|
5
|
-
* no sidebar row and no card in Apps and extensions. Off on every deployment
|
|
6
|
-
* until launch: a person must not see a Chrome surface before the Chrome Web
|
|
7
|
-
* Store listing is public. Set true to bring the
|
|
8
|
-
* surfaces back where the API serves the routes. The value is
|
|
9
|
-
* `CHROME_LAUNCHED`, which the API and the CLI read too.
|
|
10
|
-
*/
|
|
11
|
-
export declare const CHROME_UI_ENABLED = false;
|
|
12
2
|
/**
|
|
13
3
|
* Whether this platform offers Kortix in Chrome at all. The API answers 404
|
|
14
4
|
* on /v1/chrome/* where KORTIX_CHROME_ENABLED is off (a self-hosted server), so the
|
|
15
5
|
* account-level surfaces — Settings → Kortix in Chrome and its command-palette
|
|
16
6
|
* entry — show only once the browser list answers. Project surfaces read the
|
|
17
|
-
* project's `chrome` flag
|
|
7
|
+
* project's `chrome` flag instead.
|
|
8
|
+
*
|
|
9
|
+
* `true` once the browser list answers, `false` when it fails, `undefined`
|
|
10
|
+
* while it loads: a page opened at `/settings/chrome` waits for the answer
|
|
11
|
+
* instead of falling back to another tab.
|
|
18
12
|
*
|
|
19
13
|
* `enabled`: ask only while the surface that needs the answer is open.
|
|
20
14
|
*/
|
|
21
|
-
export declare function useChromeOffered(enabled?: boolean): boolean;
|
|
15
|
+
export declare function useChromeOffered(enabled?: boolean): boolean | undefined;
|
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { listChromeConnections } from '@kortix/sdk';
|
|
3
3
|
import { chromeKeys } from '@kortix/sdk/react';
|
|
4
|
-
import { CHROME_LAUNCHED } from '../../_vendor/kortix-shared.js';
|
|
5
4
|
import { useQuery } from '@tanstack/react-query';
|
|
6
|
-
/**
|
|
7
|
-
* The web app's master switch for Kortix in Chrome. Off, no surface renders
|
|
8
|
-
* and nothing calls /v1/chrome/*: no Settings page, no command-palette entry,
|
|
9
|
-
* no sidebar row and no card in Apps and extensions. Off on every deployment
|
|
10
|
-
* until launch: a person must not see a Chrome surface before the Chrome Web
|
|
11
|
-
* Store listing is public. Set true to bring the
|
|
12
|
-
* surfaces back where the API serves the routes. The value is
|
|
13
|
-
* `CHROME_LAUNCHED`, which the API and the CLI read too.
|
|
14
|
-
*/
|
|
15
|
-
export const CHROME_UI_ENABLED = CHROME_LAUNCHED;
|
|
16
5
|
/**
|
|
17
6
|
* Whether this platform offers Kortix in Chrome at all. The API answers 404
|
|
18
7
|
* on /v1/chrome/* where KORTIX_CHROME_ENABLED is off (a self-hosted server), so the
|
|
19
8
|
* account-level surfaces — Settings → Kortix in Chrome and its command-palette
|
|
20
9
|
* entry — show only once the browser list answers. Project surfaces read the
|
|
21
|
-
* project's `chrome` flag
|
|
10
|
+
* project's `chrome` flag instead.
|
|
11
|
+
*
|
|
12
|
+
* `true` once the browser list answers, `false` when it fails, `undefined`
|
|
13
|
+
* while it loads: a page opened at `/settings/chrome` waits for the answer
|
|
14
|
+
* instead of falling back to another tab.
|
|
22
15
|
*
|
|
23
16
|
* `enabled`: ask only while the surface that needs the answer is open.
|
|
24
17
|
*/
|
|
25
18
|
export function useChromeOffered(enabled = true) {
|
|
26
|
-
|
|
19
|
+
const query = useQuery({
|
|
27
20
|
queryKey: chromeKeys.list(),
|
|
28
21
|
queryFn: listChromeConnections,
|
|
29
|
-
enabled
|
|
22
|
+
enabled,
|
|
30
23
|
staleTime: 60_000,
|
|
31
24
|
retry: false,
|
|
32
|
-
})
|
|
25
|
+
});
|
|
26
|
+
if (query.isSuccess)
|
|
27
|
+
return true;
|
|
28
|
+
if (query.isError)
|
|
29
|
+
return false;
|
|
30
|
+
return undefined;
|
|
33
31
|
}
|
|
@@ -22,9 +22,10 @@ export declare function agentMarkTileClass(slug: string): string | undefined;
|
|
|
22
22
|
/** The bare pixel figure, painted with `--mark-ink` from an ancestor. A 7 × 7
|
|
23
23
|
* mark fills `size`; a wider reserved grid (My Kortix's 12 × 10 symbol) keeps
|
|
24
24
|
* whole-pixel cells, `floor(size / 12)` px each. */
|
|
25
|
-
export declare function AgentMarkGlyph({ slug, size }: {
|
|
25
|
+
export declare function AgentMarkGlyph({ slug, size, trim }: {
|
|
26
26
|
slug: string;
|
|
27
27
|
size: AgentMarkSize;
|
|
28
|
+
trim?: boolean;
|
|
28
29
|
}): import("react").JSX.Element;
|
|
29
30
|
/**
|
|
30
31
|
* An agent's pixel mark on its tile — the agent's face wherever it appears:
|
|
@@ -30,16 +30,27 @@ export function agentMarkVars(slug) {
|
|
|
30
30
|
export function agentMarkTileClass(slug) {
|
|
31
31
|
return pixelMark(slug).tone.name === 'brand' ? 'ring-1 ring-inset ring-border' : undefined;
|
|
32
32
|
}
|
|
33
|
+
/** The first row that holds a pixel and how many rows down to the last one. Paths are `Mx yhNv1h-Nz` runs. */
|
|
34
|
+
function inkedRows(path, dither, height) {
|
|
35
|
+
const ys = [...`${path}${dither ?? ''}`.matchAll(/M\d+ (\d+)/g)].map((match) => Number(match[1]));
|
|
36
|
+
if (ys.length === 0)
|
|
37
|
+
return [0, height];
|
|
38
|
+
const top = Math.min(...ys);
|
|
39
|
+
return [top, Math.max(...ys) + 1 - top];
|
|
40
|
+
}
|
|
33
41
|
/** The bare pixel figure, painted with `--mark-ink` from an ancestor. A 7 × 7
|
|
34
42
|
* mark fills `size`; a wider reserved grid (My Kortix's 12 × 10 symbol) keeps
|
|
35
43
|
* whole-pixel cells, `floor(size / 12)` px each. */
|
|
36
|
-
export function AgentMarkGlyph({ slug, size }) {
|
|
44
|
+
export function AgentMarkGlyph({ slug, size, trim = false }) {
|
|
37
45
|
const mark = pixelMark(slug);
|
|
38
46
|
const cell = mark.width === 7 ? size / 7 : Math.max(1, Math.floor(size / 12));
|
|
39
|
-
|
|
47
|
+
// `trim`: only the rows that hold pixels, so a mark with an empty bottom row
|
|
48
|
+
// centres on what is drawn, not on its reserved grid.
|
|
49
|
+
const [top, rows] = trim ? inkedRows(mark.path, mark.ditherPath, mark.height) : [0, mark.height];
|
|
50
|
+
return (_jsxs("svg", { "aria-hidden": true, width: mark.width * cell, height: rows * cell, viewBox: `0 ${top} ${mark.width} ${rows}`,
|
|
40
51
|
// Inline, so a host's `[&_svg]:size-4` default (menu rows) cannot rescale
|
|
41
52
|
// the pixel grid off whole device pixels.
|
|
42
|
-
style: { width: mark.width * cell, height:
|
|
53
|
+
style: { width: mark.width * cell, height: rows * cell }, shapeRendering: "crispEdges", className: "shrink-0", children: [_jsx("path", { d: mark.path, className: "fill-(--mark-ink)" }), mark.ditherPath ? (_jsx("path", { d: mark.ditherPath, className: "fill-(--mark-ink)", opacity: 0.5 })) : null] }));
|
|
43
54
|
}
|
|
44
55
|
/**
|
|
45
56
|
* An agent's pixel mark on its tile — the agent's face wherever it appears:
|
|
@@ -61,6 +61,6 @@ export declare function useSessionsAwaitingAnswer(projectId: string): ReadonlySe
|
|
|
61
61
|
* What waits on the person in this workspace's Review: the review summary's
|
|
62
62
|
* "needs you", plus the agents' questions and permission asks
|
|
63
63
|
* (`useSessionAsks`). Connector approvals are already in the summary. The
|
|
64
|
-
* sidebar's Review row (`project-
|
|
64
|
+
* sidebar's Review row (`project-review-nav`) shows this number.
|
|
65
65
|
*/
|
|
66
66
|
export declare function useReviewNeedsYouCount(projectId: string): number;
|
|
@@ -97,7 +97,7 @@ export function useSessionsAwaitingAnswer(projectId) {
|
|
|
97
97
|
* What waits on the person in this workspace's Review: the review summary's
|
|
98
98
|
* "needs you", plus the agents' questions and permission asks
|
|
99
99
|
* (`useSessionAsks`). Connector approvals are already in the summary. The
|
|
100
|
-
* sidebar's Review row (`project-
|
|
100
|
+
* sidebar's Review row (`project-review-nav`) shows this number.
|
|
101
101
|
*/
|
|
102
102
|
export function useReviewNeedsYouCount(projectId) {
|
|
103
103
|
const reviewNeedsYou = useReviewSessionSummary(projectId, { enabled: !!projectId }).totalNeedsYou;
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
import { HoverPrefetchLink } from '../components/hover-prefetch-link.js';
|
|
3
3
|
import type { ComponentProps, ReactNode } from 'react';
|
|
4
4
|
/** Keep the anchor's intent handlers and the caller's active-route semantics. */
|
|
5
|
-
export declare function ProjectNavRow({ active, label, className, children, ...link }: ComponentProps<typeof HoverPrefetchLink> & {
|
|
5
|
+
export declare function ProjectNavRow({ active, label, className, itemClassName, children, ...link }: ComponentProps<typeof HoverPrefetchLink> & {
|
|
6
6
|
active: boolean;
|
|
7
7
|
label: string;
|
|
8
8
|
/** Added to the row button's classes. */
|
|
9
9
|
className?: string;
|
|
10
|
+
/** Added to the list item's classes (spacing around the row). */
|
|
11
|
+
itemClassName?: string;
|
|
10
12
|
children: ReactNode;
|
|
11
13
|
}): import("react").JSX.Element;
|
|
@@ -5,10 +5,10 @@ import { SidebarMenuButton, SidebarMenuItem, useSidebar } from '../../primitives
|
|
|
5
5
|
import { useIsMobile } from '../hooks/index.js';
|
|
6
6
|
import { cn } from '../lib/utils.js';
|
|
7
7
|
/** Keep the anchor's intent handlers and the caller's active-route semantics. */
|
|
8
|
-
export function ProjectNavRow({ active, label, className, children, ...link }) {
|
|
8
|
+
export function ProjectNavRow({ active, label, className, itemClassName, children, ...link }) {
|
|
9
9
|
const isMobile = useIsMobile();
|
|
10
10
|
const { setOpenMobile } = useSidebar();
|
|
11
|
-
return (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { asChild: true, isActive: active, tooltip: label, className: cn('group/menu-button text-sidebar-foreground relative', className), children: _jsx(HoverPrefetchLink, { ...link, onClick: (event) => {
|
|
11
|
+
return (_jsx(SidebarMenuItem, { className: itemClassName, children: _jsx(SidebarMenuButton, { asChild: true, isActive: active, tooltip: label, className: cn('group/menu-button text-sidebar-foreground relative', className), children: _jsx(HoverPrefetchLink, { ...link, onClick: (event) => {
|
|
12
12
|
link.onClick?.(event);
|
|
13
13
|
if (isMobile)
|
|
14
14
|
setOpenMobile(false);
|
|
@@ -21,8 +21,9 @@ import { SidebarToggle } from './sidebar-toggle.js';
|
|
|
21
21
|
export const PROJECT_PAGE_HEADER_CLASS = 'kx-titlebar-row kx-capability-titlebar border-border relative flex h-12 shrink-0 items-center gap-2 border-b px-3';
|
|
22
22
|
export function ProjectPageHeader({ title, titleAccessory, breadcrumb, children, }) {
|
|
23
23
|
const sidebar = useOptionalSidebar();
|
|
24
|
-
// Inside Workspace settings (Repository) the
|
|
25
|
-
//
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
// Inside Workspace settings (Repository) this row is the page header: its
|
|
25
|
+
// h1 reads the settings rail word, so no second heading sits above it, and
|
|
26
|
+
// the settings title bar owns the one sidebar opener.
|
|
27
|
+
const settingsTitle = useSettingsPageTitle();
|
|
28
|
+
return (_jsxs("div", { className: PROJECT_PAGE_HEADER_CLASS, "data-sidebar-collapsed": sidebar?.state === 'collapsed' || undefined, children: [settingsTitle === null ? _jsx(SidebarToggle, {}) : null, _jsxs("div", { className: "kx-titlebar-tabs flex h-full min-w-0 flex-1 items-center gap-1.5", children: [breadcrumb, _jsx("h1", { className: "text-foreground truncate text-sm font-medium", children: settingsTitle ?? title }), titleAccessory] }), children ? _jsx("div", { className: "flex shrink-0 items-center gap-2", children: children }) : null] }));
|
|
28
29
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @internal Kortix apps only. No semver: it may change in any release. */
|
|
2
2
|
import { type DarkThemeId, type LightThemeId } from '../lib/interface-theme-defaults.js';
|
|
3
|
+
import type { CustomWallpaperConfig, GradientWallpaperId, PresetOverride, PresetOverrides } from '../../theme/wallpaper-gradients.js';
|
|
3
4
|
/** Which modifier key is used for tab switching (Cmd+1..9 or Ctrl+1..9) */
|
|
4
5
|
export type TabSwitchModifier = 'meta' | 'ctrl';
|
|
5
6
|
/** Session panel presentation: 'easy' = plain-language cards, 'advanced' = the tool stepper */
|
|
@@ -30,6 +31,18 @@ export interface UserPreferences {
|
|
|
30
31
|
darkTheme: DarkThemeId;
|
|
31
32
|
/** Selected desktop wallpaper ID */
|
|
32
33
|
wallpaperId: string;
|
|
34
|
+
/**
|
|
35
|
+
* The user's own gradient, drawn when `wallpaperId` is 'custom'. Legacy
|
|
36
|
+
* persisted preferences predate this key: read sites go through
|
|
37
|
+
* `normalizeCustomWallpaper`.
|
|
38
|
+
*/
|
|
39
|
+
customWallpaper?: CustomWallpaperConfig;
|
|
40
|
+
/**
|
|
41
|
+
* Colours and finish picked for a gradient preset, by preset id. Legacy
|
|
42
|
+
* persisted preferences predate this key: read sites go through
|
|
43
|
+
* `normalizePresetOverrides`.
|
|
44
|
+
*/
|
|
45
|
+
wallpaperOverrides?: PresetOverrides;
|
|
33
46
|
/** Session action panel mode — defaults to 'easy' for all users */
|
|
34
47
|
panelMode: PanelMode;
|
|
35
48
|
/**
|
|
@@ -61,6 +74,10 @@ interface UserPreferencesState {
|
|
|
61
74
|
setDarkTheme: (theme: DarkThemeId) => void;
|
|
62
75
|
/** Set the active desktop wallpaper by ID */
|
|
63
76
|
setWallpaperId: (wallpaperId: string) => void;
|
|
77
|
+
/** Replace the custom wallpaper's pattern, finish and colors */
|
|
78
|
+
setCustomWallpaper: (customWallpaper: CustomWallpaperConfig) => void;
|
|
79
|
+
/** Change a gradient preset's colours or finish; null restores it as shipped */
|
|
80
|
+
setWallpaperOverride: (id: GradientWallpaperId, override: PresetOverride | null) => void;
|
|
64
81
|
/** Flip between easy and advanced */
|
|
65
82
|
togglePanelMode: () => void;
|
|
66
83
|
/** Set the conversation density */
|
|
@@ -39,6 +39,11 @@ export const useUserPreferencesStore = create()(persist((set, get) => ({
|
|
|
39
39
|
setLightTheme: (lightTheme) => get().patchPreferences({ lightTheme }),
|
|
40
40
|
setDarkTheme: (darkTheme) => get().patchPreferences({ darkTheme }),
|
|
41
41
|
setWallpaperId: (wallpaperId) => get().patchPreferences({ wallpaperId }),
|
|
42
|
+
setCustomWallpaper: (customWallpaper) => get().patchPreferences({ customWallpaper }),
|
|
43
|
+
setWallpaperOverride: (id, override) => {
|
|
44
|
+
const { [id]: _removed, ...rest } = get().preferences.wallpaperOverrides ?? {};
|
|
45
|
+
get().patchPreferences({ wallpaperOverrides: override ? { ...rest, [id]: override } : rest });
|
|
46
|
+
},
|
|
42
47
|
togglePanelMode: () => {
|
|
43
48
|
const current = get().preferences;
|
|
44
49
|
// Legacy users' persisted preferences predate this key entirely, so
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { type SecretSetupLinkInfo } from '@kortix/sdk';
|
|
1
2
|
/**
|
|
2
3
|
* Renders the fields an agent-minted secret link asks for, and submits the
|
|
3
4
|
* values the human types. Shared by the public /secret-intake/[token] page and
|
|
4
5
|
* the in-chat modal. The value is write-only — it's never read back here.
|
|
5
6
|
*/
|
|
6
|
-
export declare function SecretIntakeForm({ token, onDone, compact, }: {
|
|
7
|
+
export declare function SecretIntakeForm({ token, onDone, compact, onLinkInfo, }: {
|
|
7
8
|
token: string;
|
|
8
9
|
onDone?: () => void;
|
|
10
|
+
/** Called once with what the link asks for, so a host can title its dialog. */
|
|
11
|
+
onLinkInfo?: (info: SecretSetupLinkInfo) => void;
|
|
9
12
|
/**
|
|
10
13
|
* The host already states the encryption promise (the in-chat modal header),
|
|
11
14
|
* so the footnote keeps only the expiry.
|