@runtypelabs/persona 4.17.0 → 4.18.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/animations/glyph-cycle.d.cts +1 -1
- package/dist/animations/glyph-cycle.d.ts +1 -1
- package/dist/animations/{types-BpWGm7_6.d.cts → types-DsmTD8TO.d.cts} +12 -0
- package/dist/animations/{types-BpWGm7_6.d.ts → types-DsmTD8TO.d.ts} +12 -0
- package/dist/animations/wipe.d.cts +1 -1
- package/dist/animations/wipe.d.ts +1 -1
- package/dist/chunk-3I2S3I5P.js +1 -0
- package/dist/chunk-76IELU7F.js +1 -0
- package/dist/chunk-EFJBUH5F.js +1 -0
- package/dist/chunk-PDPVORUF.js +1 -0
- package/dist/chunk-Q735PSZL.js +1 -0
- package/dist/chunk-VK6JOIYJ.js +1 -0
- package/dist/codegen.cjs +4 -4
- package/dist/codegen.js +4 -4
- package/dist/{context-mentions-BTSTIBFC.js → context-mentions-MJL6S6P2.js} +1 -1
- package/dist/context-mentions.cjs +9 -8
- package/dist/context-mentions.d.cts +1224 -14
- package/dist/context-mentions.d.ts +1224 -14
- package/dist/context-mentions.js +9 -8
- package/dist/event-stream-view-4EZ7BGFK.js +1 -0
- package/dist/event-stream-view.cjs +129 -0
- package/dist/event-stream-view.d.cts +8384 -0
- package/dist/event-stream-view.d.ts +8384 -0
- package/dist/event-stream-view.js +129 -0
- package/dist/history-view-BD6OXLNA.js +898 -0
- package/dist/history-view.cjs +898 -0
- package/dist/history-view.d.cts +1461 -0
- package/dist/history-view.d.ts +1461 -0
- package/dist/history-view.js +898 -0
- package/dist/index.cjs +77 -77
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2040 -21
- package/dist/index.d.ts +2040 -21
- package/dist/index.global.js +67 -66
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +77 -77
- package/dist/index.js.map +1 -1
- package/dist/launcher.global.js +5 -4
- package/dist/launcher.global.js.map +1 -1
- package/dist/plugin-kit.cjs +1 -1
- package/dist/plugin-kit.d.cts +0 -8
- package/dist/plugin-kit.d.ts +0 -8
- package/dist/plugin-kit.js +1 -1
- package/dist/smart-dom-reader.d.cts +1224 -14
- package/dist/smart-dom-reader.d.ts +1224 -14
- package/dist/theme-editor-preview.cjs +970 -73
- package/dist/theme-editor-preview.d.cts +1343 -15
- package/dist/theme-editor-preview.d.ts +1343 -15
- package/dist/theme-editor-preview.js +81 -81
- package/dist/theme-editor.cjs +7 -7
- package/dist/theme-editor.d.cts +1227 -15
- package/dist/theme-editor.d.ts +1227 -15
- package/dist/theme-editor.js +9 -9
- package/dist/theme-reference.cjs +1 -1
- package/dist/theme-reference.d.cts +226 -7
- package/dist/theme-reference.d.ts +226 -7
- package/dist/theme-reference.js +1 -1
- package/dist/webmcp-polyfill.js +2 -2
- package/dist/widget.css +1 -1
- package/package.json +18 -6
- package/src/client-history-rest.test.ts +1034 -0
- package/src/client-visitor-history.test.ts +596 -0
- package/src/client.ts +1040 -24
- package/src/components/artifact-inline.ts +8 -1
- package/src/components/artifact-pane.test.ts +278 -1
- package/src/components/artifact-pane.ts +135 -67
- package/src/components/artifact-preview.test.ts +14 -1
- package/src/components/artifact-preview.ts +9 -0
- package/src/components/header-builder.ts +3 -0
- package/src/components/header-layouts.test.ts +171 -7
- package/src/components/header-layouts.ts +83 -53
- package/src/components/header-parts.test.ts +154 -1
- package/src/components/header-parts.ts +266 -138
- package/src/components/history-confirm-dialog.ts +177 -0
- package/src/components/history-shell-copy.ts +99 -0
- package/src/components/history-view/announcer.ts +40 -0
- package/src/components/history-view/copy.ts +105 -0
- package/src/components/history-view/css.ts +1078 -0
- package/src/components/history-view/grouping.test.ts +142 -0
- package/src/components/history-view/grouping.ts +142 -0
- package/src/components/history-view/icons.ts +73 -0
- package/src/components/history-view/rows.ts +341 -0
- package/src/components/history-view/state.ts +309 -0
- package/src/components/history-view.test.ts +2660 -0
- package/src/components/history-view.ts +1891 -0
- package/src/components/launcher-surface.test.ts +133 -0
- package/src/components/launcher.test.ts +18 -0
- package/src/components/launcher.ts +7 -7
- package/src/components/panel.ts +17 -7
- package/src/components/welcome.ts +72 -2
- package/src/defaults.ts +36 -3
- package/src/event-stream-view-bundle.test.ts +69 -0
- package/src/event-stream-view-entry.ts +19 -0
- package/src/event-stream-view-loader.ts +31 -0
- package/src/event-stream-view.ts +19 -0
- package/src/generated/runtype-openapi-contract.ts +54 -4
- package/src/history-render.ts +325 -0
- package/src/history-view-bundle.test.ts +78 -0
- package/src/history-view-entry.ts +41 -0
- package/src/history-view-loader.test.ts +30 -0
- package/src/history-view-loader.ts +32 -0
- package/src/history-view.ts +28 -0
- package/src/index-core.ts +50 -2
- package/src/index-global.ts +55 -0
- package/src/internal/demo-history-provider.test.ts +402 -0
- package/src/internal/demo-history-provider.ts +689 -0
- package/src/internal/history-provider-registry.ts +25 -0
- package/src/internal/history-provider.ts +150 -0
- package/src/internal/runtype-history-provider.test.ts +313 -0
- package/src/internal/runtype-history-provider.ts +240 -0
- package/src/plugin-kit.test.ts +16 -0
- package/src/plugin-kit.ts +13 -5
- package/src/plugins/types.ts +177 -1
- package/src/session-history.test.ts +1397 -0
- package/src/session.ts +1200 -26
- package/src/styles/widget-styles.test.ts +133 -0
- package/src/styles/widget.css +227 -8
- package/src/theme-editor/preview-utils.test.ts +19 -0
- package/src/theme-editor/preview-utils.ts +15 -1
- package/src/theme-editor/preview.ts +7 -1
- package/src/theme-editor/role-mappings.ts +4 -1
- package/src/theme-editor/sections.test.ts +168 -1
- package/src/theme-editor/sections.ts +136 -7
- package/src/theme-editor/webmcp/summary.ts +16 -2
- package/src/theme-reference.ts +20 -6
- package/src/types/theme.ts +213 -7
- package/src/types.ts +927 -7
- package/src/ui.artifact-rail-resize.test.ts +235 -0
- package/src/ui.attachments-drop.test.ts +1 -0
- package/src/ui.header-update-stability.test.ts +2 -2
- package/src/ui.history-chunk.test.ts +72 -0
- package/src/ui.history-config-provider.test.ts +318 -0
- package/src/ui.history-controller.test.ts +711 -0
- package/src/ui.history-lifecycle.test.ts +456 -0
- package/src/ui.history-render-hooks.test.ts +904 -0
- package/src/ui.history-shell.test.ts +1887 -0
- package/src/ui.rail-overlay.test.ts +573 -0
- package/src/ui.rail-resize.test.ts +284 -0
- package/src/ui.rebuild-composer.test.ts +21 -0
- package/src/ui.render-welcome.test.ts +42 -0
- package/src/ui.shortcuts.test.ts +166 -0
- package/src/ui.ts +3071 -240
- package/src/utils/__fixtures__/client-conversation-history-wire.json +108 -0
- package/src/utils/artifact-file.ts +15 -0
- package/src/utils/artifact-gate.test.ts +4 -0
- package/src/utils/artifact-gate.ts +13 -17
- package/src/utils/artifact-resize.test.ts +28 -0
- package/src/utils/artifact-resize.ts +9 -2
- package/src/utils/buttons.ts +188 -1
- package/src/utils/config-merge.test.ts +91 -0
- package/src/utils/dropdown.ts +10 -1
- package/src/utils/history-messages.test.ts +284 -0
- package/src/utils/history-messages.ts +284 -0
- package/src/utils/icons.ts +3 -0
- package/src/utils/shortcuts.test.ts +288 -0
- package/src/utils/shortcuts.ts +221 -0
- package/src/utils/theme.test.ts +501 -4
- package/src/utils/theme.ts +42 -3
- package/src/utils/tokens.ts +153 -15
- package/src/utils/tooltip-timing.ts +4 -0
- package/src/utils/tooltip.test.ts +249 -7
- package/src/utils/tooltip.ts +146 -4
- package/src/utils/visitor-store.test.ts +425 -0
- package/src/utils/visitor-store.ts +337 -0
- package/dist/chunk-QJ4LV2KW.js +0 -1
package/dist/plugin-kit.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var y=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var z=(e,t)=>{for(var o in t)y(e,o,{get:t[o],enumerable:!0})},A=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of C(t))!H.call(e,r)&&r!==o&&y(e,r,{get:()=>t[r],enumerable:!(i=S(t,r))||i.enumerable});return e};var I=e=>A(y({},"__esModule",{value:!0}),e);var j={};z(j,{createPopover:()=>U,getStyleRoot:()=>x,injectStyles:()=>$,isEditableEventTarget:()=>_});module.exports=I(j);var v=e=>e.nodeType===Node.DOCUMENT_NODE,b=e=>e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host!==void 0;function x(e){let t=e.getRootNode?.();return t&&b(t)||t&&v(t)?t:e.ownerDocument??document}function h(e,t,o){let i=v(e)?e.head:e,r=t.replace(/["\\]/g,"\\$&");if(i.querySelector(`style[data-persona-plugin-style="${r}"]`))return;let c=(v(e)?e:e.ownerDocument??document).createElement("style");c.setAttribute("data-persona-plugin-style",t),c.textContent=o,i.appendChild(c)}function $(e,t,o){if(v(e)||b(e)){h(e,t,o);return}let i=e;if(i.isConnected){h(x(i),t,o);return}let r=i.ownerDocument??document;h(r,t,o),queueMicrotask(()=>{let l=x(i);l!==r&&h(l,t,o)})}function W(e){let t=e.getRootNode?.();return t instanceof ShadowRoot?t:(e.ownerDocument??document).body}function U(e){let{anchor:t,content:o,placement:i="bottom-start",offset:r=6,matchAnchorWidth:l=!1,horizontalOffset:c,verticalOffset:O,zIndex:D=2147483e3,onOpen:L,onDismiss:R}=e,M=e.container??W(t),s=!1,m=null,w=()=>{if(!s)return;let n=t.getBoundingClientRect();o.style.position="fixed",l&&(o.style.minWidth=`${n.width}px`),c&&(o.style.maxWidth=`${n.width}px`);let a=o.getBoundingClientRect(),d=O?.()??null,f=d!=null?n.top+d:n.top,E=i==="top-start"||i==="top-end"?f-r-a.height:n.bottom+r,p=i==="bottom-end"||i==="top-end"?n.right-a.width:n.left,N=c?.()??null;if(N!=null){let P=Math.max(n.left,n.right-a.width);p=Math.min(Math.max(n.left+N,n.left),P)}o.style.top=`${E}px`,o.style.left=`${p}px`},u=()=>{s&&(s=!1,m&&(m(),m=null),o.remove())},T=()=>{if(s)return;s=!0,D!=null&&(o.style.zIndex=String(D)),M.appendChild(o),w();let n=(t.ownerDocument??document).defaultView??window,a=t.ownerDocument??document,d=()=>{if(!t.isConnected){u(),R?.("anchor-removed");return}w()},f=g=>{let p=typeof g.composedPath=="function"?g.composedPath():[];p.includes(o)||p.includes(t)||(u(),R?.("outside"))},E=n.setTimeout(()=>{a.addEventListener("pointerdown",f,!0)},0);n.addEventListener("scroll",d,!0),n.addEventListener("resize",d),m=()=>{n.clearTimeout(E),a.removeEventListener("pointerdown",f,!0),n.removeEventListener("scroll",d,!0),n.removeEventListener("resize",d)},L?.()};return{get isOpen(){return s},open:T,close:u,toggle:()=>s?u():T(),reposition:w,destroy:u}}function _(e){return(typeof e.composedPath=="function"?e.composedPath():[]).some(o=>o instanceof HTMLElement&&(o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable))}0&&(module.exports={createPopover,getStyleRoot,injectStyles,isEditableEventTarget});
|
package/dist/plugin-kit.d.cts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve the root a node's styles should live in.
|
|
3
|
-
*
|
|
4
|
-
* Returns the node's `ShadowRoot` when it (or an ancestor) is shadowed, the
|
|
5
|
-
* owning `Document` otherwise. A `<style>` placed in this root reaches the node
|
|
6
|
-
* regardless of whether the widget runs in light or shadow DOM. For a detached
|
|
7
|
-
* node (one not yet mounted) this falls back to the owning document.
|
|
8
|
-
*/
|
|
9
1
|
declare function getStyleRoot(node: Node): Document | ShadowRoot;
|
|
10
2
|
/**
|
|
11
3
|
* Inject a plugin's CSS once into the correct root: the widget's shadow root
|
package/dist/plugin-kit.d.ts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve the root a node's styles should live in.
|
|
3
|
-
*
|
|
4
|
-
* Returns the node's `ShadowRoot` when it (or an ancestor) is shadowed, the
|
|
5
|
-
* owning `Document` otherwise. A `<style>` placed in this root reaches the node
|
|
6
|
-
* regardless of whether the widget runs in light or shadow DOM. For a detached
|
|
7
|
-
* node (one not yet mounted) this falls back to the owning document.
|
|
8
|
-
*/
|
|
9
1
|
declare function getStyleRoot(node: Node): Document | ShadowRoot;
|
|
10
2
|
/**
|
|
11
3
|
* Inject a plugin's CSS once into the correct root: the widget's shadow root
|
package/dist/plugin-kit.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
var v=e=>e.nodeType===Node.DOCUMENT_NODE,N=e=>e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host!==void 0;function T(e){let t=e.getRootNode?.();return t&&N(t)||t&&v(t)?t:e.ownerDocument??document}function h(e,t,o){let i=v(e)?e.head:e,r=t.replace(/["\\]/g,"\\$&");if(i.querySelector(`style[data-persona-plugin-style="${r}"]`))return;let c=(v(e)?e:e.ownerDocument??document).createElement("style");c.setAttribute("data-persona-plugin-style",t),c.textContent=o,i.appendChild(c)}function S(e,t,o){if(v(e)||N(e)){h(e,t,o);return}let i=e;if(i.isConnected){h(T(i),t,o);return}let r=i.ownerDocument??document;h(r,t,o),queueMicrotask(()=>{let l=T(i);l!==r&&h(l,t,o)})}function P(e){let t=e.getRootNode?.();return t instanceof ShadowRoot?t:(e.ownerDocument??document).body}function C(e){let{anchor:t,content:o,placement:i="bottom-start",offset:r=6,matchAnchorWidth:l=!1,horizontalOffset:c,verticalOffset:b,zIndex:y=2147483e3,onOpen:O,onDismiss:x}=e,L=e.container??P(t),s=!1,m=null,w=()=>{if(!s)return;let n=t.getBoundingClientRect();o.style.position="fixed",l&&(o.style.minWidth=`${n.width}px`),c&&(o.style.maxWidth=`${n.width}px`);let a=o.getBoundingClientRect(),d=b?.()??null,f=d!=null?n.top+d:n.top,E=i==="top-start"||i==="top-end"?f-r-a.height:n.bottom+r,p=i==="bottom-end"||i==="top-end"?n.right-a.width:n.left,R=c?.()??null;if(R!=null){let M=Math.max(n.left,n.right-a.width);p=Math.min(Math.max(n.left+R,n.left),M)}o.style.top=`${E}px`,o.style.left=`${p}px`},u=()=>{s&&(s=!1,m&&(m(),m=null),o.remove())},D=()=>{if(s)return;s=!0,y!=null&&(o.style.zIndex=String(y)),L.appendChild(o),w();let n=(t.ownerDocument??document).defaultView??window,a=t.ownerDocument??document,d=()=>{if(!t.isConnected){u(),x?.("anchor-removed");return}w()},f=g=>{let p=typeof g.composedPath=="function"?g.composedPath():[];p.includes(o)||p.includes(t)||(u(),x?.("outside"))},E=n.setTimeout(()=>{a.addEventListener("pointerdown",f,!0)},0);n.addEventListener("scroll",d,!0),n.addEventListener("resize",d),m=()=>{n.clearTimeout(E),a.removeEventListener("pointerdown",f,!0),n.removeEventListener("scroll",d,!0),n.removeEventListener("resize",d)},O?.()};return{get isOpen(){return s},open:D,close:u,toggle:()=>s?u():D(),reposition:w,destroy:u}}function H(e){return(typeof e.composedPath=="function"?e.composedPath():[]).some(o=>o instanceof HTMLElement&&(o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.isContentEditable))}export{C as createPopover,T as getStyleRoot,S as injectStyles,H as isEditableEventTarget};
|