@qredence/fleet 0.10.0 → 0.10.2
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/CHANGELOG.md +32 -0
- package/bin/prime-runtime.d.mts +19 -0
- package/bin/prime-runtime.mjs +42 -5
- package/dist/web/client/assets/{artifacts-panel-6JEdy6jU.js → artifacts-panel-CfWH5cQn.js} +1 -1
- package/dist/web/client/assets/{chat-command-palette-Bxr5EkO6.js → chat-command-palette-CKGrP-Ke.js} +1 -1
- package/dist/web/client/assets/{ease-DYVhTl2n.js → ease-nNJMFgD_.js} +1 -1
- package/dist/web/client/assets/globals-C6h6fq-s.css +2 -0
- package/dist/web/client/assets/{index-Cf8tRpHL.js → index-D3OD2pV7.js} +2 -2
- package/dist/web/client/assets/{model-selector-list-CbDAT0Rw.js → model-selector-list-CIJArf3L.js} +1 -1
- package/dist/web/client/assets/{prompt-input-CoV1gTUQ.js → prompt-input-0kaw0ekd.js} +1 -1
- package/dist/web/client/assets/{right-panel-registry-BAJ6TuEY.js → right-panel-registry-BkBAryPm.js} +2 -2
- package/dist/web/client/assets/routes-DgbWbQOu.js +14 -0
- package/dist/web/client/assets/{session-activity-panel-DwaXiSrS.js → session-activity-panel-BloVPsLJ.js} +1 -1
- package/dist/web/client/assets/{session-tool-renderer-DEABxZG3.js → session-tool-renderer-CGMatufW.js} +1 -1
- package/dist/web/client/assets/{subagent-chat-panel-R2RoX1Yt.js → subagent-chat-panel-xm-zBsFL.js} +1 -1
- package/dist/web/client/assets/{subagent-transcript-DVZhMo7a.js → subagent-transcript-BzToBVWk.js} +1 -1
- package/dist/web/client/assets/{subagents-panel-CMMRUP8F.js → subagents-panel-B5ooG4sS.js} +1 -1
- package/dist/web/client/assets/{tool-part-normalizer-CF6bmJ0s.js → tool-part-normalizer-CJ2sY87r.js} +1 -1
- package/dist/web/client/assets/{tool-result-7qREIVv_.js → tool-result-C_RIixge.js} +4 -4
- package/dist/web/client/assets/{tool-timeline-CGhwMeNl.js → tool-timeline-BVY5VQ3a.js} +2 -2
- package/dist/web/client/assets/{use-reduced-motion-CFEp5oKr.js → use-reduced-motion-69Ji0Qlf.js} +1 -1
- package/dist/web/client/assets/workspace-panel-DsZZnfkm.js +1 -0
- package/dist/web/client/bundle-budget.json +5 -5
- package/dist/web/server/{_tanstack-start-manifest_v-Io433TLr-YWPNQWQI.js → _tanstack-start-manifest_v-CGHXgy5L-KSOQEPW7.js} +9 -9
- package/dist/web/server/{artifacts-panel-cYqS54cM-K6SF3K6W.js → artifacts-panel-CHPMYc6C-OWIYGSRM.js} +5 -5
- package/dist/web/server/{chat-command-palette-BDnwcymZ-DSTFIAOD.js → chat-command-palette-VF4C0ttN-GY52QBFP.js} +3 -3
- package/dist/web/server/{chunk-RX2ZJARF.js → chunk-4OLRCVML.js} +2 -21
- package/dist/web/server/{chunk-W2GI7NRX.js → chunk-7DUB7HGF.js} +43 -38
- package/dist/web/server/{chunk-37EK2TYH.js → chunk-GW7HYECO.js} +169 -528
- package/dist/web/server/{chunk-FI3UF2GW.js → chunk-LYJ3XDEZ.js} +5 -5
- package/dist/web/server/{chunk-2OC2FKHR.js → chunk-MDGXRDJM.js} +3 -3
- package/dist/web/server/{chunk-W7GGECTL.js → chunk-NDU4LK5M.js} +3 -3
- package/dist/web/server/{chunk-NSFKPEFI.js → chunk-P3ZJ6L7V.js} +2 -2
- package/dist/web/server/{chunk-KBMRRJQN.js → chunk-PBNUO4IN.js} +2 -2
- package/dist/web/server/{chunk-RHJEOG37.js → chunk-W72ZBCJ5.js} +4 -4
- package/dist/web/server/{create-project-dialog-BS5Sva46-BO4RLW2Q.js → create-project-dialog-CSZHeLNg-EEW3DRTY.js} +3 -3
- package/dist/web/server/{model-selector-list-By_G7_Hr-GXT27BZO.js → model-selector-list-q8bMnmhy-SPFJGUBT.js} +2 -2
- package/dist/web/server/{openui-renderer-Q31y65CQ-QNVSP4NN.js → openui-renderer-BkDeIpwC-S5BOLH5L.js} +2 -2
- package/dist/web/server/{resources-panel-CH8sG0Od-4BZN6SLY.js → resources-panel-tCQCqEQv-NJO5FRHW.js} +4 -4
- package/dist/web/server/{router-8EzTM9Eq-COVGJKKX.js → router-DBc-HYGW-CC6DTCFR.js} +1 -1
- package/dist/web/server/{routes-88H0fiN3-WIAZJ3RT.js → routes-CcRh_tDy-M7ZRBLVA.js} +2 -2
- package/dist/web/server/server.js +2 -2
- package/dist/web/server/{session-activity-panel-CgSOde03-B5RCAGB4.js → session-activity-panel-CS56rTyW-J4GAZSTC.js} +4 -4
- package/dist/web/server/{session-reasoning-panel-Dmny6YTk-D3HQV2YB.js → session-reasoning-panel-DlqaQNE2-RMOBVYVD.js} +3 -3
- package/dist/web/server/{session-tool-renderer-BrnTO2w3-V6EE6AB2.js → session-tool-renderer-CHYJwJej-Z3K5TRIZ.js} +4 -4
- package/dist/web/server/{session-tree-panel-BEqR_cAJ-TZS7VRCB.js → session-tree-panel-B2GT3Hf_-WGHVVRRR.js} +3 -3
- package/dist/web/server/{settings-dialog-DkesVBrS-BAAA3YNU.js → settings-dialog-7V9x-CPC-6IEB2DFH.js} +4 -4
- package/dist/web/server/{subagent-chat-panel-Bfmt1bCE-DKDVH3NJ.js → subagent-chat-panel-Cjg1oOFO-PNWSFYNA.js} +7 -7
- package/dist/web/server/{subagents-panel-ChJDDvad-GNCHDTPB.js → subagents-panel-DPfqOHdw-B74PSAMP.js} +7 -7
- package/dist/web/server/{workspace-panel-Cij_JylD-WPYSV5FA.js → workspace-panel-DRaU8AWD-7AYOEM55.js} +4 -4
- package/package.json +1 -1
- package/dist/web/client/assets/globals-DDDleTbS.css +0 -2
- package/dist/web/client/assets/routes--tnF7d6H.js +0 -14
- package/dist/web/client/assets/workspace-panel-Da5I4p_t.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4ff865e: Share one tab strip between agent conversations and the side panel
|
|
8
|
+
|
|
9
|
+
The agent conversation tabs, the right-panel launcher, and the in-panel view
|
|
10
|
+
switcher were separate implementations of the same strip. All three now render
|
|
11
|
+
the shared `TabStrip` on the existing `ui/tabs` primitive, so keyboard roving
|
|
12
|
+
comes from Base UI instead of hand-written handlers. The proximity-hover pill
|
|
13
|
+
is gone, and right-panel tabs keep their labels visible instead of collapsing
|
|
14
|
+
inactive tabs to an icon.
|
|
15
|
+
|
|
16
|
+
## 0.10.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 0b78235: Keep the packaged kernel runtime when `fleet-prime` installs Prime Agent
|
|
21
|
+
|
|
22
|
+
0.10.0 fixed the runtime install inside the web server, but the `fleet-prime`
|
|
23
|
+
command installs Prime Agent itself before it starts the server, and that path
|
|
24
|
+
still kept only the `prime-agent` executable and deleted the
|
|
25
|
+
`prime-agent-runtime` directory the kernel bootstraps from. The server then
|
|
26
|
+
reused that binary as-is, so sessions started from the npm package could still
|
|
27
|
+
fail with "the runtime bundle that ships beside the Prime Agent binary is
|
|
28
|
+
missing".
|
|
29
|
+
|
|
30
|
+
`fleet-prime` and the server now share one installer. It keeps
|
|
31
|
+
`prime-agent-runtime` beside the binary, and an existing binary-only install
|
|
32
|
+
under `~/.prime/fleet/runtimes` is repaired automatically on the next start; no
|
|
33
|
+
manual cleanup is needed.
|
|
34
|
+
|
|
3
35
|
## 0.10.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface PrimeRuntimeAsset {
|
|
2
|
+
archive: string;
|
|
3
|
+
sha256: string;
|
|
4
|
+
executableSha256: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface PrimeRuntimeManifest {
|
|
8
|
+
rust: { version: string; baseUrl: string; platforms: Record<string, PrimeRuntimeAsset | undefined> };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function runtimeTarget(os?: string, cpu?: string): string;
|
|
12
|
+
|
|
13
|
+
export function ensurePrimeRuntime(options: {
|
|
14
|
+
manifest: PrimeRuntimeManifest;
|
|
15
|
+
installRoot?: string;
|
|
16
|
+
home?: string;
|
|
17
|
+
fetch?: typeof fetch;
|
|
18
|
+
target?: string;
|
|
19
|
+
}): Promise<string>;
|
package/bin/prime-runtime.mjs
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { spawnSync } from "node:child_process";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
-
import { chmod, mkdir, mkdtemp, open, rename, rm, writeFile } from "node:fs/promises";
|
|
3
|
+
import { chmod, mkdir, mkdtemp, open, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
4
4
|
import { arch, homedir, platform } from "node:os";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
|
|
7
|
+
// This module is the single Prime Agent runtime installer. The npm launcher
|
|
8
|
+
// (`fleet-prime`) runs it directly, and the web server re-exports it from
|
|
9
|
+
// `web/server/src/prime-runtime.ts`, so both install the same payload.
|
|
10
|
+
|
|
7
11
|
export function runtimeTarget(os = platform(), cpu = arch()) {
|
|
8
12
|
const target = `${os}-${cpu}`;
|
|
9
13
|
if (!["darwin-arm64", "darwin-x64", "linux-arm64", "linux-x64"].includes(target)) {
|
|
@@ -26,7 +30,13 @@ export async function ensurePrimeRuntime({
|
|
|
26
30
|
if (!asset) throw new Error(`Fleet has no pinned Prime Agent runtime for ${target}`);
|
|
27
31
|
const destination = installRoot ?? join(home, ".prime", "fleet", "runtimes", runtime.version, target);
|
|
28
32
|
const executable = join(destination, "prime-agent");
|
|
29
|
-
|
|
33
|
+
const packagedRuntime = join(destination, "prime-agent-runtime");
|
|
34
|
+
// A verified binary is not enough: the kernel bootstraps from the packaged
|
|
35
|
+
// runtime beside it. Installs made by earlier Fleet releases kept only the
|
|
36
|
+
// executable, so that state is repaired rather than short-circuited.
|
|
37
|
+
if ((await matchesDigest(executable, asset.executableSha256)) && (await directoryExists(packagedRuntime))) {
|
|
38
|
+
return executable;
|
|
39
|
+
}
|
|
30
40
|
|
|
31
41
|
await mkdir(dirname(destination), { recursive: true, mode: 0o700 });
|
|
32
42
|
const staging = await mkdtemp(join(dirname(destination), ".fleet-prime-runtime-"));
|
|
@@ -50,18 +60,45 @@ export async function ensurePrimeRuntime({
|
|
|
50
60
|
const result = spawnSync("tar", ["-xzf", archivePath, "-C", unpacked], { encoding: "utf8" });
|
|
51
61
|
if (result.status !== 0)
|
|
52
62
|
throw new Error(`Could not extract Prime Agent runtime: ${result.stderr || "tar failed"}`);
|
|
53
|
-
|
|
63
|
+
const extractedBinary = join(unpacked, "prime-agent");
|
|
64
|
+
if (!(await matchesDigest(extractedBinary, asset.executableSha256))) {
|
|
54
65
|
throw new Error("Extracted Prime Agent executable checksum mismatch; refusing to install it.");
|
|
55
66
|
}
|
|
56
|
-
await chmod(
|
|
67
|
+
await chmod(extractedBinary, 0o755);
|
|
57
68
|
await mkdir(destination, { recursive: true, mode: 0o700 });
|
|
58
|
-
|
|
69
|
+
// The kernel bootstraps from `prime-agent-runtime/`, which ships beside the
|
|
70
|
+
// binary. It lands before the executable is replaced, so a failed rename
|
|
71
|
+
// cannot leave a binary that looks current with no runtime. Any existing
|
|
72
|
+
// copy (possibly damaged) is moved aside into the private staging dir
|
|
73
|
+
// rather than deleted in place, so the window with no runtime is two
|
|
74
|
+
// renames, and the verified copy always replaces it.
|
|
75
|
+
const extractedRuntime = join(unpacked, "prime-agent-runtime");
|
|
76
|
+
if (await directoryExists(extractedRuntime)) {
|
|
77
|
+
await rename(packagedRuntime, join(staging, "previous-runtime")).catch((error) => {
|
|
78
|
+
if (error.code !== "ENOENT") throw error;
|
|
79
|
+
});
|
|
80
|
+
await rename(extractedRuntime, packagedRuntime).catch((error) => {
|
|
81
|
+
// A concurrent install of the same checksummed archive placed it first.
|
|
82
|
+
if (error.code !== "ENOTEMPTY" && error.code !== "EEXIST") throw error;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
await rename(extractedBinary, executable);
|
|
59
86
|
return executable;
|
|
60
87
|
} finally {
|
|
61
88
|
await rm(staging, { recursive: true, force: true });
|
|
62
89
|
}
|
|
63
90
|
}
|
|
64
91
|
|
|
92
|
+
async function directoryExists(path) {
|
|
93
|
+
try {
|
|
94
|
+
return (await stat(path)).isDirectory();
|
|
95
|
+
} catch (error) {
|
|
96
|
+
// Only absence means "not installed"; surface permission or symlink errors.
|
|
97
|
+
if (error.code === "ENOENT" || error.code === "ENOTDIR") return false;
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
65
102
|
async function matchesDigest(path, expected) {
|
|
66
103
|
let file;
|
|
67
104
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./createLucideIcon-CQY2ECfR.js";import{a as i,i as a,n as o,t as s}from"./tool-result-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./createLucideIcon-CQY2ECfR.js";import{a as i,i as a,n as o,t as s}from"./tool-result-C_RIixge.js";import{i as c}from"./open-panel-action-message-SdA1VU42.js";import{t as l}from"./chevron-right-BPCB1mOg.js";import{t as u}from"./package-BkC-HSi-.js";import{t as d}from"./button-CWYjn8Zk.js";import{n as f}from"./prime-agent-artifacts-C-g1VPiW.js";import{GenerativeTextRenderer as p,t as m}from"./openui-renderer-DG-iML7M.js";import{n as h,r as g,t as _}from"./collapsible-Bk6zCsRX.js";var v={name:`layout-template`,size:24,node:[[`rect`,{width:`18`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`f1a2em`}],[`rect`,{width:`9`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`jqznyg`}],[`rect`,{width:`5`,height:`7`,x:`16`,y:`14`,rx:`1`,key:`q5h2i8`}]]};v.node;var y=r(v),b=e(t(),1),x=n(),S=[];function C(e){if(typeof e==`string`)return e;if(e==null)return``;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function w(e){return e===`running`?`running`:e===`error`?`error`:e===`cancelled`?`cancelled`:`success`}function T(e){return e===`running`?`streaming`:e===`error`?`error`:e===`cancelled`?`cancelled`:`complete`}function E(e){let t=typeof e==`object`&&e?e:void 0;if(!t)return e===void 0?[]:[{label:`result`,text:C(e)}];let n=[];for(let e of[`stdout`,`stderr`,`result`,`error`])t[e]!==void 0&&t[e]!==``&&n.push({label:e,text:C(t[e])});let r=t.details??t.output??t.result;if(n.length===0&&r!==e&&n.push(...E(r)),n.length===0&&Array.isArray(t.content)){let e=t.content.flatMap(e=>typeof e==`string`?[e]:typeof e==`object`&&e&&`text`in e&&typeof e.text==`string`?[e.text]:[]).join(``);e&&n.push({label:t.isError===!0?`error`:`stdout`,text:e})}return n.length>0?n:[{label:`result`,text:C(e)}]}function D(e){let t=typeof e.input==`object`&&e.input!==null?e.input:void 0,n=t?.command??t?.code??t?.script;if(!(typeof n!=`string`||!n))return e.kind===`bash`?{code:n,language:`bash`,label:`Bash`}:e.kind===`ipython`?{code:n,language:/^\s*%%bash(?:\s|$)/im.test(n)?`bash`:`python`,label:`IPython`}:e.kind===`diff`?{code:n,language:`text`,label:`Text`}:{code:n,language:`json`,label:`JSON`}}function O(e){if(e.kind!==`openui-html`)return;let t=typeof e.output==`object`&&e.output!==null?e.output:void 0;if(typeof t?.title==`string`&&typeof t.document==`string`)return{title:t.title,document:t.document}}function k({artifact:e,selected:t}){let n=(0,b.useRef)(null);(0,b.useEffect)(()=>{t&&requestAnimationFrame(()=>{n.current?.focus({preventScroll:!0}),n.current?.scrollIntoView({block:`nearest`})})},[t]);let r=O(e);return(0,x.jsxs)(`article`,{ref:n,"data-artifact-id":e.id,tabIndex:-1,className:`min-w-0 rounded-md border border-border/60 bg-background p-2.5 outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs font-medium`,title:e.title,children:e.title||`OpenUI artifact`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:e.status})]}),r?(0,x.jsx)(m,{artifact:r}):(0,x.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-xs text-destructive`,children:[(0,x.jsx)(`p`,{children:`OpenUI artifact data is unavailable.`}),(0,x.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap break-words rounded bg-foreground/5 p-2 text-foreground/70`,children:C(e.output)})]})]})}function A({artifact:e,selected:t}){let n=(0,b.useRef)(null),r=t||e.status===`running`,[c,l]=(0,b.useState)(r);(0,b.useEffect)(()=>{t&&(l(!0),requestAnimationFrame(()=>{n.current?.focus({preventScroll:!0}),n.current?.scrollIntoView({block:`nearest`})}))},[t]);let u=D(e),d=E(e.output),p=e.kind===`diff`||e.kind===`refinement`?f(e):void 0;return(0,x.jsxs)(`article`,{ref:n,"data-artifact-id":e.id,tabIndex:-1,className:`rounded-md border border-border/60 bg-background px-2.5 py-2 outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[p?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(i,{file:p.file,lines:p.lines,status:T(e.status),defaultOpen:r,copyText:p.copyText,maxHeight:240}),d.map(e=>(0,x.jsx)(o,{label:e.label,language:`text`,children:e.text},e.label))]}):null,p?null:(0,x.jsx)(s,{tool:e.kind,title:e.title,status:w(e.status),open:c,onOpenChange:l,defaultOpen:r,kind:e.kind===`bash`||e.kind===`ipython`?`terminal`:`custom`,children:(0,x.jsxs)(`div`,{className:`space-y-3`,children:[u?(0,x.jsx)(a,{code:u.code,language:u.language,languageLabel:u.label,showStatus:!1,showLineNumbers:!1,wrap:!0}):null,d.map(e=>(0,x.jsx)(o,{label:e.label,language:`text`,children:e.text},e.label))]})})]})}function j({block:e,expanded:t,isStreaming:n,onOpenUIAction:r,onToggle:i}){return(0,x.jsxs)(_,{open:t,onOpenChange:i,children:[(0,x.jsxs)(g,{render:(0,x.jsx)(d,{variant:`ghost`,size:`compact`,className:`group w-full justify-start gap-1.5 text-left text-label font-normal text-foreground/65 transition-none hover:bg-foreground/5 hover:text-foreground/80`}),children:[(0,x.jsx)(l,{className:`size-3 shrink-0 text-foreground/35 transition-transform group-data-panel-open:rotate-90`}),(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/35`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.component,children:e.component}),(0,x.jsxs)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:[`#`,e.ordinal]})]}),(0,x.jsx)(h,{children:(0,x.jsx)(`div`,{className:`mb-1 mt-0.5 flex min-w-0 flex-col overflow-hidden rounded-md border border-border/60 bg-background px-2.5 py-2`,children:(0,x.jsx)(c,{resetKeys:[e.content],children:(0,x.jsx)(p,{content:e.content,isStreaming:n,messageId:e.blockId,onOpenUIAction:r})})})})]})}function M({openUIBlocks:e=[],onOpenUIAction:t,status:n,artifactRuns:r=S,selectedArtifactId:i}){let a=e,[o,s]=(0,b.useState)(null),c=n===`streaming`?a.at(-1)?.blockId:void 0,l=(0,b.useMemo)(()=>r.flatMap(e=>e.artifacts).filter(e=>e.kind!==`recap`),[r]),d=(0,b.useMemo)(()=>l.filter(e=>e.kind===`openui-html`),[l]),f=(0,b.useMemo)(()=>l.filter(e=>e.kind!==`openui-html`&&e.kind!==`ipython`),[l]);return(0,x.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-2 overflow-hidden`,children:[d.length>0?(0,x.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`OpenUI artifacts`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:d.length})]}),(0,x.jsx)(`div`,{className:`space-y-1`,children:d.map(e=>(0,x.jsx)(k,{artifact:e,selected:e.id===i},e.id))})]}):null,f.length>0?(0,x.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(u,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`Technical artifacts`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:f.length})]}),(0,x.jsx)(`div`,{className:`space-y-1`,children:f.map(e=>(0,x.jsx)(A,{artifact:e,selected:e.id===i},e.id))})]}):null,(0,x.jsxs)(`div`,{className:`flex min-h-0 flex-col`,children:[(0,x.jsxs)(`div`,{className:`mb-2 flex min-w-0 items-center gap-2 rounded-sm bg-foreground/5 px-2 py-1.5`,children:[(0,x.jsx)(y,{className:`size-3.5 shrink-0 text-foreground/45`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-label font-medium text-foreground/70`,children:`Generative UI`}),(0,x.jsx)(`span`,{className:`shrink-0 text-micro text-foreground/40`,children:a.length>0?`${a.length}`:`none yet`})]}),a.length===0?(0,x.jsx)(`p`,{className:`px-2 pb-1 text-caption leading-4 text-foreground/40`,children:`OpenUI interfaces the agent generates in this session appear here, and can be re-opened without scrolling the conversation.`}):(0,x.jsx)(`div`,{className:`flex min-h-0 flex-col gap-0.5 overflow-y-auto`,children:a.map(e=>(0,x.jsx)(j,{block:e,expanded:e.blockId===o,isStreaming:e.blockId===c,onOpenUIAction:t,onToggle:()=>s(t=>t===e.blockId?null:e.blockId)},e.blockId))})]})]})}export{M as ArtifactsPanelContent};
|
package/dist/web/client/assets/{chat-command-palette-Bxr5EkO6.js → chat-command-palette-CKGrP-Ke.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./createLucideIcon-CQY2ECfR.js";import{i,n as a,r as o,t as s}from"./sun-C7zg8Oas.js";import{t as c}from"./right-panel-registry-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{t as r}from"./createLucideIcon-CQY2ECfR.js";import{i,n as a,r as o,t as s}from"./sun-C7zg8Oas.js";import{t as c}from"./right-panel-registry-BkBAryPm.js";import{t as l}from"./plus-DUP2JPVG.js";import{t as u}from"./square-BbTF3gLc.js";import{a as d,c as f,i as p,n as m,o as h,r as g,s as _}from"./command-xo-NK4xO.js";var v={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};v.node;var y=r(v),b=e(t(),1),x=n();function S({open:e,onOpenChange:t,onNewSession:n,onStop:r,onResumeSession:v,onSetRightPanel:S,onThemeChange:C,sessions:w,isStreaming:T,themePreference:E}){let[D,O]=(0,b.useState)(``),[k,A]=(0,b.useState)(e);e!==k&&(A(e),e&&O(``));let j=e=>{e(),t(!1)};return(0,x.jsxs)(m,{open:e,onOpenChange:t,children:[(0,x.jsx)(d,{placeholder:`Type a command or search…`,value:D,onValueChange:O}),(0,x.jsxs)(_,{children:[(0,x.jsx)(g,{children:`No commands found.`}),(0,x.jsxs)(p,{heading:`Actions`,children:[(0,x.jsxs)(h,{onSelect:()=>j(n),keywords:[`new`,`session`,`chat`],children:[(0,x.jsx)(l,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{children:`New session`})]}),T&&(0,x.jsxs)(h,{onSelect:()=>j(r),keywords:[`stop`,`abort`,`cancel`],children:[(0,x.jsx)(u,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{children:`Stop generation`})]})]}),(0,x.jsx)(f,{}),(0,x.jsx)(p,{heading:`Panels`,children:c.map(e=>{let t=e.icon;return(0,x.jsxs)(h,{onSelect:()=>j(()=>S(e.id)),keywords:e.commandKeywords,children:[(0,x.jsx)(t,{}),(0,x.jsx)(`span`,{children:e.commandLabel})]},e.id)})}),w.length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(f,{}),(0,x.jsx)(p,{heading:`Sessions`,children:w.map(e=>{let t=e.title;return(0,x.jsxs)(h,{onSelect:()=>j(()=>v(e)),keywords:[`session`,t],children:[(0,x.jsx)(y,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{className:`truncate`,children:t})]},e.sessionId)})})]}),(0,x.jsx)(f,{}),(0,x.jsxs)(p,{heading:`Theme`,children:[(0,x.jsxs)(h,{onSelect:()=>j(()=>C(`light`)),keywords:[`theme`,`light`],children:[(0,x.jsx)(s,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{children:`Light`}),E===`light`&&(0,x.jsx)(i,{className:`ml-auto size-3 opacity-50`})]}),(0,x.jsxs)(h,{onSelect:()=>j(()=>C(`dark`)),keywords:[`theme`,`dark`],children:[(0,x.jsx)(a,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{children:`Dark`}),E===`dark`&&(0,x.jsx)(i,{className:`ml-auto size-3 opacity-50`})]}),(0,x.jsxs)(h,{onSelect:()=>j(()=>C(`system`)),keywords:[`theme`,`system`],children:[(0,x.jsx)(o,{className:`mr-2 size-4`}),(0,x.jsx)(`span`,{children:`System`}),E===`system`&&(0,x.jsx)(i,{className:`ml-auto size-3 opacity-50`})]})]})]})]})}export{S as ChatCommandPalette};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{E as r,It as i,Lt as a,M as o,O as s,Rt as c,S as l,a as u,c as d,d as f,f as p,i as m,j as h,k as g,l as _,n as ee,o as v,r as y,s as b,t as x,u as S,v as C,x as w,y as te}from"./is-ref-object-h-bjS8Eq.js";var T=e(t(),1),E=n(),D=typeof window<`u`?T.useLayoutEffect:T.useEffect,O=(0,T.createContext)({});function k(e,t){if(C(e)){let{initial:t,animate:n}=e;return{initial:t===!1||w(t)?t:void 0,animate:w(n)?n:void 0}}return e.inherit===!1?{}:t}function A(e){let{initial:t,animate:n}=k(e,(0,T.useContext)(O));return(0,T.useMemo)(()=>({initial:t,animate:n}),[j(t),j(n)])}function j(e){return Array.isArray(e)?e.join(` `):e}var M=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function N(e,t,n){for(let r in t)!h(t[r])&&!p(r,n)&&(e[r]=t[r])}function ne({transformTemplate:e},t){return(0,T.useMemo)(()=>{let n=M();return s(n,t,e),Object.assign({},n.vars,n.style)},[t])}function P(e,t){let n=e.style||{},r={};return N(r,n,e),Object.assign(r,ne(e,t)),r}function F(e,t){let n={},r=P(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var I=()=>({...M(),attrs:{}});function L(e,t,n,i){let a=(0,T.useMemo)(()=>{let n=I();return r(n,t,S(i),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};N(t,e.style,e),a.style={...t,...a.style}}return a}var R=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function z(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||R.has(e)}function B(e,t){return e.startsWith(`on`)?!z(e):t?.(e)??!z(e)}function V(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(h(e[a])||(B(a,r)||n===!0&&z(a)||!t&&!z(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}function H(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??y(e)?L:F)(t,r,i,e),l=V(t,typeof e==`string`,a,s),u=e===T.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,T.useMemo)(()=>h(d)?d.get():d,[d]);return(0,T.createElement)(e,{...u,children:f})}function U({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:W(n,r,i,e),renderState:t()}}function W(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=d(a[e]);let{initial:s,animate:c}=e,u=C(e),f=te(e);t&&f&&!u&&e.inherit!==!1&&(s===void 0&&(s=t.initial),c===void 0&&(c=t.animate));let p=n?n.initial===!1:!1;p||=s===!1;let m=p?c:s;if(m&&typeof m!=`boolean`&&!l(m)){let t=Array.isArray(m)?m:[m];for(let n=0;n<t.length;n++){let r=o(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=p?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var G=e=>(t,n)=>{let r=(0,T.useContext)(O),o=(0,T.useContext)(i),s=()=>U(e,t,r,o);return n?s():a(s)},K=G({scrapeMotionValuesFromProps:f,createRenderState:M}),q=G({scrapeMotionValuesFromProps:_,createRenderState:I}),J=Symbol.for(`motionComponentSymbol`);function Y(e,t,n){let r=(0,T.useRef)(n);(0,T.useInsertionEffect)(()=>{r.current=n});let i=(0,T.useRef)(null);return(0,T.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}function re(e,t,n,r,a,o){let{visualElement:s}=(0,T.useContext)(O),c=(0,T.useContext)(v),l=(0,T.useContext)(i),u=(0,T.useContext)(b),d=u.reducedMotion,f=u.skipAnimations,p=(0,T.useRef)(null),m=(0,T.useRef)(!1);r||=c.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:o}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let h=p.current,_=(0,T.useContext)(ee);h&&!h.projection&&a&&(h.type===`html`||h.type===`svg`)&&X(p.current,n,a,_);let y=(0,T.useRef)(!1);(0,T.useInsertionEffect)(()=>{h&&y.current&&h.update(n,l)});let x=n[g],S=(0,T.useRef)(!!x&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return D(()=>{!m.current||!h||(h.animationState?.animateChanges(),h.enteringChildren=void 0)},[]),D(()=>{m.current=!0,h&&(y.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),S.current&&h.animationState&&h.animationState.animateChanges())}),(0,T.useEffect)(()=>{h&&(!S.current&&h.animationState&&h.animationState.animateChanges(),S.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),!1),h.enteringChildren=void 0)}),h}function X(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Z(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&x(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Z(e){if(e)return e.options.allowProjection===!1?Z(e.parent):e.projection}function Q(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&m(r);let a=n?n===`svg`:y(e),o=a?q:K;function s(n,s){let c,l={...(0,T.useContext)(b),...n,layoutId:ie(n)},{isStatic:u,isValidProp:d}=l,f=A(n),p=o(n,u);if(!u&&typeof window<`u`){ae(l,r);let t=oe(l);c=t.MeasureLayout,f.visualElement=re(e,p,l,i,t.ProjectionNode,a)}return(0,E.jsxs)(O.Provider,{value:f,children:[c&&f.visualElement?(0,E.jsx)(c,{visualElement:f.visualElement,...l}):null,H(e,n,Y(p,f.visualElement,s),p,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,T.forwardRef)(s);return c[J]=e,c}function ie({layoutId:e}){let t=(0,T.useContext)(c).id;return t&&e!==void 0?t+`-`+e:e}function ae(e,t){(0,T.useContext)(v).strict}function oe(e){let{drag:t,layout:n}=u();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function se(e,t){if(typeof Proxy>`u`)return Q;let n=new Map,r=(n,r)=>Q(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Q(a,void 0,e,t)),n.get(a))})}var ce=se(),le=[.16,1,.3,1],$=[.77,0,.175,1],ue=[.32,.72,0,1],de=`cubic-bezier(0.16, 1, 0.3, 1)`,fe={type:`spring`,stiffness:500,damping:30,mass:.6},pe={type:`spring`,stiffness:460,damping:30,mass:.55},me={type:`spring`,stiffness:360,damping:32,mass:.6},he={stiffness:700,damping:50,mass:.5}
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-Cvdyeg_0.js";import{t as n}from"./jsx-runtime-NZYk81nU.js";import{E as r,It as i,Lt as a,M as o,O as s,Rt as c,S as l,a as u,c as d,d as f,f as p,i as m,j as h,k as g,l as _,n as ee,o as v,r as y,s as b,t as x,u as S,v as C,x as w,y as te}from"./is-ref-object-h-bjS8Eq.js";var T=e(t(),1),E=n(),D=typeof window<`u`?T.useLayoutEffect:T.useEffect,O=(0,T.createContext)({});function k(e,t){if(C(e)){let{initial:t,animate:n}=e;return{initial:t===!1||w(t)?t:void 0,animate:w(n)?n:void 0}}return e.inherit===!1?{}:t}function A(e){let{initial:t,animate:n}=k(e,(0,T.useContext)(O));return(0,T.useMemo)(()=>({initial:t,animate:n}),[j(t),j(n)])}function j(e){return Array.isArray(e)?e.join(` `):e}var M=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function N(e,t,n){for(let r in t)!h(t[r])&&!p(r,n)&&(e[r]=t[r])}function ne({transformTemplate:e},t){return(0,T.useMemo)(()=>{let n=M();return s(n,t,e),Object.assign({},n.vars,n.style)},[t])}function P(e,t){let n=e.style||{},r={};return N(r,n,e),Object.assign(r,ne(e,t)),r}function F(e,t){let n={},r=P(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var I=()=>({...M(),attrs:{}});function L(e,t,n,i){let a=(0,T.useMemo)(()=>{let n=I();return r(n,t,S(i),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};N(t,e.style,e),a.style={...t,...a.style}}return a}var R=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function z(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||R.has(e)}function B(e,t){return e.startsWith(`on`)?!z(e):t?.(e)??!z(e)}function V(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(h(e[a])||(B(a,r)||n===!0&&z(a)||!t&&!z(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}function H(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??y(e)?L:F)(t,r,i,e),l=V(t,typeof e==`string`,a,s),u=e===T.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,T.useMemo)(()=>h(d)?d.get():d,[d]);return(0,T.createElement)(e,{...u,children:f})}function U({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:W(n,r,i,e),renderState:t()}}function W(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=d(a[e]);let{initial:s,animate:c}=e,u=C(e),f=te(e);t&&f&&!u&&e.inherit!==!1&&(s===void 0&&(s=t.initial),c===void 0&&(c=t.animate));let p=n?n.initial===!1:!1;p||=s===!1;let m=p?c:s;if(m&&typeof m!=`boolean`&&!l(m)){let t=Array.isArray(m)?m:[m];for(let n=0;n<t.length;n++){let r=o(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=p?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var G=e=>(t,n)=>{let r=(0,T.useContext)(O),o=(0,T.useContext)(i),s=()=>U(e,t,r,o);return n?s():a(s)},K=G({scrapeMotionValuesFromProps:f,createRenderState:M}),q=G({scrapeMotionValuesFromProps:_,createRenderState:I}),J=Symbol.for(`motionComponentSymbol`);function Y(e,t,n){let r=(0,T.useRef)(n);(0,T.useInsertionEffect)(()=>{r.current=n});let i=(0,T.useRef)(null);return(0,T.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}function re(e,t,n,r,a,o){let{visualElement:s}=(0,T.useContext)(O),c=(0,T.useContext)(v),l=(0,T.useContext)(i),u=(0,T.useContext)(b),d=u.reducedMotion,f=u.skipAnimations,p=(0,T.useRef)(null),m=(0,T.useRef)(!1);r||=c.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:o}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let h=p.current,_=(0,T.useContext)(ee);h&&!h.projection&&a&&(h.type===`html`||h.type===`svg`)&&X(p.current,n,a,_);let y=(0,T.useRef)(!1);(0,T.useInsertionEffect)(()=>{h&&y.current&&h.update(n,l)});let x=n[g],S=(0,T.useRef)(!!x&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return D(()=>{!m.current||!h||(h.animationState?.animateChanges(),h.enteringChildren=void 0)},[]),D(()=>{m.current=!0,h&&(y.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),S.current&&h.animationState&&h.animationState.animateChanges())}),(0,T.useEffect)(()=>{h&&(!S.current&&h.animationState&&h.animationState.animateChanges(),S.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),!1),h.enteringChildren=void 0)}),h}function X(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Z(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&x(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Z(e){if(e)return e.options.allowProjection===!1?Z(e.parent):e.projection}function Q(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&m(r);let a=n?n===`svg`:y(e),o=a?q:K;function s(n,s){let c,l={...(0,T.useContext)(b),...n,layoutId:ie(n)},{isStatic:u,isValidProp:d}=l,f=A(n),p=o(n,u);if(!u&&typeof window<`u`){ae(l,r);let t=oe(l);c=t.MeasureLayout,f.visualElement=re(e,p,l,i,t.ProjectionNode,a)}return(0,E.jsxs)(O.Provider,{value:f,children:[c&&f.visualElement?(0,E.jsx)(c,{visualElement:f.visualElement,...l}):null,H(e,n,Y(p,f.visualElement,s),p,u,t,a,d)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,T.forwardRef)(s);return c[J]=e,c}function ie({layoutId:e}){let t=(0,T.useContext)(c).id;return t&&e!==void 0?t+`-`+e:e}function ae(e,t){(0,T.useContext)(v).strict}function oe(e){let{drag:t,layout:n}=u();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function se(e,t){if(typeof Proxy>`u`)return Q;let n=new Map,r=(n,r)=>Q(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Q(a,void 0,e,t)),n.get(a))})}var ce=se(),le=[.16,1,.3,1],$=[.77,0,.175,1],ue=[.32,.72,0,1],de=`cubic-bezier(0.16, 1, 0.3, 1)`,fe={type:`spring`,stiffness:500,damping:30,mass:.6},pe={type:`spring`,stiffness:460,damping:30,mass:.55},me={type:`spring`,stiffness:360,damping:32,mass:.6},he={stiffness:700,damping:50,mass:.5};export{he as a,pe as c,de as i,ce as l,$ as n,me as o,le as r,fe as s,ue as t,D as u};
|