@opengeni/react 0.44.3 → 0.44.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/README.md +42 -0
- package/dist/chunk-22KP6LR5.js +31 -0
- package/dist/{chunk-TK7G6XLT.js.map → chunk-22KP6LR5.js.map} +1 -1
- package/dist/{chunk-SXIQK54Z.js → chunk-6EDV6YFE.js} +8 -8
- package/dist/{chunk-SXIQK54Z.js.map → chunk-6EDV6YFE.js.map} +1 -1
- package/dist/{chunk-U6K24XQD.js → chunk-EHSYZ4KP.js} +37 -16
- package/dist/chunk-EHSYZ4KP.js.map +1 -0
- package/dist/chunk-JB5725BI.js +48 -0
- package/dist/chunk-JB5725BI.js.map +1 -0
- package/dist/{chunk-QQRM3DO3.js → chunk-L3EWO3UK.js} +6 -6
- package/dist/{chunk-QQRM3DO3.js.map → chunk-L3EWO3UK.js.map} +1 -1
- package/dist/{chunk-YNYIAYXQ.js → chunk-LYRJUU5V.js} +23 -23
- package/dist/chunk-LYRJUU5V.js.map +1 -0
- package/dist/{chunk-ATSTR5P3.js → chunk-U3CSCMWA.js} +5 -49
- package/dist/chunk-U3CSCMWA.js.map +1 -0
- package/dist/{chunk-YDNWMKXO.js → chunk-VCBFUSUZ.js} +4 -4
- package/dist/chunk-VCBFUSUZ.js.map +1 -0
- package/dist/components/model-policy-picker.d.ts +10 -1
- package/dist/composer.js +5 -4
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/machines.js +2 -2
- package/dist/{queue-surface-implementation-THPAKGMD.js → queue-surface-implementation-J4XJFKRW.js} +41 -26
- package/dist/queue-surface-implementation-J4XJFKRW.js.map +1 -0
- package/dist/realtime/dropdown-menu.d.ts +4 -4
- package/dist/realtime.js +58 -20
- package/dist/realtime.js.map +1 -1
- package/dist/session-ui.js +5 -4
- package/package.json +1 -1
- package/src/components/composer.tsx +3 -3
- package/src/components/enrollment-device-flow.tsx +2 -2
- package/src/components/message-timeline.tsx +15 -15
- package/src/components/model-policy-picker.tsx +47 -14
- package/src/components/queue-surface-implementation.tsx +28 -18
- package/src/components/queue-surface-state.tsx +3 -3
- package/src/components/queue-surface.tsx +2 -2
- package/src/components/session-status.tsx +1 -1
- package/src/lib/cn.ts +14 -1
- package/src/lib/use-portal-token-style.ts +1 -1
- package/src/provider.tsx +4 -4
- package/src/realtime/dropdown-menu.tsx +51 -8
- package/src/realtime/realtime-control.tsx +2 -2
- package/styles/index.css +91 -11
- package/styles/tokens.css +61 -0
- package/dist/chunk-ATSTR5P3.js.map +0 -1
- package/dist/chunk-TK7G6XLT.js +0 -18
- package/dist/chunk-U6K24XQD.js.map +0 -1
- package/dist/chunk-YDNWMKXO.js.map +0 -1
- package/dist/chunk-YNYIAYXQ.js.map +0 -1
- package/dist/queue-surface-implementation-THPAKGMD.js.map +0 -1
|
@@ -7,9 +7,12 @@ import {
|
|
|
7
7
|
projectClientModelRows,
|
|
8
8
|
runnableLatencyModesForModel
|
|
9
9
|
} from "./chunk-23EJ676W.js";
|
|
10
|
+
import {
|
|
11
|
+
usePortalTokenStyle
|
|
12
|
+
} from "./chunk-JB5725BI.js";
|
|
10
13
|
import {
|
|
11
14
|
cn
|
|
12
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-22KP6LR5.js";
|
|
13
16
|
|
|
14
17
|
// src/components/model-policy-picker.tsx
|
|
15
18
|
import {
|
|
@@ -22,7 +25,12 @@ import {
|
|
|
22
25
|
} from "lucide-react";
|
|
23
26
|
import { motion, useReducedMotion } from "motion/react";
|
|
24
27
|
import { DropdownMenu } from "radix-ui";
|
|
25
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
useEffect,
|
|
30
|
+
useMemo,
|
|
31
|
+
useRef,
|
|
32
|
+
useState
|
|
33
|
+
} from "react";
|
|
26
34
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
35
|
var defaultModelPolicyPickerMessages = {
|
|
28
36
|
label: "Model and effort",
|
|
@@ -124,14 +132,14 @@ function PickerNavRow(props) {
|
|
|
124
132
|
onClick: props.onClick,
|
|
125
133
|
"data-testid": props.testId,
|
|
126
134
|
className: cn(
|
|
127
|
-
"flex w-full cursor-pointer items-center gap-2 rounded-og-sm px-
|
|
135
|
+
"flex w-full cursor-pointer items-center gap-2 rounded-og-sm px-[var(--og-model-picker-row-padding-x)] py-[var(--og-model-picker-row-padding-y)] text-left text-og-fg outline-none transition-colors hover:bg-og-surface-2 focus-visible:ring-2 focus-visible:ring-og-accent/40",
|
|
128
136
|
props.disabled && "cursor-not-allowed opacity-50"
|
|
129
137
|
),
|
|
130
138
|
children: [
|
|
131
139
|
props.icon,
|
|
132
140
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
133
|
-
/* @__PURE__ */ jsx("span", { className: cn("block truncate text-
|
|
134
|
-
props.hint ? /* @__PURE__ */ jsx("span", { className: "mt-0.5 block truncate text-
|
|
141
|
+
/* @__PURE__ */ jsx("span", { className: cn("block truncate text-og-menu", props.active && "font-medium"), children: props.label }),
|
|
142
|
+
props.hint ? /* @__PURE__ */ jsx("span", { className: "mt-0.5 block truncate text-og-control text-og-fg-subtle", children: props.hint }) : null
|
|
135
143
|
] }),
|
|
136
144
|
props.trailing ? /* @__PURE__ */ jsx("span", { className: "ml-auto shrink-0", children: props.trailing }) : null,
|
|
137
145
|
props.showChevron === false ? null : /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-3.5 shrink-0 text-og-fg-subtle" })
|
|
@@ -151,7 +159,7 @@ function PickerBackHeader(props) {
|
|
|
151
159
|
children: [
|
|
152
160
|
/* @__PURE__ */ jsx(ChevronLeftIcon, { className: "size-3.5 shrink-0 text-og-fg-subtle" }),
|
|
153
161
|
props.icon,
|
|
154
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-
|
|
162
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-og-menu font-medium", children: props.label })
|
|
155
163
|
]
|
|
156
164
|
}
|
|
157
165
|
),
|
|
@@ -213,9 +221,9 @@ function ModelPolicyPickerMenu(props) {
|
|
|
213
221
|
const pageKey = effectiveNav.level === "providers" ? "providers" : effectiveNav.level === "models" ? `models:${effectiveNav.rail ?? ""}` : `thinking:${effectiveNav.modelId ?? ""}`;
|
|
214
222
|
let body;
|
|
215
223
|
if (props.loading) {
|
|
216
|
-
body = /* @__PURE__ */ jsx("p", { className: "px-2 py-3 text-
|
|
224
|
+
body = /* @__PURE__ */ jsx("p", { className: "px-2 py-3 text-og-control text-og-fg-subtle", children: messages.loading });
|
|
217
225
|
} else if (groups.length === 0) {
|
|
218
|
-
body = /* @__PURE__ */ jsx("p", { className: "px-2 py-3 text-
|
|
226
|
+
body = /* @__PURE__ */ jsx("p", { className: "px-2 py-3 text-og-control text-og-fg-subtle", children: messages.noModels });
|
|
219
227
|
} else if (effectiveNav.level === "providers") {
|
|
220
228
|
body = /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", "data-testid": "model-picker-providers", children: groups.map((group) => /* @__PURE__ */ jsx(
|
|
221
229
|
PickerNavRow,
|
|
@@ -304,8 +312,8 @@ function ModelPolicyPickerMenu(props) {
|
|
|
304
312
|
) : null
|
|
305
313
|
}
|
|
306
314
|
),
|
|
307
|
-
/* @__PURE__ */ jsx("p", { className: "px-2.5 pt-1 pb-1 text-
|
|
308
|
-
focusModel.catalog.capabilities?.inputModalities.includes("image") === false ? /* @__PURE__ */ jsx("p", { className: "px-2.5 pb-1.5 text-
|
|
315
|
+
/* @__PURE__ */ jsx("p", { className: "px-2.5 pt-1 pb-1 text-og-control font-medium tracking-wide text-og-fg-subtle uppercase", children: messages.thinking }),
|
|
316
|
+
focusModel.catalog.capabilities?.inputModalities.includes("image") === false ? /* @__PURE__ */ jsx("p", { className: "px-2.5 pb-1.5 text-og-control leading-relaxed text-og-fg-subtle", children: "Unsupported attachments stay in the session but are hidden from this model." }) : null,
|
|
309
317
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children: effortOptionsForModel(focusModel.catalog).map((effort) => {
|
|
310
318
|
const selected = activeModel && effort === props.effort;
|
|
311
319
|
return /* @__PURE__ */ jsxs(
|
|
@@ -315,7 +323,7 @@ function ModelPolicyPickerMenu(props) {
|
|
|
315
323
|
disabled: !focusModel.selectable,
|
|
316
324
|
onClick: () => selectEffort(focusModel, effort),
|
|
317
325
|
className: cn(
|
|
318
|
-
"flex h-
|
|
326
|
+
"flex h-[var(--og-model-picker-effort-height)] w-full cursor-pointer items-center rounded-og-sm px-[var(--og-model-picker-row-padding-x)] text-left text-og-menu text-og-fg outline-none transition-colors hover:bg-og-surface-2 focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:cursor-not-allowed disabled:opacity-50",
|
|
319
327
|
selected && "bg-og-surface-2"
|
|
320
328
|
),
|
|
321
329
|
children: [
|
|
@@ -347,12 +355,19 @@ function ModelPolicyPickerMenu(props) {
|
|
|
347
355
|
)) });
|
|
348
356
|
}
|
|
349
357
|
return /* @__PURE__ */ jsxs("div", { "data-testid": "model-picker-menu", className: "relative overflow-hidden", children: [
|
|
350
|
-
props.error ? /* @__PURE__ */ jsx("p", { className: "px-2 py-1 text-
|
|
358
|
+
props.error ? /* @__PURE__ */ jsx("p", { className: "px-2 py-1 text-og-control text-og-status-failed", role: "alert", children: props.error }) : null,
|
|
351
359
|
/* @__PURE__ */ jsx(PickerAnimatedPage, { pageKey, direction, children: body })
|
|
352
360
|
] });
|
|
353
361
|
}
|
|
354
362
|
function ModelPolicyPicker(props) {
|
|
355
|
-
const [
|
|
363
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(props.defaultOpen ?? false);
|
|
364
|
+
const open = props.open ?? uncontrolledOpen;
|
|
365
|
+
const setOpen = (next) => {
|
|
366
|
+
if (props.open === void 0) setUncontrolledOpen(next);
|
|
367
|
+
props.onOpenChange?.(next);
|
|
368
|
+
};
|
|
369
|
+
const triggerRef = useRef(null);
|
|
370
|
+
const portalStyle = usePortalTokenStyle(triggerRef);
|
|
356
371
|
const messages = useMemo(
|
|
357
372
|
() => ({ ...defaultModelPolicyPickerMessages, ...props.messages }),
|
|
358
373
|
[props.messages]
|
|
@@ -377,11 +392,12 @@ function ModelPolicyPicker(props) {
|
|
|
377
392
|
/* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
378
393
|
"button",
|
|
379
394
|
{
|
|
395
|
+
ref: triggerRef,
|
|
380
396
|
type: "button",
|
|
381
397
|
disabled: props.disabled,
|
|
382
398
|
"aria-label": messages.label,
|
|
383
399
|
className: cn(
|
|
384
|
-
"inline-flex h-
|
|
400
|
+
"og-root inline-flex h-[var(--og-model-picker-trigger-height)] min-w-0 max-w-64 items-center gap-1 rounded-full border border-transparent px-2.5 text-og-control text-og-fg-muted outline-none transition-colors hover:border-og-border hover:bg-og-surface-2 hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:cursor-not-allowed disabled:opacity-50 max-sm:h-[var(--og-model-picker-trigger-height-mobile)] max-sm:max-w-[7.5rem] max-sm:px-2",
|
|
385
401
|
props.className
|
|
386
402
|
),
|
|
387
403
|
children: [
|
|
@@ -415,7 +431,12 @@ function ModelPolicyPicker(props) {
|
|
|
415
431
|
sideOffset: 8,
|
|
416
432
|
collisionPadding: 12,
|
|
417
433
|
onCloseAutoFocus: (event) => event.preventDefault(),
|
|
418
|
-
className:
|
|
434
|
+
className: cn(
|
|
435
|
+
"og-root z-50 flex max-h-[min(20rem,var(--radix-dropdown-menu-content-available-height))] w-[var(--og-model-picker-menu-width)] max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-og-lg border border-og-border bg-og-surface-1 p-[var(--og-model-picker-menu-padding)] text-og-fg shadow-og-lg",
|
|
436
|
+
props.contentClassName
|
|
437
|
+
),
|
|
438
|
+
style: { ...portalStyle, ...props.contentStyle },
|
|
439
|
+
"data-testid": "model-picker-content",
|
|
419
440
|
children: /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain", children: /* @__PURE__ */ jsx(ModelPolicyPickerMenu, { ...props, nav, onNavChange: setNav }) })
|
|
420
441
|
}
|
|
421
442
|
) })
|
|
@@ -431,4 +452,4 @@ export {
|
|
|
431
452
|
ModelPolicyPickerMenu,
|
|
432
453
|
ModelPolicyPicker
|
|
433
454
|
};
|
|
434
|
-
//# sourceMappingURL=chunk-
|
|
455
|
+
//# sourceMappingURL=chunk-EHSYZ4KP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/model-policy-picker.tsx"],"sourcesContent":["import type { ClientModel, LatencyMode, ReasoningEffort } from \"@opengeni/sdk\";\nimport {\n CheckIcon,\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n KeyRoundIcon,\n ZapIcon,\n} from \"lucide-react\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { DropdownMenu } from \"radix-ui\";\nimport {\n useEffect,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type ReactNode,\n type SVGProps,\n} from \"react\";\nimport { cn } from \"../lib/cn\";\nimport { usePortalTokenStyle } from \"../lib/use-portal-token-style\";\nimport {\n coerceReasoningEffortForModel,\n effortOptionsForModel,\n findPickerRow,\n groupPickerRowsByBillingClass,\n labelReasoningEffort,\n projectClientModelRows,\n runnableLatencyModesForModel,\n type PickerBillingClass,\n type PickerModelRow,\n} from \"../model-policy\";\n\ntype ClientPickerModelRow = PickerModelRow<ClientModel>;\n\ntype NavLevel = \"providers\" | \"models\" | \"thinking\";\n\ntype PickerNavState = {\n level: NavLevel;\n rail: PickerBillingClass | null;\n modelId: string | null;\n};\n\ntype NavUpdater = PickerNavState | ((previous: PickerNavState) => PickerNavState);\n\nexport type ModelPolicyPickerMessages = {\n label: string;\n loading: string;\n noModels: string;\n thinking: string;\n fast: string;\n fastRateHint: string;\n codexOnly: string;\n billingHints: Record<PickerBillingClass, string>;\n};\n\nexport const defaultModelPolicyPickerMessages: ModelPolicyPickerMessages = {\n label: \"Model and effort\",\n loading: \"Loading model catalog…\",\n noModels: \"No models available.\",\n thinking: \"Thinking\",\n fast: \"Fast\",\n fastRateHint: \"2× rate\",\n codexOnly: \"Codex-only session\",\n billingHints: {\n opengeni_credits: \"Will use credits\",\n codex_subscription: \"ChatGPT / Codex plan\",\n byok: \"Billed to your AI Gateway\",\n },\n};\n\nexport type ModelPolicyPickerProps = {\n /** Lightweight deployment models. Catalog rows take precedence when supplied. */\n models?: ClientModel[] | undefined;\n /** Catalog-backed rows with availability and billing-class truth. */\n rows?: PickerModelRow[] | undefined;\n model: string;\n effort: ReasoningEffort;\n latencyMode: LatencyMode;\n disabled?: boolean | undefined;\n loading?: boolean | undefined;\n error?: string | null | undefined;\n /** Controlled menu state. Omit for the built-in uncontrolled behavior. */\n open?: boolean | undefined;\n /** Initial menu state when `open` is uncontrolled. */\n defaultOpen?: boolean | undefined;\n onOpenChange?: ((open: boolean) => void) | undefined;\n /** Non-Codex models stay visible but cannot be selected. */\n codexOnly?: boolean | undefined;\n /** Resets drill-down navigation when the session scope changes. */\n sessionKey?: string | undefined;\n /** Prefer bottom on new-chat surfaces and top for bottom-docked composers. */\n menuSide?: \"top\" | \"bottom\" | undefined;\n /** Classes for the portalled menu surface. Prefer --og-* tokens for theming. */\n contentClassName?: string | undefined;\n /** Inline styles for the portalled menu, applied after inherited --og-* tokens. */\n contentStyle?: CSSProperties | undefined;\n className?: string | undefined;\n messages?: Partial<ModelPolicyPickerMessages> | undefined;\n onModelChange: (modelId: string) => void;\n onEffortChange: (effort: ReasoningEffort) => void;\n onLatencyModeChange: (latencyMode: LatencyMode) => void;\n};\n\nconst SLIDE_EASE = [0.22, 1, 0.36, 1] as const;\n\nfunction OpenGeniMark(props: SVGProps<SVGSVGElement>) {\n return (\n <svg\n viewBox=\"0 0 140 133\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.2}\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n {...props}\n >\n <g transform=\"translate(-17.5,-20.999893188476562) scale(1.75)\">\n <g transform=\"translate(0,-952.36218)\">\n <path d=\"m 60.7828,964.36215 27.1809,0.8834 -27.1809,25.9958 z m -1.9745,1.4513 0,26.7845 -25.2681,0 c 8.6166,-8.7334 16.8796,-17.8103 25.2681,-26.7845 z m 27.7053,3.628 3.4864,1.1989 -12.5877,7.4768 z m -68.1835,2.9656 5.5226,0 12.8654,14.0705 -5.9854,6.1204 -12.4026,0 c 9e-4,-6.7347 0,-13.4597 0,-20.1909 z m -1.9746,1.2304 0,5.8364 -6.3555,0 z m 3.363,20.9796 38.627,0 -10.7675,29.43465 z m 39.0898,4.54286 0,41.20229 -12.5878,-6.8775 c 4.1972,-11.443 8.3886,-22.879 12.5878,-34.32479 z\" />\n </g>\n </g>\n </svg>\n );\n}\n\nfunction ChatGptMark(props: SVGProps<SVGSVGElement>) {\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\" {...props}>\n <path d=\"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3653-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8414 3.3698-2.02 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.783-2.7622a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z\" />\n </svg>\n );\n}\n\nexport function BillingClassMark(props: {\n billingClass: PickerBillingClass;\n className?: string | undefined;\n \"aria-label\"?: string | undefined;\n}) {\n const labels: Record<PickerBillingClass, string> = {\n opengeni_credits: \"OpenGeni\",\n codex_subscription: \"Codex\",\n byok: \"Bring your own key\",\n };\n const label = props[\"aria-label\"] ?? labels[props.billingClass];\n const accessibility =\n label.length === 0\n ? { \"aria-hidden\": true as const }\n : { role: \"img\" as const, \"aria-label\": label };\n const shell = cn(\n \"inline-flex size-3.5 shrink-0 items-center justify-center overflow-hidden text-og-fg-subtle\",\n props.className,\n );\n const mark = \"size-3.5\";\n return (\n <span\n className={shell}\n data-testid={`billing-class-icon-${props.billingClass}`}\n {...accessibility}\n >\n {props.billingClass === \"opengeni_credits\" ? (\n <OpenGeniMark className={mark} />\n ) : props.billingClass === \"codex_subscription\" ? (\n <ChatGptMark className={mark} />\n ) : (\n <KeyRoundIcon className={mark} aria-hidden />\n )}\n </span>\n );\n}\n\nfunction isCodexModel(model: ClientModel): boolean {\n return model.id.startsWith(\"codex/\") || model.source === \"codex\";\n}\n\nfunction applyCodexOnly(\n rows: ClientPickerModelRow[],\n codexOnly: boolean,\n unavailableReason: string,\n): ClientPickerModelRow[] {\n if (!codexOnly) return rows;\n return rows.map((row) =>\n isCodexModel(row.catalog)\n ? row\n : {\n ...row,\n selectable: false,\n unavailableReason: row.unavailableReason ?? unavailableReason,\n },\n );\n}\n\nfunction effectiveRows(props: ModelPolicyPickerProps): ClientPickerModelRow[] {\n const rows = props.rows !== undefined ? props.rows : projectClientModelRows(props.models ?? []);\n const messages = { ...defaultModelPolicyPickerMessages, ...props.messages };\n return applyCodexOnly(rows, props.codexOnly === true, messages.codexOnly);\n}\n\nfunction defaultNavState(rows: ClientPickerModelRow[], modelId: string): PickerNavState {\n const selected = findPickerRow(rows, modelId);\n if (!selected) {\n const rails = new Set(rows.map((row) => row.billingClass));\n const onlyRail = rails.size === 1 ? rows[0]?.billingClass : null;\n return onlyRail\n ? { level: \"models\", rail: onlyRail, modelId: null }\n : { level: \"providers\", rail: null, modelId: null };\n }\n return { level: \"thinking\", rail: selected.billingClass, modelId: selected.id };\n}\n\nfunction usePickerNavState(\n sessionKey: string | undefined,\n rows: ClientPickerModelRow[],\n model: string,\n): [PickerNavState, (next: NavUpdater) => void] {\n const [state, setState] = useState<PickerNavState>(() => defaultNavState(rows, model));\n useEffect(() => {\n setState(defaultNavState(rows, model));\n // The menu deliberately preserves its drill-down while the same session is mounted.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [sessionKey]);\n return [state, setState];\n}\n\nexport function PickerNavRow(props: {\n label: string;\n hint?: string | undefined;\n icon?: ReactNode;\n trailing?: ReactNode;\n showChevron?: boolean | undefined;\n disabled?: boolean | undefined;\n title?: string | undefined;\n active?: boolean | undefined;\n testId?: string | undefined;\n onClick: () => void;\n}) {\n return (\n <button\n type=\"button\"\n disabled={props.disabled}\n title={props.title}\n onClick={props.onClick}\n data-testid={props.testId}\n className={cn(\n \"flex w-full cursor-pointer items-center gap-2 rounded-og-sm px-[var(--og-model-picker-row-padding-x)] py-[var(--og-model-picker-row-padding-y)] text-left text-og-fg outline-none transition-colors hover:bg-og-surface-2 focus-visible:ring-2 focus-visible:ring-og-accent/40\",\n props.disabled && \"cursor-not-allowed opacity-50\",\n )}\n >\n {props.icon}\n <span className=\"min-w-0 flex-1\">\n <span className={cn(\"block truncate text-og-menu\", props.active && \"font-medium\")}>\n {props.label}\n </span>\n {props.hint ? (\n <span className=\"mt-0.5 block truncate text-og-control text-og-fg-subtle\">\n {props.hint}\n </span>\n ) : null}\n </span>\n {props.trailing ? <span className=\"ml-auto shrink-0\">{props.trailing}</span> : null}\n {props.showChevron === false ? null : (\n <ChevronRightIcon className=\"size-3.5 shrink-0 text-og-fg-subtle\" />\n )}\n </button>\n );\n}\n\nexport function PickerBackHeader(props: {\n label: string;\n icon?: ReactNode;\n onBack: () => void;\n trailing?: ReactNode;\n}) {\n return (\n <div className=\"mb-1 flex items-center gap-0.5 border-b border-og-border/70 px-0.5 pb-1.5\">\n <button\n type=\"button\"\n onClick={props.onBack}\n data-testid=\"model-picker-back\"\n className=\"flex min-w-0 flex-1 cursor-pointer items-center gap-1.5 rounded-og-sm px-1.5 py-1.5 text-left text-og-fg outline-none transition-colors hover:bg-og-surface-2 focus-visible:ring-2 focus-visible:ring-og-accent/40\"\n >\n <ChevronLeftIcon className=\"size-3.5 shrink-0 text-og-fg-subtle\" />\n {props.icon}\n <span className=\"min-w-0 flex-1 truncate text-og-menu font-medium\">{props.label}</span>\n </button>\n {props.trailing ? <div className=\"relative z-10 shrink-0\">{props.trailing}</div> : null}\n </div>\n );\n}\n\nexport function PickerAnimatedPage(props: {\n pageKey: string;\n direction: 1 | -1;\n children: ReactNode;\n}) {\n const reduceMotion = useReducedMotion();\n return (\n <motion.div\n key={props.pageKey}\n initial={reduceMotion ? false : { x: props.direction * 14, opacity: 0 }}\n animate={{ x: 0, opacity: 1 }}\n transition={{ duration: reduceMotion ? 0 : 0.18, ease: SLIDE_EASE }}\n className=\"w-full\"\n >\n {props.children}\n </motion.div>\n );\n}\n\nexport function ModelPolicyPickerMenu(\n props: ModelPolicyPickerProps & {\n nav?: PickerNavState | undefined;\n onNavChange?: ((next: NavUpdater) => void) | undefined;\n },\n) {\n const messages = useMemo(\n () => ({ ...defaultModelPolicyPickerMessages, ...props.messages }),\n [props.messages],\n );\n const rows = effectiveRows(props);\n const groups = useMemo(() => groupPickerRowsByBillingClass(rows), [rows]);\n const [localNav, setLocalNav] = usePickerNavState(\n props.nav === undefined ? props.sessionKey : undefined,\n rows,\n props.model,\n );\n const nav = props.nav ?? localNav;\n const setNav = props.onNavChange ?? setLocalNav;\n const [direction, setDirection] = useState<1 | -1>(1);\n\n const effectiveNav =\n nav.level === \"providers\" && groups.length === 1\n ? { level: \"models\" as const, rail: groups[0]!.billingClass, modelId: null }\n : nav;\n const activeGroup =\n effectiveNav.rail === null\n ? undefined\n : groups.find((group) => group.billingClass === effectiveNav.rail);\n const focusModel =\n effectiveNav.modelId === null ? undefined : findPickerRow(rows, effectiveNav.modelId);\n const selectedRow = findPickerRow(rows, props.model);\n const { latencyMode, loading, onLatencyModeChange } = props;\n\n useEffect(() => {\n if (loading || !selectedRow?.selectable) return;\n const supportsCurrentMode = runnableLatencyModesForModel(selectedRow.catalog).includes(\n latencyMode,\n );\n if (!supportsCurrentMode && latencyMode !== \"standard\") {\n onLatencyModeChange(\"standard\");\n }\n }, [latencyMode, loading, onLatencyModeChange, selectedRow]);\n\n const go = (next: PickerNavState, nextDirection: 1 | -1) => {\n setDirection(nextDirection);\n setNav(next);\n };\n\n const selectEffort = (row: ClientPickerModelRow, effort: ReasoningEffort) => {\n if (!row.selectable) return;\n if (row.id !== props.model) props.onModelChange(row.id);\n props.onEffortChange(coerceReasoningEffortForModel(row.catalog, effort));\n };\n\n const pageKey =\n effectiveNav.level === \"providers\"\n ? \"providers\"\n : effectiveNav.level === \"models\"\n ? `models:${effectiveNav.rail ?? \"\"}`\n : `thinking:${effectiveNav.modelId ?? \"\"}`;\n\n let body: ReactNode;\n if (props.loading) {\n body = <p className=\"px-2 py-3 text-og-control text-og-fg-subtle\">{messages.loading}</p>;\n } else if (groups.length === 0) {\n body = <p className=\"px-2 py-3 text-og-control text-og-fg-subtle\">{messages.noModels}</p>;\n } else if (effectiveNav.level === \"providers\") {\n body = (\n <div className=\"flex flex-col gap-0.5\" data-testid=\"model-picker-providers\">\n {groups.map((group) => (\n <PickerNavRow\n key={group.billingClass}\n label={group.label}\n hint={messages.billingHints[group.billingClass]}\n icon={<BillingClassMark billingClass={group.billingClass} />}\n active={selectedRow?.billingClass === group.billingClass}\n testId={`model-picker-rail-${group.billingClass}`}\n onClick={() => go({ level: \"models\", rail: group.billingClass, modelId: null }, 1)}\n />\n ))}\n </div>\n );\n } else if (effectiveNav.level === \"models\" && activeGroup) {\n body = (\n <div data-testid=\"model-picker-models\">\n {groups.length > 1 ? (\n <PickerBackHeader\n label={activeGroup.label}\n icon={<BillingClassMark billingClass={activeGroup.billingClass} />}\n onBack={() => go({ level: \"providers\", rail: null, modelId: null }, -1)}\n />\n ) : null}\n <div className=\"flex flex-col gap-0.5\">\n {activeGroup.rows.map((row) => (\n <PickerNavRow\n key={`${row.billingClass}:${row.id}`}\n label={row.label}\n hint={row.unavailableReason ?? undefined}\n disabled={!row.selectable}\n title={row.unavailableReason ?? undefined}\n active={row.id === props.model}\n testId={`model-picker-choice-${row.id}`}\n onClick={() => {\n if (row.selectable) {\n go({ level: \"thinking\", rail: row.billingClass, modelId: row.id }, 1);\n }\n }}\n />\n ))}\n </div>\n </div>\n );\n } else if (effectiveNav.level === \"thinking\" && focusModel) {\n const activeModel = focusModel.id === props.model;\n const supportsFast = runnableLatencyModesForModel(focusModel.catalog).includes(\"fast\");\n body = (\n <div data-testid=\"model-picker-reasoning\">\n <PickerBackHeader\n label={focusModel.label}\n icon={<BillingClassMark billingClass={focusModel.billingClass} />}\n onBack={() => go({ level: \"models\", rail: focusModel.billingClass, modelId: null }, -1)}\n trailing={\n supportsFast ? (\n <button\n type=\"button\"\n disabled={!focusModel.selectable}\n aria-pressed={activeModel && props.latencyMode === \"fast\"}\n aria-label={\n activeModel && props.latencyMode === \"fast\"\n ? `Disable ${messages.fast}`\n : `Enable ${messages.fast}`\n }\n title={`${messages.fast} · ${messages.fastRateHint}`}\n data-testid=\"model-picker-fast\"\n onClick={() => {\n if (!activeModel) {\n props.onModelChange(focusModel.id);\n props.onEffortChange(\n coerceReasoningEffortForModel(focusModel.catalog, props.effort),\n );\n }\n props.onLatencyModeChange(\n activeModel && props.latencyMode === \"fast\" ? \"standard\" : \"fast\",\n );\n }}\n className={cn(\n \"flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-og-sm text-og-fg-subtle outline-none transition-colors hover:bg-og-surface-2 focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:cursor-not-allowed disabled:opacity-50\",\n activeModel && props.latencyMode === \"fast\" && \"text-og-fg\",\n )}\n >\n <ZapIcon\n className={cn(\n \"size-3.5\",\n activeModel && props.latencyMode === \"fast\" && \"fill-current\",\n )}\n />\n </button>\n ) : null\n }\n />\n <p className=\"px-2.5 pt-1 pb-1 text-og-control font-medium tracking-wide text-og-fg-subtle uppercase\">\n {messages.thinking}\n </p>\n {focusModel.catalog.capabilities?.inputModalities.includes(\"image\") === false ? (\n <p className=\"px-2.5 pb-1.5 text-og-control leading-relaxed text-og-fg-subtle\">\n Unsupported attachments stay in the session but are hidden from this model.\n </p>\n ) : null}\n <div className=\"flex flex-col gap-0.5\">\n {effortOptionsForModel(focusModel.catalog).map((effort) => {\n const selected = activeModel && effort === props.effort;\n return (\n <button\n key={effort}\n type=\"button\"\n disabled={!focusModel.selectable}\n onClick={() => selectEffort(focusModel, effort)}\n className={cn(\n \"flex h-[var(--og-model-picker-effort-height)] w-full cursor-pointer items-center rounded-og-sm px-[var(--og-model-picker-row-padding-x)] text-left text-og-menu text-og-fg outline-none transition-colors hover:bg-og-surface-2 focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:cursor-not-allowed disabled:opacity-50\",\n selected && \"bg-og-surface-2\",\n )}\n >\n <span className=\"min-w-0 flex-1 truncate\">{labelReasoningEffort(effort)}</span>\n {selected ? (\n <CheckIcon\n className=\"ml-auto size-3.5 shrink-0\"\n data-testid=\"model-picker-effort-check\"\n />\n ) : null}\n </button>\n );\n })}\n </div>\n </div>\n );\n } else {\n body = (\n <div className=\"flex flex-col gap-0.5\" data-testid=\"model-picker-providers\">\n {groups.map((group) => (\n <PickerNavRow\n key={group.billingClass}\n label={group.label}\n hint={messages.billingHints[group.billingClass]}\n icon={<BillingClassMark billingClass={group.billingClass} />}\n testId={`model-picker-rail-${group.billingClass}`}\n onClick={() => go({ level: \"models\", rail: group.billingClass, modelId: null }, 1)}\n />\n ))}\n </div>\n );\n }\n\n return (\n <div data-testid=\"model-picker-menu\" className=\"relative overflow-hidden\">\n {props.error ? (\n <p className=\"px-2 py-1 text-og-control text-og-status-failed\" role=\"alert\">\n {props.error}\n </p>\n ) : null}\n <PickerAnimatedPage pageKey={pageKey} direction={direction}>\n {body}\n </PickerAnimatedPage>\n </div>\n );\n}\n\nexport function ModelPolicyPicker(props: ModelPolicyPickerProps) {\n const [uncontrolledOpen, setUncontrolledOpen] = useState(props.defaultOpen ?? false);\n const open = props.open ?? uncontrolledOpen;\n const setOpen = (next: boolean) => {\n if (props.open === undefined) setUncontrolledOpen(next);\n props.onOpenChange?.(next);\n };\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n const portalStyle = usePortalTokenStyle(triggerRef);\n const messages = useMemo(\n () => ({ ...defaultModelPolicyPickerMessages, ...props.messages }),\n [props.messages],\n );\n const rows = effectiveRows(props);\n const [nav, setNav] = usePickerNavState(props.sessionKey, rows, props.model);\n const selected = findPickerRow(rows, props.model);\n\n if (props.loading) {\n return (\n <span\n className={cn(\n \"inline-flex h-8 w-40 shrink-0 animate-pulse rounded-full bg-og-surface-2\",\n props.className,\n )}\n aria-label={messages.loading}\n data-testid=\"model-picker-loading\"\n />\n );\n }\n return (\n <DropdownMenu.Root open={open} onOpenChange={setOpen}>\n <DropdownMenu.Trigger asChild>\n <button\n ref={triggerRef}\n type=\"button\"\n disabled={props.disabled}\n aria-label={messages.label}\n className={cn(\n \"og-root inline-flex h-[var(--og-model-picker-trigger-height)] min-w-0 max-w-64 items-center gap-1 rounded-full border border-transparent px-2.5 text-og-control text-og-fg-muted outline-none transition-colors hover:border-og-border hover:bg-og-surface-2 hover:text-og-fg focus-visible:ring-2 focus-visible:ring-og-accent/40 disabled:cursor-not-allowed disabled:opacity-50 max-sm:h-[var(--og-model-picker-trigger-height-mobile)] max-sm:max-w-[7.5rem] max-sm:px-2\",\n props.className,\n )}\n >\n <BillingClassMark\n billingClass={\n selected?.billingClass ??\n (props.model.startsWith(\"codex/\") ? \"codex_subscription\" : \"opengeni_credits\")\n }\n className=\"text-og-fg\"\n />\n <span className=\"min-w-0 truncate font-medium text-og-fg max-sm:hidden\">\n {selected?.label ?? props.model}\n </span>\n <span className=\"min-w-0 truncate font-medium text-og-fg sm:hidden\">\n {selected?.shortLabel ?? selected?.label ?? props.model}\n </span>\n <span className=\"max-sm:hidden\">{labelReasoningEffort(props.effort)}</span>\n {props.latencyMode === \"fast\" ? (\n <ZapIcon\n className=\"size-3.5 shrink-0 fill-current stroke-current text-og-fg\"\n aria-label={messages.fast}\n data-testid=\"model-picker-fast-icon\"\n />\n ) : null}\n <ChevronDownIcon className=\"size-3 shrink-0\" />\n </button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n align=\"start\"\n side={props.menuSide ?? \"bottom\"}\n sideOffset={8}\n collisionPadding={12}\n onCloseAutoFocus={(event) => event.preventDefault()}\n className={cn(\n \"og-root z-50 flex max-h-[min(20rem,var(--radix-dropdown-menu-content-available-height))] w-[var(--og-model-picker-menu-width)] max-w-[calc(100vw-16px)] flex-col overflow-hidden rounded-og-lg border border-og-border bg-og-surface-1 p-[var(--og-model-picker-menu-padding)] text-og-fg shadow-og-lg\",\n props.contentClassName,\n )}\n style={{ ...portalStyle, ...props.contentStyle }}\n data-testid=\"model-picker-content\"\n >\n <div className=\"min-h-0 flex-1 overflow-y-auto overscroll-contain\">\n <ModelPolicyPickerMenu {...props} nav={nav} onNavChange={setNav} />\n </div>\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,QAAQ,wBAAwB;AACzC,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAqGG,cAkIJ,YAlII;AA/DH,IAAM,mCAA8D;AAAA,EACzE,OAAO;AAAA,EACP,SAAS;AAAA,EACT,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AAAA,EACN,cAAc;AAAA,EACd,WAAW;AAAA,EACX,cAAc;AAAA,IACZ,kBAAkB;AAAA,IAClB,oBAAoB;AAAA,IACpB,MAAM;AAAA,EACR;AACF;AAmCA,IAAM,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC;AAEpC,SAAS,aAAa,OAAgC;AACpD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAa;AAAA,MACb,gBAAe;AAAA,MACf,eAAY;AAAA,MACX,GAAG;AAAA,MAEJ,8BAAC,OAAE,WAAU,oDACX,8BAAC,OAAE,WAAU,2BACX,8BAAC,UAAK,GAAE,qeAAoe,GAC9e,GACF;AAAA;AAAA,EACF;AAEJ;AAEA,SAAS,YAAY,OAAgC;AACnD,SACE,oBAAC,SAAI,SAAQ,aAA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b,oBAAU,SAAS,MAAM,OAC5B;AAAA,UACA,oBAAC,UAAK,WAAU,qDACb,oBAAU,cAAc,UAAU,SAAS,MAAM,OACpD;AAAA,UACA,oBAAC,UAAK,WAAU,iBAAiB,+BAAqB,MAAM,MAAM,GAAE;AAAA,UACnE,MAAM,gBAAgB,SACrB;AAAA,YAAC;AAAA;AAAA,cACC,WAAU;AAAA,cACV,cAAY,SAAS;AAAA,cACrB,eAAY;AAAA;AAAA,UACd,IACE;AAAA,UACJ,oBAAC,mBAAgB,WAAU,mBAAkB;AAAA;AAAA;AAAA,IAC/C,GACF;AAAA,IACA,oBAAC,aAAa,QAAb,EACC;AAAA,MAAC,aAAa;AAAA,MAAb;AAAA,QACC,OAAM;AAAA,QACN,MAAM,MAAM,YAAY;AAAA,QACxB,YAAY;AAAA,QACZ,kBAAkB;AAAA,QAClB,kBAAkB,CAAC,UAAU,MAAM,eAAe;AAAA,QAClD,WAAW;AAAA,UACT;AAAA,UACA,MAAM;AAAA,QACR;AAAA,QACA,OAAO,EAAE,GAAG,aAAa,GAAG,MAAM,aAAa;AAAA,QAC/C,eAAY;AAAA,QAEZ,8BAAC,SAAI,WAAU,qDACb,8BAAC,yBAAuB,GAAG,OAAO,KAAU,aAAa,QAAQ,GACnE;AAAA;AAAA,IACF,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// src/lib/use-portal-token-style.ts
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
function usePortalTokenStyle(sourceRef) {
|
|
4
|
+
const [style, setStyle] = useState({});
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const source = sourceRef.current;
|
|
7
|
+
if (!source || typeof MutationObserver === "undefined") return;
|
|
8
|
+
let signature = "";
|
|
9
|
+
const sync = () => {
|
|
10
|
+
const computed = getComputedStyle(source);
|
|
11
|
+
const next = { colorScheme: computed.colorScheme };
|
|
12
|
+
for (let index = 0; index < computed.length; index += 1) {
|
|
13
|
+
const property = computed.item(index);
|
|
14
|
+
if (!property.startsWith("--og-")) continue;
|
|
15
|
+
next[property] = computed.getPropertyValue(property);
|
|
16
|
+
}
|
|
17
|
+
const nextSignature = JSON.stringify(next);
|
|
18
|
+
if (nextSignature !== signature) {
|
|
19
|
+
signature = nextSignature;
|
|
20
|
+
setStyle(next);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const observers = [];
|
|
24
|
+
let ancestor = source;
|
|
25
|
+
while (ancestor) {
|
|
26
|
+
const observer = new MutationObserver(sync);
|
|
27
|
+
observer.observe(ancestor, {
|
|
28
|
+
attributes: true,
|
|
29
|
+
attributeFilter: ["class", "data-og-density", "data-og-theme", "style"]
|
|
30
|
+
});
|
|
31
|
+
observers.push(observer);
|
|
32
|
+
ancestor = ancestor.parentElement;
|
|
33
|
+
}
|
|
34
|
+
const colorScheme = window.matchMedia?.("(prefers-color-scheme: dark)");
|
|
35
|
+
colorScheme?.addEventListener?.("change", sync);
|
|
36
|
+
sync();
|
|
37
|
+
return () => {
|
|
38
|
+
for (const observer of observers) observer.disconnect();
|
|
39
|
+
colorScheme?.removeEventListener?.("change", sync);
|
|
40
|
+
};
|
|
41
|
+
}, [sourceRef]);
|
|
42
|
+
return style;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
usePortalTokenStyle
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=chunk-JB5725BI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/use-portal-token-style.ts"],"sourcesContent":["import { type CSSProperties, type RefObject, useEffect, useState } from \"react\";\n\nexport type PortalTokenStyle = CSSProperties & Record<`--${string}`, string>;\n\n/**\n * Copy the effective SDK tokens across a portal boundary. A locally themed or\n * rebranded embed cannot rely on CSS inheritance once a portal mounts under\n * `<body>`. Ancestor theme/class/style mutations and OS color-scheme changes\n * keep the copied values live.\n */\nexport function usePortalTokenStyle(sourceRef: RefObject<HTMLElement | null>): PortalTokenStyle {\n const [style, setStyle] = useState<PortalTokenStyle>({});\n useEffect(() => {\n const source = sourceRef.current;\n if (!source || typeof MutationObserver === \"undefined\") return;\n let signature = \"\";\n const sync = () => {\n const computed = getComputedStyle(source);\n const next: PortalTokenStyle = { colorScheme: computed.colorScheme };\n for (let index = 0; index < computed.length; index += 1) {\n const property = computed.item(index);\n if (!property.startsWith(\"--og-\")) continue;\n next[property as `--${string}`] = computed.getPropertyValue(property);\n }\n const nextSignature = JSON.stringify(next);\n if (nextSignature !== signature) {\n signature = nextSignature;\n setStyle(next);\n }\n };\n const observers: MutationObserver[] = [];\n let ancestor: HTMLElement | null = source;\n while (ancestor) {\n const observer = new MutationObserver(sync);\n observer.observe(ancestor, {\n attributes: true,\n attributeFilter: [\"class\", \"data-og-density\", \"data-og-theme\", \"style\"],\n });\n observers.push(observer);\n ancestor = ancestor.parentElement;\n }\n const colorScheme = window.matchMedia?.(\"(prefers-color-scheme: dark)\");\n colorScheme?.addEventListener?.(\"change\", sync);\n sync();\n return () => {\n for (const observer of observers) observer.disconnect();\n colorScheme?.removeEventListener?.(\"change\", sync);\n };\n }, [sourceRef]);\n return style;\n}\n"],"mappings":";AAAA,SAA6C,WAAW,gBAAgB;AAUjE,SAAS,oBAAoB,WAA4D;AAC9F,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA2B,CAAC,CAAC;AACvD,YAAU,MAAM;AACd,UAAM,SAAS,UAAU;AACzB,QAAI,CAAC,UAAU,OAAO,qBAAqB,YAAa;AACxD,QAAI,YAAY;AAChB,UAAM,OAAO,MAAM;AACjB,YAAM,WAAW,iBAAiB,MAAM;AACxC,YAAM,OAAyB,EAAE,aAAa,SAAS,YAAY;AACnE,eAAS,QAAQ,GAAG,QAAQ,SAAS,QAAQ,SAAS,GAAG;AACvD,cAAM,WAAW,SAAS,KAAK,KAAK;AACpC,YAAI,CAAC,SAAS,WAAW,OAAO,EAAG;AACnC,aAAK,QAAyB,IAAI,SAAS,iBAAiB,QAAQ;AAAA,MACtE;AACA,YAAM,gBAAgB,KAAK,UAAU,IAAI;AACzC,UAAI,kBAAkB,WAAW;AAC/B,oBAAY;AACZ,iBAAS,IAAI;AAAA,MACf;AAAA,IACF;AACA,UAAM,YAAgC,CAAC;AACvC,QAAI,WAA+B;AACnC,WAAO,UAAU;AACf,YAAM,WAAW,IAAI,iBAAiB,IAAI;AAC1C,eAAS,QAAQ,UAAU;AAAA,QACzB,YAAY;AAAA,QACZ,iBAAiB,CAAC,SAAS,mBAAmB,iBAAiB,OAAO;AAAA,MACxE,CAAC;AACD,gBAAU,KAAK,QAAQ;AACvB,iBAAW,SAAS;AAAA,IACtB;AACA,UAAM,cAAc,OAAO,aAAa,8BAA8B;AACtE,iBAAa,mBAAmB,UAAU,IAAI;AAC9C,SAAK;AACL,WAAO,MAAM;AACX,iBAAW,YAAY,UAAW,UAAS,WAAW;AACtD,mBAAa,sBAAsB,UAAU,IAAI;AAAA,IACnD;AAAA,EACF,GAAG,CAAC,SAAS,CAAC;AACd,SAAO;AACT;","names":[]}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
TooltipContent,
|
|
11
11
|
TooltipProvider,
|
|
12
12
|
TooltipTrigger
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-U3CSCMWA.js";
|
|
14
14
|
import {
|
|
15
15
|
composerSubmissionErrorMessage,
|
|
16
16
|
formatBytes,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-LAKLF4PA.js";
|
|
19
19
|
import {
|
|
20
20
|
cn
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-22KP6LR5.js";
|
|
22
22
|
|
|
23
23
|
// src/voice-recording-store.ts
|
|
24
24
|
var DEFAULT_DATABASE_NAME = "opengeni-voice-recordings-v1";
|
|
@@ -3072,7 +3072,7 @@ var Surface = forwardRef(function ComposerSurface({ className, children, ...prop
|
|
|
3072
3072
|
"aria-hidden": true,
|
|
3073
3073
|
className: cn(
|
|
3074
3074
|
"pointer-events-none absolute inset-0 z-10 flex items-center justify-center",
|
|
3075
|
-
"rounded-og-lg bg-og-surface-1/85 text-
|
|
3075
|
+
"rounded-og-lg bg-og-surface-1/85 text-og-menu font-medium text-og-accent backdrop-blur-[1px]"
|
|
3076
3076
|
),
|
|
3077
3077
|
children: /* @__PURE__ */ jsxs3("span", { className: "inline-flex items-center gap-2", children: [
|
|
3078
3078
|
/* @__PURE__ */ jsx3(PaperclipIcon, { className: "size-4" }),
|
|
@@ -3163,7 +3163,7 @@ var Input = forwardRef(function ComposerInput({ rows = 1, placeholder, className
|
|
|
3163
3163
|
"aria-controls": paletteOpen ? controller.listboxId : void 0,
|
|
3164
3164
|
"aria-activedescendant": paletteOpen ? `${controller.listboxId}-option-${controller.palette.highlight}` : void 0,
|
|
3165
3165
|
className: cn(
|
|
3166
|
-
"block w-full resize-none bg-transparent px-3.5 pt-3 pb-1 text-
|
|
3166
|
+
"block w-full resize-none bg-transparent px-3.5 pt-3 pb-1 text-og-composer md:px-4 md:text-og-composer-wide",
|
|
3167
3167
|
"text-og-fg placeholder:text-og-fg-subtle focus:outline-none focus-visible:outline-none",
|
|
3168
3168
|
"disabled:cursor-not-allowed disabled:opacity-60",
|
|
3169
3169
|
className
|
|
@@ -3381,7 +3381,7 @@ function Status() {
|
|
|
3381
3381
|
animate: { opacity: 1, height: "auto" },
|
|
3382
3382
|
exit: { opacity: 0, height: 0 },
|
|
3383
3383
|
className: cn(
|
|
3384
|
-
"overflow-hidden px-1 pt-1.5 text-
|
|
3384
|
+
"overflow-hidden px-1 pt-1.5 text-og-control",
|
|
3385
3385
|
controller.activeNotice.tone === "ok" ? "text-og-fg-muted" : "text-og-status-failed"
|
|
3386
3386
|
),
|
|
3387
3387
|
children: controller.activeNotice.message
|
|
@@ -4162,4 +4162,4 @@ export {
|
|
|
4162
4162
|
Status,
|
|
4163
4163
|
ComposerTranscriptionControl
|
|
4164
4164
|
};
|
|
4165
|
-
//# sourceMappingURL=chunk-
|
|
4165
|
+
//# sourceMappingURL=chunk-L3EWO3UK.js.map
|