@maxhealth.tech/prefab 0.3.19 → 0.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ All notable changes to this project will be documented in this file.
6
6
 
7
7
  <!-- Add new entries directly below. Keep this line: it makes a release merge conflict rather than file them under a published version. -->
8
8
 
9
+ ## [0.3.20] — 2026-11-03
10
+
11
+ ### Fixed
12
+
13
+ - **A `Histogram` whose `data` holds no numbers shows `No data`** instead of an empty chart of zero-height bars.
14
+
15
+ ### Internal
16
+
17
+ - Renderer, theme and TDD regression tests use the typed helpers in `test/helpers/render.ts` instead of `as` casts and non-null assertions, and several tests that could not fail now assert real behaviour.
18
+
9
19
  ## [0.3.19] — 2026-11-01
10
20
 
11
21
  ### Fixed
package/dist/a2ui.min.js CHANGED
@@ -1 +1 @@
1
- (()=>{var{defineProperty:v,getOwnPropertyNames:se,getOwnPropertyDescriptor:ae}=Object,ue=Object.prototype.hasOwnProperty;function le(e){return this[e]}var de=(e)=>{var n=(R??=new WeakMap).get(e),t;if(n)return n;if(n=v({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var i of se(e))if(!ue.call(n,i))v(n,i,{get:le.bind(e,i),enumerable:!(t=ae(e,i))||t.enumerable})}return R.set(e,n),n},R;var ce=(e)=>e;function pe(e,n){this[e]=ce.bind(null,n)}var fe=(e,n)=>{for(var t in n)v(e,t,{get:n[t],enumerable:!0,configurable:!0,set:pe.bind(n,t)})};var He={};fe(He,{default:()=>qe,emit:()=>te,envelope:()=>ie});var E={silent:0,error:1,warn:2,info:3,debug:4},me="warn";function x(e){let n=e?`[prefab:${e}]`:"[prefab]",t=(i,r,o)=>{if(E[i]>E[me])return;console[i](`${n} ${r}`,...o)};return{error:(i,...r)=>t("error",i,r),warn:(i,...r)=>t("warn",i,r),info:(i,...r)=>t("info",i,r),debug:(i,...r)=>t("debug",i,r)}}var Ge=x();var ge=/^(.+?)\s*\|\s*([A-Za-z_][\w]*)\s*(?::\s*(.+))?$/;function N(e){let n=ge.exec(e);if(n==null)return;let t=n[1].trim();if(t.includes("|"))return;let i=n.at(3)?.trim();if(i===void 0)return{base:t,name:n[2]};let r=/^'([^']*)'$|^"([^"]*)"$/.exec(i);if(r!=null){let s=r.at(1)??r.at(2);return{base:t,name:n[2],arg:s??""}}let o=Number(i);if(!Number.isNaN(o))return{base:t,name:n[2],arg:o};return}function S(e,n){return(t)=>({call:{call:"formatDate",args:{value:t,format:e}},note:`the "${n}" pipe renders in the reader's locale; A2UI needs an explicit pattern, so "${e}" was used`})}var he={currency:(e,n)=>({call:{call:"formatCurrency",args:{value:e,currency:typeof n==="string"?n:"USD"}}}),number:(e,n)=>({call:{call:"formatNumber",args:{value:e,...typeof n==="number"&&{decimals:n}}}}),round:(e,n)=>({call:{call:"formatNumber",args:{value:e,decimals:typeof n==="number"?n:0}}}),pluralize:(e,n)=>{if(typeof n!=="string")return;return{call:{call:"pluralize",args:{value:e,one:n,other:`${n}s`}}}},date:S("y-MM-dd","date"),time:S("HH:mm","time"),datetime:S("y-MM-dd HH:mm","datetime")};function B(e,n){return he[e.name]?.(n,e.arg)}var ye=/^\s*\{\{\s*(.+?)\s*\}\}\s*$/s,Ae=/\{\{\s*(.+?)\s*\}\}/g,be=/^\$?[A-Za-z_][\w$]*(?:\.(?:[A-Za-z_$][\w$]*|\d+))*$/,U="$index";function c(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Ce(e){return"/"+e.map(c).join("/")}function ve(e){return e.startsWith("state.")?e.slice(6):e}function w(e,n){if(!be.test(e))return;let t=ve(e).split("."),i=t[0],r=Object.hasOwn(n,i)?n[i]:void 0;if(r===void 0){if(i.startsWith("$"))return;return Ce(t)}let o=t.slice(1);if(r==="")return o.length===0?void 0:o.map(c).join("/");return o.length===0?r:`${r}/${o.map(c).join("/")}`}function L(e){return e.replace(/\$\{/g,"\\${")}function xe(e,n){let t,i="",r=0;for(let o of e.matchAll(Ae)){let s=o[1].trim(),a=w(s,n);if(a==null){t=s;break}i+=L(e.slice(r,o.index)),i+=`\${${a}}`,r=o.index+o[0].length}if(t!=null)return;return i+=L(e.slice(r)),{call:"formatString",args:{value:i}}}function Se(e,n){let t=N(e);if(t==null)return;let i=w(t.base,n),r=i!=null?{path:i}:/^-?\d+(\.\d+)?$/.test(t.base)?Number(t.base):void 0;if(r===void 0)return;let o=B(t,r);if(o==null)return;return{kind:"format",value:o.call,...o.note!=null&&{note:o.note}}}function f(e,n={}){let t=ye.exec(e);if(t!=null&&!t[1].includes("{{")&&!t[1].includes("}}")){let o=t[1].trim();if(o===U&&U in n)return{kind:"index",value:{call:"@index"}};let s=w(o,n);if(s!=null)return{kind:"binding",value:{path:s}};let a=Se(o,n);if(a!=null)return a;return{kind:"unbindable",expression:o}}if(!e.includes("{{"))return{kind:"literal",value:e};let r=xe(e,n);if(r!=null)return{kind:"format",value:r};return{kind:"unbindable",expression:e}}function h(e,n={}){if(e==null)return;let t=f(e,n);switch(t.kind){case"literal":return t.value;case"binding":return t.value;case"format":return t.value;case"index":return t.value;default:return}}var we=["accountCircle","add","arrowBack","arrowForward","attachFile","calendarToday","call","camera","check","close","delete","download","edit","event","error","fastForward","favorite","favoriteOff","folder","help","home","info","locationOn","lock","lockOpen","mail","menu","moreVert","moreHoriz","notificationsOff","notifications","pause","payment","person","phone","photo","play","print","refresh","rewind","search","send","settings","share","shoppingCart","skipNext","skipPrevious","star","starHalf","starOff","stop","upload","visibility","visibilityOff","volumeDown","volumeMute","volumeOff","volumeUp","warning"],ke=new Map(we.map((e)=>[F(e),e])),Te={alertcircle:"error",alerttriangle:"warning",alertoctagon:"error",xcircle:"error",circlex:"error",circlealert:"error",checkcircle:"check",circlecheck:"check",checkcircle2:"check",infocircle:"info",circleinfo:"info",helpcircle:"help",circlehelp:"help",bell:"notifications",belloff:"notificationsOff",arrowleft:"arrowBack",arrowright:"arrowForward",chevronleft:"arrowBack",chevronright:"arrowForward",x:"close",plus:"add",trash:"delete",trash2:"delete",ellipsisvertical:"moreVert",ellipsis:"moreHoriz",morehorizontal:"moreHoriz",morevertical:"moreVert",pencil:"edit",pen:"edit",squarepen:"edit",user:"person",usercircle:"accountCircle",circleuser:"accountCircle",eye:"visibility",eyeoff:"visibilityOff",mappin:"locationOn",map:"locationOn",image:"photo",images:"photo",file:"folder",files:"folder",calendar:"calendarToday",calendardays:"calendarToday",clock:"event",creditcard:"payment",cart:"shoppingCart",shoppingbag:"shoppingCart",phonecall:"call",mailopen:"mail",inbox:"mail",cog:"settings",gear:"settings",sliders:"settings",rotatecw:"refresh",rotateccw:"refresh",refreshcw:"refresh",heart:"favorite",heartoff:"favoriteOff",volume:"volumeUp",volume1:"volumeDown",volume2:"volumeUp",volumex:"volumeOff",skipforward:"skipNext",skipback:"skipPrevious",paperclip:"attachFile",link:"share",share2:"share",magnifyingglass:"search",searchicon:"search"};function F(e){return e.replace(/[\s._-]/g,"").toLowerCase()}function _(e){let n=F(e);return ke.get(n)??Te[n]}function k(e,...n){for(let t of n){let i=e[t];if(typeof i==="string"||typeof i==="number"||typeof i==="boolean")return String(i)}return}function Oe(e){return e!=null&&typeof e==="object"&&!Array.isArray(e)}var T={ForEach:(e,n)=>{let t=k(e,"expression");if(t==null){n.note("unsupported","ForEach","no expression to iterate");return}let i=n.bind(t);if(i.kind!=="binding"){n.note("expression","ForEach",`"${t}" is not a plain path, so there is no list to bind`);return}let r=n.inScope({$item:"",$index:""},()=>n.single(e.children));if(r==null){n.note("unsupported","ForEach","the loop body had nothing to render");return}return{component:"Column",children:{path:i.value.path,componentId:r}}},Define:()=>{return},Use:(e,n)=>{let t=k(e,"def","name");if(t==null){n.note("unsupported","Use","no definition name");return}let i=n.definition(t);if(i==null){n.note("unsupported","Use",`no definition named "${t}" was declared`);return}let r=e.overrides,o={};if(r!=null&&typeof r==="object"&&!Array.isArray(r)){let g=n.bindData(`use_${t}`,r);for(let d of Object.keys(r))o[d]=`${g}/${c(d)}`}let s={...Oe(e.slots)?e.slots:{},...Array.isArray(e.children)&&e.children.length>0?{default:e.children}:{}},a=n.expand(t,()=>n.inScope(o,()=>n.withSlots(s,()=>n.single(i))));if(a==null){n.note("unsupported","Use",`definition "${t}" rendered nothing`);return}return{component:"Column",children:[a]}},Slot:(e,n)=>{let t=k(e,"name")??"default",i=n.slotContent(t)??(Array.isArray(e.children)?e.children:void 0),r=i!=null?n.single(i):void 0;if(r==null){n.note("unsupported","Slot",`slot "${t}" had neither content nor a fallback`);return}return{component:"Column",children:[r]}}};for(let e of["If","Elif","Else","Condition","Match","Case"])T[e]=(n,t)=>{t.note("unsupported",n.type,"A2UI has no declarative conditional; the agent re-sends updateComponents when the shape changes");return};var J=["TableHead","TableBody","TableFooter","TableRow","TableCell","TableHeader","ExpandableRow"];function De(e){if(!Array.isArray(e.columns))return[];let n=[];for(let t of e.columns){if(t==null||typeof t!=="object")continue;let i=t,r=typeof i.accessor==="string"?i.accessor:typeof i.key==="string"?i.key:void 0;if(r==null)continue;n.push({key:r,header:typeof i.header==="string"?i.header:r})}return n}function Me(e,n){let t=e.rows;if(typeof t==="string"){let i=f(t);if(i.kind==="binding")return i.value.path;n.note("expression","DataTable",`rows expression "${t}" is not a plain path; the table has no data source`);return}if(Array.isArray(t))return n.bindData("rows",t);n.note("unsupported","DataTable","no rows to render");return}function j(e,n){let t=De(e);if(t.length===0){n.note("unsupported","DataTable","no usable column definitions");return}let i=Me(e,n);if(i==null)return;let r=n.push({component:"Row",children:t.map((a)=>n.push({component:"Text",text:a.header,variant:"caption"})),align:"center"}),o=n.push({component:"Row",children:t.map((a)=>n.push({component:"Text",text:{path:a.key.split(".").join("/")}})),align:"center"}),s=n.push({component:"Column",children:{path:i,componentId:o}});if(e.search===!0||e.paginated===!0)n.note("degraded","DataTable","search and pagination dropped; A2UI Basic has no table controls");return{component:"Column",children:[r,s]}}function Ie(e){let n=[],t=(i)=>{if(i.type==="TableRow"||i.type==="ExpandableRow"){n.push(i);return}if(Array.isArray(i.children))for(let r of i.children)t(r)};if(Array.isArray(e.children))for(let i of e.children)t(i);return n}function Pe(e,n){let t=e.type==="TableHeader";if(Array.isArray(e.children)&&e.children.length>0)return n.single(e.children);let i=e.content??e.text??e.label;if(typeof i!=="string"&&typeof i!=="number"&&typeof i!=="boolean")return;let r=String(i),o=h(r);if(o==null){n.note("expression",e.type,`cell expression "${r}" has no A2UI equivalent`);return}return n.push({component:"Text",text:o,...t&&{variant:"caption"}})}function V(e,n){let t=Ie(e),i=[];for(let r of t){let s=(Array.isArray(r.children)?r.children:[]).map((a)=>Pe(a,n)).filter((a)=>a!=null);if(s.length===0)continue;i.push(n.push({component:"Row",children:s,align:"center"}))}if(i.length===0){n.note("unsupported","Table","no rows with renderable cells");return}return n.note("degraded","Table","rendered as a Column of Rows; column widths do not align"),{component:"Column",children:i}}function u(e,...n){for(let t of n){let i=e[t];if(typeof i==="string"||typeof i==="number"||typeof i==="boolean")return String(i)}return}function l(e,n,t){let i=u(e,...t?.keys??["content","text","label","title"]);if(i==null){n.note("unsupported",e.type,"no text content to render");return}let r=n.bind(i);if(r.kind==="unbindable")n.note("expression",e.type,`"${r.expression}" is richer than a JSON Pointer; the text was left as written`);let o=t?.prefix??"",s=t?.suffix??"";if(r.kind==="format"&&r.note!=null)n.note("degraded",e.type,r.note);if(r.kind==="binding"||r.kind==="format"||r.kind==="index"){if(o!==""||s!=="")n.note("degraded",e.type,"Markdown emphasis dropped: the text is a data binding");return{component:"Text",text:r.value,...t?.variant!=null&&{variant:t.variant}}}let a=r.kind==="literal"?r.value:i;return{component:"Text",text:`${o}${a}${s}`,...t?.variant!=null&&{variant:t.variant}}}var Re={start:"start",end:"end",center:"center",between:"spaceBetween",around:"spaceAround",evenly:"spaceEvenly",spaceBetween:"spaceBetween",spaceAround:"spaceAround",spaceEvenly:"spaceEvenly"},Ee={start:"start",end:"end",center:"center",stretch:"stretch",baseline:"baseline"};function y(e){return(n,t)=>{let i=t.children(n.children);if(i.length===0){t.note("unsupported",n.type,`${e} requires at least one child and none survived`);return}let r=typeof n.justify==="string"?Re[n.justify]:void 0,o=typeof n.align==="string"?Ee[n.align]:void 0;return{component:e,children:i,...r!=null&&{justify:r},...o!=null&&{align:o}}}}var Ne=["Div","Container","Stack","Grid","GridItem","Page","Pages","Dashboard","DashboardItem","MasterDetail","Detail","Form","Fieldset","CardContent","CardHeader","CardFooter","Accordion","Carousel","SelectGroup","ComboboxGroup","Section","Article","Aside","Header","Footer","Nav","Span"],Be=["ButtonGroup","Toolbar","Inline"],$e={H1:"# ",H2:"## ",H3:"### ",H4:"#### ",H5:"##### ",H6:"###### "},q={Heading:(e,n)=>{let t=typeof e.level==="number"?Math.min(6,Math.max(1,e.level)):1;return l(e,n,{prefix:`${"#".repeat(t)} `})},Text:(e,n)=>l(e,n),P:(e,n)=>l(e,n),Lead:(e,n)=>l(e,n),Large:(e,n)=>l(e,n),Small:(e,n)=>l(e,n,{variant:"caption"}),Muted:(e,n)=>l(e,n,{variant:"caption"}),Label:(e,n)=>l(e,n,{variant:"caption"}),TableCaption:(e,n)=>l(e,n,{variant:"caption"}),BlockQuote:(e,n)=>l(e,n,{prefix:"> "}),Code:(e,n)=>l(e,n,{prefix:"`",suffix:"`"}),Kbd:(e,n)=>l(e,n,{prefix:"`",suffix:"`"}),Markdown:(e,n)=>l(e,n),Badge:(e,n)=>l(e,n,{keys:["label","content"],variant:"caption"}),CardTitle:(e,n)=>l(e,n,{prefix:"**",suffix:"**"}),CardDescription:(e,n)=>l(e,n,{variant:"caption"}),Tooltip:(e,n)=>l(e,n,{variant:"caption"}),AlertTitle:(e,n)=>l(e,n,{prefix:"**",suffix:"**"}),AlertDescription:(e,n)=>l(e,n)};for(let[e,n]of Object.entries($e))q[e]=(t,i)=>l(t,i,{prefix:n});function O(e){return(n,t)=>{let i=t.dyn(u(n,"src","url"));if(i==null){t.note("unsupported",n.type,"no resolvable source URL");return}let r=e==="Video"?void 0:t.dyn(u(n,"alt","description")),o=e==="Video"?t.dyn(u(n,"poster","posterUrl")):void 0;return{component:e,url:i,...r!=null&&{description:r},...o!=null&&{posterUrl:o}}}}var Ue={text:"shortText",email:"shortText",url:"shortText",tel:"shortText",search:"shortText",password:"obscured",number:"number"};function m(e,n){let t=typeof e.name==="string"?e.name:void 0;if(t==null)return;let i=n.bind(`{{ ${t} }}`);return i.kind==="binding"?i.value:void 0}function P(e,n){let t=m(e,n);if(t==null)return;let i=[];if(e.required===!0)i.push({condition:{call:"required",args:{value:t}}});if(e.inputType==="email")i.push({condition:{call:"email",args:{value:t}}});return i.length>0?i:void 0}function Le(e,n){let t=Array.isArray(e.children)?e.children:[],i=[];for(let r of t){let o=u(r,"value");if(o==null){n.note("degraded",e.type,`dropped a ${r.type} child that carries no option value`);continue}i.push({label:u(r,"label")??o,value:o})}return i}function D(e,n,t){if(u(e,"label","name")==null)n.note("degraded",e.type,"no label available for the DateTimeInput");return{component:"DateTimeInput",value:m(e,n)??"",...t}}function M(e){return(n,t)=>{let i=t.dyn(u(n,"label","name"));if(i==null){t.note("unsupported",n.type,"ChoicePicker requires a label and none could be derived");return}let r=Le(n,t);if(r.length===0){t.note("unsupported",n.type,"no options to choose from");return}let o=m(n,t),s=P(n,t);return{component:"ChoicePicker",label:i,variant:e,options:r,...o!=null&&{value:o},...s!=null&&{checks:s}}}}function H(e,n,t){let i=n.dyn(u(e,"label","name"));if(i==null){n.note("unsupported",e.type,"TextField requires a label and none could be derived");return}let r=m(e,n),o=n.dyn(u(e,"placeholder")),s=P(e,n);return{component:"TextField",label:i,variant:t,...r!=null&&{value:r},...o!=null&&{placeholder:o},...s!=null&&{checks:s}}}var I={Input:(e,n)=>{let t=typeof e.inputType==="string"?e.inputType:"text",i=Ue[t];if(i==null)n.note("degraded",e.type,`inputType "${t}" has no A2UI variant; used shortText`);return H(e,n,i??"shortText")},Textarea:(e,n)=>H(e,n,"longText"),Checkbox:(e,n)=>{let t=n.dyn(u(e,"label","name"));if(t==null){n.note("unsupported",e.type,"CheckBox requires a label and none could be derived");return}let i=P(e,n);return{component:"CheckBox",label:t,value:m(e,n)??!1,...i!=null&&{checks:i}}},Slider:(e,n)=>{let t=typeof e.max==="number"?e.max:void 0;if(t==null){n.note("unsupported",e.type,"Slider requires a max and prefab left it open");return}let i=n.dyn(u(e,"label","name")),r=typeof e.min==="number"?e.min:void 0,o=typeof e.step==="number"?e.step:void 0,s=o!=null&&o>0?Math.max(1,Math.round((t-(r??0))/o)):void 0;return{component:"Slider",max:t,value:m(e,n)??r??0,...i!=null&&{label:i},...r!=null&&{min:r},...s!=null&&{steps:s}}},Button:(e,n)=>{let t=u(e,"label","content")??"Button",i=n.action(e.onClick,"Button")??(e.submit===!0?{event:{name:"submit"}}:void 0);if(i==null){n.note("unsupported",e.type,"Button requires an action and none could be derived");return}let r=n.push({component:"Text",text:n.dyn(t)??t}),o=e.variant==="link"||e.variant==="ghost"?"borderless":e.variant==="default"?"primary":"default";return{component:"Button",child:r,action:i,variant:o}},Link:(e,n)=>{let t=u(e,"href","url");if(t==null){n.note("unsupported",e.type,"no href to open");return}let i=u(e,"content","label")??t;return{component:"Button",child:n.push({component:"Text",text:n.dyn(i)??i}),variant:"borderless",action:{functionCall:{call:"openUrl",args:{url:t}}}}},DatePicker:(e,n)=>D(e,n,{enableDate:!0}),TimePicker:(e,n)=>D(e,n,{enableTime:!0}),DateTimePicker:(e,n)=>D(e,n,{enableDate:!0,enableTime:!0}),Select:(e,n)=>M(e.multiple===!0?"multipleSelection":"mutuallyExclusive")(e,n),RadioGroup:M("mutuallyExclusive"),Combobox:M("mutuallyExclusive")};I.Switch=I.Checkbox;var Fe={Card:(e,n)=>{let t=n.single(e.children);if(t==null){n.note("unsupported","Card","Card requires a child and it had none");return}return{component:"Card",child:t}},Alert:(e,n)=>{let t=n.single(e.children);if(t==null){n.note("unsupported","Alert","no alert body to render");return}let i=typeof e.variant==="string"?e.variant:"default";return n.note("degraded","Alert",`variant "${i}" rendered as a plain Card`),{component:"Card",child:t}},Separator:()=>({component:"Divider"}),Divider:()=>({component:"Divider"}),Icon:(e,n)=>{let t=u(e,"name","icon");if(t==null){n.note("unsupported","Icon","no icon name");return}let i=_(t);if(i==null){n.note("unsupported","Icon",`"${t}" has no equivalent in the A2UI icon set`);return}if(i!==t)n.note("degraded","Icon",`"${t}" mapped to the A2UI icon "${i}"`);return{component:"Icon",name:i}},Metric:(e,n)=>{let t=[],i=u(e,"label","title");if(i!=null)t.push(n.push({component:"Text",text:n.dyn(i)??i,variant:"caption"}));let r=u(e,"value");if(r!=null)t.push(n.push({component:"Text",text:n.dyn(r)??r}));if(t.length===0){n.note("unsupported","Metric","neither a label nor a value to render");return}return n.note("degraded","Metric","rendered as a Column of Text; trend and delta styling dropped"),{component:"Column",children:t}},Tabs:(e,n)=>{let t=Array.isArray(e.children)?e.children:[],i=[];for(let r of t){let o=n.single(r.children);if(o==null)continue;i.push({title:u(r,"title")??"Tab",child:o})}if(i.length===0){n.note("unsupported","Tabs","no tab had renderable content");return}return{component:"Tabs",tabs:i}},Dialog:(e,n)=>{let t=n.single(e.children);if(t==null){n.note("unsupported","Dialog","no dialog body to render");return}let i=e.trigger,r=i!=null?u(i,"label","content")??u(e,"title")??"Open":u(e,"title")??"Open";return{component:"Modal",trigger:(i!=null?n.child(i):void 0)??n.push({component:"Text",text:n.dyn(r)??r}),content:t}},AccordionItem:(e,n)=>{let t=[],i=u(e,"title");if(i!=null)t.push(n.push({component:"Text",text:i,variant:"caption"}));if(t.push(...n.children(e.children)),t.length===0){n.note("unsupported","AccordionItem","nothing to render");return}return n.note("degraded","AccordionItem","rendered expanded; A2UI Basic has no disclosure component"),{component:"Column",children:t}}},A={Column:y("Column"),Row:y("Row"),...q,...I,...Fe,...T,Image:O("Image"),Video:O("Video"),Audio:O("AudioPlayer"),Table:V,DataTable:j};for(let e of Ne)A[e]??=y("Column");for(let e of Be)A[e]??=y("Row");var _e=new Set(["Tab","SelectOption","ComboboxOption","Radio","Option",...J]),Je={LineChart:"charts",BarChart:"charts",AreaChart:"charts",PieChart:"charts",ScatterChart:"charts",RadarChart:"charts",RadialChart:"charts",Histogram:"charts",Sparkline:"charts",Svg:"inline vector graphics",Mermaid:"diagrams",Embed:"embedded frames",DropZone:"file uploads",Ring:"progress rings",Loader:"loading indicators",Progress:"progress bars"};function z(e){return A[e]}function G(e){return _e.has(e)}function W(){return Object.keys(A).sort()}function K(e,n){let t=Je[e.type];if(t!=null){n.note("unsupported",e.type,`${t} are outside the A2UI Basic catalog`);return}if(Array.isArray(e.children)&&e.children.length>0){let i=n.children(e.children);if(i.length>0)return n.note("degraded",e.type,"no Basic-catalog equivalent; flattened to a Column"),{component:"Column",children:i}}if(u(e,"content","text","label","title")!=null)return n.note("degraded",e.type,"no Basic-catalog equivalent; rendered as Text"),l(e,n);n.note("unsupported",e.type,"no Basic-catalog equivalent and nothing to render");return}var p="v1.0",b="https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json",Y="application/a2ui+json",X="a2ui://",C="root";var je=x("a2ui");function Ve(e){let n=e.children;if(e.type==="Div"&&typeof e.cssClass==="string"&&e.cssClass.startsWith("pf-app-root")&&Array.isArray(n)&&n.length===1)return n[0];return e}function Z(e,n){if(e.type==="Define"){let t=typeof e.name==="string"?e.name:void 0;if(t!=null&&Array.isArray(e.children))n.set(t,e.children)}if(Array.isArray(e.children))for(let t of e.children)Z(t,n)}class Q{warn;components=new Map;dataModel=new Map;used=new Set([C]);diagnostics=[];definitions=new Map;counter=0;scope={};slots={};expanding=new Set;constructor(e){this.warn=e}bind(e){return f(e,this.scope)}dyn(e){return h(e,this.scope)}inScope(e,n){let t=this.scope;this.scope={...t,...e};try{return n()}finally{this.scope=t}}withSlots(e,n){let t=this.slots;this.slots={...t,...e};try{return n()}finally{this.slots=t}}slotContent(e){return this.slots[e]}definition(e){if(this.expanding.has(e)){this.note("unsupported","Use",`definition "${e}" uses itself; A2UI has no recursive template`);return}return this.definitions.get(e)}expand(e,n){this.expanding.add(e);try{return n()}finally{this.expanding.delete(e)}}note(e,n,t){if(this.diagnostics.push({kind:e,subject:n,detail:t}),this.warn)je.warn(`${e}: ${n} — ${t}`)}allocate(e){let n=typeof e?.id==="string"&&e.id.length>0?e.id:void 0;if(n!=null&&!this.used.has(n))return this.used.add(n),n;let t;do this.counter+=1,t=`c${this.counter}`;while(this.used.has(t));return this.used.add(t),t}push(e){let n=this.allocate();return this.components.set(n,{id:n,...e}),n}bindData(e,n){let t=e,i=0;while(this.dataModel.has(t))i+=1,t=`${e}${i}`;return this.dataModel.set(t,n),`/${c(t)}`}child(e){return this.emit(e,!1)}children(e){if(!Array.isArray(e))return[];let n=[];for(let t of e){if(t==null||typeof t!=="object")continue;let i=this.emit(t,!1);if(i!=null)n.push(i)}return n}single(e){let n=this.children(e);if(n.length===0)return;if(n.length===1)return n[0];return this.push({component:"Column",children:n})}action(e,n){if(e==null)return;if(Array.isArray(e)){if(e.length===0)return;if(e.length>1)this.note("action",n,`${e.length} actions were bound; A2UI carries one, so the rest were dropped`);return this.action(e[0],n)}if(typeof e!=="object")return;let t=e,i=typeof t.action==="string"?t.action:void 0;if(i==null)return;switch(i){case"toolCall":case"callTool":{let r=typeof t.tool==="string"?t.tool:void 0;if(r==null)return;let o=this.eventContext(t.arguments,n);return{event:{name:r,...o!=null&&{context:o}}}}case"sendMessage":return{event:{name:"sendMessage",context:{message:typeof t.message==="string"?t.message:""}}};case"openLink":{let r=typeof t.url==="string"?t.url:typeof t.href==="string"?t.href:void 0;if(r==null)return;return{functionCall:{call:"openUrl",args:{url:r}}}}default:{this.note("action",n,`"${i}" has no renderer-side equivalent; emitted as an agent event`);let{action:r,...o}=t,s=this.eventContext(o,n);return{event:{name:i,...s!=null&&{context:s}}}}}}eventContext(e,n){if(e==null||typeof e!=="object"||Array.isArray(e))return;let t={};for(let[i,r]of Object.entries(e)){if(typeof r==="number"||typeof r==="boolean"||r===null){t[i]=r;continue}if(typeof r!=="string"){this.note("action",n,`argument "${i}" is not a scalar and was dropped from the event context`);continue}let o=f(r);if(o.kind==="unbindable"){this.note("action",n,`argument "${i}" uses "${o.expression}", which A2UI cannot bind; it was dropped`);continue}t[i]=o.kind==="binding"?o.value:o.value}return Object.keys(t).length>0?t:void 0}rollback(e,n){let t=[...this.components.keys()];for(let r=e;r<t.length;r++)if(this.components.delete(t[r]),t[r]!==C)this.used.delete(t[r]);let i=[...this.dataModel.keys()];for(let r=n;r<i.length;r++)this.dataModel.delete(i[r])}emit(e,n){if(typeof e.type!=="string")return;if(G(e.type)){this.note("unsupported",e.type,"only meaningful inside its parent; emitted standalone it has no meaning");return}let t=this.components.size,i=this.dataModel.size,r=n?C:this.allocate(e);this.components.set(r,void 0);let s=(z(e.type)??K)(e,this);if(s==null){this.rollback(t,i);return}return this.components.set(r,{id:r,...s}),r}finish(e,n){let t=n.surfaceId??"prefab";for(let[d,oe]of Object.entries(e.defs??{}))this.definitions.set(d,[oe]);if(Z(e.view,this.definitions),this.emit(Ve(e.view),!0)==null)this.note("unsupported","view","nothing in the view could be expressed in A2UI; the surface is empty");let r=[];for(let d of this.components.values())if(d!=null)r.push(d);let o={...Object.fromEntries(this.dataModel),...e.state??{}},s=Object.keys(o).length>0,a=[],g=n.catalogId??b;if(n.stream===!0){if(a.push({version:p,createSurface:{surfaceId:t,catalogId:g,...n.sendDataModel===!0&&{sendDataModel:!0}}}),r.length>0)a.push({version:p,updateComponents:{surfaceId:t,components:r}});if(s)a.push({version:p,updateDataModel:{surfaceId:t,value:o}})}else a.push({version:p,createSurface:{surfaceId:t,catalogId:g,...n.sendDataModel===!0&&{sendDataModel:!0},...r.length>0&&{components:r},...s&&{dataModel:o}}});return{messages:a,diagnostics:this.diagnostics}}}function ee(e,n){let t=n??{};return new Q(t.warn===!0).finish(e,t)}var ne="0.3.19";function te(e,n){if(e==null||typeof e!=="object"||!("view"in e))throw TypeError('PrefabA2UI.emit: expected a $prefab payload with a "view"');return ee(e,n)}function ie(e){return{messages:e}}var re={emit:te,envelope:ie,mappedTypes:W,VERSION:ne,A2UI_VERSION:p,A2UI_BASIC_CATALOG:b,A2UI_MIME:Y,A2UI_SCHEME:X},qe=re;if(typeof window<"u")Object.assign(window,{PrefabA2UI:re});})();
1
+ (()=>{var{defineProperty:v,getOwnPropertyNames:se,getOwnPropertyDescriptor:ae}=Object,ue=Object.prototype.hasOwnProperty;function le(e){return this[e]}var de=(e)=>{var n=(R??=new WeakMap).get(e),t;if(n)return n;if(n=v({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var i of se(e))if(!ue.call(n,i))v(n,i,{get:le.bind(e,i),enumerable:!(t=ae(e,i))||t.enumerable})}return R.set(e,n),n},R;var ce=(e)=>e;function pe(e,n){this[e]=ce.bind(null,n)}var fe=(e,n)=>{for(var t in n)v(e,t,{get:n[t],enumerable:!0,configurable:!0,set:pe.bind(n,t)})};var He={};fe(He,{default:()=>qe,emit:()=>te,envelope:()=>ie});var E={silent:0,error:1,warn:2,info:3,debug:4},me="warn";function x(e){let n=e?`[prefab:${e}]`:"[prefab]",t=(i,r,o)=>{if(E[i]>E[me])return;console[i](`${n} ${r}`,...o)};return{error:(i,...r)=>t("error",i,r),warn:(i,...r)=>t("warn",i,r),info:(i,...r)=>t("info",i,r),debug:(i,...r)=>t("debug",i,r)}}var Ge=x();var ge=/^(.+?)\s*\|\s*([A-Za-z_][\w]*)\s*(?::\s*(.+))?$/;function N(e){let n=ge.exec(e);if(n==null)return;let t=n[1].trim();if(t.includes("|"))return;let i=n.at(3)?.trim();if(i===void 0)return{base:t,name:n[2]};let r=/^'([^']*)'$|^"([^"]*)"$/.exec(i);if(r!=null){let s=r.at(1)??r.at(2);return{base:t,name:n[2],arg:s??""}}let o=Number(i);if(!Number.isNaN(o))return{base:t,name:n[2],arg:o};return}function S(e,n){return(t)=>({call:{call:"formatDate",args:{value:t,format:e}},note:`the "${n}" pipe renders in the reader's locale; A2UI needs an explicit pattern, so "${e}" was used`})}var he={currency:(e,n)=>({call:{call:"formatCurrency",args:{value:e,currency:typeof n==="string"?n:"USD"}}}),number:(e,n)=>({call:{call:"formatNumber",args:{value:e,...typeof n==="number"&&{decimals:n}}}}),round:(e,n)=>({call:{call:"formatNumber",args:{value:e,decimals:typeof n==="number"?n:0}}}),pluralize:(e,n)=>{if(typeof n!=="string")return;return{call:{call:"pluralize",args:{value:e,one:n,other:`${n}s`}}}},date:S("y-MM-dd","date"),time:S("HH:mm","time"),datetime:S("y-MM-dd HH:mm","datetime")};function B(e,n){return he[e.name]?.(n,e.arg)}var ye=/^\s*\{\{\s*(.+?)\s*\}\}\s*$/s,Ae=/\{\{\s*(.+?)\s*\}\}/g,be=/^\$?[A-Za-z_][\w$]*(?:\.(?:[A-Za-z_$][\w$]*|\d+))*$/,U="$index";function c(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Ce(e){return"/"+e.map(c).join("/")}function ve(e){return e.startsWith("state.")?e.slice(6):e}function w(e,n){if(!be.test(e))return;let t=ve(e).split("."),i=t[0],r=Object.hasOwn(n,i)?n[i]:void 0;if(r===void 0){if(i.startsWith("$"))return;return Ce(t)}let o=t.slice(1);if(r==="")return o.length===0?void 0:o.map(c).join("/");return o.length===0?r:`${r}/${o.map(c).join("/")}`}function L(e){return e.replace(/\$\{/g,"\\${")}function xe(e,n){let t,i="",r=0;for(let o of e.matchAll(Ae)){let s=o[1].trim(),a=w(s,n);if(a==null){t=s;break}i+=L(e.slice(r,o.index)),i+=`\${${a}}`,r=o.index+o[0].length}if(t!=null)return;return i+=L(e.slice(r)),{call:"formatString",args:{value:i}}}function Se(e,n){let t=N(e);if(t==null)return;let i=w(t.base,n),r=i!=null?{path:i}:/^-?\d+(\.\d+)?$/.test(t.base)?Number(t.base):void 0;if(r===void 0)return;let o=B(t,r);if(o==null)return;return{kind:"format",value:o.call,...o.note!=null&&{note:o.note}}}function f(e,n={}){let t=ye.exec(e);if(t!=null&&!t[1].includes("{{")&&!t[1].includes("}}")){let o=t[1].trim();if(o===U&&U in n)return{kind:"index",value:{call:"@index"}};let s=w(o,n);if(s!=null)return{kind:"binding",value:{path:s}};let a=Se(o,n);if(a!=null)return a;return{kind:"unbindable",expression:o}}if(!e.includes("{{"))return{kind:"literal",value:e};let r=xe(e,n);if(r!=null)return{kind:"format",value:r};return{kind:"unbindable",expression:e}}function h(e,n={}){if(e==null)return;let t=f(e,n);switch(t.kind){case"literal":return t.value;case"binding":return t.value;case"format":return t.value;case"index":return t.value;default:return}}var we=["accountCircle","add","arrowBack","arrowForward","attachFile","calendarToday","call","camera","check","close","delete","download","edit","event","error","fastForward","favorite","favoriteOff","folder","help","home","info","locationOn","lock","lockOpen","mail","menu","moreVert","moreHoriz","notificationsOff","notifications","pause","payment","person","phone","photo","play","print","refresh","rewind","search","send","settings","share","shoppingCart","skipNext","skipPrevious","star","starHalf","starOff","stop","upload","visibility","visibilityOff","volumeDown","volumeMute","volumeOff","volumeUp","warning"],ke=new Map(we.map((e)=>[F(e),e])),Te={alertcircle:"error",alerttriangle:"warning",alertoctagon:"error",xcircle:"error",circlex:"error",circlealert:"error",checkcircle:"check",circlecheck:"check",checkcircle2:"check",infocircle:"info",circleinfo:"info",helpcircle:"help",circlehelp:"help",bell:"notifications",belloff:"notificationsOff",arrowleft:"arrowBack",arrowright:"arrowForward",chevronleft:"arrowBack",chevronright:"arrowForward",x:"close",plus:"add",trash:"delete",trash2:"delete",ellipsisvertical:"moreVert",ellipsis:"moreHoriz",morehorizontal:"moreHoriz",morevertical:"moreVert",pencil:"edit",pen:"edit",squarepen:"edit",user:"person",usercircle:"accountCircle",circleuser:"accountCircle",eye:"visibility",eyeoff:"visibilityOff",mappin:"locationOn",map:"locationOn",image:"photo",images:"photo",file:"folder",files:"folder",calendar:"calendarToday",calendardays:"calendarToday",clock:"event",creditcard:"payment",cart:"shoppingCart",shoppingbag:"shoppingCart",phonecall:"call",mailopen:"mail",inbox:"mail",cog:"settings",gear:"settings",sliders:"settings",rotatecw:"refresh",rotateccw:"refresh",refreshcw:"refresh",heart:"favorite",heartoff:"favoriteOff",volume:"volumeUp",volume1:"volumeDown",volume2:"volumeUp",volumex:"volumeOff",skipforward:"skipNext",skipback:"skipPrevious",paperclip:"attachFile",link:"share",share2:"share",magnifyingglass:"search",searchicon:"search"};function F(e){return e.replace(/[\s._-]/g,"").toLowerCase()}function _(e){let n=F(e);return ke.get(n)??Te[n]}function k(e,...n){for(let t of n){let i=e[t];if(typeof i==="string"||typeof i==="number"||typeof i==="boolean")return String(i)}return}function Oe(e){return e!=null&&typeof e==="object"&&!Array.isArray(e)}var T={ForEach:(e,n)=>{let t=k(e,"expression");if(t==null){n.note("unsupported","ForEach","no expression to iterate");return}let i=n.bind(t);if(i.kind!=="binding"){n.note("expression","ForEach",`"${t}" is not a plain path, so there is no list to bind`);return}let r=n.inScope({$item:"",$index:""},()=>n.single(e.children));if(r==null){n.note("unsupported","ForEach","the loop body had nothing to render");return}return{component:"Column",children:{path:i.value.path,componentId:r}}},Define:()=>{return},Use:(e,n)=>{let t=k(e,"def","name");if(t==null){n.note("unsupported","Use","no definition name");return}let i=n.definition(t);if(i==null){n.note("unsupported","Use",`no definition named "${t}" was declared`);return}let r=e.overrides,o={};if(r!=null&&typeof r==="object"&&!Array.isArray(r)){let g=n.bindData(`use_${t}`,r);for(let d of Object.keys(r))o[d]=`${g}/${c(d)}`}let s={...Oe(e.slots)?e.slots:{},...Array.isArray(e.children)&&e.children.length>0?{default:e.children}:{}},a=n.expand(t,()=>n.inScope(o,()=>n.withSlots(s,()=>n.single(i))));if(a==null){n.note("unsupported","Use",`definition "${t}" rendered nothing`);return}return{component:"Column",children:[a]}},Slot:(e,n)=>{let t=k(e,"name")??"default",i=n.slotContent(t)??(Array.isArray(e.children)?e.children:void 0),r=i!=null?n.single(i):void 0;if(r==null){n.note("unsupported","Slot",`slot "${t}" had neither content nor a fallback`);return}return{component:"Column",children:[r]}}};for(let e of["If","Elif","Else","Condition","Match","Case"])T[e]=(n,t)=>{t.note("unsupported",n.type,"A2UI has no declarative conditional; the agent re-sends updateComponents when the shape changes");return};var J=["TableHead","TableBody","TableFooter","TableRow","TableCell","TableHeader","ExpandableRow"];function De(e){if(!Array.isArray(e.columns))return[];let n=[];for(let t of e.columns){if(t==null||typeof t!=="object")continue;let i=t,r=typeof i.accessor==="string"?i.accessor:typeof i.key==="string"?i.key:void 0;if(r==null)continue;n.push({key:r,header:typeof i.header==="string"?i.header:r})}return n}function Me(e,n){let t=e.rows;if(typeof t==="string"){let i=f(t);if(i.kind==="binding")return i.value.path;n.note("expression","DataTable",`rows expression "${t}" is not a plain path; the table has no data source`);return}if(Array.isArray(t))return n.bindData("rows",t);n.note("unsupported","DataTable","no rows to render");return}function j(e,n){let t=De(e);if(t.length===0){n.note("unsupported","DataTable","no usable column definitions");return}let i=Me(e,n);if(i==null)return;let r=n.push({component:"Row",children:t.map((a)=>n.push({component:"Text",text:a.header,variant:"caption"})),align:"center"}),o=n.push({component:"Row",children:t.map((a)=>n.push({component:"Text",text:{path:a.key.split(".").join("/")}})),align:"center"}),s=n.push({component:"Column",children:{path:i,componentId:o}});if(e.search===!0||e.paginated===!0)n.note("degraded","DataTable","search and pagination dropped; A2UI Basic has no table controls");return{component:"Column",children:[r,s]}}function Ie(e){let n=[],t=(i)=>{if(i.type==="TableRow"||i.type==="ExpandableRow"){n.push(i);return}if(Array.isArray(i.children))for(let r of i.children)t(r)};if(Array.isArray(e.children))for(let i of e.children)t(i);return n}function Pe(e,n){let t=e.type==="TableHeader";if(Array.isArray(e.children)&&e.children.length>0)return n.single(e.children);let i=e.content??e.text??e.label;if(typeof i!=="string"&&typeof i!=="number"&&typeof i!=="boolean")return;let r=String(i),o=h(r);if(o==null){n.note("expression",e.type,`cell expression "${r}" has no A2UI equivalent`);return}return n.push({component:"Text",text:o,...t&&{variant:"caption"}})}function V(e,n){let t=Ie(e),i=[];for(let r of t){let s=(Array.isArray(r.children)?r.children:[]).map((a)=>Pe(a,n)).filter((a)=>a!=null);if(s.length===0)continue;i.push(n.push({component:"Row",children:s,align:"center"}))}if(i.length===0){n.note("unsupported","Table","no rows with renderable cells");return}return n.note("degraded","Table","rendered as a Column of Rows; column widths do not align"),{component:"Column",children:i}}function u(e,...n){for(let t of n){let i=e[t];if(typeof i==="string"||typeof i==="number"||typeof i==="boolean")return String(i)}return}function l(e,n,t){let i=u(e,...t?.keys??["content","text","label","title"]);if(i==null){n.note("unsupported",e.type,"no text content to render");return}let r=n.bind(i);if(r.kind==="unbindable")n.note("expression",e.type,`"${r.expression}" is richer than a JSON Pointer; the text was left as written`);let o=t?.prefix??"",s=t?.suffix??"";if(r.kind==="format"&&r.note!=null)n.note("degraded",e.type,r.note);if(r.kind==="binding"||r.kind==="format"||r.kind==="index"){if(o!==""||s!=="")n.note("degraded",e.type,"Markdown emphasis dropped: the text is a data binding");return{component:"Text",text:r.value,...t?.variant!=null&&{variant:t.variant}}}let a=r.kind==="literal"?r.value:i;return{component:"Text",text:`${o}${a}${s}`,...t?.variant!=null&&{variant:t.variant}}}var Re={start:"start",end:"end",center:"center",between:"spaceBetween",around:"spaceAround",evenly:"spaceEvenly",spaceBetween:"spaceBetween",spaceAround:"spaceAround",spaceEvenly:"spaceEvenly"},Ee={start:"start",end:"end",center:"center",stretch:"stretch",baseline:"baseline"};function y(e){return(n,t)=>{let i=t.children(n.children);if(i.length===0){t.note("unsupported",n.type,`${e} requires at least one child and none survived`);return}let r=typeof n.justify==="string"?Re[n.justify]:void 0,o=typeof n.align==="string"?Ee[n.align]:void 0;return{component:e,children:i,...r!=null&&{justify:r},...o!=null&&{align:o}}}}var Ne=["Div","Container","Stack","Grid","GridItem","Page","Pages","Dashboard","DashboardItem","MasterDetail","Detail","Form","Fieldset","CardContent","CardHeader","CardFooter","Accordion","Carousel","SelectGroup","ComboboxGroup","Section","Article","Aside","Header","Footer","Nav","Span"],Be=["ButtonGroup","Toolbar","Inline"],$e={H1:"# ",H2:"## ",H3:"### ",H4:"#### ",H5:"##### ",H6:"###### "},q={Heading:(e,n)=>{let t=typeof e.level==="number"?Math.min(6,Math.max(1,e.level)):1;return l(e,n,{prefix:`${"#".repeat(t)} `})},Text:(e,n)=>l(e,n),P:(e,n)=>l(e,n),Lead:(e,n)=>l(e,n),Large:(e,n)=>l(e,n),Small:(e,n)=>l(e,n,{variant:"caption"}),Muted:(e,n)=>l(e,n,{variant:"caption"}),Label:(e,n)=>l(e,n,{variant:"caption"}),TableCaption:(e,n)=>l(e,n,{variant:"caption"}),BlockQuote:(e,n)=>l(e,n,{prefix:"> "}),Code:(e,n)=>l(e,n,{prefix:"`",suffix:"`"}),Kbd:(e,n)=>l(e,n,{prefix:"`",suffix:"`"}),Markdown:(e,n)=>l(e,n),Badge:(e,n)=>l(e,n,{keys:["label","content"],variant:"caption"}),CardTitle:(e,n)=>l(e,n,{prefix:"**",suffix:"**"}),CardDescription:(e,n)=>l(e,n,{variant:"caption"}),Tooltip:(e,n)=>l(e,n,{variant:"caption"}),AlertTitle:(e,n)=>l(e,n,{prefix:"**",suffix:"**"}),AlertDescription:(e,n)=>l(e,n)};for(let[e,n]of Object.entries($e))q[e]=(t,i)=>l(t,i,{prefix:n});function O(e){return(n,t)=>{let i=t.dyn(u(n,"src","url"));if(i==null){t.note("unsupported",n.type,"no resolvable source URL");return}let r=e==="Video"?void 0:t.dyn(u(n,"alt","description")),o=e==="Video"?t.dyn(u(n,"poster","posterUrl")):void 0;return{component:e,url:i,...r!=null&&{description:r},...o!=null&&{posterUrl:o}}}}var Ue={text:"shortText",email:"shortText",url:"shortText",tel:"shortText",search:"shortText",password:"obscured",number:"number"};function m(e,n){let t=typeof e.name==="string"?e.name:void 0;if(t==null)return;let i=n.bind(`{{ ${t} }}`);return i.kind==="binding"?i.value:void 0}function P(e,n){let t=m(e,n);if(t==null)return;let i=[];if(e.required===!0)i.push({condition:{call:"required",args:{value:t}}});if(e.inputType==="email")i.push({condition:{call:"email",args:{value:t}}});return i.length>0?i:void 0}function Le(e,n){let t=Array.isArray(e.children)?e.children:[],i=[];for(let r of t){let o=u(r,"value");if(o==null){n.note("degraded",e.type,`dropped a ${r.type} child that carries no option value`);continue}i.push({label:u(r,"label")??o,value:o})}return i}function D(e,n,t){if(u(e,"label","name")==null)n.note("degraded",e.type,"no label available for the DateTimeInput");return{component:"DateTimeInput",value:m(e,n)??"",...t}}function M(e){return(n,t)=>{let i=t.dyn(u(n,"label","name"));if(i==null){t.note("unsupported",n.type,"ChoicePicker requires a label and none could be derived");return}let r=Le(n,t);if(r.length===0){t.note("unsupported",n.type,"no options to choose from");return}let o=m(n,t),s=P(n,t);return{component:"ChoicePicker",label:i,variant:e,options:r,...o!=null&&{value:o},...s!=null&&{checks:s}}}}function H(e,n,t){let i=n.dyn(u(e,"label","name"));if(i==null){n.note("unsupported",e.type,"TextField requires a label and none could be derived");return}let r=m(e,n),o=n.dyn(u(e,"placeholder")),s=P(e,n);return{component:"TextField",label:i,variant:t,...r!=null&&{value:r},...o!=null&&{placeholder:o},...s!=null&&{checks:s}}}var I={Input:(e,n)=>{let t=typeof e.inputType==="string"?e.inputType:"text",i=Ue[t];if(i==null)n.note("degraded",e.type,`inputType "${t}" has no A2UI variant; used shortText`);return H(e,n,i??"shortText")},Textarea:(e,n)=>H(e,n,"longText"),Checkbox:(e,n)=>{let t=n.dyn(u(e,"label","name"));if(t==null){n.note("unsupported",e.type,"CheckBox requires a label and none could be derived");return}let i=P(e,n);return{component:"CheckBox",label:t,value:m(e,n)??!1,...i!=null&&{checks:i}}},Slider:(e,n)=>{let t=typeof e.max==="number"?e.max:void 0;if(t==null){n.note("unsupported",e.type,"Slider requires a max and prefab left it open");return}let i=n.dyn(u(e,"label","name")),r=typeof e.min==="number"?e.min:void 0,o=typeof e.step==="number"?e.step:void 0,s=o!=null&&o>0?Math.max(1,Math.round((t-(r??0))/o)):void 0;return{component:"Slider",max:t,value:m(e,n)??r??0,...i!=null&&{label:i},...r!=null&&{min:r},...s!=null&&{steps:s}}},Button:(e,n)=>{let t=u(e,"label","content")??"Button",i=n.action(e.onClick,"Button")??(e.submit===!0?{event:{name:"submit"}}:void 0);if(i==null){n.note("unsupported",e.type,"Button requires an action and none could be derived");return}let r=n.push({component:"Text",text:n.dyn(t)??t}),o=e.variant==="link"||e.variant==="ghost"?"borderless":e.variant==="default"?"primary":"default";return{component:"Button",child:r,action:i,variant:o}},Link:(e,n)=>{let t=u(e,"href","url");if(t==null){n.note("unsupported",e.type,"no href to open");return}let i=u(e,"content","label")??t;return{component:"Button",child:n.push({component:"Text",text:n.dyn(i)??i}),variant:"borderless",action:{functionCall:{call:"openUrl",args:{url:t}}}}},DatePicker:(e,n)=>D(e,n,{enableDate:!0}),TimePicker:(e,n)=>D(e,n,{enableTime:!0}),DateTimePicker:(e,n)=>D(e,n,{enableDate:!0,enableTime:!0}),Select:(e,n)=>M(e.multiple===!0?"multipleSelection":"mutuallyExclusive")(e,n),RadioGroup:M("mutuallyExclusive"),Combobox:M("mutuallyExclusive")};I.Switch=I.Checkbox;var Fe={Card:(e,n)=>{let t=n.single(e.children);if(t==null){n.note("unsupported","Card","Card requires a child and it had none");return}return{component:"Card",child:t}},Alert:(e,n)=>{let t=n.single(e.children);if(t==null){n.note("unsupported","Alert","no alert body to render");return}let i=typeof e.variant==="string"?e.variant:"default";return n.note("degraded","Alert",`variant "${i}" rendered as a plain Card`),{component:"Card",child:t}},Separator:()=>({component:"Divider"}),Divider:()=>({component:"Divider"}),Icon:(e,n)=>{let t=u(e,"name","icon");if(t==null){n.note("unsupported","Icon","no icon name");return}let i=_(t);if(i==null){n.note("unsupported","Icon",`"${t}" has no equivalent in the A2UI icon set`);return}if(i!==t)n.note("degraded","Icon",`"${t}" mapped to the A2UI icon "${i}"`);return{component:"Icon",name:i}},Metric:(e,n)=>{let t=[],i=u(e,"label","title");if(i!=null)t.push(n.push({component:"Text",text:n.dyn(i)??i,variant:"caption"}));let r=u(e,"value");if(r!=null)t.push(n.push({component:"Text",text:n.dyn(r)??r}));if(t.length===0){n.note("unsupported","Metric","neither a label nor a value to render");return}return n.note("degraded","Metric","rendered as a Column of Text; trend and delta styling dropped"),{component:"Column",children:t}},Tabs:(e,n)=>{let t=Array.isArray(e.children)?e.children:[],i=[];for(let r of t){let o=n.single(r.children);if(o==null)continue;i.push({title:u(r,"title")??"Tab",child:o})}if(i.length===0){n.note("unsupported","Tabs","no tab had renderable content");return}return{component:"Tabs",tabs:i}},Dialog:(e,n)=>{let t=n.single(e.children);if(t==null){n.note("unsupported","Dialog","no dialog body to render");return}let i=e.trigger,r=i!=null?u(i,"label","content")??u(e,"title")??"Open":u(e,"title")??"Open";return{component:"Modal",trigger:(i!=null?n.child(i):void 0)??n.push({component:"Text",text:n.dyn(r)??r}),content:t}},AccordionItem:(e,n)=>{let t=[],i=u(e,"title");if(i!=null)t.push(n.push({component:"Text",text:i,variant:"caption"}));if(t.push(...n.children(e.children)),t.length===0){n.note("unsupported","AccordionItem","nothing to render");return}return n.note("degraded","AccordionItem","rendered expanded; A2UI Basic has no disclosure component"),{component:"Column",children:t}}},A={Column:y("Column"),Row:y("Row"),...q,...I,...Fe,...T,Image:O("Image"),Video:O("Video"),Audio:O("AudioPlayer"),Table:V,DataTable:j};for(let e of Ne)A[e]??=y("Column");for(let e of Be)A[e]??=y("Row");var _e=new Set(["Tab","SelectOption","ComboboxOption","Radio","Option",...J]),Je={LineChart:"charts",BarChart:"charts",AreaChart:"charts",PieChart:"charts",ScatterChart:"charts",RadarChart:"charts",RadialChart:"charts",Histogram:"charts",Sparkline:"charts",Svg:"inline vector graphics",Mermaid:"diagrams",Embed:"embedded frames",DropZone:"file uploads",Ring:"progress rings",Loader:"loading indicators",Progress:"progress bars"};function z(e){return A[e]}function G(e){return _e.has(e)}function W(){return Object.keys(A).sort()}function K(e,n){let t=Je[e.type];if(t!=null){n.note("unsupported",e.type,`${t} are outside the A2UI Basic catalog`);return}if(Array.isArray(e.children)&&e.children.length>0){let i=n.children(e.children);if(i.length>0)return n.note("degraded",e.type,"no Basic-catalog equivalent; flattened to a Column"),{component:"Column",children:i}}if(u(e,"content","text","label","title")!=null)return n.note("degraded",e.type,"no Basic-catalog equivalent; rendered as Text"),l(e,n);n.note("unsupported",e.type,"no Basic-catalog equivalent and nothing to render");return}var p="v1.0",b="https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json",Y="application/a2ui+json",X="a2ui://",C="root";var je=x("a2ui");function Ve(e){let n=e.children;if(e.type==="Div"&&typeof e.cssClass==="string"&&e.cssClass.startsWith("pf-app-root")&&Array.isArray(n)&&n.length===1)return n[0];return e}function Z(e,n){if(e.type==="Define"){let t=typeof e.name==="string"?e.name:void 0;if(t!=null&&Array.isArray(e.children))n.set(t,e.children)}if(Array.isArray(e.children))for(let t of e.children)Z(t,n)}class Q{warn;components=new Map;dataModel=new Map;used=new Set([C]);diagnostics=[];definitions=new Map;counter=0;scope={};slots={};expanding=new Set;constructor(e){this.warn=e}bind(e){return f(e,this.scope)}dyn(e){return h(e,this.scope)}inScope(e,n){let t=this.scope;this.scope={...t,...e};try{return n()}finally{this.scope=t}}withSlots(e,n){let t=this.slots;this.slots={...t,...e};try{return n()}finally{this.slots=t}}slotContent(e){return this.slots[e]}definition(e){if(this.expanding.has(e)){this.note("unsupported","Use",`definition "${e}" uses itself; A2UI has no recursive template`);return}return this.definitions.get(e)}expand(e,n){this.expanding.add(e);try{return n()}finally{this.expanding.delete(e)}}note(e,n,t){if(this.diagnostics.push({kind:e,subject:n,detail:t}),this.warn)je.warn(`${e}: ${n} — ${t}`)}allocate(e){let n=typeof e?.id==="string"&&e.id.length>0?e.id:void 0;if(n!=null&&!this.used.has(n))return this.used.add(n),n;let t;do this.counter+=1,t=`c${this.counter}`;while(this.used.has(t));return this.used.add(t),t}push(e){let n=this.allocate();return this.components.set(n,{id:n,...e}),n}bindData(e,n){let t=e,i=0;while(this.dataModel.has(t))i+=1,t=`${e}${i}`;return this.dataModel.set(t,n),`/${c(t)}`}child(e){return this.emit(e,!1)}children(e){if(!Array.isArray(e))return[];let n=[];for(let t of e){if(t==null||typeof t!=="object")continue;let i=this.emit(t,!1);if(i!=null)n.push(i)}return n}single(e){let n=this.children(e);if(n.length===0)return;if(n.length===1)return n[0];return this.push({component:"Column",children:n})}action(e,n){if(e==null)return;if(Array.isArray(e)){if(e.length===0)return;if(e.length>1)this.note("action",n,`${e.length} actions were bound; A2UI carries one, so the rest were dropped`);return this.action(e[0],n)}if(typeof e!=="object")return;let t=e,i=typeof t.action==="string"?t.action:void 0;if(i==null)return;switch(i){case"toolCall":case"callTool":{let r=typeof t.tool==="string"?t.tool:void 0;if(r==null)return;let o=this.eventContext(t.arguments,n);return{event:{name:r,...o!=null&&{context:o}}}}case"sendMessage":return{event:{name:"sendMessage",context:{message:typeof t.message==="string"?t.message:""}}};case"openLink":{let r=typeof t.url==="string"?t.url:typeof t.href==="string"?t.href:void 0;if(r==null)return;return{functionCall:{call:"openUrl",args:{url:r}}}}default:{this.note("action",n,`"${i}" has no renderer-side equivalent; emitted as an agent event`);let{action:r,...o}=t,s=this.eventContext(o,n);return{event:{name:i,...s!=null&&{context:s}}}}}}eventContext(e,n){if(e==null||typeof e!=="object"||Array.isArray(e))return;let t={};for(let[i,r]of Object.entries(e)){if(typeof r==="number"||typeof r==="boolean"||r===null){t[i]=r;continue}if(typeof r!=="string"){this.note("action",n,`argument "${i}" is not a scalar and was dropped from the event context`);continue}let o=f(r);if(o.kind==="unbindable"){this.note("action",n,`argument "${i}" uses "${o.expression}", which A2UI cannot bind; it was dropped`);continue}t[i]=o.kind==="binding"?o.value:o.value}return Object.keys(t).length>0?t:void 0}rollback(e,n){let t=[...this.components.keys()];for(let r=e;r<t.length;r++)if(this.components.delete(t[r]),t[r]!==C)this.used.delete(t[r]);let i=[...this.dataModel.keys()];for(let r=n;r<i.length;r++)this.dataModel.delete(i[r])}emit(e,n){if(typeof e.type!=="string")return;if(G(e.type)){this.note("unsupported",e.type,"only meaningful inside its parent; emitted standalone it has no meaning");return}let t=this.components.size,i=this.dataModel.size,r=n?C:this.allocate(e);this.components.set(r,void 0);let s=(z(e.type)??K)(e,this);if(s==null){this.rollback(t,i);return}return this.components.set(r,{id:r,...s}),r}finish(e,n){let t=n.surfaceId??"prefab";for(let[d,oe]of Object.entries(e.defs??{}))this.definitions.set(d,[oe]);if(Z(e.view,this.definitions),this.emit(Ve(e.view),!0)==null)this.note("unsupported","view","nothing in the view could be expressed in A2UI; the surface is empty");let r=[];for(let d of this.components.values())if(d!=null)r.push(d);let o={...Object.fromEntries(this.dataModel),...e.state??{}},s=Object.keys(o).length>0,a=[],g=n.catalogId??b;if(n.stream===!0){if(a.push({version:p,createSurface:{surfaceId:t,catalogId:g,...n.sendDataModel===!0&&{sendDataModel:!0}}}),r.length>0)a.push({version:p,updateComponents:{surfaceId:t,components:r}});if(s)a.push({version:p,updateDataModel:{surfaceId:t,value:o}})}else a.push({version:p,createSurface:{surfaceId:t,catalogId:g,...n.sendDataModel===!0&&{sendDataModel:!0},...r.length>0&&{components:r},...s&&{dataModel:o}}});return{messages:a,diagnostics:this.diagnostics}}}function ee(e,n){let t=n??{};return new Q(t.warn===!0).finish(e,t)}var ne="0.3.20";function te(e,n){if(e==null||typeof e!=="object"||!("view"in e))throw TypeError('PrefabA2UI.emit: expected a $prefab payload with a "view"');return ee(e,n)}function ie(e){return{messages:e}}var re={emit:te,envelope:ie,mappedTypes:W,VERSION:ne,A2UI_VERSION:p,A2UI_BASIC_CATALOG:b,A2UI_MIME:Y,A2UI_SCHEME:X},qe=re;if(typeof window<"u")Object.assign(window,{PrefabA2UI:re});})();
@@ -1,5 +1,5 @@
1
1
  /** Package version, stamped by `release.yml`. Identifies the app to MCP Apps hosts and pins the CDN URL. */
2
- export declare const VERSION = "0.3.19";
2
+ export declare const VERSION = "0.3.20";
3
3
  /** `$prefab.version` of the wire format, matching upstream PrefectHQ/prefab 0.3; the renderer still reads 0.2. */
4
4
  export declare const PROTOCOL_VERSION = "0.3";
5
5
  //# sourceMappingURL=version.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /** Package version, stamped by `release.yml`. Identifies the app to MCP Apps hosts and pins the CDN URL. */
2
- export const VERSION = '0.3.19';
2
+ export const VERSION = '0.3.20';
3
3
  /** `$prefab.version` of the wire format, matching upstream PrefectHQ/prefab 0.3; the renderer still reads 0.2. */
4
4
  export const PROTOCOL_VERSION = '0.3';
5
5
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/renderer/components/charts/props.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE9C,wBAAgB,SAAS,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,GAAG,QAAQ,EAAE,CAE7E;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,GAAG,SAAS,CAIzF;AAqBD,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,WAAW,EAAE,CAM9D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAEzE;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,eAAe,CAK3F;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,MAAM,EAAE,MAAM,CAA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,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,eAAe,CAK3F;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,OAAO,CAAA;IACjB,cAAc,EAAE,OAAO,CAAA;IACvB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,cAAc,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;CACrC;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,GAAG,cAAc,CAgBtF"}
@@ -5,9 +5,10 @@ export function chartRows(node, ctx) {
5
5
  }
6
6
  export function chartValues(node, ctx) {
7
7
  const raw = resolveValue(node.data, ctx);
8
- if (!Array.isArray(raw) || raw.length === 0)
8
+ if (!Array.isArray(raw))
9
9
  return undefined;
10
- return raw.filter((v) => typeof v === 'number' && Number.isFinite(v));
10
+ const values = raw.filter((v) => typeof v === 'number' && Number.isFinite(v));
11
+ return values.length > 0 ? values : undefined;
11
12
  }
12
13
  function parseYAxisId(value) {
13
14
  return value === 'left' || value === 'right' ? value : undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../src/renderer/components/charts/props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,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