@ugurdemirel/landcraft 0.1.20 → 0.1.22
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/cjs/components/AgentDemo/AgentDemo.cjs +2 -0
- package/dist/cjs/components/AgentDemo/AgentDemo.cjs.map +1 -0
- package/dist/cjs/components/AgentDemo/Player.cjs +3 -0
- package/dist/cjs/components/AgentDemo/Player.cjs.map +1 -0
- package/dist/cjs/components/AgentDemo/ToolCard.cjs +3 -0
- package/dist/cjs/components/AgentDemo/ToolCard.cjs.map +1 -0
- package/dist/cjs/components/AgentDemo/parts.cjs +2 -0
- package/dist/cjs/components/AgentDemo/parts.cjs.map +1 -0
- package/dist/cjs/icons.cjs +1 -1
- package/dist/cjs/icons.cjs.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/es/components/AgentDemo/AgentDemo.js +69 -0
- package/dist/es/components/AgentDemo/AgentDemo.js.map +1 -0
- package/dist/es/components/AgentDemo/Player.js +171 -0
- package/dist/es/components/AgentDemo/Player.js.map +1 -0
- package/dist/es/components/AgentDemo/ToolCard.js +96 -0
- package/dist/es/components/AgentDemo/ToolCard.js.map +1 -0
- package/dist/es/components/AgentDemo/parts.js +163 -0
- package/dist/es/components/AgentDemo/parts.js.map +1 -0
- package/dist/es/icons.js +49 -41
- package/dist/es/icons.js.map +1 -1
- package/dist/es/index.js +71 -67
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +70 -0
- package/dist/styles.css +151 -0
- package/package.json +1 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("react"),v=require("./Player.cjs"),r=require("./parts.cjs"),y=h.forwardRef(({option:l="player",script:t,title:n,subtitle:a,logo:i,logoSrc:o,logoAlt:d,logoClassName:m,height:s,autoplay:D,paused:p,loop:f,speed:g,showControls:q,showSteps:S,onDone:b,className:u,"aria-label":c,...j},x)=>l==="transcript"?e.jsx("div",{ref:x,className:u,...j,children:e.jsx(r.DemoWindow,{title:n,subtitle:a,logo:i,logoSrc:o,logoAlt:d,logoClassName:m,logLabel:c??"Scripted agent demo",height:s,footer:e.jsx(r.DemoFooter,{}),children:t.length===0?e.jsx(r.EmptyState,{}):t.map((A,P)=>e.jsx(r.FinishedStep,{step:A},P))})}):e.jsx(v.AgentDemoPlayer,{ref:x,script:t,title:n,subtitle:a,logo:i,logoSrc:o,logoAlt:d,logoClassName:m,height:s,autoplay:D,paused:p,loop:f,speed:g,showControls:q,showSteps:S,onDone:b,className:u,"aria-label":c,...j}));y.displayName="AgentDemo";exports.AgentDemo=y;
|
|
2
|
+
//# sourceMappingURL=AgentDemo.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentDemo.cjs","sources":["../../../../src/components/AgentDemo/AgentDemo.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { AgentDemoProps } from \"./types\";\nimport { AgentDemoPlayer } from \"./Player\";\nimport { DemoWindow, EmptyState, FinishedStep, DemoFooter } from \"./parts\";\n\n/**\n * Scripted agentic-chat demo for marketing pages.\n *\n * `player` (default) auto-plays the `script` — user messages type out, the\n * agent \"thinks\", tool calls run and resolve, answers stream in — with\n * pause/replay controls. `transcript` renders the whole script instantly\n * (also used automatically under `prefers-reduced-motion`).\n */\nexport const AgentDemo = forwardRef<HTMLDivElement, AgentDemoProps>(\n (\n {\n option = \"player\",\n script,\n title,\n subtitle,\n logo,\n logoSrc,\n logoAlt,\n logoClassName,\n height,\n autoplay,\n paused,\n loop,\n speed,\n showControls,\n showSteps,\n onDone,\n className,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) => {\n if (option === \"transcript\") {\n return (\n <div ref={ref} className={className} {...props}>\n <DemoWindow\n title={title}\n subtitle={subtitle}\n logo={logo}\n logoSrc={logoSrc}\n logoAlt={logoAlt}\n logoClassName={logoClassName}\n logLabel={ariaLabel ?? \"Scripted agent demo\"}\n height={height}\n footer={<DemoFooter />}\n >\n {script.length === 0 ? (\n <EmptyState />\n ) : (\n script.map((step, i) => <FinishedStep key={i} step={step} />)\n )}\n </DemoWindow>\n </div>\n );\n }\n return (\n <AgentDemoPlayer\n ref={ref}\n script={script}\n title={title}\n subtitle={subtitle}\n logo={logo}\n logoSrc={logoSrc}\n logoAlt={logoAlt}\n logoClassName={logoClassName}\n height={height}\n autoplay={autoplay}\n paused={paused}\n loop={loop}\n speed={speed}\n showControls={showControls}\n showSteps={showSteps}\n onDone={onDone}\n className={className}\n aria-label={ariaLabel}\n {...props}\n />\n );\n },\n);\nAgentDemo.displayName = \"AgentDemo\";\n"],"names":["AgentDemo","forwardRef","option","script","title","subtitle","logo","logoSrc","logoAlt","logoClassName","height","autoplay","paused","loop","speed","showControls","showSteps","onDone","className","ariaLabel","props","ref","jsx","DemoWindow","DemoFooter","EmptyState","step","i","FinishedStep","AgentDemoPlayer"],"mappings":"2LAaaA,EAAYC,EAAAA,WACvB,CACE,CACE,OAAAC,EAAS,SACT,OAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EACA,QAAAC,EACA,QAAAC,EACA,cAAAC,EACA,OAAAC,EACA,SAAAC,EACA,OAAAC,EACA,KAAAC,EACA,MAAAC,EACA,aAAAC,EACA,UAAAC,EACA,OAAAC,EACA,UAAAC,EACA,aAAcC,EACd,GAAGC,CAAA,EAELC,IAEInB,IAAW,aAEXoB,EAAAA,IAAC,MAAA,CAAI,IAAAD,EAAU,UAAAH,EAAuB,GAAGE,EACvC,SAAAE,EAAAA,IAACC,EAAAA,WAAA,CACC,MAAAnB,EACA,SAAAC,EACA,KAAAC,EACA,QAAAC,EACA,QAAAC,EACA,cAAAC,EACA,SAAUU,GAAa,sBACvB,OAAAT,EACA,aAASc,EAAAA,WAAA,EAAW,EAEnB,SAAArB,EAAO,SAAW,EACjBmB,EAAAA,IAACG,EAAAA,aAAW,EAEZtB,EAAO,IAAI,CAACuB,EAAMC,IAAML,EAAAA,IAACM,EAAAA,aAAA,CAAqB,KAAAF,CAAA,EAAHC,CAAe,CAAE,CAAA,CAAA,EAGlE,EAIFL,EAAAA,IAACO,EAAAA,gBAAA,CACC,IAAAR,EACA,OAAAlB,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EACA,QAAAC,EACA,QAAAC,EACA,cAAAC,EACA,OAAAC,EACA,SAAAC,EACA,OAAAC,EACA,KAAAC,EACA,MAAAC,EACA,aAAAC,EACA,UAAAC,EACA,OAAAC,EACA,UAAAC,EACA,aAAYC,EACX,GAAGC,CAAA,CAAA,CAIZ,EACApB,EAAU,YAAc"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),N=require("../../icons.cjs"),te=require("./ToolCard.cjs"),s=require("./parts.cjs"),ne=24,se=350,re=1e3,oe=1100,ce=2600;function ie(){const[W,o]=n.useState(!1);return n.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const m=window.matchMedia("(prefers-reduced-motion: reduce)");o(m.matches)},[]),W}const J=n.forwardRef(function({script:o,title:m,subtitle:T,logo:w,logoSrc:M,logoAlt:v,logoClassName:E,height:C,autoplay:l=!0,paused:h=!1,loop:_=!1,speed:k=1,showControls:Q=!0,showSteps:V=!0,onDone:I,className:b,"aria-label":q,...D},A){const X=ie(),x=!l||X,g=k&&k>0?k:1,[G,Y]=n.useState(0),[F,d]=n.useState(l&&!h),[a,O]=n.useState(0),[B,Z]=n.useState(""),[H,j]=n.useState(!1),p=n.useRef(null),K=n.useRef(""),f=n.useRef(0),R=n.useRef(I);n.useEffect(()=>{R.current=I},[I]);const u=o.length,c=u>0&&a>=u,S=t=>{K.current=t,Z(t)},U=()=>{f.current=0,S(""),j(!1),O(0),d(!0),Y(t=>t+1)};if(n.useEffect(()=>{f.current=0,S(""),j(!1),O(0),d(l&&!h)},[o,l,h]),n.useEffect(()=>{h?d(!1):l&&d(!0)},[h,l]),n.useEffect(()=>{if(x||!F||a>=u)return;const t=o[a],r=[];let y;f.current=K.current.length;const L=()=>{r.push(setTimeout(()=>{S(""),j(!1),f.current=0,O(P=>P+1)},se/g))};if(t.type==="user"||t.type==="assistant"){const P=t.text,ee=Math.max(1,Math.ceil(P.length/36));y=setInterval(()=>{f.current+=ee;const z=P.slice(0,f.current);S(z),z.length>=P.length&&(y&&clearInterval(y),L())},ne/g)}else t.type==="thinking"?r.push(setTimeout(L,re/g)):(j(!0),r.push(setTimeout(()=>{j(!1),L()},oe/g)));return()=>{y&&clearInterval(y),r.forEach(clearTimeout)}},[x,F,a,G,o,g,u]),n.useEffect(()=>{var r;if(x||!c||((r=R.current)==null||r.call(R),!_))return;const t=setTimeout(U,ce);return()=>clearTimeout(t)},[x,c,_,G]),n.useEffect(()=>{const t=p.current;t&&(t.scrollTop=t.scrollHeight)},[a,B,H]),u===0)return e.jsx("div",{ref:A,className:b,...D,children:e.jsx(s.DemoWindow,{title:m,subtitle:T,logo:w,logoSrc:M,logoAlt:v,logoClassName:E,logLabel:q??"Scripted agent demo",height:C,logRef:p,children:e.jsx(s.EmptyState,{})})});if(x)return e.jsx("div",{ref:A,className:b,...D,children:e.jsx(s.DemoWindow,{title:m,subtitle:T,logo:w,logoSrc:M,logoAlt:v,logoClassName:E,logLabel:q??"Scripted agent demo",height:C,logRef:p,footer:e.jsx(s.DemoFooter,{}),children:o.map((t,r)=>e.jsx(s.FinishedStep,{step:t},r))})});const i=o[Math.min(a,u-1)],$=!c&&i.type==="user"?B:void 0;return e.jsx("div",{ref:A,className:b,...D,children:e.jsxs(s.DemoWindow,{title:m,subtitle:T,logo:w,logoSrc:M,logoAlt:v,logoClassName:E,logLabel:q??"Scripted agent demo",height:C,logRef:p,footer:e.jsx(s.DemoFooter,{composing:$,controls:Q?e.jsxs(e.Fragment,{children:[F&&!c?e.jsxs(s.ControlButton,{onClick:()=>d(!1),"aria-label":"Pause demo",children:[e.jsx(N.Pause,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Pause"]}):c?null:e.jsxs(s.ControlButton,{onClick:()=>d(!0),"aria-label":"Play demo",children:[e.jsx(N.Play,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Play"]}),e.jsxs(s.ControlButton,{onClick:U,"aria-label":"Replay demo",children:[e.jsx(N.RotateCcw,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Replay"]})]}):void 0,progress:V?e.jsx("span",{className:"ml-auto",children:e.jsx(s.StepProgress,{current:a+1,total:u,done:c})}):void 0}),children:[o.slice(0,a).map((t,r)=>e.jsx(s.FinishedStep,{step:t},r)),!c&&i.type==="assistant"?e.jsx(s.AssistantMessage,{text:B,partial:!0}):null,!c&&i.type==="thinking"?e.jsx(s.ThinkingRow,{label:i.label??"Thinking…"}):null,!c&&i.type==="tool"?e.jsx(te.ToolCard,{name:i.name,args:i.args,result:i.result,status:H?"running":i.status==="error"?"error":"success"}):null]})})});J.displayName="AgentDemoPlayer";exports.AgentDemoPlayer=J;
|
|
3
|
+
//# sourceMappingURL=Player.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Player.cjs","sources":["../../../../src/components/AgentDemo/Player.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useEffect, useRef, useState } from \"react\";\nimport { Pause, Play, RotateCcw } from \"../../icons\";\nimport type { AgentDemoProps } from \"./types\";\nimport { ToolCard } from \"./ToolCard\";\nimport {\n AssistantMessage,\n ControlButton,\n DemoFooter,\n DemoWindow,\n EmptyState,\n FinishedStep,\n StepProgress,\n ThinkingRow,\n} from \"./parts\";\n\nconst TICK = 24;\nconst GAP = 350;\nconst THINKING_MS = 1000;\nconst TOOL_MS = 1100;\nconst LOOP_PAUSE = 2600;\n\nfunction usePrefersReducedMotion() {\n const [reduced, setReduced] = useState(false);\n useEffect(() => {\n if (typeof window === \"undefined\" || typeof window.matchMedia !== \"function\") return;\n const query = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n setReduced(query.matches);\n }, []);\n return reduced;\n}\n\nexport const AgentDemoPlayer = forwardRef<HTMLDivElement, AgentDemoProps>(function AgentDemoPlayer(\n {\n script,\n title,\n subtitle,\n logo,\n logoSrc,\n logoAlt,\n logoClassName,\n height,\n autoplay = true,\n paused = false,\n loop = false,\n speed = 1,\n showControls = true,\n showSteps = true,\n onDone,\n className,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n) {\n const reduceMotion = usePrefersReducedMotion();\n const staticRender = !autoplay || reduceMotion;\n const rate = speed && speed > 0 ? speed : 1;\n\n const [runId, setRunId] = useState(0);\n const [playing, setPlaying] = useState(autoplay && !paused);\n const [completed, setCompleted] = useState(0);\n const [partial, setPartial] = useState(\"\");\n const [toolRunning, setToolRunning] = useState(false);\n\n const logRef = useRef<HTMLDivElement | null>(null);\n const partialRef = useRef(\"\");\n const progressRef = useRef(0);\n const onDoneRef = useRef(onDone);\n useEffect(() => {\n onDoneRef.current = onDone;\n }, [onDone]);\n\n const total = script.length;\n const done = total > 0 && completed >= total;\n\n const setPartialBoth = (value: string) => {\n partialRef.current = value;\n setPartial(value);\n };\n\n const replay = () => {\n progressRef.current = 0;\n setPartialBoth(\"\");\n setToolRunning(false);\n setCompleted(0);\n setPlaying(true);\n setRunId((id) => id + 1);\n };\n\n // Reset when the script changes.\n useEffect(() => {\n progressRef.current = 0;\n setPartialBoth(\"\");\n setToolRunning(false);\n setCompleted(0);\n setPlaying(autoplay && !paused);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [script, autoplay, paused]);\n\n // Follow the `paused` prop (explicit Play/Pause clicks always win locally).\n useEffect(() => {\n if (paused) {\n setPlaying(false);\n } else if (autoplay) {\n setPlaying(true);\n }\n }, [paused, autoplay]);\n\n // Core playback loop: one effect per in-progress step.\n useEffect(() => {\n if (staticRender || !playing || completed >= total) return;\n const step = script[completed];\n const timers: ReturnType<typeof setTimeout>[] = [];\n let interval: ReturnType<typeof setInterval> | undefined;\n // Resume typing where it paused instead of restarting the message.\n progressRef.current = partialRef.current.length;\n\n const finish = () => {\n timers.push(\n setTimeout(() => {\n setPartialBoth(\"\");\n setToolRunning(false);\n progressRef.current = 0;\n setCompleted((c) => c + 1);\n }, GAP / rate),\n );\n };\n\n if (step.type === \"user\" || step.type === \"assistant\") {\n const full = step.text;\n const chunk = Math.max(1, Math.ceil(full.length / 36));\n interval = setInterval(() => {\n progressRef.current += chunk;\n const next = full.slice(0, progressRef.current);\n setPartialBoth(next);\n if (next.length >= full.length) {\n if (interval) clearInterval(interval);\n finish();\n }\n }, TICK / rate);\n } else if (step.type === \"thinking\") {\n timers.push(setTimeout(finish, THINKING_MS / rate));\n } else {\n setToolRunning(true);\n timers.push(\n setTimeout(() => {\n setToolRunning(false);\n finish();\n }, TOOL_MS / rate),\n );\n }\n\n return () => {\n if (interval) clearInterval(interval);\n timers.forEach(clearTimeout);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [staticRender, playing, completed, runId, script, rate, total]);\n\n // Completion: notify once per run, then loop if asked.\n useEffect(() => {\n if (staticRender || !done) return;\n onDoneRef.current?.();\n if (!loop) return;\n const timer = setTimeout(replay, LOOP_PAUSE);\n return () => clearTimeout(timer);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [staticRender, done, loop, runId]);\n\n // Keep the newest step in view while playing.\n useEffect(() => {\n const el = logRef.current;\n if (el) el.scrollTop = el.scrollHeight;\n }, [completed, partial, toolRunning]);\n\n if (total === 0) {\n return (\n <div ref={ref} className={className} {...props}>\n <DemoWindow\n title={title}\n subtitle={subtitle}\n logo={logo}\n logoSrc={logoSrc}\n logoAlt={logoAlt}\n logoClassName={logoClassName}\n logLabel={ariaLabel ?? \"Scripted agent demo\"}\n height={height}\n logRef={logRef}\n >\n <EmptyState />\n </DemoWindow>\n </div>\n );\n }\n\n if (staticRender) {\n return (\n <div ref={ref} className={className} {...props}>\n <DemoWindow\n title={title}\n subtitle={subtitle}\n logo={logo}\n logoSrc={logoSrc}\n logoAlt={logoAlt}\n logoClassName={logoClassName}\n logLabel={ariaLabel ?? \"Scripted agent demo\"}\n height={height}\n logRef={logRef}\n footer={<DemoFooter />}\n >\n {script.map((step, i) => (\n <FinishedStep key={i} step={step} />\n ))}\n </DemoWindow>\n </div>\n );\n }\n\n const current = script[Math.min(completed, total - 1)];\n // The user \"types\" in the input box; the bubble only mounts once sent.\n const composing = !done && current.type === \"user\" ? partial : undefined;\n\n return (\n <div ref={ref} className={className} {...props}>\n <DemoWindow\n title={title}\n subtitle={subtitle}\n logo={logo}\n logoSrc={logoSrc}\n logoAlt={logoAlt}\n logoClassName={logoClassName}\n logLabel={ariaLabel ?? \"Scripted agent demo\"}\n height={height}\n logRef={logRef}\n footer={\n <DemoFooter\n composing={composing}\n controls={\n showControls ? (\n <>\n {playing && !done ? (\n <ControlButton onClick={() => setPlaying(false)} aria-label=\"Pause demo\">\n <Pause className=\"h-3.5 w-3.5\" aria-hidden />\n Pause\n </ControlButton>\n ) : !done ? (\n <ControlButton onClick={() => setPlaying(true)} aria-label=\"Play demo\">\n <Play className=\"h-3.5 w-3.5\" aria-hidden />\n Play\n </ControlButton>\n ) : null}\n <ControlButton onClick={replay} aria-label=\"Replay demo\">\n <RotateCcw className=\"h-3.5 w-3.5\" aria-hidden />\n Replay\n </ControlButton>\n </>\n ) : undefined\n }\n progress={\n showSteps ? (\n <span className=\"ml-auto\">\n <StepProgress current={completed + 1} total={total} done={done} />\n </span>\n ) : undefined\n }\n />\n }\n >\n {script.slice(0, completed).map((step, i) => (\n <FinishedStep key={i} step={step} />\n ))}\n {!done && current.type === \"assistant\" ? (\n <AssistantMessage text={partial} partial />\n ) : null}\n {!done && current.type === \"thinking\" ? (\n <ThinkingRow label={current.label ?? \"Thinking…\"} />\n ) : null}\n {!done && current.type === \"tool\" ? (\n <ToolCard\n name={current.name}\n args={current.args}\n result={current.result}\n status={\n toolRunning ? \"running\" : current.status === \"error\" ? \"error\" : \"success\"\n }\n />\n ) : null}\n </DemoWindow>\n </div>\n );\n});\nAgentDemoPlayer.displayName = \"AgentDemoPlayer\";\n"],"names":["TICK","GAP","THINKING_MS","TOOL_MS","LOOP_PAUSE","usePrefersReducedMotion","reduced","setReduced","useState","useEffect","query","AgentDemoPlayer","forwardRef","script","title","subtitle","logo","logoSrc","logoAlt","logoClassName","height","autoplay","paused","loop","speed","showControls","showSteps","onDone","className","ariaLabel","props","ref","reduceMotion","staticRender","rate","runId","setRunId","playing","setPlaying","completed","setCompleted","partial","setPartial","toolRunning","setToolRunning","logRef","useRef","partialRef","progressRef","onDoneRef","total","done","setPartialBoth","value","replay","id","step","timers","interval","finish","c","full","chunk","next","_a","timer","el","jsx","DemoWindow","EmptyState","DemoFooter","i","FinishedStep","current","composing","jsxs","Fragment","ControlButton","Pause","Play","RotateCcw","StepProgress","AssistantMessage","ThinkingRow","ToolCard"],"mappings":"2NAgBMA,GAAO,GACPC,GAAM,IACNC,GAAc,IACdC,GAAU,KACVC,GAAa,KAEnB,SAASC,IAA0B,CACjC,KAAM,CAACC,EAASC,CAAU,EAAIC,EAAAA,SAAS,EAAK,EAC5CC,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAI,OAAO,OAAW,KAAe,OAAO,OAAO,YAAe,WAAY,OAC9E,MAAMC,EAAQ,OAAO,WAAW,kCAAkC,EAClEH,EAAWG,EAAM,OAAO,CAC1B,EAAG,CAAA,CAAE,EACEJ,CACT,CAEO,MAAMK,EAAkBC,EAAAA,WAA2C,SACxE,CACE,OAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EACA,QAAAC,EACA,QAAAC,EACA,cAAAC,EACA,OAAAC,EACA,SAAAC,EAAW,GACX,OAAAC,EAAS,GACT,KAAAC,EAAO,GACP,MAAAC,EAAQ,EACR,aAAAC,EAAe,GACf,UAAAC,EAAY,GACZ,OAAAC,EACA,UAAAC,EACA,aAAcC,EACd,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAe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AY,MAAOV,EAAQ,OAAS,WAAA,CAAa,EAChD,KACH,CAACtB,GAAQsB,EAAQ,OAAS,OACzBN,EAAAA,IAACiB,GAAAA,SAAA,CACC,KAAMX,EAAQ,KACd,KAAMA,EAAQ,KACd,OAAQA,EAAQ,OAChB,OACE9B,EAAc,UAAY8B,EAAQ,SAAW,QAAU,QAAU,SAAA,CAAA,EAGnE,IAAA,CAAA,CAAA,EAER,CAEJ,CAAC,EACD9D,EAAgB,YAAc"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("react"),s=require("../../utils/cn.cjs"),n=require("../../icons.cjs"),l={running:"Running",success:"Done",error:"Failed"};function m({name:i,args:t,result:o,status:r="success"}){const[a,c]=x.useState(!1),d=!!(t??o);return e.jsxs("div",{className:s.cn("rounded-xl border border-border bg-surface-strong/40",r==="error"&&"border-red-500/40"),children:[e.jsxs("button",{type:"button","aria-expanded":a,"aria-label":`${i} details, ${l[r].toLowerCase()}`,onClick:()=>c(u=>!u),className:"flex w-full cursor-pointer items-center gap-2.5 px-3.5 py-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",children:[e.jsx("span",{className:s.cn("inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md",r==="error"?"bg-red-500/15 text-red-500":"bg-foreground/8 text-foreground"),children:r==="running"?e.jsx("span",{"aria-hidden":!0,className:"h-3 w-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent"}):r==="error"?e.jsx(n.X,{className:"h-3.5 w-3.5"}):e.jsx(n.Check,{className:"h-3.5 w-3.5"})}),e.jsx(n.Terminal,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground","aria-hidden":!0}),e.jsx("span",{className:"truncate font-mono text-[13px] font-medium",children:i}),e.jsxs("span",{className:s.cn("ml-auto flex shrink-0 items-center gap-1.5 text-xs",r==="running"?"text-muted-foreground":r==="error"?"text-red-500":"text-emerald-600 dark:text-emerald-400"),children:[r==="running"?e.jsx("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-current","aria-hidden":!0}):null,l[r]]}),d?e.jsx(n.ChevronDown,{"aria-hidden":!0,className:s.cn("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",a&&"rotate-180")}):null]}),a&&d?e.jsxs("div",{className:"space-y-2 border-t border-border px-3.5 py-3",children:[t?e.jsxs("div",{children:[e.jsxs("p",{className:"mb-1 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:[e.jsx(n.Cpu,{className:"h-3 w-3","aria-hidden":!0})," Arguments"]}),e.jsx("pre",{className:"overflow-x-auto rounded-lg bg-background/60 p-2.5 font-mono text-xs leading-5",children:t})]}):null,o?e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Result"}),e.jsx("p",{className:"rounded-lg bg-background/60 p-2.5 font-mono text-xs leading-5",children:o})]}):null]}):null]})}exports.ToolCard=m;
|
|
3
|
+
//# sourceMappingURL=ToolCard.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolCard.cjs","sources":["../../../../src/components/AgentDemo/ToolCard.tsx"],"sourcesContent":["\"use client\";\nimport { useState } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Check, ChevronDown, Cpu, Terminal, X } from \"../../icons\";\n\nexport type ToolStatus = \"running\" | \"success\" | \"error\";\n\nconst statusLabel: Record<ToolStatus, string> = {\n running: \"Running\",\n success: \"Done\",\n error: \"Failed\",\n};\n\nexport function ToolCard({\n name,\n args,\n result,\n status = \"success\",\n}: {\n name: string;\n args?: string;\n result?: string;\n status?: ToolStatus;\n}) {\n const [open, setOpen] = useState(false);\n const hasDetails = Boolean(args ?? result);\n\n return (\n <div\n className={cn(\n \"rounded-xl border border-border bg-surface-strong/40\",\n status === \"error\" && \"border-red-500/40\",\n )}\n >\n <button\n type=\"button\"\n aria-expanded={open}\n aria-label={`${name} details, ${statusLabel[status].toLowerCase()}`}\n onClick={() => setOpen((o) => !o)}\n className=\"flex w-full cursor-pointer items-center gap-2.5 px-3.5 py-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring\"\n >\n <span\n className={cn(\n \"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md\",\n status === \"error\" ? \"bg-red-500/15 text-red-500\" : \"bg-foreground/8 text-foreground\",\n )}\n >\n {status === \"running\" ? (\n <span\n aria-hidden\n className=\"h-3 w-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent\"\n />\n ) : status === \"error\" ? (\n <X className=\"h-3.5 w-3.5\" />\n ) : (\n <Check className=\"h-3.5 w-3.5\" />\n )}\n </span>\n <Terminal className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" aria-hidden />\n <span className=\"truncate font-mono text-[13px] font-medium\">{name}</span>\n <span\n className={cn(\n \"ml-auto flex shrink-0 items-center gap-1.5 text-xs\",\n status === \"running\"\n ? \"text-muted-foreground\"\n : status === \"error\"\n ? \"text-red-500\"\n : \"text-emerald-600 dark:text-emerald-400\",\n )}\n >\n {status === \"running\" ? (\n <span className=\"h-1.5 w-1.5 animate-pulse rounded-full bg-current\" aria-hidden />\n ) : null}\n {statusLabel[status]}\n </span>\n {hasDetails ? (\n <ChevronDown\n aria-hidden\n className={cn(\"h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform\", open && \"rotate-180\")}\n />\n ) : null}\n </button>\n {open && hasDetails ? (\n <div className=\"space-y-2 border-t border-border px-3.5 py-3\">\n {args ? (\n <div>\n <p className=\"mb-1 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground\">\n <Cpu className=\"h-3 w-3\" aria-hidden /> Arguments\n </p>\n <pre className=\"overflow-x-auto rounded-lg bg-background/60 p-2.5 font-mono text-xs leading-5\">\n {args}\n </pre>\n </div>\n ) : null}\n {result ? (\n <div>\n <p className=\"mb-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground\">\n Result\n </p>\n <p className=\"rounded-lg bg-background/60 p-2.5 font-mono text-xs leading-5\">{result}</p>\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n );\n}\n"],"names":["statusLabel","ToolCard","name","args","result","status","open","setOpen","useState","hasDetails","jsxs","cn","o","jsx","X","Check","Terminal","ChevronDown","Cpu"],"mappings":"qMAOMA,EAA0C,CAC9C,QAAS,UACT,QAAS,OACT,MAAO,QACT,EAEO,SAASC,EAAS,CACvB,KAAAC,EACA,KAAAC,EACA,OAAAC,EACA,OAAAC,EAAS,SACX,EAKG,CACD,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAChCC,EAAa,GAAQN,GAAQC,GAEnC,OACEM,EAAAA,KAAC,MAAA,CACC,UAAWC,EAAAA,GACT,uDACAN,IAAW,SAAW,mBAAA,EAGxB,SAAA,CAAAK,EAAAA,KAAC,SAAA,CACC,KAAK,SACL,gBAAeJ,EACf,aAAY,GAAGJ,CAAI,aAAaF,EAAYK,CAAM,EAAE,aAAa,GACjE,QAAS,IAAME,EAASK,GAAM,CAACA,CAAC,EAChC,UAAU,2KAEV,SAAA,CAAAC,EAAAA,IAAC,OAAA,CACC,UAAWF,EAAAA,GACT,sEACAN,IAAW,QAAU,6BAA+B,iCAAA,EAGrD,aAAW,UACVQ,EAAAA,IAAC,OAAA,CACC,cAAW,GACX,UAAU,sFAAA,CAAA,EAEVR,IAAW,QACbQ,MAACC,EAAAA,EAAA,CAAE,UAAU,aAAA,CAAc,EAE3BD,EAAAA,IAACE,EAAAA,MAAA,CAAM,UAAU,aAAA,CAAc,CAAA,CAAA,EAGnCF,EAAAA,IAACG,EAAAA,SAAA,CAAS,UAAU,6CAA6C,cAAW,GAAC,EAC7EH,EAAAA,IAAC,OAAA,CAAK,UAAU,6CAA8C,SAAAX,EAAK,EACnEQ,EAAAA,KAAC,OAAA,CACC,UAAWC,EAAAA,GACT,qDACAN,IAAW,UACP,wBACAA,IAAW,QACT,eACA,wCAAA,EAGP,SAAA,CAAAA,IAAW,UACVQ,EAAAA,IAAC,OAAA,CAAK,UAAU,oDAAoD,cAAW,GAAC,EAC9E,KACHb,EAAYK,CAAM,CAAA,CAAA,CAAA,EAEpBI,EACCI,EAAAA,IAACI,EAAAA,YAAA,CACC,cAAW,GACX,UAAWN,EAAAA,GAAG,kEAAmEL,GAAQ,YAAY,CAAA,CAAA,EAErG,IAAA,CAAA,CAAA,EAELA,GAAQG,EACPC,OAAC,MAAA,CAAI,UAAU,+CACZ,SAAA,CAAAP,SACE,MAAA,CACC,SAAA,CAAAO,EAAAA,KAAC,IAAA,CAAE,UAAU,0GACX,SAAA,CAAAG,EAAAA,IAACK,EAAAA,IAAA,CAAI,UAAU,UAAU,cAAW,GAAC,EAAE,YAAA,EACzC,EACAL,EAAAA,IAAC,MAAA,CAAI,UAAU,gFACZ,SAAAV,CAAA,CACH,CAAA,CAAA,CACF,EACE,KACHC,SACE,MAAA,CACC,SAAA,CAAAS,EAAAA,IAAC,IAAA,CAAE,UAAU,gFAAgF,SAAA,SAE7F,EACAA,EAAAA,IAAC,IAAA,CAAE,UAAU,gEAAiE,SAAAT,CAAA,CAAO,CAAA,CAAA,CACvF,EACE,IAAA,CAAA,CACN,EACE,IAAA,CAAA,CAAA,CAGV"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("../../utils/cn.cjs"),h=require("../../icons.cjs"),b=require("./ToolCard.cjs");function j({title:s,subtitle:r,logo:n,logoSrc:t,logoAlt:o,logoClassName:u,footer:x,logLabel:m,logRef:f,height:p="70dvh",children:g}){const l=n??(t?e.jsx("img",{src:t,alt:o??(typeof s=="string"?s:"Logo"),className:a.cn("h-8 w-8 rounded-lg object-cover",u)}):void 0);return e.jsxs("div",{style:{height:p},className:"flex flex-col overflow-hidden rounded-2xl border border-border bg-surface text-foreground shadow-overlay",children:[e.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3 sm:px-5",children:[e.jsxs("div",{className:"flex gap-1.5","aria-hidden":!0,children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-foreground/15"}),e.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-foreground/15"}),e.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-foreground/15"})]}),l?e.jsx("span",{className:"flex shrink-0 items-center",children:l}):null,s??r?e.jsxs("div",{className:"min-w-0",children:[s?e.jsx("p",{className:"truncate text-sm font-semibold tracking-tight",children:s}):null,r?e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:r}):null]}):null]}),e.jsx("div",{role:"log",ref:f,"aria-live":"polite","aria-label":m,className:"min-h-0 flex-1 overflow-y-auto px-4 py-5 sm:px-5",children:e.jsx("div",{className:"flex flex-col gap-4",children:g})}),x]})}function N({controls:s,progress:r,composing:n}){const t=s??r;return e.jsxs("div",{className:"shrink-0 border-t border-border px-4 py-3 sm:px-5",children:[t?e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[s,r]}):null,e.jsxs("div",{"aria-hidden":!0,className:"flex cursor-not-allowed items-center gap-2 rounded-xl border border-border bg-surface-strong/40 px-3.5 py-2.5 text-sm text-muted-foreground select-none",children:[n!==void 0?e.jsxs("span",{className:"flex-1 truncate text-foreground",children:[n,e.jsx("span",{className:"ml-0.5 inline-block h-4 w-[2px] translate-y-[3px] animate-pulse bg-foreground"})]}):e.jsx("span",{className:"flex-1 truncate",children:"Ask anything…"}),e.jsx(h.Send,{className:a.cn("h-4 w-4 shrink-0",n?"text-foreground":void 0)})]})]})}function i({text:s,partial:r=!1}){return e.jsx("div",{className:"flex justify-end",children:e.jsxs("p",{className:"max-w-[85%] rounded-2xl rounded-br-md bg-foreground px-3.5 py-2.5 text-sm leading-6 text-background",children:[s,r?e.jsx("span",{className:"ml-0.5 inline-block h-4 w-[2px] translate-y-[3px] animate-pulse bg-background"}):null]})})}function d({text:s,partial:r=!1}){return e.jsx("div",{className:"flex justify-start",children:e.jsxs("p",{className:"max-w-[90%] rounded-2xl rounded-bl-md bg-primary px-3.5 py-2.5 text-sm leading-6 text-on-primary",children:[s,r?e.jsx("span",{className:"ml-0.5 inline-block h-4 w-[2px] translate-y-[3px] animate-pulse bg-on-primary"}):null]})})}function c({label:s,active:r=!0}){const n=["[animation-delay:-0.3s]","[animation-delay:-0.15s]",""];return e.jsxs("div",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:[e.jsx("span",{className:"flex gap-1","aria-hidden":!0,children:n.map((t,o)=>e.jsx("span",{className:a.cn("h-1.5 w-1.5 rounded-full bg-current",r&&"animate-bounce",r&&t)},o))}),e.jsx("span",{className:r?"animate-pulse":void 0,children:s})]})}function y(){return e.jsx("p",{className:"py-10 text-center text-sm text-muted-foreground",children:"This demo has no steps yet."})}function v({current:s,total:r,done:n}){return e.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:n?"Demo complete":`Step ${Math.min(s,r)} of ${r}`})}function w({step:s}){return s.type==="user"?e.jsx(i,{text:s.text}):s.type==="assistant"?e.jsx(d,{text:s.text}):s.type==="thinking"?e.jsx(c,{label:s.label??"Thinking…",active:!1}):e.jsx(b.ToolCard,{name:s.name,args:s.args,result:s.result,status:s.status==="error"?"error":"success"})}function k({className:s,...r}){return e.jsx("button",{type:"button",className:a.cn("inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-lg border border-border px-3 text-xs font-semibold text-foreground transition-colors duration-150 hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",s),...r})}exports.AssistantMessage=d;exports.ControlButton=k;exports.DemoFooter=N;exports.DemoWindow=j;exports.EmptyState=y;exports.FinishedStep=w;exports.StepProgress=v;exports.ThinkingRow=c;exports.UserMessage=i;
|
|
2
|
+
//# sourceMappingURL=parts.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts.cjs","sources":["../../../../src/components/AgentDemo/parts.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, ReactNode, Ref } from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Send } from \"../../icons\";\nimport type { AgentScriptStep } from \"./types\";\nimport { ToolCard } from \"./ToolCard\";\n\nexport function DemoWindow({\n title,\n subtitle,\n logo,\n logoSrc,\n logoAlt,\n logoClassName,\n footer,\n logLabel,\n logRef,\n height = \"70dvh\",\n children,\n}: {\n title?: ReactNode;\n subtitle?: ReactNode;\n logo?: ReactNode;\n logoSrc?: string;\n logoAlt?: string;\n logoClassName?: string;\n footer?: ReactNode;\n logLabel: string;\n logRef?: Ref<HTMLDivElement>;\n height?: string;\n children: ReactNode;\n}) {\n const logoNode =\n logo ??\n (logoSrc ? (\n <img\n src={logoSrc}\n alt={logoAlt ?? (typeof title === \"string\" ? title : \"Logo\")}\n className={cn(\"h-8 w-8 rounded-lg object-cover\", logoClassName)}\n />\n ) : undefined);\n return (\n <div\n style={{ height }}\n className=\"flex flex-col overflow-hidden rounded-2xl border border-border bg-surface text-foreground shadow-overlay\"\n >\n <div className=\"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3 sm:px-5\">\n <div className=\"flex gap-1.5\" aria-hidden>\n <span className=\"h-2.5 w-2.5 rounded-full bg-foreground/15\" />\n <span className=\"h-2.5 w-2.5 rounded-full bg-foreground/15\" />\n <span className=\"h-2.5 w-2.5 rounded-full bg-foreground/15\" />\n </div>\n {logoNode ? <span className=\"flex shrink-0 items-center\">{logoNode}</span> : null}\n {title ?? subtitle ? (\n <div className=\"min-w-0\">\n {title ? (\n <p className=\"truncate text-sm font-semibold tracking-tight\">{title}</p>\n ) : null}\n {subtitle ? (\n <p className=\"truncate text-xs text-muted-foreground\">{subtitle}</p>\n ) : null}\n </div>\n ) : null}\n </div>\n\n <div\n role=\"log\"\n ref={logRef}\n aria-live=\"polite\"\n aria-label={logLabel}\n className=\"min-h-0 flex-1 overflow-y-auto px-4 py-5 sm:px-5\"\n >\n <div className=\"flex flex-col gap-4\">{children}</div>\n </div>\n\n {footer}\n </div>\n );\n}\n\nexport function DemoFooter({\n controls,\n progress,\n composing,\n}: {\n controls?: ReactNode;\n progress?: ReactNode;\n composing?: string;\n}) {\n const hasMeta = controls ?? progress;\n return (\n <div className=\"shrink-0 border-t border-border px-4 py-3 sm:px-5\">\n {hasMeta ? (\n <div className=\"mb-3 flex items-center gap-2\">\n {controls}\n {progress}\n </div>\n ) : null}\n <div\n aria-hidden\n className=\"flex cursor-not-allowed items-center gap-2 rounded-xl border border-border bg-surface-strong/40 px-3.5 py-2.5 text-sm text-muted-foreground select-none\"\n >\n {composing !== undefined ? (\n <span className=\"flex-1 truncate text-foreground\">\n {composing}\n <span className=\"ml-0.5 inline-block h-4 w-[2px] translate-y-[3px] animate-pulse bg-foreground\" />\n </span>\n ) : (\n <span className=\"flex-1 truncate\">Ask anything…</span>\n )}\n <Send\n className={cn(\"h-4 w-4 shrink-0\", composing ? \"text-foreground\" : undefined)}\n />\n </div>\n </div>\n );\n}\n\nexport function UserMessage({ text, partial = false }: { text: string; partial?: boolean }) {\n return (\n <div className=\"flex justify-end\">\n <p className=\"max-w-[85%] rounded-2xl rounded-br-md bg-foreground px-3.5 py-2.5 text-sm leading-6 text-background\">\n {text}\n {partial ? (\n <span className=\"ml-0.5 inline-block h-4 w-[2px] translate-y-[3px] animate-pulse bg-background\" />\n ) : null}\n </p>\n </div>\n );\n}\n\nexport function AssistantMessage({ text, partial = false }: { text: string; partial?: boolean }) {\n return (\n <div className=\"flex justify-start\">\n <p className=\"max-w-[90%] rounded-2xl rounded-bl-md bg-primary px-3.5 py-2.5 text-sm leading-6 text-on-primary\">\n {text}\n {partial ? (\n <span className=\"ml-0.5 inline-block h-4 w-[2px] translate-y-[3px] animate-pulse bg-on-primary\" />\n ) : null}\n </p>\n </div>\n );\n}\n\nexport function ThinkingRow({ label, active = true }: { label: string; active?: boolean }) {\n const dots = [\"[animation-delay:-0.3s]\", \"[animation-delay:-0.15s]\", \"\"];\n return (\n <div className=\"flex items-center gap-2 text-[13px] text-muted-foreground\">\n <span className=\"flex gap-1\" aria-hidden>\n {dots.map((delay, i) => (\n <span\n key={i}\n className={cn(\n \"h-1.5 w-1.5 rounded-full bg-current\",\n active && \"animate-bounce\",\n active && delay,\n )}\n />\n ))}\n </span>\n <span className={active ? \"animate-pulse\" : undefined}>{label}</span>\n </div>\n );\n}\n\nexport function EmptyState() {\n return (\n <p className=\"py-10 text-center text-sm text-muted-foreground\">\n This demo has no steps yet.\n </p>\n );\n}\n\nexport function StepProgress({ current, total, done }: { current: number; total: number; done: boolean }) {\n return (\n <span className=\"text-xs tabular-nums text-muted-foreground\">\n {done ? \"Demo complete\" : `Step ${Math.min(current, total)} of ${total}`}\n </span>\n );\n}\n\n/** Render one script step in its finished state (used by the transcript and completed player steps). */\nexport function FinishedStep({ step }: { step: AgentScriptStep }) {\n if (step.type === \"user\") return <UserMessage text={step.text} />;\n if (step.type === \"assistant\") return <AssistantMessage text={step.text} />;\n if (step.type === \"thinking\") return <ThinkingRow label={step.label ?? \"Thinking…\"} active={false} />;\n return (\n <ToolCard\n name={step.name}\n args={step.args}\n result={step.result}\n status={step.status === \"error\" ? \"error\" : \"success\"}\n />\n );\n}\n\nexport function ControlButton({\n className,\n ...props\n}: ButtonHTMLAttributes<HTMLButtonElement>) {\n return (\n <button\n type=\"button\"\n className={cn(\n \"inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-lg border border-border px-3 text-xs font-semibold text-foreground transition-colors duration-150 hover:border-foreground/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n />\n );\n}\n"],"names":["DemoWindow","title","subtitle","logo","logoSrc","logoAlt","logoClassName","footer","logLabel","logRef","height","children","logoNode","jsx","cn","jsxs","DemoFooter","controls","progress","composing","hasMeta","Send","UserMessage","text","partial","AssistantMessage","ThinkingRow","label","active","dots","delay","i","EmptyState","StepProgress","current","total","done","FinishedStep","step","ToolCard","ControlButton","className","props"],"mappings":"8MAMO,SAASA,EAAW,CACzB,MAAAC,EACA,SAAAC,EACA,KAAAC,EACA,QAAAC,EACA,QAAAC,EACA,cAAAC,EACA,OAAAC,EACA,SAAAC,EACA,OAAAC,EACA,OAAAC,EAAS,QACT,SAAAC,CACF,EAYG,CACD,MAAMC,EACJT,IACCC,EACCS,EAAAA,IAAC,MAAA,CACC,IAAKT,EACL,IAAKC,IAAY,OAAOJ,GAAU,SAAWA,EAAQ,QACrD,UAAWa,EAAAA,GAAG,kCAAmCR,CAAa,CAAA,CAAA,EAE9D,QACN,OACES,EAAAA,KAAC,MAAA,CACC,MAAO,CAAE,OAAAL,CAAA,EACT,UAAU,2GAEV,SAAA,CAAAK,EAAAA,KAAC,MAAA,CAAI,UAAU,4EACb,SAAA,CAAAA,EAAAA,KAAC,MAAA,CAAI,UAAU,eAAe,cAAW,GACvC,SAAA,CAAAF,EAAAA,IAAC,OAAA,CAAK,UAAU,2CAAA,CAA4C,EAC5DA,EAAAA,IAAC,OAAA,CAAK,UAAU,2CAAA,CAA4C,EAC5DA,EAAAA,IAAC,OAAA,CAAK,UAAU,2CAAA,CAA4C,CAAA,EAC9D,EACCD,EAAWC,EAAAA,IAAC,OAAA,CAAK,UAAU,6BAA8B,WAAS,EAAU,KAC5EZ,GAASC,EACRa,OAAC,MAAA,CAAI,UAAU,UACZ,SAAA,CAAAd,EACCY,EAAAA,IAAC,IAAA,CAAE,UAAU,gDAAiD,WAAM,EAClE,KACHX,EACCW,EAAAA,IAAC,IAAA,CAAE,UAAU,yCAA0C,WAAS,EAC9D,IAAA,CAAA,CACN,EACE,IAAA,EACN,EAEAA,EAAAA,IAAC,MAAA,CACC,KAAK,MACL,IAAKJ,EACL,YAAU,SACV,aAAYD,EACZ,UAAU,mDAEV,SAAAK,EAAAA,IAAC,MAAA,CAAI,UAAU,sBAAuB,SAAAF,CAAA,CAAS,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,EAED,GAAGC,CAAA,CAAA,CAGV"}
|
package/dist/cjs/icons.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),h={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},c=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M5 12h14"}),s.jsx("path",{d:"m13 6 6 6-6 6"})]}),x=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M7 17 17 7"}),s.jsx("path",{d:"M8 7h9v9"})]}),r=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 5v14"}),s.jsx("path",{d:"m6 13 6 6 6-6"})]}),e=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 19V5"}),s.jsx("path",{d:"m6 11 6-6 6 6"})]}),a=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"M20 6 9 17l-5-5"})}),d=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 5v14"}),s.jsx("path",{d:"M5 12h14"})]}),j=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M18 6 6 18"}),s.jsx("path",{d:"m6 6 12 12"})]}),n=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M4 7h16"}),s.jsx("path",{d:"M4 12h16"}),s.jsx("path",{d:"M4 17h16"})]}),o=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"m6 9 6 6 6-6"})}),l=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"m9 6 6 6-6 6"})}),i=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"m15 6-6 6 6 6"})}),p=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"M13 2 3 14h7l-1 8 10-12h-7l1-8z"})}),v=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 3 5 6v5c0 4.5 3 7.5 7 9 4-1.5 7-4.5 7-9V6l-7-3z"}),s.jsx("path",{d:"m9 12 2 2 4-4"})]}),M=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"m12 2 9 5-9 5-9-5 9-5z"}),s.jsx("path",{d:"m3 12 9 5 9-5"}),s.jsx("path",{d:"m3 17 9 5 9-5"})]}),g=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("rect",{width:"14",height:"20",x:"5",y:"2",rx:"2.5"}),s.jsx("path",{d:"M12 18h.01"})]}),C=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16z"}),s.jsx("path",{d:"m12 14 4-4"}),s.jsx("path",{d:"M12 10.5 9 13.5"})]}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),h={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},c=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M5 12h14"}),s.jsx("path",{d:"m13 6 6 6-6 6"})]}),x=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M7 17 17 7"}),s.jsx("path",{d:"M8 7h9v9"})]}),r=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 5v14"}),s.jsx("path",{d:"m6 13 6 6 6-6"})]}),e=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 19V5"}),s.jsx("path",{d:"m6 11 6-6 6 6"})]}),a=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"M20 6 9 17l-5-5"})}),d=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 5v14"}),s.jsx("path",{d:"M5 12h14"})]}),j=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M18 6 6 18"}),s.jsx("path",{d:"m6 6 12 12"})]}),n=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M4 7h16"}),s.jsx("path",{d:"M4 12h16"}),s.jsx("path",{d:"M4 17h16"})]}),o=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"m6 9 6 6 6-6"})}),l=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"m9 6 6 6-6 6"})}),i=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"m15 6-6 6 6 6"})}),p=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"M13 2 3 14h7l-1 8 10-12h-7l1-8z"})}),v=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 3 5 6v5c0 4.5 3 7.5 7 9 4-1.5 7-4.5 7-9V6l-7-3z"}),s.jsx("path",{d:"m9 12 2 2 4-4"})]}),M=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"m12 2 9 5-9 5-9-5 9-5z"}),s.jsx("path",{d:"m3 12 9 5 9-5"}),s.jsx("path",{d:"m3 17 9 5 9-5"})]}),g=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("rect",{width:"14",height:"20",x:"5",y:"2",rx:"2.5"}),s.jsx("path",{d:"M12 18h.01"})]}),C=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16z"}),s.jsx("path",{d:"m12 14 4-4"}),s.jsx("path",{d:"M12 10.5 9 13.5"})]}),u=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M3 20h18"}),s.jsx("path",{d:"M7 20V8"}),s.jsx("path",{d:"M12 20V4"}),s.jsx("path",{d:"M17 20v-7"})]}),m=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2"}),s.jsx("circle",{cx:"9",cy:"7",r:"4"}),s.jsx("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),s.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),w=t=>s.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,...t,children:s.jsx("path",{d:"M12 2.5c.33 0 .63.19.77.5l1.98 4.01 4.42.64c.62.09.87.85.42 1.29l-3.2 3.12.76 4.4c.11.62-.55 1.1-1.1.8L12 15.13l-3.95 2.08c-.56.29-1.21-.18-1.1-.8l.76-4.4-3.2-3.12a.78.78 0 0 1 .42-1.29l4.42-.64L11.23 3c.14-.31.44-.5.77-.5z"})}),y=t=>s.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,...t,children:s.jsx("path",{d:"M10.5 5C7 5 4.5 7.5 4.5 11c0 3.3 2.2 5.5 5.2 5.5.2 0 .4 0 .5-.1-.2 1.5-1.3 2.6-2.9 3.2a.75.75 0 1 0 .4 1.4c3.6-1 5.8-3.8 5.8-7.7V7.5C13 6.1 11.9 5 10.5 5zm9 0C16 5 13.5 7.5 13.5 11c0 3.3 2.2 5.5 5.2 5.5.2 0 .4 0 .5-.1-.2 1.5-1.3 2.6-2.9 3.2a.75.75 0 1 0 .4 1.4c3.6-1 5.8-3.8 5.8-7.7V7.5C22 6.1 20.9 5 19.5 5z"})}),k=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("circle",{cx:"12",cy:"12",r:"9"}),s.jsx("path",{d:"M3 12h18"}),s.jsx("path",{d:"M12 3a14 14 0 0 1 0 18 14 14 0 0 1 0-18z"})]}),z=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("rect",{width:"18",height:"14",x:"3",y:"5",rx:"2"}),s.jsx("path",{d:"m3 7 9 6 9-6"})]}),S=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2"}),s.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),L=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("circle",{cx:"12",cy:"12",r:"9"}),s.jsx("path",{d:"M12 7v5l3 2"})]}),R=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 2v20"}),s.jsx("path",{d:"M17 5.5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})]}),V=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"m16 18 6-6-6-6"}),s.jsx("path",{d:"m8 6-6 6 6 6"})]}),f=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"m5 17 5-5-5-5"}),s.jsx("path",{d:"M13 19h6"})]}),A=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"m3 11 18-8-7 18-3-7-8-3z"}),s.jsx("path",{d:"M11 14 21 3"})]}),P=t=>s.jsx("svg",{...h,...t,children:s.jsx("path",{d:"m8 5 11 7-11 7V5z"})}),D=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M9 5v14"}),s.jsx("path",{d:"M15 5v14"})]}),b=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M3 12a9 9 0 1 0 2.64-6.36"}),s.jsx("path",{d:"M3 4v5h5"})]}),B=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M15 3h6v6"}),s.jsx("path",{d:"M10 14 21 3"}),s.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})]}),U=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M4 6h10"}),s.jsx("path",{d:"M18 6h2"}),s.jsx("circle",{cx:"16",cy:"6",r:"2"}),s.jsx("path",{d:"M4 12h2"}),s.jsx("path",{d:"M10 12h10"}),s.jsx("circle",{cx:"8",cy:"12",r:"2"}),s.jsx("path",{d:"M4 18h10"}),s.jsx("path",{d:"M18 18h2"}),s.jsx("circle",{cx:"16",cy:"18",r:"2"})]}),H=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("ellipse",{cx:"12",cy:"5",rx:"8",ry:"3"}),s.jsx("path",{d:"M4 5v7c0 1.66 3.58 3 8 3s8-1.34 8-3V5"}),s.jsx("path",{d:"M4 12v7c0 1.66 3.58 3 8 3s8-1.34 8-3v-7"})]}),G=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M21 8 12 3 3 8v8l9 5 9-5V8z"}),s.jsx("path",{d:"m3 8 9 5 9-5"}),s.jsx("path",{d:"M12 13v8"})]}),T=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("rect",{width:"16",height:"16",x:"4",y:"4",rx:"2"}),s.jsx("rect",{width:"8",height:"8",x:"8",y:"8",rx:"1"}),s.jsx("path",{d:"M9 2v2M15 2v2M9 20v2M15 20v2M2 9h2M2 15h2M20 9h2M20 15h2"})]}),E=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M12 3a9 9 0 1 0 0 18c1.66 0 2-1.34 2-2 0-.66-.27-1.16-.58-1.66-.3-.48-.42-.84-.42-1.34 0-.83.67-1.5 1.5-1.5h3.2A4.3 4.3 0 0 0 21 10 9 9 0 0 0 12 3z"}),s.jsx("circle",{cx:"7.5",cy:"10.5",r:"0.8",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"12",cy:"7.5",r:"0.8",fill:"currentColor",stroke:"none"}),s.jsx("circle",{cx:"16.5",cy:"10.5",r:"0.8",fill:"currentColor",stroke:"none"})]}),Q=t=>s.jsxs("svg",{...h,...t,children:[s.jsx("path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"}),s.jsx("path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"}),s.jsx("path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"}),s.jsx("path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"}),s.jsx("circle",{cx:"15.5",cy:"8.5",r:"1.5",fill:"currentColor",stroke:"none"})]});exports.ArrowDown=r;exports.ArrowRight=c;exports.ArrowUp=e;exports.ArrowUpRight=x;exports.BarChart=u;exports.Box=G;exports.Check=a;exports.ChevronDown=o;exports.ChevronLeft=i;exports.ChevronRight=l;exports.Clock=L;exports.Code=V;exports.Cpu=T;exports.Database=H;exports.DollarSign=R;exports.ExternalLink=B;exports.Gauge=C;exports.Globe=k;exports.Layers=M;exports.Lock=S;exports.Mail=z;exports.Menu=n;exports.Palette=E;exports.Pause=D;exports.Play=P;exports.Plus=d;exports.Quote=y;exports.Rocket=Q;exports.RotateCcw=b;exports.Send=A;exports.ShieldCheck=v;exports.Sliders=U;exports.Smartphone=g;exports.Star=w;exports.Terminal=f;exports.Users=m;exports.X=j;exports.Zap=p;
|
|
2
2
|
//# sourceMappingURL=icons.cjs.map
|
package/dist/cjs/icons.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.cjs","sources":["../../src/icons.tsx"],"sourcesContent":["import type { SVGProps } from \"react\";\n\n/**\n * Minimal 1.5px stroke icon set (Lucide/Heroicons inspired).\n * No emojis — the library ships a single, consistent icon vocabulary.\n *\n * Usage:\n * <ArrowRight className=\"h-4 w-4\" />\n */\n\ntype IconProps = SVGProps<SVGSVGElement>;\n\nconst base: IconProps = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 1.5,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n \"aria-hidden\": true as never,\n};\n\nexport const ArrowRight = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M5 12h14\" />\n <path d=\"m13 6 6 6-6 6\" />\n </svg>\n);\n\nexport const ArrowUpRight = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M7 17 17 7\" />\n <path d=\"M8 7h9v9\" />\n </svg>\n);\n\nexport const ArrowDown = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 5v14\" />\n <path d=\"m6 13 6 6 6-6\" />\n </svg>\n);\n\nexport const ArrowUp = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 19V5\" />\n <path d=\"m6 11 6-6 6 6\" />\n </svg>\n);\n\nexport const Check = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n);\n\nexport const Plus = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 5v14\" />\n <path d=\"M5 12h14\" />\n </svg>\n);\n\nexport const X = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n);\n\nexport const Menu = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M4 7h16\" />\n <path d=\"M4 12h16\" />\n <path d=\"M4 17h16\" />\n </svg>\n);\n\nexport const ChevronDown = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n);\n\nexport const ChevronRight = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m9 6 6 6-6 6\" />\n </svg>\n);\n\nexport const ChevronLeft = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m15 6-6 6 6 6\" />\n </svg>\n);\n\nexport const Zap = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M13 2 3 14h7l-1 8 10-12h-7l1-8z\" />\n </svg>\n);\n\nexport const ShieldCheck = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 3 5 6v5c0 4.5 3 7.5 7 9 4-1.5 7-4.5 7-9V6l-7-3z\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n);\n\nexport const Layers = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m12 2 9 5-9 5-9-5 9-5z\" />\n <path d=\"m3 12 9 5 9-5\" />\n <path d=\"m3 17 9 5 9-5\" />\n </svg>\n);\n\nexport const Smartphone = (props: IconProps) => (\n <svg {...base} {...props}>\n <rect width=\"14\" height=\"20\" x=\"5\" y=\"2\" rx=\"2.5\" />\n <path d=\"M12 18h.01\" />\n </svg>\n);\n\nexport const Gauge = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16z\" />\n <path d=\"m12 14 4-4\" />\n <path d=\"M12 10.5 9 13.5\" />\n </svg>\n);\n\nexport const BarChart = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M3 20h18\" />\n <path d=\"M7 20V8\" />\n <path d=\"M12 20V4\" />\n <path d=\"M17 20v-7\" />\n </svg>\n);\n\nexport const Users = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2\" />\n <circle cx=\"9\" cy=\"7\" r=\"4\" />\n <path d=\"M22 21v-2a4 4 0 0 0-3-3.87\" />\n <path d=\"M16 3.13a4 4 0 0 1 0 7.75\" />\n </svg>\n);\n\nexport const Star = (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden {...props}>\n <path d=\"M12 2.5c.33 0 .63.19.77.5l1.98 4.01 4.42.64c.62.09.87.85.42 1.29l-3.2 3.12.76 4.4c.11.62-.55 1.1-1.1.8L12 15.13l-3.95 2.08c-.56.29-1.21-.18-1.1-.8l.76-4.4-3.2-3.12a.78.78 0 0 1 .42-1.29l4.42-.64L11.23 3c.14-.31.44-.5.77-.5z\" />\n </svg>\n);\n\nexport const Quote = (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden {...props}>\n <path d=\"M10.5 5C7 5 4.5 7.5 4.5 11c0 3.3 2.2 5.5 5.2 5.5.2 0 .4 0 .5-.1-.2 1.5-1.3 2.6-2.9 3.2a.75.75 0 1 0 .4 1.4c3.6-1 5.8-3.8 5.8-7.7V7.5C13 6.1 11.9 5 10.5 5zm9 0C16 5 13.5 7.5 13.5 11c0 3.3 2.2 5.5 5.2 5.5.2 0 .4 0 .5-.1-.2 1.5-1.3 2.6-2.9 3.2a.75.75 0 1 0 .4 1.4c3.6-1 5.8-3.8 5.8-7.7V7.5C22 6.1 20.9 5 19.5 5z\" />\n </svg>\n);\n\nexport const Globe = (props: IconProps) => (\n <svg {...base} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M3 12h18\" />\n <path d=\"M12 3a14 14 0 0 1 0 18 14 14 0 0 1 0-18z\" />\n </svg>\n);\n\nexport const Mail = (props: IconProps) => (\n <svg {...base} {...props}>\n <rect width=\"18\" height=\"14\" x=\"3\" y=\"5\" rx=\"2\" />\n <path d=\"m3 7 9 6 9-6\" />\n </svg>\n);\n\nexport const Lock = (props: IconProps) => (\n <svg {...base} {...props}>\n <rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" />\n <path d=\"M7 11V7a5 5 0 0 1 10 0v4\" />\n </svg>\n);\n\nexport const Clock = (props: IconProps) => (\n <svg {...base} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5l3 2\" />\n </svg>\n);\n\nexport const DollarSign = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 2v20\" />\n <path d=\"M17 5.5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6\" />\n </svg>\n);\n\nexport const Code = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m16 18 6-6-6-6\" />\n <path d=\"m8 6-6 6 6 6\" />\n </svg>\n);\n\nexport const Terminal = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m5 17 5-5-5-5\" />\n <path d=\"M13 19h6\" />\n </svg>\n);\n\nexport const Send = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m3 11 18-8-7 18-3-7-8-3z\" />\n <path d=\"M11 14 21 3\" />\n </svg>\n);\n\nexport const Play = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m8 5 11 7-11 7V5z\" />\n </svg>\n);\n\nexport const ExternalLink = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M15 3h6v6\" />\n <path d=\"M10 14 21 3\" />\n <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" />\n </svg>\n);\n\nexport const Sliders = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M4 6h10\" />\n <path d=\"M18 6h2\" />\n <circle cx=\"16\" cy=\"6\" r=\"2\" />\n <path d=\"M4 12h2\" />\n <path d=\"M10 12h10\" />\n <circle cx=\"8\" cy=\"12\" r=\"2\" />\n <path d=\"M4 18h10\" />\n <path d=\"M18 18h2\" />\n <circle cx=\"16\" cy=\"18\" r=\"2\" />\n </svg>\n);\n\nexport const Database = (props: IconProps) => (\n <svg {...base} {...props}>\n <ellipse cx=\"12\" cy=\"5\" rx=\"8\" ry=\"3\" />\n <path d=\"M4 5v7c0 1.66 3.58 3 8 3s8-1.34 8-3V5\" />\n <path d=\"M4 12v7c0 1.66 3.58 3 8 3s8-1.34 8-3v-7\" />\n </svg>\n);\n\nexport const Box = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M21 8 12 3 3 8v8l9 5 9-5V8z\" />\n <path d=\"m3 8 9 5 9-5\" />\n <path d=\"M12 13v8\" />\n </svg>\n);\n\nexport const Cpu = (props: IconProps) => (\n <svg {...base} {...props}>\n <rect width=\"16\" height=\"16\" x=\"4\" y=\"4\" rx=\"2\" />\n <rect width=\"8\" height=\"8\" x=\"8\" y=\"8\" rx=\"1\" />\n <path d=\"M9 2v2M15 2v2M9 20v2M15 20v2M2 9h2M2 15h2M20 9h2M20 15h2\" />\n </svg>\n);\n\nexport const Palette = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 3a9 9 0 1 0 0 18c1.66 0 2-1.34 2-2 0-.66-.27-1.16-.58-1.66-.3-.48-.42-.84-.42-1.34 0-.83.67-1.5 1.5-1.5h3.2A4.3 4.3 0 0 0 21 10 9 9 0 0 0 12 3z\" />\n <circle cx=\"7.5\" cy=\"10.5\" r=\"0.8\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"12\" cy=\"7.5\" r=\"0.8\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"16.5\" cy=\"10.5\" r=\"0.8\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n);\n\nexport const Rocket = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\" />\n <path d=\"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z\" />\n <path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0\" />\n <path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\" />\n <circle cx=\"15.5\" cy=\"8.5\" r=\"1.5\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n);"],"names":["base","ArrowRight","props","jsxs","jsx","ArrowUpRight","ArrowDown","ArrowUp","Check","Plus","X","Menu","ChevronDown","ChevronRight","ChevronLeft","Zap","ShieldCheck","Layers","Smartphone","Gauge","BarChart","Users","Star","Quote","Globe","Mail","Lock","Clock","DollarSign","Code","Terminal","Send","Play","ExternalLink","Sliders","Database","Box","Cpu","Palette","Rocket"],"mappings":"qHAYMA,EAAkB,CACtB,MAAO,6BACP,QAAS,YACT,KAAM,OACN,OAAQ,eACR,YAAa,IACb,cAAe,QACf,eAAgB,QAChB,cAAe,EACjB,EAEaC,EAAcC,GACzBC,OAAC,OAAK,GAAGH,EAAO,G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,MAAM,GAAG,OAAO,EAAE,MAAM,KAAK,eAAe,OAAO,MAAA,CAAO,EACrEA,EAAAA,IAAC,SAAA,CAAO,GAAG,KAAK,GAAG,MAAM,EAAE,MAAM,KAAK,eAAe,OAAO,MAAA,CAAO,EACnEA,EAAAA,IAAC,SAAA,CAAO,GAAG,OAAO,GAAG,OAAO,EAAE,MAAM,KAAK,eAAe,OAAO,MAAA,CAAO,CAAA,CAAA,CACxE,EAGWmC,EAAUrC,GACrBC,OAAC,OAAK,GAAGH,EAAO,GAAGE,EACjB,SAAA,CAAAE,EAAAA,IAAC,OAAA,CAAK,EAAE,2FAAA,CAA4F,EACpGA,EAAAA,IAAC,OAAA,CAAK,EAAE,iGAAA,CAAkG,EAC1GA,EAAAA,IAAC,OAAA,CAAK,EAAE,wCAAA,CAAyC,EACjDA,EAAAA,IAAC,OAAA,CAAK,EAAE,yCAAA,CAA0C,EAClDA,EAAAA,IAAC,SAAA,CAAO,GAAG,OAAO,GAAG,MAAM,EAAE,MAAM,KAAK,eAAe,OAAO,MAAA,CAAO,CAAA,CAAA,CACvE"}
|
|
1
|
+
{"version":3,"file":"icons.cjs","sources":["../../src/icons.tsx"],"sourcesContent":["import type { SVGProps } from \"react\";\n\n/**\n * Minimal 1.5px stroke icon set (Lucide/Heroicons inspired).\n * No emojis — the library ships a single, consistent icon vocabulary.\n *\n * Usage:\n * <ArrowRight className=\"h-4 w-4\" />\n */\n\ntype IconProps = SVGProps<SVGSVGElement>;\n\nconst base: IconProps = {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 1.5,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n \"aria-hidden\": true as never,\n};\n\nexport const ArrowRight = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M5 12h14\" />\n <path d=\"m13 6 6 6-6 6\" />\n </svg>\n);\n\nexport const ArrowUpRight = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M7 17 17 7\" />\n <path d=\"M8 7h9v9\" />\n </svg>\n);\n\nexport const ArrowDown = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 5v14\" />\n <path d=\"m6 13 6 6 6-6\" />\n </svg>\n);\n\nexport const ArrowUp = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 19V5\" />\n <path d=\"m6 11 6-6 6 6\" />\n </svg>\n);\n\nexport const Check = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n);\n\nexport const Plus = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 5v14\" />\n <path d=\"M5 12h14\" />\n </svg>\n);\n\nexport const X = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n);\n\nexport const Menu = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M4 7h16\" />\n <path d=\"M4 12h16\" />\n <path d=\"M4 17h16\" />\n </svg>\n);\n\nexport const ChevronDown = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n);\n\nexport const ChevronRight = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m9 6 6 6-6 6\" />\n </svg>\n);\n\nexport const ChevronLeft = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m15 6-6 6 6 6\" />\n </svg>\n);\n\nexport const Zap = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M13 2 3 14h7l-1 8 10-12h-7l1-8z\" />\n </svg>\n);\n\nexport const ShieldCheck = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 3 5 6v5c0 4.5 3 7.5 7 9 4-1.5 7-4.5 7-9V6l-7-3z\" />\n <path d=\"m9 12 2 2 4-4\" />\n </svg>\n);\n\nexport const Layers = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m12 2 9 5-9 5-9-5 9-5z\" />\n <path d=\"m3 12 9 5 9-5\" />\n <path d=\"m3 17 9 5 9-5\" />\n </svg>\n);\n\nexport const Smartphone = (props: IconProps) => (\n <svg {...base} {...props}>\n <rect width=\"14\" height=\"20\" x=\"5\" y=\"2\" rx=\"2.5\" />\n <path d=\"M12 18h.01\" />\n </svg>\n);\n\nexport const Gauge = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16z\" />\n <path d=\"m12 14 4-4\" />\n <path d=\"M12 10.5 9 13.5\" />\n </svg>\n);\n\nexport const BarChart = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M3 20h18\" />\n <path d=\"M7 20V8\" />\n <path d=\"M12 20V4\" />\n <path d=\"M17 20v-7\" />\n </svg>\n);\n\nexport const Users = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2\" />\n <circle cx=\"9\" cy=\"7\" r=\"4\" />\n <path d=\"M22 21v-2a4 4 0 0 0-3-3.87\" />\n <path d=\"M16 3.13a4 4 0 0 1 0 7.75\" />\n </svg>\n);\n\nexport const Star = (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden {...props}>\n <path d=\"M12 2.5c.33 0 .63.19.77.5l1.98 4.01 4.42.64c.62.09.87.85.42 1.29l-3.2 3.12.76 4.4c.11.62-.55 1.1-1.1.8L12 15.13l-3.95 2.08c-.56.29-1.21-.18-1.1-.8l.76-4.4-3.2-3.12a.78.78 0 0 1 .42-1.29l4.42-.64L11.23 3c.14-.31.44-.5.77-.5z\" />\n </svg>\n);\n\nexport const Quote = (props: IconProps) => (\n <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden {...props}>\n <path d=\"M10.5 5C7 5 4.5 7.5 4.5 11c0 3.3 2.2 5.5 5.2 5.5.2 0 .4 0 .5-.1-.2 1.5-1.3 2.6-2.9 3.2a.75.75 0 1 0 .4 1.4c3.6-1 5.8-3.8 5.8-7.7V7.5C13 6.1 11.9 5 10.5 5zm9 0C16 5 13.5 7.5 13.5 11c0 3.3 2.2 5.5 5.2 5.5.2 0 .4 0 .5-.1-.2 1.5-1.3 2.6-2.9 3.2a.75.75 0 1 0 .4 1.4c3.6-1 5.8-3.8 5.8-7.7V7.5C22 6.1 20.9 5 19.5 5z\" />\n </svg>\n);\n\nexport const Globe = (props: IconProps) => (\n <svg {...base} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M3 12h18\" />\n <path d=\"M12 3a14 14 0 0 1 0 18 14 14 0 0 1 0-18z\" />\n </svg>\n);\n\nexport const Mail = (props: IconProps) => (\n <svg {...base} {...props}>\n <rect width=\"18\" height=\"14\" x=\"3\" y=\"5\" rx=\"2\" />\n <path d=\"m3 7 9 6 9-6\" />\n </svg>\n);\n\nexport const Lock = (props: IconProps) => (\n <svg {...base} {...props}>\n <rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" />\n <path d=\"M7 11V7a5 5 0 0 1 10 0v4\" />\n </svg>\n);\n\nexport const Clock = (props: IconProps) => (\n <svg {...base} {...props}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5l3 2\" />\n </svg>\n);\n\nexport const DollarSign = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 2v20\" />\n <path d=\"M17 5.5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6\" />\n </svg>\n);\n\nexport const Code = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m16 18 6-6-6-6\" />\n <path d=\"m8 6-6 6 6 6\" />\n </svg>\n);\n\nexport const Terminal = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m5 17 5-5-5-5\" />\n <path d=\"M13 19h6\" />\n </svg>\n);\n\nexport const Send = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m3 11 18-8-7 18-3-7-8-3z\" />\n <path d=\"M11 14 21 3\" />\n </svg>\n);\n\nexport const Play = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"m8 5 11 7-11 7V5z\" />\n </svg>\n);\n\nexport const Pause = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M9 5v14\" />\n <path d=\"M15 5v14\" />\n </svg>\n);\n\nexport const RotateCcw = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M3 12a9 9 0 1 0 2.64-6.36\" />\n <path d=\"M3 4v5h5\" />\n </svg>\n);\n\nexport const ExternalLink = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M15 3h6v6\" />\n <path d=\"M10 14 21 3\" />\n <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" />\n </svg>\n);\n\nexport const Sliders = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M4 6h10\" />\n <path d=\"M18 6h2\" />\n <circle cx=\"16\" cy=\"6\" r=\"2\" />\n <path d=\"M4 12h2\" />\n <path d=\"M10 12h10\" />\n <circle cx=\"8\" cy=\"12\" r=\"2\" />\n <path d=\"M4 18h10\" />\n <path d=\"M18 18h2\" />\n <circle cx=\"16\" cy=\"18\" r=\"2\" />\n </svg>\n);\n\nexport const Database = (props: IconProps) => (\n <svg {...base} {...props}>\n <ellipse cx=\"12\" cy=\"5\" rx=\"8\" ry=\"3\" />\n <path d=\"M4 5v7c0 1.66 3.58 3 8 3s8-1.34 8-3V5\" />\n <path d=\"M4 12v7c0 1.66 3.58 3 8 3s8-1.34 8-3v-7\" />\n </svg>\n);\n\nexport const Box = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M21 8 12 3 3 8v8l9 5 9-5V8z\" />\n <path d=\"m3 8 9 5 9-5\" />\n <path d=\"M12 13v8\" />\n </svg>\n);\n\nexport const Cpu = (props: IconProps) => (\n <svg {...base} {...props}>\n <rect width=\"16\" height=\"16\" x=\"4\" y=\"4\" rx=\"2\" />\n <rect width=\"8\" height=\"8\" x=\"8\" y=\"8\" rx=\"1\" />\n <path d=\"M9 2v2M15 2v2M9 20v2M15 20v2M2 9h2M2 15h2M20 9h2M20 15h2\" />\n </svg>\n);\n\nexport const Palette = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M12 3a9 9 0 1 0 0 18c1.66 0 2-1.34 2-2 0-.66-.27-1.16-.58-1.66-.3-.48-.42-.84-.42-1.34 0-.83.67-1.5 1.5-1.5h3.2A4.3 4.3 0 0 0 21 10 9 9 0 0 0 12 3z\" />\n <circle cx=\"7.5\" cy=\"10.5\" r=\"0.8\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"12\" cy=\"7.5\" r=\"0.8\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"16.5\" cy=\"10.5\" r=\"0.8\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n);\n\nexport const Rocket = (props: IconProps) => (\n <svg {...base} {...props}>\n <path d=\"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\" />\n <path d=\"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z\" />\n <path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0\" />\n <path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\" />\n <circle cx=\"15.5\" cy=\"8.5\" r=\"1.5\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n);"],"names":["base","ArrowRight","props","jsxs","jsx","ArrowUpRight","ArrowDown","ArrowUp","Check","Plus","X","Menu","ChevronDown","ChevronRight","ChevronLeft","Zap","ShieldCheck","Layers","Smartphone","Gauge","BarChart","Users","Star","Quote","Globe","Mail","Lock","Clock","DollarSign","Code","Terminal","Send","Play","Pause","RotateCcw","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AA,CAAO,CAAA,CAAA,CACvE"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./components/Button.cjs"),i=require("./components/Slot.cjs"),c=require("./components/Badge.cjs"),r=require("./components/Card.cjs"),o=require("./components/Section.cjs"),s=require("./components/Modal.cjs"),t=require("./components/Prose.cjs"),a=require("./components/Container.cjs"),u=require("./utils/cn.cjs"),l=require("./utils/iso2Flag.cjs"),e=require("./icons.cjs"),d=require("./components/AccordionShowcase/AccordionShowcase.cjs"),C=require("./components/AgentDemo/AgentDemo.cjs"),g=require("./components/Blog/BlogCard.cjs"),S=require("./components/Blog/BlogSection.cjs"),h=require("./components/CTA/CTA.cjs"),q=require("./components/FAQ/FAQ.cjs"),w=require("./components/Features/FeatureCard.cjs"),A=require("./components/Features/FeatureGrid.cjs"),F=require("./components/FeatureShowcase/FeatureShowcase.cjs"),P=require("./components/Footer/Footer.cjs"),m=require("./components/Hero/Hero.cjs"),B=require("./components/LanguageSwitcher/LanguageSwitcher.cjs"),L=require("./components/LogoCloud/LogoCloud.cjs"),T=require("./components/MegaMenu/MegaMenu.cjs"),k=require("./components/Navbar/Navbar.cjs"),M=require("./components/Newsletter/Newsletter.cjs"),p=require("./components/Pricing/Pricing.cjs"),D=require("./components/Stats/Stats.cjs"),v=require("./components/Testimonials/TestimonialCard.cjs"),R=require("./components/Testimonials/Testimonials.cjs");exports.Button=n.Button;exports.Slot=i.Slot;exports.Badge=c.Badge;exports.Card=r.Card;exports.CardContent=r.CardContent;exports.CardDescription=r.CardDescription;exports.CardFooter=r.CardFooter;exports.CardHeader=r.CardHeader;exports.CardTitle=r.CardTitle;exports.Section=o.Section;exports.SectionHeader=o.SectionHeader;exports.Modal=s.Modal;exports.Prose=t.Prose;exports.ProseLead=t.ProseLead;exports.Container=a.Container;exports.Stack=a.Stack;exports.cn=u.cn;exports.iso2ToFlagEmoji=l.iso2ToFlagEmoji;exports.ArrowDown=e.ArrowDown;exports.ArrowRight=e.ArrowRight;exports.ArrowUp=e.ArrowUp;exports.ArrowUpRight=e.ArrowUpRight;exports.BarChart=e.BarChart;exports.Box=e.Box;exports.Check=e.Check;exports.ChevronDown=e.ChevronDown;exports.ChevronLeft=e.ChevronLeft;exports.ChevronRight=e.ChevronRight;exports.Clock=e.Clock;exports.Code=e.Code;exports.Cpu=e.Cpu;exports.Database=e.Database;exports.DollarSign=e.DollarSign;exports.ExternalLink=e.ExternalLink;exports.Gauge=e.Gauge;exports.Globe=e.Globe;exports.Layers=e.Layers;exports.Lock=e.Lock;exports.Mail=e.Mail;exports.Menu=e.Menu;exports.Palette=e.Palette;exports.Pause=e.Pause;exports.Play=e.Play;exports.Plus=e.Plus;exports.Quote=e.Quote;exports.Rocket=e.Rocket;exports.RotateCcw=e.RotateCcw;exports.Send=e.Send;exports.ShieldCheck=e.ShieldCheck;exports.Sliders=e.Sliders;exports.Smartphone=e.Smartphone;exports.Star=e.Star;exports.Terminal=e.Terminal;exports.Users=e.Users;exports.X=e.X;exports.Zap=e.Zap;exports.AccordionShowcase=d.AccordionShowcase;exports.AgentDemo=C.AgentDemo;exports.BlogCard=g.BlogCard;exports.BlogSection=S.BlogSection;exports.CTA=h.CTA;exports.FAQ=q.FAQ;exports.FeatureCard=w.FeatureCard;exports.FeatureGrid=A.FeatureGrid;exports.FeatureShowcase=F.FeatureShowcase;exports.Footer=P.Footer;exports.Hero=m.Hero;exports.LanguageSwitcher=B.LanguageSwitcher;exports.LogoCloud=L.LogoCloud;exports.MegaMenu=T.MegaMenu;exports.Navbar=k.Navbar;exports.Newsletter=M.Newsletter;exports.Pricing=p.Pricing;exports.Stats=D.Stats;exports.TestimonialCard=v.TestimonialCard;exports.Testimonials=R.Testimonials;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j } from "react";
|
|
3
|
+
import { AgentDemoPlayer as u } from "./Player.js";
|
|
4
|
+
import { DemoWindow as v, EmptyState as E, FinishedStep as P, DemoFooter as R } from "./parts.js";
|
|
5
|
+
const W = j(
|
|
6
|
+
({
|
|
7
|
+
option: h = "player",
|
|
8
|
+
script: r,
|
|
9
|
+
title: m,
|
|
10
|
+
subtitle: o,
|
|
11
|
+
logo: t,
|
|
12
|
+
logoSrc: n,
|
|
13
|
+
logoAlt: i,
|
|
14
|
+
logoClassName: a,
|
|
15
|
+
height: d,
|
|
16
|
+
autoplay: l,
|
|
17
|
+
paused: w,
|
|
18
|
+
loop: x,
|
|
19
|
+
speed: A,
|
|
20
|
+
showControls: F,
|
|
21
|
+
showSteps: S,
|
|
22
|
+
onDone: b,
|
|
23
|
+
className: p,
|
|
24
|
+
"aria-label": f,
|
|
25
|
+
...D
|
|
26
|
+
}, y) => h === "transcript" ? /* @__PURE__ */ e("div", { ref: y, className: p, ...D, children: /* @__PURE__ */ e(
|
|
27
|
+
v,
|
|
28
|
+
{
|
|
29
|
+
title: m,
|
|
30
|
+
subtitle: o,
|
|
31
|
+
logo: t,
|
|
32
|
+
logoSrc: n,
|
|
33
|
+
logoAlt: i,
|
|
34
|
+
logoClassName: a,
|
|
35
|
+
logLabel: f ?? "Scripted agent demo",
|
|
36
|
+
height: d,
|
|
37
|
+
footer: /* @__PURE__ */ e(R, {}),
|
|
38
|
+
children: r.length === 0 ? /* @__PURE__ */ e(E, {}) : r.map((c, g) => /* @__PURE__ */ e(P, { step: c }, g))
|
|
39
|
+
}
|
|
40
|
+
) }) : /* @__PURE__ */ e(
|
|
41
|
+
u,
|
|
42
|
+
{
|
|
43
|
+
ref: y,
|
|
44
|
+
script: r,
|
|
45
|
+
title: m,
|
|
46
|
+
subtitle: o,
|
|
47
|
+
logo: t,
|
|
48
|
+
logoSrc: n,
|
|
49
|
+
logoAlt: i,
|
|
50
|
+
logoClassName: a,
|
|
51
|
+
height: d,
|
|
52
|
+
autoplay: l,
|
|
53
|
+
paused: w,
|
|
54
|
+
loop: x,
|
|
55
|
+
speed: A,
|
|
56
|
+
showControls: F,
|
|
57
|
+
showSteps: S,
|
|
58
|
+
onDone: b,
|
|
59
|
+
className: p,
|
|
60
|
+
"aria-label": f,
|
|
61
|
+
...D
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
);
|
|
65
|
+
W.displayName = "AgentDemo";
|
|
66
|
+
export {
|
|
67
|
+
W as AgentDemo
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=AgentDemo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentDemo.js","sources":["../../../../src/components/AgentDemo/AgentDemo.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { AgentDemoProps } from \"./types\";\nimport { AgentDemoPlayer } from \"./Player\";\nimport { DemoWindow, EmptyState, FinishedStep, DemoFooter } from \"./parts\";\n\n/**\n * Scripted agentic-chat demo for marketing pages.\n *\n * `player` (default) auto-plays the `script` — user messages type out, the\n * agent \"thinks\", tool calls run and resolve, answers stream in — with\n * pause/replay controls. `transcript` renders the whole script instantly\n * (also used automatically under `prefers-reduced-motion`).\n */\nexport const AgentDemo = forwardRef<HTMLDivElement, AgentDemoProps>(\n (\n {\n option = \"player\",\n script,\n title,\n subtitle,\n logo,\n logoSrc,\n logoAlt,\n logoClassName,\n height,\n autoplay,\n paused,\n loop,\n speed,\n showControls,\n showSteps,\n onDone,\n className,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n ) => {\n if (option === \"transcript\") {\n return (\n <div ref={ref} className={className} {...props}>\n <DemoWindow\n title={title}\n subtitle={subtitle}\n logo={logo}\n logoSrc={logoSrc}\n logoAlt={logoAlt}\n logoClassName={logoClassName}\n logLabel={ariaLabel ?? \"Scripted agent demo\"}\n height={height}\n footer={<DemoFooter />}\n >\n {script.length === 0 ? (\n <EmptyState />\n ) : (\n script.map((step, i) => <FinishedStep key={i} step={step} />)\n )}\n </DemoWindow>\n </div>\n );\n }\n return (\n <AgentDemoPlayer\n ref={ref}\n script={script}\n title={title}\n subtitle={subtitle}\n logo={logo}\n logoSrc={logoSrc}\n logoAlt={logoAlt}\n logoClassName={logoClassName}\n height={height}\n autoplay={autoplay}\n paused={paused}\n loop={loop}\n speed={speed}\n showControls={showControls}\n showSteps={showSteps}\n onDone={onDone}\n className={className}\n aria-label={ariaLabel}\n {...props}\n />\n );\n },\n);\nAgentDemo.displayName = \"AgentDemo\";\n"],"names":["AgentDemo","forwardRef","option","script","title","subtitle","logo","logoSrc","logoAlt","logoClassName","height","autoplay","paused","loop","speed","showControls","showSteps","onDone","className","ariaLabel","props","ref","jsx","DemoWindow","DemoFooter","EmptyState","step","i","FinishedStep","AgentDemoPlayer"],"mappings":";;;;AAaO,MAAMA,IAAYC;AAAA,EACvB,CACE;AAAA,IACE,QAAAC,IAAS;AAAA,IACT,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,eAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAcC;AAAA,IACd,GAAGC;AAAA,EAAA,GAELC,MAEInB,MAAW,eAEX,gBAAAoB,EAAC,OAAA,EAAI,KAAAD,GAAU,WAAAH,GAAuB,GAAGE,GACvC,UAAA,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAnB;AAAA,MACA,UAAAC;AAAA,MACA,MAAAC;AAAA,MACA,SAAAC;AAAA,MACA,SAAAC;AAAA,MACA,eAAAC;AAAA,MACA,UAAUU,KAAa;AAAA,MACvB,QAAAT;AAAA,MACA,0BAASc,GAAA,EAAW;AAAA,MAEnB,UAAArB,EAAO,WAAW,IACjB,gBAAAmB,EAACG,KAAW,IAEZtB,EAAO,IAAI,CAACuB,GAAMC,MAAM,gBAAAL,EAACM,GAAA,EAAqB,MAAAF,EAAA,GAAHC,CAAe,CAAE;AAAA,IAAA;AAAA,EAAA,GAGlE,IAIF,gBAAAL;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,KAAAR;AAAA,MACA,QAAAlB;AAAA,MACA,OAAAC;AAAA,MACA,UAAAC;AAAA,MACA,MAAAC;AAAA,MACA,SAAAC;AAAA,MACA,SAAAC;AAAA,MACA,eAAAC;AAAA,MACA,QAAAC;AAAA,MACA,UAAAC;AAAA,MACA,QAAAC;AAAA,MACA,MAAAC;AAAA,MACA,OAAAC;AAAA,MACA,cAAAC;AAAA,MACA,WAAAC;AAAA,MACA,QAAAC;AAAA,MACA,WAAAC;AAAA,MACA,cAAYC;AAAA,MACX,GAAGC;AAAA,IAAA;AAAA,EAAA;AAIZ;AACApB,EAAU,cAAc;"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t, jsxs as T, Fragment as oe } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as ie, useState as f, useRef as k, useEffect as l } from "react";
|
|
4
|
+
import { Pause as ce, Play as le, RotateCcw as ae } from "../../icons.js";
|
|
5
|
+
import { ToolCard as ue } from "./ToolCard.js";
|
|
6
|
+
import { DemoWindow as H, EmptyState as de, FinishedStep as X, DemoFooter as Y, AssistantMessage as fe, ThinkingRow as me, StepProgress as he, ControlButton as K } from "./parts.js";
|
|
7
|
+
const ge = 24, pe = 350, ye = 1e3, Pe = 1100, Re = 2600;
|
|
8
|
+
function Te() {
|
|
9
|
+
const [q, r] = f(!1);
|
|
10
|
+
return l(() => {
|
|
11
|
+
if (typeof window > "u" || typeof window.matchMedia != "function") return;
|
|
12
|
+
const m = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
13
|
+
r(m.matches);
|
|
14
|
+
}, []), q;
|
|
15
|
+
}
|
|
16
|
+
const we = ie(function({
|
|
17
|
+
script: r,
|
|
18
|
+
title: m,
|
|
19
|
+
subtitle: I,
|
|
20
|
+
logo: S,
|
|
21
|
+
logoSrc: x,
|
|
22
|
+
logoAlt: C,
|
|
23
|
+
logoClassName: b,
|
|
24
|
+
height: A,
|
|
25
|
+
autoplay: a = !0,
|
|
26
|
+
paused: h = !1,
|
|
27
|
+
loop: U = !1,
|
|
28
|
+
speed: E = 1,
|
|
29
|
+
showControls: Z = !0,
|
|
30
|
+
showSteps: $ = !0,
|
|
31
|
+
onDone: O,
|
|
32
|
+
className: F,
|
|
33
|
+
"aria-label": L,
|
|
34
|
+
...N
|
|
35
|
+
}, _) {
|
|
36
|
+
const ee = Te(), g = !a || ee, p = E && E > 0 ? E : 1, [W, te] = f(0), [j, u] = f(a && !h), [i, B] = f(0), [D, ne] = f(""), [z, y] = f(!1), w = k(null), J = k(""), d = k(0), M = k(O);
|
|
37
|
+
l(() => {
|
|
38
|
+
M.current = O;
|
|
39
|
+
}, [O]);
|
|
40
|
+
const c = r.length, s = c > 0 && i >= c, v = (e) => {
|
|
41
|
+
J.current = e, ne(e);
|
|
42
|
+
}, Q = () => {
|
|
43
|
+
d.current = 0, v(""), y(!1), B(0), u(!0), te((e) => e + 1);
|
|
44
|
+
};
|
|
45
|
+
if (l(() => {
|
|
46
|
+
d.current = 0, v(""), y(!1), B(0), u(a && !h);
|
|
47
|
+
}, [r, a, h]), l(() => {
|
|
48
|
+
h ? u(!1) : a && u(!0);
|
|
49
|
+
}, [h, a]), l(() => {
|
|
50
|
+
if (g || !j || i >= c) return;
|
|
51
|
+
const e = r[i], n = [];
|
|
52
|
+
let P;
|
|
53
|
+
d.current = J.current.length;
|
|
54
|
+
const G = () => {
|
|
55
|
+
n.push(
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
v(""), y(!1), d.current = 0, B((R) => R + 1);
|
|
58
|
+
}, pe / p)
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
if (e.type === "user" || e.type === "assistant") {
|
|
62
|
+
const R = e.text, se = Math.max(1, Math.ceil(R.length / 36));
|
|
63
|
+
P = setInterval(() => {
|
|
64
|
+
d.current += se;
|
|
65
|
+
const V = R.slice(0, d.current);
|
|
66
|
+
v(V), V.length >= R.length && (P && clearInterval(P), G());
|
|
67
|
+
}, ge / p);
|
|
68
|
+
} else e.type === "thinking" ? n.push(setTimeout(G, ye / p)) : (y(!0), n.push(
|
|
69
|
+
setTimeout(() => {
|
|
70
|
+
y(!1), G();
|
|
71
|
+
}, Pe / p)
|
|
72
|
+
));
|
|
73
|
+
return () => {
|
|
74
|
+
P && clearInterval(P), n.forEach(clearTimeout);
|
|
75
|
+
};
|
|
76
|
+
}, [g, j, i, W, r, p, c]), l(() => {
|
|
77
|
+
var n;
|
|
78
|
+
if (g || !s || ((n = M.current) == null || n.call(M), !U)) return;
|
|
79
|
+
const e = setTimeout(Q, Re);
|
|
80
|
+
return () => clearTimeout(e);
|
|
81
|
+
}, [g, s, U, W]), l(() => {
|
|
82
|
+
const e = w.current;
|
|
83
|
+
e && (e.scrollTop = e.scrollHeight);
|
|
84
|
+
}, [i, D, z]), c === 0)
|
|
85
|
+
return /* @__PURE__ */ t("div", { ref: _, className: F, ...N, children: /* @__PURE__ */ t(
|
|
86
|
+
H,
|
|
87
|
+
{
|
|
88
|
+
title: m,
|
|
89
|
+
subtitle: I,
|
|
90
|
+
logo: S,
|
|
91
|
+
logoSrc: x,
|
|
92
|
+
logoAlt: C,
|
|
93
|
+
logoClassName: b,
|
|
94
|
+
logLabel: L ?? "Scripted agent demo",
|
|
95
|
+
height: A,
|
|
96
|
+
logRef: w,
|
|
97
|
+
children: /* @__PURE__ */ t(de, {})
|
|
98
|
+
}
|
|
99
|
+
) });
|
|
100
|
+
if (g)
|
|
101
|
+
return /* @__PURE__ */ t("div", { ref: _, className: F, ...N, children: /* @__PURE__ */ t(
|
|
102
|
+
H,
|
|
103
|
+
{
|
|
104
|
+
title: m,
|
|
105
|
+
subtitle: I,
|
|
106
|
+
logo: S,
|
|
107
|
+
logoSrc: x,
|
|
108
|
+
logoAlt: C,
|
|
109
|
+
logoClassName: b,
|
|
110
|
+
logLabel: L ?? "Scripted agent demo",
|
|
111
|
+
height: A,
|
|
112
|
+
logRef: w,
|
|
113
|
+
footer: /* @__PURE__ */ t(Y, {}),
|
|
114
|
+
children: r.map((e, n) => /* @__PURE__ */ t(X, { step: e }, n))
|
|
115
|
+
}
|
|
116
|
+
) });
|
|
117
|
+
const o = r[Math.min(i, c - 1)], re = !s && o.type === "user" ? D : void 0;
|
|
118
|
+
return /* @__PURE__ */ t("div", { ref: _, className: F, ...N, children: /* @__PURE__ */ T(
|
|
119
|
+
H,
|
|
120
|
+
{
|
|
121
|
+
title: m,
|
|
122
|
+
subtitle: I,
|
|
123
|
+
logo: S,
|
|
124
|
+
logoSrc: x,
|
|
125
|
+
logoAlt: C,
|
|
126
|
+
logoClassName: b,
|
|
127
|
+
logLabel: L ?? "Scripted agent demo",
|
|
128
|
+
height: A,
|
|
129
|
+
logRef: w,
|
|
130
|
+
footer: /* @__PURE__ */ t(
|
|
131
|
+
Y,
|
|
132
|
+
{
|
|
133
|
+
composing: re,
|
|
134
|
+
controls: Z ? /* @__PURE__ */ T(oe, { children: [
|
|
135
|
+
j && !s ? /* @__PURE__ */ T(K, { onClick: () => u(!1), "aria-label": "Pause demo", children: [
|
|
136
|
+
/* @__PURE__ */ t(ce, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
137
|
+
"Pause"
|
|
138
|
+
] }) : s ? null : /* @__PURE__ */ T(K, { onClick: () => u(!0), "aria-label": "Play demo", children: [
|
|
139
|
+
/* @__PURE__ */ t(le, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
140
|
+
"Play"
|
|
141
|
+
] }),
|
|
142
|
+
/* @__PURE__ */ T(K, { onClick: Q, "aria-label": "Replay demo", children: [
|
|
143
|
+
/* @__PURE__ */ t(ae, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
144
|
+
"Replay"
|
|
145
|
+
] })
|
|
146
|
+
] }) : void 0,
|
|
147
|
+
progress: $ ? /* @__PURE__ */ t("span", { className: "ml-auto", children: /* @__PURE__ */ t(he, { current: i + 1, total: c, done: s }) }) : void 0
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
children: [
|
|
151
|
+
r.slice(0, i).map((e, n) => /* @__PURE__ */ t(X, { step: e }, n)),
|
|
152
|
+
!s && o.type === "assistant" ? /* @__PURE__ */ t(fe, { text: D, partial: !0 }) : null,
|
|
153
|
+
!s && o.type === "thinking" ? /* @__PURE__ */ t(me, { label: o.label ?? "Thinking…" }) : null,
|
|
154
|
+
!s && o.type === "tool" ? /* @__PURE__ */ t(
|
|
155
|
+
ue,
|
|
156
|
+
{
|
|
157
|
+
name: o.name,
|
|
158
|
+
args: o.args,
|
|
159
|
+
result: o.result,
|
|
160
|
+
status: z ? "running" : o.status === "error" ? "error" : "success"
|
|
161
|
+
}
|
|
162
|
+
) : null
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
) });
|
|
166
|
+
});
|
|
167
|
+
we.displayName = "AgentDemoPlayer";
|
|
168
|
+
export {
|
|
169
|
+
we as AgentDemoPlayer
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=Player.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Player.js","sources":["../../../../src/components/AgentDemo/Player.tsx"],"sourcesContent":["\"use client\";\nimport { forwardRef, useEffect, useRef, useState } from \"react\";\nimport { Pause, Play, RotateCcw } from \"../../icons\";\nimport type { AgentDemoProps } from \"./types\";\nimport { ToolCard } from \"./ToolCard\";\nimport {\n AssistantMessage,\n ControlButton,\n DemoFooter,\n DemoWindow,\n EmptyState,\n FinishedStep,\n StepProgress,\n ThinkingRow,\n} from \"./parts\";\n\nconst TICK = 24;\nconst GAP = 350;\nconst THINKING_MS = 1000;\nconst TOOL_MS = 1100;\nconst LOOP_PAUSE = 2600;\n\nfunction usePrefersReducedMotion() {\n const [reduced, setReduced] = useState(false);\n useEffect(() => {\n if (typeof window === \"undefined\" || typeof window.matchMedia !== \"function\") return;\n const query = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n setReduced(query.matches);\n }, []);\n return reduced;\n}\n\nexport const AgentDemoPlayer = forwardRef<HTMLDivElement, AgentDemoProps>(function AgentDemoPlayer(\n {\n script,\n title,\n subtitle,\n logo,\n logoSrc,\n logoAlt,\n logoClassName,\n height,\n autoplay = true,\n paused = false,\n loop = false,\n speed = 1,\n showControls = true,\n showSteps = true,\n onDone,\n className,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref,\n) {\n const reduceMotion = usePrefersReducedMotion();\n const staticRender = !autoplay || reduceMotion;\n const rate = speed && speed > 0 ? speed : 1;\n\n const [runId, setRunId] = useState(0);\n const [playing, setPlaying] = useState(autoplay && !paused);\n const [completed, setCompleted] = useState(0);\n const [partial, setPartial] = useState(\"\");\n const [toolRunning, setToolRunning] = useState(false);\n\n const logRef = useRef<HTMLDivElement | null>(null);\n const partialRef = useRef(\"\");\n const progressRef = useRef(0);\n const onDoneRef = useRef(onDone);\n useEffect(() => {\n onDoneRef.current = onDone;\n }, [onDone]);\n\n const total = script.length;\n const done = total > 0 && completed >= total;\n\n const setPartialBoth = (value: string) => {\n partialRef.current = value;\n setPartial(value);\n };\n\n const replay = () => {\n progressRef.current = 0;\n setPartialBoth(\"\");\n setToolRunning(false);\n setCompleted(0);\n setPlaying(true);\n setRunId((id) => id + 1);\n };\n\n // Reset when the script changes.\n useEffect(() => {\n progressRef.current = 0;\n setPartialBoth(\"\");\n setToolRunning(false);\n setCompleted(0);\n setPlaying(autoplay && !paused);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [script, autoplay, paused]);\n\n // Follow the `paused` prop (explicit Play/Pause clicks always win locally).\n useEffect(() => {\n if (paused) {\n setPlaying(false);\n } else if (autoplay) {\n setPlaying(true);\n }\n }, [paused, autoplay]);\n\n // Core playback loop: one effect per in-progress step.\n useEffect(() => {\n if (staticRender || !playing || completed >= total) return;\n const step = script[completed];\n const timers: ReturnType<typeof setTimeout>[] = [];\n let interval: ReturnType<typeof setInterval> | undefined;\n // Resume typing where it paused instead of restarting the message.\n progressRef.current = partialRef.current.length;\n\n const finish = () => {\n timers.push(\n setTimeout(() => {\n setPartialBoth(\"\");\n setToolRunning(false);\n progressRef.current = 0;\n setCompleted((c) => c + 1);\n }, GAP / rate),\n );\n };\n\n if (step.type === \"user\" || step.type === \"assistant\") {\n const full = step.text;\n const chunk = Math.max(1, Math.ceil(full.length / 36));\n interval = setInterval(() => {\n progressRef.current += chunk;\n const next = full.slice(0, progressRef.current);\n setPartialBoth(next);\n if (next.length >= full.length) {\n if (interval) clearInterval(interval);\n finish();\n }\n }, TICK / rate);\n } else if (step.type === \"thinking\") {\n timers.push(setTimeout(finish, THINKING_MS / rate));\n } else {\n setToolRunning(true);\n timers.push(\n setTimeout(() => {\n setToolRunning(false);\n finish();\n }, TOOL_MS / rate),\n );\n }\n\n return () => {\n if (interval) clearInterval(interval);\n timers.forEach(clearTimeout);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [staticRender, playing, completed, runId, script, rate, total]);\n\n // Completion: notify once per run, then loop if asked.\n useEffect(() => {\n if (staticRender || !done) return;\n onDoneRef.current?.();\n if (!loop) return;\n const timer = setTimeout(replay, LOOP_PAUSE);\n return () => clearTimeout(timer);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [staticRender, done, loop, runId]);\n\n // Keep the newest step in view while playing.\n useEffect(() => {\n const el = logRef.current;\n if (el) el.scrollTop = el.scrollHeight;\n }, [completed, partial, toolRunning]);\n\n if (total === 0) {\n return (\n <div ref={ref} className={className} {...props}>\n <DemoWindow\n title={title}\n subtitle={subtitle}\n logo={logo}\n logoSrc={logoSrc}\n logoAlt={logoAlt}\n logoClassName={logoClassName}\n logLabel={ariaLabel ?? \"Scripted agent demo\"}\n height={height}\n logRef={logRef}\n >\n <EmptyState />\n </DemoWindow>\n </div>\n );\n }\n\n if (staticRender) {\n return (\n <div ref={ref} className={className} {...props}>\n <DemoWindow\n title={title}\n subtitle={subtitle}\n logo={logo}\n logoSrc={logoSrc}\n logoAlt={logoAlt}\n logoClassName={logoClassName}\n logLabel={ariaLabel ?? \"Scripted agent demo\"}\n height={height}\n logRef={logRef}\n footer={<DemoFooter />}\n >\n {script.map((step, i) => (\n <FinishedStep key={i} step={step} />\n ))}\n </DemoWindow>\n </div>\n );\n }\n\n const current = script[Math.min(completed, total - 1)];\n // The user \"types\" in the input box; the bubble only mounts once sent.\n const composing = !done && current.type === \"user\" ? partial : undefined;\n\n return (\n <div ref={ref} className={className} {...props}>\n <DemoWindow\n title={title}\n subtitle={subtitle}\n logo={logo}\n logoSrc={logoSrc}\n logoAlt={logoAlt}\n logoClassName={logoClassName}\n logLabel={ariaLabel ?? \"Scripted agent demo\"}\n height={height}\n logRef={logRef}\n footer={\n <DemoFooter\n composing={composing}\n controls={\n showControls ? (\n <>\n {playing && !done ? (\n <ControlButton onClick={() => setPlaying(false)} aria-label=\"Pause demo\">\n <Pause className=\"h-3.5 w-3.5\" aria-hidden />\n Pause\n </ControlButton>\n ) : !done ? (\n <ControlButton onClick={() => setPlaying(true)} aria-label=\"Play demo\">\n <Play className=\"h-3.5 w-3.5\" aria-hidden />\n Play\n </ControlButton>\n ) : null}\n <ControlButton onClick={replay} aria-label=\"Replay demo\">\n <RotateCcw className=\"h-3.5 w-3.5\" aria-hidden />\n Replay\n </ControlButton>\n </>\n ) : undefined\n }\n progress={\n showSteps ? (\n <span className=\"ml-auto\">\n <StepProgress current={completed + 1} total={total} done={done} />\n </span>\n ) : undefined\n }\n />\n }\n >\n {script.slice(0, completed).map((step, i) => (\n <FinishedStep key={i} step={step} />\n ))}\n {!done && current.type === \"assistant\" ? (\n <AssistantMessage text={partial} partial />\n ) : null}\n {!done && current.type === \"thinking\" ? (\n <ThinkingRow label={current.label ?? \"Thinking…\"} />\n ) : null}\n {!done && current.type === \"tool\" ? (\n <ToolCard\n name={current.name}\n args={current.args}\n result={current.result}\n status={\n toolRunning ? \"running\" : current.status === \"error\" ? \"error\" : \"success\"\n }\n />\n ) : null}\n </DemoWindow>\n </div>\n );\n});\nAgentDemoPlayer.displayName = \"AgentDemoPlayer\";\n"],"names":["TICK","GAP","THINKING_MS","TOOL_MS","LOOP_PAUSE","usePrefersReducedMotion","reduced","setReduced","useState","useEffect","query","AgentDemoPlayer","forwardRef","script","title","subtitle","logo","logoSrc","logoAlt","logoClassName","height","autoplay","paused","loop","speed","showControls","showSteps","onDone","className","ariaLabel","props","ref","reduceMotion","staticRender","rate","runId","setRunId","playing","setPlaying","completed","setCompleted","partial","setPartial","toolRunning","setToolRunning","logRef","useRef","partialRef","progressRef","onDoneRef","total","done","setPartialBoth","value","replay","id","step","timers","interval","finish","c","full","chunk","next","_a","timer","el","jsx","DemoWindow","EmptyState","DemoFooter","i","FinishedStep","current","composing","jsxs","Fragment","ControlButton","Pause","Play","RotateCcw","StepProgress","AssistantMessage","ThinkingRow","ToolCard"],"mappings":";;;;;AAgBA,MAAMA,KAAO,IACPC,KAAM,KACNC,KAAc,KACdC,KAAU,MACVC,KAAa;AAEnB,SAASC,KAA0B;AACjC,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAS,EAAK;AAC5C,SAAAC,EAAU,MAAM;AACd,QAAI,OAAO,SAAW,OAAe,OAAO,OAAO,cAAe,WAAY;AAC9E,UAAMC,IAAQ,OAAO,WAAW,kCAAkC;AAClE,IAAAH,EAAWG,EAAM,OAAO;AAAA,EAC1B,GAAG,CAAA,CAAE,GACEJ;AACT;AAEO,MAAMK,KAAkBC,GAA2C,SACxE;AAAA,EACE,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA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