@runtypelabs/persona 3.3.0 → 3.4.0
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/theme-reference.cjs +1 -0
- package/dist/theme-reference.d.cts +899 -0
- package/dist/theme-reference.d.ts +899 -0
- package/dist/theme-reference.js +1 -0
- package/package.json +8 -2
- package/src/theme-reference.ts +371 -0
package/dist/index.global.js
CHANGED
|
@@ -160,7 +160,7 @@ ${n.join(`
|
|
|
160
160
|
${n.join(`
|
|
161
161
|
`)}`)}return t.join(`
|
|
162
162
|
|
|
163
|
-
`)}var iR={name:"@runtypelabs/persona",version:"3.
|
|
163
|
+
`)}var iR={name:"@runtypelabs/persona",version:"3.4.0",description:"Themeable, pluggable streaming agent widget for websites, in plain JS with support for voice input and reasoning / tool output.",type:"module",main:"dist/index.cjs",module:"dist/index.js",types:"dist/index.d.ts",exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./theme-reference":{types:"./dist/theme-reference.d.ts",import:"./dist/theme-reference.js",require:"./dist/theme-reference.cjs"},"./widget.css":{import:"./widget.css",default:"./dist/widget.css"}},files:["dist","widget.css","src"],scripts:{build:"rimraf dist && pnpm run build:styles && pnpm run build:client && pnpm run build:installer && pnpm run build:theme-ref","build:theme-ref":"tsup src/theme-reference.ts --format esm,cjs --minify --dts","build:styles":`node -e "const fs=require('fs');fs.mkdirSync('dist',{recursive:true});fs.copyFileSync('src/styles/widget.css','dist/widget.css');"`,"build:client":'tsup src/index.ts --format esm,cjs,iife --global-name AgentWidget --minify --sourcemap --splitting false --dts --loader ".css=text"',"build:installer":"tsup src/install.ts --format iife --global-name SiteAgentInstaller --out-dir dist --minify --sourcemap --no-splitting",lint:"eslint . --ext .ts",typecheck:"tsc --noEmit",test:"vitest","test:ui":"vitest --ui","test:run":"vitest run"},dependencies:{dompurify:"^3.3.3",idiomorph:"^0.7.4",lucide:"^0.552.0",marked:"^12.0.2","partial-json":"^0.1.7",zod:"^3.22.4"},devDependencies:{"@types/node":"^20.12.7","@typescript-eslint/eslint-plugin":"^7.0.0","@typescript-eslint/parser":"^7.0.0","@vitest/ui":"^4.0.9",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","fake-indexeddb":"^6.2.5",rimraf:"^5.0.5",tsup:"^8.0.1",typescript:"^5.4.5",vitest:"^4.0.9"},engines:{node:">=20.0.0"},author:"Runtype",license:"MIT",keywords:["ai","chat","widget","streaming","typescript","persona","agent"],repository:{type:"git",url:"git+https://github.com/runtypelabs/persona.git",directory:"packages/widget"},bugs:{url:"https://github.com/runtypelabs/persona/issues"},homepage:"https://github.com/runtypelabs/persona/tree/main/packages/widget#readme",publishConfig:{access:"public"}};var Qr=iR.version;function gr(r){if(r!==void 0)return typeof r=="string"?r:Array.isArray(r)?`[${r.map(a=>a.toString()).join(", ")}]`:r.toString()}function AD(r){if(r)return{getHeaders:gr(r.getHeaders),onFeedback:gr(r.onFeedback),onCopy:gr(r.onCopy),requestMiddleware:gr(r.requestMiddleware),actionHandlers:gr(r.actionHandlers),actionParsers:gr(r.actionParsers),postprocessMessage:gr(r.postprocessMessage),contextProviders:gr(r.contextProviders),streamParser:gr(r.streamParser)}}var dR=`({ text, message }: any) => {
|
|
164
164
|
const jsonSource = (message as any).rawContent || text || message.content;
|
|
165
165
|
if (!jsonSource || typeof jsonSource !== 'string') return null;
|
|
166
166
|
let cleanJson = jsonSource
|